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

rfc: generic per-route features #743

Merged
merged 10 commits into from
Apr 16, 2024

Conversation

maxmoehl
Copy link
Member

@maxmoehl maxmoehl commented Jan 8, 2024

@maxmoehl maxmoehl force-pushed the rfc-route-features branch from 7d449a6 to 99ccb12 Compare January 8, 2024 15:54
@maxmoehl maxmoehl changed the title wip: rfc: generic pre-route features wip: rfc: generic per-route features Jan 8, 2024
Copy link
Contributor

@peanball peanball left a comment

Choose a reason for hiding this comment

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

Some minor editorial stuff

toc/rfc/rfc-draft-generic-per-route-features.md Outdated Show resolved Hide resolved
toc/rfc/rfc-draft-generic-per-route-features.md Outdated Show resolved Hide resolved
@maxmoehl maxmoehl marked this pull request as ready for review February 28, 2024 07:56
@maxmoehl
Copy link
Member Author

ping @geofffranks @ameowlia

@maxmoehl maxmoehl force-pushed the rfc-route-features branch from 8aec539 to 0ce0b58 Compare March 7, 2024 12:59
@maxmoehl maxmoehl changed the title wip: rfc: generic per-route features rfc: generic per-route features Mar 7, 2024
@beyhan beyhan requested review from a team, rkoster, beyhan, stephanme, ameowlia and ChrisMcGowan and removed request for a team March 7, 2024 15:11
@beyhan beyhan added toc rfc CFF community RFC labels Mar 7, 2024
@beyhan
Copy link
Member

beyhan commented Mar 7, 2024

@maxmoehl I see that this RFC is not marked as draft any more. I assume that this is ready for review and add it to the list of RFCs which the TOC will look into next Tuesday. If it still not the case please let me know.

Copy link
Member Author

@maxmoehl maxmoehl left a comment

Choose a reason for hiding this comment

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

Adding comments raised during the ARP WG meeting.

toc/rfc/rfc-draft-generic-per-route-features.md Outdated Show resolved Hide resolved
toc/rfc/rfc-draft-generic-per-route-features.md Outdated Show resolved Hide resolved
toc/rfc/rfc-draft-generic-per-route-features.md Outdated Show resolved Hide resolved
- name: test
routes:
- route: example.com
options:
Copy link
Member

Choose a reason for hiding this comment

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

If the route already exists without these options would you expect it to be updated?

There hasn't really been much updating of routes before so you might want to mention that this endpoint would be enhanced:
https://v3-apidocs.cloudfoundry.org/version/3.159.0/index.html#update-a-route

And probably worth mentioning https://v3-apidocs.cloudfoundry.org/version/3.159.0/index.html#create-a-route as well. cf create-route and cf map-route (if the route doesn't already exist) both call that one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! Yes, we expect those options to be modifiable via updates.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not that familiar with the CC API, are such PATCH calls usually additive or do they replace the object?

Copy link
Member

Choose a reason for hiding this comment

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

For the route as a whole it would be additive. You wouldn't need to specify fields like host or path again.

The CC API isn't as consistent for object subfields though. I think you could either replace the whole options field with the contents of the PATCH or do something like the update env vars endpoint and make null a valid value for removing an option. I think replacing it is probably simpler and I think the default behavior in CCNG.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think this should be included in the RFC? I'd probably leave such details up to the implementers.

I've also added the relevant API endpoints to the RFC.

Copy link
Member

Choose a reason for hiding this comment

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

I think this (indeed surprising) behaviour is correct according to the API spec: https://v3-apidocs.cloudfoundry.org/#apply-a-manifest-to-a-space

Apply changes specified in a manifest to the named apps and their underlying processes. The apps must reside in the space. These changes are additive and will not modify any unspecified properties or remove any existing environment variables, routes, or services.

Since the protocol property was not specified, it remains unchanged which results in http2. The diff output could be considered as buggy.

Disclaimer: I don't understand the coding in every detail and I could not find a matching test case that deals with this protocol case. I will raise this in the CAPI Open Office Hour.

Copy link
Member

Choose a reason for hiding this comment

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

We discussed this during the TOC meeting today and we should go for consistent behaviour as documented in the APIs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added a paragraph to capture that:

The overall goal MUST be to implement the new fields in a way that fits in with the current behavior of the cloud controller API. It is up to the maintainers / implementers to decide on the exact behavior.

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a terribly strong opinion here, but I think we should go with what's consistent for now and provide a way for users to explicitly unset the properties in the manifest.

I know that @Gerg has been thinking about what a truly declarative "version 2" of the CF manifest my look/behave like and I think that would be an opportunity to incorporate some of that feedback. He has a doc somewhere, but I think it was made private due to some Google doc migrations. I'll let him chime in when he's available / let him know about this.

Copy link
Member

Choose a reason for hiding this comment

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

we should go for consistent behaviour as documented in the APIs.

I agree. I also remember being confused about this behavior regarding readiness health check manifest properties. It's odd, but that is how the app manifest currently works. I think changing it is out of scope for this RFC.

@maxmoehl
Copy link
Member Author

maxmoehl commented Apr 4, 2024

I've been resolving conversations where I either adjusted the RFC or think that we have consensus on not addressing the comment in this RFC, the only discussion left right now is about API semantics in CC. If you had comments please double check that they are addressed appropriately and unresolve discussions which still need clarification!

I would like to move into the final comment period soon-ish.

@beyhan
Copy link
Member

beyhan commented Apr 9, 2024

We decided to start the FCP for this RFC with the goal to accept it next Tuesday 16th of April.

@beyhan beyhan merged commit 2cdc687 into cloudfoundry:main Apr 16, 2024
1 check passed
@maxmoehl maxmoehl deleted the rfc-route-features branch April 16, 2024 16:41
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.

10 participants