Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b61880d
go integration test runs reconcile loop and connects to dev server
carlydf Jun 26, 2025
cdc934b
integration test passes
carlydf Jun 27, 2025
36b8761
ensure workers start successfully, pipe back errors if they don't start
carlydf Jul 4, 2025
b96ec86
submodule
carlydf Jul 4, 2025
7e626d0
integration test working with submodule
carlydf Jul 4, 2025
4b0599c
integration test working with in-process test server
carlydf Jul 4, 2025
532b9cb
add ci test
carlydf Jul 4, 2025
d16cfb2
fix ci
carlydf Jul 4, 2025
2b5fee3
table integration test passing
carlydf Jul 9, 2025
cc7c97d
add a second test
carlydf Jul 9, 2025
d8e16c1
sketch out how to pass test dynamic config to test server
carlydf Jul 9, 2025
8e5398a
progress
carlydf Jul 11, 2025
7fdb568
integration test private
carlydf Jul 15, 2025
bd83da4
fix unit test compilation
carlydf Jul 15, 2025
74c47ea
add linters and make them pass
carlydf Jul 15, 2025
9e2cf64
address action-lint in test-integration.yml
carlydf Jul 15, 2025
8db53ad
add lint CI job
carlydf Jul 15, 2025
32f292f
catch controller panic in tests, fix bug, callback stopfunc correctly
carlydf Jul 15, 2025
13ae686
add +kubebuilder:validation:XPreserveUnknownFields to get rid of unkn…
carlydf Jul 16, 2025
c4aec75
start work to create preliminary state
carlydf Jul 23, 2025
b06b51e
test setup for pre-existing current version works
carlydf Jul 24, 2025
ef23f8d
make all tests pass
carlydf Jul 24, 2025
aec3ac6
fmt-imports
carlydf Jul 24, 2025
8e9e0f4
go mod tidy
carlydf Jul 24, 2025
861f59c
go mod tidy
carlydf Jul 24, 2025
6c673fe
go mod tidy
carlydf Jul 24, 2025
b4a3535
tests working with test builder and no repeated strings in test defin…
carlydf Jul 25, 2025
1dbc0fb
fmt-imports
carlydf Jul 25, 2025
615df05
delete additional config/ directory, not needed
carlydf Jul 25, 2025
f9fbf65
fix broken lint and makefile warning
carlydf Jul 25, 2025
c283808
remove +kubebuilder:validation:XPreserveUnknownFields since it did no…
carlydf Jul 25, 2025
ef97447
handle setup for other version statuses
carlydf Jul 25, 2025
0d17f1f
Fix unexpexted ramp test log
carlydf Jul 28, 2025
9ef87a3
improve nil mismatch check log
carlydf Jul 28, 2025
9cddba8
remove stupid cursor review suggestion
carlydf Jul 28, 2025
974a685
Merge branch 'main' into integration-test
carlydf Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 145 additions & 0 deletions .github/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# https://golangci-lint.run/usage/configuration/#config-file
linters:
disable-all: true
enable:
- errcheck
- goimports
- importas
# - paralleltest # missing the call to method parallel, but testify does not seem to work well with parallel test: https://github.com/stretchr/testify/issues/187
- revive # revive supersedes golint, which is now archived
- staticcheck
- govet
- forbidigo
- exhaustive
- godox
issues:
exclude-dirs:
- ^api
- ^proto
- ^.git
exclude-rules:
- path-except: _test\.go|internal/tests/.+\.go
text: "time.Sleep"
linters:
- forbidigo
- path: _test\.go|internal/tests/.+\.go
text: "(cyclomatic|cognitive)" # false positives when using subtests
linters:
- revive
- path: _test\.go|internal/tests/.+\.go
text: "(dot-imports|unchecked-type-assertion)" # helpful in tests
linters:
- revive
- path: ^tools\/.+\.go
linters:
- revive
linters-settings:
godox:
keywords:
- FIXME # marks TODOs that must be fixed before merging
govet:
fieldalignment: 0
forbidigo:
forbid:
- p: panic
msg: "Please avoid using panic in application code"
importas:
# Enforce the aliases below.
no-unaliased: true
# Still allow aliases outside of the rules below.
no-extra-aliases: false
alias:
# no pb services (or their mocks) are aliased - must be at the top!
- pkg: go.temporal.io(/server)?/api/(\w+)service(mock)?/v1
alias: # ie no alias - this can only be specified once!
# public API pbs have a suffix
- pkg: go.temporal.io/api/(\w+)/v1
alias: ${1}pb
# internal server pbs have their own suffix to avoid naming conflicts
- pkg: go.temporal.io/server/api/(\w+)/v1
alias: ${1}spb
exhaustive:
# Presence of "default" case in switch statements satisfies exhaustiveness,
# even if all enum members are not listed.
# Default: false
default-signifies-exhaustive: true
revive:
severity: error
confidence: 0.8
enable-all-rules: true
rules:
# Disabled rules
- name: add-constant
disabled: true
- name: argument-limit
disabled: true
- name: bare-return
disabled: true
- name: banned-characters
disabled: true
- name: bool-literal-in-expr
disabled: true
- name: confusing-naming
disabled: true
- name: empty-lines
disabled: true
- name: error-naming
disabled: true
- name: errorf
disabled: true
- name: exported
disabled: true
- name: file-header
disabled: true
- name: function-length
disabled: true
- name: imports-blacklist
disabled: true
- name: increment-decrement
disabled: true
- name: line-length-limit
disabled: true
- name: max-public-structs
disabled: true
- name: nested-structs
disabled: true
- name: package-comments
disabled: true
- name: string-format
disabled: true
- name: unexported-naming
disabled: true
- name: unexported-return
disabled: true
- name: unused-parameter
disabled: true
- name: unused-receiver
disabled: true
- name: use-any
disabled: true
- name: var-naming
disabled: true
- name: empty-block
disabled: true
- name: flag-parameter
disabled: true
- name: unnecessary-stmt
disabled: true
- name: range-val-in-closure
disabled: true

# Rule tuning
- name: cognitive-complexity
arguments:
- 25
- name: cyclomatic
arguments:
- 25
- name: function-result-limit
arguments:
- 5
- name: unhandled-error
arguments:
- "fmt.*"
- "bytes.Buffer.*"
- "strings.Builder.*"
90 changes: 90 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: linters
on:
pull_request:
permissions:
contents: read
jobs:
lint-actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: lint actions
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
make lint-actions
shell: bash

fmt-imports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: format golang import statements
run: |
make fmt-imports

- name: check-is-dirty
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Detected uncommitted changes."
git status
git diff
exit 1
fi

golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: lint code
run: |
make GOLANGCI_LINT_FIX=false GOLANGCI_LINT_BASE_REV=HEAD~ lint-code

- name: check-is-dirty
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Detected uncommitted changes."
git status
git diff
exit 1
fi

linters-succeed:
name: All Linters Succeed
needs:
- lint-actions
- fmt-imports
- golangci
runs-on: ubuntu-latest
if: always()
env:
RESULTS: ${{ toJSON(needs.*.result) }}
steps:
- name: Check results
run: |
if [[ -n $(echo "$RESULTS" | jq '.[] | select (. != "success")') ]]; then
exit 1
fi
110 changes: 110 additions & 0 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Integration Tests

on:
push:
branches: [ main ]
pull_request:

jobs:
test-integration:
name: Run Integration Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true

- name: Install Temporal CLI
run: |
curl -sSf https://temporal.download/cli.sh | sh
echo "$HOME/.temporalio/bin" >> "$GITHUB_PATH"

- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'

- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 'v3.14.3'

- name: Install controller-gen
run: |
go install sigs.k8s.io/controller-tools/cmd/[email protected]

- name: Install envtest
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

- name: Download dependencies
run: go mod download

- name: Run integration tests
run: make test-integration

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
cover.out
bin/
retention-days: 7

unit-test:
name: Run Unit Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true

- name: Download dependencies
run: go mod download

- name: Run unit tests
run: make test-unit

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: |
cover.out
bin/
retention-days: 7

go-vet:
name: Run Go Vet
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true

- name: Download dependencies
run: go mod download

- name: Run go vet
run: go vet ./...
Loading
Loading