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: add podman_machine_aarch64 #15031

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

lsm5
Copy link
Member

@lsm5 lsm5 commented Jul 21, 2022

Depends on #14801

Does this PR introduce a user-facing change?

None

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 21, 2022
@edsantiago
Copy link
Member

Task map is depressing: cirrus-map-pr15031

I'm not seeing any way that the separate arch64 tasks can be combined into the existing ones, so I suppose we have to live with it.

I'm seeing this as an attempt to get CI working, and am assuming that everyone's goal is to merge #14972 first, then #14719, then rebase and review this one. If that is not a correct assumption, please respond here.

@lsm5
Copy link
Member Author

lsm5 commented Jul 21, 2022

I'm seeing this as an attempt to get CI working, and am assuming that everyone's goal is to merge #14972 first, then #14719, then rebase and review this one. If that is not a correct assumption, please respond here.

@edsantiago Exactly as you said. I only included those cause @cevich said it contains some fixes.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 23, 2022
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from d49a974 to 54fdd3e Compare July 28, 2022 12:35
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2022
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from 54fdd3e to 54861a2 Compare July 28, 2022 12:37
@lsm5
Copy link
Member Author

lsm5 commented Jul 28, 2022

@cevich remind me please, do i need some label to get the machine tests to run ?

@edsantiago edsantiago added the test_podman_machine Cause cirrus-ci to execute podman_machine tests label Jul 28, 2022
@lsm5 lsm5 marked this pull request as ready for review July 28, 2022 15:07
@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 Jul 28, 2022
@lsm5
Copy link
Member Author

lsm5 commented Jul 28, 2022

can't quite figure out the exact failure in x86_64 machine test

@lsm5
Copy link
Member Author

lsm5 commented Jul 28, 2022

@cevich @edsantiago would test_podman_machine also trigger aarch64 tests or does it need a new label? I don't see anything in the repo nor in the label info

@edsantiago
Copy link
Member

As best I can tell, the new stanza is identical to the old one except for the AARCH64 parts (and whitespace differences). The tag should apply, I don't see anything in cirrus docs indicating that "it only works for one task" or anything like that. So, no idea why the new one didn't trigger, and no idea why the first one failed. Sorry.

@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch 2 times, most recently from 01312d4 to d93eefe Compare August 1, 2022 12:45
@lsm5 lsm5 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 1, 2022
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch 3 times, most recently from 1654af4 to 2a860dc Compare August 3, 2022 15:32
@lsm5 lsm5 added test_podman_machine Cause cirrus-ci to execute podman_machine tests and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. test_podman_machine Cause cirrus-ci to execute podman_machine tests labels Aug 3, 2022
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch 2 times, most recently from 40d55dd to c59317a Compare August 4, 2022 14:44
.cirrus.yml Outdated Show resolved Hide resolved
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from 9ff6812 to 8595482 Compare August 16, 2022 19:00
@edsantiago
Copy link
Member

Go expert needed. Looks like go lint is smart enough to realize that Skip() means "code below doesn't get run", but too stupid to realize that Skip() is temporary and it should just shut up. So:

pkg/machine/e2e/config_basic_test.go:15:24: func `(*basicMachine).withPodmanCommand` is unused (unused)
func (s *basicMachine) withPodmanCommand(args []string) *basicMachine {
                       ^
pkg/machine/e2e/config_basic_test.go:7:23: func `basicMachine.buildCmd` is unused (unused)
func (s basicMachine) buildCmd(m *machineTestBuilder) []string {
                      ^
pkg/machine/e2e/config_basic_test.go:3:6: type `basicMachine` is unused (unused)
type basicMachine struct {
     ^

Go expert, please give the solution.

@edsantiago
Copy link
Member

Oh, never mind. @lsm5 try this:

diff --git a/pkg/machine/e2e/basic_test.go b/pkg/machine/e2e/basic_test.go
index 2228259f9..923e7cde4 100644
--- a/pkg/machine/e2e/basic_test.go
+++ b/pkg/machine/e2e/basic_test.go
@@ -1,6 +1,8 @@
 package e2e_test
 
 import (
+       "os"
+
        . "github.com/onsi/ginkgo"
        . "github.com/onsi/gomega"
        . "github.com/onsi/gomega/gexec"
@@ -20,7 +22,9 @@ var _ = Describe("run basic podman commands", func() {
        })
 
        It("Basic ops", func() {
-               Skip("FIXME: #15347 - Basic ops fails on PR runs and on x86_64")
+               if os.Getenv("CIRRUS_CI") != "" {
+                       Skip("FIXME: #15347 - Basic ops fails on PR runs and on x86_64")
+               }
 
                name := randomString()
                i := new(initMachine)

@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from 8595482 to 581c5d2 Compare August 16, 2022 19:43
@mtrmac
Copy link
Collaborator

mtrmac commented Aug 16, 2022

Very minimally tested: Just above the Skip, do something like

		bmOnlyToMarkUsed := basicMachine{}
		_ = bmOnlyToMarkUsed.withPodmanCommand
		Skip("…")

and possibly similarly for other unused methods.

@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from 581c5d2 to 4b16f53 Compare August 16, 2022 19:59
@mtrmac
Copy link
Collaborator

mtrmac commented Aug 16, 2022

FWIW the os.Getenv approach is a better solution, because it continues to make the rest of the test fully visible to the validator, and bugs introduced in that code would be more likely to be caught.

I’d only recommend a minor improvement: something like if os.Getenv("this-variable-is-never-expected-to-be-set") != "and-especially-not-to-this-value", to make the test behave consistently in CI and local runs.

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 16, 2022

… and to add a comment to the Getenv call explaining that the purpose is to make the Skip invisible to dead-code linters.

@lsm5
Copy link
Member Author

lsm5 commented Aug 16, 2022

PTAL at changes.

@cdoern
Copy link
Contributor

cdoern commented Aug 16, 2022

Sorry that I missed this today. If needed I can assist @baude with the known_hosts patch. Everything @mtrmac is right, we opted not to write to a file if the key did not exist.

Adding a way to enable/disable this (with the default option to be disable) seems like the best fix. I can fire away a c/common PR if no one has tried that route yet.

I'm back from PTO this Sunday, so I will look for other issues with the machine tests that might have slipped through before then to ensure nothing else breaks.

@cevich
Copy link
Member

cevich commented Aug 16, 2022

I’d only recommend a minor improvement: something like if os.Getenv("this-variable-is-never-expected-to-be-set") != "and-especially-not-to-this-value", to make the test behave consistently in CI and local runs.

Careful, for anybody using hack/get_ci_vm.sh the $CIRRUS_CI variable won't be set, but IIRC $GET_CI_VM is set non-zero.

@edsantiago
Copy link
Member

That's a feature (albeit not one I had intended): anyone using get_ci_vm is going to be doing so expressly for the purpose of fixing this bug, so they don't want the test skipped.

The important thing right now is to get this PR merged, and the way to do that is by skipping the test in Cirrus.

@cevich
Copy link
Member

cevich commented Aug 16, 2022

is going to be doing so expressly for the purpose of fixing this bug

Well, we can hope at least. Otherwise this will be a constant nag for anybody trying to play with anything podman-machine related in get_ci_vm. Many times, temporary==permanent, which is why I'm nervous.

Either way, you're right, we do need to get this PR merged ASAP.

Run machine tests on every PR as label-driven machine test
triggering is currently hard to predict and debug.

Co-authored-by: Ed Santiago <[email protected]>
Co-authored-by: Miloslav Trmač <[email protected]>
Signed-off-by: Lokesh Mandvekar <[email protected]>
@lsm5 lsm5 force-pushed the ec2-aarch64-machine branch from f67a377 to 2a6daa1 Compare August 17, 2022 13:11
@lsm5
Copy link
Member Author

lsm5 commented Aug 17, 2022

@baude @edsantiago @cevich good to go. PTAL.

@edsantiago
Copy link
Member

@lsm5 I'm sitting here watching the spinning CI and waiting for it to finish...

@lsm5
Copy link
Member Author

lsm5 commented Aug 17, 2022

@lsm5 I'm sitting here watching the spinning CI and waiting for it to finish...

yup 😆 I meant apart from the artifacts test

@edsantiago
Copy link
Member

/lgtm

\o/

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 17, 2022
@openshift-merge-robot openshift-merge-robot merged commit f70c9cd into containers:main Aug 17, 2022
@lsm5 lsm5 deleted the ec2-aarch64-machine branch August 17, 2022 15:52
@cevich
Copy link
Member

cevich commented Aug 17, 2022

Good job everybody, esp. @lsm5 leading this. Pretty soon I'll be completely out of a job 🤣

@lsm5
Copy link
Member Author

lsm5 commented Aug 18, 2022

Good job everybody, esp. @lsm5 leading this. Pretty soon I'll be completely out of a job rofl

with my awesome yaml skills, you have at least a 100 years worth of job security 😆

@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 Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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 test_podman_machine Cause cirrus-ci to execute podman_machine tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants