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

Don't check if trial's metadata is in spec.parameters #1848

Merged
merged 6 commits into from
Apr 17, 2022

Conversation

alexeygorobets
Copy link
Contributor

This PR fixes validation of Experiment when trial metadata used in template substitution.
Validator should not look for parameter in the spec.parameters if it is trial's metadata.

Which issue(s) this PR fixes:
Fixes #1844

@google-cla
Copy link

google-cla bot commented Apr 12, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@aws-kf-ci-bot
Copy link
Contributor

Hi @alexeygorobets. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@alexeygorobets
Copy link
Contributor Author

cc @johnugeorge @henrysecond1

@coveralls
Copy link

coveralls commented Apr 12, 2022

Coverage Status

Coverage decreased (-0.006%) to 73.844% when pulling 6713b34 on mesosphere:master into c62bacd on kubeflow:master.

@tenzen-y
Copy link
Member

Thanks for creating this @alexeygorobets!
Could you sign CLA on this page?

@alexeygorobets
Copy link
Contributor Author

hi @tenzen-y, just signed CLA, thanks

Copy link
Member

@Arhell Arhell left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@johnugeorge
Copy link
Member

/retest

1 similar comment
@johnugeorge
Copy link
Member

/retest

@tenzen-y
Copy link
Member

Since kubeflow-katib-presubmit failed due to dockerhub's pull limit, let's retry the test in a few hours with /retest.

error building image: GET https://index.docker.io/v2/library/python/manifests/3.9: TOOMANYREQUESTS: You have reached your pull rate limit. You may increase the limit by authenti
cating and upgrading: https://www.docker.com/increase-rate-limit

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Great contribution @alexeygorobets !
I left a few comments.

// Check if parameter is trial metadata
regex := regexp.MustCompile(consts.TrialTemplateMetaReplaceFormatRegex)
match := regex.FindStringSubmatch(parameter.Reference)
if !(len(match) > 0 && contains(consts.TrialTemplateMetaKeys, match[1])) {
Copy link
Member

@tenzen-y tenzen-y Apr 14, 2022

Choose a reason for hiding this comment

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

I think contains(consts.TrialTemplateMetaKeys, match[1]) returns false when parameter.Reference is Anotations or Labels.
WDYT @alexeygorobets ?

- name: trialLabelCustom
description: Trial's job label with custom value
reference: ${trialSpec.Labels[custom-key]}
- name: trialAnnotationCustom
description: Trial's job annotation with custom value
reference: ${trialSpec.Annotations[custom-key]}

}(),
Err: false,
testDescription: "Trial template contains Trial metadata reference as parameter",
},
Copy link
Member

@tenzen-y tenzen-y Apr 14, 2022

Choose a reason for hiding this comment

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

Could you also add a test case for Labels or Annotations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @tenzen-y , I've added handing of those cases and tests, thanks!

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Thanks for updating PR @alexeygorobets !
/lgtm

Could you please restart GitHub Actions @kubeflow/wg-automl-leads ?

@johnugeorge
Copy link
Member

Thanks @alexeygorobets for this PR

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeygorobets, johnugeorge, tenzen-y

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

@google-oss-prow google-oss-prow bot merged commit 7f1afbd into kubeflow:master Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trial name could not be passed to env
6 participants