Skip to content

Conversation

@chiragkyal
Copy link
Member

@chiragkyal chiragkyal commented Aug 29, 2025

The script is generated by Cursor using claude-4-sonnet

Prompts used

Prompt 1

Create a script that updates Tekton pipeline YAML files with new version numbers. The script should:

1. Rename files from old version patterns (e.g. 1-17) to new version patterns (e.g. 1-18)
2. Update all version references within the files
3. Handle different components with different version inputs:
   - cert-manager-operator: version like v1.18.0
   - cert-manager-istio-csr: version like v0.14.2  
   - jetstack-cert-manager: version like v1.18.2
4. Include command-line options for each component version
5. Make the script configurable with proper documentation

The script should update:
- Filenames: 1-17 → 1-18
- Content references: 1.17 → 1.18
- Release versions: RELEASE_VERSION=v1.17.0 → RELEASE_VERSION=v1.18.0

Prompt 2

This is an edge case. Modify the script to handle a special scenario for cert-manager-istio-csr files:
- File names and version references should follow the pattern (1-17 → 1-18)
- BUT the RELEASE_VERSION should use the istio-csr specific version (i.e v0.14.2)
- All other components should use their provided version for both file naming and RELEASE_VERSION

Add logic to automatically determine the file version pattern from other component versions when only istio-csr version is provided.

Prompt 3

The script is making unwanted changes when run multiple times on already-updated files. Make sure the script should be safe to run multiple times without making unwanted modifications.

Additionally 
- Ensure the script fails gracefully if required parameters are missing
- Handle cases where no files match the expected patterns
- A detailed README with usage examples

/cc @bharath-b-rh

@openshift-ci openshift-ci bot requested a review from bharath-b-rh August 29, 2025 11:06
@openshift-ci
Copy link

openshift-ci bot commented Aug 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chiragkyal
Once this PR has been reviewed and has the lgtm label, please assign trilokgeer for approval. For more information see the 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

Signed-off-by: chiragkyal <[email protected]>
@chiragkyal chiragkyal changed the title Add script to automatically update tekton config version OAPE-307: Add script to automatically update tekton config version Aug 29, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 29, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 29, 2025

@chiragkyal: This pull request references OAPE-307 which is a valid jira issue.

In response to this:

The script is generated by Cursor using claude-4-sonnet

Prompts used

Prompt 1

Create a script that updates Tekton pipeline YAML files with new version numbers. The script should:

1. Rename files from old version patterns (e.g. 1-17) to new version patterns (e.g. 1-18)
2. Update all version references within the files
3. Handle different components with different version inputs:
  - cert-manager-operator: version like v1.18.0
  - cert-manager-istio-csr: version like v0.14.2  
  - jetstack-cert-manager: version like v1.18.2
4. Include command-line options for each component version
5. Make the script configurable with proper documentation

The script should update:
- Filenames: 1-17 → 1-18
- Content references: 1.17 → 1.18
- Release versions: RELEASE_VERSION=v1.17.0 → RELEASE_VERSION=v1.18.0

Prompt 2

This is an edge case. Modify the script to handle a special scenario for cert-manager-istio-csr files:
- File names and version references should follow the pattern (1-17 → 1-18)
- BUT the RELEASE_VERSION should use the istio-csr specific version (i.e v0.14.2)
- All other components should use their provided version for both file naming and RELEASE_VERSION

Add logic to automatically determine the file version pattern from other component versions when only istio-csr version is provided.

Prompt 3

The script is making unwanted changes when run multiple times on already-updated files. Make sure the script should be safe to run multiple times without making unwanted modifications.

Additionally 
- Ensure the script fails gracefully if required parameters are missing
- Handle cases where no files match the expected patterns
- A detailed README with usage examples

/cc @bharath-b-rh

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 openshift-eng/jira-lifecycle-plugin repository.

@chiragkyal
Copy link
Member Author

@coderabbitai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants