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

Trigger Schema Generated Tool #6489

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

SpiritZhou
Copy link
Contributor

Generating trigger metadata schema according to new declarative scaler configuration, which can be used for validation or other related improvement.

Input:
make generate-scaler-schemas [--keda-version][--scalers-builder-file][--scalers-files-dir][--specify-scaler][--output-file-path]

Output:
scaler-metadata-schemas.yaml

Checklist

Relates to # #6345

SpiritZhou added 3 commits January 20, 2025 10:11
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
@SpiritZhou SpiritZhou requested a review from a team as a code owner January 20, 2025 02:39
SpiritZhou added 10 commits January 20, 2025 10:43
Signed-off-by: SpiritZhou <[email protected]>
fix
Signed-off-by: SpiritZhou <[email protected]>
Fix
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

This PR is simply awesome! Could I suggest generating the output also as json as add a verification step during the CI to verify that the generated schemas are up to date?

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

This PR is simply awesome! Could I suggest generating the output also as json as add a verification step during the CI to verify that the generated schemas are up-to-date?

And probably we want to pull the schema during the release too, using the specific version of the release

@SpiritZhou
Copy link
Contributor Author

Sure, will add json as one more output file formate.

SpiritZhou added 2 commits January 23, 2025 16:20
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Great stuff!

Minor improvements/suggestions:

  1. change the ouptup filename from scaler-metadata-schemas to scalers-metadata-schema
  2. store the schema in schema/generated
  3. regenerate the schema as part of the other generation stuff (probalby build step in the Makefile)
  4. add a verification step to make sure schema is up to data (similar like it is done for clientset)
  5. let's produce versioned schema file in the release pipeline named scalers-metadata-schema-v$KEDA_VERSION.json/yaml

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
schema/generate_scaler_schema.go Outdated Show resolved Hide resolved
SpiritZhou added 2 commits February 7, 2025 11:09
Signed-off-by: SpiritZhou <[email protected]>
Signed-off-by: SpiritZhou <[email protected]>
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