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

🌱 Fixups for watch in in-memory apiServer #8898

Merged

Conversation

killianmuldoon
Copy link
Contributor

Has a number of small improvements following on from reviews of #8851.

Related to #8814

Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 21, 2023
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 21, 2023
@@ -73,29 +73,33 @@ func NewAPIServerHandler(manager cmanager.Manager, log logr.Logger, resolver Res

// CRUD endpoints (global objects)
ws.Route(ws.POST("/api/v1/{resource}").Consumes(runtime.ContentTypeProtobuf).To(apiServer.apiV1Create))
ws.Route(ws.GET("/api/v1/{resource}").To(apiServer.apiV1List))
ws.Route(ws.GET("/api/v1/{resource}").If(isList).To(apiServer.apiV1List))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Route handling for Watch and List this way seems more natural and easy to follow this way IMO.

// TODO: (killianmuldoon) Understand if setting this twice is necessary.
// Required to override default beforeUpdate behaviour
// that prevent changes to automatically managed fields.
obj.SetDeletionTimestamp(&now)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-adding this is not necessary - must be a leftover from older behaviour of the beforeUpdate function.

@killianmuldoon
Copy link
Contributor Author

/retest

Flake caused by github not being reachable.

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

/hold
Let's give others some time to review

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 21, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 21, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c9d9f122b6e1442ae1eaf635e5cf0b831a5bf1a7

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 21, 2023
@fabriziopandini
Copy link
Member

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 21, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [fabriziopandini,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit a362a02 into kubernetes-sigs:main Jun 21, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 21, 2023
@killianmuldoon
Copy link
Contributor Author

/area provider/infrastructure-in-memory

@k8s-ci-robot k8s-ci-robot added the area/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/infrastructure-in-memory Issues or PRs related to the in-memory infrastructure provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants