Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into update-bicep-types-radius
Browse files Browse the repository at this point in the history
Signed-off-by: sk593 <shruthikumar@microsoft.com>
  • Loading branch information
sk593 committed Jun 4, 2024
2 parents 99888d1 + d1a55c9 commit 474af86
Show file tree
Hide file tree
Showing 34 changed files with 932 additions and 593 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/purge-test-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
name: Create issue for failing purge test resources run
needs: [purge_ghcr_dev, purge_azure_resources]
runs-on: ubuntu-latest
if: always() && ${{ github.event_name != 'workflow_dispatch' }} && (needs.purge_ghcr_dev.result == 'failure' || needs.purge_azure_resources.result == 'failure')
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
steps:
- uses: actions/github-script@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Radius is a cloud-native application platform that enables developers and the platform engineers that support them to collaborate on delivering and managing cloud-native applications that follow organizational best practices for cost, operations and security, by default. Radius is an open-source project that supports deploying applications across private cloud, Microsoft Azure, and Amazon Web Services, with more cloud providers to come.

Radius has been submitted for consideration as a Cloud Native Computing Foundation (CNCF) [Sandbox project](https://github.com/cncf/sandbox/issues/65).
Radius is a [Cloud Native Computing Foundation (CNCF) sandbox project](https://www.cncf.io/sandbox-projects/).

## Overview

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

## Using Standard Images in Tests

When writing tests for our applications, it's common to use standard images for resources like Redis, Mongo, and others. By default, specifying an image with `redis:latest` or similar tags will pull the image from Docker Hub. This behavior is due to Docker's default configuration, which automatically searches the Docker Hub registry for images when no other registry is specified.

We are transitioning to using images hosted in our public GitHub Container Registry (GHCR) repository. This change ensures more reliable access to the images needed for our tests and will help reduce potential issues caused by external dependencies.

### New Image Pull Guideline

Moving forward, we will pull standard test images from our public GHCR repository.

For example, moving forward, we will use:

```yaml
image: ghcr.io/radius-project/mirror/redis:latest
```

This change applies to all standard images. Please update any new tests accordingly.

### Adding Images to GHCR Repository

To add new images to the GHCR repository, you can follow these steps:

Our test pipelines operate on machines that utilize the AMD64 architecture. We need to pull the image from Docker that is compatible with this platform architecture.
For example:

Use the following command to pull an image for the AMD64 architecture:

```bash
docker pull --platform linux/amd64 redis:latest
```

After pulling the image, tag it with the GHCR path for Radius project:
```bash
docker tag redis:latest ghcr.io/radius-project/mirror/redis:latest
```

Push the image to the GHCR repository:
```bash
docker push ghcr.io/radius-project/mirror/redis:latest
```

This will upload the image to the Radius GHCR public repository, making it available for use.


### Setting Permissions for Images in GHCR

Once you have pushed images to the GHCR and tested them locally, it's important to set the appropriate permissions to ensure security and proper access control. By default, new images pushed to the GHCR are set to private. To make an image publicly readable or to restrict access, you will need to update permissions.

### Making Images Read-Only

To prevent unauthorized modifications, please set images to be read-only for everyone except maintainers, who will have admin permissions. This ensures that only authorized personnel can update or delete images.

### Steps to Update Image Permissions

1. Navigate to the GHCR page for the image. [Search Page](https://github.com/orgs/radius-project/packages)
2. Click on the "Package settings" wheel for the image.
3. In the "Manage access" section, add relevant repositories, codespace repositories and set their access level to Read.
4. Set image to be publicly accessible.
5. Grant "Admin" role to `maintainers-radius`.

#### Note: Adding a New Label to an existing image in ghcr.
If you need to add a new label to an image that's already hosted in the Radius GHCR repository [link](ghcr.io/radius-project/mirror/), please reach out to the maintainers-radius team to obtain `write` access permissions for the image repository.
8 changes: 5 additions & 3 deletions docs/contributing/contributing-releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Follow the steps below to create an RC release.

1. In the `radius-project/samples` repo, run the [Test Samples](https://github.com/radius-project/samples/actions/workflows/test.yaml) workflow. Run the workflow from the `edge` branch and using the Radius RC release version number being released.

> The `edge` branch needs to be upmerged with the previous release branch before this happens. To upmerge the `edge` branch, create a new branch off of the `edge` branch and run `git merge origin/v<previous-release-number>`. For example, if the current release is `v0.34`, the command would be `git merge origin/v0.33`. Then, push these changes to the new branch and create a PR against `edge`. Run the `Test Samples` workflow once the upmerge PR has been merged to `edge`.
> If this workflow run fails, then there should be further investigation. Try checking the logs to see what failed and why, and checking if there is already an issue open for this failure in the samples repo. Sometimes, the workflow run will fail because of flaky tests. Try re-running, and if the failure is persistent, then file an issue in the samples repo and raise it with the maintainers.
1. If these workflows pass, then the release candidate has been successfully created and validated. We can now proceed to creating the final release. If the workflows fail, then we need to fix the issues and create a new RC release.
Expand All @@ -80,7 +82,7 @@ Follow the steps below to create a final release.

1. Clone the [radius-project/bicep](https://github.com/radius-project/bicep) repo locally, or use your existing local copy.
```
git clone git@github.com:radius-project/radius.git
git clone git@github.com:radius-project/bicep.git
```

1. Create a new branch from `bicep-extensibility`.
Expand Down Expand Up @@ -153,7 +155,7 @@ Update it to reflect the new release version that we would like to release ([Exa

1. Download the Radius Bicep .vsix file from here: https://github.com/radius-project/bicep/releases. Scroll down to the most recent release and download the .vsix file.

1. Upload the Radius Bicep .vsix to the [VS marketplace](https://marketplace.visualstudio.com/manage). You may need access permissions, if so, ask a maintainer. Click on the ... for Radius Bicep, then Update, then upload the .vsix file. The site will verify it then the version number should be updated to the right one.
1. Upload the Radius Bicep .vsix to the [VS marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-azuretools). You may need access permissions, if so, ask @sk593 or @willdavsmith. Click on the ... for Radius Bicep, then Update, then upload the .vsix file. The site will verify it then the version number should be updated to the right one.

## Patching

Expand Down Expand Up @@ -201,5 +203,5 @@ Let's say we have a bug in a release that needs to be patched for an already-cre

1. Download the Radius Bicep .vsix file from here: https://github.com/radius-project/bicep/releases. Scroll down to the most recent release and download the .vsix file.

1. Upload the Radius Bicep .vsix to the [VS marketplace](https://marketplace.visualstudio.com/manage). You may need access permissions, if so, ask a maintainer. Click on the ... for Radius Bicep, then Update, then upload the .vsix file. The site will verify it then the version number should be updated to the right one.
1. Upload the Radius Bicep .vsix to the [VS marketplace](https://marketplace.visualstudio.com/manage/publishers/ms-azuretools). You may need access permissions, if so, ask @sk593 or @willdavsmith. Click on the ... for Radius Bicep, then Update, then upload the .vsix file. The site will verify it then the version number should be updated to the right one.
![alt text](image.png)
39 changes: 26 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.17.16
github.com/aws/aws-sdk-go-v2/service/cloudcontrol v1.18.8
github.com/aws/aws-sdk-go-v2/service/cloudformation v1.51.1
github.com/aws/aws-sdk-go-v2/service/ec2 v1.161.4
github.com/aws/aws-sdk-go-v2/service/ec2 v1.162.0
github.com/aws/aws-sdk-go-v2/service/sts v1.28.10
github.com/aws/smithy-go v1.20.2
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.26.3
github.com/charmbracelet/bubbletea v0.26.4
github.com/charmbracelet/lipgloss v0.11.0
github.com/charmbracelet/x/exp/teatest v0.0.0-20240408110044-525ba71bb562
github.com/dimchansky/utfbom v1.1.1
github.com/fatih/color v1.17.0
github.com/go-chi/chi/v5 v5.0.12
github.com/go-git/go-git/v5 v5.12.0
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/go-openapi/errors v0.22.0
Expand All @@ -39,12 +40,12 @@ require (
github.com/go-openapi/strfmt v0.23.0
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.20.0
github.com/go-playground/validator/v10 v10.21.0
github.com/gofrs/flock v0.8.1
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/gosuri/uilive v0.0.4
github.com/hashicorp/go-retryablehttp v0.7.6
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/hashicorp/hc-install v0.7.0
github.com/hashicorp/terraform-config-inspect v0.0.0-20240509232506-4708120f8f30
github.com/hashicorp/terraform-exec v0.21.0
Expand All @@ -58,13 +59,13 @@ require (
github.com/spaolacci/murmur3 v1.1.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/spf13/viper v1.19.0
github.com/stern/stern v1.30.0
github.com/stretchr/testify v1.9.0
github.com/vippsas/go-cosmosdb v0.0.0-20230118095602-f4e4b9f1c352
github.com/wI2L/jsondiff v0.5.2
go.etcd.io/etcd/client/v3 v3.5.13
go.etcd.io/etcd/server/v3 v3.5.13
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/server/v3 v3.5.14
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.52.0
go.opentelemetry.io/otel v1.27.0
Expand Down Expand Up @@ -99,45 +100,57 @@ require (
cloud.google.com/go/compute/metadata v0.3.0 // indirect
cloud.google.com/go/iam v1.1.8 // indirect
cloud.google.com/go/storage v1.40.0 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.12.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aws/aws-sdk-go v1.53.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/charmbracelet/x/ansi v0.1.1 // indirect
github.com/charmbracelet/x/ansi v0.1.2 // indirect
github.com/charmbracelet/x/exp/golden v0.0.0-20240408110044-525ba71bb562 // indirect
github.com/charmbracelet/x/input v0.1.0 // indirect
github.com/charmbracelet/x/term v0.1.1 // indirect
github.com/charmbracelet/x/windows v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/tidwall/gjson v1.17.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/tools v0.21.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.180.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

require (
Expand Down Expand Up @@ -282,11 +295,11 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
github.com/zclconf/go-cty v1.14.4 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
go.etcd.io/etcd/api/v3 v3.5.13 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect
go.etcd.io/etcd/client/v2 v2.305.13 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect
go.etcd.io/etcd/raft/v3 v3.5.13 // indirect
go.etcd.io/etcd/api/v3 v3.5.14 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect
go.etcd.io/etcd/client/v2 v2.305.14 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.14 // indirect
go.etcd.io/etcd/raft/v3 v3.5.14 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect
Expand Down
Loading

0 comments on commit 474af86

Please sign in to comment.