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

OCPBUGS-9214: Create button is disabled in Git Import form when git repo url has hyphens in owner part of the url #12652

Merged

Conversation

lokanandaprabhu
Copy link
Contributor

@lokanandaprabhu lokanandaprabhu commented Mar 15, 2023

Fixes:
https://issues.redhat.com/browse/OCPBUGS-9214

Analysis / Root cause:
hyphen in the 2nd character of the name was not allowed due to regular expression check

Solution Description:
Allowed to add hyphen in the 2nd character of the name
Name -
Should contain only letter(a-z) or number(0-9) as first character
Should contain only letter(a-z) or number(0-9) as last character
Should contain only letter(a-z) or number(0-9) or hyphens(-) or dots(.) in between
Should not contain 2 dots consecutively

Screen shots / Gifs for design review:

-------Before-----
Screenshot 2023-03-15 at 3 59 28 PM

-------After----
Screenshot 2023-03-15 at 3 59 20 PM

Unit test coverage report:
NA

Test setup:

  1. Go to Developer -> Add -> Import from Git page
  2. use the repo url https://github.com/redhat-developer/s2i-dotnetcore-ex.git
  3. add /app in the context dir under advanced git options.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 15, 2023
@openshift-ci-robot
Copy link
Contributor

@lokanandaprabhu: This pull request references Jira Issue OCPBUGS-9214, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-9214

Analysis / Root cause:
hyphen in the 2nd character of the name was not allowed due to regular expression check

Solution Description:
Allowed to add hyphen in the 2nd character of the name
Name -
Should contain only letter(a-z) as first character
Should contain only letter(a-z) or number(0-9) as last character
Should contain only letter(a-z) or number(0-9) or hyphens(-) in between
Should not contain 2 hyphens consecutively

Screen shots / Gifs for design review:

-------Before-----
Screenshot 2023-03-15 at 3 59 28 PM

-------After----
Screenshot 2023-03-15 at 3 59 20 PM

Unit test coverage report:
NA

Test setup:

  1. Go to Developer -> Add -> Import from Git page
  2. use the repo url https://github.com/redhat-developer/s2i-dotnetcore-ex.git
  3. add /app in the context dir under advanced git options.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@openshift-ci openshift-ci bot added the component/shared Related to console-shared label Mar 15, 2023
@jerolimov
Copy link
Member

/cc
/assign

@raspbeep
Copy link
Contributor

/test e2e-gcp-console

@@ -1,7 +1,7 @@
import { TFunction } from 'i18next';
import * as yup from 'yup';

export const nameRegex = /^[a-z]([a-z0-9]-?)*[a-z0-9]$/;
export const nameRegex = /^[a-z](?!.*--)[a-z0-9-]*[a-z0-9]$/;
Copy link
Member

Choose a reason for hiding this comment

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

Please update the unit tests related to this change to make clear which cases doesn't work before and which you want or don't want to allow any more.

The old allowed already

adsf-asdf
asdf-asdf-asdf

but not

adsf--asdf
asdf--asdf--asdf

And this might be one of the issues. Two dashes are allowed!

But your negative lookahead looks like you want to deny that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two dashes are not allowed on old regex as well but in YAML I am able to create resource with resource name containing two dashes. I will remove that check

---Old regex with two dashes ----
image

@jerolimov
Copy link
Member

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 31, 2023
@openshift-ci-robot
Copy link
Contributor

@jerolimov: This pull request references Jira Issue OCPBUGS-9214, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sanketpathak

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot added component/dev-console Related to dev-console component/helm Related to helm-plugin component/pipelines Related to pipelines-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Apr 17, 2023
@lokanandaprabhu
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 17, 2023
@lokanandaprabhu lokanandaprabhu force-pushed the feature/OCPBUGS-9214 branch 2 times, most recently from ca90c86 to 0021c3c Compare April 18, 2023 17:11
@openshift-ci-robot
Copy link
Contributor

@lokanandaprabhu: This pull request references Jira Issue OCPBUGS-9214, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sanketpathak

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-9214

Analysis / Root cause:
hyphen in the 2nd character of the name was not allowed due to regular expression check

Solution Description:
Allowed to add hyphen in the 2nd character of the name
Name -
Should contain only letter(a-z) or number(0-9) as first character
Should contain only letter(a-z) or number(0-9) as last character
Should contain only letter(a-z) or number(0-9) or hyphens(-) or dots(.) in between
Should not contain 2 dots consecutively

Screen shots / Gifs for design review:

-------Before-----
Screenshot 2023-03-15 at 3 59 28 PM

-------After----
Screenshot 2023-03-15 at 3 59 20 PM

Unit test coverage report:
NA

Test setup:

  1. Go to Developer -> Add -> Import from Git page
  2. use the repo url https://github.com/redhat-developer/s2i-dotnetcore-ex.git
  3. add /app in the context dir under advanced git options.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 19, 2023

@lokanandaprabhu: all tests passed!

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/test-infra repository. I understand the commands that are listed here.

@lokanandaprabhu
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 30, 2023
Copy link
Member

@jerolimov jerolimov left a comment

Choose a reason for hiding this comment

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

Tested different git and container import pages, as well as the pipeline builder and helm imports. Works as expected.

Some helm charts doesn't install successfully when using a name like "4dotnet" and the Helm chart uses the name to create a Service. But this depends on the helm chart and couldn't be handled in our form.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 16, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerolimov, lokanandaprabhu

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 16, 2023
@openshift-merge-robot openshift-merge-robot merged commit 530e0af into openshift:master Jun 16, 2023
6 checks passed
@openshift-ci-robot
Copy link
Contributor

@lokanandaprabhu: Jira Issue OCPBUGS-9214: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-9214 has been moved to the MODIFIED state.

In response to this:

Fixes:
https://issues.redhat.com/browse/OCPBUGS-9214

Analysis / Root cause:
hyphen in the 2nd character of the name was not allowed due to regular expression check

Solution Description:
Allowed to add hyphen in the 2nd character of the name
Name -
Should contain only letter(a-z) or number(0-9) as first character
Should contain only letter(a-z) or number(0-9) as last character
Should contain only letter(a-z) or number(0-9) or hyphens(-) or dots(.) in between
Should not contain 2 dots consecutively

Screen shots / Gifs for design review:

-------Before-----
Screenshot 2023-03-15 at 3 59 28 PM

-------After----
Screenshot 2023-03-15 at 3 59 20 PM

Unit test coverage report:
NA

Test setup:

  1. Go to Developer -> Add -> Import from Git page
  2. use the repo url https://github.com/redhat-developer/s2i-dotnetcore-ex.git
  3. add /app in the context dir under advanced git options.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console component/helm Related to helm-plugin component/pipelines Related to pipelines-plugin component/shared Related to console-shared jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants