Skip to content

Bosh Release Property Validation RFC#1049

Merged
beyhan merged 2 commits into
mainfrom
pr-bosh-release-property-validation-rfc
Feb 4, 2025
Merged

Bosh Release Property Validation RFC#1049
beyhan merged 2 commits into
mainfrom
pr-bosh-release-property-validation-rfc

Conversation

@jpalermo

@jpalermo jpalermo commented Jan 20, 2025

Copy link
Copy Markdown

@jpalermo
jpalermo force-pushed the pr-bosh-release-property-validation-rfc branch from e298c5d to 8434b29 Compare January 20, 2025 20:13
@jpalermo jpalermo added toc rfc CFF community RFC labels Jan 20, 2025
@beyhan
beyhan requested review from a team, ChrisMcGowan, ameowlia, beyhan, rkoster and stephanme and removed request for a team January 21, 2025 06:08
@beyhan

beyhan commented Jan 28, 2025

Copy link
Copy Markdown
Member

During the TOC meeting on 28.01.2025 we decided to start the FCP with the goal to accept this RFC.

@cweibel

cweibel commented Jan 28, 2025

Copy link
Copy Markdown

I like the idea of the validation on the director side. It can be frustrating to generate all your certificates in credhub only to find out after hours of debugging that the SAN configuration was wrong.

@beyhan
beyhan merged commit 727d7ca into main Feb 4, 2025
@beyhan
beyhan deleted the pr-bosh-release-property-validation-rfc branch February 4, 2025 16:04
beyhan added a commit that referenced this pull request Feb 5, 2025
@teddyking

Copy link
Copy Markdown

Hi everyone 👋 I've just been made aware of this PR as we have been wanting to perform some fairly advanced validation logic in one of our BOSH releases. Overall I think this is great and will add a lot of value but there are a couple of specifics that I'm not sure would be covered with JSON scheme:

  • Cross field validation - for example given a property named foos, which is an array of strings, and another property named requested-foo, which is a string, validate that the value of requested-foo is contained within the values of the foos array.
  • Uniqueness in arrays of objects - you can check uniqueness for simple arrays ["foo","foo'], but not if for arrays of objects: [{"name":"foo"},{"name":"foo"}].

Maybe it is possible to do these (in which case please let me know!) but if not I thought I'd mention them in case anyone else had similar requirements.

@jpalermo

Copy link
Copy Markdown
Author

Hi @teddyking ,
I've not actually used json schema much, but looking around, maybe $data could be used to accomplish the first thing.

And it looks like uniqueItems does the second bit too. Seems like the ability to do uniqueness on non-primitive types must have been added in a recent draft of the schema because some older info says it isn't possible, but I tried it out and it seemed to work with objects or nested arrays just fine.

We are open to adding validations that would be useful to multiple releases. But we probably want to keep the number of custom validations at least somewhat limited. So for more specific things, the recommendation would be to put them in the application logic or a pre-start script of some kind.

achrinza added a commit to achrinzafork/docs-bosh that referenced this pull request Jul 12, 2026
Document BOSH release job property validation

see: cloudfoundry/community#1049
see: cloudfoundry/bosh-cli#681
see: cloudfoundry/bosh#2602
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
achrinza added a commit to achrinzafork/docs-bosh that referenced this pull request Jul 12, 2026
Document BOSH release job property validation

see: cloudfoundry/community#1049
see: cloudfoundry/bosh-cli#681
see: cloudfoundry/bosh#2602
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
achrinza added a commit to achrinzafork/docs-bosh that referenced this pull request Jul 12, 2026
Document BOSH release job property validation

see: cloudfoundry/community#1049
see: cloudfoundry/bosh-cli#681
see: cloudfoundry/bosh#2602
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
achrinza added a commit to achrinzafork/docs-bosh that referenced this pull request Jul 13, 2026
Document BOSH release job property validation

see: cloudfoundry/community#1049
see: cloudfoundry/bosh-cli#681
see: cloudfoundry/bosh#2602
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
achrinza added a commit to achrinzafork/docs-bosh that referenced this pull request Jul 13, 2026
Document BOSH release job property validation

see: cloudfoundry/community#1049
see: cloudfoundry/bosh-cli#681
see: cloudfoundry/bosh#2602
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfc CFF community RFC toc

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants