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

Fixes #37853 - Add OSTree remote option depth #11157

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

lumarel
Copy link
Contributor

@lumarel lumarel commented Sep 20, 2024

What are the changes introduced in this pull request?

This PR adds the generic_remote_option depth to the OSTree repository type.

Considerations taken when implementing this change?

I checked if the missing number types for the generic remotes is already available somewhere, and tried to keep the form the same.
The number type in the new-repository form has set a minimum value of 0, I am still not sure if this is the best place for that, but I also didn't want to add new variables as this might have been a serious undertaking for me, to get a new variable into the generic_remote_option function.

What are the testing steps for this pull request?

I have a testsystem setup on Foreman 3.11, where I edited the source, including version upgrade tests.

@lumarel lumarel force-pushed the feature/ostree-depth-property branch from 876a2e1 to e716980 Compare September 30, 2024 21:41
@lumarel lumarel changed the title [WIP] Fixes #37853 - Add OSTree remote option depth Fixes #37853 - Add OSTree remote option depth Oct 1, 2024
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
Noticed one quick thing:

@lumarel lumarel marked this pull request as ready for review October 1, 2024 20:36
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Later in the file there's the line:

test_url_root_options generic_remote_options: {include_refs: ['rawhide']}.to_json

What if you changed it to:

test_url_root_options generic_remote_options: {include_refs: ['rawhide'], depth: 1}.to_json

or something like that? That way, the test in test/services/katello/pulp3/repository_integration_test.rb I think would pick it up and test the new parameter.

I'm going off of some assumptions since I haven't looked at generic content types for a while, but it's worth checking for more test coverage.

@lumarel
Copy link
Contributor Author

lumarel commented Oct 1, 2024

Okay thanks for the review, lets see if there is really a VCR change necessary now, after the test addition 🙂

Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

I just tested the PR, it's looking fine. I verified the depth is getting set on the Pulp remote:

...
    }
  ],
  "depth": 1,
  "include_refs": [],
  "exclude_refs": []
...

I also see the option to set the depth in hammer:

 --deb-releases VALUE                           Whitespace-separated list of releases to be synced from deb-archive
 --depth NUMBER                                 An option to specify how many commits to traverse.
 --description VALUE  

@lumarel lumarel force-pushed the feature/ostree-depth-property branch from 4d63cfe to 7fd897d Compare October 1, 2024 21:14
@ianballou
Copy link
Member

Looks like you just need to:

mode=all ktest katello/test/services/katello/pulp3/repository_integration_test.rb

and upload the new VCRs.

@lumarel lumarel force-pushed the feature/ostree-depth-property branch from 7fd897d to 2d82f75 Compare October 2, 2024 17:53
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

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

Looking good, thank you!

@ianballou ianballou merged commit c58ef63 into Katello:master Oct 2, 2024
27 checks passed
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