Skip to content

Conversation

@pre-commit-ci
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 EZoni self-requested a review October 14, 2024 23:29
@EZoni EZoni self-assigned this Oct 14, 2024
@EZoni EZoni force-pushed the pre-commit-ci-update-config branch from 8b9ae49 to 1f57fe0 Compare October 15, 2024 00:22
@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
35 checks passed
dpgrote pushed a commit to dpgrote/WarpX that referenced this pull request Oct 23, 2024
…arpX#5394)

The fix introduced in BLAST-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 BLAST-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.

2 participants