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

Switch the default SBOM type to SPDX #1865

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

chmeliik
Copy link
Contributor

Bump the versions of all SBOM-related tasks

  • For SBOM producers (prefetch-dependencies, build tasks), this is to mark a breaking change - the "sbom type" parameter now defaults to SPDX
  • For SBOM consumers (source-build, deprecated-image-check), this simply marks them as SPDX ready (mainly to make the MIGRATION.md files saner - checking if your task is the right version is much easier than checking if the sha256 digest of your task is new enough)

To minimize disruption, users have to upgrade all the SBOM-related tasks at the same time. This is why these changes need to be done in a single PR, so that all the updates are built and released together and then proposed all at once by Renovate/Mintmaker

@chmeliik
Copy link
Contributor Author

/ok-to-test

I sure hope e2e-tests will work with SPDX 🙏

@chmeliik
Copy link
Contributor Author

chmeliik commented Jan 28, 2025

Missing task updates:

@chmeliik
Copy link
Contributor Author

/retest

1 similar comment
@chmeliik
Copy link
Contributor Author

/retest

@chmeliik
Copy link
Contributor Author

/test build-definitions-pull-request

@chmeliik
Copy link
Contributor Author

As reflected in the prefetch task's MIGRATION.md doc, some of the more niche build tasks are still not SPDX ready, mainly:

But I don't think we should let that block us, because

  1. Their user base is small
  2. The impact shouldn't be much worse than a failing Mintmaker PR when it bumps the prefetch task to 0.2 without a corresponding update to the build task

@chmeliik
Copy link
Contributor Author

Rebased and "re-boostrapped" new task versions

@chmeliik
Copy link
Contributor Author

rebased, re-bootstrapped

@@ -3,7 +3,7 @@ apiVersion: tekton.dev/v1
kind: Task
metadata:
labels:
app.kubernetes.io/version: "0.3"
app.kubernetes.io/version: "0.5"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm little confused here, the Migration MR says migration from 0.4 to 0.5 but this differs. Looks like it was forgotten to increment a version to 0.4. Jut to be aware of this fact.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the 0.4 of this task had app.kubernetes.io/version: "0.3"

jsztuka
jsztuka previously approved these changes Jan 30, 2025
Copy link
Contributor

@jsztuka jsztuka left a comment

Choose a reason for hiding this comment

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

lgtm

ralphbean
ralphbean previously approved these changes Jan 30, 2025
mmorhun
mmorhun previously approved these changes Jan 30, 2025
@chmeliik
Copy link
Contributor Author

Waiting with merging until we're sure that all consumers are SPDX ready (discussing internally on Slack)

Prepare new versions of SBOM-related tasks as follows:

    new_ver() {
        local task=$1
        local v1=$2
        local v2=$3

        for task in $task ${task}-oci-ta; do
            if [ ! -e $task ]; then
                continue
            fi

            cp -r $task/$v1/. $task/$v2

            if [ -e $task/$v2/recipe.yaml ]; then
                sed -E "s;base:(.*)$v1;base:\1$v2;" \
                    -i $task/$v2/recipe.yaml
            fi

            if [ -e $task/$v2/MIGRATION.md ]; then
                rm $task/$v2/MIGRATION.md
            fi
        done
    }

    new_ver task/prefetch-dependencies 0.1 0.2
    new_ver task/buildah 0.3 0.4
    new_ver task/buildah-remote 0.3 0.4
    new_ver task/oci-copy 0.1 0.2
    new_ver task/source-build 0.1 0.2
    new_ver task/deprecated-image-check 0.4 0.5

That is:
* copy to new version-specific directories
* fix the base task path in recipe.yaml files
* drop the version-specific migration docs

More version-specific changes (the actual changes in functionality,
MIGRATION.md files) will be done in separate commits to make them
review-able.

Signed-off-by: Adam Cmiel <[email protected]>
Version 0.4 was created in a previous commit by copying from 0.3. Make
sure the task generator will handle 0.4 going forward.

Signed-off-by: Adam Cmiel <[email protected]>
There are no breaking changes in this version, the version simply marks
the addition of SPDX support. Just bump the version label and add a
MIGRATION.md explaining that no migration is needed.

Signed-off-by: Adam Cmiel <[email protected]>
There are no breaking changes in this version, the version simply marks
the addition of SPDX support. Just bump the version label and add a
MIGRATION.md explaining that no migration is needed.

Signed-off-by: Adam Cmiel <[email protected]>
Switch the default SBOM format to SPDX.

Bump the version label, add the MIGRATION.md file.

Signed-off-by: Adam Cmiel <[email protected]>
Switch the default SBOM format to SPDX.

Bump the version label, add the MIGRATION.md file.

Signed-off-by: Adam Cmiel <[email protected]>
Switch the default SBOM format to SPDX.

Bump the version label, add the MIGRATION.md file.

Signed-off-by: Adam Cmiel <[email protected]>
@chmeliik chmeliik dismissed stale reviews from mmorhun, ralphbean, and jsztuka via b2b8df7 January 31, 2025 11:41
@chmeliik
Copy link
Contributor Author

Re-based, re-bootstrapped (to pick up latest changes in the prefetch task)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants