Skip to content

Fix verification database permissions#508

Merged
madebygps merged 1 commit into
mainfrom
fix/verification-db-permissions
May 26, 2026
Merged

Fix verification database permissions#508
madebygps merged 1 commit into
mainfrom
fix/verification-db-permissions

Conversation

@madebygps

Copy link
Copy Markdown
Collaborator

Summary

This adds a new Alembic migration that grants the verification Functions database role only the two requirements columns needed by the typed submitted value trigger.

The alert came from Postgres rejecting the trigger lookup during submission persistence. The function role did not need broad curriculum access, but it still needs to read requirements.uuid and requirements.submission_value_kind while inserting or updating submissions.

Validation

  • cd api && uv run ruff check . ../packages/learn-to-cloud-shared
  • cd apps/verification-functions && uv run ruff check .
  • cd api && uv run ruff format --check . ../packages/learn-to-cloud-shared
  • cd apps/verification-functions && uv run ruff format --check .
  • cd api && uv run ty check --exclude scripts --exclude tests .
  • cd packages/learn-to-cloud-shared && uv run ty check --exclude tests .
  • cd apps/verification-functions && uv run ty check .
  • API startup and smoke tests for /health, /ready, and /openapi.json
  • cd api && uv run pytest tests/
  • cd packages/learn-to-cloud-shared && uv run pytest tests/
  • cd apps/verification-functions && uv run python -c "import function_app"

Grant the verification Functions role the narrow requirements columns needed by the typed submission trigger.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

from alembic import op

revision: str = "0038_grant_fn_requirement_kind_lookup"
from alembic import op

revision: str = "0038_grant_fn_requirement_kind_lookup"
down_revision: str | None = "0037_validate_typed_submitted_value_constraints"

revision: str = "0038_grant_fn_requirement_kind_lookup"
down_revision: str | None = "0037_validate_typed_submitted_value_constraints"
branch_labels: str | Sequence[str] | None = None
revision: str = "0038_grant_fn_requirement_kind_lookup"
down_revision: str | None = "0037_validate_typed_submitted_value_constraints"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
@madebygps madebygps merged commit fae345b into main May 26, 2026
15 checks passed
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.

1 participant