Skip to content

Fix incremental loader cleanup when no run statements are defined#875

Merged
k8s-ci-robot merged 1 commit intobazelbuild:masterfrom
clintharrison:incr-loader-no-run-statements
Jun 11, 2019
Merged

Fix incremental loader cleanup when no run statements are defined#875
k8s-ci-robot merged 1 commit intobazelbuild:masterfrom
clintharrison:incr-loader-no-run-statements

Conversation

@clintharrison
Copy link
Contributor

This fixes the bug mentioned in #793. When we don't generate any run statements (that is, run in incremental_load() is false), we don't exec docker, and the cleanup runs twice.

if [ "a$*" != "a--norun" ]; then
# This is not executed if the single argument --norun is passed or
# no run_statements are generated (in which case, 'run' is 'False').
if [[ "a$*" != "a--norun" && "%{run}" == "True" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably reuse run_statements and check if that's not an empty string here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hesitant to do that -- run_statements can be modified by the consumer's docker_run_flags attribute, and this might contain double quotes.

@clintharrison clintharrison force-pushed the incr-loader-no-run-statements branch from d6170ce to 7ceb289 Compare June 11, 2019 18:18
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clintharrison, xingao267

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 4bcf945 into bazelbuild:master Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants