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: validate kustomize build of tasks and pipelines #1792

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

tisutisu
Copy link
Contributor

@tisutisu tisutisu commented Jan 7, 2025

This PR adds a CI check to validate kustomize build is successful and also checks that PR authors are committing built manifests files of task/pipeline change with the help of hack/build-manifests.sh script with their task/pipeline changes.
Part of story: https://issues.redhat.com/browse/STONEBLD-3042

@tisutisu tisutisu marked this pull request as ready for review January 7, 2025 08:11
@tisutisu tisutisu requested a review from a team as a code owner January 7, 2025 08:11
@tisutisu tisutisu force-pushed the kustomize-build branch 3 times, most recently from 29e718a to fe32af3 Compare January 7, 2025 12:45
hack/build-manifests.sh Outdated Show resolved Hide resolved
@tisutisu tisutisu marked this pull request as draft January 9, 2025 12:32
Copy link
Member

Choose a reason for hiding this comment

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

This task is mirrored from another repo, so changes made directly will eventually be overwritten by changes made there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will ignore building manifest for this task then

Copy link
Member

Choose a reason for hiding this comment

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

This task is mirrored from another repo, so changes made directly will eventually be overwritten by changes made there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same for this task as well

Copy link
Member

Choose a reason for hiding this comment

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

This task is mirrored from another repo, so changes made directly will eventually be overwritten by changes made there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same for this task as well

@tisutisu tisutisu force-pushed the kustomize-build branch 2 times, most recently from 55f6f38 to 04430c6 Compare January 13, 2025 03:51
@tisutisu tisutisu marked this pull request as ready for review January 13, 2025 03:53
Copy link
Contributor

@tkdchen tkdchen left a comment

Choose a reason for hiding this comment

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

Could you please describe the solution in the commit message?

hack/build-manifests.sh Outdated Show resolved Hide resolved
echo "Please run ./hack/build-manifests.sh and update your PR" >&2;
exit 1;
}
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like ./hack/build-manifests.sh becomes a mandatory part of the development workflow when working with tasks and pipelines. Can you describe this? Probably inside the build-manifests.sh script itself at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Described it in the README change here. Do you think it is sufficient or need to be added to the build-manifests.sh script as well?

Copy link
Contributor

@tkdchen tkdchen Jan 21, 2025

Choose a reason for hiding this comment

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

The content linked tells what need to do for task and pipeline authors, it is not a description to the whole solution. In my mind, the description could tell, for example, what the task and pipeline authors should do, what the maintainers should do, how the kustomized manifests are validated, whether this validation changes the build-definitions task and pipelines contribution workflow, even the build-and-push, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the README now. We don't need to change anything on the build-and-push script.

@tisutisu
Copy link
Contributor Author

/retest

1 similar comment
@tisutisu
Copy link
Contributor Author

/retest

README.md Outdated Show resolved Hide resolved
# with the task name separated by a space, for example:
# SKIP_TASKS="git-clone init"

SKIP_TASKS="generate-odcs-compose provision-env-with-ephemeral-namespace verify-signed-rpms"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why allowing to skip tasks and pipelines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tasks are mirrored from another repo, there is some automation which syncs them. If we change anything manually, that will be reverted. So skipped them.

hack/build-manifests.sh Outdated Show resolved Hide resolved
echo "Please run ./hack/build-manifests.sh and update your PR" >&2;
exit 1;
}
fi
Copy link
Contributor

@tkdchen tkdchen Jan 21, 2025

Choose a reason for hiding this comment

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

The content linked tells what need to do for task and pipeline authors, it is not a description to the whole solution. In my mind, the description could tell, for example, what the task and pipeline authors should do, what the maintainers should do, how the kustomized manifests are validated, whether this validation changes the build-definitions task and pipelines contribution workflow, even the build-and-push, etc.

@tisutisu tisutisu force-pushed the kustomize-build branch 4 times, most recently from d3a6320 to d03d2ea Compare January 27, 2025 08:22
Copy link
Contributor

@kdudka kdudka left a comment

Choose a reason for hiding this comment

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

There is nothing left to review in this pull request from me as code owner of the sast-* tasks.

task/sast-coverity-check/0.2/sast-coverity-check.yaml 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.

LGTM, just minor details

task/fbc-validation/0.1/fbc-validation.yaml Outdated Show resolved Hide resolved
hack/build-manifests.sh Outdated Show resolved Hide resolved
chmeliik
chmeliik previously approved these changes Feb 3, 2025
kdudka
kdudka previously approved these changes Feb 3, 2025
Copy link
Contributor

@kdudka kdudka left a comment

Choose a reason for hiding this comment

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

The change in sast-coverity-check looks good.

@tisutisu tisutisu dismissed stale reviews from kdudka and chmeliik via f5ac2f6 February 3, 2025 08:35
@tisutisu tisutisu enabled auto-merge February 3, 2025 09:19
@tisutisu tisutisu disabled auto-merge February 3, 2025 10:20
@tisutisu
Copy link
Contributor Author

tisutisu commented Feb 3, 2025

@ligangty @yma96 @gbenhaim @amisstea @Omeramsc @avi-biton @konflux-ci/integration-service-maintainers @konflux-ci/ec could you please help with review/approve this PR?

@chmeliik
Copy link
Contributor

chmeliik commented Feb 3, 2025

After #1792 (comment), we don't need most of those reviews anymore 🙂

Just these

Copy link
Contributor

@dirgim dirgim left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@yma96 yma96 left a comment

Choose a reason for hiding this comment

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

LGTM

@tisutisu tisutisu added this pull request to the merge queue Feb 5, 2025
Merged via the queue into konflux-ci:main with commit 1f7ea18 Feb 5, 2025
17 checks passed
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.

7 participants