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

Fix test-runner bootstrap failing if apt lock is already held #6712

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

MarkusPettersson98
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 commented Aug 30, 2024

Copy link

linear bot commented Aug 30, 2024

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


test/scripts/ssh-setup.sh line 132 at r1 (raw file):

    # held, which happens sporadically. It is fine to wait for
    # some time if it means that the test run can continue.
    apt -o DPkg::Lock::Timeout=60 "$@"

We should probably also wait for the lock when installing the app (in test-runner).

Copy link
Contributor Author

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)


test/scripts/ssh-setup.sh line 132 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

We should probably also wait for the lock when installing the app (in test-runner).

That's probably a good idea. Working on it

dlon
dlon previously approved these changes Aug 30, 2024
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@MarkusPettersson98 MarkusPettersson98 force-pushed the wait-for-dpkg-lock-if-necessary-des-869 branch 2 times, most recently from 6ab25c6 to 5e98d9f Compare September 2, 2024 07:11
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)


test/test-runner/src/package.rs line 155 at r3 (raw file):

    if purge {
        action = "apt --purge";
        cmd.args(["--purge", name]);

I think this should be purge now, not --purge.

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MarkusPettersson98)


test/test-runner/src/package.rs line 152 at r3 (raw file):

async fn uninstall_apt(name: &str, env: HashMap<String, String>, purge: bool) -> Result<()> {
    let action;
    let mut cmd = Command::new("/usr/bin/apt");

Can DPkg::Lock::Timeout be set here too?

@MarkusPettersson98 MarkusPettersson98 force-pushed the wait-for-dpkg-lock-if-necessary-des-869 branch from 5e98d9f to 4544ef4 Compare September 2, 2024 07:44
Copy link
Contributor Author

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @dlon)


test/test-runner/src/package.rs line 152 at r3 (raw file):

Previously, dlon (David Lönnhager) wrote…

Can DPkg::Lock::Timeout be set here too?

Done


test/test-runner/src/package.rs line 155 at r3 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think this should be purge now, not --purge.

Done

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@MarkusPettersson98 MarkusPettersson98 merged commit f0e2c48 into main Sep 2, 2024
37 checks passed
@MarkusPettersson98 MarkusPettersson98 deleted the wait-for-dpkg-lock-if-necessary-des-869 branch September 2, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants