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

Even when data/milestones.json exists, the project doesn't start #2519

Open
karlcow opened this issue Jun 22, 2018 · 1 comment
Open

Even when data/milestones.json exists, the project doesn't start #2519

karlcow opened this issue Jun 22, 2018 · 1 comment

Comments

@karlcow
Copy link
Member

karlcow commented Jun 22, 2018

Steps to reproduce:

  1. Disconnect from the network
  2. Start your environment
  3. Check that data/milestones.json exists
  4. start the project.

Actual:

🐝 10:07:14 ~/code/webcompat.com
→ python run.py
Statuses Initialization…
Fetching milestones from Github…
Milestones are not initialized. Check logs.

Our current logic is to try to fetch the milestones online, and if it the network request fails to fallback on the data/milestones.json. This has consequences.

  1. The project can't start if the user is offline even with the right data.
  2. The project can't start if the GitHub API received already too many requests and data/milestones.json doesn't already exist. (This happened during All Hands.)

We could invert the logic by checking first data/milestones.json and fetching online if it doesn't exist. It would be more logical at least in LOCALHOST mode where we have probably a version of the data handy. The frequency of actions seem to be in favor of data/ first and then network second.

This would partially solves #2518

@miketaylr for input/feedback

@miketaylr
Copy link
Member

We could invert the logic by checking first data/milestones.json and fetching online if it doesn't exist. It would be more logical at least in LOCALHOST mode where we have probably a version of the data handy.

This sounds reasonable to me.

@karlcow karlcow self-assigned this Jun 28, 2018
karlcow added a commit to karlcow/webcompat.com that referenced this issue Jun 28, 2018
miketaylr pushed a commit that referenced this issue Jun 28, 2018
Issue #2519 - Changes the logic for initializing milestones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants