Skip to content

[CI][Crossbow] Use apache/arrow instead of separated repository (e.g. ursacomputing/crossbow) #46014

Open
5 of 6 issues completed

Description

@kou

Describe the enhancement requested

We didn't have enough GitHub Actions capacity when we develop Crossbow. So using separated repository (and separated CI services such as Azure Pipelines and Travis CI) was reasonable.

But we have enough GitHub Actions capacity recently. Can we reconsider the Crossbow approach?

We may be able to use on.workflow_dispatch and gh wokrflow run --ref as an alternative of the current Crossbow approach.

Some inconvenient points for the current Crossbow approach:

  • CI results use a GitHub comment (example) instead of GitHub status checks.
    • It may cause a long history.
  • No direct link to artifacts.
    • Crossbow creates a new tag for each job and uses GitHub Release associated with the tag for artifacts. There is no direct link for the associated GitHub Release.
  • We can't use Dependabot for dev/tasks/*/*.yml
  • Difficult to automate job submission.
    • For example, we want to submit binary artifacts build jobs after source archive build is completed automatically in release process.
    • FYI: We already have secrets.GITHUB_CROSSBOW_TOKEN in apache/arrow GitHub Actions. So we will be able to implement it with the current Crossbow approach.
  • ...

Component(s)

Continuous Integration, Developer Tools

Activity

  1. amoeba commented on Apr 4, 2025

    @amoeba
    Member

    In case it helps, Datafusion just implemented something like this, see https://github.com/apache/datafusion/blob/main/.github/workflows/pr_comment_commands.yml for how they did it.

  2. kou commented on Apr 5, 2025

    @kou
    MemberAuthor

    Wow! I didn't know it!

  3. kszucs commented on Apr 8, 2025

    @kszucs
    Member

    I have been thinking of the same recently, we could take advantage of additional GHA features though I have some questions:

    • What if the apache/arrow GHA capacity decreases? I'm not sure what is our current concurrency limit.
    • Are there crossbow jobs running on other CI systems which couldn't be ported?
    • What if we need to support non-github hosted architectures? We would solve it using self-hosted runners?

    In an ideal setup we could easily create a release by:

    1. pressing a button, triggering jobs, uploading artifacts using https://github.com/actions/upload-artifact?
    2. notifying the release manager or dev@ that the artifacts are available
    3. release manager downloads, signs and uploads the artifacts under the release tag?
    4. trigger the post-release tasks (wherever additional credentials are not required or machine tokens could be used)
  4. kou commented on Apr 9, 2025

    @kou
    MemberAuthor

    What if the apache/arrow GHA capacity decreases? I'm not sure what is our current concurrency limit.

    https://infra.apache.org/github-actions-policy.html has the following:

    • The average number of minutes a project uses per calendar week MUST NOT exceed the equivalent of 25 full-time runners (250,000 minutes, or 4,200 hours).
    • The average number of minutes a project uses in any consecutive five-day period MUST NOT exceed the equivalent of 30 full-time runners (216,000 minutes, or 3,600 hours).

    2025-04-01/2025-04-08 statistics: https://github.com/apache/arrow/actions/metrics/usage?dateRangeType=DATE_RANGE_TYPE_CUSTOM&range=1743465600000-1744070400000

    Total minutes: 77,900

    Are there crossbow jobs running on other CI systems which couldn't be ported?

    Currently, we only use GitHub Actions and Azure Pipelines. So we'll be able to port all jobs to GitHub Actions.

    What if we need to support non-github hosted architectures? We would solve it using self-hosted runners?

    We'll try self-hosted runners or we mark these architectures as tier 2 or tier 3 platforms. See also: #46002

    In an ideal setup we could easily create a release by:

    1. pressing a button, triggering jobs, uploading artifacts using https://github.com/actions/upload-artifact?
    2. notifying the release manager or dev@ that the artifacts are available
    3. release manager downloads, signs and uploads the artifacts under the release tag?
    4. trigger the post-release tasks (wherever additional credentials are not required or machine tokens could be used)

    I hope that git tag && git push can trigger all of them (build source archive, sign it, upload it, build binary artifacts from it, sign them, upload them, verify them, start a vote, ...) with Automated Release Signing. :-)

  5. assignUser commented on May 12, 2025

    @assignUser
    Member

    Yes, I have discussed this last year with @raulcd too and while it will be a bunch of work to port everything over the benefits outweigh that effort.

    There is an infra page that shows the metrics in a format matching the policy.

    We could potentially even port the benchmark jobs but that comes with additional considerations in regards to noisiness of the results.

    I hope that git tag && git push can trigger all of them (build source archive, sign it, upload it, build binary artifacts from it, sign them, upload them, verify them, start a vote, ...) with Automated Release Signing. :-)

    I don't mind triggering it via the actions tab but either way automatic signing will be great!

  6. assignUser commented on May 12, 2025

    @assignUser
    Member

    In case it helps, Datafusion just implemented something like this, see https://github.com/apache/datafusion/blob/main/.github/workflows/pr_comment_commands.yml for how they did it.

    As a caveat: runs triggered with 'workflow_dispatch' have full permissions and secret access by default, so the jobs have to be carefully checked for minimal permissions, no secret use and they can never be run using the pr version of the workflow.

    I think I'd prefer that we don't trigger these via comment but rather have the reviewer trigger them via a manual workflow dispatch in the actions tab.

  7. assignUser commented on May 12, 2025

    @assignUser
    Member

    Hm, I think we could solve this within pull_request as a trigger by gating 'extended' jobs on the commit title. So you could just push an empty commit with [run extended] or something to kick them off. That way all the potential security issues go away.

  8. kou commented on May 20, 2025

    @kou
    MemberAuthor

    How about using CI: Extra label to run extra CI jobs?
    #46501 is an implementation.

  9. assignUser commented on May 21, 2025

    @assignUser
    Member

    Yes, that seems a bit nicer and still doesn't require a new privileged job! Great!

  10. kou commented on May 22, 2025

    @kou
    MemberAuthor

    Let's start this with the label approach.

  11. added a commit that references this issue on May 30, 2025
  12. 14 remaining items

  13. kou commented on Sep 16, 2025

    @kou
    MemberAuthor

    How about strategy.fail-fast: ${{ github.event_name == 'pull_request' }}?
    We don't use fail-fast only on pull request. Developers can see all results on their fork repository.

    Or perhaps we can use a separate apache/arrow-ci-extra repo for Crossbow branches?

    I don't like this approach. It doesn't solve the problems in the description.

  14. pitrou commented on Sep 16, 2025

    @pitrou
    Member

    Or perhaps we can use a separate apache/arrow-ci-extra repo for Crossbow branches?

    I don't like this approach. It doesn't solve the problems in the description.

    Ok, perhaps it's possible to have GH workflows that are triggered by a specific @github-actions comment? So that we can still select jobs with a fine granularity?

  15. raulcd commented on Sep 16, 2025

    @raulcd
    Member

    We could trigger workflows via comment, those won't report on the comment section but as action checks getting rid of the majority of the clutter problem on PRs.
    Using a mix of listen comments actions and gh workflow with some parameters. I am thinking on triggering something like this:
    gh workflow run cpp-extra.yml -f job_pattern=meson-*
    And with some pattern matching checks on the workflows we could skip certain jobs.

  16. raulcd commented on Sep 16, 2025

    @raulcd
    Member

    I did a small test and gh workflow run even when using the valid ref/branch doesn't report on the checks section of the PR which makes the approach quite useless. Other things I found, it would require permissions actions: write on the bot comment action to trigger the workflow and we would require workflow_dispatch on the workflows to be able to be triggered by the bot. The action I was testing looked like this:
    72b0346...raulcd:arrow:test-comment-bot
    An example of the workflow triggered:
    https://github.com/raulcd/arrow/actions/runs/17770172354
    And the PR without any reference to that workflow:
    raulcd#96

  17. kou commented on Sep 17, 2025

    @kou
    MemberAuthor

    How about strategy.fail-fast: ${{ github.event_name == 'pull_request' }}? We don't use fail-fast only on pull request. Developers can see all results on their fork repository.

    Hmm. I think that this is enough for us...

    In general, the git push -> post a @github-actions ... comment to run jobs -> check results -> git push -> post a @github-actions ... comment to run jobs -> check results workflow is inconvenient than the git push -> check results -> git push -> check results workflow for me. It has one more step (post a comment) and increases needless comment history. So I don't want to use the workflow as much as possible.

    If we really want to filter jobs, how about adding more CI: Extra: ... labels?

  18. pitrou commented on Feb 3, 2026

    @pitrou
    Member

    Some further suggestions for extra additions:

    • moving a i386 job and/or the Valgrind job to C++ extra?
    • adding a Doc extra with the preview-docs job, and post a comment with the preview URL?
  19. kou commented on Feb 4, 2026

    @kou
    MemberAuthor

    +1 but we can't use pull_request_target for "post a comment with the preview URL"... See also: apache/arrow-dotnet#255

  20. pitrou commented on Feb 4, 2026

    @pitrou
    Member

    Does that mean it's not possible to post a comment at all?

  21. reopened this on Feb 4, 2026
  22. pitrou commented on Feb 4, 2026

    @pitrou
    Member

    (sorry for closing, I hit the wrong button)

  23. kou commented on Feb 5, 2026

    @kou
    MemberAuthor

    We can use on.schedule instead of on.pull_request_target for it but the on.schedule approach uses polling style instead of on demand style.

  24. pitrou commented on Feb 5, 2026

    @pitrou
    Member

    Gosh. Can we perhaps discuss with the ASF if the pull_request_target ban can be made more selective?

  25. kou commented on Feb 6, 2026

    @kou
    MemberAuthor

    It's a good idea. I think that pull_request_target without actions/checkout should be acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions