Skip to content

build: cleanup ci/.bazelrc.#4978

Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
PiotrSikora:fix_4666
Nov 7, 2018
Merged

build: cleanup ci/.bazelrc.#4978
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
PiotrSikora:fix_4666

Conversation

@PiotrSikora
Copy link
Contributor

@PiotrSikora PiotrSikora commented Nov 6, 2018

Fixes: cp: '/source/.bazelrc' and '/source/ci/.bazelrc' are the same file.

Risk Level: Low
Testing: ./ci/run_envoy_docker.sh './ci/do_circle_ci.sh bazel.dev'
Docs Changes: n/a
Release Notes: n/a

Missed in #4771.

Signed-off-by: Piotr Sikora piotrsikora@google.com

Using cp results in:
cp: '/source/.bazelrc' and '/build/envoy-filter-example/.bazelrc' are the same file

*Risk Level*: Low
*Testing*: ./ci/run_envoy_docker.sh './ci/do_circle_ci.sh bazel.dev'
*Docs Changes*: n/a
*Release Notes*: n/a

Broken in envoyproxy#4666.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

cc @lizan @htuch @rshriram

Copy link
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

I think you'll only see that if you have previously ln -sf created .bazelrc in filter-example. This will result unexpected change in .bazelrc when you try to run clang-tidy locally.

@lizan lizan self-assigned this Nov 7, 2018
@moderation
Copy link
Contributor

moderation commented Nov 7, 2018

I ran into this recently using Docker to build and posted to Slack. To fix this I had to follow the last line at #4740 (comment)

rm -rf /tmp/envoy-docker-build/

@lizan
Copy link
Member

lizan commented Nov 7, 2018

perhaps run cleanup before setting up those files? then you won't see the error.

@PiotrSikora
Copy link
Contributor Author

rm -rf /tmp/envoy-docker-build/ doesn't fix this issues, bazel cleanup --expunge doesn't fix this issue either... but I found the root cause - build step pollutes local repository, so one also needs to remove the previous copy/link, i.e. rm -f ci/.bazelrc.

@PiotrSikora
Copy link
Contributor Author

Instead of closing this just yet, perhaps we should cleanup the repository after build completes?

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora changed the title build: fix build step. build: cleanup ci/.bazelrc. Nov 7, 2018
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

@lizan PTAL, I verified that it fixes the issue when moving from commit that had ci/.bazelrc created using ln -sf to commit that copies it.

@lizan lizan requested a review from htuch November 7, 2018 09:32
@mattklein123 mattklein123 merged commit 74de08a into envoyproxy:master Nov 7, 2018
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
Using cp results in:
cp: '/source/.bazelrc' and '/build/envoy-filter-example/.bazelrc' are the same file

*Risk Level*: Low
*Testing*: ./ci/run_envoy_docker.sh './ci/do_circle_ci.sh bazel.dev'
*Docs Changes*: n/a
*Release Notes*: n/a

Broken in envoyproxy#4666.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Fred Douglas <fredlas@google.com>
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