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

add autorust.toml with tags_allow to limit tags #747

Merged
merged 6 commits into from
May 6, 2022

Conversation

cataggar
Copy link
Member

@cataggar cataggar commented May 6, 2022

This allows specifying an allow list of tags to generate for a crate. The configuration for the package is an autorust.toml file in the destination directory. We can extend it and move package specific configuration there.

@cataggar cataggar marked this pull request as ready for review May 6, 2022 03:32
@@ -0,0 +1 @@
tags_allow = ["package-2021-08", "package-2021-05"]
Copy link
Member Author

Choose a reason for hiding this comment

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

This is limiting the tags for azure_mgmt_network to two of the most recent stable tags.

Copy link
Member

Choose a reason for hiding this comment

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

So no root section is necessary? Should we have one to avoid future issues, or likely not a problem?

FWIW, our autorest tooling makes heavy use (required, really) of configuration so I definitely could see adding more in the future here...assuming we don't eventually adopt autorest instead.

@cataggar cataggar requested review from heaths and bmc-msft May 6, 2022 12:57
Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

Awesome! Just a couple nits/thoughts.

use super::*;

#[test]
fn test_tags_allow() -> Result<(), Error> {
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to cover the case where no autorest.toml exists and the passed tags are returned back. That'll happen far more frequently.

@@ -0,0 +1 @@
tags_allow = ["package-2021-08", "package-2021-05"]
Copy link
Member

Choose a reason for hiding this comment

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

So no root section is necessary? Should we have one to avoid future issues, or likely not a problem?

FWIW, our autorest tooling makes heavy use (required, really) of configuration so I definitely could see adding more in the future here...assuming we don't eventually adopt autorest instead.

@cataggar cataggar merged commit beb3375 into Azure:main May 6, 2022
@cataggar cataggar deleted the PackageConfig branch May 6, 2022 23:53
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