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

Fix manifest validation for random-route #2635

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Conversation

tcdowney
Copy link
Member

@tcdowney tcdowney commented Jun 23, 2023

The validator was always raising the following error when random-route was specified:
"default-route and random-route may not be used together"

This change makes it so that it only errors when both default-route and random-route are set to true.

Related Slack discussion: https://cloudfoundry.slack.com/archives/C0297673ASK/p1687556306576749

Is there a related GitHub Issue?

No

What is this change about?

Fixes a bug where any manifest containing random-route: true would cause an error. Minimal example:

--- 
applications: 
- name: dora
  random-route: true
15:57 $ cf push node
Pushing app node to org o / space s as cf-admin...
Applying manifest file /Users/tdowney/go/src/github.com/cloudfoundry/cf-acceptance-tests/assets/node/manifest.yml...

Updating with these attributes...
  applications:
  - name: node
    random-route: true
applications[0].default-route and random-route may not be used together

Does this PR introduce a breaking change?

No

Acceptance Steps

Push an app with manifests containing random-route, default-route, and mixtures of both. They should work in isolation and fail when both are set to true.

Tag your pair, your PM, and/or team

@acosta11

The validator was always raising the following error
when random-route was specified:

"default-route and random-route may not be used together"

This change makes it so that it only errors when both default-route
and random-route are set to true.

Authored-by: Tim Downey <[email protected]>
@tcdowney tcdowney requested a review from acosta11 June 23, 2023 22:39
Copy link
Member

@acosta11 acosta11 left a comment

Choose a reason for hiding this comment

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

Looks good. See the related korifi-dev slack thread for other equivalent options for the validation code. If other folks have a strong preference we can update afterwards.

@acosta11 acosta11 merged commit 32b874e into main Jun 23, 2023
6 checks passed
@acosta11 acosta11 deleted the fix-random-route-manifest branch June 23, 2023 23:05
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