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
0b326cb
Golang bosh-monitor via Cursor
aramprice Apr 2, 2026
957b668
Fix hm_stateless_spec logger format: add number_of_processes to Event…
aramprice Jun 23, 2026
ff47215
Add Go tests for NATS client TLS config and connection retry
colins Jun 23, 2026
d37698b
Add Go tests for DirectorMonitor message handling
colins Jun 23, 2026
386f45f
Add Go tests for AuthProvider UAA token flow and CA cert selection
colins Jun 23, 2026
f0d9955
Fix hm_stateless_spec.rb:96 loop: filter heartbeats inline and use in…
aramprice Jun 23, 2026
9de93e6
Add Go tests for AlertTracker meltdown logic
colins Jun 23, 2026
c5668ce
Add Go tests for Agent timeout/rogue thresholds
colins Jun 23, 2026
fd41642
Add Go tests for heartbeat team-change tracking and manager event pro…
colins Jun 23, 2026
c7b8eab
Add Go unit tests for all 11 bosh-monitor plugins
colins Jun 23, 2026
b9c31a7
Add Go tests for Runner startup / signal handling
colins Jun 24, 2026
5f205c7
fix linter issues
aramprice Jun 24, 2026
3caa1ea
Fix resurrector meltdown: pass total agent count in deployment_health…
aramprice Jun 25, 2026
322bb9b
Add fly:bats rake task to run BATs from local branch via Concourse
colins Jun 26, 2026
26f5b52
fly-bats: inline compile step with Go 1.26.3 workaround
colins Jun 26, 2026
13a0e68
Fix critical concurrency, liveness, and packaging issues in Go bosh-m…
aramprice Jun 29, 2026
071f560
Fidelity fixes (email STARTTLS, severity) and typed director config
aramprice Jun 29, 2026
891a5bd
Type the director response boundary (deployments/instances/configs)
aramprice Jun 29, 2026
5102fae
Type the event-processing seam and the plugin alert contract
aramprice Jun 29, 2026
828877d
Remove the dead Attributes()/Attrs map and type NumberOfProcesses
aramprice Jun 29, 2026
37a246a
N1/N3/N4: document *int field, name channel constants, stop signal no…
aramprice Jun 30, 2026
05f7aed
N2: make HTTP server listen address configurable via http.host config…
aramprice Jun 30, 2026
80f0048
B1: fix double file-read in tlsConfigForCAFile (TOCTOU)
aramprice Jun 30, 2026
29e2e09
B2: cache UAA http.Client in AuthProvider to prevent connection pool …
aramprice Jun 30, 2026
9b5ec9a
B4: guard email goroutine cmds sends with context to prevent block/pa…
aramprice Jun 30, 2026
2582252
B5: reset restartAttempts after a long-lived successful run
aramprice Jun 30, 2026
ed7a368
B3/D3: remove unused SyncInstancesPublic/SyncAgentsPublic; test Fetch…
aramprice Jun 30, 2026
4d5de3c
B6: make semaphore acquire in handleHTTPRequest interruptible on shut…
aramprice Jun 30, 2026
2496e08
D4: remove validPayload from DirectorMonitor; delegate to Alert.Validate
aramprice Jun 30, 2026
8317779
D6: eliminate 30 s mutex hold in AuthProvider.uaaTokenHeader
aramprice Jun 30, 2026
23bcdba
D7: use ordered slice for NATS subjects; unsubscribe on partial failure
aramprice Jun 30, 2026
4eb9d2c
D1: add thorough config validation with multi-error reporting
aramprice Jun 30, 2026
89df5d6
D2: narrow Event interface to {ID, Kind, Validate}
aramprice Jun 30, 2026
e292cfd
D5: type the emit_alert payload in plugin protocol
aramprice Jun 30, 2026
8b90902
BF-1: scope resurrector AlertTracker unhealthy count to current deplo…
aramprice Jun 30, 2026
3a9af1f
IGo-2: remove unnecessary mutex from alertTracker
aramprice Jun 30, 2026
d79707f
BF-2: emit resurrection-disabled alert for config-suppressed instances
aramprice Jun 30, 2026
8dd3df7
BF-4: change Agent.NumberOfProcesses to *int to match Ruby nil semantics
aramprice Jun 30, 2026
f272424
IGo-1: replace sync.Map with map+Mutex for HTTP response correlation
aramprice Jun 30, 2026
c3cc20f
IGo-3: decode NATS payload at the boundary; ProcessEvent accepts []byte
aramprice Jun 30, 2026
d806ed6
IGo-4: add optional ca_cert option to PagerDuty plugin
aramprice Jun 30, 2026
7a93437
IGo-5: use errors.Join in config validation for unwrap-able multi-error
aramprice Jun 30, 2026
62338a7
Fixed a race condition caused by the go resurrector. The director
colins Jun 30, 2026
3fc9a2d
Indentation alignment to keep linter happy.
colins Jun 30, 2026
e2dbeb1
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 @@ -1402,14 +1402,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 @@ -1427,6 +1435,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 @@ -1531,6 +1541,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