Skip to content

Commit

Permalink
Remove THASH.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Apr 27, 2023
1 parent 54ea549 commit aacd7d6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion cli/internal/run/global_hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func calculateGlobalHash(
envVars := []string{}
envVars = append(envVars, envVarDependencies...)
envVars = append(envVars, _defaultEnvVars...)
globalHashableEnvVars, err := env.GetHashableEnvVars(envVars, []string{".*THASH.*"}, "")
globalHashableEnvVars, err := env.GetHashableEnvVars(envVars, nil, "")
if err != nil {
return GlobalHashable{}, err
}
Expand Down
1 change: 0 additions & 1 deletion docs/pages/blog/turbo-1-1-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ You can now control `turbo`'s [cache fingerprinting (a.k.a. hashing)](/repo/docs
- Including environment variables in a `dependsOn` in your `pipeline` definition prefixed by a `$` will impact the cache fingerprint on a per-task or per-package-task basis.
- Including environment variables in `globalDependencies` list prefixed by a `$` will impact the cache fingerprint of _all_ tasks.
- Including files or globs of files in `globalDependencies` will impact the cache fingerprint of _all_ tasks.
- The value of any environment variable that includes `THASH` in its name will impact the cache fingerprint of _all_ tasks.

```jsonc
{
Expand Down
2 changes: 0 additions & 2 deletions docs/pages/repo/docs/core-concepts/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ You can control `turbo`'s caching behavior based on
the values of environment variables:

- Including environment variables in the `env` key in your `pipeline` definition will impact the cache fingerprint on a per-task or per-workspace-task basis.
- The value of any environment variable that includes `THASH` in its name will impact the cache fingerprint of _all_ tasks.

```jsonc
{
Expand Down Expand Up @@ -432,7 +431,6 @@ By now, you're probably wondering how `turbo` decides what constitutes a cache h
First, `turbo` constructs a hash of the current global state of the codebase:

- The contents of any files that satisfy the glob patterns and any the values of environment variables listed in [`globalDependencies`](/repo/docs/reference/configuration#globalDependencies)
- The sorted list environment variable key-value pairs that include `THASH` _anywhere_ in their names (e.g. `STRIPE_PUBLIC_THASH_SECRET_KEY`, but not `STRIPE_PUBLIC_KEY`)

Then it adds more factors relevant to a given workspace's task:

Expand Down
11 changes: 0 additions & 11 deletions turborepo-tests/integration/tests/global_env.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ Setup
Cached: 0 cached, 1 total
Time:\s*[\.0-9]+m?s (re)

# set env var with "THASH" and ensure cache miss
$ SOMETHING_THASH_YES=hi ${TURBO} run build --filter=util --output-logs=hash-only
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing c3c2acfea2980d29

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Time:\s*[\.0-9]+m?s (re)

# set vercel analytics env var and ensure cache miss
$ VERCEL_ANALYTICS_ID=hi ${TURBO} run build --filter=util --output-logs=hash-only
\xe2\x80\xa2 Packages in scope: util (esc)
Expand Down

0 comments on commit aacd7d6

Please sign in to comment.