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

Missing version tags for images #456

Open
ac-miller opened this issue Mar 21, 2024 · 8 comments
Open

Missing version tags for images #456

ac-miller opened this issue Mar 21, 2024 · 8 comments
Labels
triage/accepted Issues which should be fixed (post-triage)

Comments

@ac-miller
Copy link

Expected Behavior

Related to knative/eventing#5574
When pulling this image, it is expected to see semver tags (or some other versioning)
gcr.io/knative-releases/knative.dev/pkg/apiextensions/storageversion/cmd/migrate

Actual Behavior

There are no versions, only "latest"

Steps to Reproduce the Problem

  1. Attempt to pull an image

Additional Info

@dprotaso
Copy link
Member

dprotaso commented Mar 27, 2024

pkg is a library repo - I don't believe it has images. I'm going to close this out since the eventing repo has an issue already

@dprotaso dprotaso reopened this Mar 27, 2024
@dprotaso
Copy link
Member

Actually what's interesting is each repo (serving,eventing) will build their own storageversion/cmd/migrate - and upload to the same image registry location.

Not sure what the best thing to here.

@asr2003
Copy link

asr2003 commented Jun 10, 2024

@dprotaso I think it can be better handled by using semantic-release versioning tool which automates the whole package release workflow including: determining the next version number, generating the release notes, and publishing the package.
We can update the build pipeline to automatically tag images with the appropriate version.

@dprotaso
Copy link
Member

It's not the versioning number or the release tool. It's that both eventing and serving when performing a release will build the same image and upload it to the same registry repo.

Even when we tag it we'll get one overwritting the other.

@dprotaso dprotaso transferred this issue from knative/pkg Jun 10, 2024
@dprotaso
Copy link
Member

Moving this to test/infra cause I'm not sure what's the best thing to do here. We could just start tagging the image.

@dprotaso dprotaso added the triage/accepted Issues which should be fixed (post-triage) label Jun 10, 2024
@dprotaso
Copy link
Member

Alternatively we could refactor the logic out of the main method here into a function and call those in respective repos (serving, eventing)

https://github.com/knative/pkg/blob/main/apiextensions/storageversion/cmd/migrate/main.go

@asr2003
Copy link

asr2003 commented Jun 11, 2024

@dprotaso For Approach1 that images are uniquely tagged to prevent overwriting. Can we have a reusable action something like this?

on:
  workflow_call:
    inputs:
      docker-image-name:
        description: 'Docker image name'
        required: true
        type: string
      repo-name:
        description: 'Repository name'
        required: true
        type: string

And we can update the serving/eventing workflow like this:

name: Build and Release

on:
  pull_request:
    branches: [ 'main', 'release-*' ]

jobs:
  build-and-release:
    uses: knative/actions/.github/workflows/reusable-go-build.yaml@main
    with:
      docker-image-name: "knative.dev/pkg/apiextensions/storageversion/cmd/migrate"
      repo-name: "serving/eventing"

@asr2003
Copy link

asr2003 commented Jun 13, 2024

@dprotaso Any guidance on my approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

3 participants