vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.21k stars 1.81k forks source link

TURBO_PREFLIGHT=true or 1 vs --preflight is not behaving the same #7753

Closed EloB closed 7 months ago

EloB commented 7 months ago

Verify canary release

Link to code that reproduces this issue

Can't create sorry :(

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

1.12.5

Describe the Bug

I'm using a super simple self hosted remote cache only 130 lines of code. It's using the preflight request to redirect the downloading and uploading cache files with AWS S3 presigned urls and it's only working if provide preflight as argument to the task run and not as environment variable. That makes me believe it's broken.

I've created this ticket that I initially thought only were a typo in documentation.

I made some new tests and saw different behaviour if I passed as env or as argument to the task. They missed the cache and wasn't uploading.

Expected Behavior

turbo build --preflight should equal TURBO_PREFLIGHT=true turbo build as documentation states.

To Reproduce

Run: turbo build --preflight

Then: TURBO_PREFLIGHT=true turbo build TURBO_PREFLIGHT=1 turbo build

See different behaviour if you are using remote cache server.

Additional context

No response

EloB commented 7 months ago

@chris-olszewski Do you know how handsome you are. Thanks! ❤️ 🥂