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

Refactor krel obs specs command #3079

Merged
merged 3 commits into from May 25, 2023
Merged

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented May 23, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

krel obs specs command was initially implemented as a clone of kubepkg for the proof-of-concept purposes. Given that, there are some issues:

  • kubepkg was created with an idea to support both building specs and running the build process. Running the build process is not needed with the OBS workflow because OBS is taking care of that
  • kubepkg was supporting both Deb and RPM packages/specs, but Deb packages/specs are now autogenerated on build time with debbuild in the OBS pipeline
  • We want to fetch artifacts/binaries from GCS instead via HTTPS to be able to run krel obs specs from krel stage (before binaries are available on dl.k8s.io)
  • We want krel obs specs to be universal and reusable, i.e. that any Kubernetes subproject can use this tool

The idea behind this subcommand was presented on SIG Release meeting held on 2023-05-23.

This PR refactors the krel obs specs subcommand to accomplish goals stated above. Significant changes include:

  • krel obs specs now works with a single package instead of multiple packages. There's going to be a wrapper on top of this command (krel obs stage) that's going to support multiple packages and work with OBS
  • Dependencies and artifacts source URLs are defined in a metadata manifest (cmd/krel/templates/latest/metadata.yaml). Previously, those information was stored inside the kubepkg (krel) code. This change improves the reusability of krel obs specs outside the core Kubernetes context
  • Code base is simplified by dropping redundant code, removing mentions of package building, deduplicating code by using release-sdk...

The end goal is to have a workflow similar to image promotion, but that's a long-term goal that's out of scope for alpha and beta stages.

Which issue(s) this PR fixes:

Fixes #3049

Special notes for your reviewer:

Does this PR introduce a user-facing change?

`krel obs specs` command is refactored to better support OpenBuildService (OBS) workflow

/assign @saschagrunert @cpanato
cc @kubernetes/release-engineering

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 23, 2023
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 23, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels May 23, 2023
@k8s-ci-robot k8s-ci-robot requested a review from jrsapi May 23, 2023 22:23
@k8s-ci-robot k8s-ci-robot added the area/release-eng Issues or PRs related to the Release Engineering subproject label May 23, 2023
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 23, 2023
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Let's fix the CI and iterate on this, great work!

pkg/obs/metadata/metadata.go Outdated Show resolved Hide resolved
@saschagrunert
Copy link
Member

I assume we don't break anything existing with that change, correct?

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
@xmudrii
Copy link
Member Author

xmudrii commented May 24, 2023

I assume we don't break anything existing with that change, correct?

That's correct, this command is not used at all currently.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@saschagrunert
Copy link
Member

/test pull-release-test

@k8s-ci-robot k8s-ci-robot merged commit e4e2f48 into kubernetes:master May 25, 2023
8 of 9 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone May 25, 2023
@xmudrii xmudrii deleted the krel-obs-specs branch May 25, 2023 12:05
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/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package specs generator: download binaries from bucket
4 participants