Page MenuHomeSoftware Heritage

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

Authored by anlambert on Mon, Sep 2, 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

anlambert created this revision.Mon, Sep 2, 5:54 PM
ardumont added inline comments.
swh/web/common/origin_save.py
418

its associated...

420

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

428

loading task type?

(Same sentence rephrasing below?)

532

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

anlambert added inline comments.Tue, Sep 3, 5:19 PM
swh/web/common/origin_save.py
428

Ack, shorter indeed

532

Ack, will log a warning here

anlambert updated this revision to Diff 6538.Tue, Sep 3, 5:25 PM

Update: Rebase and address @ardumont comments

ardumont accepted this revision.Tue, Sep 3, 5:31 PM

Looks good ;)

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