Page MenuHomeSoftware Heritage

vault-ui: Log caught error when listing
ClosedPublic

Authored by ardumont on Nov 19 2020, 3:45 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Summary

When error occurs, they are dropped silently which does not ease the
analysis.

Adding a simple console.log for now could ease the developer experience.

Test Plan

tox

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17265
Build 26660: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 26659: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4535 (id=16061)

Could not rebase; Attempt merge onto 660ef62fd6...

Updating 660ef62f..83726df7
Fast-forward
 swh/web/api/views/vault.py                   | 17 +++++++++++++++--
 swh/web/assets/src/bundles/vault/vault-ui.js |  4 +++-
 swh/web/tests/api/views/test_vault.py        | 25 +++++++++++++------------
 3 files changed, 31 insertions(+), 15 deletions(-)
Changes applied before test
commit 83726df73fe91a23f5186df99596325ff55610b0
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Nov 19 13:56:37 2020 +0100

    vault-ui: Log caught error when listing

commit 6eb2ceb4689410d0ea274e0bdb62154bf8622b33
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Nov 19 14:23:06 2020 +0100

    vault: Fix vault listing ui
    
    Names got changed in the api backend. Unfortunately, this passed undetected
    both by the vault and the webapp tests.
    
    As the try catch within the js is silent, this fails silently.
    
    This commit fixes to create a mapping from the new names to the old names to
    keep the api consistent with existing behavior.

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

anlambert added a subscriber: anlambert.

Ack, let's integrate that now. For end users an error message should be displayed in place of the empty vault cooking tasks list but let's implement and test that in another diff.

This revision is now accepted and ready to land.Nov 19 2020, 4:07 PM