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

feat: introduce content manifest with content sets #1771

Merged
merged 6 commits into from
Dec 20, 2024
Merged

Conversation

ralphbean
Copy link
Member

@ralphbean ralphbean commented Dec 19, 2024

For backwards compatibility with image scanners that still expect https://raw.githubusercontent.com/containerbuildsystem/atomic-reactor/master/atomic_reactor/schemas/content_manifest.json

Looking forward, clair and other scanners are going to adapt to start reading the content sets from the dnf database and later from our sboms - but they're not ready for that yet. Add this file to support them while they migrate.

See also containerbuildsystem/atomic-reactor#2140

https://issues.redhat.com/browse/KONFLUX-6200

@ralphbean ralphbean requested a review from a team as a code owner December 19, 2024 21:46
@ralphbean ralphbean force-pushed the content_sets_json branch 6 times, most recently from fac3ea4 to b837471 Compare December 19, 2024 23:12
@ralphbean
Copy link
Member Author

ralphbean commented Dec 19, 2024

I thought this change would be simple at first, but the complexity is growing.

  • We still need to transform ubi repo ids into rhel repo ids, because ubi is intentionally absent from the repository to cpe mapping.
    • Ok, discussed with Rogue, we're going to start adding those ubi repos to the repository-to-cpe mapping so that third party scanners don't need a translation.
  • Consider if we want to try to apply an archful translation for archless repo ids.
    • This doesn't seem to be necessary.
  • Get the task size back down. The current state of this change made the task larger than the limit that tekton can handle.
    • I think I got it! In any case, the bug is fixed in upstream tekton and should be available in our environments soon.

ralphbean added a commit to konflux-ci/build-tasks-dockerfiles that referenced this pull request Dec 20, 2024
For backwards compatibility with scanners that still expect to find this
file.

Related: konflux-ci/build-definitions#1771
@ralphbean ralphbean force-pushed the content_sets_json branch 3 times, most recently from c74316d to 3f304e5 Compare December 20, 2024 15:37
Copy link
Contributor

@brianwcook brianwcook left a comment

Choose a reason for hiding this comment

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

this all looks good to me 👍 with the exception that it is referencing an image in your personal quay repo.

@ralphbean
Copy link
Member Author

Thanks, the image is now updated with quay.io/konflux-ci/icm-injection-scripts

arewm
arewm previously approved these changes Dec 20, 2024
@ralphbean ralphbean enabled auto-merge December 20, 2024 18:47
@ralphbean
Copy link
Member Author

There was an e2e test failure here, but it looks unrelated.

[e2e-tests : e2e-test]   [FAIL] [build-service-suite Build templates E2E test] HACBS pipelines [It] should eventually finish successfully for component with Git source URL https://github.com/konflux-qe-bd/fbc-sample-repo and Pipeline fbc-builder [build, build-templates, HACBS, pipeline, build-templates-e2e, source-build-e2e]

That's a failure in the fbc pipeline which doesn't use the buildah task(s) being changed here.

@arewm
Copy link
Member

arewm commented Dec 20, 2024

The FBC pipeline issue could be legitimate. Its e2e tests now utilize the local operating mode for the buildah-remote-oci-ta task.

@arewm
Copy link
Member

arewm commented Dec 20, 2024

/konflux-e2e/tests/build/build_templates.go:337
  PipelineRun test-comp-owtz-on-pull-request-ff55p reason: CouldntGetTask
  attempt 1/3: PipelineRun "test-comp-owtz-on-pull-request-ff55p" failed:   [FAILED] in [It] - /konflux-e2e/tests/build/build_templates.go:341 @ 12/20/24 18:51:02.014
• [FAILED] [1.554 seconds]
[build-service-suite Build templates E2E test] HACBS pipelines [It] should eventually finish successfully for component with Git source URL https://github.com/konflux-qe-bd/fbc-sample-repo and Pipeline fbc-builder [build, build-templates, HACBS, pipeline, build-templates-e2e, source-build-e2e]
/konflux-e2e/tests/build/build_templates.go:337

  [FAILED] Expected success, but got an error:
      <*errors.errorString | 0xc000f021b0>: 
      failed to delete PipelineRun "test-comp-owtz-on-pull-request-ff55p" from "build-templates-e2e" namespace with error: pipelineruns.tekton.dev "test-comp-owtz-on-pull-request-ff55p" not found
      {
          s: "failed to delete PipelineRun \"test-comp-owtz-on-pull-request-ff55p\" from \"build-templates-e2e\" namespace with error: pipelineruns.tekton.dev \"test-comp-owtz-on-pull-request-ff55p\" not found",
      }
  In [It] at: /konflux-e2e/tests/build/build_templates.go:341 @ 12/20/24 18:51:02.014

That maps to https://github.com/konflux-qe-bd/fbc-sample-repo/pull/2792/checks?check_run_id=34724758501 which is a failure case of tektoncd/pipeline#8388

We need to deploy a new version of Tekton to resolve this issue. I think that that is planned on Monday with redhat-appstudio/infra-deployments#5201.

@ralphbean
Copy link
Member Author

Good catch, thank you!

@ralphbean ralphbean added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit ba97465 Dec 20, 2024
16 checks passed
@ralphbean ralphbean deleted the content_sets_json branch December 20, 2024 20:37
@@ -487,16 +492,19 @@ spec:
mountPath: /mnt/trusted-ca
readOnly: true
workingDir: $(workspaces.source.path)

- name: icm
image: quay.io/konflux-ci/icm-injection-scripts:latest@sha256:462980e94ba689b5f56c3d5dfb3358cd8c685300daf65a71532f11898935e7f1
Copy link
Contributor

Choose a reason for hiding this comment

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

Two questions:

  • Where is the source code to this thing?
  • Why is the container image missing standard metadata to describe its sources? (Its "org.opencontainers.image.url": "https://fedoraproject.org/" is apparently inherited from Fedora 40)

Copy link
Contributor

Choose a reason for hiding this comment

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

answering the first part of my own question by searching github, looks like it's in https://github.com/konflux-ci/build-tasks-dockerfiles/tree/main/icm-injection-scripts

Copy link
Member

Choose a reason for hiding this comment

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

The answer to the second part is that the labels are not overwritten in the Containerfile: https://github.com/konflux-ci/build-tasks-dockerfiles/blob/main/icm-injection-scripts/Containerfile#L7

The fact that they persisted to this image means that they were also not overwritten in the parent images, i.e. https://github.com/konflux-ci/buildah-container/blob/main/Containerfile.task and https://github.com/konflux-ci/buildah-container/blob/main/Containerfile.buildah

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