You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that with the latest version lifecycle a environment variable (CNB_BUILDPACK_DIR#325) is set to a different path at times when multiple processes (of detect) are running.
This is caused by the go routine in the detect stage that changes the pathing/envs within the DetectConfig.
Reproduction
Steps
Have multiple source directories
Run the detect binary against them in parallel
Note the path in DetectConfig will be different
Current behavior
When running detect in parallel the buildpack detection files will mismatch as the go routine runs and overwrites packs that are taking longer than others. This causes paths within DetectConfig to be different than the contents of the detection.
For example, running detect against a large php app and nodejs app might end up with the path within the nodejs app as the one used for the php app.
Expected
The detector should be able to be run multiple times in parallel without effecting other detections.
We may want to mutex the entire DetectConfig file in the detector.go$detect(...) function though this might make the go routine useless.
Context
lifecycle version
v0.10.1
platform version(s)
v0.3
anything else?
I'm very new to this project but if will contribute a PR if we can track down a solid solution 🚀
The text was updated successfully, but these errors were encountered:
Summary
It appears that with the latest version lifecycle a environment variable (
CNB_BUILDPACK_DIR
#325) is set to a different path at times when multiple processes (of detect) are running.This is caused by the go routine in the detect stage that changes the pathing/envs within the DetectConfig.
Reproduction
Steps
Current behavior
When running detect in parallel the buildpack detection files will mismatch as the go routine runs and overwrites packs that are taking longer than others. This causes paths within DetectConfig to be different than the contents of the detection.
For example, running detect against a large php app and nodejs app might end up with the path within the nodejs app as the one used for the php app.
Expected
The detector should be able to be run multiple times in parallel without effecting other detections.
We may want to mutex the entire DetectConfig file in the
detector.go$detect(...)
function though this might make the go routine useless.Context
lifecycle version
v0.10.1
platform version(s)
v0.3
anything else?
I'm very new to this project but if will contribute a PR if we can track down a solid solution 🚀
The text was updated successfully, but these errors were encountered: