-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: reproducible choice interactive #262
Conversation
this error will trigger if someone migrates from manifest, where `["cargo", "near", "build"]` is specificed as build command, by specifying only new image, without changing the command
return Err(color_eyre::eyre::eyre!( | ||
"{}\n`{}` for the used image:\n{}", | ||
COMMAND_ERR_MSG, | ||
serde_json::to_string(&default_cmd).unwrap(), | ||
get_docker_image() | ||
) | ||
.note(format!( | ||
"The default `{}` has changed since `{}` image\n\ | ||
See {}", | ||
"container_build_command".cyan(), | ||
"sourcescan/cargo-near:0.13.0-rust-1.83.0".cyan(), | ||
"https://github.com/near/cargo-near/releases".cyan() | ||
))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…oice) (#263) resolves #252 too --------- Co-authored-by: dj8yf0μl <[email protected]>
has been tested on following cases: sample-crate
sample-crate-110.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262@sha256:a231d4bf975d561a06dd5357f2ac03c883e8b3b510994f3b40c9b975dcdb02ce",
"contract_path": "",
"source_code_snapshot": "git+https://github.com/dj8yfo/sample_no_workspace?rev=0af334a86ea56d4257e6cc199231eb6a30950e69"
},
"link": "https://github.com/dj8yfo/sample_no_workspace/tree/0af334a86ea56d4257e6cc199231eb6a30950e69",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.7.7"
} factories-like noteFor both of the following (SourceScan runs factory-rustapi example for build scripts (no change) - build.rs
repro-fct-80.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--no-default-features",
"--features",
"near-sdk/expensive-debug"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "factory",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=91dde6ef874c7e0b74535c0b8cbd5d532d0caa99"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/91dde6ef874c7e0b74535c0b8cbd5d532d0caa99",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.13"
} donation-product.repro-fct-80.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--no-default-features"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "product-donation",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=91dde6ef874c7e0b74535c0b8cbd5d532d0caa99"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/91dde6ef874c7e0b74535c0b8cbd5d532d0caa99",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.2.9"
}
donation-product.repro-fct-81.testnet ❎ fails reproducibility verification, across breaking change boundary (builder version repro-fct-81.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-default-features",
"--features",
"near-sdk/expensive-debug"
],
"build_environment": "sourcescan/cargo-near:0.11.0-rust-1.82.0@sha256:6af67e796ff7182f6b184031f9e95d792f97b66693698abc51b4630acac0bf83",
"contract_path": "factory",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=9c41cf040afb0c7c315a3b5efc14f95e0532325a"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/9c41cf040afb0c7c315a3b5efc14f95e0532325a",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.13"
} donation-product.repro-fct-81.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--no-default-features"
],
"build_environment": "sourcescan/cargo-near:0.11.0-rust-1.82.0@sha256:6af67e796ff7182f6b184031f9e95d792f97b66693698abc51b4630acac0bf83",
"contract_path": "product-donation",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=9c41cf040afb0c7c315a3b5efc14f95e0532325a"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/9c41cf040afb0c7c315a3b5efc14f95e0532325a",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.2.9"
} repro-fct-product-81.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-default-features"
],
"build_environment": "sourcescan/cargo-near:0.11.0-rust-1.82.0@sha256:6af67e796ff7182f6b184031f9e95d792f97b66693698abc51b4630acac0bf83",
"contract_path": "product-donation",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=9c41cf040afb0c7c315a3b5efc14f95e0532325a"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/9c41cf040afb0c7c315a3b5efc14f95e0532325a",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.2.9"
}
fails reproducibility verification, across breaking change boundary (builder version repro-fct-82.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--no-default-features",
"--features",
"near-sdk/expensive-debug"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "factory",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.13"
} donation-product.repro-fct-82.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"--no-default-features"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "product-donation",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.2.9"
} repro-fct-product-82.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--no-default-features"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "product-donation",
"source_code_snapshot": "git+https://github.com/dj8yfo/factory-rust?rev=f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68"
},
"link": "https://github.com/dj8yfo/factory-rust/tree/f9d5b4a3b3e5d17b44cbac4aa952f364fd5a6f68",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.2.9"
} neardevhub
community.devhub-inta.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "community-factory",
"source_code_snapshot": "git+https://github.com/dj8yfo/neardevhub-contract?rev=2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed"
},
"link": "https://github.com/dj8yfo/neardevhub-contract/tree/2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.0"
} uniquehandle.community.devhub-inta.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "community",
"source_code_snapshot": "git+https://github.com/dj8yfo/neardevhub-contract?rev=2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed"
},
"link": "https://github.com/dj8yfo/neardevhub-contract/tree/2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.0"
} discussions.uniquehandle.community.devhub-inta.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "discussions",
"source_code_snapshot": "git+https://github.com/dj8yfo/neardevhub-contract?rev=2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed"
},
"link": "https://github.com/dj8yfo/neardevhub-contract/tree/2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.0"
}
community.devhub-intb.testnet
{
"build_info": {
"build_command": [
"cargo",
"near",
"build",
"non-reproducible-wasm",
"--locked",
"--env",
"KEY=VALUE",
"--env",
"GOOGLE_QUERY=https://www.google.com/search?q=google+translate&sca_esv=3c150c50f502bc5d"
],
"build_environment": "dj8yfo/sourcescan:0.x.x-dev-pr-262-1.83@sha256:b38d13fb8c3dfe4d8555303907f8ea47be8df7bf65ee452817af5ae0c54cdc51",
"contract_path": "community-factory",
"source_code_snapshot": "git+https://github.com/dj8yfo/neardevhub-contract?rev=2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed"
},
"link": "https://github.com/dj8yfo/neardevhub-contract/tree/2716b484b35dbe1deed8d5dbfb9ac39f5bec3fed",
"standards": [
{
"standard": "nep330",
"version": "1.2.0"
}
],
"version": "0.1.0"
} |
…ctive build choice) (#264) checked on https://github.com/dj8yfo/workflows_test/actions/runs/12243985822/job/34154726255 and https://github.com/dj8yfo/workflows_test/actions/runs/12244281047/job/34155683767 (mirroring change in dj8yfo/workflows_test@5464b2c) Co-authored-by: dj8yf0μl <[email protected]>
@race-of-sloths include |
@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 13! @frol received 25 Sloth Points for reviewing and scoring this pull request. Congratulations @dj8yfo! Your PR was highly scored and you completed another monthly streak! To keep your monthly streak make another pull request next month and get 8+ score for it What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
of not ouputting full transaction to console
cargo-near/src/commands/build/actions/non_reproducible_wasm/mod.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing!
@race-of-sloths score 13
## 🤖 New release * `cargo-near`: 0.12.2 -> 0.13.0 (⚠️ API breaking changes) * `cargo-near-build`: 0.3.2 -> 0.4.0 (⚠️ API breaking changes) ###⚠️ `cargo-near` breaking changes ``` --- failure module_missing: pub module removed or renamed --- Description: A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/module_missing.ron Failed in: mod cargo_near::commands::build_command, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/build_command/mod.rs:1 mod cargo_near::commands::abi_command, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/abi_command/mod.rs:1 --- failure struct_missing: pub struct removed or renamed --- Description: A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_missing.ron Failed in: struct cargo_near::commands::abi_command::AbiCommandlContext, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/abi_command/mod.rs:45 struct cargo_near::commands::deploy::CliContract, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/deploy/mod.rs:5 struct cargo_near::commands::abi_command::AbiCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/abi_command/mod.rs:6 struct cargo_near::commands::build_command::InteractiveClapContextScopeForBuildCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/build_command/mod.rs:6 struct cargo_near::commands::abi_command::CliAbiCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/abi_command/mod.rs:3 struct cargo_near::commands::build_command::CliBuildCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/build_command/mod.rs:6 struct cargo_near::commands::build_command::BuildCommandlContext, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/build_command/mod.rs:173 struct cargo_near::commands::deploy::ContractContext, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/deploy/mod.rs:24 struct cargo_near::commands::deploy::InteractiveClapContextScopeForContract, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/deploy/mod.rs:5 struct cargo_near::commands::abi_command::InteractiveClapContextScopeForAbiCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/abi_command/mod.rs:3 struct cargo_near::commands::deploy::Contract, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/deploy/mod.rs:9 struct cargo_near::commands::build_command::BuildCommand, previously in file /tmp/.tmpamrxDt/cargo-near/src/commands/build_command/mod.rs:9 ``` ###⚠️ `cargo-near-build` breaking changes ``` --- failure struct_pub_field_missing: pub struct's pub field removed or renamed --- Description: A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_pub_field_missing.ron Failed in: field no_release of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:20 field no_abi of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:23 field no_embed_abi of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:26 field no_doc of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:29 field no_wasmopt of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:32 field features of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:39 field no_default_features of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:42 field cli_description of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:49 field env of struct Opts, previously in file /tmp/.tmpamrxDt/cargo-near-build/src/types/near/docker_build/mod.rs:53 ``` <details><summary><i><b>Changelog</b></i></summary><p> ## `cargo-near` <blockquote> ## [0.13.0](cargo-near-v0.12.2...cargo-near-v0.13.0) - 2024-12-17 ### Added - reproducible choice interactive (#262) ### Other - update `cargo near new` template `image` and `image_digest` ([#259](#259)) - update `cargo near new` template `image` and `image_digest` ([#257](#257)) </blockquote> ## `cargo-near-build` <blockquote> ## [0.4.0](cargo-near-build-v0.3.2...cargo-near-build-v0.4.0) - 2024-12-17 ### Added - reproducible choice interactive (#262) ### Other - fix 1.83clippy, audit (#260) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
this will look now like the following
this is pending
container_build_command
for newer images (ones, that will be built after release of this pr).github/workflows
change /testing (chore: change.github/workflows
ofcargo near new
project (interactive build choice) #264)