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

[2/x] Add debian mirroring support to RMT #1057

Merged
merged 16 commits into from
Jan 29, 2024

Conversation

ngetahun
Copy link
Contributor

@ngetahun ngetahun commented Dec 20, 2023

This PR is part of our code sprint: https://trello.com/c/hU27QHob/3134-rdeb-sprint-tracker

The whole changeset is:

[1/5] Prepare code sprint and implement repository type detection
[2/5] Add flat debian mirroring support to RMT
[3/5] Refactor suma mirroring
[4/5] Refactor repomd mirroring
[5/5] Fixes and cleanup
[6/6] Nested debian repository support

Implementations in this PR:

  • Creating a base class for mirroring repositories and add tests
  • Implement Debian flat repository mirroring in its own class utilizing base class and write tests
  • Improve FileReference class and make it a first class citizen in the code base

How to review this pull request:

Test the new Debian mirroring implementation

$ bin/rails c
> debian = Repository.find_by(name: 'Debian-10-SUSE-Manager-Tools')
> mirror = RMT::Mirror::Debian.new(repository: debian, logger: RMT::Logger.new($stdout))
> mirror.mirror
# expect: this will download all debs of this repository

# In another terminal
$ tree <devrmt>/public/repo/SUSE/Updates/Debian/10-CLIENT-TOOLS/x86_64/update/
# expect: all debs are downloaded as in the original repository
# expect: metadata is existing in the directory

# back to the rails console
> mirror.mirror
# expect: It should not download any new packages only update timestamps

Debian integration test

# Terminal A
$ python3 -m http.server -d <devrmt>/public

# Terminal B
$ docker run --rm --network host -it debian:10
$ echo 'deb [trusted=yes allow-insecure=yes] http://0.0.0.0:8000/repo/SUSE/Updates/Debian/10-CLIENT-TOOLS/x86_64/update/ /' >> /etc/apt/sources.list
$ apt update
$ apt install spacecmd
# expect: It works! It is alive! It has a name! Its name is Herold!

Thanks for reviewing this pull request!

If you have any question please do not hesitate to approach me! 🚀

DO NOT MERGE UNTIL COMPLETELY READY

@likhitha77 likhitha77 force-pushed the refactor_mirror_action branch from cb882ba to 58e0c73 Compare December 22, 2023 08:54
@SUSE SUSE deleted a comment from suse-tests-pass Dec 27, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Dec 28, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Dec 28, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Dec 28, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Dec 28, 2023
@felixsch felixsch changed the title WIP: Refactoring mirroring and add debian mirror class [2/x] Add debian mirroring support to RMT Dec 28, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Dec 28, 2023
@SUSE SUSE deleted a comment from suse-tests-pass Jan 2, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 2, 2024
Base automatically changed from detect-repo-type to master January 3, 2024 12:54
@SUSE SUSE deleted a comment from suse-tests-pass Jan 3, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 3, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 3, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 4, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 4, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 4, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 8, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 8, 2024
@likhitha77 likhitha77 force-pushed the refactor_mirror_action branch from a8ea9c3 to 75d9d83 Compare January 9, 2024 09:38
@SUSE SUSE deleted a comment from suse-tests-pass Jan 9, 2024
@felixsch felixsch added the On hold Issue being evaluated label Jan 9, 2024
@felixsch felixsch mentioned this pull request Jan 9, 2024
@SUSE SUSE deleted a comment from suse-tests-pass Jan 11, 2024
@lcaparroz lcaparroz changed the base branch from master to revert-1061-revert-1056-detect-repo-type January 12, 2024 13:19
@lcaparroz lcaparroz force-pushed the refactor_mirror_action branch from 75d9d83 to 1efd7d9 Compare January 12, 2024 13:50
@SUSE SUSE deleted a comment from suse-tests-pass Jan 12, 2024
@ngetahun ngetahun changed the base branch from revert-1061-revert-1056-detect-repo-type to rmt_deb_codesprint January 18, 2024 14:38
@ngetahun ngetahun changed the base branch from rmt_deb_codesprint to revert-1061-revert-1056-detect-repo-type January 18, 2024 14:39
@SUSE SUSE deleted a comment from suse-tests-pass Jan 24, 2024
@suse-tests-pass
Copy link
Collaborator

Well Done! Your tests are still passing.
https://ci.suse.de/job/scc-RMT-integration-tests/354752/console
If the given link has expired,you can force a Prophet rerun by just deleting this comment. (Merged 1efd7d9 into 024478b)

Base automatically changed from revert-1061-revert-1056-detect-repo-type to rmt_deb_codesprint January 29, 2024 13:01
@ngetahun ngetahun merged commit 09d49f0 into rmt_deb_codesprint Jan 29, 2024
1 check passed
@ngetahun ngetahun deleted the refactor_mirror_action branch January 29, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On hold Issue being evaluated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants