-
Notifications
You must be signed in to change notification settings - Fork 503
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
Introduce krel obs specs
command to generate specs and archives for Open Build Service
#2946
Conversation
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is my assumption correct that kubepkg
will be used to generate the files which can be directly consumed by OBS?
If so, then I think we should build something in parallel to the existing implementation by copying the re-usable code parts and deprecating kubepkg. I think the pkg/kubepkg
approach is right here, and we should avoid breaking existing CI solutions.
There are a bunch of locations where the tool, the spec files or documentation around it is already used in CI: https://cs.k8s.io/?q=kubepkg&i=nope&files=&excludeFiles=&repos=
pkg/kubepkg/fetcher.go
Outdated
return nil | ||
} | ||
|
||
func extractTarGz(gzipStream io.Reader, path string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this function is that it expects a file, but this function works directly with the response body without writing it to the disk. Is this a blocking comment or can I resolve it in a follow up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can surely follow-up on that.
Yes,
I was thinking about that but I wasn't sure. Let's do it that way then, I'll update the PR later today.
I'm not sure I fully understand this part. Do we want to leave |
We also have to
Thank you!
Yes, let's create a new package by copying the code. This way we can follow the KEP by building something in parallel. Maybe it's time to find a better name for it. I'd suggest that we use We can then use a krel subcommand like |
I was thinking about just committing them because request feature requires some manual interaction (AFAIK).
Sounds like a good plan to me! |
krel obs specs
command to generate specs and archives for Open Build Service
@saschagrunert Ready for another round of reviews. |
/test pull-release-test-canary |
4 similar comments
/test pull-release-test-canary |
/test pull-release-test-canary |
/test pull-release-test-canary |
/test pull-release-test-canary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just have a few things but let's iterate to be faster.
Thank you!
Feel free to lift when you're ready. |
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
c07cb9e
to
73a40bb
Compare
@saschagrunert Comments addressed, PTAL again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold for @saschagrunert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/unhold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, saschagrunert, xmudrii 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:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR is the first step for implementing KEP-1731 (kubernetes/enhancements#1731).
Introduction
This PR introduces a new subcommand in krel:
krel obs specs
. This command has two key responsibilities:We are intentionally introducing a new command instead of refactoring
kubepkg
becausekubepkg
is used in CI and refactoring it would break the CI.Differences compared to
kubepkg
krel obs specs
doesn't support Debian (.deb
) packageskrel obs specs
can work with Debian specs, but we are not going to maintain those specs any longer in favor of usingdebbuild
(as described in the KEP)krel obs specs
cannot build packages -- we're going to use OBS for thisWorkflow
The workflow is as follows:
krel obs specs
is going to collect information about packages that we need specs and archives forkrel obs specs
is going to generate specs based on given templateskrel obs specs
is going to download binaries for selected packages and architectures, then archive those with the maximum compressionExample usage
# Run from the `k/release` root krel obs specs --kubernetes-version v1.26.1
The command is going to print the output directory after finishing and you can examine that directory for correctness.
TODOs
We need to take care of the following tasks and I propose that we do that in follow up PRs:
Which issue(s) this PR fixes:
xref kubernetes/enhancements#1731
Does this PR introduce a user-facing change?
/assign @saschagrunert @cpanato @puerco
cc @kubernetes/release-engineering