From 2de7f0006277c8690119a2039b47af4c64ca9a3c Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Fri, 27 Sep 2024 18:36:49 +0200 Subject: [PATCH] Revert "Allow nativelink flake module to upload results (#1369)" This partially reverts commit 9600839bd2ba0a6915908c55fca24f373c3a2106. The original idea was to implement a `readonly` setting to dynamically configure `--remote_upload_local_results`. While this is fairly straightforward to implement it turned out that the UX implications around the environment variables/scripts/files to configure this are nontrivial and we need to evaluate the different approaches in more depth first. For now, revert to readonly by default and also add a small modifier to the relevant workflow so that the write-access workflow retains the ability to write artifacts on pushes to main. Fixes #1371 --- .github/workflows/main.yml | 2 +- modules/nativelink.nix | 1 + web/platform/src/content/docs/docs/nativelink-cloud/nix.mdx | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dea81672d..baf26063b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,7 +101,7 @@ jobs: --bes_backend=grpcs://bes-tracemachina-shared.build-faster.nativelink.net \ --bes_header=x-nativelink-api-key=$NL_COM_API_KEY \ --bes_results_url=https://app.nativelink.com/a/e3b1e0e0-4b73-45d6-85bc-5cb7b02edea5/build \ - ${{ github.ref == 'refs/heads/main' && ' ' || '--nogenerate_json_trace_profile --remote_upload_local_results=false' }} \ + ${{ github.ref == 'refs/heads/main' && '--remote_upload_local_results=true' || '--nogenerate_json_trace_profile --remote_upload_local_results=false' }} \ //..." docker-compose-compiles-nativelink: diff --git a/modules/nativelink.nix b/modules/nativelink.nix index 2173d7360..eb7a498b2 100644 --- a/modules/nativelink.nix +++ b/modules/nativelink.nix @@ -20,6 +20,7 @@ "--remote_instance_name=main" "--remote_header=x-nativelink-project=nativelink-ci" "--nogenerate_json_trace_profile" + "--remote_upload_local_results=false" "--experimental_remote_cache_async" ]; diff --git a/web/platform/src/content/docs/docs/nativelink-cloud/nix.mdx b/web/platform/src/content/docs/docs/nativelink-cloud/nix.mdx index e20f634d6..8b788d655 100644 --- a/web/platform/src/content/docs/docs/nativelink-cloud/nix.mdx +++ b/web/platform/src/content/docs/docs/nativelink-cloud/nix.mdx @@ -95,6 +95,7 @@ build --remote_header=x-nativelink-api-key=065f02f53f26a12331d5cfd00a778fb243bfb build --remote_instance_name=main build --remote_header=x-nativelink-project=nativelink-ci build --nogenerate_json_trace_profile +build --remote_upload_local_results=false build --experimental_remote_cache_async ``` @@ -116,5 +117,6 @@ build:nativelink --remote_cache=grpcs://my-custom-endpoints.com build:nativelink --remote_header=x-nativelink-api-key=my-custom-readonly-api-key build:nativelink --remote_header=x-nativelink-project=nativelink-ci build:nativelink --nogenerate_json_trace_profile +build:nativelink --remote_upload_local_results=false build:nativelink --experimental_remote_cache_async ```