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

Rename database APIs #8143

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

rynowak
Copy link
Contributor

@rynowak rynowak commented Dec 17, 2024

Description

This change renames the database APIs to have clearer names.

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

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 December 17, 2024 01:02
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 53.69650% with 238 lines in your changes missing coverage. Please review.

Project coverage is 59.49%. Comparing base (c4c1c00) to head (4b37085).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ucp/database/postgres/postgresclient.go 0.00% 48 Missing ⚠️
pkg/ucp/server/server.go 0.00% 18 Missing ⚠️
pkg/ucp/database/apiserverstore/apiserverclient.go 59.52% 17 Missing ⚠️
pkg/ucp/database/etcdstore/etcdclient.go 60.52% 15 Missing ⚠️
pkg/ucp/frontend/api/server.go 0.00% 15 Missing ⚠️
pkg/ucp/database/inmemory/client.go 64.86% 13 Missing ⚠️
pkg/ucp/database/options.go 0.00% 13 Missing ⚠️
pkg/armrpc/frontend/controller/controller.go 20.00% 8 Missing ⚠️
pkg/armrpc/frontend/controller/operation.go 0.00% 8 Missing ⚠️
pkg/server/apiservice.go 0.00% 6 Missing ⚠️
... and 34 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8143      +/-   ##
==========================================
+ Coverage   59.47%   59.49%   +0.01%     
==========================================
  Files         577      580       +3     
  Lines       38644    39008     +364     
==========================================
+ Hits        22984    23207     +223     
- Misses      13994    14085      +91     
- Partials     1666     1716      +50     

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

This change renames the database APIs to have clearer names.

Signed-off-by: Ryan Nowak <[email protected]>
@rynowak rynowak force-pushed the rynowak/rename-database branch from 757e5b3 to 2f319af Compare December 17, 2024 02:00
@rynowak rynowak temporarily deployed to functional-tests December 17, 2024 02:51 — with GitHub Actions Inactive
@radius-functional-tests
Copy link

radius-functional-tests bot commented Dec 17, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository rynowak/radius
Commit ref 2f319af
Unique ID func4468a8e1b8
Image tag pr-func4468a8e1b8
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func4468a8e1b8
  • 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-func4468a8e1b8
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func4468a8e1b8
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func4468a8e1b8
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func4468a8e1b8
  • 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

@@ -26,7 +26,7 @@ import (
runtimelog "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/radius-project/radius/pkg/armrpc/hostoptions"
"github.com/radius-project/radius/pkg/ucp/dataprovider"
"github.com/radius-project/radius/pkg/ucp/databaseprovider"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have both database and databaseprovider folders under ucp? I think this is the best practice, right? I am asking because I would create database under ucp and then provider under database.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm planning to rearrange these in the next PR 👍

I think it's a big improvement to name the package databaseprovider instead of provider. You'll notice that everywhere we reference these, they get aliased to something else.

queue "github.com/radius-project/radius/pkg/ucp/queue/client"
qprovider "github.com/radius-project/radius/pkg/ucp/queue/provider"
"github.com/radius-project/radius/pkg/ucp/queue/queueprovider"
Copy link
Contributor

Choose a reason for hiding this comment

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

Like here the queueprovider is under ucp/queue. I believe that this can be renamed to ucp/queue/provider but it is not in the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm planning to rearrange these in the next PR 👍

Comment on lines +24 to +26
"github.com/radius-project/radius/pkg/ucp/databaseprovider"
"github.com/radius-project/radius/pkg/ucp/queue/queueprovider"
"github.com/radius-project/radius/pkg/ucp/secret/secretprovider"
Copy link
Contributor

Choose a reason for hiding this comment

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

So, we renamed the queue/provider and secret/provider to queue/queueprovider and secret/secretprovider but kept databaseprovider under ucp. 🤨

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm planning to rearrange these in the next PR 👍

@radius-functional-tests
Copy link

radius-functional-tests bot commented Dec 17, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository rynowak/radius
Commit ref 4b37085
Unique ID func7e9e5e284e
Image tag pr-func7e9e5e284e
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • 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-func7e9e5e284e
  • 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-func7e9e5e284e
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func7e9e5e284e
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func7e9e5e284e
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func7e9e5e284e
  • 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 6281a2f into radius-project:main Dec 17, 2024
29 checks passed
@rynowak rynowak deleted the rynowak/rename-database branch December 17, 2024 18:05
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.

2 participants