Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Bizarre incompatibility between googlecloudprofiler and libsass #413

@danking

Description

@danking

Hey all,

Apologies for bringing what I suspect will be a terribly hard bug to nail down.

Create a Dockerfile with this contents:

FROM python:3.7
RUN pip3 install google-cloud-profiler==4.0.0 libsass==0.22.0
WORKDIR /foo
RUN printf '$devil-gray: #123\n' > variables.scss
RUN printf '@import "variables.scss";\nhtml { color: $devil-gray; }' > foo.scss
RUN printf >good.py '\
import sass \n\
import os \n\
d = os.path.abspath(".") \n\
sass.compile(dirname=(d, d), output_style="compressed", include_paths=[d])'

RUN printf >bad.py '\
import googlecloudprofiler \n\
import sass \n\
import os \n\
d = os.path.abspath(".") \n\
sass.compile(dirname=(d, d), output_style="compressed", include_paths=[d])'

Build it:

docker build . -t foo

And see this bizarre behavior:

(base) dking@wm28c-761 /tmp % docker run foo /bin/bash -c 'python3 good.py ; cat *.css'
html{color:#123}
(base) dking@wm28c-761 /tmp % docker run foo /bin/bash -c 'python3 bad.py ; cat *.css'
html{color:#}

In case it's not clear: I expected bad.py to produce the same CSS file as good.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions