Skip to content

Commit 9c87b6a

Browse files
authored
Merge branch 'master' into feat/interact-with-kubernetes-dapr-apps
2 parents 8df3681 + c7c2b2d commit 9c87b6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2136
-765
lines changed

.devcontainer/devcontainer.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "Dapr CLI Dev Environment",
3+
// Update the container version when you publish dev-container
4+
"image": "docker.io/daprio/dapr-dev:0.1.6a",
5+
// Replace with uncommented line below to build your own local copy of the image
6+
// "dockerFile": "../docker/Dockerfile-dev",
7+
"containerEnv": {
8+
// Uncomment to overwrite devcontainer .kube/config and .minikube certs with the localhost versions
9+
// each time the devcontainer starts, if the respective .kube-localhost/config and .minikube-localhost
10+
// folders respectively are bind mounted to the devcontainer.
11+
// "SYNC_LOCALHOST_KUBECONFIG": "true",
12+
13+
// Uncomment to disable docker-in-docker and automatically proxy default /var/run/docker.sock to
14+
// the localhost bind-mount /var/run/docker-host.sock.
15+
// "BIND_LOCALHOST_DOCKER": "true"
16+
},
17+
"extensions": [
18+
"davidanson.vscode-markdownlint",
19+
"golang.go",
20+
"ms-azuretools.vscode-dapr",
21+
"ms-azuretools.vscode-docker",
22+
"ms-kubernetes-tools.vscode-kubernetes-tools"
23+
],
24+
"mounts": [
25+
// Mount docker-in-docker library volume
26+
"type=volume,source=dind-var-lib-docker,target=/var/lib/docker",
27+
28+
// Bind mount docker socket under an alias to support docker-from-docker
29+
"type=bind,source=/var/run/docker.sock,target=/var/run/docker-host.sock",
30+
31+
// Uncomment to clone local .kube/config into devcontainer
32+
// "type=bind,source=${env:HOME}${env:USERPROFILE}/.kube,target=/home/dapr/.kube-localhost",
33+
34+
// Uncomment to additionally clone minikube certs into devcontainer for use with .kube/config
35+
// "type=bind,source=${env:HOME}${env:USERPROFILE}/.minikube,target=/home/dapr/.minikube-localhost"
36+
],
37+
// Always run image-defined default command
38+
"overrideCommand": false,
39+
// As a workaround for Codespaces not supporting workspaceFolder/workspace mount, create
40+
// a symlink from /workspaces/cli to /go/src/github.com/dapr/cli
41+
"postCreateCommand": "bash /usr/local/share/setup-gopath.sh cli",
42+
// On Linux, this will prevent new files getting created as root, but you
43+
// may need to update the USER_UID and USER_GID in docker/Dockerfile-dev
44+
// to match your user if not 1000.
45+
"remoteUser": "dapr",
46+
"runArgs": [
47+
// Enable ptrace-based debugging for go
48+
"--cap-add=SYS_PTRACE",
49+
"--security-opt",
50+
"seccomp=unconfined",
51+
52+
// Uncomment to bind to host network for local devcontainer; this is necessary if using the
53+
// bind-mounted /var/run/docker-host.sock directly.
54+
// "--net=host",
55+
56+
// Enable docker-in-docker configuration. Comment out if not using for better security.
57+
"--privileged",
58+
59+
// Run the entrypoint defined in container image.
60+
"--init"
61+
],
62+
"settings": {
63+
"terminal.integrated.defaultProfile.linux": "bash",
64+
},
65+
"workspaceFolder": "/go/src/github.com/dapr/cli",
66+
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/go/src/github.com/dapr/cli",
67+
}
+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Copyright 2021 The Dapr Authors
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
14+
name: dapr-bot-schedule
15+
16+
on:
17+
schedule:
18+
- cron: '*/10 * * * *'
19+
workflow_dispatch:
20+
jobs:
21+
prune_stale:
22+
name: Prune Stale
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Prune Stale
26+
uses: actions/[email protected]
27+
with:
28+
repo-token: ${{ secrets.DAPR_BOT_TOKEN }}
29+
# Different amounts of days for issues/PRs are not currently supported but there is a PR
30+
# open for it: https://github.com/actions/stale/issues/214
31+
days-before-stale: 30
32+
days-before-close: 7
33+
stale-issue-message: >
34+
This issue has been automatically marked as stale because it has not had activity in the
35+
last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity
36+
occurs. Thank you for your contributions.
37+
close-issue-message: >
38+
This issue has been automatically closed because it has not had activity in the
39+
last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved.
40+
Thank you for your contributions.
41+
stale-pr-message: >
42+
This pull request has been automatically marked as stale because it has not had
43+
activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please
44+
feel free to give a status update now, ping for review, or re-open when it's ready.
45+
Thank you for your contributions!
46+
close-pr-message: >
47+
This pull request has been automatically closed because it has not had
48+
activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
49+
Thank you for your contributions!
50+
stale-issue-label: 'stale'
51+
exempt-issue-labels: 'pinned,good first issue,help wanted,triaged/resolved'
52+
stale-pr-label: 'stale'
53+
exempt-pr-labels: 'pinned'
54+
operations-per-run: 500
55+
ascending: true

.github/workflows/dapr_cli.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
name: Build ${{ matrix.target_os }}_${{ matrix.target_arch }} binaries
3030
runs-on: ${{ matrix.os }}
3131
env:
32-
GOVER: 1.16
33-
GOLANG_CI_LINT_VER: v1.31
32+
GOVER: 1.17
33+
GOLANG_CI_LINT_VER: v1.44.2
3434
GOOS: ${{ matrix.target_os }}
3535
GOARCH: ${{ matrix.target_arch }}
3636
GOPROXY: https://proxy.golang.org

.github/workflows/fossa.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#
2+
# Copyright 2021 The Dapr Authors
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
#
13+
14+
name: fossa
15+
on:
16+
push:
17+
branches:
18+
- master
19+
- release-*
20+
- feature/*
21+
tags:
22+
- v*
23+
pull_request:
24+
branches:
25+
- master
26+
- release-*
27+
- feature/*
28+
workflow_dispatch: {}
29+
jobs:
30+
fossa-scan:
31+
if: github.repository_owner == 'dapr' # FOSSA is not intended to run on forks.
32+
runs-on: ubuntu-latest
33+
env:
34+
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@v2
38+
39+
- name: "Run FOSSA Scan"
40+
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
41+
with:
42+
api-key: ${{ env.FOSSA_API_KEY }}
43+
44+
- name: "Run FOSSA Test"
45+
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
46+
with:
47+
api-key: ${{ env.FOSSA_API_KEY }}
48+
run-tests: true

.github/workflows/kind_e2e.yaml

+38-17
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,43 @@ jobs:
4545
name: E2E tests for K8s (KinD)
4646
runs-on: ubuntu-latest
4747
env:
48-
GOVER: 1.16
48+
GOVER: 1.17
49+
DAPR_RUNTIME_VERSION: 1.6.0
50+
DAPR_DASHBOARD_VERSION: 0.9.0
4951
strategy:
5052
fail-fast: false # Keep running if one leg fails.
5153
matrix:
5254
k8s-version:
53-
- v1.19.11
54-
- v1.20.7
55-
- v1.21.1
55+
- v1.20.15
56+
- v1.21.10
57+
- v1.22.7
58+
- v1.23.4
5659
mode:
5760
- ha
5861
- non-ha
5962
# Map between K8s and KinD versions.
6063
# This is attempting to make it a bit clearer what's being tested.
61-
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.11.0
64+
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.12.0
6265
include:
63-
- k8s-version: v1.19.11
64-
kind-version: v0.11.0
65-
kind-image-sha: sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729
66-
- k8s-version: v1.20.7
67-
kind-version: v0.11.0
68-
kind-image-sha: sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9
69-
- k8s-version: v1.21.1
70-
kind-version: v0.11.0
71-
kind-image-sha: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
66+
- k8s-version: v1.20.15
67+
kind-version: v0.12.0
68+
kind-image-sha: sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb
69+
- k8s-version: v1.21.10
70+
kind-version: v0.12.0
71+
kind-image-sha: sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
72+
- k8s-version: v1.22.7
73+
kind-version: v0.12.0
74+
kind-image-sha: sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
75+
- k8s-version: v1.23.4
76+
kind-version: v0.12.0
77+
kind-image-sha: sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
7278
exclude:
73-
- k8s-version: v1.19.11
79+
- k8s-version: v1.20.15
7480
mode: non-ha
75-
- k8s-version: v1.20.7
81+
- k8s-version: v1.21.10
7682
mode: non-ha
83+
- k8s-version: v1.22.7
84+
mode: non-ha
7785
steps:
7886
- name: Set up Go ${{ env.GOVER }}
7987
uses: actions/setup-go@v2
@@ -129,7 +137,20 @@ jobs:
129137
- name: Free up some diskspace
130138
run: |
131139
docker image prune -a -f
132-
140+
- name: Determine latest Dapr Runtime version including Pre-releases
141+
if: github.base_ref == 'master'
142+
run: |
143+
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
144+
echo "DAPR_RUNTIME_VERSION=$RUNTIME_VERSION" >> $GITHUB_ENV
145+
echo "Found $RUNTIME_VERSION"
146+
shell: bash
147+
- name: Determine latest Dapr Dashboard version including Pre-releases
148+
if: github.base_ref == 'master'
149+
run: |
150+
helm pull dapr/dapr --untar && export DASHBOARD_VERSION=$(cat ./dapr/charts/dapr_dashboard/Chart.yaml | grep version | awk '{ print $2; exit }') && rm -rf dapr
151+
echo "DAPR_DASHBOARD_VERSION=$DASHBOARD_VERSION" >> $GITHUB_ENV
152+
echo "Found $DASHBOARD_VERSION"
153+
shell: bash
133154
- name: Run tests
134155
run: |
135156
export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-kind.json

.github/workflows/self_hosted_e2e.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ jobs:
3030
name: Run Self-Hosted E2E tests in ${{ matrix.target_os }}_${{ matrix.target_arch }}
3131
runs-on: ${{ matrix.os }}
3232
env:
33-
GOVER: 1.16
33+
GOVER: 1.17
3434
GOOS: ${{ matrix.target_os }}
3535
GOARCH: ${{ matrix.target_arch }}
3636
GOPROXY: https://proxy.golang.org
3737
ARCHIVE_OUTDIR: dist/archives
38+
DAPR_RUNTIME_VERSION: "1.6.0"
39+
DAPR_DASHBOARD_VERSION: 0.9.0
40+
CUSTOM_IMAGE_REGISTRY: docker.io
3841
strategy:
3942
matrix:
4043
os: [ubuntu-latest, macos-latest]
@@ -59,6 +62,20 @@ jobs:
5962
with:
6063
docker_buildx: false
6164
docker_version: 20.10
65+
- name: Determine latest Dapr Runtime version including Pre-releases
66+
if: github.base_ref == 'master'
67+
run: |
68+
helm repo add dapr https://dapr.github.io/helm-charts/ && helm repo update && export RUNTIME_VERSION=$(helm search repo dapr/dapr --devel --versions | awk '/dapr\/dapr/ {print $3; exit}' )
69+
echo "DAPR_RUNTIME_VERSION=$RUNTIME_VERSION" >> $GITHUB_ENV
70+
echo "Found $RUNTIME_VERSION"
71+
shell: bash
72+
- name: Determine latest Dapr Dashboard version including Pre-releases
73+
if: github.base_ref == 'master'
74+
run: |
75+
helm pull dapr/dapr --untar && export DASHBOARD_VERSION=$(cat ./dapr/charts/dapr_dashboard/Chart.yaml | grep version | awk '{ print $2; exit }') && rm -rf dapr
76+
echo "DAPR_DASHBOARD_VERSION=$DASHBOARD_VERSION" >> $GITHUB_ENV
77+
echo "Found $DASHBOARD_VERSION"
78+
shell: bash
6279
- name: Run E2E tests
6380
run: |
6481
export TEST_OUTPUT_FILE=$GITHUB_WORKSPACE/test-e2e-standalone.json

.github/workflows/upgrade_e2e.yaml

+22-16
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,40 @@ jobs:
4545
name: Upgrade path tests (KinD)
4646
runs-on: ubuntu-latest
4747
env:
48-
GOVER: 1.16
48+
GOVER: 1.17
4949
strategy:
5050
fail-fast: false # Keep running if one leg fails.
5151
matrix:
5252
k8s-version:
53-
- v1.19.11
54-
- v1.20.7
55-
- v1.21.1
53+
- v1.20.15
54+
- v1.21.10
55+
- v1.22.7
56+
- v1.23.4
5657
mode:
5758
- ha
5859
- non-ha
5960
# Map between K8s and KinD versions.
6061
# This is attempting to make it a bit clearer what's being tested.
61-
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.11.0
62+
# See: https://github.com/kubernetes-sigs/kind/releases/tag/v0.12.0
6263
include:
63-
- k8s-version: v1.19.11
64-
kind-version: v0.11.0
65-
kind-image-sha: sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729
66-
- k8s-version: v1.20.7
67-
kind-version: v0.11.0
68-
kind-image-sha: sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9
69-
- k8s-version: v1.21.1
70-
kind-version: v0.11.0
71-
kind-image-sha: sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
64+
- k8s-version: v1.20.15
65+
kind-version: v0.12.0
66+
kind-image-sha: sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb
67+
- k8s-version: v1.21.10
68+
kind-version: v0.12.0
69+
kind-image-sha: sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c
70+
- k8s-version: v1.22.7
71+
kind-version: v0.12.0
72+
kind-image-sha: sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166
73+
- k8s-version: v1.23.4
74+
kind-version: v0.12.0
75+
kind-image-sha: sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9
7276
exclude:
73-
- k8s-version: v1.19.11
77+
- k8s-version: v1.20.15
7478
mode: non-ha
75-
- k8s-version: v1.20.7
79+
- k8s-version: v1.21.10
80+
mode: non-ha
81+
- k8s-version: v1.22.7
7682
mode: non-ha
7783
steps:
7884
- name: Set up Go ${{ env.GOVER }}

.golangci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,16 @@ linters:
246246
- exhaustive
247247
- gci
248248
- noctx
249+
- exhaustivestruct
250+
- gomoddirectives
251+
- paralleltest
252+
- tparallel
253+
- wastedassign
254+
- cyclop
255+
- forbidigo
256+
- tagliatelle
257+
- thelper
258+
- wrapcheck
259+
- varnamelen
260+
- forcetypeassert
261+
- ireturn

0 commit comments

Comments
 (0)