Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 14, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

alexluong and others added 2 commits January 15, 2026 01:55
* test: add migration runner tests

Add baseline tests for Redis migration runner with mock migrations.

Tests cover:
- GetPendingMigrations: pending list accuracy and metadata
- Fresh installation: skip execution on empty Redis
- Existing installation: auto-runnable execution, version ordering,
  failure handling, skip already applied
- Data detection: outpost:* and tenant:* key patterns

* test: add CLI migrator tests

Tests for the CLI Migrator (cmd/outpost-migrate-redis):
- Apply next pending migration
- Apply specific migration by name
- Confirmation prompts (autoApprove, rejection)
- Error handling (plan failure, apply failure)
- Migration marked as applied after success
- Plan command
- Verify command

* feat: add --all flag to apply all pending migrations

Adds batch migration support to the CLI:
- `apply --all` runs all pending migrations in sequence
- Each migration is verified after application before proceeding
- Stops immediately on any failure (apply or verification)
- Shows progress [1/N], [2/N], etc.

Also refactors Apply/ApplyOne:
- Apply(ctx, autoApprove) - batch mode for all pending
- ApplyOne(ctx, autoApprove, rerun, name) - single migration

Includes tests for the new batch functionality:
- applies all pending migrations in order
- stops on migration failure
- stops on verification failure
- marks all migrations as applied

* feat: add IsApplicable for conditional migrations

Adds applicability checks so migrations can declare themselves as
"not needed" based on configuration:

- Add IsApplicable(ctx) (bool, string) to Migration interface
- 001_hash_tags returns false when DEPLOYMENT_ID is set
  (hash tags already in place)
- 002_timestamps and 003_entity always return true

Migration status handling:
- New status: "not_applicable" alongside "applied"
- isSatisfied() checks both statuses for startup/CLI checks
- Non-applicable migrations don't block init --current

Includes tests for:
- Runner marks non-applicable as not_applicable
- CLI Apply skips and marks non-applicable migrations
- Subsequent runs skip already-marked migrations

* chore: gofmt
* feat: add /tenants prefix to tenant-scoped API routes

- Add deprecation middleware that sets Deprecation and Link headers
- Register tenant-scoped routes under both /tenants prefix (new) and root (deprecated)
- Old paths still work but return deprecation headers pointing to new paths
- Add integration tests for both path styles

* docs: update openapi paths to use /tenants prefix

Update all tenant-scoped API paths from /{tenant_id}/* to /tenants/{tenant_id}/*

* test: update e2e tests to use /tenants prefix

Update all e2e test paths from /{tenant_id}/* to /tenants/{tenant_id}/*
to use the new canonical API paths.

* test: update e2e test names to use /tenants prefix

Update test name strings to reflect the new /tenants/:tenantID path
format for consistency with the actual API paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: remove API deprecation mechanism

Remove the deprecation middleware and deprecated route registration.
The old paths without /tenants prefix are no longer supported.

Changes:
- Remove deprecation_middleware.go and its tests
- Remove deprecated route group registration from router.go
- Update all unit tests to use /tenants/:tenantID path format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: force amd64 for image with arm64

* build: outpost build cache

* fix: remove invalid AllowTenantFromJWT field from route definition

* feat: include tenant_id in RetrieveToken response

* feat: include tenant_id in RetrievePortal response

* docs: add tenant_id to TenantToken and PortalRedirect OpenAPI schemas

* docs: add JWT token structure to TenantJwt security scheme

* refactor: rename TestJWTAuthAPI to TestTenantScopedAPI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: add E2E tests for admin-only routes rejecting JWT auth

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: verify tenant_id in token response in E2E test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: remove outdated tenant_id inference claim from TenantJwt

* fix: use /tenants/ prefix in TestListTenantsAPI test

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Jan 14, 2026
@pull pull bot added the ⤵️ pull label Jan 14, 2026
@pull pull bot merged commit a76b0ed into erickirt:main Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant