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

Improve Debuggability in UTs of Trial Controller #2431

Open
Electronic-Waste opened this issue Sep 19, 2024 · 5 comments · May be fixed by #2432
Open

Improve Debuggability in UTs of Trial Controller #2431

Electronic-Waste opened this issue Sep 19, 2024 · 5 comments · May be fixed by #2432
Assignees
Labels
area/testing good first issue Good for newcomers help wanted Extra attention is needed kind/feature

Comments

@Electronic-Waste
Copy link
Member

What you would like to be added?

Use the propagated gomega instance in replace of func() bool, like code here:

// Expect that Trial status is succeeded with "false" status and "metrics unavailable" reason.
// Metrics unavailable because GetTrialObservationLog returns "unavailable".
g.Eventually(func() bool {
if err = c.Get(ctx, trialKey, trial); err != nil {
return false
}
return trial.IsMetricsUnavailable() &&
len(trial.Status.Observation.Metrics) > 0 &&
trial.Status.Observation.Metrics[0].Min == consts.UnavailableMetricValue &&
trial.Status.Observation.Metrics[0].Max == consts.UnavailableMetricValue &&
trial.Status.Observation.Metrics[0].Latest == consts.UnavailableMetricValue
}, timeout).Should(gomega.BeTrue())

Why is this needed?

As @tenzen-y described in #2394 (comment), it will improve the debuggability of the UTs.

Love this feature?

Give it a 👍 We prioritize the features with most 👍

@Electronic-Waste
Copy link
Member Author

/area testing
/good-first-issue
/remove-label lifecycle/needs-triage

Copy link

@Electronic-Waste:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/area testing
/good-first-issue
/remove-label lifecycle/needs-triage

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.

@google-oss-prow google-oss-prow bot added area/testing good first issue Good for newcomers help wanted Extra attention is needed and removed lifecycle/needs-triage labels Sep 19, 2024
@Electronic-Waste
Copy link
Member Author

/assign

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Electronic-Waste
Copy link
Member Author

/remove-lifecycle stale

This issue and related PR are ready to be reviewed. PTAL if you have time @kubeflow/wg-automl-leads .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing good first issue Good for newcomers help wanted Extra attention is needed kind/feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant