-
Notifications
You must be signed in to change notification settings - Fork 3
Fix: Can't use curl to download a single manifest in one invocation (#5918) #6099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
8b62dbc to
830a1e4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6099 +/- ##
===========================================
- Coverage 85.22% 85.20% -0.03%
===========================================
Files 156 156
Lines 22408 22451 +43
===========================================
+ Hits 19098 19130 +32
- Misses 3310 3321 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
da860a5 to
b81d052
Compare
9fb4dbb to
391cedb
Compare
|
Successful use of curl to download a manifest in one invocation: (Unabridged version: 6099_manifest_invocation_unabridged.txt) |
lambdas/service/app.py
Outdated
|
|
||
| def manifest_route(*, fetch: bool, initiate: bool): | ||
| def manifest_route(*, fetch: bool, method: str): | ||
| initiate = method in ['PUT', 'POST'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| initiate = method in ['PUT', 'POST'] | |
| initiate = method in {'PUT', 'POST'} |
lambdas/service/app.py
Outdated
|
|
||
| def _file_manifest(fetch: bool, token_or_key: Optional[str] = None): | ||
| request = app.current_request | ||
| require(request.method != 'POST' or request.raw_body.decode() == '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as
| require(request.method != 'POST' or request.raw_body.decode() == '', | |
| require(request.method != 'POST' or request.raw_body == b'', |
Right?
|
Added #6003 as a blocker due to overlapping changes to the IT |
600eb8b to
81a4905
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but needs rebase
81a4905 to
ff39020
Compare
ec5f5cc to
cb02ca7
Compare
| elif wait == '1': | ||
| time_slept = self.server_side_sleep(float(retry_after)) | ||
| retry_after = round(retry_after - time_slept) | ||
| retry_after = ceil(retry_after - time_slept) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from round to ceil is currently in a commit labeled "Add a default value for the /repository/files wait parameter". Please explain why going from round to ceil is related to adding a default or isolate that change in its own commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved change to commit Fix rounding of /repository/file retry-after value
| as a property of a JSON object in the body of the request. This can be | ||
| useful in case the value of the `filters` query parameter causes the URL | ||
| to exceed the maximum length of 8192 characters, resulting in a 413 | ||
| Request Entity Too Large response. | ||
| as a property of a JSON object in the body of the request. This is | ||
| referred to as *parameter hoisting* and can be useful in case the value | ||
| of the `filters` query parameter causes the URL to exceed the maximum | ||
| length of 8192 characters, resulting in a 413 Request Entity Too Large | ||
| response. | ||
| The request `%s %s?filters={…}`, for example, is equivalent to `%s %s` | ||
| with the body `{"filters": "{…}"}` in which any double quotes or | ||
| backslash characters inside `…` are escaped with another backslash. That | ||
| escaping is the requisite procedure for embedding one JSON structure | ||
| inside another. | ||
| with a `Content-Type` header of `application/json` and the body | ||
| `{"filters": "{…}"}` in which any double quotes or backslash characters | ||
| inside `…` are escaped with another backslash. That escaping is the | ||
| requisite procedure for embedding one JSON structure inside another. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I am wrong but it seems like these two hunks are unrelated documentation improvement that I requested at some point, but that have nothing to do with "Add[ing] support for POST requests to the manifest endpoint", as is the title of the commit the hunks are part of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved change to commit Refine parameter hoisting note
cb02ca7 to
f1a03b6
Compare
0d778e1 to
16f80de
Compare
16f80de to
c923904
Compare
e050a15 to
e69f45a
Compare
Fixes regression from fb58b01. The problem manifested as an error with the `app` property in an AppController subclass, and this wasn't noticed until now due to the `app` property not being accessed in a controller that had this problem, namely ManifestController.
…vocation (#5918) Add support for POST requests to the manifest endpoint
…vocation (#5918) Add a wait parameter option to the manifest endpoint
e69f45a to
6d3c890
Compare
Linked issues: #5918
Checklist
Author
developissues/<GitHub handle of author>/<issue#>-<slug>1 when the issue title describes a problem, the corresponding PR
title is
Fix:followed by the issue titleAuthor (partiality)
ptag to titles of partial commitspartialor completely resolves all linked issuespartiallabelAuthor (reindex)
rtag to commit title or the changes introduced by this PR will not require reindexing of any deploymentreindex:devor the changes introduced by it will not require reindexing ofdevreindex:anvildevor the changes introduced by it will not require reindexing ofanvildevreindex:anvilprodor the changes introduced by it will not require reindexing ofanvilprodreindex:prodor the changes introduced by it will not require reindexing ofprodreindex:partialand its description documents the specific reindexing procedure fordev,anvildev,anvilprodandprodor requires a full reindex or carries none of the labelsreindex:dev,reindex:anvildev,reindex:anvilprodandreindex:prodAuthor (API changes)
APIor this PR does not modify a REST APIa(A) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.pyor this PR does not modify a REST APIAuthor (upgrading deployments)
make docker_images.jsonand committed the resulting changes or this PR does not modifyazul_docker_images, or any other variables referenced in the definition of that variableutag to commit title or this PR does not require upgrading deploymentsupgradeor does not require upgrading deploymentsdeploy:sharedor does not modifydocker_images.json, and does not require deploying thesharedcomponent for any other reasondeploy:gitlabor does not require deploying thegitlabcomponentdeploy:runneror does not require deploying therunnerimageAuthor (hotfixes)
Ftag to main commit title or this PR does not include permanent fix for a temporary hotfixanvilprodandprod) have temporary hotfixes for any of the issues linked to this PRAuthor (before every review)
develop, squashed fixups from prior reviewsmake requirements_updateor this PR does not modifyrequirements*.txt,common.mk,Makefile,Dockerfileorenvironment.bootRtag to commit title or this PR does not modifyrequirements*.txtreqsor does not modifyrequirements*.txtmake integration_testpasses in personal deployment or this PR does not modify functionality that could affect the IT outcomePeer reviewer (after approval)
Note that when requesting changes, the PR must be assigned back to the author.
System administrator (after approval)
demoorno demono demono sandboxN reviewslabel is accurateOperator
reindex:…labels andrcommit title tagno demodevelopOperator (deploy
.sharedand.gitlabcomponents)_select dev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select dev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlab_select anvildev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select anvildev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlabdeploy:gitlabdeploy:gitlabSystem administrator (post-deploy of
.gitlabcomponent)dev.gitlabare complete or this PR is not labeleddeploy:gitlabanvildev.gitlabare complete or this PR is not labeleddeploy:gitlabOperator (deploy runner image)
_select dev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runner_select anvildev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runnerOperator (sandbox build)
sandboxlabel or PR is labeledno sandboxdevor PR is labeledno sandboxanvildevor PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxor this PR does not remove catalogs or otherwise causes unreferenced indices indevanvilboxor this PR does not remove catalogs or otherwise causes unreferenced indices inanvildevsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevOperator (merge the branch)
pif the PR is also labeledpartialOperator (main build)
devanvildevdevdevanvildevanvildev_select dev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shared_select anvildev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shareddevanvildevOperator (reindex)
devor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevdevor this PR does not require reindexingdevdeploy_browserjob in the GitLab pipeline for this PR indevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdeploy_browserjob in the GitLab pipeline for this PR inanvildevor this PR does not require reindexinganvildevOperator (mirroring)
devor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevdevor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevdevor this PR does not require mirroringdevanvildevor this PR does not require mirroringanvildevOperator
deploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprodandreindex:prodlabels to the next promotion PRs or this PR carries none of these labelsdeploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprodandreindex:prodlabels, from the description of this PR to that of the next promotion PRs or this PR carries none of these labelsShorthand for review comments
Lline is too longWline wrapping is wrongQbad quotesFother formatting problem