artifact: fix failing tests for sandbox inspection#27477
Open
Conversation
fb76e03 to
58ec498
Compare
58ec498 to
3928ede
Compare
3928ede to
270b6c5
Compare
In #27398 we changed the way we used `os.Root` to protect the client when merging artifact directories to fix failing tests on Windows where this approach would always fail with "invalid argument". But this has now started failing on unit tests in CI, but only on Linux (where we'll usually have Landlock anyways), specifically on AMD64. While we try to investigate, let's revert #27398 but only on non-Windows. Ref: #27398
270b6c5 to
7eb6517
Compare
Merged
7 tasks
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.
In #27398 we changed the way we used
os.Rootto protect the client when merging artifact directories to fix failing tests on Windows where this approach would always fail with "invalid argument". But this has now started failing on unit tests in CI, but only on Linux (where we'll usually have Landlock anyways), specifically on AMD64. While we try to investigate, let's revert #27398 but only on non-Windows.Because we'll want to make sure we're running the tests on Windows, this changeset also splits out some tests that can't run on Windows because they use OS-specific structs. We'll also tweak a few test assertions to make sure the tests can tolerate being run on either Unix or Windows.
Ref: #27398
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.