Skip to content

feat(search): update GitLab permission CSVs through the API - #9841

Merged
waleedlatif1 merged 3 commits into
stagingfrom
codex/gitlab-csv-ci-audit
Nov 10, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
codex/gitlab-csv-ci-audit

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Let an organization admin read the current revision and replace both permission CSVs for a configured GitLab Search source through the v2 API. The update uses the same validation, grant store, and revision check as Settings. It cannot change the connection or resume a paused source.
  • Document how Search authorizes a reader and how to publish a complete permissions export from a scheduled GitLab CI job.

Type of Change

  • Feature

Testing

The HTTP test runs against a real Sim app and Postgres. It covers grants and revocations, competing uploads, invalid files, organization boundaries, and preserving the source configuration. It runs in the existing organization Search E2E job. Also checked the GitLab CSV parser, live authorization tests, generated API contracts, lint, and the example's YAML and shell syntax.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added for the public endpoint
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 10, 2026 6:38pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 20 files

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/turbo.json Resolved
@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain in this review.

Summary

Adds API endpoints for organization admins to read a GitLab Search permission revision and replace both permission CSVs.

  • Organization admins can update both GitLab Search permission files through the v2 API.
  • The CLI can read a permission revision and replace both GitLab Search CSVs.
  • The GitLab Search guide shows how to publish permission CSVs from GitLab CI.

Diagram

sequenceDiagram
  participant CI as GitLab CI
  participant API as Sim API
  participant DB as Postgres
  CI->>API: GET permission revision
  API->>API: Check organization admin access
  API->>DB: Read current revision
  API-->>CI: Revision
  CI->>CI: Export both CSVs
  CI->>API: PUT CSVs and expected revision
  API->>API: Check access and CSVs
  API->>DB: Lock source and check revision
  alt Revision matches
    API->>DB: Replace files and grants together
    API-->>CI: New revision
  else Revision changed
    API-->>CI: 409 Conflict
  end
Loading

Reviews (3) · Last reviewed commit: "test(cli): cover confirmation for GitLab..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 23 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — 3ed718f2 Deployed Nov 10, 2026 by vercel[bot]
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