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

feat: move generate_code_owner_mappings and add enterprise override #321

Merged
merged 5 commits into from
Jun 5, 2023

Conversation

rgraber
Copy link
Contributor

@rgraber rgraber commented Jun 5, 2023

Copies generate_code_owner_mappings and adds a hardcoded exception where enterprise-quokkas owns edx-enterprise/integrated_paths. Somewhat hacky but it seems likely this is the only override we need so it makes sense to put it in the script rather than reformat all the data.

TODO after:

  • Change the jenkins job to use this script instead of the one in edx-platform.
  • Update the spreadsheet README to include information about the override
  • Remove the script from edx-platform

Best viewed as separate commits.

The first commit just copied the script from edx-platform
The second commit added the override
The third commit is just some additional comments around things I found confusing

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@rgraber rgraber force-pushed the rsgraber/20230605-multiple-enterprise-owners branch from 67e33b2 to 12595a0 Compare June 5, 2023 18:55
@rgraber rgraber force-pushed the rsgraber/20230605-multiple-enterprise-owners branch from a277d30 to 7a6c8a1 Compare June 5, 2023 18:56
@rgraber rgraber force-pushed the rsgraber/20230605-multiple-enterprise-owners branch from 51becd4 to 68f4203 Compare June 5, 2023 19:14
Copy link
Contributor

@robrap robrap left a comment

Choose a reason for hiding this comment

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

I'd also add a warning in the docstring about this highly unexpected override, even if we switch to a constant for the override mapping.

@@ -166,7 +166,11 @@ def _map_repo_apps(csv_type, repo_csv, app_to_repo_map, owner_map, owner_to_path
csv_repo_to_owner_map[row.get('repo url')] = owner

for app, repo_url in app_to_repo_map.items():
owner = csv_repo_to_owner_map.get(repo_url, None)
# special case: enterprise-quokkas owns integrated channels but not the rest of edx-enterprise
if app == "integrated_channels":
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are going to hard code, could we at least add EDX_REPO_APPS_OVERRIDES or something like that so all the configs are together and this isn't buried in the code? The data structure would make it simpler to add others, but that is not the reason. It is difficult to figure out where this mapping code happens, and burying in the code itself just makes it that much harder.

@rgraber rgraber requested a review from robrap June 5, 2023 19:55
Copy link
Contributor

@robrap robrap left a comment

Choose a reason for hiding this comment

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

Minor comment update requested, but do whatever you think is best. Thanks.

@rgraber rgraber merged commit 5fc7733 into main Jun 5, 2023
@rgraber rgraber deleted the rsgraber/20230605-multiple-enterprise-owners branch June 5, 2023 20:33
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