Skip to content

fix: sort new enum field values #307

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
Apr 22, 2025

Conversation

byashimov
Copy link
Contributor

@byashimov byashimov commented Apr 22, 2025

The generator doesn't sort freshly added enum field values, it does so only on the diff operation.
For example, here the log value was added with the log_level field.
And here it was sorted by the differ.
This causes unnecessary diff in TF when the schema is updated.

@byashimov byashimov requested a review from a team as a code owner April 22, 2025 08:54
@byashimov byashimov force-pushed the byashimov-sort-new-enum-field-values branch from ad04b64 to 420d63b Compare April 22, 2025 08:57
The generator doesn't sort freshly added enum field values,
it does so only on the diff operation.
For example, [here](https://github.com/aiven/go-api-schemas/pull/300/files)
the `log` value was added with the `log_level` field.
And [here](https://github.com/aiven/go-api-schemas/pull/305/files) it was sorted by the differ.
This causes [unnecessary diff](https://github.com/aiven/terraform-provider-aiven/pull/2164/files)
in TF when the schema is updated.
@byashimov byashimov force-pushed the byashimov-sort-new-enum-field-values branch from 420d63b to 67d1ad8 Compare April 22, 2025 08:58
@vmyroslav vmyroslav merged commit b59a151 into main Apr 22, 2025
6 checks passed
@vmyroslav vmyroslav deleted the byashimov-sort-new-enum-field-values branch April 22, 2025 09:17
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