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

feat: Add CFT test lint subcommand, implement blueprint connection source version lint rule for POC #2631

Merged
merged 27 commits into from
Oct 21, 2024

Conversation

qz267
Copy link
Contributor

@qz267 qz267 commented Sep 30, 2024

This PR implemented go/blueprint-metadata-lint, implement a POC rule to verify the version value in ConnectionSource, valid version values including:

  • "=1.0.0"
  • ">=2.0.0"
  • ">=3.0.0 <5.0.0"
  • "~>4.0"

cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/cmd.go Outdated Show resolved Hide resolved
@qz267 qz267 requested review from q2w and a team as code owners October 10, 2024 01:32
@qz267
Copy link
Contributor Author

qz267 commented Oct 10, 2024

a sample metadata lint output is:

-> % ~/src/cloud-foundation-toolkit/cli/bin/cft test lint
metadata, spec, or interfaces are nil
All lint checks passed!
zhengqin@yard [11:47:55 PM] [~/src/cloud-foundation-toolkit/cli/testdata/bpmetadata/content/examples/acm] [367401040-lint-ADC]
-> % ```

@qz267 qz267 changed the title [WIP] feat: Add CFT test lint subcommand feat: Add CFT test lint subcommand, implement blueprint connection source version lint rule for POC Oct 10, 2024
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Looks great @qz267

cli/bptest/metadata_lint_interface.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint.go Outdated Show resolved Hide resolved
cli/bptest/metadata_lint_interface.go Outdated Show resolved Hide resolved
cli/bptest/blueprint_version_rule.go Outdated Show resolved Hide resolved
cli/bptest/blueprint_version_rule_test.go Outdated Show resolved Hide resolved
cli/bptest/cmd.go Outdated Show resolved Hide resolved
cli/bptest/cmd.go Outdated Show resolved Hide resolved
cli/bptest/cmd.go Outdated Show resolved Hide resolved
@qz267 qz267 requested a review from bharathkkb October 17, 2024 18:43
@qz267
Copy link
Contributor Author

qz267 commented Oct 17, 2024

@bharathkkb all comments addressed, will update design doc accordingly

cli/bptest/lint.go Outdated Show resolved Hide resolved
cli/bptest/cmd.go Outdated Show resolved Hide resolved
cli/bptest/blueprint_version_rule.go Outdated Show resolved Hide resolved
@qz267 qz267 requested review from bharathkkb and q2w October 18, 2024 14:28
@q2w q2w merged commit 2626d7a into GoogleCloudPlatform:master Oct 21, 2024
14 checks passed
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