Skip to content

Commit

Permalink
Upmerge to edge (#1864)
Browse files Browse the repository at this point in the history
* Update samples for

* Fix samples test issue with release channel version (#1850)

* adding channel to install-rad functionality

Signed-off-by: willdavsmith <[email protected]>

* adding channel to install-rad functionality

Signed-off-by: willdavsmith <[email protected]>

---------

Signed-off-by: willdavsmith <[email protected]>

* Fix purge AWS resources workflow (#1703)

* Upmerge fix (#1649)

* Fix error when no branch changes

Signed-off-by: Brooke Hamilton <[email protected]>

* Remove extra commit

Signed-off-by: Brooke Hamilton <[email protected]>

* Add comments

Signed-off-by: Brooke Hamilton <[email protected]>

* Fix branch name env var

Signed-off-by: Brooke Hamilton <[email protected]>

* Clarify comments

Signed-off-by: Brooke Hamilton <[email protected]>

* Add example

Signed-off-by: Brooke Hamilton <[email protected]>

---------

Signed-off-by: Brooke Hamilton <[email protected]>

* Fix purge aws resources workflow

Signed-off-by: willdavsmith <[email protected]>

---------

Signed-off-by: Brooke Hamilton <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
Co-authored-by: Brooke Hamilton <[email protected]>

* Bump webpack from 5.88.2 to 5.94.0 in /samples/demo/client (#1744)

Bumps [webpack](https://github.com/webpack/webpack) from 5.88.2 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.88.2...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <[email protected]>

* Bump body-parser and express in /samples/demo (#1852)

Bumps [body-parser](https://github.com/expressjs/body-parser) to 1.20.3 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump micromatch from 4.0.5 to 4.0.8 in /samples/demo/client (#1745)

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <[email protected]>

* Bump body-parser and express in /samples/dapr/nodeapp (#1854)

Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](expressjs/body-parser@1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: direct:production
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <[email protected]>

* Bump path-to-regexp and express in /samples/demo/client (#1819)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v0.1.7...v0.1.10)

Updates `express` from 4.19.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](expressjs/express@4.19.2...4.21.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <[email protected]>

* Bump rollup from 2.79.1 to 2.79.2 in /samples/demo/client (#1856)

Bumps [rollup](https://github.com/rollup/rollup) from 2.79.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v2.79.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: willdavsmith <[email protected]>
Signed-off-by: Brooke Hamilton <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Will Smith <[email protected]>
Co-authored-by: Brooke Hamilton <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <[email protected]>
  • Loading branch information
5 people authored Oct 9, 2024
1 parent 3af0fcf commit 832700c
Show file tree
Hide file tree
Showing 8 changed files with 1,156 additions and 621 deletions.
23 changes: 21 additions & 2 deletions .github/scripts/install-radius.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -xe

# VERSION is the version of the rad CLI to download
# e.g. 0.1, 0.1.0, 0.1.0-rc1, edge
VERSION=$1
RAD_CLI_URL=https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.sh
RAD_CLI_EDGE_URL=ghcr.io/radius-project/rad/linux-amd64:latest
Expand All @@ -26,8 +28,25 @@ if [[ $VERSION == "edge" ]]; then
chmod +x ./rad
mv ./rad /usr/local/bin/rad
elif [[ -n $VERSION ]]; then
echo Downloading rad CLI version $VERSION
wget -q $RAD_CLI_URL -O - | /bin/bash -s $VERSION
RADIUS_VERSION=$VERSION
# if version is a channel, e.g. 0.1
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then
echo "Querying the most recent version of the specified channel: $VERSION"
RADIUS_VERSION=$(curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/radius-project/radius/releases | jq -r '.[] | .tag_name | select(startswith("v'$VERSION'"))' | head -n 1)
echo "Found version $RADIUS_VERSION"
if [[ -z "$RADIUS_VERSION" ]]; then
echo "No releases found for channel $VERSION"
exit 1
fi
else
echo "The string does not match the pattern [anynumber].[anynumber]"
fi

# remove the 'v' prefix
RADIUS_VERSION=$(echo $RADIUS_VERSION | cut -d "v" -f 2)

echo Downloading rad CLI version $RADIUS_VERSION
wget -q $RAD_CLI_URL -O - | /bin/bash -s $RADIUS_VERSION
else
echo Downloading latest rad CLI
wget -q $RAD_CLI_URL -O - | /bin/bash
Expand Down
34 changes: 26 additions & 8 deletions .github/scripts/purge-aws-eks-clusters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#!/bin/bash

set -ex

# Current time in seconds since epoch
current_time=$(date +%s)

Expand All @@ -24,15 +26,31 @@ age_limit=$((6 * 3600))

echo "Starting cluster purge script."

# List clusters and their creation times, filter and delete those older than 6 hours and starting with 'eks-samplestest-'
aws eks list-clusters --query "clusters[]" --output text | xargs -I {} aws eks describe-cluster --name {} --query "cluster.{name: name, createdAt: createdAt}" --output text | while read -r created_at name; do
# Convert creation time to seconds since the epoch
# Remove milliseconds and adjust timezone format from "-07:00" to "-0700"
formatted_created_at="${created_at%.*}${created_at##*.}"
formatted_created_at="${formatted_created_at%:*}${formatted_created_at##*:}"
# List clusters
clusters=$(aws eks list-clusters --query "clusters[]" --output text)

# Loop through each cluster
for cluster in $clusters; do
# Get the creation time and name of the cluster
cluster_info=$(aws eks describe-cluster --name "$cluster" --query "cluster.{name: name, createdAt: createdAt}" --output text)
created_at=$(echo "$cluster_info" | awk '{print $1}')
name=$(echo "$cluster_info" | awk '{print $2}')

# Ensure created_at is in the correct format
created_at=$(echo "$created_at" | sed 's/\.[0-9]*Z//')

# Convert creation time to seconds
created_at_seconds=$(date -d "$formatted_created_at" +%s)
# Convert creation time to seconds since the epoch using date
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
if ! command -v gdate &> /dev/null; then
echo "gdate could not be found. Please install coreutils: brew install coreutils"
exit 1
fi
created_at_seconds=$(gdate -d "$created_at" +%s)
else
# Linux
created_at_seconds=$(date -d "$created_at" +%s)
fi

# Calculate age in seconds
age=$((current_time - created_at_seconds))
Expand Down
6 changes: 3 additions & 3 deletions bicepconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"dynamicTypeLoading": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
"radius": "br:biceptypes.azurecr.io/radius:0.38",
"aws": "br:biceptypes.azurecr.io/aws:0.38"
},
"cloud": {
"credentialPrecedence": [ "Environment" ]
}
}
}
Loading

0 comments on commit 832700c

Please sign in to comment.