Repository navigation
[Tigron]: revised Data interface - #4081
Merged
Merged
Conversation
apostasie
force-pushed
the
tigron-5-data
branch
3 times, most recently
from
April 4, 2025 20:39
57578e8 to
efbdc30
Compare
19 of 33 tasks
apostasie
force-pushed
the
tigron-5-data
branch
from
April 15, 2025 00:42
efbdc30 to
fc0eac2
Compare
apostasie
force-pushed
the
tigron-5-data
branch
6 times, most recently
from
April 15, 2025 22:07
f736de3 to
a6e5346
Compare
- fix timeout showing 0s instead of default when no explicit timeout is provided - add actual execution time - fix long logs (stdout, stderr) that were showing only the beginning to also show the end - fix formatting issue for "..." - marginally better output for command contextual information Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
apostasie
force-pushed
the
tigron-5-data
branch
8 times, most recently
from
April 16, 2025 21:29
e32781f to
7823694
Compare
apostasie
commented
Apr 16, 2025
| ), | ||
| Cleanup: func(data test.Data, helpers test.Helpers) { | ||
| if nerdtest.IsDocker() { | ||
| helpers.Anyhow("buildx", "stop", data.Identifier("-container")) |
Contributor
Author
There was a problem hiding this comment.
Leading dashes are unnecessary. Identifier does separate seed string with dash.
apostasie
commented
Apr 16, 2025
| Require: nerdtest.Build, | ||
| Cleanup: func(data test.Data, helpers test.Helpers) { | ||
| helpers.Anyhow("rmi", "-f", data.Identifier()) | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
These (and similar) were doing nothing, as there is no such image.
apostasie
marked this pull request as ready for review
April 16, 2025 22:00
Contributor
Author
|
Failure is #4068 |
apostasie
marked this pull request as draft
April 17, 2025 17:49
Contributor
Author
|
|
Many tests require temporary resources (Dockerfiles, compose.yml, etc), and routinely redo the same thing over and over (create separate temp dir, write file, remove temp dir). At best this adds a lot of inconsistent boilerplate / helper functions to the test - at worst, the resources are not properly cleaned-up, or not well isolated from other tests. This PR does introduce a set of helpers to fasttrack temp files manipulation, and rejiggle the Data interface to more clearly separate labels (shared with subtests) and temporary resources. Signed-off-by: apostasie <spam_blackhole@farcloser.world>
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
apostasie
force-pushed
the
tigron-5-data
branch
from
April 17, 2025 21:16
7823694 to
0d492a2
Compare
apostasie
marked this pull request as ready for review
April 17, 2025 21:17
AkihiroSuda
reviewed
Apr 18, 2025
| data.Labels().Set("net1", data.Identifier("1")) | ||
| data.Labels().Set("net2", data.Identifier("2")) | ||
| data.Labels().Set("netID1", helpers.Capture("network", "create", "--label="+data.Labels().Get("label"), data.Labels().Get("net1"))) | ||
| data.Labels().Set("netID2", helpers.Capture("network", "create", data.Labels().Get("net2"))) |
Member
There was a problem hiding this comment.
nit: Labels() could be just called once
Contributor
Author
There was a problem hiding this comment.
Wondering if the compiler manages to inline that?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocked by #4111
From testing experience on nerdctl, many tests do require temporary resources (Dockerfiles, compose.yml, etc), and routinely redo the same thing over and over (create separate temp dir, write file, remove temp dir).
At best this adds a lot of boilerplate / helpers functions - at worst, the resources are not properly cleaned-up, or not well isolated from other tests.
The first commit changes the Data interface to allow temp files manipulation (Load, Save, Path, Dir, Exists), and more clearly separates
labelsand temporary resources.The changes in tigron are minimal, but since the interface does change, the second commit does modify all current nerdctl tests that are making use of data labels.
Alongside this, some tests and helpers will now leverage the new temp file manipulation, along with some other minor cleanup in helpers and builder tests.
The PR looks big because of that ^.
Finally note that: