Skip to content

Add type validations for the Catalog resources#17211

Merged
mkeeler merged 1 commit intomainfrom
catalog-v2/type-validations
May 12, 2023
Merged

Add type validations for the Catalog resources#17211
mkeeler merged 1 commit intomainfrom
catalog-v2/type-validations

Conversation

@mkeeler
Copy link
Member

@mkeeler mkeeler commented May 2, 2023

Description

This adds type validations for all the new catalog resources. This builds off the types defined in #17124 and adds custom validation hooks for the resource service to invoke for all of them.

Additionally the workload type also got a mutation hook to fill out the Identity field of that resource if not present.

Testing & Reproduction steps

Testing involved writing the suite of unit tests - 100% code coverage. Things are working as expected but that doesn't mean I missed validating some condition I hadn't thought of.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@mkeeler mkeeler requested a review from ishustava May 2, 2023 21:19
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from 4fee3e3 to 30919e4 Compare May 2, 2023 21:23
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from d89180b to b8affa4 Compare May 2, 2023 21:24
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from 30919e4 to 8055a29 Compare May 3, 2023 11:45
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from b8affa4 to 8df2523 Compare May 3, 2023 11:48
@mkeeler mkeeler marked this pull request as ready for review May 3, 2023 11:48
@mkeeler mkeeler mentioned this pull request May 3, 2023
4 tasks
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from 8055a29 to 1501a2a Compare May 3, 2023 16:46
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 2 times, most recently from 2d0117d to 78c67c4 Compare May 3, 2023 21:22
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from 1501a2a to c44fbc7 Compare May 4, 2023 13:54
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from 78c67c4 to d95bcf1 Compare May 4, 2023 13:58
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from f272939 to b57fa58 Compare May 4, 2023 14:00
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from d95bcf1 to 48a1413 Compare May 4, 2023 14:01
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from b57fa58 to d1710e2 Compare May 4, 2023 19:54
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from 48a1413 to b5f62c4 Compare May 4, 2023 19:54
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from d1710e2 to cafd8b8 Compare May 5, 2023 12:14
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 2 times, most recently from 6749521 to fba2cd5 Compare May 5, 2023 13:19
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch 2 times, most recently from 15742db to 359200a Compare May 5, 2023 13:48
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from fba2cd5 to 7278e65 Compare May 5, 2023 13:49
@mkeeler mkeeler added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport labels May 5, 2023
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from 7278e65 to 115eb1c Compare May 5, 2023 18:54
@mkeeler mkeeler force-pushed the catalog-v2/type-registry branch from 359200a to c8cbe41 Compare May 8, 2023 17:37
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from 115eb1c to eb448ec Compare May 8, 2023 17:38
Base automatically changed from catalog-v2/type-registry to main May 8, 2023 19:36
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 2 times, most recently from a559ba6 to 92d2ee7 Compare May 9, 2023 16:43
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

This looks awesome 😃 I love all the error types, and the tests are amazing!

I left a few questions and suggestions in-line. Let me know what you think!

@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 4 times, most recently from d1437c3 to 2d58a6c Compare May 10, 2023 11:56
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 3 times, most recently from 8a6ebb9 to d661adf Compare May 10, 2023 17:04
@mkeeler mkeeler requested review from boxofrad and ishustava May 10, 2023 17:05
Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉

@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 2 times, most recently from b206d95 to b58240e Compare May 10, 2023 19:52
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from b58240e to e2d93b9 Compare May 10, 2023 20:50
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch 2 times, most recently from 540a15f to da72b6c Compare May 11, 2023 21:08
Also adding some common resource validation error types to the internal/resource package.
@mkeeler mkeeler force-pushed the catalog-v2/type-validations branch from da72b6c to 32cde93 Compare May 12, 2023 12:04
@mkeeler mkeeler merged commit 456156e into main May 12, 2023
@mkeeler mkeeler deleted the catalog-v2/type-validations branch May 12, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants