Page MenuHomeSoftware Heritage

templates/layout: Refine piwik script inclusion test
ClosedPublic

Authored by anlambert on Sep 8 2021, 3:27 PM.

Details

Summary

Piwik script should only be included in production website but testing
on the value of the DJANGO_SETTINGS_MODULE variable is not reliable
enough (swh-web in docker uses Django production settings for instance).

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6213 (id=22485)

Rebasing onto b5ed695540...

Current branch diff-target is up to date.
Changes applied before test
commit 4ee6088e933e0b8e06819c7483c5298698503010
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Sep 8 15:26:42 2021 +0200

    templates/layout: Refine piwik script inclusion test
    
    Piwik script should only be included in production website but testing
    on the value of the DJANGO_SETTINGS_MODULE variable is not reliable
    enough (swh-web in docker uses Django production settings for instance).

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1092/ for more details.

vlorentz added a subscriber: vlorentz.

Can you replace "test" with either "check" or "conditional" in your commit msg? it sounds like you changed pytest/cypress code.

This revision is now accepted and ready to land.Sep 9 2021, 2:42 PM

Rebase and reword commit message

This revision was landed with ongoing or failed builds.Sep 9 2021, 3:03 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D6213 (id=22528)

Rebasing onto 237cff07ff...

Current branch diff-target is up to date.
Changes applied before test
commit 45583024a8f7bf762558cf3ce13282dd55da6f86
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Sep 8 15:26:42 2021 +0200

    templates/layout: Refine piwik script inclusion check
    
    Piwik script should only be included in production website but checking
    the value of the DJANGO_SETTINGS_MODULE variable is not reliable enough
    (swh-web in docker uses Django production settings for instance).

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1102/ for more details.