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 release property validation #2602

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

Conversation

jpalermo
Copy link
Member

@jpalermo jpalermo commented Feb 5, 2025

Releases can add a properties_schema.json file at the root of their jobs that is a json schema file.

This schema will be used to validate deployment properties prior to template rendering during a deploy.

The new integration test won't pass until a new bosh-cli is cut with 681

Releases can add a properties_schema.json file at the root of their jobs that is a json schema file.

This schema will be used to validate deployment properties prior to template rendering during a deploy.
@jpalermo jpalermo force-pushed the pr-add-property-schema-validation branch from 17fc797 to 8729145 Compare February 5, 2025 03:21
@beyhan beyhan requested review from a team, mingxiao and rajathagasthya and removed request for a team February 6, 2025 15:55
Comment on lines +42 to +44
if File.exist?(File.join(template_dir, 'properties_schema.json'))
properties_schema = JSON.load_file(File.join(template_dir, 'properties_schema.json'))
else
Copy link
Member

Choose a reason for hiding this comment

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

It would be great to start a trend of moving magic strings like 'properties_schema.json' into constants.

return true if instance == ""
begin
OpenSSL::X509::Certificate.load(instance)
rescue OpenSSL::X509::CertificateError => e
Copy link
Member

Choose a reason for hiding this comment

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

Should => e be dropped here, or is that something we want to log, or otherwise capture?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 don't think there is much in the way of valuable output here since it just "couldn't parse the cert", I think this was just muscle memory when typing rescue, removed now.

Copy link
Member

@aramprice aramprice left a comment

Choose a reason for hiding this comment

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

exciting times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending Merge | Prioritized
Development

Successfully merging this pull request may close these issues.

2 participants