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(RELEASE-1387): use trusted artifacts #784

Open
wants to merge 21 commits into
base: development
Choose a base branch
from

Conversation

scoheb
Copy link
Collaborator

@scoheb scoheb commented Jan 23, 2025

Describe your changes

  • in an effort to move away from PVCs, we are trying
    trusted artifacts based on https://github.com/konflux-ci/build-trusted-artifacts/tree/main
  • tasks that have been updated now support 2 modes:
    • PVC based workspaces
    • Trusted artifacts with emptyDir workspaces
  • CI changes:
    • it now attempts to detect if a Trusted Artifacts based task has been changes and runs the tests with trusted artifacts enabled.
    • tests now create a on-local-cluster registry.

requires konflux-ci/release-service@c92d422 for use on real clusters

Relevant Jira

Checklist before requesting a review

  • I have marked as draft or added do not merge label if there's a dependency PR
    • If you want reviews on your draft PR, you can add reviewers or add the release-service-maintainers handle if you are unsure who to tag
  • My commit message includes Signed-off-by: My name <email>
  • I have bumped the task/pipeline version string and updated changelog in the relevant README
  • I read CONTRIBUTING.MD and commit formatting

Copy link

openshift-ci bot commented Jan 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@scoheb scoheb force-pushed the use-trusted-artifacts branch 28 times, most recently from c5831b5 to 92310a3 Compare January 28, 2025 18:28
@scoheb scoheb changed the title feat(RELEASE-1291): use trusted artifacts feat(RELEASE-1387): use trusted artifacts Feb 4, 2025
@scoheb scoheb force-pushed the use-trusted-artifacts branch 4 times, most recently from 4adff68 to 8779560 Compare February 12, 2025 01:35
@scoheb scoheb force-pushed the use-trusted-artifacts branch from 8779560 to 09144e8 Compare February 18, 2025 01:28
| sourceDataArtifact | Location of trusted artifacts to be used to populate data directory | No | - |
| subdirectory | Subdirectory inside the workspace to be used | No | - |

## Changes in 1.10.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this definitely warrants going to 2.0.0

| snapshotPath | Path to the JSON string of the Snapshot spec in the config workspace to apply the mapping to | No | - |
| dataPath | Path to the JSON string of the merged data to use in the data workspace | No | - |
| failOnEmptyResult | Fail the task if the resulting snapshot contains zero components | Yes | false |
| ociStorage | The OCI repository where the Trusted Artifacts are stored. | No | - |
Copy link
Collaborator

Choose a reason for hiding this comment

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

This and line 34 are the only ones with . at the end. Probably don't need it

- name: subdirectory
description: Subdirectory inside the workspace to be used
type: string
default: ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

The README says this isn't optional and has no default

#!/usr/bin/env bash
set -eo pipefail

if [ "$(params.ociStorage)" == "empty" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should empty be the default for this parameter then?

@@ -353,3 +391,29 @@ spec:
"${SNAPSHOT_SPEC_FILE}" > /tmp/temp && mv /tmp/temp "${SNAPSHOT_SPEC_FILE}"
fi
done
- name: create-trusted-artifact
Copy link
Collaborator

Choose a reason for hiding this comment

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

The first step says we will skip trusted-artifacts steps if the param is empty, but I don't see any when condition on this step. Is that intended?

@@ -54,40 +68,98 @@ spec:
]
}
EOF
- name: skip-trusted-artifact-operations
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these steps here? They look the same as the one added in the task

- in an effort to move away from PVCs, we are trying
  trusted artifacts.
- this PR makes the following changes:
  - PipelineRun uses an EmptyDir now for the workspace
  - the subDirectory parameter is removed
  - the data path is now saved as an artifact in quay
  - the check-result task then uses it for testing
  - a local registry is installed on the cluster under test
    in order to create and use trusted artifacts during testing
- If we go ahead with this, then we would create a new task
  called `collect-data-oci-ta` alongside `collect-data`
  and gradually build up new `-oci-ta` pipelines.

Signed-off-by: Scott Hebert <[email protected]>
Signed-off-by: Scott Hebert <[email protected]>
- 1 run as PVC based
- 1 run as Trusted Artifacts based if found

Signed-off-by: Scott Hebert <[email protected]>
- remove DEBUG env vars

Signed-off-by: Scott Hebert <[email protected]>
@scoheb scoheb force-pushed the use-trusted-artifacts branch from 09144e8 to 6bef15b Compare February 19, 2025 18:37
@konflux-ci-qe-bot
Copy link

@scoheb: The following test has Failed, say /retest to rerun failed tests.

PipelineRun Name Status Rerun command Build Log Test Log
konflux-e2e-tests-catalog-ljnwv Failed /retest View Pipeline Log View Test Logs

Inspecting Test Artifacts

To inspect your test artifacts, follow these steps:

  1. Install ORAS (see the ORAS installation guide).
  2. Download artifacts with the following commands:
mkdir -p oras-artifacts
cd oras-artifacts
oras pull quay.io/konflux-test-storage/konflux-team/release-service-catalog:konflux-e2e-tests-catalog-ljnwv

Test results analysis

🚨 Error occurred while running the E2E tests, list of failed Spec(s):

➡️ [failed] [It] [release-pipelines-suite [HACBS-1571]test-release-e2e-push-image-to-pyxis] Post-release verification verifies a release PipelineRun is started and succeeded in managed namespace [release-pipelines, pushPyxis]

Click to view logs

Error when waiting for a release pipelinerun for release push-pyxis-dnud-tenant/snapshot-sample-jszf-xfb6h to finish
Expected success, but got an error:
    <*errors.errorString | 0xc001597d60>: 
    Pipelinerun 'managed-fbl8j' didn't succeed
    
    {
        s: "Pipelinerun 'managed-fbl8j' didn't succeed\n",
    }

➡️ [failed] [It] [release-pipelines-suite FBC e2e-tests] with FBC happy path Post-release verification verifies the fbc release pipelinerun is running and succeeds [release-pipelines, fbc-tests, fbcHappyPath]

Click to view logs

PipelineRun managed-b4twn failed
Expected
    : Pipelinerun 'managed-b4twn' didn't succeed\n
to equal
    : 

➡️ [failed] [It] [release-pipelines-suite e2e tests for rhtap-service-push pipeline] Rhtap-service-push happy path Post-release verification verifies the rhtap release pipelinerun is running and succeeds [release-pipelines, rhtap-service-push, RhtapServicePush]

Click to view logs

PipelineRun managed-fknn4 failed
Expected
    : Pipelinerun 'managed-fknn4' didn't succeed\n
to equal
    : 

➡️ [failed] [It] [release-pipelines-suite e2e tests for rh-push-to-redhat-io pipeline] Rh-push-to-redhat-io happy path Post-release verification verifies the rhio release pipelinerun is running and succeeds [release-pipelines, rh-push-to-redhat-io, PushToRedhatIO]

Click to view logs

PipelineRun managed-dmhk9 failed
Expected
    : Pipelinerun 'managed-dmhk9' didn't succeed\n
to equal
    : 

➡️ [failed] [It] [release-pipelines-suite e2e tests for multi arch with rh-advisories pipeline] Multi arch test happy path Post-release verification verifies the multiarch release pipelinerun is running and succeeds [release-pipelines, multiarch-advisories, multiArchAdvisories]

Click to view logs

PipelineRun managed-hv6zz failed
Expected
    : Pipelinerun 'managed-hv6zz' didn't succeed\n
to equal
    : 

➡️ [failed] [It] [release-pipelines-suite e2e tests for rh-advisories pipeline] Rh-advisories happy path Post-release verification verifies the advs release pipelinerun is running and succeeds [release-pipelines, rh-advisories, rhAdvisories]

Click to view logs

PipelineRun managed-g4cp2 failed
Expected
    : Pipelinerun 'managed-g4cp2' didn't succeed\n
to equal
    : 

➡️ [failed] [It] [release-pipelines-suite Push to external registry] Post-release verification verifies that Release PipelineRun should eventually succeed [release-pipelines, push-to-external-registry]

Click to view logs

Error when waiting for a release pipelinerun for release ex-registry-liiu-tenant/snapshot-sample-gwvk-94m8h to finish
Expected success, but got an error:
    <*errors.errorString | 0xc000ef5c00>: 
    Pipelinerun 'managed-cphc8' didn't succeed
    
    {
        s: "Pipelinerun 'managed-cphc8' didn't succeed\n",
    }

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.

4 participants