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

Use productized syft #870

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

Conversation

chmeliik
Copy link
Contributor

Before you complete this pull request ...

Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.

@@ -257,7 +257,7 @@ spec:
workingDir: $(workspaces.source.path)

- name: sbom-syft-generate
image: quay.io/redhat-appstudio/syft:v0.105.0@sha256:32a9d2007f2b042ceec4ef32fa1d90b8d28141822e7d9748f240da9d55c56601
image: registry.redhat.io/rh-syft-tech-preview/syft-rhel9:0.105.0@sha256:8d34c03188cf294a77339b2a733b1f6811263a369b309e6b170d9b489abc0334
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I will first need to fix the tasks to use Syft the same way as buildah-rhtap

Otherwise, they fail on missing find

/tekton/scripts/script-1-cbxrs: line 4: find: command not found

Copy link
Contributor Author

@chmeliik chmeliik Mar 12, 2024

Choose a reason for hiding this comment

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

I gave up, buildah-remote (its generation script, more accurately) makes that too difficult. Just moved the find call to a different step.

@chmeliik
Copy link
Contributor Author


  [FAILED] Unexpected error:
      <*errors.StatusError | 0xc000a9efa0>: 
      componentdetectionqueries.appstudio.redhat.com "test-comp-jaes" already exists
      {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "componentdetectionqueries.appstudio.redhat.com \"test-comp-jaes\" already exists",
              Reason: "AlreadyExists",
              Details: {
                  Name: "test-comp-jaes",
                  Group: "appstudio.redhat.com",
                  Kind: "componentdetectionqueries",
                  UID: "",
                  Causes: nil,
                  RetryAfterSeconds: 0,
              },
              Code: 409,
          },
      }
  occurred
  In [BeforeAll] at: /github.com/redhat-appstudio/e2e-tests/tests/build/build_templates.go:96 @ 03/12/24 12:43:31.412

no idea
/retest

@chmeliik
Copy link
Contributor Author

Rebased

@brunoapimentel
Copy link
Contributor

So, I tried to test the docker-build pipeline in my local cluster and I'm getting:

step-remove-symlinks
find: '/var/lib/containers/storage/vfs/dir/a2ad955aa32d9f6dd4f9e26e197da732b4a8f3ebd232e9fadb87a223c5aba919': No such file or directory

Apparently, mounting the varlibcontainers in the remove-symlink steps solves it.

@chmeliik
Copy link
Contributor Author

So, I tried to test the docker-build pipeline in my local cluster and I'm getting:

step-remove-symlinks
find: '/var/lib/containers/storage/vfs/dir/a2ad955aa32d9f6dd4f9e26e197da732b4a8f3ebd232e9fadb87a223c5aba919': No such file or directory

Apparently, mounting the varlibcontainers in the remove-symlink steps solves it.

Ah, right. Nice catch 👍

@chmeliik
Copy link
Contributor Author

/retest

1 similar comment
@chmeliik
Copy link
Contributor Author

/retest

@chmeliik
Copy link
Contributor Author

Error: could not push image to registry as "quay.io/redhat-appstudio-tekton-catalog/pull-request-builds:core-services-docker-build-latest": GET https://quay.io:443/v2/redhat-appstudio-tekton-catalog/pull-request-builds/blobs/uploads/: unexpected status code 405 Method Not Allowed: <!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>

Come on Quay

/retest

@chmeliik chmeliik force-pushed the use-productized-syft branch 3 times, most recently from 64520de to 2c9df2f Compare March 15, 2024 07:42
@mkosiarc mkosiarc self-requested a review March 15, 2024 09:35
@chmeliik
Copy link
Contributor Author

• [FAILED] [4.408 seconds]
[build-service-suite Build templates E2E test] HACBS pipelines build-definitions ec pipelines [It] runs ec pipeline pipelines/enterprise-contract.yaml [build, build-templates, HACBS, pipeline, build-templates-e2e]
/github.com/redhat-appstudio/e2e-tests/tests/build/build_templates.go:550

  Timeline >>
  PipelineRun retrodep-upgg-95vqh reason: Succeeded
  Creating Pipeline "ec-integration-test-scenario-run-fdt2t"
  Waiting for pipeline "ec-integration-test-scenario-run-fdt2t" to finish
  [FAILED] in [It] - /github.com/redhat-appstudio/e2e-tests/tests/build/build_templates.go:581 @ 03/15/24 09:58:51.172
  << Timeline

  [FAILED] Unexpected error:
      <*errors.errorString | 0xc000d8cb60>: 
      task with verify name doesn't exist in ec-integration-test-scenario-run-fdt2t pipelinerun
      {
          s: "task with verify name doesn't exist in ec-integration-test-scenario-run-fdt2t pipelinerun",
      }
  occurred
  In [It] at: /github.com/redhat-appstudio/e2e-tests/tests/build/build_templates.go:581 @ 03/15/24 09:58:51.172

why

how

/retest
/pray
/sacrifice-a-goat

@chmeliik
Copy link
Contributor Author

/retest

I mean it

@chmeliik
Copy link
Contributor Author

chmeliik commented Mar 15, 2024

  container step-appstudio-summary: 

  Build Summary:

  Build repository: https://github.com/redhat-appstudio-qe/devfile-sample-python-basic?rev=7c630e200f40ba457ed508e7f6401d03fb50982d
  Generated Image is in : quay.io/redhat-user-workloads/build-templates-e2e/test-app-870/devfile-sample-python-basic-vsua:build-d26ba-1710497860

  End Summary
  PipelineRun devfile-sample-python-basic-vsua-j525r reason: Failed

But how

No entiendo

/retest

@chmeliik
Copy link
Contributor Author

/retest

@chmeliik
Copy link
Contributor Author

/retest

Tekton, I beg you
For the love of all that's holy
Do not fail this time

@chmeliik
Copy link
Contributor Author

Losing my mind here
Why take half an hour to attest
Die a slow death, Chains

/retest

@chmeliik
Copy link
Contributor Author

The test run is gone
My sadness yet increases
But hope is not lost

/retest

@chmeliik
Copy link
Contributor Author

componentdetectionqueries.appstudio.redhat.com "test-comp-hmlo" already exists

¯\_(ツ)_/¯

/retest

@chmeliik
Copy link
Contributor Author

/retest

Something is still killing the test after less than 2 hours even though I tried to bump the timeout 😕

@chmeliik
Copy link
Contributor Author

chmeliik commented Mar 18, 2024

The build pipelineRun (devfile-sample-python-basic-ebgn-c6fdw) failed but with no failure reason in the logs 🥲

/retest

@lcarva
Copy link
Contributor

lcarva commented Mar 18, 2024

The build pipelineRun (devfile-sample-python-basic-ebgn-c6fdw) failed but with no failure reason in the logs 🥲

from tekton results:

clamav-scan

status:
  completionTime: "2024-03-18T11:49:23Z"
  conditions:
    - lastTransitionTime: "2024-03-18T11:49:23Z"
      message: 'failed to create task run pod "devfile-sample-python-basic-ebgn-c6fdw-clamav-scan": translating TaskSpec to Pod: secrets "devfile-sample-python-basic-b1jt" not found. Maybe missing or invalid Task build-templates-e2e/'
      reason: PodCreationFailed
      status: "False"
      type: Succeeded

base-image-check

status:
  completionTime: "2024-03-18T11:49:23Z"
  conditions:
    - lastTransitionTime: "2024-03-18T11:49:23Z"
      message: 'failed to create task run pod "dev123043849dc5e7b4ad8d4de806402caf-deprecated-base-image-check": translating TaskSpec to Pod: secrets "devfile-sample-python-basic-b1jt" not found. Maybe missing or invalid Task build-templates-e2e/'
      reason: PodCreationFailed
      status: "False"
      type: Succeeded

build-source-image

status:
  completionTime: "2024-03-18T11:49:23Z"
  conditions:
    - lastTransitionTime: "2024-03-18T11:49:23Z"
      message: 'failed to create task run pod "devfile-sample-python-basic-ebgn-c6fdw-build-source-image": translating TaskSpec to Pod: secrets "devfile-sample-python-basic-b1jt" not found. Maybe missing or invalid Task build-templates-e2e/'
      reason: PodCreationFailed
      status: "False"
      type: Succeeded

@chmeliik
Copy link
Contributor Author

The build pipelineRun (devfile-sample-python-basic-ebgn-c6fdw) failed but with no failure reason in the logs 🥲

from tekton results:

Oh nice, I forgot I could get the logs for deleted PipelineRuns from tekton results

The errors still don't make a whole lot of sense to me though :/

@chmeliik
Copy link
Contributor Author

Timed out when waiting for attestation. Yup, 36 minutes and still nothing https://quay.io/repository/redhat-user-workloads/build-templates-e2e/test-app-870/devfile-sample-python-basic-jya7?tab=tags&tag=latest

@chmeliik
Copy link
Contributor Author

chmeliik commented Apr 4, 2024

Build pipeline timed out

/retest

We want to switch from the quay.io/redhat-appstudio/syft image to
registry.redhat.io/rh-syft-tech-preview/syft-rhel9. The new syft image
is built on ubi-micro and doesn't include the 'find' util. Delete the
symlinks already in the build step.

This is broken for buildah-remote, because the generation script (which
lives in the multi-platform-controller repo) does not handle this part
of the buildah script properly. To be fixed later.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
There are two reasons why the buildah-remote task cannot delete
container symlinks in the build step:

* the multi-platform-runner image does not include the 'find' util
* the script that generates buildah-remote from buildah doesn't handle
  changes to that part of the code, it's hardcoded

Move the command into a separate step in the buildah task in order to
fix the buildah-remote task.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
STONEBLD-2174

For consistency, use the same Syft image for the Konflux tasks and the
RHTAP tasks.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
All tasks now use the Syft image from registry.redhat.io.

Signed-off-by: Adam Cmiel <acmiel@redhat.com>
Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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.

None yet

5 participants