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

Cirrus: Update CI VM Image to F38 #18326

Merged
merged 3 commits into from
Apr 27, 2023

Conversation

cevich
Copy link
Member

@cevich cevich commented Apr 24, 2023

Bump F36 -> F37, and F37 -> F38

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added release-note-none do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 24, 2023
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 24, 2023
@cevich
Copy link
Member Author

cevich commented Apr 24, 2023

@mtrmac IIRC you know a lot about these things. Is it okay for me to replace these calls as suggested in the linter output?

@mtrmac
Copy link
Collaborator

mtrmac commented Apr 24, 2023

I think the answer to that changes a bit based on whether we require Go 1.20 for Podman (https://go.dev/doc/go1.20 , random seed by default).

libpod/runtime.go:125:2

Would not work, vendor/github.com/docker/docker/pkg/namesgenerator/names-generator.go uses the global RNG. With Go 1.20, we can just delete the seeding to silence the warning without a behavior change.

Ideally, the generator should take an explicit RNG parameter, and Podman should call NewRand to maintain one.

libpod/runtime_test.go:25:2

Supposedly the Seed call is an essential part of the test … except that I’m not at all sure this is testing what it is saying it’s testing (and if it is testing that, it should fail with Go < 1.20 AFAICS).

test/e2e/common_test.go:433:2

Sure, use a NewRand locally for that function.

@cevich
Copy link
Member Author

cevich commented Apr 24, 2023

Thanks for your input @mtrmac

@cevich
Copy link
Member Author

cevich commented Apr 25, 2023

@mtrmac PTAL a82f74c see if I got that right. Are you at all concerned that these changes will be invalid for <F38 which isn't using golang 1.20?

Edit: Ref. 1.19 docs say:

Seed uses the provided seed value to initialize the default Source to a deterministic 
state. If Seed is not called, the generator behaves as if seeded by Seed(1)

vs in 1.20 (assuming we remove the Seed() call):

If Seed is not called, the generator is seeded randomly at program startup.

@cevich cevich force-pushed the f38_update branch 2 times, most recently from 1f4f50c to dad5e83 Compare April 25, 2023 15:22
@cevich cevich changed the title Cirrus: Update CI VM Image to F38 [WIP] Cirrus: Update CI VM Image to F38 Apr 25, 2023
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

I’m worried that fixing the libpod part completely cleanly might require changes to docker/docker/pkg/namesgenerator.

libpod/runtime_test.go Show resolved Hide resolved
test/e2e/common_test.go Show resolved Hide resolved
libpod/runtime.go Show resolved Hide resolved
@cevich
Copy link
Member Author

cevich commented Apr 25, 2023

@vrothberg & @mheon Might could use your input on this rand situation (in libpod/runtime.go). Seems like breaking-behavior change between golang 1.19 (F37) and 1.20 (F38 + rawhide): i.e. In =<1.19, global RNG seed is un-initialized at startup vs =>1.20 it's automatically initialized.

Edit: Not sure I'm using the "initialized" term right.

@cevich
Copy link
Member Author

cevich commented Apr 25, 2023

Force-push: Add go <1.20 build tag to handle the Seed() change. Also added new CI validation task for rawhide - it would have caught this problem earlier.

@cevich cevich force-pushed the f38_update branch 3 times, most recently from 0c35a2d to 1c3b018 Compare April 25, 2023 21:22
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

LGTM. Changing the generator would be a bit cleaner, but also feels rather out of scope.

libpod/runtime_pre_go1.10.go Outdated Show resolved Hide resolved
@mtrmac
Copy link
Collaborator

mtrmac commented Apr 25, 2023

LGTM.

The RNG changes at least, that is. I didn’t check what else is changing, and if anything is failing.

@cevich
Copy link
Member Author

cevich commented Apr 26, 2023

@vrothberg & @mheon un-Ping. I think Miloslav and I have it worked out.

@cevich cevich changed the title [WIP] Cirrus: Update CI VM Image to F38 Cirrus: Update CI VM Image to F38 Apr 26, 2023
@cevich
Copy link
Member Author

cevich commented Apr 26, 2023

Force-push: simple file rename & rebase against main.

@cevich cevich marked this pull request as ready for review April 26, 2023 17:32
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 26, 2023
@cevich
Copy link
Member Author

cevich commented Apr 26, 2023

Force-push: Added a simple e2e test to confirm running two containers w/ generated names works.

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

I would suggest just removing the new test

test/e2e/run_test.go Outdated Show resolved Hide resolved
test/e2e/run_test.go Outdated Show resolved Hide resolved
@cevich cevich force-pushed the f38_update branch 2 times, most recently from 72c9cb5 to e8a0de4 Compare April 26, 2023 18:51
cevich added 3 commits April 26, 2023 14:55
Ref: https://pkg.go.dev/math/[email protected]#Seed

Note: For `runtime_test.go`, this test-case was never actually doing
what appears as it's intent .  Fixing it to work as intended would be
require incredibly libpod-invasive changes.  Do the least-worse thing and
simply confirm that consecutive generated names are different.

Signed-off-by: Chris Evich <[email protected]>
@cevich
Copy link
Member Author

cevich commented Apr 27, 2023

This should be ready now.

@edsantiago
Copy link
Member

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 27, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2023
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

LGTM.

@rhatdan
Copy link
Member

rhatdan commented Apr 27, 2023

/approve
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cevich, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2023
@openshift-merge-robot openshift-merge-robot merged commit 19152fa into containers:main Apr 27, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants