Page MenuHomeSoftware Heritage

Implement counters pipeline
ClosedPublic

Authored by vsellier on Mar 12 2021, 10:08 AM.

Details

Summary

It uses a pytest-redis library to test the code related to redis.This lib is not packaged in debian so we'll need to build it and push on our debian repository
Redis also needs to be added on the build environment

Related to T2912

Diff Detail

Repository
rDCNT Archive counters
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D5232 (id=18762)

Rebasing onto 826c30e4b7...

Current branch diff-target is up to date.
Changes applied before test
commit 9bfd9f991afc9ca966a7669b2836afde537fce04
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 11 14:35:50 2021 +0100

    Implement counters pipeline
    
    Related to T2912

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 12 2021, 10:09 AM
Harbormaster failed remote builds in B19858: Diff 18762!
vsellier retitled this revision from Implement counters pipeline It uses a `pytest-redis` library to test the code related to redis. This lib is not packaged in debian so we'll need to build it and push on our debian repository to Implement counters pipeline.Mar 12 2021, 10:13 AM
vsellier edited the summary of this revision. (Show Details)
vsellier edited the summary of this revision. (Show Details)

Build has FAILED

Patch application report for D5232 (id=18762)

Rebasing onto 826c30e4b7...

Current branch diff-target is up to date.
Changes applied before test
commit 9bfd9f991afc9ca966a7669b2836afde537fce04
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 11 14:35:50 2021 +0100

    Implement counters pipeline
    
    Related to T2912

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

Build is green

Patch application report for D5232 (id=18762)

Rebasing onto 826c30e4b7...

Current branch diff-target is up to date.
Changes applied before test
commit 9bfd9f991afc9ca966a7669b2836afde537fce04
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 11 14:35:50 2021 +0100

    Implement counters pipeline
    
    Related to T2912

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

great

couple of comments inline.

swh/counters/redis.py
32–37

You can use an @property attribute like ^.
And then refer to self.redis_client (except for the self._redis_client = None under class up above) everywhere.
Then that code will get executed transparently.

(suggestion ^)

swh/counters/tests/test_journal_client.py
24

you can clean up a bit :)

swh/counters/tests/test_redis.py
27

Isn't redise a typo and redundant a bit?

This revision is now accepted and ready to land.Mar 15 2021, 5:14 PM
swh/counters/redis.py
32–37

Nice, I will use this

swh/counters/tests/test_journal_client.py
24

sure :)

review feedbacks:

  • rename the strangly named test
  • use a getter for the redis client property
  • cleanup code

Build is green

Patch application report for D5232 (id=18834)

Rebasing onto 826c30e4b7...

Current branch diff-target is up to date.
Changes applied before test
commit d90ee1974638bed7e1f2afdf9c5a4ea0233c0594
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 11 14:35:50 2021 +0100

    Implement counters pipeline
    
    Related to T2912

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

This revision was automatically updated to reflect the committed changes.