Skip to content

settings: don't COMPRESS assets in local envs with DEBUG=1 (no bug)#768

Merged
shtrom merged 1 commit intomainfrom
no-bug/compress-debug
Dec 15, 2025
Merged

settings: don't COMPRESS assets in local envs with DEBUG=1 (no bug)#768
shtrom merged 1 commit intomainfrom
no-bug/compress-debug

Conversation

@shtrom
Copy link
Member

@shtrom shtrom commented Dec 11, 2025

This makes the app not use CACHE URLs for assets when working in local
environments in DEBUG mode.

@shtrom shtrom requested a review from zzzeid December 11, 2025 06:37
@github-actions
Copy link

View this pull request in Lando to land it once approved.

@shtrom shtrom marked this pull request as ready for review December 11, 2025 06:50
@shtrom shtrom requested a review from a team as a code owner December 11, 2025 06:50
zzzeid
zzzeid previously requested changes Dec 11, 2025
Copy link
Contributor

@zzzeid zzzeid left a comment

Choose a reason for hiding this comment

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

lgtm, minus one question.

}

COMPRESS_ENABLED = True
COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

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

Why check is_remote here? I think checking DEBUG is sufficient. If someone sets DEBUG to False locally, presumably it is to test some functionality that would mimic production, including how compress would work.

Suggested change
COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG
COMPRESS_ENABLED = not DEBUG

Copy link
Member Author

Choose a reason for hiding this comment

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

My concern was more about not using the cache in remote envs. But I got the logic wrong: it should be

Suggested change
COMPRESS_ENABLED = ENVIRONMENT.is_remote or not DEBUG
COMPRESS_ENABLED = ENVIRONMENT.is_remote and not DEBUG

Which way do you think we should go?

@shtrom shtrom requested a review from zzzeid December 12, 2025 05:21
@shtrom shtrom dismissed zzzeid’s stale review December 12, 2025 05:21

question on approach with another suggestion to choose from

@shtrom shtrom merged commit 250b1ea into main Dec 15, 2025
2 checks passed
@shtrom shtrom deleted the no-bug/compress-debug branch December 15, 2025 06:06
@shtrom
Copy link
Member Author

shtrom commented Dec 15, 2025

Woops, I clicked the merge button by mistake (as I was inspecting the DOM of the page...) @zzzeid the questions in #768 (comment) are still relevant. I'll create a follow-up PR when we have decided how we want to go.

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.

3 participants