Adds pipeline sha to etag store
What does this MR do?
For issue #324628 (closed). We're update the polling implementation for the pipeline status in the Pipeline Editor to use etag caching.
This is the backend, pair this with the frontend changes in !59672 (merged) for proper testing.
- For backend changes, this adds the ETag path for pipeline sha and passes an updated
commitPipelinePath
to the frontend when theCommitCreate
mutation is triggered.
Mutation:
mutation commitCIFile(
$action: CommitActionMode!
$projectPath: ID!
$branch: String!
$startBranch: String
$message: String!
$filePath: String!
$lastCommitId: String!
$content: String
) {
commitCreate(
input: {
projectPath: $projectPath
branch: $branch
startBranch: $startBranch
message: $message
actions: [
{ action: $action, filePath: $filePath, lastCommitId: $lastCommitId, content: $content }
]
}
) {
commit {
sha
}
commitPipelinePath
errors
}
}
Response:
{
"data": {
"commitCreate": {
"commit": {
"sha": "709d1a7752a7c5a14a5c633ea0d250ab59927533"
},
"commitPipelinePath": "/api/graphql:pipelines/sha/709d1a7752a7c5a14a5c633ea0d250ab59927533",
"errors": []
}
}
}
Screenshots
Instead of getting a bunch of 200
s when getPipeline
is polled, we should now see a bunch of 304
s while the pipeline status hasn't changed.
Before | After |
---|---|
Normal Polling | Cached Responses |
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides
Related to #324628 (closed)
Edited by Mireya Andres