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

My e2e #8968

Closed
wants to merge 15 commits into from
Closed

My e2e #8968

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/functional-test-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ jobs:
},
"extensions": {
"radius": "br:${{ env.BICEP_TYPES_REGISTRY }}/test/radius:$RADIUS_VERSION",
"aws": "br:${{ env.BICEP_TYPES_REGISTRY }}/aws:latest"
"aws": "br:${{ env.BICEP_TYPES_REGISTRY }}/aws:latest",
"testresources": "br:${{ env.BICEP_TYPES_REGISTRY }}/testresources:latest"
}
}
EOF
Expand Down
69 changes: 60 additions & 9 deletions .github/workflows/functional-test-noncloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,7 @@ jobs:
os: [ubuntu-latest]
name:
[
cli-noncloud,
corerp-noncloud,
daprrp-noncloud,
kubernetes-noncloud,
msgrp-noncloud,
samples-noncloud,
ucp-noncloud,
datastoresrp-noncloud,
dynamicrp-noncloud,
]
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -358,7 +351,8 @@ jobs:
},
"extensions": {
"radius": "br:${{ env.LOCAL_REGISTRY_SERVER }}:${{ env.LOCAL_REGISTRY_PORT }}/radius:$RADIUS_VERSION",
"aws": "br:${{ env.BICEP_TYPES_REGISTRY }}/aws:latest"
"aws": "br:${{ env.BICEP_TYPES_REGISTRY }}/aws:latest",
"testresources": "br:${{ env.BICEP_TYPES_REGISTRY }}/testresources:latest"
}
}
EOF
Expand Down Expand Up @@ -394,6 +388,63 @@ jobs:
BICEP_RECIPE_TAG_VERSION: ${{ env.BICEP_RECIPE_TAG_VERSION }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOTESTSUM_OPTS: "--junitfile ./dist/functional_test/results.xml"

- name: Runing kube commnds
if: always()
run: |
which rad || { echo "cannot find rad"; exit 1; }

echo "rad workspace list"
rad workspace list

echo "rad group list"
rad group list

echo "rad env list"
rad env list

echo "rad app list"
rad app list

echo "rad resource list"
rad resource list Test.Resources/userTypeAlpha

echo "rad app show usertypealpha-recipe-app"
rad app show usertypealpha-recipe-app -o json

echo "rad resource show Test.Resources/userTypeAlpha usertypealpha123 "
rad resource show Test.Resources/userTypeAlpha usertypealpha123 -o json

echo "Get the list of all pods in the radius-system namespace"
kubectl get pods -n radius-system

echo "Get all namespace"
kubectl get ns

echo "Get all pods in applications namespace"
kubectl get all -n usertypealpha-recipe-app

kubectl get all -n default-usertypealpha-recipe-usertypealpha-recipe-app

- name: run rad commands
if: always()
run: |
# Get the list of all pods in the radius-system namespace
echo "rad workspace list"
rad workspace list
echo "rad group list"
rad group list
echo "rad env list"
rad env list
echo "rad app list"
rad app list
echo "rad resource list"
rad resource list Test.Resources/userTypeAlpha
echo "rad app show usertypealpha-recipe-app"
rad app show usertypealpha-recipe-app -o json
echo "rad resource show Test.Resources/userTypeAlpha usertypealpha123 "
rad resource show Test.Resources/userTypeAlpha usertypealpha123 -o json


- name: Process Functional Test Results
uses: ./.github/actions/process-test-results
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ vendor/
# Radius scaffolding
app.bicep
.rad/
bicepconfig.json
!bicepconfig.json
test/infra/azure/bicepconfig.json

# Build Output
bin/
Expand Down
24 changes: 14 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
// "preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/rad/main.go",
"cwd": "${workspaceFolder}",
"args": []
Expand All @@ -19,7 +19,7 @@
"type": "go",
"request": "launch",
"mode": "debug",
"preLaunchTask": "Build Radius (all)",
// "preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/rad",
"args": "${input:cliArgs}",
"console": "integratedTerminal"
Expand All @@ -29,31 +29,35 @@
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/applications-rp/main.go"
// "preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/applications-rp/main.go",
},
{
"name": "Launch Dynamic RP",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/dynamic-rp/main.go"
//"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/dynamic-rp/main.go",
"args": [
"--config-file",
"${workspaceFolder}/cmd/dynamic-rp/dynamicrp-dev.yaml",
],
},
{
"name": "Launch UCP",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/ucpd/main.go"
// "preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/ucpd/main.go",
},
{
"name": "Launch Controller",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
// "preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/controller/main.go",
"args": ["--cert-dir", ""]
},
Expand Down Expand Up @@ -97,7 +101,7 @@
"Launch Applications RP",
"Launch Dynamic RP",
"Launch Controller",
"Launch Deployment Engine"
// "Launch Deployment Engine"
],
"stopAll": true
}
Expand Down
3 changes: 2 additions & 1 deletion bicepconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
"aws": "br:biceptypes.azurecr.io/aws:latest",
"testresources": "br:biceptypes.azurecr.io/testresources:latest"
}
}
3 changes: 3 additions & 0 deletions build/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ test-functional-datastoresrp: test-functional-datastoresrp-noncloud ## Runs all
test-functional-datastoresrp-noncloud: ## Runs Datastores RP functional tests that do not require cloud resources
CGO_ENABLED=1 $(GOTEST_TOOL) ./test/functional-portable/datastoresrp/noncloud/... -timeout ${TEST_TIMEOUT} -v -parallel 3 $(GOTEST_OPTS)

test-functional-dynamicrp-noncloud: ## Runs Dynamic RP functional tests that do not require cloud resources
CGO_ENABLED=1 $(GOTEST_TOOL) ./test/functional-portable/dynamicrp/noncloud/... -timeout ${TEST_TIMEOUT} -v -parallel 2 $(GOTEST_OPTS)

test-functional-samples: test-functional-samples-noncloud ## Runs all Samples functional tests

test-functional-samples-noncloud: ## Runs Samples functional tests that do not require cloud resources
Expand Down
14 changes: 12 additions & 2 deletions build/validate-bicep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ FILES=$(find . -type f -name "*.bicep")
# Get the first bicep file with Radius and AWS extensions from the list to restore extensions
FIRST_FILE_RAD=""
FIRST_FILE_AWS=""
FIRST_FILE_TESTRESOURCES=""
for F in $FILES
do
# Check if the file contains the word "extension radius"
Expand All @@ -20,10 +21,15 @@ do
if [ -z "$FIRST_FILE_AWS" ] && grep -q "extension aws" "$F"; then
FIRST_FILE_AWS="$F"
fi
# Break the loop if both files are found
if [ -n "$FIRST_FILE_RAD" ] && [ -n "$FIRST_FILE_AWS" ]; then
# Check if the file contains the word "extension testresources"
if [ -z "$FIRST_FILE_TESTRESOURCES" ] && grep -q "extension testresources" "$F"; then
FIRST_FILE_TESTRESOURCES="$F"
fi
# Break the loop if all three extensions are found
if [ -n "$FIRST_FILE_RAD" ] && [ -n "$FIRST_FILE_AWS" ] && [ -n "$FIRST_FILE_TESTRESOURCES" ]; then
break
fi

done

# Restore the extensions once
Expand All @@ -35,6 +41,10 @@ echo "running AWS: $BICEP_PATH build $FIRST_FILE_AWS"
STDERR=$($BICEP_PATH build $FIRST_FILE_AWS --stdout 2>&1 1>/dev/null)
echo "Restoring AWS extension with response: $STDERR..."

echo "running TestResources: $BICEP_PATH build $FIRST_FILE_TESTRESOURCES"
STDERR=$($BICEP_PATH build $FIRST_FILE_TESTRESOURCES --stdout 2>&1 1>/dev/null)
echo "Restoring TestResources extension with response: $STDERR..."

FAILURES=()
WARNINGS=()
for F in $FILES
Expand Down
15 changes: 15 additions & 0 deletions deploy/Chart/templates/dynamic-rp/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ rules:
- patch
- update
- watch

- apiGroups:
- apps
resources:
- deployments
- statefulsets
- replicasets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ param magpieimage string
param port int = 3000

@description('Specifies the environment for resources.')
param environment string
param environment string = 'default'

resource app 'Applications.Core/applications@2023-10-01-preview' = {
name: 'corerp-resources-container'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extension radius
param location string = 'local'

@description('Specifies the environment for resources.')
param environment string
param environment string = 'default'

@description('Specifies the port for the container resource.')
param port int = 3000
Expand All @@ -24,7 +24,7 @@ resource gateway 'Applications.Core/gateways@2023-10-01-preview' = {
name: 'http-gtwy-gtwy-dns'
location: location
properties: {
application: app.id
//application: app.id
routes: [
{
path: '/'
Expand All @@ -45,6 +45,9 @@ resource gateway 'Applications.Core/gateways@2023-10-01-preview' = {
}
}

https://github.com/radius-project/radius/actions/workflows/functional-test-cloud.yaml?query=workflow%3A+is%3Afailure+created%3A2025-02-02..2025-02-09+event%3Aschedule

https://github.com/radius-project/radius/actions/workflows/functional-test-noncloud.yaml?query=workflow%3A+is%3Afailure+created%3A2025-02-02..2025-02-09+event%3Aschedule
resource frontendcontainerdns 'Applications.Core/containers@2023-10-01-preview' = {
name: 'frontendcontainerdns'
location: location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ param magpieimage string

@description('Specifies tls cert secret values.')
@secure()
param tlscrt string
param tlscrt string = ''
@secure()
param tlskey string
param tlskey string = ''

resource app 'Applications.Core/applications@2023-10-01-preview' = {
name: 'corerp-resources-gateway-sslpassthrough'
Expand All @@ -34,7 +34,7 @@ resource gateway 'Applications.Core/gateways@2023-10-01-preview' = {
name: 'ssl-gtwy-gtwy'
location: location
properties: {
application: app.id
// application: app.id
tls: {
sslPassthrough: true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extension radius
param magpieimage string
param environment string
param magpieimage string = 'ghcr.io/radius-project/magpiego:latest'
param environment string = 'default'

resource app 'Applications.Core/applications@2023-10-01-preview' = {
name: 'dsrp-resources-redis-manual'
Expand Down Expand Up @@ -40,7 +40,7 @@ resource redisContainer 'Applications.Core/containers@2023-10-01-preview' = {
name: 'rds-ctnr'
location: 'global'
properties: {
application: app.id
// application: app.id
container: {
image: 'ghcr.io/radius-project/mirror/redis:6.2'
ports: {
Expand Down
Loading
Loading