Skip to content

Conversation

@ericphanson
Copy link

I propose this change because currently if tests fail, the build does not upload. I think some of the point of using nightly/pr-builds is to test things manually, and potentially to debug failing tests and issues like that. Therefore, I don't think uploads should be gated on tests passing.

@DilumAluthge
Copy link
Member

We do want to gate it for releases. Can we make the behavior different for nightlies vs releases?

@ericphanson
Copy link
Author

ah I see. I am having trouble figuring out how to do that. I think we want the conditional (build.branch =~ /^release-/) || (build.tag =~ /^v/) or similar somewhere, but I can't figure out how to get a conditional dependency, or a conditional allowed-failure... 🤔

@ericphanson
Copy link
Author

I gave it a try, but I don't know if it will work -- in particular, I don't know if ENV interpolation works like this for allow_failures

@ericphanson ericphanson changed the title Upload after build without waiting for tests Allow test failures for build uploads when not on release branch or tags Jan 25, 2025
@staticfloat
Copy link
Member

If the concern is that you want to be able to download a build of Julia that is failing tests so you can inspect it, you can download it from the buildkite interface in the Artifacts tab. I don't think there's much use uploading these to S3, is there?

@IanButterworth
Copy link
Member

Sometimes there are PRs that don't yet have all the tests figured out, but would be good for people to try out. The --trim PR was one of those.

@giordano
Copy link
Member

I don't think there's much use uploading these to S3, is there?

My guess is that this would be useful for juliaup? I'm not sure where it downloads the tarball from, but if it's S3 that'd be a discriminant here

@ericphanson
Copy link
Author

Yeah, my gripe here is I wanted to use the Pkg apps feature before JuliaLang/julia#57187 was merged, but I couldn't use the juliaup PR feature for it since the macos CI had failed. It was confusing initially as well bc juliaup reports it can't be installed, but I saw the PR is there and didn't understand that uploads were gated on CI passing.

@staticfloat
Copy link
Member

Fair enough, the juliaup feature makes this much more useful.

@DilumAluthge
Copy link
Member

I don't think this is ready to merge yet? We need to make it so that release branches and tags DO gate on tests, but nightlies and PRs do NOT gate on tests.

It looks like this PR attempts to implement that, but something about the implementation is causing CI to fail.

@DilumAluthge
Copy link
Member

Also needs treehash re-signing.

@DilumAluthge
Copy link
Member

fatal: pipeline interpolation of "upload_linux.yml" failed: interpolating remaining fields: $ALLOW_TEST_FAILURES: not set

@ericphanson
Copy link
Author

looks like I missed a codepath for the allowed-to-fail upload jobs, should be covered now

@DilumAluthge
Copy link
Member

Before we re-sign the pipelines, could you add comments that explain the purpose of the logic (i.e. that we want to gate on the tests in release branches and tags, but we don't want to gate on the tests in master/nightlies/prs).

@ericphanson
Copy link
Author

added

@IanButterworth IanButterworth requested a review from Copilot July 31, 2025 19:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the CI/CD pipeline to allow test failures during build uploads for non-release branches and non-version tags, enabling nightly and PR builds to be uploaded to S3 even when tests fail.

  • Updates upload pipeline steps to conditionally allow test failures based on branch/tag type
  • Adds logic to set ALLOW_TEST_FAILURES environment variable based on whether the build is on a release branch or version tag
  • Modifies all platform upload configurations (Windows, macOS, Linux, FreeBSD) to respect the new test failure policy

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.

File Description
pipelines/main/launch_upload_jobs.yml Adds conditional logic to allow test failures for non-release builds
pipelines/main/platforms/upload_*.yml Updates dependency configuration to allow test step failures when permitted
*.signature files Updated cryptographic signatures for modified pipeline files

@IanButterworth
Copy link
Member

@ericphanson @DilumAluthge lets merge this, if you agree it's still in good shape?

Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two requests:

  1. Rename variable name to make it more clear that this is specifically just affecting whether or not we upload - it doesn't affect anything else.
  2. Ideally, I'd like to have a small GitHub Actions CI job that runs a Bash script to just test that our Bash syntax for pattern matching is correct, and that it gives the expected output when the branch is release-something or the tag is vSOMETHING.

Once those two are done, this is good to merge from my POV.

# allow test-failures for non-release/tags so that nightly & PR builds
# can be uploaded to s3 even if tests are not passing
# (allowing for usage with juliaup)
export ALLOW_TEST_FAILURES=$(([[ "${BUILDKITE_BRANCH?}" == release-* ]] || [[ "${BUILDKITE_TAG:-}" == v* ]]) && echo "false" || echo "true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't actually verified myself that this pattern matching is correct, so ideally someone would just do some quick tests in Bash locally before we merge.

Or alternatively, we can have a quick GitHub Actions CI job to check miscellaneous things such as this. E.g. just a quick Bash-based CI job that puts in various values of BUILDKITE_BRANCH and BUILDKITE_TAG, and tests that the output ALLOW_TEST_FAILURES is correct.

The latter is probably easier, because we can do it in CI instead of relying on people to manually test things locally.

# allow test-failures for non-release/tags so that nightly & PR builds
# can be uploaded to s3 even if tests are not passing
# (allowing for usage with juliaup)
export ALLOW_TEST_FAILURES=$(([[ "${BUILDKITE_BRANCH?}" == release-* ]] || [[ "${BUILDKITE_TAG:-}" == v* ]]) && echo "false" || echo "true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - would be nice to quickly test in CI (in a small GitHub Actions CI job).

# allow test-failures for non-release/tags so that nightly & PR builds
# can be uploaded to s3 even if tests are not passing
# (allowing for usage with juliaup)
export ALLOW_TEST_FAILURES=$(([[ "${BUILDKITE_BRANCH?}" == release-* ]] || [[ "${BUILDKITE_TAG:-}" == v* ]]) && echo "false" || echo "true")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can we rename this something else? In Buildkite, "allow fail" (or "soft fail") means something different - it means failures show up as a red warning sign (not a red X), and failures don't block Test from being green.

Here, we have a different meaning, so can we make the variable name more unambiguous?

Suggested change
export ALLOW_TEST_FAILURES=$(([[ "${BUILDKITE_BRANCH?}" == release-* ]] || [[ "${BUILDKITE_TAG:-}" == v* ]]) && echo "false" || echo "true")
export UPLOAD_EVEN_IF_TEST_FAILURES=$(([[ "${BUILDKITE_BRANCH?}" == release-* ]] || [[ "${BUILDKITE_TAG:-}" == v* ]]) && echo "false" || echo "true")

# Wait for the tester to finish
- "test_${TRIPLET?}"
- step: "test_${TRIPLET?}"
allow_failure: "${ALLOW_TEST_FAILURES?}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow_failure: "${ALLOW_TEST_FAILURES?}"
allow_failure: "${UPLOAD_EVEN_IF_TEST_FAILURES?}"

# Wait for the tester to finish
- "test_${TRIPLET?}"
- step: "test_${TRIPLET?}"
allow_failure: "${ALLOW_TEST_FAILURES?}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow_failure: "${ALLOW_TEST_FAILURES?}"
allow_failure: "${UPLOAD_EVEN_IF_TEST_FAILURES?}"

# Wait for the tester to finish
- "test_${TRIPLET?}"
- step: "test_${TRIPLET?}"
allow_failure: "${ALLOW_TEST_FAILURES?}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow_failure: "${ALLOW_TEST_FAILURES?}"
allow_failure: "${UPLOAD_EVEN_IF_TEST_FAILURES?}"

# Wait for the tester to finish
- "test_${TRIPLET?}"
- step: "test_${TRIPLET?}"
allow_failure: "${ALLOW_TEST_FAILURES?}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
allow_failure: "${ALLOW_TEST_FAILURES?}"
allow_failure: "${UPLOAD_EVEN_IF_TEST_FAILURES?}"

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.

5 participants