Page MenuHomeSoftware Heritage

Empty atom request request should raise a bad request (400)
ClosedPublic

Authored by ardumont on Jan 18 2022, 10:47 AM.

Details

Reviewers
moranegg
vlorentz
anlambert
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDDEP7f6a7b069525: Empty atom request request should raise a bad request (400)
Summary

instead of not being detected and crash as an internal server error (500)

Related to T3856

Test Plan

tox (should still be happy)

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26108
Build 40807: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 40806: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D6961 (id=25221)

Rebasing onto bcb97eb7be...

Current branch diff-target is up to date.
Changes applied before test
commit 59a8a88df7bf7aea0d35eec178246b97b1611364
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jan 18 10:45:00 2022 +0100

    Empty atom request request should raise a bad request (400)
    
    instead of not being detected and crash as an internal server error (500)
    
    Related to T3856

Link to build: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/689/
See console output for more information: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/689/console

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 18 2022, 10:50 AM
Harbormaster failed remote builds in B26082: Diff 25221!

Build has FAILED

because of "Failed in branch Sphinx documentation"...
Not because of the code...

ok then, that's the issue:

10:49:23  Warning, treated as error:
10:49:23  /var/lib/jenkins/workspace/DDEP/tests-on-diff/docs/README.rst:40:hardcoded link 'https://archive.softwareheritage.org/save/' could be replaced by an extlink (try using ':swh_web:`save/`' instead)
swh/deposit/api/common.py
832

Reusing the same message as ^

Build is green

Patch application report for D6961 (id=25227)

Rebasing onto bcb97eb7be...

Current branch diff-target is up to date.
Changes applied before test
commit 5c0baaab80d7047d5b4ab81a91141648302d8201
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jan 18 10:56:48 2022 +0100

    docs: Fix sphinx warning
10:49:23  Warning, treated as error:
10:49:23  /var/lib/jenkins/workspace/DDEP/tests-on-diff/docs/README.rst:40:hardcoded link 'https://archive.softwareheritage.org/save/' could be replaced by an extlink (try using ':swh_web:`save/`' instead)
```

commit 59a8a88df7bf7aea0d35eec178246b97b1611364
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date: Tue Jan 18 10:45:00 2022 +0100

Empty atom request request should raise a bad request (400)

instead of not being detected and crash as an internal server error (500)

Related to T3856
See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/690/ for more details.
anlambert added inline comments.
docs/README.rst
41 ↗(On Diff #25227)

You can keep the same link using (based on D6960)

:swh_web:`save code now <save/>`
swh/deposit/api/common.py
814

Should not it be: is supposed to be sent instead of is supposed to send ?

832

same comment as above

  • Adapt according to suggestion (rephrase error message)
  • avoid error message duplication
  • Add test case around the new conditional
  • Adapt according to link suggestion from the other diff (dedicated commit btw)
swh/deposit/api/common.py
814

yes, thanks.
I'm of a mind to change that to something clearer (incoming)

Build has FAILED

Patch application report for D6961 (id=25244)

Rebasing onto bcb97eb7be...

Current branch diff-target is up to date.
Changes applied before test
commit f950799b9dc3524243d9c0cc1c34407aaedb2e14
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jan 18 10:56:48 2022 +0100

    docs: Fix sphinx warning
10:49:23  Warning, treated as error:
10:49:23  /var/lib/jenkins/workspace/DDEP/tests-on-diff/docs/README.rst:40:hardcoded link 'https://archive.softwareheritage.org/save/' could be replaced by an extlink (try using ':swh_web:`save/`' instead)
```

commit b8e64f4737e3b69aa3b903ea4b97808219cafe84
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date: Tue Jan 18 10:45:00 2022 +0100

Empty atom request request should raise a bad request (400)

instead of not being detected and crash as an internal server error (500)

Related to T3856
Link to build: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/691/
See console output for more information: https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/691/console

Build is green

Patch application report for D6961 (id=25245)

Rebasing onto bcb97eb7be...

Current branch diff-target is up to date.
Changes applied before test
commit 09ac133ec069457fe1860e6c4acb778ab2468d4e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jan 18 10:56:48 2022 +0100

    docs: Fix sphinx warning
10:49:23  Warning, treated as error:
10:49:23  /var/lib/jenkins/workspace/DDEP/tests-on-diff/docs/README.rst:40:hardcoded link 'https://archive.softwareheritage.org/save/' could be replaced by an extlink (try using ':swh_web:`save/`' instead)
```

commit f18e689ef75f9da02cedb5588b30d3b55bdbf9a1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date: Tue Jan 18 10:45:00 2022 +0100

Empty atom request request should raise a bad request (400)

instead of not being detected and crash as an internal server error (500)

Related to T3856
See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/692/ for more details.
This revision is now accepted and ready to land.Jan 18 2022, 11:37 AM

Thanks @anlambert.

The 2nd commit about the docs should fix the master build btw!
I'll remove it from the diff and commit it first.

Drop fix doc commit from the diff

Build is green

Patch application report for D6961 (id=25246)

Rebasing onto 78ea259764...

Current branch diff-target is up to date.
Changes applied before test
commit 7f6a7b0695256c581448f25013928e855e24006a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jan 18 10:45:00 2022 +0100

    Empty atom request request should raise a bad request (400)
    
    instead of not being detected and crash as an internal server error (500)
    
    Related to T3856

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/693/ for more details.