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

Refactor SUSE repo cleanup and local path generation logic supporting Akamai CDN #1257

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

paragjain0910
Copy link
Contributor

@paragjain0910 paragjain0910 commented Dec 11, 2024

Description

  • Refined make_local_path to handle URLs from both SUSE domains (https://updates.suse.com% and https://dl.suse.com%)

    • The method is called during repository creation and update in rmt.
    • Some repository URLs contain /repo in the path, such as https://updates.suse.com/repo/$RCE/SLES10-SP4-LTSS-Updates/sles-10-x86_64/ in SCC. When synced and mirrored, these URLs would lead to incorrect directory paths locally.
    • For example, the URL https://updates.suse.com/repo/$RCE/... would be updated to https://dl.suse.com/repo/$RCE/.... Without this fix, mirrored repositories would incorrectly create local paths like /repo/repo/....
    • The local path generation now correctly removes the /repo prefix, ensuring the correct local path structure.
  • Updated remove_suse_repos_without_tokens! to delete repositories with URLs from both the old (https://updates.suse.com%) and new (https://dl.suse.com%) CDN domains when auth_token is nil.

    • This method is called during the sync and import workflows. Previously, only repositories with URLs starting with https://updates.suse.com% were cleared.
    • After the migration to the new CDN, repositories with URLs starting with https://dl.suse.com% are now also deleted when lacking an authentication token.
  • Related Issue / Ticket / Trello card:

https://trello.com/c/YFbHJEkq/3669-edgxit-test-migration-to-new-cdn-domain-auth-token-with-rmt

How to test

Review

Please check out our review guidelines
and get in touch with the author to get a shared understanding of the change.

@lagartoflojo
Copy link
Contributor

Do we need to somehow handle the installer-updates.suse.com domain (which will transition to dl-public.suse.com)?
That domain hosts files that don't require an auth token.

@digitaltom
Copy link
Member

Do we need to somehow handle the installer-updates.suse.com domain (which will transition to dl-public.suse.com)? That domain hosts files that don't require an auth token.

There's nothing specific about installer-updates.suse.com in RMT, should be good.

@ngetahun
Copy link
Contributor

@paragjain0910
Copy link
Contributor Author

Copy link
Member

@digitaltom digitaltom left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry, stating that RMT is enabled to handle the new dl.suse.com CDN domain.

@paragjain0910 paragjain0910 merged commit 62bd50a into master Dec 16, 2024
3 checks passed
@paragjain0910 paragjain0910 deleted the akamai_cdn_migration branch December 16, 2024 13:04
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.

4 participants