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

Environment is not fully reproducible #2178

Open
charleskawczynski opened this issue Feb 10, 2025 · 0 comments · May be fixed by #2179
Open

Environment is not fully reproducible #2178

charleskawczynski opened this issue Feb 10, 2025 · 0 comments · May be fixed by #2179
Labels
bug Something isn't working

Comments

@charleskawczynski
Copy link
Member

charleskawczynski commented Feb 10, 2025

We have an issue where our current buildkite environment is:

- echo "--- Instantiate buildkite env"
- "julia --project=.buildkite --check-bounds=yes -e 'using Pkg; Pkg.develop(path=\".\"); Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
- "julia --project=.buildkite -e 'using CUDA; CUDA.precompile_runtime()'"

The issue here is that Pkg.develop can (may?/will?) trigger the resolver (at least we just observed this after the depot was cleared), resulting in potentially different versions being run despite our manifest file being checked in.

Over the years, I've seen Pkg.develop added and removed from pipelines, likely due to this issue. One reason why Pkg.develop is typically added is because, without it, users may update the manifest locally, and forget to Pkg.develop themselves, effectively pinning CI to that version.

I think a better pattern to use moving forwards is to:

  • Remove the use of Pkg.develop on buildkite, to guarantee reproducibility
  • Document how users should setup their local environment
  • Add a test (whether that's via julia code or in the buildkite pipeline), that tests that the repo package (ClimaCore in this case), is developed in that environment. In Julia terms, that is testing that TOML.parse(join(readlines(".buildkite/Manifest.toml")[7:end], "\n"))["deps"]["ClimaCore"][1]["path"] == ".." (this check unfortunately may be julia version-dependent).

We should probably spread this pattern, as this can easily bite users on all of our repos.

Also, just to note, we should always print Pkg.status(), so that we can trace what's going on.

@charleskawczynski charleskawczynski added the bug Something isn't working label Feb 10, 2025
@charleskawczynski charleskawczynski linked a pull request Feb 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant