Skip to content

Commit

Permalink
IWF-232: Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lwolczynski committed Nov 1, 2024
1 parent 51f2162 commit 6c8497a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cadence-integ-test-disable-sticky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
tests:
name: "Integration testing"
name: "Integration testing with sticky cache disabled"
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
tests:
name: "Integration testing"
name: "Integration testing with sticky cache disabled"
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,16 @@ cadenceIntegTests:
$Q go test -v ./integ -temporal=false

ci-cadence-integ-test:
$Q go test -v ./integ -search=false -temporal=false -dependencyWaitSeconds=180 -disableStickyCache=true
$Q go test -v ./integ -search=false -temporal=false -dependencyWaitSeconds=180

ci-cadence-integ-test-disable-sticky:
$Q go test -v ./integ -run "(?i)^Test[${startsWith}]" -search=false -temporal=false -dependencyWaitSeconds=180 -disableStickyCache=true
$Q go test -v ./integ -run "(?i)^Test[${startsWith}]" -search=false -temporal=false -dependencyWaitSeconds=180

ci-temporal-integ-test:
$Q go test -v ./integ -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache=true
$Q go test -v ./integ -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache

ci-temporal-integ-test-disable-sticky:
$Q go test -v ./integ -run "(?i)^Test[${startsWith}]" -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache=true
$Q go test -v ./integ -run "(?i)^Test[${startsWith}]" -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60 -disableStickyCache

ci-all-tests:
# Fails CI when used with -coverprofile flag due to tests that panic; see https://go.dev/doc/build-cover#panicprof
Expand Down
2 changes: 2 additions & 0 deletions service/interpreter/cadence/worker.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cadence

import (
"fmt"
"github.com/indeedeng/iwf/config"
"log"

Expand Down Expand Up @@ -66,6 +67,7 @@ func (iw *InterpreterWorker) start(disableStickyCache bool) {
// When DisableStickyCache is true it can harm performance; should not be used in production environment
if disableStickyCache {
options.DisableStickyExecution = true
fmt.Println("Cadence worker: Sticky cache disabled")
}

iw.worker = worker.New(iw.service, iw.domain, iw.tasklist, options)
Expand Down
2 changes: 2 additions & 0 deletions service/interpreter/temporal/worker.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package temporal

import (
"fmt"
"github.com/indeedeng/iwf/config"
"log"

Expand Down Expand Up @@ -66,6 +67,7 @@ func (iw *InterpreterWorker) start(disableStickyCache bool) {
// When DisableStickyCache is true it can harm performance; should not be used in production environment
if disableStickyCache {
worker.SetStickyWorkflowCacheSize(0)
fmt.Println("Temporal worker: Sticky cache disabled")
}

iw.worker = worker.New(iw.temporalClient, iw.taskQueue, options)
Expand Down

0 comments on commit 6c8497a

Please sign in to comment.