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 "default" field to v3 stacks #3157

Merged
merged 3 commits into from
Feb 1, 2023
Merged

Add "default" field to v3 stacks #3157

merged 3 commits into from
Feb 1, 2023

Conversation

Gerg
Copy link
Member

@Gerg Gerg commented Jan 23, 2023

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

A short explanation of the proposed change:

Add default field to v3 stacks.

An explanation of the use cases your change solves

  • The default stack is only configurable by operators.
  • New apps use the default stack, if no stack is specified in their lifecycle.
  • There was no way for API users to know what the default stack is on a given Cloud Foundry deployment.
  • Apps will not change their stack, unless the app lifecycle is updated to a different stack. The default stack does not affect existing applications.
  • This field may be useful for writing app deploy scripts that automatically update the app's stack to be the default stack.
  • This could also enable push workflows like cf push my-app --default-stack (or something like that).

Links to any other associated PRs

N/A

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

- The default stack is only configurable by operators.
- New apps use the default stack, if no stack is specified in their
  lifecycle.
- There was no way for API users to know what the default stack is on a
  given Cloud Foundry deployment.
- Apps will not change their stack, unless the app lifecycle is updated
  to a different stack. The default stack does not affect existing
  applications.
- This field may be useful for writing app deploy scripts that
  automatically update the app's stack to be the default stack.
- This could also enable push workflows like `cf push my-app
  --default-stack` (or something like that).
- Boolean-ish filter adopted from v3 security groups
- Enable clients to discover which stack is the operator-configured
  default stack
@Gerg Gerg marked this pull request as ready for review January 24, 2023 19:54
@Gerg Gerg requested a review from moleske January 24, 2023 19:55
@Gerg Gerg marked this pull request as draft January 24, 2023 20:49
- Error message was previously "The query parameter is invalid: Default
  is not included in the list" for some endpoints, which was unhelpful
  and NOT luxurious
- Slightly modify the error message for some services endpoints
@Gerg Gerg marked this pull request as ready for review January 24, 2023 22:22
Copy link
Member

@moleske moleske left a comment

Choose a reason for hiding this comment

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

Look good to me. Thank you for also updating the docs and cleaning up some of test work

@moleske moleske merged commit 4092c8c into main Feb 1, 2023
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.

4 participants