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

Changes for creating env namspace on the server side and functional test for validating existing keyword with portable resources. #8917

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

vishwahiremat
Copy link
Contributor

@vishwahiremat vishwahiremat commented Mar 19, 2025

  • Environment name is only created when env is created using rad env create command and when created using bicep. So added changes to move namespace creation logic to server side.
  • Added functional tests to validate the existing keyword with portable resources.

Description

Please explain the changes you've made.

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).
  • This pull request adds or changes features of Radius and has an approved issue (issue link required).
  • 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).

Fixes: #8464

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.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

Sorry, something went wrong.

…alidating existing capability with portable resources

Signed-off-by: Vishwanath Hiremath <[email protected]>
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 55.72%. Comparing base (207b9f7) to head (56f274d).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...ntroller/environments/createorupdateenvironment.go 66.66% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8917      +/-   ##
==========================================
+ Coverage   55.65%   55.72%   +0.06%     
==========================================
  Files         599      602       +3     
  Lines       40750    41176     +426     
==========================================
+ Hits        22681    22944     +263     
- Misses      16351    16479     +128     
- Partials     1718     1753      +35     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
merge
Signed-off-by: Vishwanath Hiremath <[email protected]>
fix typo
Signed-off-by: Vishwanath Hiremath <[email protected]>
typo fic
Signed-off-by: Vishwanath Hiremath <[email protected]>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Mar 20, 2025

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref d86b76e
Unique ID funcecf4e269e5
Image tag pr-funcecf4e269e5
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-funcecf4e269e5
  • 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-funcecf4e269e5
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcecf4e269e5
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcecf4e269e5
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcecf4e269e5
  • 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

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Mar 20, 2025

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref d278eab
Unique ID func6c16e31b86
Image tag pr-func6c16e31b86
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-func6c16e31b86
  • 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-func6c16e31b86
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func6c16e31b86
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func6c16e31b86
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func6c16e31b86
  • 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

@vishwahiremat vishwahiremat marked this pull request as ready for review March 20, 2025 20:52
@vishwahiremat vishwahiremat requested review from a team as code owners March 20, 2025 20:52
Signed-off-by: Vishwanath Hiremath <[email protected]>
@ytimocin
Copy link
Contributor

Have you checked this issue @vishwahiremat? I was running into an issue where namespace wasn't being created during rad deploy env.bicep.

@vishwahiremat
Copy link
Contributor Author

vishwahiremat commented Mar 20, 2025

Have you checked this issue @vishwahiremat? I was running into an issue where namespace wasn't being created during rad deploy env.bicep.

this PR will fix this issue, it will create a kubernetes namespace for the environment when env is created using bicep file.

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

We need to add namespace check to functional and unit tests. Bicep file name also needs to be changed.

@@ -114,3 +114,58 @@ func Test_MongoDB_Recipe(t *testing.T) {

test.Test(t)
}

func Test_MongoDB_Recipe_Existing(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do we test that the namespace exists? Can we also use a better (more specific) naming for the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

Name needs to be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the name

Copy link
Contributor

Choose a reason for hiding this comment

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

Where did we add the namespace check to the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added the check for namespace in the unit tests

Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[email protected]>
test
Signed-off-by: Vishwanath Hiremath <[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
Development

Successfully merging this pull request may close these issues.

Kubernetes namespace for the environment is not being created during deployment
3 participants