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

system tests: avoid rmi -a ... plus cleanup #14600

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

edsantiago
Copy link
Member

I noticed 'rmi -a' in a test. I tried to fix it. Hilarity ensued.

'rmi -a' is evil: it forces a fresh pull of our test image,
which in turn almost guarantees a flake some day. We avoid
it, but once in a while it slips in.

While fixing it, I noticed a bevy of other problems that
needed cleanup.

Signed-off-by: Ed Santiago [email protected]

None

@edsantiago edsantiago added the kind/cleanup Categorizes issue or PR as related to cleanup. label Jun 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2022
Copy link
Member

@vrothberg vrothberg 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
Member Author

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

Explanation of some of the subtler cleanups.

test/system/250-systemd.bats Show resolved Hide resolved
@@ -295,6 +296,8 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
unit_file="contrib/systemd/system/${unit_name}"
if [[ -e ${unit_file}.in ]]; then
echo "# [Building & using $unit_name from source]" >&3
# Force regenerating unit file (existing one may have /usr/bin path)
rm -f $unit_file
Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, this was nasty. Basically, the unit file already existed, and had hardcoded /usr/bin/podman. Nuff said.

@edsantiago
Copy link
Member Author

@Luap99 looks like the new linter is breaking all PRs; are you aware of this?

libpod/events/journal_linux.go:172:80: directive `//nolint` should mention specific linter such as `//nolint:my-linter` (nolintlint)
func newEventFromJournalEntry(entry *sdjournal.JournalEntry) (*Event, error) { //nolint

@@ -82,32 +80,34 @@ function service_cleanup() {

# All good. Stop service, clean up.
# Also make sure the service is in the `inactive` state (see #11304).
service_cleanup inactive
Copy link
Member

Choose a reason for hiding this comment

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

looks like this is not actually doing what the comment is saying, #11304

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops - forgot to remove that comment. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

Well that just removes the regression test for this issue then (I understand that it did not actually worked before)? It looks like we should check for the unit status.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh all right. I've taken the time to understand the issue and figure out the magic systemd incantations. I was not, however, able to test using podman v3.3.0 because that version is way too old to run on my system (I finally gave up on a containers.conf incompatibility). New check is my best guess at addressing the original intention.

I noticed 'rmi -a' in a test. I tried to fix it. Hilarity ensued.

'rmi -a' is evil: it forces a fresh pull of our test image,
which in turn almost guarantees a flake some day. We avoid
it, but once in a while it slips in.

While fixing it, I noticed a bevy of other problems that
needed cleanup.

Signed-off-by: Ed Santiago <[email protected]>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 16, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 16, 2022
@openshift-ci openshift-ci bot merged commit e6fe06f into containers:main Jun 16, 2022
@edsantiago edsantiago deleted the argh branch June 16, 2022 16:06
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleanup. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants