Skip to content

Align go repository - #64

Open
mweibel wants to merge 1 commit into
mainfrom
align-go-repository
Open

mweibel wants to merge 1 commit into
mainfrom
align-go-repository

Conversation

@mweibel

@mweibel mweibel commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

What changed:

  • Removed Python release tooling
  • Added automated release pipeline with release attestations (SLSA/SBOM)
  • Go 1.27.1, updated cloudscale-go-sdk v6 -> v10, refreshed all dependencies
  • Makefile similar to CAPCS: Added standard targets (fmt, vet, lint-fix, govulncheck, docker-build), help output, and version metadata injection
  • Improved Dockerfile: Multi-stage build with better layer caching and build args.
  • Dedicated workflows for lint, test, govulncheck, and workflow validation
  • Added docs/releasing.md (release process) and AGENTS.md (AI agent guidance)
  • Added helpers/debug-ccm for automatic debug artifact generation when integration tests fail, updated helpers/run-in-test-cluster with some more debug helpers similar to how we did it in the CSI driver

@mweibel
mweibel force-pushed the align-go-repository branch 11 times, most recently from 97eafa3 to 90bd33f Compare September 23, 2026 09:22
@mweibel

mweibel commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator Author

FYI release flow has been tested with pre-release v1.3.2-beta.1.

@mweibel
mweibel requested a review from disperate September 23, 2026 09:46
Comment thread Dockerfile Outdated

RUN make build

FROM alpine:latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is latest the right choice here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

uh oh, of course not. Nice catch 🤦
Fixed it by pinning it to the latest patch version of release 3.23 (same as csi-cloudscale).

IdleConnTimeout: 90 * time.Second,
MaxIdleConns: 50,
MaxIdleConnsPerHost: 50,
MaxConnsPerHost: 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see we are also left this at 0 in the other projects, but could we potentially prevent big spikes if we added a sensible cap, like with MaxConnsPerHost: 50?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Personally, I think we should not limit the amount of connections here: the deployment of that controller is not in our care and IMO we should use sensible but not overly limiting defaults. The default is 0, so previous to this change we didn't set it anyway. I merely added this to make it transparent what is set.

Rate-limiting is a feature of the backend.

Comment thread AGENTS.md Outdated
|------------------------|------------------------------|
| Any `*.go` | `make lint-fix && make test` |
| `go.mod` / `go.sum` | `make test` |
| `.github/workflows/` | Verify with zizmor |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

zizmor is only available in the CI. Could we add a make target?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I removed that entry - installing zizmor in a cross-os compatible way is not something I want to do (so it works also e.g. in agent sandboxes). We do have zizmor as a github action and if wished, one can brew install it for local fixing.

build-args: |
VERSION=${{ env.TAG }}
GIT_COMMIT=${{ github.sha }}
BUILD_DATE=${{ github.event.head_commit.timestamp }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we sure we can relay on github.event.head_commit.timestamp here? It may be unavailable for some workflow triggers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this workflow is only triggered upon creating a tag and there we have it for sure.

See also the "Build inputs" here: https://github.com/cloudscale-ch/cloudscale-cloud-controller-manager/actions/runs/35830854988

Comment thread pkg/cloudscale_ccm/cloud.go Outdated
token string, timeout time.Duration) *cloudscale.Client {
// NewTransport creates an http.Transport configured for the cloudscale.ch API.
// The returned transport should be created once and shared across all clients
// to benefit from connection pooling and HTTP/2 multiplexing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe I'm missing something, but newCloudscaleClient() calls NewTransport() for every client instantiation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

True that, I copied that over verbatim from capcs where we do a separate transport setup and have for each reconciliation a new client. In CCM we don't have this - we just have one client for the entire duration of the CCM.
I removed the sentence to avoid confusion.

@mweibel
mweibel force-pushed the align-go-repository branch from 90bd33f to 56ab719 Compare September 24, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants