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

Add pulpcore 3.21 support #266

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Add pulpcore 3.21 support #266

merged 1 commit into from
Oct 20, 2022

Conversation

sjha4
Copy link
Contributor

@sjha4 sjha4 commented Oct 5, 2022

Adding pulpcore 3.21 since we have that packaged. Working on other bits to enable this in katello and gems packaging.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Looks good, but if you look at the failures (most visible in annotations @ https://github.com/theforeman/puppet-pulpcore/pull/266/files) you'll see that this issue has been resolved and now properly returns HTTP 200 again:

# Requires authentication: https://github.com/pulp/pulpcore/issues/2340
its(:response_code) { is_expected.to eq(403) }

I'd say that the easiest way to check it is ENV['BEAKER_FACTER_PULPCORE_VERSION'].

@@ -56,7 +56,11 @@

describe curl_command("https://#{host_inventory['fqdn']}/pulp/api/v3/", cacert: "#{certdir}/ca-cert.pem") do
# Requires authentication: https://github.com/pulp/pulpcore/issues/2340
its(:response_code) { is_expected.to eq(403) }
if(ENV['BEAKER_FACTER_PULPCORE_VERSION'] == '3.21')
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to be forward compatible and check if it isn't 3.17/3.18. Also because when you run it outside of CI (where we don't set the variable) it also ends up as 3.21 because that's the default in pulpcore::repo.

@wbclark
Copy link
Collaborator

wbclark commented Oct 7, 2022

Tangential comment -- I took a look at Pulp changelogs to see what shiny new features we get after your work here is done.

In particular, some users will definitely want to disable pulp/pulpcore#3115 . I took at a stab at that with #267

pulp/pulpcore#2329 was added previously in 3.19 and also looks like something that users may want to configure somewhat persistently for certain medium or longer term troubleshooting or monitoring scenarios, such as gathering data about intermittent or hard to reproduce issues.

@sjha4 sjha4 requested a review from ekohl October 19, 2022 14:50
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Minor suggestion.

@@ -56,7 +56,11 @@

describe curl_command("https://#{host_inventory['fqdn']}/pulp/api/v3/", cacert: "#{certdir}/ca-cert.pem") do
# Requires authentication: https://github.com/pulp/pulpcore/issues/2340
its(:response_code) { is_expected.to eq(403) }
if(ENV['BEAKER_FACTER_PULPCORE_VERSION'] !~ /3.1+/)
Copy link
Member

Choose a reason for hiding this comment

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

The + is kind of redundant since it means match 3.1 but also 3.1111. It's a partial match so it ends up working. A stricter match is:

Suggested change
if(ENV['BEAKER_FACTER_PULPCORE_VERSION'] !~ /3.1+/)
if(ENV['BEAKER_FACTER_PULPCORE_VERSION'] !~ /^3.1[6-9]$/)

Copy link
Member

Choose a reason for hiding this comment

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

Or you use the good old ['3.16', '3.17', '3.18', '3.19'].include?(…) ;)

(I don't mind either way, just don't like regular expressions too much 🙃)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The + is kind of redundant since it means match 3.1 but also 3.1111. It's a partial match so it ends up working. A stricter match is:

I love how this is a bug someone would have to find when pulpcore 3.100 is out.😄
I think I like ['3.16', '3.17', '3.18', '3.19'].include?(…). Keeps it simple. Will update.

Copy link
Member

Choose a reason for hiding this comment

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

The regex also would match 3116 ;)

@evgeni evgeni merged commit 2e5e59a into theforeman:master Oct 20, 2022
@evgeni
Copy link
Member

evgeni commented Oct 20, 2022

Thanks @sjha4!

@evgeni evgeni added the Enhancement New feature or request label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants