Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix the deletion of old pkg/sql/exec/*.eg.go files #40765

Merged
merged 1 commit into from
Sep 14, 2019

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Sep 14, 2019

With the recent renaming of pkg/sql/exec to pkg/sql/colexec, we
want to remove the files generated into the old directory. However,
the previous commands were not error-prone, i.e. if the directory
didn't exist, the command would fail which would in turn could fail
the build. Now this is fixed by either redirecting the error into
/dev/null or testing for presence of the old directory.

Also, remove the unnecessary command to delete pkg/sql/exec/*.og.go
files (this was needed only for a few weeks in the Fall of 2018).

Release justification: Category 1: Non-production code changes.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

With the recent renaming of pkg/sql/exec to pkg/sql/colexec, we
want to remove the files generated into the old directory. However,
the previous commands were not error-prone, i.e. if the directory
didn't exist, the command would fail which would in turn could fail
the build. Now this is fixed by either redirecting the error into
/dev/null or testing for presence of the old directory.

Also, remove the unnecessary command to delete pkg/sql/exec/*.og.go
files (this was needed only for a few weeks in the Fall of 2018).

Release justification: Category 1: Non-production code changes.

Release note: None
@jordanlewis
Copy link
Member

LGTM. Please kick off another nightly run when this merges, thanks!

@yuzefovich
Copy link
Member Author

TFTR!

bors r=jordanlewis

craig bot pushed a commit that referenced this pull request Sep 14, 2019
40765: build: fix the deletion of old pkg/sql/exec/*.eg.go files r=jordanlewis a=yuzefovich

With the recent renaming of pkg/sql/exec to pkg/sql/colexec, we
want to remove the files generated into the old directory. However,
the previous commands were not error-prone, i.e. if the directory
didn't exist, the command would fail which would in turn could fail
the build. Now this is fixed by either redirecting the error into
/dev/null or testing for presence of the old directory.

Also, remove the unnecessary command to delete pkg/sql/exec/*.og.go
files (this was needed only for a few weeks in the Fall of 2018).

Release justification: Category 1: Non-production code changes.

Release note: None

Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Sep 14, 2019

Build succeeded

@craig craig bot merged commit 62b1678 into cockroachdb:master Sep 14, 2019
@yuzefovich yuzefovich deleted the fix-build branch September 14, 2019 19:29
@@ -1551,7 +1548,7 @@ unsafe-clean-c-deps:
.PHONY: clean-execgen-files
clean-execgen-files:
find ./pkg/sql/colexec -type f -name '*.eg.go' -exec rm {} +
find ./pkg/sql/exec -type f -name '*.eg.go' -exec rm {} + || true
test -d ./pkg/sql/exec && find ./pkg/sql/exec -type f -name '*.eg.go' -exec rm {} + || true
Copy link
Contributor

Choose a reason for hiding this comment

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

tip: I'd have done -exec rm -f ... and removed || true so that you'd still grab permission errors from find if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants