Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper logging for invalid feeds #653

Closed
c3ho opened this issue Feb 5, 2020 · 6 comments · Fixed by #2388
Closed

Proper logging for invalid feeds #653

c3ho opened this issue Feb 5, 2020 · 6 comments · Fixed by #2388
Assignees
Labels
5 min fix Fixable in 5 minutes or less area: back-end developer experience Helping the Developer Experience good first issue Good for newcomers hacktoberfest-accepted type: enhancement New feature or request

Comments

@c3ho
Copy link
Contributor

c3ho commented Feb 5, 2020

What would you like to be added:
PR for #462 should land this week, the PR invalidates feeds and provides a reason. Problem is the reason is not working properly and will be outside of the scope of that PR. You can find the code responsible for invalidating feeds inside src/backend/index.js

Why would you like this to be added:
At the moment all feeds that error will have a value of unknown reason making it hard to inform users of what is wrong.

@chrispinkney
Copy link
Contributor

chrispinkney commented Mar 16, 2021

This could be something that might want to be evaluated after PR #1828 lands.

@humphd humphd added 5 min fix Fixable in 5 minutes or less developer experience Helping the Developer Experience good first issue Good for newcomers hacktoberfest-accepted labels Oct 17, 2021
@humphd
Copy link
Contributor

humphd commented Oct 17, 2021

Let's fix this. @manekenpix and I are trying to determine why our good friend @raygervais's blog feed constantly gets invalidated--it's not because we don't love his writing, we do!

We need to do a few things to make this debuggable:

  1. When a feed parsing job fails we throw an error.
  2. This error will get passed to the queue's failed event as the second arg, see docs, which says, "Errors will be passed as a second argument to the "failed" event)".
  3. When that happens, we invalidate a feed here, but notice that we don't use the second arg error. This is a bug that needs to be fixed.
  4. We should be passing that error on to the invalidate code here. Then we can update
    await feed.setInvalid('unknown reason');
    logger.info(`Invalidating feed ${feed.url} for the following reason: ${'unknown reason'}`);
    to use the error, and store it in the database (e.g., we can JSON stringify it if we have to, or maybe the error.message is enough?).

I'm going to file another issue in order to allow us to see invalid feeds, and get the reason.

@joshuali7536
Copy link
Contributor

Hi, I would like to take on this issue.

@humphd
Copy link
Contributor

humphd commented Oct 17, 2021

@joshuali7536 awesome, thank you! It's all yours.

@joshuali7536
Copy link
Contributor

Hi @humphd,

So I took a look at the project trying to get a grasp of what things were doing to try and follow along with your steps. I'm not really sure if I'm doing this correctly. Could you take a look at this commit 5e1751e to see if I'm understanding properly?

@humphd
Copy link
Contributor

humphd commented Oct 23, 2021

@joshuali7536 yes, you're close:

  // TODO: we need to bubble up the reason for the failure
  await feed.setInvalid('unknown reason');

You need to update this bit too. Remove the TODO, and use error or error.message instead of 'unknown reason' so we put that in the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 min fix Fixable in 5 minutes or less area: back-end developer experience Helping the Developer Experience good first issue Good for newcomers hacktoberfest-accepted type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants