Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[WIP][19.03 backport] Testing and Jenkinsfile changes [step 3] #384

Closed

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Sep 27, 2019

based on top of #383 #268 - first four commits are from that PR

conflicts are described below;

# https://github.com/moby/moby/pull/39829 testutil: make testing packages public
# to prevent lots of (minor) conflicts, and to easy cherry-picks in future
git cherry-pick -s -S -x b37c214e3c8c4ff5450bd5fc1225d53827d240e7

	deleted by us:   integration/build/build_cgroupns_linux_test.go    -> resolved by deleting
	deleted by us:   integration/container/run_cgroupns_linux_test.go  -> resolved by deleting
	both modified:   testutil/daemon/daemon.go                         -> because https://github.com/moby/moby/pull/38377 (Start containers in their own cgroup namespaces) is missing
	both modified:   testutil/daemon/service.go                        -> because https://github.com/moby/moby/pull/38441 (Allow specifying environment variables when installing an engine plugin as a Swarm service) is missing


# https://github.com/moby/moby/pull/39942 testutil/daemon: group options under type
git cherry-pick -s -S -x 41adef29f57b0050c4e9c6c9606fae2b7ddf129b

	both modified:   testutil/daemon/ops.go                            -> because https://github.com/moby/moby/pull/38377 (Start containers in their own cgroup namespaces) is missing (`WithDefaultCgroupNamespaceMode` is not in the file)

# https://github.com/moby/moby/pull/39904 DaemonCli: Move check into startMetricsServer
git cherry-pick -s -S -x 88c554f950d4667595cc2174bfab67d2cc072e62

# https://github.com/moby/moby/pull/39889 Fix more signal handling issues in tests
git cherry-pick -s -S -x fcd65ebf49a858c4f6223d1b1db728f7400a3b6d

@thaJeztah thaJeztah added this to the 19.03.3 milestone Sep 27, 2019
@thaJeztah thaJeztah force-pushed the 19.03_backport_test_fixes_3 branch 6 times, most recently from 9acc8c9 to daf2624 Compare September 30, 2019 12:09
@thaJeztah thaJeztah modified the milestones: 19.03.3, 19.03.4, 19.03.5 Oct 8, 2019
@andrewhsu andrewhsu removed the request for review from tonistiigi November 12, 2019 19:13
@andrewhsu andrewhsu modified the milestones: 19.03.5, 19.03.6 Nov 12, 2019
Copy link

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@tianon tianon left a comment

Choose a reason for hiding this comment

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

Changes all appear minor and/or reasonable, LGTM 👍

olljanat and others added 9 commits January 25, 2020 14:05
Refactored exiting logic on way that layers are first marked to be under
removal so if actual removal fails they can be found from disk and
cleaned up.

Full garbage collector will be implemented as part of containerd
migration.

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 213681b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1. Reduce complexity due to nested if blocks by using early
return/continue
2. Improve logging

Changes suggested as a part of code review comments in 39748

Signed-off-by: Vikram bir Singh <vikrambir.singh@docker.com>
(cherry picked from commit ebf12db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit d6cbeee)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
(cherry picked from commit 8660330)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
While working on other tests I noticed that environment.Execution cannot
be used for anything but the pre-configured daemon, however this can
come in handy for being able share daemons across multiple tests that
currently spin up a new daemon.
The execution env also seems to be misused in some of these cases.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 1381956)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was done with something along the lines of:

```
mv internal/test testutil
pushd testutil/; grep -IRl "package test" | xargs -I '{}' sed -i -e 's|package test|package testutil|g' {}; popd
mv internal/testutil/*.go testutil/ && rm -rf internal/
grep -IRl "github.com\/docker\/docker\/internal\/test" | xargs -I '{}' sed -i -e 's|github.com/docker/docker/internal/test|github.com/docker/docker/test|g' {}
goimports .
```

I also modified the basic plugin path in testutil/fixtures/plugin.

Signed-off-by: Sam Whited <sam@samwhited.com>
(cherry picked from commit b37c214)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sam Whited <sam@samwhited.com>
(cherry picked from commit 41adef2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fix TODO: move into startMetricsServer()
Fix errors.Wrap return nil when passed err is nil

Co-Authored-By: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
(cherry picked from commit 88c554f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Found these by doing a `grep -R 'using the force'` on a full test run.
There's still a few more which are running against the main test daemon,
so it is difficult to find which test they belong to.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit fcd65eb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

moved to moby#40413

@thaJeztah thaJeztah closed this Jan 25, 2020
@thaJeztah thaJeztah deleted the 19.03_backport_test_fixes_3 branch March 5, 2022 08:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants