Skip to content
Open
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
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
//Programming languages
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/guiyomh/features/gotestsum:0.1.1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "24",
"pnpmVersion": "10"
},
"ghcr.io/devcontainers/features/python:1": {},
//Container and K8s
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
Expand Down
43 changes: 36 additions & 7 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,51 @@

set -e

# Install TypeSpec first to ensure the language server is available when the VS Code extension loads.
npm install -g @typespec/compiler
echo "============================================================================"
echo "Starting post-create setup..."
echo "============================================================================"

# Set SHELL for pnpm setup (not always set in devcontainer post-create context)
echo "Setting SHELL environment variable..."
export SHELL="${SHELL:-/bin/bash}"

# Adding workspace as safe directory to avoid permission issues
echo "Adding workspace as git safe directory..."
git config --global --add safe.directory /workspaces/radius

# Configure pnpm global bin directory
echo "Configuring pnpm global bin directory..."
pnpm setup
export PNPM_HOME="$HOME/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"

# Configure pnpm store directory inside the container to avoid hard-link issues
# with mounted workspace filesystem (hard links cannot cross filesystem boundaries)
echo "Configuring pnpm store directory..."
pnpm config set store-dir /tmp/.pnpm-store

# Prerequisites for Code Generation, see https://github.com/radius-project/radius/tree/main/docs/contributing/contributing-code/contributing-code-prerequisites#code-generation
echo "Setting up TypeSpec dependencies..."
(cd typespec && pnpm install)

echo "Installing autorest globally..."
pnpm add -g [email protected] --allow-build=autorest

echo "Installing oav globally..."
pnpm add -g [email protected]

# Install the binary form of golangci-lint, as recommended
# https://golangci-lint.run/welcome/install/#local-installation
echo "Installing golangci-lint v2.8.0..."
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.8.0

# Other go tools
echo "Installing controller-gen..."
go install sigs.k8s.io/controller-tools/cmd/[email protected]

echo "Installing mockgen..."
go install go.uber.org/mock/[email protected]

# Prerequisites for Code Generation, see https://github.com/radius-project/radius/tree/main/docs/contributing/contributing-code/contributing-code-prerequisites#code-generation
cd typespec || exit
npm ci
npm install -g [email protected]
npm install -g [email protected]
echo "============================================================================"
echo "Post-create setup completed successfully!"
echo "============================================================================"
23 changes: 19 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,32 @@ updates:
schedule:
interval: weekly

- package-ecosystem: gitsubmodule
directory: /
- package-ecosystem: npm
directory: /typespec
schedule:
interval: weekly
groups:
typespec:
applies-to: version-updates
patterns:
- "*"

- package-ecosystem: npm
directory: /typespec
directory: /hack/bicep-types-radius/src/autorest.bicep
schedule:
interval: weekly
groups:
typespec:
autorest-bicep:
applies-to: version-updates
patterns:
- "*"

- package-ecosystem: npm
directory: /hack/bicep-types-radius/src/generator
schedule:
interval: weekly
groups:
bicep-generator:
applies-to: version-updates
patterns:
- "*"
9 changes: 5 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ jobs:
if: needs.changes.outputs.only_changed != 'true'
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Setup Go
Expand Down Expand Up @@ -209,7 +208,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Setup Python
Expand Down Expand Up @@ -366,7 +364,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Setup Python
Expand All @@ -389,6 +386,11 @@ jobs:
with:
node-version-file: .node-version

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Generate Bicep extensibility types from OpenAPI specs
run: |
make generate-bicep-types VERSION=${{ env.REL_CHANNEL == 'edge' && 'latest' || env.REL_CHANNEL }}
Expand Down Expand Up @@ -433,7 +435,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Setup Python
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ jobs:
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
submodules: recursive

- name: Setup Go
if: matrix.language == 'go'
Expand All @@ -107,6 +106,12 @@ jobs:
with:
node-version-file: .node-version

- name: Setup pnpm
if: matrix.language == 'javascript'
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Initialize CodeQL
if: ${{ !startsWith(matrix.language, 'custom-') }}
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/functional-test-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Set DE image and tag (repository_dispatch from deployment-engine.run-functional-tests)
Expand Down Expand Up @@ -279,15 +278,13 @@ jobs:
with:
repository: ${{ env.CHECKOUT_REPO }}
ref: ${{ env.CHECKOUT_REF }}
submodules: recursive
persist-credentials: false

- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: ${{ env.CHECKOUT_REPO }}
ref: ${{ env.CHECKOUT_REF }}
submodules: recursive
persist-credentials: false

- name: Setup Go
Expand Down Expand Up @@ -582,7 +579,6 @@ jobs:
with:
repository: ${{ env.CHECKOUT_REPO }}
ref: ${{ env.CHECKOUT_REF }}
submodules: recursive
persist-credentials: false

- name: Checkout Samples repository
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/functional-test-noncloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Checkout samples repo
Expand All @@ -229,6 +228,11 @@ jobs:
with:
node-version-file: .node-version

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Generate Bicep extensibility types from OpenAPI specs
run: |
make generate-bicep-types VERSION=${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Setup Go
Expand All @@ -70,17 +69,22 @@ jobs:
with:
node-version-file: .node-version

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Install TypeSpec compiler
run: |
pushd typespec
npm ci
pnpm install --frozen-lockfile
popd

- name: Install autorest
run: npm install -g [email protected]
run: pnpm add -g [email protected] --allow-build=autorest

- name: Install oav
run: npm install -g [email protected]
run: pnpm add -g [email protected]

- name: Install mockgen
run: go install go.uber.org/mock/[email protected]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/long-running-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: recursive
persist-credentials: false

- name: Checkout samples repo
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
with:
repository: radius-project/radius
path: radius
submodules: recursive
persist-credentials: false

- name: Setup Python
Expand Down Expand Up @@ -89,17 +88,22 @@ jobs:
with:
node-version-file: radius/.node-version

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Install TypeSpec compiler
run: |
pushd radius/typespec
npm ci
pnpm install --frozen-lockfile
popd

- name: Install autorest
run: npm install -g [email protected]
run: pnpm add -g [email protected] --allow-build=autorest

- name: Install oav
run: npm install -g [email protected]
run: pnpm add -g [email protected]

- name: Install mockgen
run: |
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: true
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: .node-version

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10

- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
Expand All @@ -79,7 +83,7 @@ jobs:
run: |
if ! command -v npx &> /dev/null; then
echo "npx not found, installing..."
npm install -g npx
pnpm add -g npx
else
echo "npx is already installed"
fi
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"terminal.integrated.env.windows": {
"RADIUS_DEV_ROOT": "${workspaceFolder}/debug_files"
},
"makefile.configureOnOpen": false
"makefile.configureOnOpen": false,
"typespec.tsp-server.path": "${workspaceFolder}/typespec/node_modules/@typespec/compiler"
}
1 change: 0 additions & 1 deletion bicep-types
Submodule bicep-types deleted from 556bf5
7 changes: 1 addition & 6 deletions build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ export CGO_ENABLED=0
##@ Build

.PHONY: build
build: check-bicep-types-submodule build-packages build-binaries build-bicep ## Builds all packages and binaries.

.PHONY: check-bicep-types-submodule
check-bicep-types-submodule: ## Checks if bicep-types submodule exists and is at the correct version.
@git submodule status bicep-types | grep -q '^-' && { echo "$(ARROW) Error: The bicep-types submodule is not initialized."; echo "$(ARROW) Please run: git submodule update --init --recursive"; exit 1; } || true
@git submodule status bicep-types | grep -q '^+' && { echo "$(ARROW) Warning: The bicep-types submodule is not at the expected commit."; echo "$(ARROW) Please run: git submodule update --init --recursive"; exit 1; } || true
build: build-packages build-binaries build-bicep ## Builds all packages and binaries.

.PHONY: build-packages
build-packages: ## Builds all go packages.
Expand Down
Loading
Loading