Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f816c68
Golang bosh-monitor via Cursor
aramprice Apr 2, 2026
74ef7fd
Fix hm_stateless_spec logger format: add number_of_processes to Event…
aramprice Jun 23, 2026
24c57fa
Add Go tests for NATS client TLS config and connection retry
colins Jun 23, 2026
130db5c
Add Go tests for DirectorMonitor message handling
colins Jun 23, 2026
05a58e4
Add Go tests for AuthProvider UAA token flow and CA cert selection
colins Jun 23, 2026
4d46b19
Fix hm_stateless_spec.rb:96 loop: filter heartbeats inline and use in…
aramprice Jun 23, 2026
2ef6a2c
Add Go tests for AlertTracker meltdown logic
colins Jun 23, 2026
1dae11f
Add Go tests for Agent timeout/rogue thresholds
colins Jun 23, 2026
fad21a5
Add Go tests for heartbeat team-change tracking and manager event pro…
colins Jun 23, 2026
5b53221
Add Go unit tests for all 11 bosh-monitor plugins
colins Jun 23, 2026
20e46a7
Add Go tests for Runner startup / signal handling
colins Jun 24, 2026
51a8893
fix linter issues
aramprice Jun 24, 2026
2ac7a38
Fix resurrector meltdown: pass total agent count in deployment_health…
aramprice Jun 25, 2026
af5077a
Add fly:bats rake task to run BATs from local branch via Concourse
colins Jun 26, 2026
28368e1
fly-bats: inline compile step with Go 1.26.3 workaround
colins Jun 26, 2026
a736a20
Fix critical concurrency, liveness, and packaging issues in Go bosh-m…
aramprice Jun 29, 2026
52122b5
Fidelity fixes (email STARTTLS, severity) and typed director config
aramprice Jun 29, 2026
8b292e8
Type the director response boundary (deployments/instances/configs)
aramprice Jun 29, 2026
bd2c6f5
Type the event-processing seam and the plugin alert contract
aramprice Jun 29, 2026
c818997
Remove the dead Attributes()/Attrs map and type NumberOfProcesses
aramprice Jun 29, 2026
9e2bf25
N1/N3/N4: document *int field, name channel constants, stop signal no…
aramprice Jun 30, 2026
ab5d3f2
N2: make HTTP server listen address configurable via http.host config…
aramprice Jun 30, 2026
c77423e
B1: fix double file-read in tlsConfigForCAFile (TOCTOU)
aramprice Jun 30, 2026
2223e47
B2: cache UAA http.Client in AuthProvider to prevent connection pool …
aramprice Jun 30, 2026
58fbf71
B4: guard email goroutine cmds sends with context to prevent block/pa…
aramprice Jun 30, 2026
2f3641c
B5: reset restartAttempts after a long-lived successful run
aramprice Jun 30, 2026
95da701
B3/D3: remove unused SyncInstancesPublic/SyncAgentsPublic; test Fetch…
aramprice Jun 30, 2026
b83f562
B6: make semaphore acquire in handleHTTPRequest interruptible on shut…
aramprice Jun 30, 2026
9ed3bdd
D4: remove validPayload from DirectorMonitor; delegate to Alert.Validate
aramprice Jun 30, 2026
d95d160
D6: eliminate 30 s mutex hold in AuthProvider.uaaTokenHeader
aramprice Jun 30, 2026
590de0c
D7: use ordered slice for NATS subjects; unsubscribe on partial failure
aramprice Jun 30, 2026
7bd90aa
D1: add thorough config validation with multi-error reporting
aramprice Jun 30, 2026
d28aae8
D2: narrow Event interface to {ID, Kind, Validate}
aramprice Jun 30, 2026
4c63958
D5: type the emit_alert payload in plugin protocol
aramprice Jun 30, 2026
61a206e
BF-1: scope resurrector AlertTracker unhealthy count to current deplo…
aramprice Jun 30, 2026
52b4cb4
IGo-2: remove unnecessary mutex from alertTracker
aramprice Jun 30, 2026
7d12f81
BF-2: emit resurrection-disabled alert for config-suppressed instances
aramprice Jun 30, 2026
8db0536
BF-4: change Agent.NumberOfProcesses to *int to match Ruby nil semantics
aramprice Jun 30, 2026
9eedc2b
IGo-1: replace sync.Map with map+Mutex for HTTP response correlation
aramprice Jun 30, 2026
312c193
IGo-3: decode NATS payload at the boundary; ProcessEvent accepts []byte
aramprice Jun 30, 2026
39c0f02
IGo-4: add optional ca_cert option to PagerDuty plugin
aramprice Jun 30, 2026
9caab42
IGo-5: use errors.Join in config validation for unwrap-able multi-error
aramprice Jun 30, 2026
3232c9f
Fixed a race condition caused by the go resurrector. The director
colins Jun 30, 2026
b31194a
Indentation alignment to keep linter happy.
colins Jun 30, 2026
9e76d88
Add golang-1.26-linux BOSH package and declare it as health_monitor d…
aramprice Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,34 @@ jobs:
- uses: golangci/golangci-lint-action@v9
with:
working-directory: src/brats/

bosh-monitor-lint:
name: bosh-monitor lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: src/bosh-monitor/go.mod
- uses: golangci/golangci-lint-action@v9
with:
working-directory: src/bosh-monitor/

bosh-monitor-test:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: bosh-monitor test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: src/bosh-monitor/go.mod
- name: Run tests
working-directory: src/bosh-monitor
run: go test ./...
- name: Build binary
working-directory: src/bosh-monitor
run: go build -o bin/bosh-monitor .
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
1 change: 0 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
matrix:
sub_project:
- common:parallel
- monitor:parallel
- nats_sync:parallel
- release:parallel
- integration_support:parallel
Expand Down
149 changes: 149 additions & 0 deletions ci/fly-bats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
# Standalone pipeline for running the BOSH Acceptance Test suite (BATs)
# against a specific branch.
#
# Intended to be driven by `bundle exec rake fly:bats` from src/, which
# pushes the current branch and sets this pipeline automatically.
#
# Manual usage:
# fly -t bosh set-pipeline -p bats-local \
# -c ci/fly-bats.yml \
# --var bosh_repo=https://github.com/cloudfoundry/bosh.git \
# --var bosh_branch=my-feature-branch \
# --var env_name=bats-local \
# --var stemcell_name=bosh-google-kvm-ubuntu-noble \
# --var deploy_args="-o bosh-deployment/external-ip-not-recommended.yml" \
# --var bat_rspec_flags=""
# fly -t bosh unpause-pipeline -p bats-local
# fly -t bosh trigger-job -j bats-local/bats -w

resources:
- name: bosh
type: git
source:
uri: ((bosh_repo))
branch: ((bosh_branch))

# bosh-ci is the same repo as bosh but filtered to ci/ paths so that
# scripts under ci/bats/ are available at bosh-ci/ in the task workspace.
- name: bosh-ci
type: git
source:
uri: ((bosh_repo))
branch: ((bosh_branch))
paths: [ci]

- name: bosh-cli
type: github-release
source:
owner: cloudfoundry
repository: bosh-cli
access_token: ((github_public_repo_token))

- name: stemcell
type: bosh-io-stemcell
source:
name: bosh-google-kvm-ubuntu-noble

- name: bats
type: git
source:
uri: https://github.com/cloudfoundry/bosh-acceptance-tests.git
branch: master

- name: bosh-deployment
type: git
source:
uri: https://github.com/cloudfoundry/bosh-deployment
branch: master

- name: integration-image
type: registry-image
source:
repository: ghcr.io/cloudfoundry/bosh/integration
tag: main
username: ((github_read_write_packages.username))
password: ((github_read_write_packages.password))

jobs:
- name: bats
serial: true
plan:
- do:
- in_parallel:
- get: bosh
- get: bosh-ci
- get: bosh-cli
params:
globs: [bosh-cli-*-linux-amd64]
- get: stemcell
- get: bats
- get: bosh-deployment
- get: integration-image

- task: make-candidate
image: integration-image
file: bosh-ci/ci/tasks/make-candidate.yml

- task: compile-bosh-release
config:
platform: linux
# ubuntu-noble-stemcell ships the BOSH agent at /var/vcap/bosh/bin/bosh-agent.
image_resource:
type: registry-image
source:
repository: ghcr.io/cloudfoundry/ubuntu-noble-stemcell
inputs:
- name: release
outputs:
- name: compiled-release
run:
path: /bin/bash
args:
- -exc
- |
# golang-1.26-linux on this branch is a stub (env files only; no binary
# blob in GCS yet). Install Go 1.26.3 and drop a shim at
# /usr/local/bin/go so `go build` works even though $GOROOT/bin is empty.
GO_VERSION=1.26.3
if ! /usr/local/go/bin/go version 2>/dev/null | grep -q "go${GO_VERSION}"; then
curl -sSfL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -C /usr/local -xz
fi
cat > /usr/local/bin/go <<'GOSHIM'
#!/bin/bash
export GOROOT=/usr/local/go
exec /usr/local/go/bin/go "$@"
GOSHIM
chmod +x /usr/local/bin/go

/var/vcap/bosh/bin/bosh-agent compile \
--output-directory compiled-release \
release/*.tgz

- task: run-bats
image: integration-image
input_mapping:
bosh-release: compiled-release
config:
platform: linux
inputs:
- name: bosh
- name: bosh-ci
- name: bosh-cli
- name: bosh-deployment
- name: stemcell
- name: bats
- name: bosh-release
caches:
- path: cache-dot-bosh-dir
params:
BAT_INFRASTRUCTURE: gcp
GCP_JSON_KEY: ((gcp_json_key))
GCP_PROJECT_ID: ((gcp_project_id))
STEMCELL_NAME: ((stemcell_name))
ENV_NAME: ((env_name))
DEPLOY_ARGS: ((deploy_args))
BAT_RSPEC_FLAGS: ((bat_rspec_flags))
run:
path: bosh/ci/tasks/run-bats-pipeline.sh
28 changes: 27 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1406,14 +1406,22 @@ jobs:
- get: bosh
- get: golang-release
- get: integration-image
- task: bump-deps
- task: bump-brats-deps
file: golang-release/ci/tasks/shared/bump-deps.yml
input_mapping:
input_repo: bosh
output_mapping:
output_repo: bosh-out
params:
SOURCE_PATH: src/brats/
- task: bump-bosh-monitor-deps
file: golang-release/ci/tasks/shared/bump-deps.yml
input_mapping:
input_repo: bosh-out
output_mapping:
output_repo: bosh-out
params:
SOURCE_PATH: src/bosh-monitor/
- task: lint-brats
file: bosh-ci/ci/tasks/lint-brats.yml
image: integration-image
Expand All @@ -1431,6 +1439,8 @@ jobs:
- get: bosh-ci
- get: integration-image
- get: bosh
- get: golang-release
trigger: true
- get: nginx-release
trigger: true
- get: mariadb-connector-c-resource
Expand Down Expand Up @@ -1535,6 +1545,22 @@ jobs:
credentials_source: static
json_key: '((gcp_json_key))'
RUBY_VERSION_PATH: src/.ruby-version
- task: bump-golang-package
file: golang-release/ci/tasks/shared/bump-golang-package.yml
input_mapping:
input_repo: bosh-out
output_mapping:
output_repo: bosh-out
params:
GIT_USER_NAME: *git_user_name
GIT_USER_EMAIL: *git_user_email
PACKAGES: '["golang-1.26-linux"]'
PACKAGES_TO_REMOVE: '[]'
PRIVATE_YML: |
blobstore:
options:
credentials_source: static
json_key: '((gcp_json_key))'
- task: bump-bosh-blobstore-dav
file: bosh-ci/ci/tasks/bump-blobstore-cli.yml
image: integration-image
Expand Down
Loading
Loading