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

pre-commit/check-merge-conflicts-2: fix use outside dev shell #12373

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

roberth
Copy link
Member

@roberth roberth commented Jan 28, 2025

Note that this is just a script that is meant to run outside a derivation (but also can be called by a derivation builder). touch $out does not belong in it.

touch $out worked accidentally in the derivation-based check, and also in the dev shell, but if pre-commit is invoked without the dev shell it would fail.

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@roberth roberth requested a review from edolstra as a code owner January 28, 2025 08:30
@roberth roberth added backport 2.24-maintenance Automatically creates a PR against the branch backport 2.25-maintenance Automatically creates a PR against the branch backport 2.26-maintenance Automatically creates a PR against the branch labels Jan 28, 2025
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Jan 29, 2025
@Mic92
Copy link
Member

Mic92 commented Feb 2, 2025

@mergify queue

Copy link
Contributor

mergify bot commented Feb 2, 2025

queue

🛑 The pull request has been removed from the queue default

The merge conditions cannot be satisfied due to failing checks.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

mergify bot added a commit that referenced this pull request Feb 2, 2025
mergify bot added a commit that referenced this pull request Feb 2, 2025
Copy link
Contributor

mergify bot commented Feb 2, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@Mic92
Copy link
Member

Mic92 commented Feb 2, 2025

@mergify rebase

Copy link
Contributor

mergify bot commented Feb 2, 2025

rebase

❌ Base branch update has failed

Git reported the following error:

Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Auto-merging tests/functional/help.sh
CONFLICT (content): Merge conflict in tests/functional/help.sh
error: could not apply 682f009f9... test: Use skipTest instead of exit 0
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 682f009f9... test: Use skipTest instead of exit 0

@Mic92
Copy link
Member

Mic92 commented Feb 2, 2025

@mergify queue

Copy link
Contributor

mergify bot commented Feb 2, 2025

queue

🛑 The pull request has been removed from the queue default

The merge conditions cannot be satisfied due to failing checks.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@edolstra
Copy link
Member

edolstra commented Feb 6, 2025

This should probably be rebased to resolve the test failures.

Note that this is just a script that is meant to run outside a
derivation (but also can be called by a derivation builder).
`touch $out` does not belong in it.

`touch $out` worked accidentally in the derivation-based check,
and also in the dev shell, but if pre-commit is invoked without
the dev shell it would fail.
This seems to be the way to do it now, even though I can't run them
without setting at least one env var.
I'll only fix shellcheck for now. Don't shoot the messenger.

It isn't quite clear to me why the previous commit masked this problem,
but I'm glad shellcheck has an effect or more effect now.
Copy link
Contributor

mergify bot commented Feb 7, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

This way shellcheck is ok with it, and it conveys that a significant
chunk of the test is skipped.
@roberth
Copy link
Member Author

roberth commented Feb 7, 2025

@mergify queue

Copy link
Contributor

mergify bot commented Feb 7, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at aa383a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.24-maintenance Automatically creates a PR against the branch backport 2.25-maintenance Automatically creates a PR against the branch backport 2.26-maintenance Automatically creates a PR against the branch with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants