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

Improved package init and publish flow #269

Merged
merged 14 commits into from
May 7, 2024

Conversation

calvinrp
Copy link
Collaborator

@calvinrp calvinrp commented May 5, 2024

When publishing either a package Release or Init, a new error ConflictPendingPublish(RecordId) may be returned.

This instructs the client that it could wait for the conflicting pending record (on the same LogId package) to complete and then retry to publish.

If a registry service offers key management and needs to sign the Init record, this enables a smoother experience and messaging on the CLI. Where the registry would return the RecordId of the registry signed Init record as a ConflictPendingPublish error, the CLI would wait for that record to publish and then retry. Since the package is already initialized, an error message would be presented that indicates that the package was initialized but not with the Init record that you signed.

Also, added a feature flag for cli-interactive for the warg-client and a config flag to disable dialoguer interactive prompting even when that feature is enabled.

@calvinrp calvinrp requested review from lann and macovedj May 5, 2024 21:12
crates/client/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@lann lann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative feature comment is only blocker

Cargo.toml Outdated Show resolved Hide resolved
crates/api/src/v1/package.rs Outdated Show resolved Hide resolved
crates/client/src/config.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
crates/client/Cargo.toml Outdated Show resolved Hide resolved
@calvinrp
Copy link
Collaborator Author

calvinrp commented May 7, 2024

Also, added a output option for the warg download -o subcommand. And, if output arg is omitted`, asks the user if wants to have the file written to the CWD. Otherwise, just downloads to the local cache which is kind of confusing and hard to find the file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I completely missed these changes in my first pass: "Large diffs are not rendered by default." 🙄

crates/client/src/lib.rs Outdated Show resolved Hide resolved
crates/client/src/lib.rs Outdated Show resolved Hide resolved
crates/client/src/lib.rs Outdated Show resolved Hide resolved
crates/client/src/lib.rs Outdated Show resolved Hide resolved
@calvinrp calvinrp merged commit 3074330 into bytecodealliance:main May 7, 2024
6 checks passed
@calvinrp calvinrp deleted the package-init branch May 7, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants