Fix a regression when building extensions against production installs.

Review Request #13963 — Created June 8, 2024 and submitted

Information

Djblets
release-5.x

Reviewers

Djblets 5 introduced a new architecture for building extension packages,
with an eye toward building new, non-setuptools-based package backends.
As part of this, most of the static media and environment setup flows
changed.

This introduced a regression when building against a production set of
packages, rather than a development environment. We were setting the
environment variable DJBLETS_SKIP_PIPELINE_VALIDATION=1 too late,
after trying to set up Django.

The problem is that we needed this variable in order to avoid validating
node_modules-based paths during Django environment setup. The
packaging process then failed early, never getting to the point where we
actually set up the Node environment for static media building for that
package.

This setting has been moved back to the Setuptools backend before
setting up the Django environment, back where it was before.

Unit tests passed.

Installed Review Board via production packages and then built an extension
against it from a clean source tree. Previously, this was failing. After
this change, node_modules populated, static media was compiled, and the
package built successfully.

Summary ID
Fix a regression when building extensions against production installs.
Djblets 5 introduced a new architecture for building extension packages, with an eye toward building new, non-setuptools-based package backends. As part of this, most of the static media and environment setup flows changed. This introduced a regression when building against a production set of packages, rather than a development environment. We were setting the environment variable `DJBLETS_SKIP_PIPELINE_VALIDATION=1` too late, after trying to set up Django. The problem is that we needed this variable in order to avoid validating `node_modules`-based paths during Django environment setup. The packaging process then failed early, never getting to the point where we actually set up the Node environment for static media building for that package. This setting has been moved back to the Setuptools backend before setting up the Django environment, back where it was before.
e4cdf3338f18830ab3b910e98d8df23a3ca7945a
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (d577cd9)