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.ci] pre-commit autoupdate #5393

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Oct 14, 2024

@EZoni
Copy link
Member

EZoni commented Oct 14, 2024

I still see two separate CI pipelines, so the fix in #5308

  pr:
    autoCancel: true
    drafts: false
+   branches:
+     include:
+    - development

probably didn't work for Azure pipelines.

It did work for the GitHub Actions workflows though, I see 63 checks in previous pre-commit PRs and roughly half of those in this PR.

@EZoni EZoni added the component: tests Tests and CI label Oct 14, 2024
@EZoni
Copy link
Member

EZoni commented Oct 14, 2024

I see a note in the Azure docs (https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops#branch-filters):

If your branch filters aren't working, try using the prefix refs/heads/.
For example, use refs/heads/releases/old* instead of releases/old*.

Maybe we can try it in this PR and git commit --amend to re-trigger CI and test.

@EZoni
Copy link
Member

EZoni commented Oct 15, 2024

Merge #5394 first, then rebase.

EZoni added a commit that referenced this pull request Oct 15, 2024
The fix introduced in #5308 was not correct for Azure pipelines.

In GitHub Actions we trigger a run on the `push` event only for the
`development` branch.

The Azure equivalent of that is triggering a run on the `trigger` event
only for the `development` branch. However, since the `trigger` event
was completely absent from the Azure pipeline file (that is, the default
setup was being used), I had erroneously added the filter branch to the
`pr` event instead, unlike what I did for GitHub actions where the
`push` was exposed in the YAML files.

This was originally aimed at avoiding duplicate runs for "individual CI"
when `pre-commit` opens a pull request by pushing to a secondary branch
`pre-commit-ci-update-config` in the main repo (instead of a fork).

The new setup is tested in #5393, where I copied these changes and where
one can see that a commit pushed to that PR does not trigger an
"individual CI" Azure pipeline anymore, but only a "PR automated" one.

Hopefully this is correct for the merge commits that get pushed to
`development` once a PR is closed, but we'll be able to test this only
after merging a PR.
updates:
- [github.com/mgedmin/check-manifest: 0.49 → 0.50](mgedmin/check-manifest@0.49...0.50)
@EZoni EZoni force-pushed the pre-commit-ci-update-config branch from 1f57fe0 to bcc741e Compare October 15, 2024 15:56
@EZoni EZoni enabled auto-merge (squash) October 15, 2024 16:00
@EZoni EZoni merged commit 09f9e8b into development Oct 15, 2024
37 checks passed
dpgrote pushed a commit to dpgrote/WarpX that referenced this pull request Oct 23, 2024
…pX#5394)

The fix introduced in ECP-WarpX#5308 was not correct for Azure pipelines.

In GitHub Actions we trigger a run on the `push` event only for the
`development` branch.

The Azure equivalent of that is triggering a run on the `trigger` event
only for the `development` branch. However, since the `trigger` event
was completely absent from the Azure pipeline file (that is, the default
setup was being used), I had erroneously added the filter branch to the
`pr` event instead, unlike what I did for GitHub actions where the
`push` was exposed in the YAML files.

This was originally aimed at avoiding duplicate runs for "individual CI"
when `pre-commit` opens a pull request by pushing to a secondary branch
`pre-commit-ci-update-config` in the main repo (instead of a fork).

The new setup is tested in ECP-WarpX#5393, where I copied these changes and where
one can see that a commit pushed to that PR does not trigger an
"individual CI" Azure pipeline anymore, but only a "PR automated" one.

Hopefully this is correct for the merge commits that get pushed to
`development` once a PR is closed, but we'll be able to test this only
after merging a PR.
dpgrote pushed a commit to dpgrote/WarpX that referenced this pull request Oct 23, 2024
<!--pre-commit.ci start-->
updates:
- [github.com/mgedmin/check-manifest: 0.49 →
0.50](mgedmin/check-manifest@0.49...0.50)
<!--pre-commit.ci end-->

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tests Tests and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant