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

Spike out a change to allow overriding the source package requirement. #122

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nuclearsandwich
Copy link
Contributor

Considering the possibility of using this repository for gurumdds
updates as well but since that's a proprietary package redistributed by
agreement it does not have source packages available and thus we would
need to be able to override our own check.

This is a minimal change which adds a new implicitly boolean field but
I'd like to get feedback on further refactoring to allow overrides to be
package specific (although I have no immediate use case for it).

Examples:

Override all source requirements:

override_sources_required: true

Override requirements for specific packages

override_sources_required:
  - gurumdds-2.6
  - gurumdds-2.7

Considering the possibility of using this repository for gurumdds
updates as well but since that's a proprietary package redistributed by
agreement it does not have source packages available and thus we would
need to be able to override our own check.

This is a minimal change which adds a new implicitly boolean field but
I'd like to get feedback on further refactoring to allow overrides to be
package specific (although I have no immediate use case for it).

Examples:

Override all source requirements:

```
override_sources_required: true
```

Override requirements for specific packages

```
override_sources_required:
  - gurumdds-2.6
  - gurumdds-2.7
```
@nuclearsandwich nuclearsandwich requested a review from j-rivero July 7, 2021 21:17
@nuclearsandwich nuclearsandwich self-assigned this Jul 7, 2021
self.__error(f'{self.__get_mirror_name(dist)} does not have a source package. Removing generated mirrors')
self.__log_ok('All source packages exist in the mirror')
# 2. Be sure mirror has all source packages unless the requirement is overridden.
if not self.config.override_sources_required:
Copy link
Member

Choose a reason for hiding this comment

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

It always logs that it's verifying the sources. For this case it would be good to log that it's explicitly skipping the check based on the config.

@j-rivero
Copy link
Contributor

j-rivero commented Jul 8, 2021

depending on urgency, it would be great to add a test for this case. Otherwise, looks good to me.

@nuclearsandwich
Copy link
Contributor Author

I agree adding a test is a requirement for getting this in and I like Tully's suggestion of logging the override.

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.

3 participants