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

Update RequireResource to handle duplicate short names and proper fully qualified names (also make life a little better for windows file system contributors) #7134

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

jhandel
Copy link
Contributor

@jhandel jhandel commented Feb 2, 2024

Description

Updated clivalidation.RequireResourceType so that it can take either fully qualified names or short names.. and if a short name is used and there are duplicate short names display the list of matching short names.

I also added a .gitattributes to the following folders so that their test files would maintain lf line ends instead of crlf line ends when cloned or pulled into a windows filesystem.

  • pkg/corperp/renderers/containers/testdata
  • pkg/recipes/terraform/config/testdata
  • pkg/recipes/terraform/testdata/.terraform/modules

Type of change

This pull request fixes a bug in Radius and has an approved issue

Fixes: #7070

This pull request fixes a bug in Radius but its not an approved issue

Fixes: #7121

…s the same linefeed as the test expects

Signed-off-by: Josh <[email protected]>
…ification if duplicates are found

Signed-off-by: Josh <[email protected]>
@jhandel jhandel requested review from a team as code owners February 2, 2024 23:28
@vinayada1
Copy link
Contributor

@jhandel - Thanks for your contribution.

@jhandel jhandel changed the title Update RequireResource to handle duplicate short names and proper fully qualified names (also make life a little better for windows file system contriibutors) Update RequireResource to handle duplicate short names and proper fully qualified names (also make life a little better for windows file system contributors) Feb 5, 2024
Added new clivalidation_test.go with a test for RequireResrouceType
Also Updated delete_test, list_test, and show_test in cli/resources so that the arguments tests for those commands would include testing for ambigous types

Signed-off-by: Josh <[email protected]>
@jhandel jhandel temporarily deployed to functional-tests February 8, 2024 17:44 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 8, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository jhandel/radius
Commit ref 420a8ba
Unique ID dc300a6bba
Image tag pr-dc300a6bba
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-dc300a6bba
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-dc300a6bba
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-dc300a6bba
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-dc300a6bba
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
✅ msgrp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@jhandel jhandel temporarily deployed to functional-tests February 8, 2024 18:23 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 8, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository jhandel/radius
Commit ref ac1e4e2
Unique ID 5645fe9261
Image tag pr-5645fe9261
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-5645fe9261
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-5645fe9261
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-5645fe9261
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-5645fe9261
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting shared functional tests...
⌛ Starting datastoresrp functional tests...
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@lakshmimsft lakshmimsft merged commit f26db73 into radius-project:main Feb 8, 2024
16 checks passed
@jhandel jhandel deleted the fix_7070 branch February 8, 2024 19:30
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Mar 4, 2024
…ly qualified names (also make life a little better for windows file system contributors) (radius-project#7134)

# Description

Updated clivalidation.RequireResourceType so that it can take either
fully qualified names or short names.. and if a short name is used and
there are duplicate short names display the list of matching short
names.

I also added a .gitattributes to the following folders so that their
test files would maintain lf line ends instead of crlf line ends when
cloned or pulled into a windows filesystem.

* pkg/corperp/renderers/containers/testdata
* pkg/recipes/terraform/config/testdata
* pkg/recipes/terraform/testdata/.terraform/modules


## Type of change

This pull request fixes a bug in Radius and has an approved issue 

Fixes: radius-project#7070

This pull request fixes a bug in Radius but its not an approved issue

Fixes:  radius-project#7121

---------

Signed-off-by: Josh <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Apr 8, 2024
…ly qualified names (also make life a little better for windows file system contributors) (radius-project#7134)

# Description

Updated clivalidation.RequireResourceType so that it can take either
fully qualified names or short names.. and if a short name is used and
there are duplicate short names display the list of matching short
names.

I also added a .gitattributes to the following folders so that their
test files would maintain lf line ends instead of crlf line ends when
cloned or pulled into a windows filesystem.

* pkg/corperp/renderers/containers/testdata
* pkg/recipes/terraform/config/testdata
* pkg/recipes/terraform/testdata/.terraform/modules

## Type of change

This pull request fixes a bug in Radius and has an approved issue

Fixes: radius-project#7070

This pull request fixes a bug in Radius but its not an approved issue

Fixes:  radius-project#7121

---------

Signed-off-by: Josh <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants