-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CLI] cherry pick (#20977) Deprecation warnings for dependency verifi…
…cation (#21127) ## Description This adds a warning that source verification will become opt-in instead of opt-out in a future release, along with the `--verify-deps` flag that currently disables the warning. ## Test plan Several shell tests that cover the behavior with no flags, with both flags, and with each flag independently, on a package with source that has changed since publication. See the snapshot files for the tests and expected output. ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [ ] JSON-RPC: - [ ] GraphQL: - [X] CLI: publication and upgrade will now warn that source verification will become opt-in in a future release; the warning can be disabled with either `--skip-dependency-verification` or the new `--verify-deps` flags - [ ] Rust SDK:
- Loading branch information
1 parent
23424e7
commit 55ba9e9
Showing
19 changed files
with
533 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...es/sui/tests/shell_tests/with_network/source_verification_deprecation/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This test suite checks that the deprecation warnings for dependency verification during publication and the | ||
associated flags `--skip-dependency-verification` and `--verify-deps` are working correctly. |
10 changes: 10 additions & 0 deletions
10
crates/sui/tests/shell_tests/with_network/source_verification_deprecation/both_flags.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) Mysten Labs, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# test that we get an error if we supply both `--skip-dependency-verification` and `--verify-deps` | ||
|
||
echo "=== publish ===" | tee /dev/stderr | ||
sui client --client.config $CONFIG publish example --skip-dependency-verification --verify-deps | ||
|
||
echo "=== upgrade ===" | tee /dev/stderr | ||
sui client --client.config $CONFIG upgrade example --upgrade-capability 0x1234 --skip-dependency-verification --verify-deps |
10 changes: 10 additions & 0 deletions
10
...s/sui/tests/shell_tests/with_network/source_verification_deprecation/dependency/Move.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "dependency" | ||
edition = "2024.beta" | ||
|
||
[dependencies] | ||
# Sui = { local = "FRAMEWORK_DIR", override = true } | ||
|
||
[addresses] | ||
dependency = "0x0" | ||
|
6 changes: 6 additions & 0 deletions
6
...ell_tests/with_network/source_verification_deprecation/dependency/sources/dependency.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
module dependency::dependency; | ||
|
||
public fun f(): u64 { 0 } |
10 changes: 10 additions & 0 deletions
10
crates/sui/tests/shell_tests/with_network/source_verification_deprecation/example/Move.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "example" | ||
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move | ||
|
||
[dependencies] | ||
# Sui = { local = "FRAMEWORK_DIR" } | ||
dependency = { local = "../dependency" } | ||
|
||
[addresses] | ||
example = "0x0" |
9 changes: 9 additions & 0 deletions
9
...sts/shell_tests/with_network/source_verification_deprecation/example/sources/example.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/// Module: example | ||
module example::example; | ||
|
||
use dependency::dependency::f; | ||
|
||
public fun g(): u64 { f() } |
Oops, something went wrong.