Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
6316b55
comment legacy Dockerfile test (#1983)
MarcusSorealheis Oct 15, 2025
5e487f3
Remove folders with bad permissions (#1980)
palfrey Oct 16, 2025
41cdd9c
Make all tests in running_actions_manager_test serial (#1984)
palfrey Oct 16, 2025
997feb4
Update Rust crate relative-path to v2 (#1985)
renovate[bot] Oct 16, 2025
d85e491
Fix removal state (#1981)
chrisstaite Oct 16, 2025
2d08aba
Build toolchain-examples (#1971)
palfrey Oct 16, 2025
aab10ee
fixed cost docs (#1986)
MarcusSorealheis Oct 16, 2025
ed918d8
Update dependency hermetic_cc_toolchain to v4 (#1988)
renovate[bot] Oct 17, 2025
9f39700
Replace derivative with derive_more (#1989)
palfrey Oct 17, 2025
8527f25
Notify execution complete (#1975)
chrisstaite-menlo Oct 17, 2025
930b352
Explicitly separate state locks and awaits (#1991)
palfrey Oct 17, 2025
e9250ee
Single worker stream (#1977)
chrisstaite-menlo Oct 17, 2025
0146c34
Require default-features=false (#1993)
palfrey Oct 18, 2025
854d51c
GCS store connect timeout (#1994)
chrisstaite-menlo Oct 18, 2025
9fcf5b1
Sweep forgotten client operation IDs (#1965)
MarcusSorealheis Oct 18, 2025
b050976
Fix clippy::cast_possible_truncation (#1423)
SchahinRohani Oct 20, 2025
ab0d4e6
GCS do not upload zero (#1995)
chrisstaite-menlo Oct 21, 2025
e01079b
Add Rust test to RBE work (#1992)
palfrey Oct 22, 2025
e46b5c7
Unify all the service setups with a macro (#1996)
palfrey Oct 22, 2025
29c3dc4
Pin various dependencies (mostly Docker images) (#1990)
palfrey Oct 22, 2025
15c747e
Update Swatinem/rust-cache digest to 9416228 (#2004)
renovate[bot] Oct 22, 2025
0cc8e5d
Release NativeLink v0.7.4 (#2005)
MarcusSorealheis Oct 23, 2025
1296a3a
Buck2 integration test (#1828)
palfrey Oct 23, 2025
083232d
Remove unnecessary Mutex (#2006)
chrisstaite Oct 24, 2025
6d867c9
Fast slow store directions (#1581)
chrisstaite Oct 28, 2025
1708859
fix: guard shutting down in scheduler while SIGTERM (#2012)
zpzjzj Oct 28, 2025
d55c59d
Filestore update deadlock (#2007)
chrisstaite Oct 28, 2025
552a1cd
fix: scheduler shutdown not guarded (#2015)
zpzjzj Oct 29, 2025
016cd50
Release NativeLink v0.7.5 (#2016)
MarcusSorealheis Oct 30, 2025
d5ea603
chore(deps): update swatinem/rust-cache digest to a84bfdc (#2018)
renovate[bot] Nov 4, 2025
3697512
Log failures to update actions (#2022)
palfrey Nov 4, 2025
e7f29fe
Fix fast store direction (#2019)
chrisstaite Nov 4, 2025
a01bd65
Directory Cache (#2021)
MarcusSorealheis Nov 4, 2025
c3431ac
Drops the cloud references (#2025)
palfrey Nov 5, 2025
bef18b3
Removes starter pricing (#2027)
palfrey Nov 5, 2025
b7238b3
Use display, not debug formatting for operation ids (#2028)
palfrey Nov 6, 2025
922d7f6
Add testing for running action manager failure logging (#2031)
palfrey Nov 6, 2025
daea037
Log on command complete (#2032)
palfrey Nov 7, 2025
e0e4d41
Fix flake timestamp (#2036)
palfrey Nov 10, 2025
1d3cc10
Log more info about redis key updates (#2035)
palfrey Nov 10, 2025
958f687
Redo worker_find_logging as config (#2039)
palfrey Nov 11, 2025
f679946
Lockdown and upgrade the nix action versions (#2038)
palfrey Nov 11, 2025
b2eaf79
Use common_s3_utils in s3_store (#2040)
palfrey Nov 12, 2025
222731d
Upgrade python3 to new security patch version (#2044)
palfrey Nov 13, 2025
9254e45
Release NativeLink v0.7.6 (#2043)
MarcusSorealheis Nov 13, 2025
7d6f663
Add periodic logging regarding scheduler job states (#2042)
palfrey Nov 14, 2025
0cd70ee
chore(deps): update dependency astro to v5.15.6 [security] (#2045)
renovate[bot] Nov 14, 2025
b5dd8fb
fix(worker): Resolve deadlock due to file permit exhaustion (#2051) (…
rogerwang Nov 17, 2025
b16cb8a
Release NativeLink v0.7.7 (#2053)
MarcusSorealheis Nov 17, 2025
6282afc
Don't complain about worker stream error if we're shutting down (#2055)
palfrey Nov 18, 2025
5adf904
Do not need to store zero-length filesystem files (#2033)
palfrey Nov 18, 2025
7ec4f11
Fix assertion message for fastcdc (#2056)
YichiZhang0613 Nov 18, 2025
437a785
Fix the changelog post 0.7.7 (#2057)
palfrey Nov 18, 2025
3df6293
Redis store tester and permits (#1878)
palfrey Nov 18, 2025
f56c2bb
Disable digest updates for renovate and Nix magic cache (#2059)
palfrey Nov 19, 2025
3d41449
chore(deps): update dependency astro to v5.15.9 [security] (#2061)
renovate[bot] Nov 20, 2025
7b9df29
Update the default max permits for redis (#2063)
amankrx Nov 20, 2025
6a95ae8
bugfix: prefix Redis index name and sort key (#2066)
MarcusSorealheis Nov 21, 2025
2e84883
Revert "bugfix: prefix Redis index name and sort key (#2066)" (#2068)
MarcusSorealheis Nov 22, 2025
14b2cc6
Recoverable connection pool (#2067)
MarcusSorealheis Nov 24, 2025
43f7f8d
fix: use wildcard query when Redis index value is empty (#2069)
MarcusSorealheis Nov 25, 2025
92869d9
fix: use wildcard query when Redis index value is empty (#2069) (#2075)
MarcusSorealheis Nov 28, 2025
8c62bb3
Add LazyNotFound Store Optimization, Support for fast_slow_store (S3,…
mkeen Dec 4, 2025
0926bff
Build Custom Docker Image for each PR (#2084)
amankrx Dec 8, 2025
e38af3d
Implement remote execution metrics rebased (#2080)
MarcusSorealheis Dec 8, 2025
93f4ead
Fix the scheduler timeouts and errors (#2083)
amankrx Dec 10, 2025
422bfa1
Perf spike (#2081)
MarcusSorealheis Dec 10, 2025
1f80306
Release NativeLink v0.7.9 (#2088)
MarcusSorealheis Dec 10, 2025
1b85f71
Replace rustls-pemfile to fix RUSTSEC-2025-0134 (#2094)
palfrey Dec 15, 2025
7a4cdb6
chore(deps): update module golang.org/x/crypto to v0.45.0 [security] …
renovate[bot] Dec 16, 2025
44ada84
Bugfix: reduce worker disconnect cascades (#2093)
MarcusSorealheis Dec 16, 2025
f9f3b60
chore(deps): update actions/github-script action to v8 (#2098)
renovate[bot] Dec 16, 2025
fbda7bb
chore(deps): update actions/checkout action to v6 (#2085)
renovate[bot] Dec 16, 2025
47ebd44
New filesystem test for eviction breaking (#2024)
palfrey Dec 17, 2025
2bdb869
chore(deps): update dependency abseil-cpp to v20250512 (#2099)
renovate[bot] Dec 29, 2025
be11135
Release NativeLink v0.7.10 (#2102)
MarcusSorealheis Dec 30, 2025
ae963be
Add docs for configuring Worker Match Logging Interval (#2103)
amankrx Jan 6, 2026
bed6f9a
Test redis improvements with client drop and higher max count per cur…
amankrx Jan 14, 2026
c3a497d
Fix Redis index creation race (#2111)
MarcusSorealheis Jan 15, 2026
5b043eb
Pull MAX_COUNT_PER_CURSOR into redis config, not hardcoding (#2112)
palfrey Jan 16, 2026
c127bba
fix(deps): update rust crate lru to 0.16.0 [security] (#2106)
renovate[bot] Jan 16, 2026
95a8a34
Reduce logging level for "Dropping file to update_file" (#2116)
palfrey Jan 23, 2026
18360ad
Every bytestream_read had a debug log, which we don't need (#2117)
palfrey Jan 23, 2026
24c637a
Add additional logging around worker property matching (#2118)
palfrey Jan 23, 2026
1b45027
Support ignorable platform properties (#2120)
palfrey Jan 26, 2026
3ed406f
output_files can be very noisy, drop from debug (#2123)
palfrey Jan 26, 2026
1821bec
Add worker config option to limit maximum inflight tasks (#2125)
palfrey Jan 29, 2026
8c3bacb
Correct ignore handling for PlatformProperties (#2126)
palfrey Jan 29, 2026
67a5f9e
Release NativeLink v0.8.0 (#2128)
MarcusSorealheis Jan 29, 2026
85385e6
Be clearer about what property values workers are missing (#2121)
palfrey Feb 2, 2026
5d32d18
chore(deps): update rust crate bytes to v1.11.1 [security] (#2134)
renovate[bot] Feb 4, 2026
56a8955
Update jsonwebtoken (#2135)
palfrey Feb 4, 2026
ecd2903
Make update_with_whole_file logging default to trace (#2131)
palfrey Feb 5, 2026
12c63f5
No workers logging (#2137)
palfrey Feb 10, 2026
4956889
Replace Fred with redis-rs (#2076)
palfrey Feb 12, 2026
6ffab5f
Fix Max Inflight Workers job acceptance (#2142)
amankrx Feb 12, 2026
dc25843
fix(deps): update module github.com/go-git/go-git/v5 to v5.16.5 [secu…
renovate[bot] Feb 12, 2026
85e9ecf
fix(deps): update rust crate toml to v1 (#2147)
renovate[bot] Feb 13, 2026
bc773dc
Add tracing to hyper-util (#2132)
palfrey Feb 13, 2026
727760d
Advise the kernel to drop page cache (#2149)
amankrx Feb 13, 2026
24cc324
Add Max Upload timeout to CAS (#2150)
amankrx Feb 13, 2026
a57c771
Allows setting environment variables from the environment (#2143)
palfrey Feb 13, 2026
b4b44ba
Add GRPC timeouts and other improvements to detect dead connections (…
amankrx Feb 13, 2026
e6c7097
fix metrics (#2097)
MarcusSorealheis Feb 13, 2026
5549a96
Add Max action executing timeouts to scheduler (#2153)
amankrx Feb 14, 2026
e72b5a0
Dummy streams should be pending, not empty (#2154)
palfrey Feb 14, 2026
94e7e3f
Add logs for stall detection (#2155)
amankrx Feb 14, 2026
f996507
Fix integer overflow in compression_store.rs data retrieval logic (#2…
palfrey Feb 14, 2026
3a90838
Add Max Concurrent Writes (#2156)
amankrx Feb 15, 2026
4ca9d7b
Log NotFound as info, not error (#2171)
palfrey Feb 16, 2026
e54a0c3
Add boolean and optional data size shellexpands (#2172)
palfrey Feb 16, 2026
342e478
Release NativeLink v1.0.0-rc2 (#2170)
MarcusSorealheis Feb 16, 2026
faad8bb
If all workers are fully allocated, shortcut find workers (#2130)
palfrey Feb 19, 2026
2650680
Document max inflight tasks (#2167)
MarcusSorealheis Feb 20, 2026
f0d12ff
Document RPC timeouts in Redis config (#2168)
MarcusSorealheis Feb 20, 2026
23611ca
Fix all the current clippy lints (#2174)
palfrey Feb 23, 2026
cedba0e
Document max concurrent writes (#2169)
MarcusSorealheis Feb 23, 2026
8ae17ba
Fix worker inflight tasks heading (#2177)
palfrey Feb 24, 2026
658dd53
Update grafana/grafana Docker tag to v12 (#2182)
renovate[bot] Feb 25, 2026
27fa965
pre-commit rustfmt all files (#2176)
palfrey Feb 25, 2026
c161433
Update curl version in Dockerfiles (#2189)
palfrey Feb 26, 2026
77b13f0
Update module github.com/cloudflare/circl to v1.6.3 [SECURITY] (#2191)
renovate[bot] Feb 26, 2026
a7d873a
Flake update fixes (#2192)
palfrey Feb 26, 2026
3354945
Fix Fast slow store Not Found error by returning failed precondition …
amankrx Feb 28, 2026
d926c47
Add json schema (#2193)
palfrey Mar 2, 2026
2a2ca64
Prevent retry loop large uploads (#2195)
MarcusSorealheis Mar 2, 2026
86b86e1
Only display Baggage enduser.id when identity is present (#2197)
palfrey Mar 5, 2026
8783134
Fix Redis to reconnect in Sentinel (Chris Staite) (#2190)
MarcusSorealheis Mar 6, 2026
bdf3f9d
Release NativeLink v1.0.0-rc3 (#2198)
MarcusSorealheis Mar 6, 2026
c7109f6
remove free cloud user (#2199)
MarcusSorealheis Mar 7, 2026
2ea428b
Handle correctly subscription messages (#2201)
palfrey Mar 11, 2026
36a8238
Upgrade curl to 8.5.0-2ubuntu10.8 (#2204)
palfrey Mar 12, 2026
6b6efcf
Add debug info to connection manager queues (#2188)
palfrey Mar 12, 2026
dad870a
empty find_missing_blobs can return immediately (#2217)
palfrey Mar 12, 2026
69db8a6
Release NativeLink v1.0.0-rc4
MarcusSorealheis Mar 13, 2026
f91e606
Introduce custom metrics.
dkostyrev Dec 1, 2025
167af83
Introduce balanced channel in ginepro.
dkostyrev Dec 15, 2025
a64e2a0
Fix instance name parsing.
dkostyrev Dec 14, 2025
dbef3ff
Introduce execution_completion_behaviour: one_shot_always for workers.
dkostyrev Dec 17, 2025
5052e01
Allow parsing execution_completion_behaviour from environment variable.
dkostyrev Dec 22, 2025
69547f4
Rewrite worker metrics using OTEL.
dkostyrev Dec 23, 2025
1348c3c
FastSlowStoreMetrics as OTEL.
dkostyrev Dec 24, 2025
45b6e86
Introduce MetricsStore.
dkostyrev Dec 24, 2025
28912a1
Introduce eviction count.
dkostyrev Jan 6, 2026
5447630
Remove action digest and worker id from analytics.
dkostyrev Jan 6, 2026
194b5d0
Make store_operation_duration histogram more narrow.
dkostyrev Jan 6, 2026
b0a7c23
Introduce store_size metric.
dkostyrev Jan 9, 2026
160c240
Squashed commit of the following:
dkostyrev Jan 28, 2026
39b5d05
Inner_store in metrics store should return underlying store.
dkostyrev Jan 29, 2026
4b9d0cd
Existence cache should invalidate if get_part from underlying store f…
dkostyrev Feb 4, 2026
fb72423
Introduce scheduler router
rchshld Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ build --@rules_rust//:extra_rustc_flag=-Wtrivial_casts
build --@rules_rust//:extra_rustc_flag=-Wtrivial_numeric_casts
build --@rules_rust//:extra_rustc_flag=-Dunconditional_recursion
build --@rules_rust//:extra_rustc_flag=-Dunexpected_cfgs
build --@rules_rust//:extra_rustc_flag=-Dunknown_lints
build --@rules_rust//:extra_rustc_flag=-Dunnameable_test_items
build --@rules_rust//:extra_rustc_flag=-Wunreachable_pub
build --@rules_rust//:extra_rustc_flag=-Dunsafe_op_in_unsafe_fn
build --@rules_rust//:extra_rustc_flag=-Dunstable_syntax_pre_expansion
build --@rules_rust//:extra_rustc_flag=-Wunused_import_braces
build --@rules_rust//:extra_rustc_flag=-Dunused_imports
build --@rules_rust//:extra_rustc_flag=-Wunused_lifetimes
build --@rules_rust//:extra_rustc_flag=-Wunused_qualifications
build --@rules_rust//:extra_rustc_flag=-Wvariant_size_differences
Expand All @@ -102,22 +104,42 @@ build --@rules_rust//:clippy_flag=-Wclippy::nursery
build --@rules_rust//:clippy_flag=-Wclippy::pedantic
build --@rules_rust//:clippy_flag=-Dclippy::alloc_instead_of_core
build --@rules_rust//:clippy_flag=-Dclippy::as_underscore
build --@rules_rust//:clippy_flag=-Dclippy::await_holding_lock
build --@rules_rust//:clippy_flag=-Dclippy::bind_instead_of_map
build --@rules_rust//:clippy_flag=-Dclippy::collapsible_if
build --@rules_rust//:clippy_flag=-Wclippy::dbg_macro
build --@rules_rust//:clippy_flag=-Wclippy::decimal_literal_representation
build --@rules_rust//:clippy_flag=-Dclippy::disallowed_methods
build --@rules_rust//:clippy_flag=-Dclippy::doc_markdown
build --@rules_rust//:clippy_flag=-Dclippy::elidable_lifetime_names
build --@rules_rust//:clippy_flag=-Dclippy::explicit_into_iter_loop
build --@rules_rust//:clippy_flag=-Dclippy::future_not_send
build --@rules_rust//:clippy_flag=-Aclippy::get_unwrap
build --@rules_rust//:clippy_flag=-Dclippy::implicit_clone
build --@rules_rust//:clippy_flag=-Dclippy::implicit_hasher
build --@rules_rust//:clippy_flag=-Dclippy::manual_is_variant_and
build --@rules_rust//:clippy_flag=-Dclippy::map_unwrap_or
build --@rules_rust//:clippy_flag=-Dclippy::missing_const_for_fn
build --@rules_rust//:clippy_flag=-Aclippy::missing_docs_in_private_items
build --@rules_rust//:clippy_flag=-Dclippy::or_fun_call
build --@rules_rust//:clippy_flag=-Wclippy::print_stdout
build --@rules_rust//:clippy_flag=-Dclippy::ptr_arg
build --@rules_rust//:clippy_flag=-Dclippy::redundant_closure_for_method_calls
build --@rules_rust//:clippy_flag=-Dclippy::semicolon_if_nothing_returned
build --@rules_rust//:clippy_flag=-Dclippy::single_char_pattern
build --@rules_rust//:clippy_flag=-Dclippy::std_instead_of_core
build --@rules_rust//:clippy_flag=-Dclippy::string_lit_as_bytes
build --@rules_rust//:clippy_flag=-Dclippy::todo
build --@rules_rust//:clippy_flag=-Aclippy::too_long_first_doc_paragraph
build --@rules_rust//:clippy_flag=-Dclippy::unchecked_duration_subtraction
build --@rules_rust//:clippy_flag=-Wclippy::unimplemented
build --@rules_rust//:clippy_flag=-Dclippy::unnecessary_semicolon
build --@rules_rust//:clippy_flag=-Aclippy::unwrap_in_result
build --@rules_rust//:clippy_flag=-Aclippy::unwrap_used
build --@rules_rust//:clippy_flag=-Wclippy::use_debug
build --@rules_rust//:clippy_flag=-Aclippy::cast_possible_truncation
build --@rules_rust//:clippy_flag=-Dclippy::used_underscore_binding
build --@rules_rust//:clippy_flag=-Dclippy::useless_format
build --@rules_rust//:clippy_flag=-Dclippy::cast_possible_truncation
build --@rules_rust//:clippy_flag=-Aclippy::cast_possible_wrap
build --@rules_rust//:clippy_flag=-Aclippy::cast_precision_loss
build --@rules_rust//:clippy_flag=-Aclippy::cast_sign_loss
Expand Down
48 changes: 48 additions & 0 deletions .github/actions/free-disk/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Free up disk space
description: "Free up disk space on workers"
runs:
using: "composite"
steps:
- name: Free disk space
uses: >- # v3.1.0
endersonmenezes/free-disk-space@e6ed9b02e683a3b55ed0252f1ee469ce3b39a885
with:
rm_cmd: "rmz" # For speed up
remove_android: false # Takes too long.
remove_dotnet: true
remove_haskell: true
remove_tool_cache: false # TODO(palfrey): Do we really need this?
# Note: Not deleting google-cloud-cli because it takes too long.
remove_packages: >
azure-cli
microsoft-edge-stable
google-chrome-stable
firefox
postgresql*
temurin-*
*llvm*
mysql*
dotnet-sdk-*
remove_packages_one_command: true
remove_folders: >
/usr/share/swift
/usr/share/miniconda
/usr/share/az*
/usr/share/glade*
/usr/local/share/chromium
/usr/local/share/powershell

- name: Delete platform specific items to free up disk space
shell: bash
run: |
if [ "$(uname)" = "Darwin" ]; then
echo "Deleting Applications"
sudo rm -rf ~/Applications/*
echo "Deleting all iOS simulators"
xcrun simctl delete all
echo "Deleting iOS Simulator caches"
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
else
echo "Nothing to do here."
fi
61 changes: 15 additions & 46 deletions .github/actions/prepare-nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,21 @@ runs:
using: "composite"
steps:
- name: Free disk space
uses: >- # v2.0.0
endersonmenezes/free-disk-space@3f9ec39ebae520864ac93467ee395f5237585c21
with:
remove_android: false # Takes too long.
remove_dotnet: true
remove_haskell: true
remove_tool_cache: false # TODO(palfrey): Do we really need this?
# Note: Not deleting google-cloud-cli because it takes too long.
remove_packages: >
azure-cli
microsoft-edge-stable
google-chrome-stable
firefox
postgresql*
temurin-*
*llvm*
mysql*
dotnet-sdk-*
remove_packages_one_command: true
remove_folders: >
/usr/share/swift
/usr/share/miniconda
/usr/share/az*
/usr/share/glade*
/usr/local/lib/node_modules
/usr/local/share/chromium
/usr/local/share/powershell

- name: Delete platform specific items to free up disk space
shell: bash
run: |
if [ "$(uname)" = "Darwin" ]; then
echo "Deleting Applications"
sudo rm -rf ~/Applications/*
echo "Deleting all iOS simulators"
xcrun simctl delete all
echo "Deleting iOS Simulator caches"
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
else
echo "Nothing to do here."
fi
uses: ./.github/actions/free-disk

- name: Install Nix
uses: >- # https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v17
DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3
uses: >- # https://github.com/DeterminateSystems/nix-installer-action/releases/tag/v20
DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196
with:
source-tag: v3.13.0

# FIXME(palfrey): Replace with better cache. Workers are currently taking minutes to upload data
# all the time, probably because we're at ~500GB of 10GB in the cache storage and it's breaking.
# We've tried Flakehub, but it doesn't work for us because it assumes "branches on an org repo"
# not our "fork and branch on your own repo" setup for it's auth so we can't currently use that.

- name: Add Nix magic cache
uses: >- # https://github.com/DeterminateSystems/magic-nix-cache-action/releases/tag/v11
DeterminateSystems/magic-nix-cache-action@def9f5a5c6a6b8751c0534e8813a5d0ad2635660
# - name: Add Nix magic cache
# uses: >- # https://github.com/DeterminateSystems/magic-nix-cache-action/releases/tag/v13
# DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39
# with:
# source-tag: v0.1.6
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
matchUpdateTypes: [
"patch",
"minor",
"digest",
],
enabled: false,
},
Expand Down
11 changes: 11 additions & 0 deletions .github/styles/config/vocabularies/TraceMachina/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ FFI
FFIs
GPUs
Goma
gzip
[Hh]eatmap
[Hh]ermeticity
Istio
JDK
Expand Down Expand Up @@ -111,7 +113,16 @@ Trendshift
Norwest
Databricks
Datadog
Downsampling
Brex
Citrix
Menlo
benchmarked
Thanos
Quickwit
[Mm]iddleware
queryable
gRPC
[Mm]itigations
[Pp]recompute
attrs
141 changes: 141 additions & 0 deletions .github/workflows/custom-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Build Custom Docker Image

on:
workflow_dispatch:
inputs:
image:
description: 'Image to build'
required: false
default: 'image'
type: choice
options:
- image
- nativelink-worker-init
- nativelink-worker-lre-cc
skip_signing:
description: 'Skip cosign signing'
required: false
default: true
type: boolean

issue_comment:
types: [created]

permissions:
contents: read
packages: write
pull-requests: write
id-token: write

jobs:
check-trigger:
runs-on: ubuntu-latest
outputs:
should_build: ${{ steps.check.outputs.should_build }}
pr_sha: ${{ steps.check.outputs.pr_sha }}
image: ${{ steps.check.outputs.image }}
steps:
- name: Check trigger
id: check
uses: actions/github-script@v8
with:
script: |
if (context.eventName === 'workflow_dispatch') {
core.setOutput('should_build', 'true');
core.setOutput('pr_sha', context.sha);
core.setOutput('image', '${{ inputs.image }}');
return;
}

if (context.eventName === 'issue_comment') {
const body = context.payload.comment.body.trim();
const isPR = !!context.payload.issue.pull_request;

// Match /build-image or /build-image <image-name>
const match = body.match(/^\/build-image(?:\s+(\S+))?/i);

if (isPR && match) {
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.issue.number
});

const image = match[1] || 'image';
const validImages = ['image', 'nativelink-worker-init', 'nativelink-worker-lre-cc'];

if (!validImages.includes(image)) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `Unknown image: \`${image}\`\n\nValid options: ${validImages.map(i => `\`${i}\``).join(', ')}`
});
core.setOutput('should_build', 'false');
return;
}

core.setOutput('should_build', 'true');
core.setOutput('pr_sha', pr.head.sha);
core.setOutput('image', image);

await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'rocket'
});
return;
}
}

core.setOutput('should_build', 'false');

build-image:
name: Build and Push Image
needs: check-trigger
if: needs.check-trigger.outputs.should_build == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.check-trigger.outputs.pr_sha }}

- name: Prepare Worker
uses: ./.github/actions/prepare-nix

- name: Upload image
id: upload
run: |
GIT_HASH=$(git rev-parse --short HEAD)
nix run .#publish-ghcr ${{ needs.check-trigger.outputs.image }} "$GIT_HASH"

IMAGE_NAME=$(nix eval .#${{ needs.check-trigger.outputs.image }}.imageName --raw)
echo "image_tag=ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME}:${GIT_HASH}" >> $GITHUB_OUTPUT
env:
GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }}
GHCR_USERNAME: ${{ github.actor }}
GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
SKIP_SIGNING: "true"
SKIP_TRIVY: "true"

- name: Output image info
run: |
echo "### Published Image" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ steps.upload.outputs.image_tag }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

- name: Comment on PR
if: github.event_name == 'issue_comment'
uses: actions/github-script@v8
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `Image built and pushed!\n\n\`\`\`\n${{ steps.upload.outputs.image_tag }}\n\`\`\``
});
Loading
Loading