-
Notifications
You must be signed in to change notification settings - Fork 101
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
remove hardcoded list of resource types from cli. #8286
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8286 +/- ##
==========================================
- Coverage 59.94% 59.88% -0.07%
==========================================
Files 596 596
Lines 40432 40454 +22
==========================================
- Hits 24238 24225 -13
- Misses 14367 14408 +41
+ Partials 1827 1821 -6 ☔ View full report in Codecov by Sentry. |
4ec7b77
to
3c5e6e0
Compare
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
303cf36
to
d18246c
Compare
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
pkg/cli/clivalidation.go
Outdated
} else if len(foundTypes) > 1 { | ||
return "", fmt.Errorf("multiple resource types match '%s'. Please specify the full resource type and try again:\n\n%s\n", | ||
resourceTypeName, strings.Join(foundTypes, "\n")) | ||
if !strings.Contains(resourceTypeName, "/") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only check for the resource type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. Rest of the check has to happen in "Run", since we cant test statically for anything other than the format rp/rt
89460e1
to
bfeac33
Compare
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
@@ -99,8 +99,12 @@ func (r *Runner) Validate(cmd *cobra.Command, args []string) error { | |||
return err | |||
} | |||
r.Format = format | |||
resourceProviderName, respurceTypeName, err := cli.RequireFullyQualifiedResourceType(args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo on resourceTypeName
/LGTM overall |
Description
Since we now register resource provider manifests at startup and are in process of enabling UDT end to end, we should not use static resource type lists.
This PR removes static resource type lists in cli code.
Type of change
Part of #6688
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: