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

ci: gha test workflow for integration and unit test #44034

Merged
merged 7 commits into from
Sep 8, 2022

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Aug 25, 2022

follow-up #43479

- What I did

Adds gha test workflow to run integration and unit test. Will ease testing #43529 and also moving out some bits from Jenkins.

I use the same matrix strategy to distribute integration-cli tests as windows workflow. Looking at the overall number of jobs running in the pipeline now I think we could remove tests against windows-2019 so queue size would be reduce.

Some tests look broken on GitHub Runner, probably linked to the runner environment so skipping them on gha env for now.


integration (rootless): https://github.com/crazy-max/moby/runs/8010866754?check_suite_focus=true#step:7:1032

=== Failed
=== FAIL: amd64.integration.container TestNetworkLoopbackNat (1.48s)
    nat_test.go:91: assertion failed: it works (msg string) !=  (string)

related #41561


ìntegration-cli: https://github.com/crazy-max/moby/runs/8010867286?check_suite_focus=true#step:6:662

=== Failed
=== FAIL: amd64.integration-cli TestDockerCLIEventSuite/TestEventsOOMDisableTrue (0.03s)
    docker_cli_events_unix_test.go:99: assertion failed: error is not nil: error executing docker inspect: Error response from daemon: invalid reference format: repository name must be lowercase

related #36541


ìntegration-cli: https://github.com/crazy-max/moby/runs/8010867670?check_suite_focus=true#step:6:1328

=== Failed
=== FAIL: amd64.integration-cli TestDockerPluginSuite/TestPluginInstallImage (15.21s)
    docker_cli_plugins_test.go:232: assertion failed: expression is false: strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`)
    --- FAIL: TestDockerPluginSuite/TestPluginInstallImage (15.21s)

related #41559 #43996

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@crazy-max
Copy link
Member Author

https://github.com/moby/moby/runs/8017622176?check_suite_focus=true#step:6:1856

=== Failed
=== FAIL: libnetwork/networkdb TestNetworkDBCRUDMediumCluster (22.12s)
    networkdb_test.go:426: timeout hit after 20s: node2:Waiting for cluster peers to be established

related #42484

Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -69,6 +69,10 @@ func UnixCli() bool {
return isUnixCli
}

func NotGitHubActions() bool {
return os.Getenv("GITHUB_ACTIONS") != "true"
Copy link
Member

Choose a reason for hiding this comment

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

Better to use strconv.ParseBool

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think we can either go with "allow the variable to both enable or explicitly disable", in which case we would have something like gzDecompress()

Or, we could keep it simple and consider any non-empty value to be "enabled", and empty to be "disabled";

if os.Getenv("DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE") == "" {

Given that this is only for CI, and not a user-facing option, I'd be ok with "non-empty" means "enabled";

Suggested change
return os.Getenv("GITHUB_ACTIONS") != "true"
return os.Getenv("GITHUB_ACTIONS") == ""

Or is it expected for this var to have GITHUB_ACTIONS=false ? I see various project just checking for "empty", but there's some that have "false" conditions as well; https://grep.app/search?q=GITHUB_ACTIONS&case=true&filter[lang][0]=Shell

Copy link
Member Author

Choose a reason for hiding this comment

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

Non empty sgtm

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Cgroup2 mode seems misconfigured

@thaJeztah
Copy link
Member

Cgroup2 mode seems misconfigured

Good catch, thanks Akihiro!

@thaJeztah
Copy link
Member

LOL; looks like we need to hash the paths;

mkdir: cannot create directory ‘/tmp/reports/dockercliimagessuitedockercliimportsuitedockercliinfosuitedockercliinspectsuitedockerclilinkssuitedockercliloginsuitedockerclilogssuitedockerclinetmodesuitedockerclinetworksuitedockerclipluginlogdriversuitedockerclipluginssuitedockercliportsuitedockercliproxysuitedockercliprunesuitedockerclipssuitedockerclipullsuitedockerclipushsuite’: 
File name too long

@crazy-max crazy-max force-pushed the gha-test branch 6 times, most recently from 7c9071e to 1aa0970 Compare August 25, 2022 22:02
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max

This comment was marked as outdated.

@thaJeztah
Copy link
Member

@AkihiroSuda @tianon PTAL 🤗

@@ -69,6 +69,10 @@ func UnixCli() bool {
return isUnixCli
}

func GitHubActions() bool {
return os.Getenv("GITHUB_ACTIONS") == "true"
Copy link
Member

Choose a reason for hiding this comment

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

strconv.ParseBool

Copy link
Member

Choose a reason for hiding this comment

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

Ah, dang; I recall I commented on this to use "non-empty" (as I don't think we'll ever gonna use GITHUB_ACTIONS=false); #44034 (comment)

Looks like it was inadvertently marked as "resolved"; does that suggestion work for you, @AkihiroSuda ?

Copy link
Member

Choose a reason for hiding this comment

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

non-empty also sgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I missed this one. Done with non-empty.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
Copy link
Member Author

This one again 😞: https://github.com/moby/moby/runs/8246861287?check_suite_focus=true#step:6:225

#18 https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_11/Release.key
#18 ERROR: Get "https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_11/Release.key": net/http: TLS handshake timeout
------
 > https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_11/Release.key:
------
ERROR: failed to solve: failed to load cache key: Get "https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_11/Release.key": net/http: TLS handshake timeout
Error: buildx bake failed with: ERROR: failed to solve: failed to load cache key: Get "https://download.opensuse.org/repositories/devel:/tools:/criu/Debian_11/Release.key": net/http: TLS handshake timeout

@thaJeztah Could we merge #44086 first? This is really frustrating and seems to happen quite often.

@crazy-max
Copy link
Member Author

Thanks for the re-run @thaJeztah, good to merge?

@thaJeztah
Copy link
Member

Thanks! I think that should address @AkihiroSuda's comment; let me merge this to unblock the other work, but @AkihiroSuda if there's anything to fix up after this, let me know ❤️

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit dba0819 into moby:master Sep 8, 2022
@crazy-max crazy-max deleted the gha-test branch September 8, 2022 13:56
@neersighted neersighted added this to the v-next milestone Jan 10, 2023
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.

None yet

5 participants