diff --git a/.gitignore b/.gitignore index 11f43ec7b..b0249c467 100644 --- a/.gitignore +++ b/.gitignore @@ -96,16 +96,6 @@ cleanup-lambda /server /lambda -# Frontend build artifacts -frontend/dist/ -frontend/coverage/ -frontend/node_modules/ - -# Frontend Playwright artefacts — generated per run, not committed -frontend/playwright-report/ -frontend/test-results/ -frontend/tests-e2e/.cache/ - # Temporary files tmp/ diff --git a/.golangci.yml b/.golangci.yml index ac5a3bcc9..011559420 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -99,20 +99,9 @@ linters: - govet text: "unusedwrite" path: _test\.go - - linters: - - errcheck - - gosec - path: internal/testutil/ - linters: - all path: .*_gen\.go - # revive var-naming: "api" is an intentional package name for the HTTP API - # layer; it is not a utility package and "avoid meaningless package names" - # is a false positive here. All 88+ files in internal/api use this name. - - linters: - - revive - path: internal/api/ - text: "avoid meaningless package names" # noctx: exec.Command calls in configure CLI helpers intentionally # omit context (CommandRunner interface contract; operator-controlled inputs). # Suppressed per-file rather than per-line so #nosec G204 can lead the comment. @@ -125,14 +114,6 @@ linters: - linters: - noctx path: _test\.go - # misspell: "cancelled" is the canonical DB column name (migration 000035, - # UK spelling throughout; migration #1277 tracks the rename). "initialised" - # appears in established comments in internal/config/types.go matching the - # existing UK convention. Allow both spellings in the files listed below. - - linters: - - misspell - path: (internal/config/(store_postgres|store_postgres_pgxmock_test|store_postgres_ladder|types|interfaces)|pkg/ladder/(store|types_test)|internal/api/(handler_history|handler_ri_exchange(_test)?|router_handlers_test|coverage_extras_test)|internal/mocks/stores|internal/purchase/scheduled_fire_test)\.go - text: "cancelled|initialised" paths: - third_party$ - builtin$ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 009d82165..2cdd35e62 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,6 @@ repos: name: Fix end of files - id: check-yaml name: Check YAML syntax - exclude: '^(docker-compose.*\.yml|\.github/workflows/.*|cloudformation/.*|iac/.*/cloudformation/.*)$' - id: check-json name: Check JSON syntax - id: check-added-large-files diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a781bd88a..5b4fab41a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ By participating in this project, you agree to maintain a respectful and inclusi 1. **Search existing issues** - Check if the bug has already been reported 2. **Create a detailed report** including: - - CUDly version (`./cudly --help`) + - CUDly version (the commit SHA or release tag you built from; `./cudly --help` does not print a version) - Go version (`go version`) - Operating system and architecture - Cloud provider and service affected diff --git a/NOTICE b/NOTICE index 398ef5609..6d26d226b 100644 --- a/NOTICE +++ b/NOTICE @@ -11,10 +11,6 @@ AWS SDK for Go v2 Apache-2.0 github.com/aws/aws-sdk-go-v2 https://github.com/aws/aws-sdk-go-v2/blob/main/LICENSE.txt -AWS Lambda Go Apache-2.0 - github.com/aws/aws-lambda-go - https://github.com/aws/aws-lambda-go/blob/main/LICENSE - Azure SDK for Go MIT github.com/Azure/azure-sdk-for-go https://github.com/Azure/azure-sdk-for-go/blob/main/LICENSE.txt @@ -39,26 +35,10 @@ Testify MIT github.com/stretchr/testify https://github.com/stretchr/testify/blob/master/LICENSE -pgx (PostgreSQL driver) MIT - github.com/jackc/pgx/v5 - https://github.com/jackc/pgx/blob/master/LICENSE - -pgxmock BSD-2-Clause - github.com/pashagolub/pgxmock/v4 - https://github.com/pashagolub/pgxmock/blob/master/LICENSE - -golang-migrate MIT - github.com/golang-migrate/migrate/v4 - https://github.com/golang-migrate/migrate/blob/master/LICENSE - google/uuid BSD-3-Clause github.com/google/uuid https://github.com/google/uuid/blob/master/LICENSE -testcontainers-go MIT - github.com/testcontainers/testcontainers-go - https://github.com/testcontainers/testcontainers-go/blob/main/LICENSE - Go standard library extensions BSD-3-Clause golang.org/x/crypto, golang.org/x/term https://github.com/golang/crypto/blob/master/LICENSE diff --git a/docs/cli/README.md b/docs/cli/README.md index 61cf08c9b..06b04ff66 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -12,7 +12,7 @@ This section documents the full CLI surface of the `cudly` binary. The Makefile |------|--------| | [filtering.md](filtering.md) | Account, region, engine, instance-type, and Savings Plan type include/exclude filters; numeric threshold filters (min-count, min-savings-pct, max-break-even-months, min-pool-size, max-instances) | | [purchase-safety.md](purchase-safety.md) | Purchase pipeline guardrails: dry-run, --purchase, interactive confirmation, --audit-log, --idempotency-window, --rebuy-window-days, DISABLE_PURCHASE_DELAY env | -| [cloud-setup.md](cloud-setup.md) | `configure-azure` and `configure-gcp` subcommands for self-hosted credential bootstrap | +| [cloud-setup.md](cloud-setup.md) | `configure-azure` and `configure-gcp` subcommands to bootstrap credentials for the [self-hosted platform](https://github.com/LeanerCloud/cloud-commitments-platform) | ## Complete flag reference diff --git a/docs/cli/cloud-setup.md b/docs/cli/cloud-setup.md index 98b47ba7a..216f65724 100644 --- a/docs/cli/cloud-setup.md +++ b/docs/cli/cloud-setup.md @@ -1,14 +1,14 @@ # Cloud Setup (Self-Hosted) -CUDly is a self-hosted tool. Two CLI subcommands handle the one-time credential bootstrap for Azure and GCP: `configure-azure` and `configure-gcp`. Both write credentials to AWS Secrets Manager, where the CUDly server reads them at runtime. +The CUDly CLI has two subcommands that handle the one-time credential bootstrap for Azure and GCP: `configure-azure` and `configure-gcp`. Both write credentials to AWS Secrets Manager, where the [self-hosted CUDly platform](https://github.com/LeanerCloud/cloud-commitments-platform) reads them at runtime. These are one-time setup operations, not part of the regular analysis/purchase workflow. ## Deployment overview -For the full Terraform deployment guide (supported runtimes, quick-deploy script, manual steps, `tfvars` reference, accessing the dashboard after deploy), see the [Deployment (self-hosted via Terraform)](../../README.md#deployment-self-hosted-via-terraform) section in the README. +For the full Terraform deployment guide (supported runtimes, quick-deploy script, manual steps, `tfvars` reference, accessing the dashboard after deploy), see the [cloud-commitments-platform](https://github.com/LeanerCloud/cloud-commitments-platform) repository, which owns the deployment. -The `ci-cd-permissions/` module within each environment provisions the CI/CD deploy identity and is applied once, manually, by a privileged operator. The main deploy workflow (`.github/workflows/deploy-*.yml`) then runs `terraform init / plan / apply` against the environment directory using OIDC keyless authentication. +The CI/CD deploy identity and the deploy workflows are owned by the [cloud-commitments-platform](https://github.com/LeanerCloud/cloud-commitments-platform) repository, not this CLI. ## Prerequisites @@ -318,5 +318,5 @@ Any missing required field causes the command to exit with an error before writi | Scenario | Notes | |----------|-------| -| First-time setup | Deploy with Terraform first (`terraform/environments//`). The secrets are created as part of that deployment; these commands only update them. | +| First-time setup | Deploy the platform with Terraform first (see [cloud-commitments-platform](https://github.com/LeanerCloud/cloud-commitments-platform)). The secrets are created as part of that deployment; these commands only update them. | | Rotating credentials | Both commands update (not create) the secret, so they can be run again to rotate credentials without redeploying. |