Skip to content

build: workaround for issues with en_US.UTF-8 locale.#15980

Closed
PiotrSikora wants to merge 7 commits intoenvoyproxy:mainfrom
PiotrSikora:build-tools-20210414
Closed

build: workaround for issues with en_US.UTF-8 locale.#15980
PiotrSikora wants to merge 7 commits intoenvoyproxy:mainfrom
PiotrSikora:build-tools-20210414

Conversation

@PiotrSikora
Copy link
Copy Markdown
Contributor

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

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #15980 was opened by PiotrSikora.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Apr 14, 2021
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15980 (comment) was created by @PiotrSikora.

see: more, trace.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora marked this pull request as ready for review April 15, 2021 02:42
@PiotrSikora PiotrSikora requested review from moderation and wrowe April 15, 2021 02:42
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15980 (comment) was created by @PiotrSikora.

see: more, trace.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora added a commit to PiotrSikora/envoy that referenced this pull request Apr 15, 2021
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Copy link
Copy Markdown
Contributor Author

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

im struggling to understand how this breaks - weve been using the updated build image for some time

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also this is not run in the build image - so this overriding the locales in the CI (ie azure) image (afaict)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how does it break sed ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

==================== Test output for //test/exe:version_out_test:
sed: -e expression #1, char 127: Invalid range end

See failed run: https://dev.azure.com/cncf/envoy/_build/results?buildId=71987&view=logs&j=5b1da4ae-91c5-53b4-2dce-4cdfc8f90e84&t=7ce850fe-192d-5106-1bd3-aa6c6dba22dc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@moderation
Copy link
Copy Markdown
Contributor

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Apr 15, 2021
moderation
moderation previously approved these changes Apr 15, 2021
@mattklein123 mattklein123 self-assigned this Apr 15, 2021
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora changed the title build: update envoy-build-tools to latest (2021-04-14). build: workaround for issues with en_US.UTF-8 locale. Apr 15, 2021
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #15980 (comment) was created by @PiotrSikora.

see: more, trace.

Copy link
Copy Markdown
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

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

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

Replaced by smaller #15997.

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