ci: fix version workflow#424
Conversation
version workflow is failing with the following error:
> ruby-sdk@3.8.1 postversion
> ./postversion.sh
+ jq -r .version ./package.json
+ VERSION=3.8.1
+ cargo set-version -p eppo_client 3.8.1
Error: `cargo metadata` exited with an error: Updating crates.io index
error: failed to select a version for the requirement `eppo_core = "=10.0.1"`
candidate versions found which didn't match: 10.0.0, 9.3.0, 9.2.0, ...
This is likely caused by cargo not finding the eppo_core inside ruby
workspace.
Set the eppo_core override in ~/.cargo/config.toml.
Additional fixes:
- pin cargo-edit to a specific version
- replace sed's -i option with manual handling of tmp file to make it
portable across linux and macos
|
There was a problem hiding this comment.
Pull request overview
Fixes the automated “Prepare release” versioning workflow by making Rust workspace/version updates reliable in CI and improving script portability across macOS/Linux.
Changes:
- Pin
cargo-editto a specific version in the version workflow. - Add a CI-time Cargo override so
cargo-editcan resolve the localeppo_corecrate from nested workspaces. - Make
sedusage portable by replacing-iwith a temp-file +mvpattern in SDKpostversion.shscripts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ruby-sdk/postversion.sh |
Switches to temp-file rewrite for portable version.rb updates. |
elixir-sdk/postversion.sh |
Switches to temp-file rewrite for portable mix.exs version updates. |
.github/workflows/version.yml |
Pins cargo-edit and writes a Cargo config patch so workspace crate resolution succeeds in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| mkdir -p ~/.cargo/ | ||
| echo "[patch.crates-io.eppo_core]" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml" | ||
| echo "path = '$PWD/eppo_core'" >> "${CARGO_HOME:-$HOME/.cargo}/config.toml" |
version workflow is failing with the following error:
This is likely caused by cargo not finding the eppo_core inside ruby workspace.
Set the eppo_core override in ~/.cargo/config.toml.
Additional fixes: