Page MenuHomeSoftware Heritage

journal_client: Only upsert if we have something to upsert
ClosedPublic

Authored by ardumont on Aug 26 2021, 11:47 AM.

Details

Summary

To avoid lots of useless transactions.

Test Plan

tox happy

Diff Detail

Repository
rDSCH Scheduling utilities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6140 (id=22224)

Rebasing onto 506f78c827...

Current branch diff-target is up to date.
Changes applied before test
commit cc76a573e795c9001473858af3591ff66304c152
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Aug 26 11:44:14 2021 +0200

    journal_client: Only upsert if we have something to upsert

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

anlambert added a subscriber: anlambert.

Looks good to me. Could you add a test for this or is it too complicated ? The code is covered but not the introduced behavior,

This revision is now accepted and ready to land.Aug 26 2021, 12:09 PM

Looks good to me. Could you add a test for this or is it too complicated ? The code is covered but not the introduced behavior,

I'm not entirely sure on how to proceed for the test indeed.

But for sure, it's currently working as expected on the production patched swh-scheduler-journal-client (saatchi).

Looks good to me. Could you add a test for this or is it too complicated ? The code is covered but not the introduced behavior,

I'm not entirely sure on how to proceed for the test indeed.

But for sure, it's currently working as expected on the production patched swh-scheduler-journal-client (saatchi).

Ack, let's forget that test then. Considering the changes, it does not worth it to lose time on it.