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

[UDT PR 5/N] Add rad resource-provider create #8049

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

rynowak
Copy link
Contributor

@rynowak rynowak commented Nov 12, 2024

Description

This change adds a new command that can register a resource provider, types, and api versions.

Users author a YAML file (manifest), and the rad CLI will turn that into a series of API calls.

See: radius-project/design-notes#74 for the somewhat in-progress design of the manifest. It's likely that the manifest will continue to evolve, and we'll update the code in main to match.

This PR contains:

  • The new command rad resource-provider create
  • The parsing and validation logic for the manifest
  • Plumbing for calling the resource type APIs from the CLI

Type of change

  • This pull request adds or changes features of Radius and has an approved issue (issue link required).

Fixes: #6688

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
  • If applicable, design document has been reviewed and approved by Radius maintainers/approvers.
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.

@rynowak rynowak requested review from a team as code owners November 12, 2024 01:12
@rynowak
Copy link
Contributor Author

rynowak commented Nov 12, 2024

/cc @Reshrahim @ytimocin @nithyatsu

@rynowak
Copy link
Contributor Author

rynowak commented Nov 12, 2024

Please see: https://github.com/radius-project/radius/pull/8049/files#diff-2e88691e8e4fc78d263ae3fcdc1dae64095c758b57f2adfea8b6657f4e434e23 for an example manifest.

Note that the schema is IGNORED right now. This will be addressed in a later stage. Please see the workback plan for UDT for more details.

@rynowak rynowak changed the title Add rad resource-provider create [UDT PR 5/N] Add rad resource-provider create Nov 12, 2024
@rynowak rynowak force-pushed the udt-rp-create-cmmand branch from e38abb6 to c99901b Compare November 12, 2024 01:43
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 66.55172% with 97 lines in your changes missing coverage. Please review.

Project coverage is 59.22%. Comparing base (57a17e5) to head (e0b1094).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cli/manifest/parser.go 67.25% 30 Missing and 7 partials ⚠️
pkg/cli/clients/management.go 36.53% 22 Missing and 11 partials ⚠️
pkg/cli/cmd/resourceprovider/create/create.go 76.10% 18 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8049      +/-   ##
==========================================
+ Coverage   59.15%   59.22%   +0.07%     
==========================================
  Files         576      579       +3     
  Lines       38407    38697     +290     
==========================================
+ Hits        22718    22920     +202     
- Misses      14077    14141      +64     
- Partials     1612     1636      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/cli/clients/clients.go Show resolved Hide resolved
pkg/cli/clients/clients.go Show resolved Hide resolved
pkg/cli/clients/management.go Show resolved Hide resolved
pkg/cli/clients/management_test.go Show resolved Hide resolved
pkg/cli/cmd/resourceprovider/create/create.go Outdated Show resolved Hide resolved
pkg/cli/cmd/resourceprovider/create/create.go Show resolved Hide resolved
pkg/cli/manifest/manifest.go Show resolved Hide resolved
pkg/cli/manifest/parser.go Show resolved Hide resolved
@rynowak rynowak temporarily deployed to functional-tests November 12, 2024 15:41 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 12, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository rynowak/radius
Commit ref c99901b
Unique ID funcbeb636f8c5
Image tag pr-funcbeb636f8c5
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcbeb636f8c5
  • 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-funcbeb636f8c5
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcbeb636f8c5
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcbeb636f8c5
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcbeb636f8c5
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

This change adds a new command that can register a resource provider, types, and api versions.

Users author a YAML file (manifest), and the `rad` CLI will turn that into a series of API calls.

See: radius-project/design-notes#74 for the somewhat in-progress design of the manifest. It's likely that the manifest will continue to evolve, and we'll update the code in main to match.

This PR contains:

- The new command `rad resource-provider create`
- The parsing and validation logic for the manifest
- Plumbing for calling the resource type APIs from the CLI

Signed-off-by: Ryan Nowak <nowakra@gmail.com>
@rynowak rynowak force-pushed the udt-rp-create-cmmand branch from c99901b to 6a05640 Compare November 13, 2024 06:11
@rynowak
Copy link
Contributor Author

rynowak commented Nov 13, 2024

@ytimocin @nithyatsu - updated

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 13, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository rynowak/radius
Commit ref 6a05640
Unique ID funcbd10d81a7a
Image tag pr-funcbd10d81a7a
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcbd10d81a7a
  • 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-funcbd10d81a7a
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcbd10d81a7a
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcbd10d81a7a
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcbd10d81a7a
  • 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 corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ corerp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 13, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository rynowak/radius
Commit ref e0b1094
Unique ID funca9899f8117
Image tag pr-funca9899f8117
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funca9899f8117
  • 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-funca9899f8117
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funca9899f8117
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funca9899f8117
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funca9899f8117
  • 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 corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@rynowak rynowak merged commit 1cb666c into radius-project:main Nov 13, 2024
29 checks passed
@rynowak rynowak deleted the udt-rp-create-cmmand branch November 13, 2024 22:03
@rynowak
Copy link
Contributor Author

rynowak commented Nov 13, 2024

FYI this may get some updates pending the design doc discussion. Merging this now to unblock progress in other areas.

Copy link
Contributor

@nithyatsu nithyatsu left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User-Defined Resource Types
4 participants