action #174607
closed[openQA-in-openQA] test fails in single_container_webui: [Pipe::Sass] Could not compile "stylesheets/openqa.scss" Invalid US-ASCII character
0%
Description
Observation¶
openQA test in scenario openqa-Tumbleweed-dev-x86_64-openqa_from_containers@64bit-2G fails in
single_container_webui
Relevant error message:
[Pipe::Sass] Could not compile "stylesheets/openqa.scss" with opts={"include_paths" => [bless( do{\(my $o = "/usr/share/openqa/script/../assets/stylesheets")}, 'Mojo::File' ),bless( do{\(my $o = "/usr/share/openqa/script/../assets")}, 'Mojo::Home' )]}: /usr/share/openqa/assets/stylesheets/overview.scss:6: Invalid US-ASCII character "\xE2" (Sass::SyntaxError)
from (sass):24
Test suite description¶
Reproducible¶
Fails since (at least) Build :TW.33524 (current job)
Expected result¶
Last good: :TW.33523 (or more recent)
Further details¶
Always latest result in this scenario: latest
Updated by jbaier_cz 2 months ago
- Related to action #162503: AssetPack should fail if sass fails size:M added
Updated by jbaier_cz 2 months ago
This was not what I expected. The issue is of course with the non-ascii character inside overview.scss, where we have
&:first-child:before {
content: "•";
}
The issue can be reproduced with podman:
podman run --rm -ti opensuse/leap:15.6 bash -c 'zypper ar -p 95 -f http://download.opensuse.org/repositories/devel:openQA/15.6 devel_openQA && zypper ar -p 90 -f http://download.opensuse.org/repositories/devel:openQA:Leap:15.6/15.6 devel_openQA_Leap && zypper --gpg-auto-import-keys ref && zypper in -y ca-certificates-mozilla curl openQA-local-db apache2 apache2-utils hostname which w3m "rubygem(sass)>=3.7.4" && cd /usr/share/openqa/assets && sass -I . stylesheets/openqa.scss'
What is the funny part, it is just the sass
reading the locale and deciding not to use UTF-8 support (the default locale in the container is POSIX
), so just adding LC_ALL=C.UTF-8
into the environment is enough to make this issue go away.
I will make the appropriate PR for our Dockerfiles, but I am not entirely sure if we should address that issue in some other way?
Updated by jbaier_cz 2 months ago
- Status changed from In Progress to Feedback
- Priority changed from Urgent to Normal
For our containers, https://github.com/os-autoinst/openQA/pull/6088 should be enough to make sure sass will not fail. Also it seems that although the core issue is 100% reproducible, the job will fail only sporadically, maybe the sass is not always recompiling the assets?
Updated by tinita 2 months ago
Dependency cron is also failing with sass related errors: https://github.com/os-autoinst/openQA/pull/608
There is no error output though.
https://app.circleci.com/pipelines/github/os-autoinst/openQA/15394/workflows/19fbb4e8-4e14-477e-9620-87dc9f7f8639/jobs/147523
[04:48:30] t/43-scheduling-and-worker-scalability.t .. [Pipe::Sass] Could not compile "stylesheets/dependency_graph.scss" with opts={"include_paths" => [bless( do{\(my $o = "/home/squamata/project/assets/stylesheets")}, 'Mojo::File' ),bless( do{\(my $o = "/home/squamata/project/assets")}, 'Mojo::Home' )]}: at /usr/lib/perl5/vendor_perl/5.26.1/Mojolicious/Plugin/AssetPack/Pipe/Sass.pm line 70.
[04:48:30] t/43-scheduling-and-worker-scalability.t .. 1/?
# Failed test 'sub process openqa-webapi terminated with exit code 65280'
# at /home/squamata/project/t/lib/OpenQA/Test/Utils.pm line 209.
# Looks like your test exited with -1 just after 2.
I can reproduce this locally with the new AssetPack module. I think it's actually doing too much error handling, see https://github.com/mojolicious/mojo-assetpack/pull/154/files#r1893955797
Updated by jbaier_cz 2 months ago
if I do make test TESTS=t/43-scheduling-and-worker-scalability.t IPCRUN3DEBUG=1
I get:
run3(): running '/usr/bin/sass' '-s' '--trace' '-I' '/home/jbaier/Projects/openQA/assets/stylesheets' '-I' '/home/jbaier/Projects/openQA/assets' '--scss' '-t' 'compressed'
run3(): $? is -1
which seems like there really is some problem running the sass inside the tests
Updated by tinita 2 months ago
This patch helps:
diff --git a/lib/OpenQA/Assets.pm b/lib/OpenQA/Assets.pm
index 5b2b33e8d..4f0ac0c93 100644
--- a/lib/OpenQA/Assets.pm
+++ b/lib/OpenQA/Assets.pm
@@ -20,6 +20,7 @@ sub setup ($server) {
$server->asset->store->retries(5) if $Mojolicious::Plugin::AssetPack::VERSION > 2.13;
# -> read assets/assetpack.def
+ local $SIG{CHLD};
eval { $server->asset->process };
if (my $assetpack_error = $@) { # uncoverable statement
$assetpack_error # uncoverable statement
Updated by jbaier_cz 2 months ago
Yeah, for some reason (which starts to look like a perl magic for me), the code from IPC::Run3
my $r = ref $cmd
? system { $cmd->[0] } is_win32 ? quote_native( @$cmd ) : @$cmd
: system $cmd;
is setting $r==0
and $?==-1
inside our tests.
...
Fiddling with child related signals might help :)
Updated by okurz 2 months ago
- Status changed from Feedback to Resolved
https://github.com/os-autoinst/openQA/pull/6090 merged and a subsequent dependency update https://github.com/os-autoinst/openQA/pull/6091 was merged as well.
https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=openqa&flavor=dev&machine=64bit-2G&test=openqa_from_containers&version=Tumbleweed#next_previous looks very stable so I guess we are good here.