build: workaround for issues with en_US.UTF-8 locale.#15980
build: workaround for issues with en_US.UTF-8 locale.#15980PiotrSikora wants to merge 7 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora
left a comment
There was a problem hiding this comment.
NOTE: envoyproxy/envoy-build-tools#125 changed the default locale to en_US.UTF-8, which broke sed and docker load/save from stdin/stdout, so I've added LC_ALL=C in a few places to unbreak those tools.
phlax
left a comment
There was a problem hiding this comment.
hi @PiotrSikora comments inline
| function run_ci_verify () { | ||
| echo "verify examples..." | ||
| docker load < "$ENVOY_DOCKER_BUILD_DIR/docker/envoy-docker-images.tar.xz" | ||
| LC_ALL=C docker load < "$ENVOY_DOCKER_BUILD_DIR/docker/envoy-docker-images.tar.xz" |
There was a problem hiding this comment.
im struggling to understand how this breaks - weve been using the updated build image for some time
There was a problem hiding this comment.
also this is not run in the build image - so this overriding the locales in the CI (ie azure) image (afaict)
There was a problem hiding this comment.
Yes, it changes locale in the CI, not build image, so that byte sequences passed to docker load/save are interpreted correctly.
Previously, it resulted in EOF during docker loadwhen reading from pipe, perhaps it was a flake, but there was another fallout because of the UTF-8 change and I was running against the clock. Unfortunatelly, I cannot find that run in Azure Pipelines now, though.
There was a problem hiding this comment.
but docker load/save wasnt/isnt broken
| set -e -o pipefail | ||
|
|
||
| # Undo LC_ALL=en_US.UTF-8, since it breaks sed. | ||
| export LC_ALL=C |
There was a problem hiding this comment.
i can see https://www.gnu.org/software/sed/manual/html_node/Locale-Considerations.html
but what is being seded here (afaict) is the version string which shouldnt contain any multibyte chars - which would imply the issue is more with the sed string - i might be wrong
There was a problem hiding this comment.
==================== Test output for //test/exe:version_out_test:
sed: -e expression #1, char 127: Invalid range end
There was a problem hiding this comment.
not sure - but afaict both the linux image and the build-tools can be updated without this change
it may be necessary for some other reason that im not understanding - but my reading of the source is that its using sed to change the verssion string - and that should not have any kind of utf-8 issues
There was a problem hiding this comment.
re this @PiotrSikora - i think - and i may be wrong - that the sed expression has an incorrect \ which is being interpreted as a utf-8 multibyte char but i really dont see how the change in the docker image recipe would affect this
There was a problem hiding this comment.
ie its unrelated to the change in envoy-build-tools - it was always there - and its only when one of the tests fails that it has this issue
There was a problem hiding this comment.
I mean, what can I say? See the CI failures from a few hours ago.
Also, the fact that updating Linux image alone works, and updating build-tools alone works, doesn't prove that both changes work fine together, does it? It's not like I was making all those changes for fun, they are direct results of failures on the CI.
|
/lgtm deps |
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
|
/retest |
|
Retrying Azure Pipelines: |
phlax
left a comment
There was a problem hiding this comment.
lgtm
the docker may/not be required but if we want to land/publish before waiting for confirmation either way this will resolve - as @PiotrSikora has said
|
Replaced by smaller #15997. |
Signed-off-by: Piotr Sikora piotrsikora@google.com