Page MenuHomeSoftware Heritage

Fix data build script
ClosedPublic

Authored by Alphare on Jun 2 2021, 7:11 PM.

Details

Reviewers
olasd
Group Reviewers
Reviewers
Commits
rDLDHGf9fa0dd39df5: Fix data build script
Summary

The subprocess call (which should have been using run) uses the -u
bash option, which stops the script at the first sight of an unset
variable... but also doesn't set the variable expected by the very
docstring example.

We also reset the environment so that the hg script is not influenced by
user configuration, which was a second source of breakage.

Diff Detail

Repository
rDLDHG Mercurial loader
Branch
build-script
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21725
Build 33769: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 33768: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D5815 (id=20760)

Rebasing onto 0f19c32fc0...

Current branch diff-target is up to date.
Changes applied before test
commit 59a99181530df834d40dec4986af03abb166daa9
Author: Raphaël Gomès <rgomes@octobus.net>
Date:   Wed Jun 2 19:08:02 2021 +0200

    Fix data build script
    
    The subprocess call (which should have been using `run`) uses the `-u`
    bash option, which stops the script at the first sight of an unset
    variable... but also doesn't set the variable expected by the very
    docstring example.
    
    We also reset the environment so that the hg script is not influenced by
    user configuration, which was a second source of breakage.

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

olasd requested changes to this revision.Jun 3 2021, 10:16 AM
olasd added a subscriber: olasd.

Hum, looks like you squashed the changes related to the new branch structure with this the change described in the commit message. Would it be possible to split them off? If not, then the commit message needs to actually describe the change in branch structure, rather than the incidental change to the data generation script.

This revision now requires changes to proceed.Jun 3 2021, 10:16 AM
In D5815#148012, @olasd wrote:

Hum, looks like you squashed the changes related to the new branch structure with this the change described in the commit message. Would it be possible to split them off? If not, then the commit message needs to actually describe the change in branch structure, rather than the incidental change to the data generation script.

Ah sorry, I indeed intended to only send the changes to build.py. I've updated the patch to reflect this.

Build is green

Patch application report for D5815 (id=20773)

Rebasing onto 0f19c32fc0...

Current branch diff-target is up to date.
Changes applied before test
commit f9fa0dd39df5cbe9afe92b70672230ed2e1b6e94
Author: Raphaël Gomès <rgomes@octobus.net>
Date:   Thu Jun 3 10:26:58 2021 +0200

    Fix data build script
    
    The subprocess call (which should have been using run) uses the -u
    bash option, which stops the script at the first sight of an unset
    variable... but also doesn't set the variable expected by the very
    docstring example.
    
    We also reset the environment so that the hg script is not
    influenced by user configuration, which was a second source of
    breakage.

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

Thanks! It would be nice to have at least a simple smoke test which just runs this script, but that's not a blocker for actually fixing it in the first place.

This revision is now accepted and ready to land.Jun 3 2021, 11:46 AM
This revision was automatically updated to reflect the committed changes.