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

ArtifactsPipelineRunEnableDeepInspection making this field to accept both bool and string #2179

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

rupalibehera
Copy link
Member

@rupalibehera rupalibehera commented May 30, 2024

Changes

https://issues.redhat.com/browse/SRVKP-4387

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

@tekton-robot
Copy link
Contributor

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

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 30, 2024
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 30, 2024
@rupalibehera rupalibehera marked this pull request as ready for review May 30, 2024 13:32
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 30, 2024
@rupalibehera
Copy link
Member Author

@PuneetPunamiya does this make sense ?

@rupalibehera
Copy link
Member Author

I have tested this with upgrading and it is working fine.

@jkandasa
Copy link
Member

@rupalibehera can you please rebase 2 commits to one?

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2024
@PuneetPunamiya
Copy link
Member

Thanks 🤙🏻
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2024
@jkandasa jkandasa removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2024
@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Jun 11, 2024
@piyush-garg
Copy link
Contributor

@rupalibehera @PuneetPunamiya can you please give detail about why this change in required in commit message, and also is it required for all the three fields?

@rupalibehera
Copy link
Member Author

@rupalibehera can you please rebase 2 commits to one?

done

@piyush-garg
Copy link
Contributor

Also can we add some unit tests for this?

@rupalibehera
Copy link
Member Author

@rupalibehera @PuneetPunamiya can you please give detail about why this change in required in commit message, and also is it required for all the three fields?

some boolean fields in tekton config for chains were string and some were boolean, while adding those it was like a guess work if it should be bool or string hence I have updated it, it was required only for one field https://issues.redhat.com/browse/SRVKP-4387 but I added for all others as well

@rupalibehera
Copy link
Member Author

Also can we add some unit tests for this?

we do not have any existing unit tests for the same

@piyush-garg
Copy link
Contributor

@rupalibehera @PuneetPunamiya can you please give detail about why this change in required in commit message, and also is it required for all the three fields?

some boolean fields in tekton config for chains were string and some were boolean, while adding those it was like a guess work if it should be bool or string hence I have updated it, it was required only for one field https://issues.redhat.com/browse/SRVKP-4387 but I added for all others as well

AFAIK, we do this when a field which was supposed to be boolean before, now is string, so to support upgrade, which change it like this to support both type/values. If this is the case here, please do this for the field which has got this change. Also, we should add validation defaulting etc accordingly. Also, good to have unit tests if you can add.

If this is not the case, and there is some other use case for this, can you please give details for that. Also, would be great if you can put all those details in commit msg and PR

@jkandasa
Copy link
Member

jkandasa commented Jun 12, 2024

@rupalibehera Thanks for the PR
Can you please add validation code on the BoolValue fields? That will be helpful to allow only the supported strings.
As we changed the bool to string type, now the input possibilities are limitless (earlier it was only true and false), So good to have validation code and unit test for the validation code.

Also please update the description about this PR, and include JIRA and/or GH issues references on the description, if we have any. and release notes to the users, as this is PR changes the user input.
This will be useful, when we look this PR in the future. All the required information will be in this PR.

@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 1, 2024
@tekton-robot tekton-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2024
@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 1, 2024
@rupalibehera rupalibehera changed the title for consistency in chains config making all boolean values to now support both bool and string ArtifactsPipelineRunEnableDeepInspection making this field to accept both bool and string Jul 3, 2024
@rupalibehera
Copy link
Member Author

@piyush-garg @jkandasa I am just changing ArtifactsPipelineRunEnableDeepInspection field now and dropped the other fields.

@rupalibehera
Copy link
Member Author

@piyush-garg @jkandasa , can we please merge this without the unit tests, there are very minimal changes now

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 5, 2024
@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonchain_validation.go 71.7% 72.7% 1.0

@piyush-garg
Copy link
Contributor

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkandasa, piyush-garg

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jkandasa,piyush-garg]

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

@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/operator/v1alpha1/tektonchain_validation.go 71.7% 72.7% 1.0

@PuneetPunamiya
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 5, 2024
@piyush-garg
Copy link
Contributor

/cherry-pick release-v0.71.x

@tekton-robot
Copy link
Contributor

@piyush-garg: once the present PR merges, I will cherry-pick it on top of release-v0.71.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.71.x

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/test-infra repository.

@tekton-robot tekton-robot merged commit 93fa7e7 into tektoncd:main Jul 5, 2024
8 checks passed
@tekton-robot
Copy link
Contributor

@piyush-garg: new pull request created: #2231

In response to this:

/cherry-pick release-v0.71.x

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants