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

MGMT-14922: Allow 'patch' in custom manifest file name #2252

Conversation

ammont82
Copy link
Contributor

@ammont82 ammont82 commented Jul 7, 2023

@ammont82 ammont82 requested a review from a team as a code owner July 7, 2023 06:23
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 7, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 7, 2023

@ammont82: This pull request references MGMT-14922 which is a valid jira issue.

In response to this:

Related to https://issues.redhat.com/browse/MGMT-14922

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.

@ammont82 ammont82 added OCM and removed jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Jul 7, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 7, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ammont82

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

@ammont82 ammont82 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 7, 2023
@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 7, 2023
@ammont82 ammont82 marked this pull request as draft July 7, 2023 06:23
return new RegExp(FILENAME_REGEX).test(fileName || '');
return (
new RegExp(FILENAME_REGEX).test(fileName || '') ||
fileName.indexOf('.yaml.patch') > -1 ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is correct, because FILENAME_REGEX is ensuring that the fileName does not contain a slash. If one of the ORs becomes true, it could be for a fileName containing a slash.

I think we should use a second regular expression that contains the same part about the slash, and additionally it validates the yaml.patch or yml.patch part.

Also, note that FILENAME_REGEX is already a regular expression, so doing new RegExp(regexp) is unnecessary and less eficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've marked as draft this PR because BE is not allowing us to put .yaml.patch or .yml.patch in the name. I'm waiting for BE response to see how we can align the regexp.

@jkilzi jkilzi force-pushed the master branch 7 times, most recently from 745700c to 203646c Compare August 24, 2023 21:54
@ammont82
Copy link
Contributor Author

I've closed the PR because we need some BE changes for this. I'll create a new one when BE have a solution.

@ammont82 ammont82 closed this Sep 18, 2023
@ammont82 ammont82 reopened this Oct 20, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 20, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 20, 2023

@ammont82: This pull request references MGMT-14922 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.15.0" version, but no target version was set.

In response to this:

Related to https://issues.redhat.com/browse/MGMT-14922

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.

@ammont82 ammont82 closed this Dec 21, 2023
@ammont82 ammont82 deleted the 14922-custom-manifests-name-allow-patch-in-name branch December 21, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. OCM size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants