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

Meta-issue: deploy the force_latest_compatible_version fix to the most common CI providers #298

Open
DilumAluthge opened this issue May 8, 2021 · 4 comments
Labels

Comments

@DilumAluthge
Copy link
Member

DilumAluthge commented May 8, 2021

As of Julia 1.7, the Pkg.test function now has the optional force_latest_compatible_version keyword argument, which provides the solution to #160.


However, in order to deploy the force_latest_compatible_version fix into production, we need to modify the various continuous integration (CI) platforms to support auto-detection of CompatHelper/Dependabot pull requests. Basically, we need to modify the CI configurations as follows:

If the CI job is a pull request job, and the pull request was made by CompatHelper or Dependabot, then use the following Pkg.test command:

Pkg.test(; force_latest_compatible_version = true)

If the CI job is not a pull request job, or if it is a pull request job but the pull request was not made by CompatHelper or Dependabot, then use the following Pkg.test command:

Pkg.test(; force_latest_compatible_version = false)

Note that the force_latest_compatible_version keyword argument requires at least Julia 1.7. Therefore, for Julia versions prior to Julia 1.7, you should not provide the force_latest_compatible_version keyword argument.


In julia-actions/julia-runtest#20, we implemented the auto-detection as follows. We look at the name of the branch from which the pull request was made, and:

  • If the branch name starts with either compathelper/ or dependabot/julia, we say that the current job is a CompatHelper/Dependabot job.
  • Otherwise, we say that the current job is not a CompatHelper/Dependabot job.

This table tracks our progress:

Row CI provider Notes Status Repository Pull Requests
1 GitHub Actions CI For users that are using the julia-actions/julia-runtest action julia-actions/julia-runtest julia-actions/julia-runtest#20
2 GitHub Actions CI For users that are NOT using the julia-actions/julia-runtest action
3 Travis CI For users that are using the default Travis CI setup for Julia travis-ci/travis-build
4 AppVeyor CI For users that are using JuliaCI/Appveyor.jl JuliaCI/Appveyor.jl
5 Buildkite CI For users that are using the JuliaGPU Buildkite JuliaCI/julia-test-buildkite-plugin
6 GitLab CI
7 Cirrus CI For users that are using ararslan/CirrusCI.jl ararslan/CirrusCI.jl
@DilumAluthge
Copy link
Member Author

DilumAluthge commented May 8, 2021

I'm not sure who to ping for each CI provider, so I apologize in advance if I ping the wrong people.

If I pinged you, but you are not a maintainer of the Julia plugin for the given CI provider, it would be great if you could ping the correct maintainers.

For row 2 (GitHub Actions CI for users that do not use the julia-actions/julia-runtest action): @SaschaMann, @davidanthoff, @christopher-dG

For row 3 (Travis CI): @ararslan, @staticfloat, @StefanKarpinski

For row 4 (AppVeyor CI): @simonbyrne

For row 5 (Buildkite CI): @maleadt, @staticfloat

For row 6 (GitLab CI), I'm not sure who to ping. I know that @mattBrzezinski and @fchorney are interested in GitLab; perhaps you can help me figure out who would be the best people to implement this feature for GitLab CI.

@SaschaMann
Copy link
Contributor

For row 2 (GitHub Actions CI for users that do not use the julia-actions/julia-runtest action): @SaschaMann, @ davidanthoff, @ christopher-dG

Somehow I completely missed this before. For people that don't use that action, there's nothing we can really do about it. It's up to the people who write the workflow that runs the tests to set the appropriate flag in that case.

@ararslan
Copy link
Member

If the CI job is a pull request job, and the pull request was made by CompatHelper or Dependabot

Why do we only want to do this for automated PRs? Say CompatHelper makes a PR and tests fail with the newest version but fixing the tests requires minimal, backwards-compatible changes. If someone makes those changes in a separate PR, they might not be testing with the newest version because the force_... argument isn't set.

@angusmoore
Copy link

I've had a crack at a very rough implementation of row 2 (ie GHA, but when not using the julia-runtest). I had a use case where I needed to run Pkg.test() but with custom arguments not supported by julia-runtest (eg, similar to julia-actions/julia-runtest#47), so I knocked together something quick to solve it.

It's a simple and hacky approach (I am not very familiar with GHA, so it may not be the best approach). It borrows heavily from julia-runtest.

The draft action is here: github.com/angusmoore/julia-detect-dependabot and can be used with: uses: angusmoore/julia-detect-dependabot@main; it's pretty rough, so I haven't registered in the marketplace.

The action has an output for if the branch is a compathelper/dependabot branch, which can be used by subsequent steps. The readme has an example.

I do not know if this is the best/right way to solve this problem, but it worked for my use case, so others might find it useful too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants