Closed Bug 1763244 Opened 3 years ago Closed 3 years ago

Write fleet of tests to support "sys.path" modification logic

Categories

(Firefox Build System :: Mach Core, task)

task

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Cover the various cases and combinations around

  • Using different "site packages sources" (VENV/SYSTEM/NONE)
  • Using different command virtualenvs (build/common/doc)
  • Imports in main processes versus imports in subprocesses
Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Type: enhancement → task

I'm going to test on top of bug 1761150, which simplifies system-sys-path management significantly

Depends on: 1761150

Verify that activating mach and command sites in various configurations
affects the sys.path accurately.
Also verify that the sys.path is correct between the "activated
process" and fresh processes spawned from created virtualenvs.

Finally, tweak existing path-management behaviour to be more consistent:

  • Don't unnecessarily sort pths from requirement definitions - it's
    more consistent (and more dependable) to keep the provided order.
  • Continue removing unwanted venv entries from the sys.path, but
    don't add them back (such as the $prefix entry)
  • Always remove venv entries from the sys.path when the venv isn't
    being populated. Though this doesn't affect behaviour, it makes
    assertions easier and simplifies the runtime state a bit.

Depends on D143200

Attached file Bug 1763244: Write tests for site activation logic (obsolete) (deleted) —

Verify that activating mach and command sites in various configurations
affects the sys.path accurately.
Also verify that the sys.path is correct between the "activated
process" and fresh processes spawned from created virtualenvs.

Finally, tweak existing path-management behaviour to be more consistent:

  • Don't unnecessarily sort pths from requirement definitions - it's
    more consistent (and more dependable) to keep the provided order.
  • Continue removing unwanted venv entries from the sys.path, but
    don't add them back (such as the $prefix entry)
  • Always remove venv entries from the sys.path when the venv isn't
    being populated. Though this doesn't affect behaviour, it makes
    assertions easier and simplifies the runtime state a bit.
Attachment #9271377 - Attachment is obsolete: true
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2ef055ccbc2 Write tests for site activation logic r=ahal
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Regressions: 1764534
Regressions: 1764711
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: