Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/.codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ github_checks: false
coverage:
status:
project: off
patch: off
patch: off
18 changes: 18 additions & 0 deletions .github/.yamlfmt
Copy link
Contributor Author

@stephanos stephanos Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change 1/3: Configure yamlfmt

about the options

  • retain_line_breaks:: empty lines are reasonable IMO; we have lots of them
  • force_quote_style: most existing use double, least amount of changes

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Config for yamlfmt
# see https://github.com/google/yamlfmt/blob/main/docs/config-file.md

# No need to format untracked files
gitignore_excludes: true

exclude:
# Go template files
- common/config/config_template_embedded.yaml
- config/docker.yaml
- docker/config_template.yaml

formatter:
# allow newlines
retain_line_breaks: true
# requires for GitHub Actions files
scan_folded_as_literal: true
force_quote_style: double
8 changes: 4 additions & 4 deletions .github/workflows/flaky-tests-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:

jobs:
flaky-tests-report:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
Expand Down Expand Up @@ -64,16 +64,16 @@ jobs:
DAYS_PARAM: ${{ github.event.inputs.days || '7' }}
run: |
set -euo pipefail

# Create output directory
mkdir -p tools/flakes/out

tringa --json --since-days "$DAYS_PARAM" repo sql \
'select classname, name, artifact from test where passed = false and skipped = false order by classname, name, artifact desc' \
--branch main \
--workflow-id 80591745 \
https://github.com/temporalio/temporal > tools/flakes/out/out.json

echo "✅ Tringa command completed"
echo "📊 Output file size: $(wc -c < tools/flakes/out/out.json) bytes"
echo "📄 Full output file:"
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

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

- name: lint actions
Expand All @@ -32,7 +32,7 @@ jobs:

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

- uses: arduino/setup-protoc@v3
Expand All @@ -52,7 +52,7 @@ jobs:

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

- uses: arduino/setup-protoc@v3
Expand All @@ -62,7 +62,6 @@ jobs:
- name: lint protobuf API definitions
run: |
make lint-api


lint-workflows:
runs-on: ubuntu-latest
Expand All @@ -73,7 +72,7 @@ jobs:

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

- uses: arduino/setup-protoc@v3
Expand All @@ -92,7 +91,7 @@ jobs:

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

- name: format golang import statements
Expand All @@ -108,6 +107,21 @@ jobs:
exit 1
fi

lint-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

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

- name: check yaml formatting
run: make lint-yaml

golangci:
runs-on: ubuntu-latest
steps:
Expand All @@ -117,7 +131,7 @@ jobs:

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

- name: lint code
Expand All @@ -140,6 +154,7 @@ jobs:
- lint-protos
- lint-actions
- fmt-imports
- lint-yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change 2/3: invoke yamlfmt linter in CI

- golangci
runs-on: ubuntu-latest
if: always()
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ jobs:

- name: Generate crash report
if: failure()
run:
| # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
[ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] &&
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

Expand Down Expand Up @@ -358,8 +357,7 @@ jobs:

- name: Generate crash report
if: failure()
run:
| # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
[ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] &&
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

Expand Down Expand Up @@ -541,8 +539,7 @@ jobs:

- name: Generate crash report
if: failure()
run:
| # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
[ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] &&
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

Expand Down Expand Up @@ -702,8 +699,7 @@ jobs:

- name: Generate crash report
if: failure()
run:
| # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
[ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] &&
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

Expand Down Expand Up @@ -860,8 +856,7 @@ jobs:

- name: Generate crash report
if: failure()
run:
| # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
run: | # if the tests failed, we would expect one JUnit XML report per attempt; otherwise it must have crashed
[ "$(find .testoutput -maxdepth 1 -name 'junit.*.xml' | wc -l)" -lt "$MAX_TEST_ATTEMPTS" ] &&
CRASH_REPORT_NAME="$GITHUB_JOB" make report-test-crash

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: label stale pull requests
uses: actions/stale@v9
with:
days-before-close: -1 # ie disabled
days-before-close: -1 # ie disabled
days-before-stale: 120
days-before-issue-stale: -1 # ie disabled
days-before-issue-stale: -1 # ie disabled
stale-pr-label: stale
stale-pr-message: 'This PR was marked as stale. Please update or close it.'
27 changes: 21 additions & 6 deletions Makefile
Copy link
Contributor Author

@stephanos stephanos Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change 3/3: targets to install and run yamlfmt

Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ WORKFLOWCHECK := $(LOCALBIN)/workflowcheck-$(WORKFLOWCHECK_VER)
$(WORKFLOWCHECK): | $(LOCALBIN)
$(call go-install-tool,$(WORKFLOWCHECK),go.temporal.io/sdk/contrib/tools/workflowcheck,$(WORKFLOWCHECK_VER))

YAMLFMT_VER := v0.16.0
YAMLFMT := $(LOCALBIN)/yamlfmt-$(YAMLFMT_VER)
$(YAMLFMT): | $(LOCALBIN)
$(call go-install-tool,$(YAMLFMT),github.com/google/yamlfmt/cmd/yamlfmt,$(YAMLFMT_VER))

GOIMPORTS_VER := v0.36.0
GOIMPORTS := $(LOCALBIN)/goimports-$(GOIMPORTS_VER)
$(STAMPDIR)/goimports-$(GOIMPORTS_VER): | $(STAMPDIR) $(LOCALBIN)
Expand Down Expand Up @@ -372,6 +377,9 @@ goimports: fmt-imports $(GOIMPORTS)
@UNGENERATED_FILES=$$(find . -type f -name '*.go' -print0 | xargs -0 grep -L -e "Code generated by .* DO NOT EDIT." || true) && \
$(GOIMPORTS) -w $$UNGENERATED_FILES

lint: lint-code lint-actions lint-api lint-protos lint-yaml
@printf $(COLOR) "Run linters..."

lint-actions: $(ACTIONLINT)
@printf $(COLOR) "Linting GitHub actions..."
@$(ACTIONLINT)
Expand All @@ -381,12 +389,9 @@ lint-code: $(GOLANGCI_LINT) $(ERRORTYPE)
@$(GOLANGCI_LINT) run --verbose --build-tags $(ALL_TEST_TAGS) --timeout 10m --fix=$(GOLANGCI_LINT_FIX) --new-from-rev=$(GOLANGCI_LINT_BASE_REV) --config=.github/.golangci.yml
@go vet -tags $(ALL_TEST_TAGS) -vettool="$(ERRORTYPE)" -style-check=false ./...

fmt-imports: $(GCI) # Don't get confused, there is a single linter called gci, which is a part of the mega linter we use is called golangci-lint.
@printf $(COLOR) "Formatting imports..."
@$(GCI) write --skip-generated -s standard -s default ./*

lint: lint-code lint-actions lint-api lint-protos
@printf $(COLOR) "Run linters..."
lint-yaml: $(YAMLFMT)
@printf $(COLOR) "Checking YAML formatting..."
@$(YAMLFMT) -conf .github/.yamlfmt -lint .

lint-api: $(API_LINTER) $(API_BINPB)
@printf $(COLOR) "Linting proto API..."
Expand All @@ -397,6 +402,16 @@ lint-protos: $(BUF) $(INTERNAL_BINPB) $(CHASM_BINPB)
@$(BUF) lint $(INTERNAL_BINPB)
@$(BUF) lint --config chasm/lib/buf.yaml $(CHASM_BINPB)

fmt: fmt-imports fmt-yaml

fmt-imports: $(GCI) # Don't get confused, there is a single linter called gci, which is a part of the mega linter we use is called golangci-lint.
@printf $(COLOR) "Formatting imports..."
@$(GCI) write --skip-generated -s standard -s default ./*

fmt-yaml: $(YAMLFMT)
@printf $(COLOR) "Formatting YAML files..."
@$(YAMLFMT) -conf .github/.yamlfmt .

# Edit proto/internal/buf.yaml to exclude specific files from this check.
# TODO: buf breaking check for CHASM protos.
buf-breaking: $(BUF) $(API_BINPB) $(INTERNAL_BINPB)
Expand Down
Loading
Loading