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

Bug 1893963: Dont use lookbehinds regexp #7082

Merged

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Nov 3, 2020

On Firefox 68.12.0esr (64-bit) and 66.0.2 (64-bit) when going to the Virtualization tab in the UI nothing is loading on the right side
FireFox 68 does not support lookbehinds regular expresions [1], this PR introduce a workaround supported by older browsers.

[1] https://kangax.github.io/compat-table/es2016plus/#test-RegExp_Lookbehind_Assertions

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high 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. labels Nov 3, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: This pull request references Bugzilla bug 1893963, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

Bug 1893963: Dont use lookbehinds regexp

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-robot openshift-ci-robot added the component/kubevirt Related to kubevirt-plugin label Nov 3, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2020
@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

@glekner please review

@glekner
Copy link
Contributor

glekner commented Nov 3, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2020
@atiratree
Copy link
Member

/lgtm cancel

there is no need for regexes at all here, you can do just:

cloudInitHelper.get(CloudInitDataFormKeys.PASSWORD)

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2020
@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

@suomiy

there is no need for regexes at all here, you can do just:
cloudInitHelper.get(CloudInitDataFormKeys.PASSWORD)

does the NAME works for you (we need name and password) ?
cloudInitHelper.get(CloudInitDataFormKeys.NAME)

@atiratree
Copy link
Member

I suppose you meant a key user which can be easily added to CloudInitDataFormKeys

@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

I suppose you meant a key user which can be easily added to CloudInitDataFormKeys

@suomiy this is a bug we need to fix and backport, lets merge it as is, and then make a bigger PR to add the missing field and re-factor the regexps only for 4.7, WDYT ?

@atiratree
Copy link
Member

there is no refactoring needed, just adding one key is enough. Plus the regex approach is not working with base64 cloud init

@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

there is no refactoring needed,

The helper is broken we need to fix it to support user, and then we will need to use the new feature we added to this helper class here. it's adding a fix to the the helper class bug in this bug fix. I would rather fix the helper class in a different PR, WDYT ?

@atiratree
Copy link
Member

can you tell me how is the helper class broken?

@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

can you tell me how is the helper class broken?

@suomiy it does not support user, we need both user and password for this fix

@atiratree
Copy link
Member

@suomiy it does not support user, we need both user and password for this fix

that is not broken - that just means it is not possible to define all constants in existence which might appear in cloud init

you can use a plain string "user" if you do not want to touch the helper class

@atiratree
Copy link
Member

although, having constants is more useful IMO

@yaacov yaacov force-pushed the dont-use-lookbehinds-regexp branch from fcc4657 to 84ba458 Compare November 3, 2020 14:01
@atiratree
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 3, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glekner, suomiy, yaacov

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-merge-robot openshift-merge-robot merged commit 8bc402c into openshift:master Nov 3, 2020
@openshift-ci-robot
Copy link
Contributor

@yaacov: All pull requests linked via external trackers have merged:

Bugzilla bug 1893963 has been moved to the MODIFIED state.

In response to this:

Bug 1893963: Dont use lookbehinds regexp

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.

@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

/cherrypick release-4.6.z

@openshift-cherrypick-robot

@yaacov: cannot checkout release-4.6.z: error checking out release-4.6.z: exit status 1. output: error: pathspec 'release-4.6.z' did not match any file(s) known to git

In response to this:

/cherrypick release-4.6.z

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.

@yaacov
Copy link
Member Author

yaacov commented Nov 3, 2020

/cherrypick release-4.6

@openshift-cherrypick-robot

@yaacov: new pull request created: #7085

In response to this:

/cherrypick release-4.6

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.

@spadgett spadgett added this to the v4.7 milestone Nov 4, 2020
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/severity-high Referenced Bugzilla bug's severity is high 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. component/kubevirt Related to kubevirt-plugin 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

7 participants