Skip to content

Conversation

@gallettilance
Copy link
Member

I'm adding the WIP tag because I am adding some tests for the UI, but @kevinrizza you're welcome to start reviewing whenever you have time.

/cc @kevinrizza @jeff-phillips-18 @awgreene @dmesser

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2019
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 5, 2019
Copy link
Contributor

@SamiSousa SamiSousa left a comment

Choose a reason for hiding this comment

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

The descriptions for each missing field will be really helpful, great work!

return True

def is_version(field):
pattern1 = re.compile(r'v(\d+\.)(\d+\.)(\d)')
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe version also supports things like -alpha that can be added to the end of a semver.
Can these patterns be consolidated? Eg: r'v?(\d+\.)(\d+\.)(\d)(-[a-z]+)?'

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. @jeff-phillips-18 can you confirm that this is allowed for the UI?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it may be better to check with this package: https://pypi.org/project/semver/
We should use a regex that matches what quay.io is using to be complete (the above isn't that :/).

Choose a reason for hiding this comment

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

Yes that would work for the UI. We only really use it to sort the different versions, for version selection dropdown and for determining the latest version.

@gallettilance gallettilance changed the title [WIP] Adding ui validation functions Adding ui validation functions Mar 5, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2019
@gallettilance gallettilance changed the title Adding ui validation functions Adding UI validation functions Mar 5, 2019
@gallettilance gallettilance changed the title Adding UI validation functions Adding UI validation functions for operatorhub.io Mar 6, 2019
@gallettilance gallettilance force-pushed the master branch 2 times, most recently from 720e422 to 7dfb215 Compare March 6, 2019 21:55
logger = logging.getLogger(__name__)

def build_and_verify(source_dir=None, yamls=None):
def build_and_verify(source_dir=None, yamls=None, ui_validate_io=False, ui_validate_ocp=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be ui_validate_ocp or ui_validate_okd ?

Copy link
Member Author

Choose a reason for hiding this comment

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

could be. I'll wait to see what others say before changing this

Copy link

Choose a reason for hiding this comment

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

you could also simply call it ui_validate_openshift

Copy link
Member

Choose a reason for hiding this comment

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

+1 can this be ui_validate_openshift? I don't think this is ocp specific.

@gallettilance gallettilance force-pushed the master branch 2 times, most recently from 3396409 to b78a165 Compare March 7, 2019 15:34
@gallettilance
Copy link
Member Author

Removed the WIP tag. @awgreene @SamiSousa @dmesser @kevinrizza @aravindhp @jeff-phillips-18 @anik120 @JEREMYLINLIN Please review

Copy link

@dmesser dmesser left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2019
logger = logging.getLogger(__name__)

def build_and_verify(source_dir=None, yamls=None):
def build_and_verify(source_dir=None, yamls=None, ui_validate_io=False, ui_validate_ocp=False):
Copy link
Member

Choose a reason for hiding this comment

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

+1 can this be ui_validate_openshift? I don't think this is ocp specific.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2019
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2019
@kevinrizza kevinrizza merged commit 7c46066 into operator-framework:master Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants