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 test for container push on Katello 4.14+ #1853

Merged
merged 1 commit into from
Sep 26, 2024
Merged

add test for container push on Katello 4.14+ #1853

merged 1 commit into from
Sep 26, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Sep 4, 2024

No description provided.

Comment on lines +21 to +22
CONTAINER_PULL_LABEL=$(echo "${ORGANIZATION_LABEL}-${PRODUCT_LABEL}-${CONTAINER_REPOSITORY_LABEL}"| tr '[:upper:]' '[:lower:]')
CONTAINER_PUSH_LABEL=$(echo "${ORGANIZATION_LABEL}/${PRODUCT_LABEL}/${CONTAINER_REPOSITORY_LABEL}-bats-$(date -u '+%s')"| tr '[:upper:]' '[:lower:]')
Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you need to pull with ORG-PRODUCT-REPO but push with ORG/PRODUCT/REPO.

@ianballou this hurts 😿

Copy link
Member

Choose a reason for hiding this comment

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

Aye it does - @ianballou is looking into whether we could switch to a / based naming scheme which is more common within the container world.

Copy link
Member Author

Choose a reason for hiding this comment

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

interestingly, pushed stuff is then also only pull-able with / -- so - only applies to synced stuff? confusing!

Copy link
Contributor

Choose a reason for hiding this comment

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

Exactly, we wanted content to be pullable with the same path that you pushed to. The way synced content gets distributed is out of date and confusing for sure.

Copy link
Contributor

@ianballou ianballou Sep 24, 2024

Choose a reason for hiding this comment

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

Synced content follows a naming scheme that the user can set on a per-environment basis. I guess in the early container days you couldn't have slashes, because dashes were chosen for some reason for the default.
Jump forward to now with container push, if we kept the environmental naming pattern, then users would see names change after they push, which is bad. So, for push, the naming scheme set on environments is ignored.
Now all that's left is the correct the old pattern for synced repositories.

Copy link
Contributor

Choose a reason for hiding this comment

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

I will add -- if you want all slashes before we fix it, BATS could change the container naming scheme :)

Copy link
Member Author

Choose a reason for hiding this comment

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

nah, let's keep as close to the default config as possible

@@ -53,6 +53,13 @@ tSkipIfNewerThan45() {
fi
}

tContainerPushSupported() {
KATELLO_VERSION=$(tKatelloVersion)
if ! tIsVersionNewer "${KATELLO_VERSION}" 4.13; then
Copy link
Member Author

Choose a reason for hiding this comment

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

That's based on Katello/katello#10952 -- is that a correct assumption?

Copy link
Contributor

Choose a reason for hiding this comment

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

That PR is just the beginning, I need to check but I think 4.14 would be better.

Copy link
Contributor

Choose a reason for hiding this comment

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

@evgeni I confirmed that Katello 4.14 and higher should be used here.

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

Copy link
Contributor

@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.

This looks fine at a glance, was it tested on a live system?

@evgeni
Copy link
Member Author

evgeni commented Sep 24, 2024

This looks fine at a glance, was it tested on a live system?

I did run it once on nightly and it didn't totally freak out, yeah :)

ianballou
ianballou previously approved these changes Sep 25, 2024
Copy link
Contributor

@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.

Looks like there was just enough of the container push feature implemented for this test to work in 4.13, nice. Ack!

I confirmed the feature wasn't fully done for Katello 4.13 -- can we change the requirement to 4.14+ ?

@ianballou ianballou dismissed their stale review September 25, 2024 12:12

Saw it was only tested on nightly, oops

@@ -53,6 +53,13 @@ tSkipIfNewerThan45() {
fi
}

tContainerPushSupported() {
KATELLO_VERSION=$(tKatelloVersion)
if ! tIsVersionNewer "${KATELLO_VERSION}" 4.13; then
Copy link
Contributor

Choose a reason for hiding this comment

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

@evgeni I confirmed that Katello 4.14 and higher should be used here.

@evgeni evgeni changed the title add test for container push on Katello 4.13+ add test for container push on Katello 4.14+ Sep 26, 2024
Copy link
Contributor

@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.

Looks good!

@evgeni evgeni merged commit d7c8d70 into master Sep 26, 2024
13 checks passed
@evgeni evgeni deleted the container-push branch September 26, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants