ci-tools icon indicating copy to clipboard operation
ci-tools copied to clipboard

Add a comment to auto-generated file

Open stephenfin opened this issue 1 year ago • 3 comments

Useful breadcrumb for people who do not touch openshift/release as often as they probably should.

This is half-baked. I'm mainly pushing to see if it's a good idea. If it is, I'll flesh it out more/do it better (TM).

stephenfin avatar Sep 17 '24 18:09 stephenfin

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stephenfin Once this PR has been reviewed and has the lgtm label, please assign smg247 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Sep 17 '24 18:09 openshift-ci[bot]

@stephenfin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security d6834b8094470ff318262741999f7f0e13289401 link false /test security
ci/prow/breaking-changes d6834b8094470ff318262741999f7f0e13289401 link false /test breaking-changes
ci/prow/integration d6834b8094470ff318262741999f7f0e13289401 link true /test integration
ci/prow/unit d6834b8094470ff318262741999f7f0e13289401 link true /test unit

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Sep 17 '24 19:09 openshift-ci[bot]

@stephenfin, I appreciate the attempt to make it more clear, but this isn't something that we will want to do. The file actually can be edited by hand, and there are many usecases for doing so. Individual jobs are generated by prowgen, but even those are tolerant of specific manual changes. This comment will be more confusing than helpful, I think

smg247 avatar Sep 20 '24 16:09 smg247

@smg247 Apologies, I missed your response. I wasn't aware that you could modify these by hand. Is that possible in openshift/release or are you talking about other places that prowgen is used (are there any)? For openshift/release, I had assumed the generated-config job (i.e. the hack/validate-generated-config.sh script) and other related jobs like ordered-prow-config would prevent this.

Happy to close this of course, but before I do, I'll ask would it make sense to add an alternative note? Ideally something like the below that would provide helpful breadcrumbs to newer contributors?

# This file was initially auto-generated by prowgen from the following sources:
# 
# <path/to/config/file/a>
# <path/to/config/file/b>
# ...
#
# You can modify this by hand, but you may need to run prowgen after the fact to
# ensure conflicts are not introduced.

(assuming we even have the context at this stage of the pipeline to populate this list, of course).

It's a totally different problem and totally different toolkit, but the storage folks do something like this in openshift/csi-operator and it is indeed very helpful at the outset.

stephenfin avatar Nov 15 '24 11:11 stephenfin

@stephenfin, I don't see any downsides to a comment like that, but I think that DPTP will want to craft the exact verbiage of the comment. Can you file a card for us in our DPTP jira project, and link this PR as a draft?

It is possible to manually edit these files in openshift/release, yes. See https://docs.ci.openshift.org/docs/how-tos/contributing-openshift-release/#tolerated-changes-to-generated-jobs. That is also the only place that prowgen is utilized (to my knowledge).

smg247 avatar Feb 13 '25 15:02 smg247

@stephenfin, I don't see any downsides to a comment like that, but I think that DPTP will want to craft the exact verbiage of the comment. Can you file a card for us in our DPTP jira project, and link this PR as a draft?

Done https://issues.redhat.com/browse/DPTP-4361

stephenfin avatar Mar 12 '25 11:03 stephenfin