Skip to content

GH-39996: [Archery] Fix Crossbow build on a PR from a fork's main branch#39997

Merged
pitrou merged 1 commit intoapache:mainfrom
pitrou:gh39996-crossbow-main-branch
Feb 8, 2024
Merged

GH-39996: [Archery] Fix Crossbow build on a PR from a fork's main branch#39997
pitrou merged 1 commit intoapache:mainfrom
pitrou:gh39996-crossbow-main-branch

Conversation

@pitrou
Copy link
Copy Markdown
Member

@pitrou pitrou commented Feb 8, 2024

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 8, 2024

⚠️ GitHub issue #39996 has been automatically assigned in GitHub to PR creator.

@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

I've checked that _clone_arrow_and_crossbow works locally but I'm not sure how to exercise this PR for real. @kou Any thoughts?

@github-actions github-actions bot added the awaiting review Awaiting review label Feb 8, 2024
@kou
Copy link
Copy Markdown
Member

kou commented Feb 8, 2024

How about adding the following to this PR only for testing?

diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 4892767324..c8d3bdd1ec 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -113,3 +113,25 @@ jobs:
       - name: Run Merge Script Test
         shell: bash
         run: pytest -v dev/test_merge_arrow_pr.py
+
+  crossbow:
+    name: Crossbow
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout Arrow
+        uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
+        with:
+          path: arrow
+          # fetch the tags for version number generation
+          fetch-depth: 0
+      - name: Set up Python
+        uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
+        with:
+          python-version: 3.8
+      - name: Install Archery and Crossbow dependencies
+        run: pip install -e arrow/dev/archery[bot]
+      - name: Handle GitHub comment event
+        env:
+          ARROW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          archery crossbow submit ...

Or I think that we can merge this to main and try because you've already checked this on your local.

@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

Ah, thanks, I will add your suggestion.

@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

Your suggestion didn't work. We would need to call archery trigger-bot, but that in turn requires an actual Github event...

@kou
Copy link
Copy Markdown
Member

kou commented Feb 8, 2024

Ah, the changed code is for trigger-bot. Sorry.

How about merging this?

@pitrou pitrou force-pushed the gh39996-crossbow-main-branch branch from 6d0b2d6 to eb21b9f Compare February 8, 2024 13:57
@pitrou pitrou marked this pull request as ready for review February 8, 2024 13:57
@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

How about merging this?

Fair enough, let's do it.

@pitrou pitrou merged commit 30f6fdb into apache:main Feb 8, 2024
@pitrou pitrou removed the awaiting review Awaiting review label Feb 8, 2024
@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

@github-actions crossbow submit conda-clean

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 8, 2024

Revision: eb21b9f

Submitted crossbow builds: ursacomputing/crossbow @ actions-cbba493874

Task Status
conda-clean Azure

@pitrou
Copy link
Copy Markdown
Member Author

pitrou commented Feb 8, 2024

Ok, so this didn't work on the original PR:

Cloning into bare repository '/tmp/tmp10_wjydg/arrow_bare'...
From https://github.com/apache/arrow
 ! [rejected]            refs/pull/39878/head -> main  (non-fast-forward)
ERROR:archery:Command '['git', '-C', '/tmp/tmp10_wjydg/arrow_bare', 'fetch', 'origin', 'pull/39878/head:main']' returned non-zero exit status 1.

@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 30f6fdb.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 21 possible false positives for unstable benchmarks that are known to sometimes produce them.

pitrou added a commit to pitrou/arrow that referenced this pull request Feb 12, 2024
…in branch

Instead of doing an intermediate bare clone, just fix the locally created branch name when fetching.

Amended from PR apache#39997, which wasn't sufficient (the `git fetch` that works for me doesn't seem to work on GHA).
pitrou added a commit that referenced this pull request Feb 12, 2024
…nch (#40002)

Instead of doing an intermediate bare clone, just fix the locally created branch name when fetching.

Amended from PR #39997, which wasn't sufficient (the `git fetch` that works for me doesn't seem to work on GHA).

* Closes: #39996

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…in branch (apache#39997)

### Rationale for this change

### What changes are included in this PR?

### Are these changes tested?

### Are there any user-facing changes?

* Closes: apache#39996

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…in branch (apache#40002)

Instead of doing an intermediate bare clone, just fix the locally created branch name when fetching.

Amended from PR apache#39997, which wasn't sufficient (the `git fetch` that works for me doesn't seem to work on GHA).

* Closes: apache#39996

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
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.

[Archery] Crossbow refuses to run on the main branch of a fork

2 participants