Skip to content

Add admin endpoint for publishing and unpublishing a project#558

Merged
GianlucaFicarelli merged 13 commits intomainfrom
publish_project
Mar 18, 2026
Merged

Add admin endpoint for publishing and unpublishing a project#558
GianlucaFicarelli merged 13 commits intomainfrom
publish_project

Conversation

@GianlucaFicarelli
Copy link
Collaborator

Add admin endpoints:

  • POST /admin/publish-project/{project_id}
  • POST /admin/unpublish-project/{project_id}

with parameters:

  • max_assets (optional) that can be used to limit the number of assets to be moved in one request. In that case, the endpoint should be called sequentially multiple times.
  • dry_run that can be set to true to simulate the operation. It's recommended to call the endpoint with dry_run=true before running it with dry_run=false.

Implement https://github.com/openbraininstitute/prod-platform-architecture/issues/192

@GianlucaFicarelli GianlucaFicarelli self-assigned this Mar 16, 2026
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 98.37838% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
app/utils/s3.py 95.38% 1 Missing and 2 partials ⚠️
Flag Coverage Δ
pytest 97.93% <98.37%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/config.py 97.75% <100.00%> (+0.25%) ⬆️
app/db/utils.py 84.21% <100.00%> (+0.42%) ⬆️
app/routers/admin.py 100.00% <100.00%> (ø)
app/schemas/publish.py 100.00% <100.00%> (ø)
app/service/publish.py 100.00% <100.00%> (ø)
app/utils/s3.py 88.26% <95.38%> (+4.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GianlucaFicarelli GianlucaFicarelli enabled auto-merge (squash) March 18, 2026 14:01
@GianlucaFicarelli GianlucaFicarelli merged commit 9237cf8 into main Mar 18, 2026
1 check passed
@GianlucaFicarelli GianlucaFicarelli deleted the publish_project branch March 18, 2026 14:09
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.

3 participants