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

Include tash in the Task bundle build #1039

Merged
merged 4 commits into from
Jun 12, 2024
Merged

Conversation

zregvart
Copy link
Member

This includes the tool to generate the Trusted Artifacts Task variants in the hack/build-and-push.sh script, now if the task has a recipe.yaml file within its directory the tool will be used to regenerate the Trusted Artifact Task from the base Task.

Fixes https://issues.redhat.com/browse/EC-650

Copy link
Contributor

@lcarva lcarva left a comment

Choose a reason for hiding this comment

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

This is great!

appstudio-utils/Dockerfile Outdated Show resolved Hide resolved
hack/build-and-push.sh Outdated Show resolved Hide resolved
task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Outdated Show resolved Hide resolved
task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Outdated Show resolved Hide resolved
task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Outdated Show resolved Hide resolved
task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Outdated Show resolved Hide resolved
task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Show resolved Hide resolved
@zregvart
Copy link
Member Author

Thanks for the suggestions I'll look into addressing them, other reviews welcome...

hack/build-and-push.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@chmeliik chmeliik left a comment

Choose a reason for hiding this comment

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

Nice, no more manual syncing of multiple versions of the same task 🎉

@zregvart
Copy link
Member Author

zregvart commented Jun 5, 2024

I think I addressed all the comments, please do have another look. Notable differences from the previous version:

  • TA variant generation is no longer part of hack/build-and-push.sh but done via hack/generate-ta-tasks.sh, there is now a new workflow to check if the files need to be regenerated
  • the Task YAML files are now tkn-fmt-ed, so diffing base tasks is best done by installing https://github.com/zregvart/tkn-fmt and doing something like diff <(tkn fmt task.yaml) task-oci-ta.yaml
  • YAML file comments are difficult to maintain, so the lazy option of ignoring them has been implemented (though this was the same in the previous version)

Copy link
Contributor

@chmeliik chmeliik left a comment

Choose a reason for hiding this comment

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

buildah-remote-oci-ta seems to be missing the recipe.yaml, otherwise LGTM 🌮

@chmeliik
Copy link
Contributor

buildah-remote-oci-ta seems to be missing the recipe.yaml, otherwise LGTM 🌮

Oh wait, that one is generated from buildah-oci-ta, isn't it

@zregvart
Copy link
Member Author

buildah-remote-oci-ta seems to be missing the recipe.yaml, otherwise LGTM 🌮

It is generated using hack/generate-buildah-remote.sh so that's why it is not there.

@zregvart
Copy link
Member Author

Looks like one of the e2e tests timed out:

Summarizing 1 Failure:
  [INTERRUPTED] [build-service-suite Build templates E2E test] HACBS pipelines [It] should eventually finish successfully for component with Git source URL https://github.com/cachito-testing/pip-e2e-test [build, build-templates, HACBS, pipeline, build-templates-e2e, source-build-e2e]
  /github.com/konflux-ci/e2e-tests/tests/build/build_templates.go:207

Ran 24 of 607 Specs in 2327.058 seconds
FAIL! - Interrupted by User -- 23 Passed | 1 Failed | 36 Pending | 547 Skipped
--- FAIL: TestE2E (2327.07s)
FAIL

/retest

@@ -16,43 +16,45 @@ spec:
When [Java dependency rebuild](https://redhat-appstudio.github.io/docs.stonesoup.io/Documentation/main/cli/proc_enabled_java_dependencies.html) is enabled it triggers rebuilds of Java artifacts.
Copy link
Contributor

Choose a reason for hiding this comment

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

This code is now generated from two different places, as the remote task generation is expecting to generate this from the buildah-oci-ta.

Copy link
Member Author

Choose a reason for hiding this comment

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

From what I understand the hack/generate-buildah-remote.sh script will generate task/buildah-remote-oci-ta/0.1/buildah-remote-oci-ta.yaml, there is no recipe.yaml in task/buildah-remote-oci-ta/0.1 so tash and the hack/generate-ta-tasks.sh script will not try to generate this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I missed that it skipped this one, looks good to me.

I have a PR open at #1068 that moves this generator to the build-definitions repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I saw that, I think we'll move this from ec/hacks here as well.

@zregvart zregvart added this pull request to the merge queue Jun 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 11, 2024
@zregvart zregvart added this pull request to the merge queue Jun 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 11, 2024
@lcarva lcarva added this pull request to the merge queue Jun 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 11, 2024
@lcarva lcarva added this pull request to the merge queue Jun 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 11, 2024
@lcarva
Copy link
Contributor

lcarva commented Jun 11, 2024

e2e tests keep failing with:

[e2e-tests : e2e-test] • [FAILED] [660.100 seconds]
[e2e-tests : e2e-test] [build-service-suite Build templates E2E test] HACBS pipelines [BeforeAll] triggers PipelineRun for symlink component with source URL https://github.com/redhat-appstudio-qe/devfile-sample-python-basic.git [build, build-templates, HACBS, pipeline, build-templates-e2e, source-build-e2e]
[e2e-tests : e2e-test]   [BeforeAll] /github.com/konflux-ci/e2e-tests/tests/build/build_templates.go:96
[e2e-tests : e2e-test]   [It] /github.com/konflux-ci/e2e-tests/tests/build/build_templates.go:184
[e2e-tests : e2e-test] 
[e2e-tests : e2e-test]   Timeline >>
[e2e-tests : e2e-test]   [FAILED] in [BeforeAll] - /github.com/konflux-ci/e2e-tests/tests/build/build_templates.go:135 @ 06/11/24 15:45:01.939

@lcarva
Copy link
Contributor

lcarva commented Jun 11, 2024

I wonder if this needs a rebase now that HAS has been disabled?

@zregvart zregvart added this pull request to the merge queue Jun 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 12, 2024
These will be used by the `tash` tool to regenerate the Trusted Artifact
variant of the Tasks based on the existing base Tasks.
This adds a script to regenerate the Trusted Artifact variant Tasks and
a GitHub Workflow to check if files need regenerating.
Run `hack/generate-ta-tasks.sh` to regenerate the Trusted Artifacts Task
variants.
@zregvart zregvart added this pull request to the merge queue Jun 12, 2024
Merged via the queue into konflux-ci:main with commit 8413aa6 Jun 12, 2024
3 checks passed
@zregvart zregvart deleted the issue/EC-650 branch June 12, 2024 12:06
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