api
api copied to clipboard
OCPBUGS-35196: Insights types - fix duration validation
This is to unify the duration's validation pattern used in the Insights API. I noticed this problem when the operator status failed to update with having duration value as 2m0s
Hello @tremes! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.
@tremes: This pull request references Jira Issue OCPBUGS-35196, 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.17.0) matches configured target version for branch (4.17.0)
- bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Requesting review from QA contact: /cc @JoaoFula
The bug has been updated to refer to the pull request using the external bug tracker.
In response to this:
This is to unify the duration's validation pattern used in the Insights API. I noticed this problem when the operator status failed to update with having duration value as
2m0s
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 openshift-eng/jira-lifecycle-plugin repository.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
/remove-lifecycle stale
@JoelSpeed would you please find some time for this one?
If my regex reading skills are up to scratch, all existing values should still match this validation, and we are allowing more values, that we weren't before.
@tremes, did this regex come from somewhere? How confident are we that it matches the go duration validation? Perhaps we can add some tests?
@JoelSpeed OK let me try to add some tests.
I've added few tests for this one and updated the regex a little bit.
Please check @JoelSpeed, Thank you
/lgtm
/hold
Good spot @everettraven , @tremes this isn't one of those odd unicode mu things is it? Are they separate chars?
@JoelSpeed it's not. Fixed. Thanks @everettraven
@tremes: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/e2e-aws-ovn | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-aws-ovn |
| ci/prow/e2e-upgrade-minor | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-upgrade-minor |
| ci/prow/e2e-aws-ovn-hypershift | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-aws-ovn-hypershift |
| ci/prow/e2e-upgrade | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-upgrade |
| ci/prow/e2e-aws-serial | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-aws-serial |
| ci/prow/e2e-aws-serial-techpreview | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-aws-serial-techpreview |
| ci/prow/e2e-aws-ovn-techpreview | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test e2e-aws-ovn-techpreview |
| ci/prow/minor-e2e-upgrade-minor | ae3ef30560c8f97a1665d68d2fa0638812e3ce14 | link | true | /test minor-e2e-upgrade-minor |
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-sigs/prow repository. I understand the commands that are listed here.
/hold cancel /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JoelSpeed, tremes
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [JoelSpeed]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@tremes: Jira Issue OCPBUGS-35196: All pull requests linked via external trackers have merged:
Jira Issue OCPBUGS-35196 has been moved to the MODIFIED state.
In response to this:
This is to unify the duration's validation pattern used in the Insights API. I noticed this problem when the operator status failed to update with having duration value as
2m0s
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 openshift-eng/jira-lifecycle-plugin repository.