Page MenuHomeSoftware Heritage

Add function to get task execution info for a 'Save code now' request
ClosedPublic

Authored by anlambert on Sep 2 2019, 5:54 PM.

Details

Summary

Last week, @rdicosmo asked me if we could get more details regarding the execution
of a loading task associated to a 'Save code now' request.

As the 'Save code now' feature starts to get more and more advertised in the
scientific community, we need to ensure it is reliable (especially for the
saving of git origins). So, we should be able to quickly get relevant task
execution details in order to analyze issues for those who failed.

So, in order to provide some feedback to users regarding the loading task execution
associated to a save code now request, add a dedicated function in related module.

This function will notably try to extract relevant task execution info (log message,
worker name, ...) by querying the elasticsearch cluster of Software Heritage.

Related T1976

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont added inline comments.
swh/web/common/origin_save.py
417

its associated...

419

is archived and removed from..., returns an empty dictionary.

427

loading task type?

(Same sentence rephrasing below?)

531

Logging a warning exception should exist here, should'nt it?
At least to have some grasp on possible elasticsearch communication issues.

swh/web/common/origin_save.py
427

Ack, shorter indeed

531

Ack, will log a warning here

Update: Rebase and address @ardumont comments

This revision is now accepted and ready to land.Sep 3 2019, 5:31 PM
This revision was automatically updated to reflect the committed changes.