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

Solves AlmaLinux/mirrors#1143 #1154

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

soksanichenko
Copy link
Member

  • Check if SELinux is enabled during Ansible deploying
  • PEP8 (long lines, indents, typing etc.)
  • The unused import are removed, the rest imports are optimized
  • Get right major version if a full version is not listed in duplicated versions (the main issue)
  • Old field versions_arches is removed from the service config. Field arches provides the full compatibility with it

- Check if SELinux is enabled during Ansible deploying
- PEP8 (long lines, indents, typing etc.)
- The unused import are removed, the rest imports are optimized
- Get right major version if a full version is not listed in duplicated versions (the main issue)
- Old field `versions_arches` is removed from the service config. Field `arches` provides the full compatibility with it
@@ -164,22 +166,38 @@ def get_mirror_list(

# protocol get arg
request_protocol = request.args.get('protocol')
if request_protocol and request_protocol not in ["http","https"]:
return "Invalid input for protocol, valid options: http, https"
if request_protocol and request_protocol not in ['http', 'https']:

Choose a reason for hiding this comment

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

Wouldn't

Suggested change
if request_protocol and request_protocol not in ['http', 'https']:
if request_protocol not in ['http', 'https']:

do the same?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Because we return any mirrors if request_protocol is None

Copy link
Member

@jonathanspw jonathanspw left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the cleanup in many areas.

@jonathanspw jonathanspw merged commit 487f6bb into mirrors_service Dec 10, 2024
@soksanichenko soksanichenko deleted the AlmaLinux/mirrors#1143/mirrors_service branch December 12, 2024 13:42
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