Skip to content

Commit

Permalink
Merge branch 'master' into feature/more-resiliency-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
antontroshin authored Oct 17, 2024
2 parents 92dc48c + 3138e09 commit 90ee517
Show file tree
Hide file tree
Showing 105 changed files with 3,190 additions and 1,056 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/dapr-standalone-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,17 @@ jobs:
GOARCH: amd64
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install/install.sh
steps:
- name: Install required packages
run: pip3 install scipy psutil
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Upgrade pip
run: |
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
- name: Install required Python packages
run: |
python3 -m pip install numpy scipy psutil requests
# This is a good example where we want to always compare against the latest stable release.
# Pinning to a given Dapr version does not add any value in this workflow.
- name: Install latest Dapr CLI
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dapr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
target_arch: ["amd64"]
env:
GOLANGCILINT_VER: "v1.61.0"
PROTOC_VERSION: "24.4"
PROTOC_VERSION: "25.4"
GOOS: "${{ matrix.target_os }}"
GOARCH: "${{ matrix.target_arch }}"
GOPROXY: "https://proxy.golang.org"
Expand All @@ -60,6 +60,7 @@ jobs:
with:
go-version-file: "go.mod"
- name: Initialize CodeQL
if: github.event_name == 'pull_request'
uses: github/codeql-action/[email protected]
with:
languages: go
Expand Down Expand Up @@ -113,13 +114,15 @@ jobs:
make init-proto
make gen-proto check-proto-diff
- name: Perform CodeQL Analysis
if: github.event_name == 'pull_request'
uses: github/codeql-action/[email protected]
with:
ram: 4096


depcheck:
name: "Dependency Review"
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
48 changes: 43 additions & 5 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,52 @@ jobs:
df -h
echo "Removing large packages"
sudo apt-get update
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y 'temurin-*'
sudo apt-get remove -y microsoft-edge-stable azure-cli google-chrome-stable firefox powershell mono-devel
# check if pkgs exist before removing them
if dpkg -l | grep -q '^dotnet-.*'; then
sudo apt-get remove -y '^dotnet-.*'
fi
if dpkg -l | grep -q '^llvm-.*'; then
sudo apt-get remove -y '^llvm-.*'
fi
if dpkg -l | grep -q 'php.*'; then
sudo apt-get remove -y 'php.*'
fi
if dpkg -l | grep -q 'temurin-*'; then
sudo apt-get remove -y 'temurin-*'
fi
if dpkg -l | grep -q 'microsoft-edge-stable'; then
sudo apt-get remove -y microsoft-edge-stable
fi
if dpkg -l | grep -q 'azure-cli'; then
sudo apt-get remove -y azure-cli
fi

if dpkg -l | grep -q 'google-chrome-stable'; then
sudo apt-get remove -y google-chrome-stable
fi

if dpkg -l | grep -q 'firefox'; then
sudo apt-get remove -y firefox
fi

if dpkg -l | grep -q '^powershell'; then
sudo apt-get remove -y powershell
fi

if dpkg -l | grep -q 'mono-devel'; then
sudo apt-get remove -y mono-devel
fi

sudo apt-get autoremove -y
sudo apt-get clean
df -h

echo "Removing large directories"
# deleting 15GB
rm -rf /usr/share/dotnet/
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ PROTOC ?=protoc

# Version of "protoc" to use
# We must also specify a protobuf "suite" version from https://github.com/protocolbuffers/protobuf/releases
PROTOC_VERSION = 24.4
PROTOBUF_SUITE_VERSION = 24.4
PROTOC_VERSION = 25.4
PROTOBUF_SUITE_VERSION = 25.4

# name of protoc-gen-go when protoc-gen-go --version is run.
PROTOC_GEN_GO_NAME = "protoc-gen-go"
Expand Down
2 changes: 1 addition & 1 deletion charts/dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ helm uninstall dapr -n dapr-system
## Upgrade the charts
Follow the upgrade HowTo instructions in [Upgrading Dapr with Helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#upgrading-dapr-with-helm).
Follow the upgrade HowTo instructions in [Upgrade Dapr with Helm](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/#upgrade-dapr-with-helm).
## Resource configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
//go:build allcomponents

/*
Copyright 2024 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package binary
package components

import "testing"

type buildOpts struct {
getRootDirFunc func(t *testing.T) string
buildDir string
tags []string
}

func withRootDirFunc(f func(t *testing.T) string) func(*buildOpts) {
return func(o *buildOpts) {
o.getRootDirFunc = f
}
}

func withTags(tags ...string) func(*buildOpts) {
return func(o *buildOpts) {
o.tags = tags
}
}
import (
"github.com/dapr/components-contrib/conversation/anthropic"
"github.com/dapr/dapr/pkg/components/conversation"
)

func withBuildDir(dir string) func(*buildOpts) {
return func(o *buildOpts) {
o.buildDir = dir
}
func init() {
conversation.DefaultRegistry.RegisterComponent(anthropic.NewAnthropic, "anthropic")
}
27 changes: 27 additions & 0 deletions cmd/daprd/components/conversation_bedrock.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//go:build allcomponents

/*
Copyright 2024 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package components

import (
"github.com/dapr/components-contrib/conversation/aws/bedrock"
"github.com/dapr/dapr/pkg/components/conversation"
)

func init() {
conversation.DefaultRegistry.RegisterComponent(bedrock.NewAWSBedrock, "aws.bedrock")
}
27 changes: 27 additions & 0 deletions cmd/daprd/components/conversation_huggingface.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//go:build allcomponents

/*
Copyright 2024 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package components

import (
"github.com/dapr/components-contrib/conversation/huggingface"
"github.com/dapr/dapr/pkg/components/conversation"
)

func init() {
conversation.DefaultRegistry.RegisterComponent(huggingface.NewHuggingface, "huggingface")
}
27 changes: 27 additions & 0 deletions cmd/daprd/components/conversation_mistral.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//go:build allcomponents

/*
Copyright 2024 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package components

import (
"github.com/dapr/components-contrib/conversation/mistral"
"github.com/dapr/dapr/pkg/components/conversation"
)

func init() {
conversation.DefaultRegistry.RegisterComponent(mistral.NewMistral, "mistral")
}
2 changes: 1 addition & 1 deletion cmd/scheduler/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
healthzserver "github.com/dapr/dapr/pkg/healthz/server"
"github.com/dapr/dapr/pkg/metrics"
"github.com/dapr/dapr/pkg/modes"
"github.com/dapr/dapr/pkg/placement/monitoring"
"github.com/dapr/dapr/pkg/scheduler/monitoring"
"github.com/dapr/dapr/pkg/scheduler/server"
"github.com/dapr/dapr/pkg/security"
"github.com/dapr/kit/concurrency"
Expand Down
2 changes: 1 addition & 1 deletion dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Proto client generation

1. Install protoc version: [v24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v24.4)
1. Install protoc version: [v25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/common/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder is intended for the Common protos amongst the packages in the `dapr/
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/components/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ These protos are for a feature of Dapr which allows users to write their own com
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/internals/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder is intended for the Internal APIs that the `daprd` sidecars use to c
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/operator/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder is intended for the `operator` service APIs that manage the componen
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/placement/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder is intended for `placement` service APIs that the `daprd` sidecars u
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
2 changes: 1 addition & 1 deletion dapr/proto/runtime/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This folder is intended for user-facing APIs.
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
3 changes: 3 additions & 0 deletions dapr/proto/runtime/v1/dapr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,9 @@ message ConversationAlpha1Request {

// Scrub PII data that comes back from the LLM
optional bool scrubPII = 6;

// Temperature for the LLM to optimize for creativity or predictability
optional double temperature = 7;
}

message ConversationInput {
Expand Down
23 changes: 23 additions & 0 deletions dapr/proto/scheduler/v1/scheduler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ service Scheduler {
// WatchJobs is used by the daprd sidecar to connect to the Scheduler
// service to watch for jobs triggering back.
rpc WatchJobs(stream WatchJobsRequest) returns (stream WatchJobsResponse) {}
// ListJobs is used by the daprd sidecar to list all jobs.
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {}
}

message Job {
Expand Down Expand Up @@ -157,3 +159,24 @@ message DeleteJobRequest {
message DeleteJobResponse {
// Empty
}

// NamedJob is a job with a name.
message NamedJob {
// name is the name of the job.
string name = 1;

// The job scheduled.
Job job = 2;
}

// ListJobsRequest is the message used by the daprd sidecar to list all jobs.
message ListJobsRequest {
// The metadata associated with the job.
JobMetadata metadata = 1;
}

// ListJobsResponse is the response message to convey the details of a job.
message ListJobsResponse {
// The list of jobs.
repeated NamedJob jobs = 1;
}
2 changes: 1 addition & 1 deletion dapr/proto/sentry/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder is intended for `sentry` service APIs that the `daprd` sidecars use
## Proto client generation

Pre-requisites:
1. Install protoc version: [v4.24.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.24.4)
1. Install protoc version: [v4.25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v4.25.4)

2. Install protoc-gen-go and protoc-gen-go-grpc

Expand Down
Loading

0 comments on commit 90ee517

Please sign in to comment.