Fix merge conflict (#41853)

Conrad Irwin created

Closes #ISSUE

Release Notes:

- N/A

Change summary

.github/workflows/release.yml                        |  6 +++
.github/workflows/run_agent_evals.yml                |  6 ++--
.github/workflows/run_tests.yml                      |  2 
.github/workflows/run_unit_evals.yml                 |  8 ++--
tooling/xtask/src/tasks/workflows/release.rs         |  8 ++--
tooling/xtask/src/tasks/workflows/run_agent_evals.rs | 20 ++++---------
tooling/xtask/src/tasks/workflows/steps.rs           |  2 
tooling/xtask/src/tasks/workflows/vars.rs            |  2 +
8 files changed, 27 insertions(+), 27 deletions(-)

Detailed changes

.github/workflows/release.yml 🔗

@@ -63,6 +63,10 @@ jobs:
     - name: steps::install_mold
       run: ./script/install-mold
       shell: bash -euxo pipefail {0}
+    - name: steps::cache_rust_dependencies_namespace
+      uses: namespacelabs/nscloud-cache-action@v1
+      with:
+        cache: rust
     - name: steps::setup_node
       uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
       with:
@@ -74,7 +78,7 @@ jobs:
       run: cargo install cargo-nextest --locked
       shell: bash -euxo pipefail {0}
     - name: steps::clear_target_dir_if_large
-      run: ./script/clear-target-dir-if-larger-than 100
+      run: ./script/clear-target-dir-if-larger-than 250
       shell: bash -euxo pipefail {0}
     - name: steps::cargo_nextest
       run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final

.github/workflows/run_agent_evals.yml 🔗

@@ -30,10 +30,10 @@ jobs:
       uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
       with:
         clean: false
-    - name: steps::cache_rust_dependencies
-      uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
+    - name: steps::cache_rust_dependencies_namespace
+      uses: namespacelabs/nscloud-cache-action@v1
       with:
-        save-if: ${{ github.ref == 'refs/heads/main' }}
+        cache: rust
     - name: steps::setup_linux
       run: ./script/linux
       shell: bash -euxo pipefail {0}

.github/workflows/run_tests.yml 🔗

@@ -164,7 +164,7 @@ jobs:
       run: cargo install cargo-nextest --locked
       shell: bash -euxo pipefail {0}
     - name: steps::clear_target_dir_if_large
-      run: ./script/clear-target-dir-if-larger-than 100
+      run: ./script/clear-target-dir-if-larger-than 250
       shell: bash -euxo pipefail {0}
     - name: steps::cargo_nextest
       run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final

.github/workflows/run_unit_evals.yml 🔗

@@ -23,10 +23,10 @@ jobs:
         mkdir -p ./../.cargo
         cp ./.cargo/ci-config.toml ./../.cargo/config.toml
       shell: bash -euxo pipefail {0}
-    - name: steps::cache_rust_dependencies
-      uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
+    - name: steps::cache_rust_dependencies_namespace
+      uses: namespacelabs/nscloud-cache-action@v1
       with:
-        save-if: ${{ github.ref == 'refs/heads/main' }}
+        cache: rust
     - name: steps::setup_linux
       run: ./script/linux
       shell: bash -euxo pipefail {0}
@@ -37,7 +37,7 @@ jobs:
       run: cargo install cargo-nextest --locked
       shell: bash -euxo pipefail {0}
     - name: steps::clear_target_dir_if_large
-      run: ./script/clear-target-dir-if-larger-than 100
+      run: ./script/clear-target-dir-if-larger-than 250
       shell: bash -euxo pipefail {0}
     - name: ./script/run-unit-evals
       run: ./script/run-unit-evals

tooling/xtask/src/tasks/workflows/release.rs 🔗

@@ -90,7 +90,7 @@ pub(crate) fn create_sentry_release() -> Step<Use> {
     )
     .add_env(("SENTRY_ORG", "zed-dev"))
     .add_env(("SENTRY_PROJECT", "zed"))
-    .add_env(("SENTRY_AUTH_TOKEN", "${{ secrets.SENTRY_AUTH_TOKEN }}"))
+    .add_env(("SENTRY_AUTH_TOKEN", vars::SENTRY_AUTH_TOKEN))
     .add_with(("environment", "production"))
 }
 
@@ -109,7 +109,7 @@ fn auto_release_preview(deps: &[&NamedJob; 1]) -> NamedJob {
                 steps::script(
                     r#"gh release edit "$GITHUB_REF_NAME" --repo=zed-industries/zed --draft=false"#,
                 )
-                .add_env(("GITHUB_TOKEN", "${{ secrets.GITHUB_TOKEN }}")),
+                .add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN)),
             )
             .add_step(create_sentry_release()),
     )
@@ -146,7 +146,7 @@ fn upload_release_assets(deps: &[&NamedJob], bundle: &ReleaseBundleJobs) -> Name
             .add_step(prep_release_artifacts())
             .add_step(
                 steps::script("gh release upload \"$GITHUB_REF_NAME\" --repo=zed-industries/zed release-artifacts/*")
-                    .add_env(("GITHUB_TOKEN", "${{ secrets.GITHUB_TOKEN }}")),
+                    .add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN)),
             ),
     )
 }
@@ -160,7 +160,7 @@ fn create_draft_release() -> NamedJob {
 
     fn create_release() -> Step<Run> {
         named::bash("script/create-draft-release target/release-notes.md")
-            .add_env(("GITHUB_TOKEN", "${{ secrets.GITHUB_TOKEN }}"))
+            .add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN))
     }
 
     named::job(

tooling/xtask/src/tasks/workflows/run_agent_evals.rs 🔗

@@ -25,11 +25,8 @@ pub(crate) fn run_agent_evals() -> Workflow {
         .add_env(("CARGO_TERM_COLOR", "always"))
         .add_env(("CARGO_INCREMENTAL", 0))
         .add_env(("RUST_BACKTRACE", 1))
-        .add_env(("ANTHROPIC_API_KEY", "${{ secrets.ANTHROPIC_API_KEY }}"))
-        .add_env((
-            "ZED_CLIENT_CHECKSUM_SEED",
-            "${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}",
-        ))
+        .add_env(("ANTHROPIC_API_KEY", vars::ANTHROPIC_API_KEY))
+        .add_env(("ZED_CLIENT_CHECKSUM_SEED", vars::ZED_CLIENT_CHECKSUM_SEED))
         .add_env(("ZED_EVAL_TELEMETRY", 1))
         .add_job(agent_evals.name, agent_evals.job)
 }
@@ -48,7 +45,7 @@ fn agent_evals() -> NamedJob {
             .runs_on(runners::LINUX_DEFAULT)
             .timeout_minutes(60_u32)
             .add_step(steps::checkout_repo())
-            .add_step(steps::cache_rust_dependencies())
+            .add_step(steps::cache_rust_dependencies_namespace())
             .map(steps::install_linux_dependencies)
             .add_step(setup_cargo_config(Platform::Linux))
             .add_step(steps::script("cargo build --package=eval"))
@@ -71,10 +68,7 @@ pub(crate) fn run_unit_evals() -> Workflow {
         .add_env(("CARGO_TERM_COLOR", "always"))
         .add_env(("CARGO_INCREMENTAL", 0))
         .add_env(("RUST_BACKTRACE", 1))
-        .add_env((
-            "ZED_CLIENT_CHECKSUM_SEED",
-            "${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}",
-        ))
+        .add_env(("ZED_CLIENT_CHECKSUM_SEED", vars::ZED_CLIENT_CHECKSUM_SEED))
         .add_job(unit_evals.name, unit_evals.job)
 }
 
@@ -87,7 +81,7 @@ fn unit_evals() -> NamedJob {
         )
         .if_condition(Expression::new("${{ failure() }}"))
         .add_with(("method", "chat.postMessage"))
-        .add_with(("token", "${{ secrets.SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN }}"))
+        .add_with(("token", vars::SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN))
         .add_with(("payload", indoc::indoc!{r#"
             channel: C04UDRNNJFQ
             text: "Unit Evals Failed: https://github.com/zed-industries/zed/actions/runs/${{ github.run_id }}"
@@ -99,13 +93,13 @@ fn unit_evals() -> NamedJob {
             .runs_on(runners::LINUX_DEFAULT)
             .add_step(steps::checkout_repo())
             .add_step(steps::setup_cargo_config(Platform::Linux))
-            .add_step(steps::cache_rust_dependencies())
+            .add_step(steps::cache_rust_dependencies_namespace())
             .map(steps::install_linux_dependencies)
             .add_step(steps::cargo_install_nextest(Platform::Linux))
             .add_step(steps::clear_target_dir_if_large(Platform::Linux))
             .add_step(
                 steps::script("./script/run-unit-evals")
-                    .add_env(("ANTHROPIC_API_KEY", "${{ secrets.ANTHROPIC_API_KEY }}")),
+                    .add_env(("ANTHROPIC_API_KEY", vars::ANTHROPIC_API_KEY)),
             )
             .add_step(send_failure_to_slack())
             .add_step(steps::cleanup_cargo_config(Platform::Linux)),

tooling/xtask/src/tasks/workflows/steps.rs 🔗

@@ -89,7 +89,7 @@ pub fn cleanup_cargo_config(platform: Platform) -> Step<Run> {
 pub fn clear_target_dir_if_large(platform: Platform) -> Step<Run> {
     match platform {
         Platform::Windows => named::pwsh("./script/clear-target-dir-if-larger-than.ps1 250"),
-        Platform::Linux => named::bash("./script/clear-target-dir-if-larger-than 100"),
+        Platform::Linux => named::bash("./script/clear-target-dir-if-larger-than 250"),
         Platform::Mac => named::bash("./script/clear-target-dir-if-larger-than 300"),
     }
 }

tooling/xtask/src/tasks/workflows/vars.rs 🔗

@@ -16,6 +16,7 @@ macro_rules! var {
     };
 }
 
+secret!(ANTHROPIC_API_KEY);
 secret!(APPLE_NOTARIZATION_ISSUER_ID);
 secret!(APPLE_NOTARIZATION_KEY);
 secret!(APPLE_NOTARIZATION_KEY_ID);
@@ -32,6 +33,7 @@ secret!(SENTRY_AUTH_TOKEN);
 secret!(ZED_CLIENT_CHECKSUM_SEED);
 secret!(ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON);
 secret!(ZED_SENTRY_MINIDUMP_ENDPOINT);
+secret!(SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN);
 
 // todo(ci) make these secrets too...
 var!(AZURE_SIGNING_ACCOUNT_NAME);