Repository navigation
Conversation
- StateEngine + PulumiStateEngine: discoverStacks, readSnapshot, listUpdates, readLock for both layouts and .gz, into the normalized model; secrets masked while parsing, never ciphertexts, secrets_providers, emails or local paths - StateIacService: a project only sees the stacks its bindings cover (404 otherwise), the organization sees all of them; listings cached (STATE_IAC_CACHE_SECONDS), states by object version, size limit (STATE_IAC_MAX_STATE_MB); a failing backend doesn't break the others - API /api/state-iac/stacks and /stacks/<backend>/<project>/<stack>?include=resources,outputs - Project page (replaces the placeholder), stack detail (resource tree, filters, drawer, outputs) and organization view /org/<org>/state-iac - e2e through a local S3 endpoint over the fixtures: project A never sees project B's stacks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Incluido en |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fase 2 de State IaC (#105). GitOps lee el estado actual de los stacks y lo muestra: cada proyecto ve sus stacks asignados y la organización ve todos. Todo sale del bucket en modo lectura, y los secretos llegan siempre enmascarados.
Va apilada sobre #114 (fase 1), que a su vez va sobre #113 (fase 0).
Closes #107
Cambios
StateEnginedefinediscoverStacks,readSnapshot,listUpdatesyreadLock.PulumiStateEnginelo implementa para los layoutsprojecty legacy, y lee ficheros.gz.pending_operationsy el lock activo con su antigüedad.{ "$iac": "secret" }), también los que van dentro de outputs secretos y lossecurede la config del historial.secrets_providers.environmentsolo salen los campos de una lista permitida: nada de emails, rutas locales ni hostnames.StateIacService:listProjectStacksdevuelve solo los stacks asignados al proyecto.listOrganizationStacksdevuelve todos, con el proyecto asignado a cada uno.STATE_IAC_CACHE_SECONDS(60 s por defecto).?refresh=1la salta.lastError.STATE_IAC_MAX_STATE_MBda un error controlado (too_large).GET /api/state-iac/stacks?projectId=|organizationId=GET /api/state-iac/stacks/<backend>/<pulumiProject>/<stack>?include=resources,outputs/org/<org>/projects/<slug>/state-iacsustituye al placeholder. Muestra backend → proyecto de Pulumi → stacks, con nº de recursos, último update, badges de lock y de operaciones pendientes, buscador y "Refrescar". Si no hay nada asignado, un empty state explica que las asignaciones se hacen en la organización.parentcon filtros (tipo, provider, protect), un drawer con inputs, outputs y dependencias navegables, y la pestaña de outputs./org/<org>/state-iac, con la columna "Proyecto asignado".project:stateiac:stacks:readpara el listado yproject:stateiac:states:readpara los recursos y outputs. En la organización bastaorganization:stateiac:stacks:read.Tests
bun run checksale sin errores y pasan los 893 tests unitarios..gz, secretos, historial y lock.e2e/fixtures/fake-s3.ts) sirve los fixtures y el servidor de dev los lee con elS3ObjectStorey el SDK reales. Hay un mismo bucket para dos proyectos de la organización.stacks:readse ve el listado, pero no los recursos.brand-ui.spec.ts, que fallan igual endevelopment.Notas
e2e-project-b) y un backend escrito directamente en GitDB, porque la API rechaza a propósito los endpoints loopback.project-settings.spec.tsrevoca la primera key sembrada.🤖 Generated with Claude Code