forked from inspirehep/inspirehep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: fix author submissions not erroring
also some small config fixes for easy testing with docker * ref: cern-sis/issues-inspire#643
- Loading branch information
Showing
11 changed files
with
1,476 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
282 changes: 282 additions & 0 deletions
282
workflows/tests/cassettes/TestSetWorkflowStatus.test_set_workflow_status_to_error.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
interactions: | ||
- request: | ||
body: '{"status": "running"}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '21' | ||
Content-Type: | ||
- application/json | ||
method: PATCH | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
response: | ||
body: | ||
string: '{"id":"00000000-0000-0000-0000-000000001521","tickets":[],"decisions":[],"data":{"name":{"value":"B, | ||
Third","preferred_name":"Third B"},"status":"departed","_collections":["Authors"],"acquisition_source":{"email":"[email protected]","orcid":"0000-0000-0000-0000","method":"submitter","source":"submitter","datetime":"2024-11-18T11:34:19.809575","internal_uid":50872}},"workflow_type":"AUTHOR_CREATE","status":"running","_created_at":"2024-11-25T13:49:53.009000Z","_updated_at":"2024-12-18T16:53:36.849446Z"}' | ||
headers: | ||
Allow: | ||
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '502' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Server-Timing: | ||
- TimerPanel_utime;dur=89.91899999999475;desc="User CPU time", TimerPanel_stime;dur=0.9880000000066502;desc="System | ||
CPU time", TimerPanel_total;dur=90.9070000000014;desc="Total CPU time", TimerPanel_total_time;dur=244.1654999856837;desc="Elapsed | ||
time", SQLPanel_sql_time;dur=4.612791002728045;desc="SQL 10 queries", CachePanel_total_time;dur=0;desc="Cache | ||
0 Calls" | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
djdt-store-id: | ||
- e27d9e4cd8a9424788412023de5a52f0 | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: '{"status": "error"}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '19' | ||
Content-Type: | ||
- application/json | ||
method: PATCH | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
response: | ||
body: | ||
string: '{"id":"00000000-0000-0000-0000-000000001521","tickets":[],"decisions":[],"data":{"name":{"value":"B, | ||
Third","preferred_name":"Third B"},"status":"departed","_collections":["Authors"],"acquisition_source":{"email":"[email protected]","orcid":"0000-0000-0000-0000","method":"submitter","source":"submitter","datetime":"2024-11-18T11:34:19.809575","internal_uid":50872}},"workflow_type":"AUTHOR_CREATE","status":"error","_created_at":"2024-11-25T13:49:53.009000Z","_updated_at":"2024-12-18T16:53:37.094582Z"}' | ||
headers: | ||
Allow: | ||
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '500' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Server-Timing: | ||
- TimerPanel_utime;dur=25.058999999998832;desc="User CPU time", TimerPanel_stime;dur=0.0;desc="System | ||
CPU time", TimerPanel_total;dur=25.058999999998832;desc="Total CPU time", | ||
TimerPanel_total_time;dur=53.21687500691041;desc="Elapsed time", SQLPanel_sql_time;dur=3.2330840185750276;desc="SQL | ||
10 queries", CachePanel_total_time;dur=0;desc="Cache 0 Calls" | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
djdt-store-id: | ||
- 4231b748fadd4716bd87f0d3a7e33ee9 | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Type: | ||
- application/json | ||
method: GET | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
Connection: | ||
- close | ||
Content-Language: | ||
- en | ||
Content-Type: | ||
- text/html; charset=utf-8 | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Location: | ||
- /api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Vary: | ||
- Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
status: | ||
code: 301 | ||
message: Moved Permanently | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
method: GET | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
response: | ||
body: | ||
string: '{"id":"00000000-0000-0000-0000-000000001521","tickets":[],"decisions":[],"validation_errors":[],"data":{"name":{"value":"B, | ||
Third","preferred_name":"Third B"},"status":"departed","_collections":["Authors"],"acquisition_source":{"email":"[email protected]","orcid":"0000-0000-0000-0000","method":"submitter","source":"submitter","datetime":"2024-11-18T11:34:19.809575","internal_uid":50872}},"workflow_type":"AUTHOR_CREATE","status":"error","_created_at":"2024-11-25T13:49:53.009000Z","_updated_at":"2024-12-18T16:53:37.094582Z"}' | ||
headers: | ||
Allow: | ||
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '523' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Server-Timing: | ||
- TimerPanel_utime;dur=21.40500000000145;desc="User CPU time", TimerPanel_stime;dur=0.927000000004341;desc="System | ||
CPU time", TimerPanel_total;dur=22.33200000000579;desc="Total CPU time", TimerPanel_total_time;dur=26.116458990145475;desc="Elapsed | ||
time", SQLPanel_sql_time;dur=3.307167993625626;desc="SQL 12 queries", CachePanel_total_time;dur=0;desc="Cache | ||
0 Calls" | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
djdt-store-id: | ||
- f4637e2a26094b3fab8bf6ad4a3504c1 | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Type: | ||
- application/json | ||
method: GET | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521 | ||
response: | ||
body: | ||
string: '' | ||
headers: | ||
Connection: | ||
- close | ||
Content-Language: | ||
- en | ||
Content-Type: | ||
- text/html; charset=utf-8 | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Location: | ||
- /api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Vary: | ||
- Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
status: | ||
code: 301 | ||
message: Moved Permanently | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
method: GET | ||
uri: http://host.docker.internal:8001/api/workflows/authors/00000000-0000-0000-0000-000000001521/ | ||
response: | ||
body: | ||
string: '{"id":"00000000-0000-0000-0000-000000001521","tickets":[],"decisions":[],"validation_errors":[],"data":{"name":{"value":"B, | ||
Third","preferred_name":"Third B"},"status":"departed","_collections":["Authors"],"acquisition_source":{"email":"[email protected]","orcid":"0000-0000-0000-0000","method":"submitter","source":"submitter","datetime":"2024-11-18T11:34:19.809575","internal_uid":50872}},"workflow_type":"AUTHOR_CREATE","status":"error","_created_at":"2024-11-25T13:49:53.009000Z","_updated_at":"2024-12-18T16:53:37.094582Z"}' | ||
headers: | ||
Allow: | ||
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS | ||
Content-Language: | ||
- en | ||
Content-Length: | ||
- '523' | ||
Content-Type: | ||
- application/json | ||
Cross-Origin-Opener-Policy: | ||
- same-origin | ||
Date: | ||
- Wed, 18 Dec 2024 16:53:37 GMT | ||
Referrer-Policy: | ||
- same-origin | ||
Server: | ||
- WSGIServer/0.2 CPython/3.11.6 | ||
Server-Timing: | ||
- TimerPanel_utime;dur=19.293999999987932;desc="User CPU time", TimerPanel_stime;dur=3.731000000001927;desc="System | ||
CPU time", TimerPanel_total;dur=23.02499999998986;desc="Total CPU time", TimerPanel_total_time;dur=27.19899997464381;desc="Elapsed | ||
time", SQLPanel_sql_time;dur=3.820874000666663;desc="SQL 12 queries", CachePanel_total_time;dur=0;desc="Cache | ||
0 Calls" | ||
Vary: | ||
- Accept, Accept-Language, Cookie, origin | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
djdt-store-id: | ||
- 8887d70a0b23425ca85d6fb91fc63a3b | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
Oops, something went wrong.