Refresh all resources in a project
- Dominant language
- Scala
- Stars
- 301
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
**Motivation**
Whenever a `@context` changes for example and as the compacted and expanded forms of a resource are computed, we need a way to propagate this change to resources
**Acceptance criteria**
1. A user with a dedicated permission can trigger a refresh via the `/v1/projects/{org_label}/{label}/refresh` endpoint
2. When a list of resource types is provided, only the resources associated to those types are updated
3. Deprecated resources are ignored
4. Only one refresh operation can be run at a time for a given project
5. A refresh operation must survive restarts and save its progress / the errors the same way views do
6. Updates are performed on resources up to the offset where the refresh was triggered
7. When the refresh operation reaches this offset, the related projection stops and the operation is mark as completed
**API changes**
```
PUT /v1/projects/{org_label}/{label}/refresh
{
"resourceTypes": [ "{resourceType}", ...]
}
```
**Not in scope (will be tackled in later tickets)**
1. Listing refresh operations for a project (including completed ones)
2. Fetching the status and statistics of a given refresh operation
3. Fetching errors for a given refresh operation
4. Do not update the resource if the resulting expanded form remains the same
Contributor guide
Research direction
Start at the PUT /v1/projects/{org_label}/{label}/refresh endpoint and trace the existing project, permission, projection, and view-operation entry points. Compare the acceptance criteria with current persistence and restart behavior; done means a single resumable refresh can filter resource types, skip deprecated resources, respect the trigger offset, record progress and errors, and complete the related projection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100