Skip to content

Add ability to yank different crate sets to the publisher tool #2933

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

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

jdisanti
Copy link
Contributor

This PR adds different crate sets to the publisher tool so that different groups of crates can be yanked rather than yanking everything.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jdisanti jdisanti requested review from a team as code owners August 18, 2023 17:12
@jdisanti jdisanti force-pushed the jdisanti-partial-yank branch from 8d49a5b to eeecfbe Compare August 18, 2023 17:30
@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Comment on lines +23 to +32
#[derive(Copy, Clone, Debug, ArgEnum, Eq, PartialEq, Ord, PartialOrd)]
pub enum CrateSet {
/// (default) Yank all crates associated with the release.
All,
/// Yank all AWS SDK crates.
AllAwsSdk,
/// Yank generated AWS SDK crates.
GeneratedAwsSdk,
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure I understand correctly:

  • All: AWS SDKs, AWS runtime crates, smithy runtime crates
  • AllAwsSdk: AWS SDKs, AWS runtime crates
  • GeneratedAwsSdk: AWS SDKs
    Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct.

.tag
.as_ref()
.ok_or_else(|| {
anyhow!("Versions manifest doesn't have a release tag. Can only yank tagged releases.")
Copy link
Contributor

Choose a reason for hiding this comment

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

In what cases could this occur? If we did a manual release and never tagged it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can happen if you download a generated SDK from CI or something and try to yank with its version.toml.

info!("This will yank aws-sdk-rust's `{tag}` release from crates.io.");
info!("Crates to yank:");
for (crate_name, crate_version) in &release.crates {
for (crate_name, crate_version) in crates {
info!(" {}-{}", crate_name, crate_version);
Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to ignore this since you didn't touch this line.

Suggested change
info!(" {}-{}", crate_name, crate_version);
info!("\t{}-{}", crate_name, crate_version);

We should use tab characters instead of spaces for stuff like this.

@jdisanti jdisanti added this pull request to the merge queue Aug 21, 2023
Merged via the queue into main with commit 99ff449 Aug 21, 2023
@jdisanti jdisanti deleted the jdisanti-partial-yank branch August 21, 2023 19:05
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.

2 participants