Page MenuHomeSoftware Heritage

deposit: Reuse config.load_from_envvar for configuration loading
ClosedPublic

Authored by ardumont on Oct 7 2020, 2:27 PM.

Details

Summary

This is what the current code inlined is doing already. This code was anterior
to the function being born in swh.core.config

Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
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 D4179 (id=14698)

Rebasing onto 29112fc3ed...

Current branch diff-target is up to date.
Changes applied before test
commit c9b7a55f1cd0628539d780fba62910b50931de75
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 14:25:05 2020 +0200

    deposit: Reuse config.load_from_envvar for configuration loading
    
    This is what the current code inlined is doing already. This code was anterior
    to the function being born in swh.core.config

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

Build has FAILED

Patch application report for D4179 (id=14699)

Rebasing onto 29112fc3ed...

Current branch diff-target is up to date.
Changes applied before test
commit 210e11b7de0252fc530d93e3c954a5b4b57733ac
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 14:25:05 2020 +0200

    deposit: Reuse config.load_from_envvar for configuration loading
    
    This is what the current code inlined is doing already. This code was anterior
    to the function being born in swh.core.config

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

Build is green

Patch application report for D4179 (id=14700)

Rebasing onto 29112fc3ed...

Current branch diff-target is up to date.
Changes applied before test
commit 78ea26a32511201e6ddbbd2ae4674559c311c1ff
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 14:25:05 2020 +0200

    deposit: Reuse config.load_from_envvar for configuration loading
    
    This is what the current code inlined is doing already. This code was anterior
    to the function being born in swh.core.config

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/deposit/client.py
81–82

alternatively, if you prefer: self.config = config or load_from_envvar()

This revision is now accepted and ready to land.Oct 7 2020, 2:45 PM
swh/deposit/client.py
81–82

heh, thanks.
jsyk, i'm adding a test for it...

  • Adapt instruction according to good suggestion
  • Add a test around the configuration loading for the deposit client (to actually test the load from env scenario)

Build is green

Patch application report for D4179 (id=14701)

Rebasing onto 29112fc3ed...

Current branch diff-target is up to date.
Changes applied before test
commit ba0a932937e71c5ecde0752161619e46e7e4db2b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 14:25:05 2020 +0200

    deposit: Reuse config.load_from_envvar for configuration loading
    
    This is what the current code inlined is doing already. This code was anterior
    to the function being born in swh.core.config

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

Drop modified part committed by mistake ¯\_(ツ)_/¯

Build is green

Patch application report for D4179 (id=14702)

Rebasing onto 29112fc3ed...

Current branch diff-target is up to date.
Changes applied before test
commit cd9c04afe622cc39a9d49049a424b3c5f5fb5c9e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 14:25:05 2020 +0200

    deposit: Reuse config.load_from_envvar for configuration loading
    
    This is what the current code inlined is doing already. This code was anterior
    to the function being born in swh.core.config

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