Skip to content

Conversation

@SimonTheLeg
Copy link
Contributor

@SimonTheLeg SimonTheLeg commented Nov 19, 2025

This PR updates our rebase docs to be more consistent by using variables allowing for copy-paste commands as well as updating our section on the monorepo.

Summary

What Type of PR Is This?

/kind documentation

Related Issue(s)

Fixes #

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Nov 19, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign scheeles for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

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

@kcp-ci-bot kcp-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2025
On-behalf-of: SAP <[email protected]>
Signed-off-by: Simon Bein <[email protected]>
@SimonTheLeg SimonTheLeg changed the title wip: update rebase docs to reflect monorepo update rebase docs to reflect monorepo Nov 20, 2025
@kcp-ci-bot kcp-ci-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2025
@SimonTheLeg
Copy link
Contributor Author

/hold want to collect input from multiple reviewers

@kcp-ci-bot kcp-ci-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2025
@ntnn
Copy link
Member

ntnn commented Dec 1, 2025

/assign

# 4. Update kcp-dev/kubernetes
## Terminology
2. If there were any substantive changes, make the corresponding edits to our generators.
Copy link
Member

Choose a reason for hiding this comment

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

We could mention here that vlidation-gen is not applicable because it generates validation code for core types and isn't usable for custom resources at the moment.
Just to avoid confusing someone new whos never looked at the code-gen stuff.

Comment on lines +63 to +65
### 2.5 Get it merged
Create your PR, check that CI is passing and get it merged. It is paramount that you do not start with the next step in this guide until your PR is merged!
Copy link
Member

Choose a reason for hiding this comment

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

I disagree. I think it's more important to verify that everything is working before making these PRs because if something doesn't work you'll need to setup local redirects for everything anyhow and you'll end up with multiple PRs in kcp-dev/kcp to fix what broke.
Additionally since this applies to the monorepo it might even break things for other developers because the rebase is incomplete.

Copy link
Member

Choose a reason for hiding this comment

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

For that reason I modified pin-dependency to support local paths, so the kubernetes fork can point to the local versions (that being said the commit adding this functionality must be cherry-picked in the kube fork before using it to point to the local versions^^)

Comment on lines +186 to +199
- Check the changes with `list_changed_files` and `view_changed_files`
(see above).

TODO @ntnn Let's discuss how/if we want to put in these two paragraphs
```txt
If a commit applied clean and `list_changed_files` shows no output, you
can move on to the next commit because there were no changes to the
files that commit touched between the two kube versions.
Additionally `view_changed_files` only shows the changes of the
currently cherry-picked commit to files that were changed between the
two kube versions.
```
Copy link
Member

Choose a reason for hiding this comment

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

list_changed_files and view_changed_files are working off of the premise that the rebaser is cherry-picking the commits one by one.
I don't think this works with an interactive --onto rebase. The problem with the direct rebase is that it assumes that when a patch applied clean that it's fine and moves to the next commit until a commit doesn't apply cleanly.

The thing with the rebase though is that its possible that a function that was modified by us was changed upstream without interfering with our patch.

E.g. I remember that in one file an informer was wrapped in an upstream change and the patch applied clean but that lead to a failure because our patch used the unwrapped informer.
For these cases it makes it vastly easier to cherry-pick one by one and to inspect the changes using those function to see if there was anything changed at all.


This can delete the `zz_generated.validations.go` - this is expected
as we drop the validation-gen generator. See
<https://github.com/kcp-dev/kcp/issues/3562a> for details.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<https://github.com/kcp-dev/kcp/issues/3562a> for details.
<https://github.com/kcp-dev/kcp/issues/3562> for details.

-exec sed -e "/k8s.io/ s#v$NEW_VERSION0#v0.0.0#" -i "{}" \;
```

TODO @ntnn: I think the previous update vendor step already does this. But I was not sure if it is safe to run the sed before running update-codegen. Wdyt?
Copy link
Member

Choose a reason for hiding this comment

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

Could be I think the codegen might also fiddle with it? Could leave a comment that it might not be needed and to remove it in future versions of the document.

Comment on lines +286 to +290
```sh
# Change KUBE per your local setup
KUBE=../../../go/src/k8s.io/kubernetes
gsed -i "s,k8s.io/\(.*\) => .*/kubernetes/.*,k8s.io/\1 => $KUBE/vendor/k8s.io/\1,;s,k8s.io/kubernetes => .*,k8s.io/kubernetes => $KUBE," go.mod
```
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth to update the bump-k8s.sh script to support both remote and local rewrites?

7. Keep iterating to get all the code to compile
8. Get the `lint` and `test` make targets to pass
9. Get the `e2e-*` make targets to pass.
9. Get the `test-e2e` make targets to pass.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
9. Get the `test-e2e` make targets to pass.
9. Get the `test-integration` make target to pass
10. Get the `test-e2e` make target to pass.

@ntnn ntnn mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/documentation Categorizes issue or PR as related to documentation. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants