Closed jpl-jengelke closed 2 years ago
Last known-working version 2.2.1
Reproducible on fresh install of 2.2.1
with
pds-doi-cmd reserve --input ~/dev/doi-service/test_label.xml --node ENG
Comparison of dependencies yields only pandas
1.4.4->1.5.0
(see #367)
Pinning pandas==1.4.4
and reinstalling doi-service
2.2.1
results in same error
Now for the weird bits.
Credentials are confirmed correct via login to https://doi.test.datacite.org
The following request, generated with PostMan, with the body copied from that of the failing reserve
action from the previous comment also succeeds.
curl --location --request POST 'https://api.test.datacite.org/dois' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Basic <REDACTED>' \
--data-raw '{
"data":
{
"type": "dois",
"attributes": {
"event": "hide",
"prefix": "10.13143",
"identifiers": [
{
"identifier": "urn:nasa:pds:blah_test::1.0",
"identifierType": "Site ID"
}
],
"creators": [
{
"nameType": "Personal",
"name": "J. R. Johnson",
"nameIdentifiers": [
]
}
],
"titles": [
{
"title": "blah test 1.0 Bundle",
"lang": "en"
}
],
"publisher": "NASA Planetary Data System",
"publicationYear": "2020",
"subjects": [
{ "subject": "PDS" },
{ "subject": "PDS4" }
],
"contributors": [
{
"nameType": "Organizational",
"name": "Planetary Data System: Engineering Node",
"contributorType": "DataCurator"
}
],
"types": {
"resourceTypeGeneral": "Collection",
"resourceType": "PDS4 Collection "
},
"relatedIdentifiers": [
],
"created": "2022-09-21T21:21:12.964852Z",
"updated": "2022-09-21T21:21:12.964852Z",
"state": "draft",
"language": "en",
"schemaVersion": "http://datacite.org/schema/kernel-4"
}
}
}'
This is a requests_toolbelt
dump of the failing doi-service
request
< POST /dois HTTP/1.1
< Host: api.test.datacite.org
< User-Agent: python-requests/2.28.1
< Accept-Encoding: gzip, deflate
< Accept: application/vnd.api+json
< Connection: keep-alive
< Content-Type: application/vnd.api+json
< Content-Length: 1829
< Authorization: Basic <REDACTED>
<
< {
"data":
{
"type": "dois",
"attributes": {
"event": "hide",
"prefix": "10.13143",
"identifiers": [
{
"identifier": "urn:nasa:pds:blah_test::1.0",
"identifierType": "Site ID"
}
],
"creators": [
{
"nameType": "Personal",
"name": "J. R. Johnson",
"nameIdentifiers": [
]
}
],
"titles": [
{
"title": "blah test 1.0 Bundle",
"lang": "en"
}
],
"publisher": "NASA Planetary Data System",
"publicationYear": "2020",
"subjects": [
{ "subject": "PDS" },
{ "subject": "PDS4" }
],
"contributors": [
{
"nameType": "Organizational",
"name": "Planetary Data System: Engineering Node",
"contributorType": "DataCurator"
}
],
"types": {
"resourceTypeGeneral": "Collection",
"resourceType": "PDS4 Collection "
},
"relatedIdentifiers": [
],
"created": "2022-09-21T21:21:12.964852Z",
"updated": "2022-09-21T21:21:12.964852Z",
"state": "draft",
"language": "en",
"schemaVersion": "http://datacite.org/schema/kernel-4"
}
}
}
diff of bodies confirms they're identical
PostMan request succeeds even with identical headers
*identical headers except Authorization
.
2.2.1 is erroneously pulling the default config (and therefore credential placeholders) in preference to the user-specified config (see https://github.com/NASA-PDS/doi-service/pull/354).
With that fixed, call succeeds from doi-service
.
Best informed guess:
There was a bug that resulted in the user-defined configs (and ergo, the DataCite credentials) failing to load. I fixed that a month ago https://github.com/NASA-PDS/doi-service/pull/354
I'm not sure why it only appeared in early August (https://github.com/NASA-PDS/doi-service/issues/350), but there was never a reason for me to spend time figuring that out.
That PR won't be available until 2.3.1, if I'm understanding correctly. That also seems like it means that doi-service will be fundamentally broken until 2.3.1, at least for anyone supplying creds through the user-defined config file.
Version 2.3.2 is on PyPi right now. Is that correct?
๐ Describe the bug identified during I&T
Regression tests started failing at build 82. They continued failing with subsequent releases of
doi-service
. Basically, the errors involve login problems to DataCite:๐ฅผ Related Test Case(s)
doi-service #273
๐ : Related issues
N/A
โ Additional Details
See regression tests for details at https://pds-jenkins.jpl.nasa.gov/view/int/job/pds-doi-console-regression-tests/job/develop/
๐ To Reproduce
Steps to reproduce the behavior:
๐ต๏ธ Expected behavior
Login succeeds and data import succeeds, no DataCite errors.
๐ Version of Software Used
doi-service 2.2.1+ (PyPi)
๐ฉบ Test Data / Additional context
DEV password to datasite is used in the DOI Service INI file.
๐Screenshots
NA, see link above.
๐ฅ System Info
๐ฆ Related requirements
โ๏ธ Engineering Details