Skip to content

Commit

Permalink
Merge pull request #30 from temporalio/rr_worker_status_stabilization
Browse files Browse the repository at this point in the history
stabilization(RC): RR worker stabilization before RC1
  • Loading branch information
rustatian authored Feb 11, 2021
2 parents 9c12838 + 3bc5768 commit d179b9c
Show file tree
Hide file tree
Showing 17 changed files with 171 additions and 285 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ updates:
- package-ecosystem: gomod # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: daily

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
fail-fast: true
matrix:
php: [ "7.4", "8.0" ]
go: [ "1.14", "1.15" ]
Expand Down Expand Up @@ -64,7 +64,6 @@ jobs:
run: |
docker-compose -f ./tests/docker-compose.yaml up -d
mkdir ./coverage-ci
sleep 15
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/temporal.txt -covermode=atomic ./tests
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/temporal_protocol.txt -covermode=atomic ./protocol
go test -v -race -cover -tags=debug -coverpkg=./... -coverprofile=./coverage-ci/temporal_workflow.txt -covermode=atomic ./workflow
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/macos.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CHANGELOG
=========


v1.0.0-RC.1 (11.02.2021)
-------------------
- RR-Core to v2.0.0-RC.1
- Endure update to v1.0.0-beta.23
- Change `RR_MODE` to `temporal` in the `activity` and `workflow` plugins.
- Non significant improvements (comments, errors.E usage, small logical issues)
7 changes: 4 additions & 3 deletions activity/activity_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/spiral/roadrunner/v2/plugins/server"
"github.com/temporalio/roadrunner-temporal/client"
rrt "github.com/temporalio/roadrunner-temporal/protocol"
"github.com/temporalio/roadrunner-temporal/utils"
"go.temporal.io/api/common/v1"
"go.temporal.io/sdk/activity"
"go.temporal.io/sdk/converter"
Expand Down Expand Up @@ -110,7 +111,7 @@ func (pool *activityPoolImpl) ActivityNames() []string {
// ActivityNames returns list of all available activity names.
func (pool *activityPoolImpl) GetActivityContext(taskToken []byte) (context.Context, error) {
const op = errors.Op("activity_pool_get_activity_context")
c, ok := pool.running.Load(string(taskToken))
c, ok := pool.running.Load(utils.ToString(taskToken))
if !ok {
return nil, errors.E(op, errors.Str("heartbeat on non running activity"))
}
Expand Down Expand Up @@ -177,8 +178,8 @@ func (pool *activityPoolImpl) executeActivity(ctx context.Context, args *common.
msg.Payloads.Payloads = append(msg.Payloads.Payloads, heartbeatDetails.Payloads...)
}

pool.running.Store(string(info.TaskToken), ctx)
defer pool.running.Delete(string(info.TaskToken))
pool.running.Store(utils.ToString(info.TaskToken), ctx)
defer pool.running.Delete(utils.ToString(info.TaskToken))

result, err := pool.codec.Execute(pool.wp, rrt.Context{TaskQueue: info.TaskQueue}, msg)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion activity/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
RootPluginName = "temporal"

// RRMode sets as RR_MODE env variable to let worker know about the mode to run.
RRMode = "temporal/activity"
RRMode = "temporal"
)

// Plugin to manage activity execution.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ require (
github.com/golang/protobuf v1.4.3
github.com/json-iterator/go v1.1.10
github.com/pborman/uuid v1.2.1
github.com/spiral/endure v1.0.0-beta.22
github.com/spiral/endure v1.0.0-beta.23
github.com/spiral/errors v1.0.9
github.com/spiral/roadrunner/v2 v2.0.0-beta.24
github.com/spiral/roadrunner/v2 v2.0.0-RC.1
github.com/stretchr/testify v1.7.0
go.temporal.io/api v1.4.0
go.temporal.io/sdk v1.4.1
Expand Down
Loading

0 comments on commit d179b9c

Please sign in to comment.