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

Update shipping_year when milestones are edited. #4397

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

jrobbins
Copy link
Collaborator

Once a feature owner fills in some shipping milestones, the feature's shipping_year should be calculated based on those milestones. This PR adds that calculation to the features_api.

In this PR:

  • Refactor fetch_chrome_release_info() into fetchchannels.py to avoid a circular import.
  • Implement the new logic in features_api.py
    • _patch_update_stages() now returns the list of stages that were updated so that we can check their milestones later.
    • Those updated stages and changed_fields are now passed into _patch_update_special_fields() so that we can check milestones and add a changed field item if shipping_year is set.
  • Refactor three functions from maintenance_scripts.py to stage_helpers to avoid having APIs depend on maintenance stuff.

Comment on lines 263 to 265
if updated_stages:
existing_shipping_stages = (
stage_helpers.get_all_shipping_stages_with_milestones(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a large check for any time any stage is updated. Is it safe to check only when a shipping milestone is changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

@jrobbins jrobbins merged commit df3e080 into main Sep 27, 2024
7 checks passed
@jrobbins jrobbins deleted the 20240926-update-shipping_year-when-milestones-edited branch September 27, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants