forked from cockpit-project/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
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
workflows: Run unit tests in our tasks container #21
Closed
Conversation
This file contains 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
Owner
martinpitt
commented
Feb 13, 2024
•
edited
Loading
edited
- tasks: Install dbus-daemon and valgrind, move config and secret setup to separate script cockpit-project/cockpituous#572
martinpitt
force-pushed
the
unit-tasks
branch
from
February 13, 2024 11:37
93e1193
to
40dfc09
Compare
pkg/storaged/anaconda.jsx
Outdated
try { | ||
const passphrases = JSON.parse(window.sessionStorage.getItem("cockpit_passphrases")) || { }; | ||
passphrases[device_name(block)] = passphrase; | ||
window.sessionStorage.setItem("cockpit_passphrases", JSON.stringify(passphrases)); |
Check failure
Code scanning / CodeQL
Clear text storage of sensitive information High
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by as clear text.
This stores sensitive data returned by an access to passphrase as clear text.
This stores sensitive data returned by an access to passphrase as clear text.
a call to getItem
Error loading related location
Loading This stores sensitive data returned by
an access to passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to passphrases
Error loading related location
Loading This stores sensitive data returned by
an access to old_passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to old_passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to old_passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to passphrase
Error loading related location
Loading This stores sensitive data returned by
an access to passphrase
Error loading related location
Loading This stores sensitive data returned by an access to passphrase as clear text.
This stores sensitive data returned by an access to passphrase as clear text.
martinpitt
force-pushed
the
unit-tasks
branch
9 times, most recently
from
February 13, 2024 16:22
1cb3f92
to
300fab7
Compare
This spotted a wrong `pytest.fail()` invocation, whose second argument (`pytrace`) is a boolean. Make the message part of the reason.
And use the `/` operator instead of the `Path()` constructor for building subpaths.
This covers the two happy paths of creating a new file and updating an existing one.
Catch errors from `rename()` and translate them into an `access-denied` (e.g. the specified `path` is a directory) or `not-found` (directory is deleted underneath us) channel error instead of crashing the bridge. Likewise, intercept `FileNotFoundError` when trying to create a temp file in a nonexisiting directory. That previously returned `internal-error`, but it's really not. We don't have a really good exisiting problem code, but `access-denied` is closest.
martinpitt
force-pushed
the
unit-tasks
branch
4 times, most recently
from
February 13, 2024 17:27
274a919
to
c8b6ee7
Compare
We don't support the C bridge on this branch any more.
We won't add a lot of new C code any more, valgrinding Python code isn't very useful (or architecture specific), and more and more distributions drop i386 support. Also, we still run the unit tests during RPM package build through packit/COPR, which cover even more architectures. This paves the way for dropping the unit test container altogether in favor of running the tests in the cockpit/tasks container, once we agree on how to build a proper staging setup. Drop tools/valgrind.supp which was only relevant for i386.
martinpitt
force-pushed
the
unit-tasks
branch
from
February 13, 2024 17:44
c8b6ee7
to
c5d1690
Compare
martinpitt
force-pushed
the
unit-tasks
branch
4 times, most recently
from
February 13, 2024 20:15
7887269
to
c9d40d0
Compare
`tput` requires `$TERM`. The Debian-based unit test container sets this by default, but the Fedora based cockpit/tasks container doesn't. Set it explicitly to a known-good value to make sure the test passes there.
It hasn't helped us in years, modern gcc has good static analysis (plus of course CodeQL and Coverity), none of our supported downstream distros care, and we are not going to add significant amounts of C code any more.
This reduces our tools like `ruff` to a single source of truth (as all our other projects already run their unit tests and linting in the tasks container). It also removes a lot of moving parts only relevant for CI. In practice, us developers run the unit tests in toolbox or our own dev machines anyway. Move building the guide in the release workflow to the tasks container as well.
martinpitt
force-pushed
the
unit-tasks
branch
from
February 13, 2024 20:27
c9d40d0
to
65bef39
Compare
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.