Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6d82cf9
*: initial scaffolding for the stickydisk action
adityamaru Dec 7, 2024
925fd98
Merge pull request #1 from useblacksmith/initial-commit
adityamaru Dec 13, 2024
1e9b1c3
README: update use cases in README
adityamaru Dec 16, 2024
86672c0
README: update README
adityamaru Dec 16, 2024
f9a0feb
Merge pull request #3 from useblacksmith/update-readme
adityamaru Dec 16, 2024
133fc0b
README: add blacksmith logo (#4)
aayushshah15 Dec 16, 2024
d29289d
main: maintain runner perms when mounting a stickydisk
adityamaru Dec 19, 2024
719a784
Merge pull request #5 from useblacksmith/fix-perms
adityamaru Dec 19, 2024
60fc5d5
update README (#6)
aayushshah15 Dec 19, 2024
ea2e5f8
README: update README with use cases and arch diagram
adityamaru Jan 16, 2025
3d6bf16
.github: fix typo
adityamaru Jan 17, 2025
16ff158
Merge pull request #7 from useblacksmith/add-readme
adityamaru Jan 17, 2025
6d5bf41
README: fix nits
adityamaru Jan 17, 2025
c8fc92b
Merge pull request #8 from useblacksmith/fix-nits
adityamaru Jan 17, 2025
af6814d
Update README.md
adityamaru Jan 17, 2025
b26d421
.github: clarify in first sentence
adityamaru Jan 17, 2025
a978eb7
Update README.md
adityamaru Jan 17, 2025
7464a4c
Update README.md
adijp Jan 17, 2025
d197c9d
Merge pull request #9 from useblacksmith/adijp-patch-1
adijp Jan 17, 2025
a85354c
src: add sync before umount
adityamaru Jan 22, 2025
9c61fba
Merge pull request #10 from useblacksmith/sd-fixes
adityamaru Jan 22, 2025
5175c4c
src: increase timeout to the same as build-push-action
adityamaru Feb 10, 2025
abd1f46
Merge pull request #11 from useblacksmith/timeout-fails
adityamaru Feb 10, 2025
eb09d7f
src: explicitly flush journal before umounting (#12)
aayushshah15 Feb 28, 2025
1a5dbf4
use grpc port from the env if present (#14)
aayushshah15 Apr 16, 2025
e9f9c9e
src: print who we are establishing client with
adityamaru May 16, 2025
13999b2
Merge pull request #18 from useblacksmith/add-logs
adityamaru May 16, 2025
d0f8bc7
src: use BLACKSMITH prefixed env vars to work inside job containers
adityamaru Jun 16, 2025
dc196a4
Merge pull request #19 from useblacksmith/read-bs-env
adityamaru Jun 16, 2025
5d2e921
src: revert to use the correct github repo name
adityamaru Jun 16, 2025
bc0c024
Merge pull request #20 from useblacksmith/revert-repo
adityamaru Jun 16, 2025
f6f26dd
README: add Alpha status callout (#22)
aayushshah15 Aug 13, 2025
db9a8a5
Add failure detection logic to sticky disk action
adityamaru Aug 23, 2025
f214a7a
Fix linting errors and add CLAUDE.md
adityamaru Aug 24, 2025
8310ad7
Update dependencies and improve CLAUDE.md
adityamaru Aug 24, 2025
a6338cb
Fix mkdir permission error for restricted paths
adityamaru Aug 24, 2025
de6105f
Fix mkdir permission error for restricted paths
adityamaru Aug 25, 2025
4c1c4b5
Add intentional failure to test failure detection
adityamaru Aug 25, 2025
1139a16
Revert "Add intentional failure to test failure detection"
adityamaru Aug 25, 2025
a5f22ce
Merge pull request #27 from useblacksmith/golden-dash-image
adityamaru Aug 25, 2025
e86d166
add filesystem usage tracking to sticky disk commits (#30)
aayushshah15 Oct 3, 2025
5bac8aa
fix: collect filesystem usage before unmounting sticky disk
aayushshah15 Oct 3, 2025
0c6be50
docs: add stickydisk-delete section to README
adityamaru Oct 11, 2025
b451e58
docs: update stickydisk-delete section with accurate features
adityamaru Oct 11, 2025
aef878a
chore: update buf dependency versions to fix CI
adityamaru Oct 11, 2025
35fe041
docs: add reference to setup-docker-builder for Docker cache deletion
adityamaru Oct 11, 2025
00dbeb0
chore: update build artifacts for platform compatibility
adityamaru Oct 12, 2025
c0b0552
chore: update build artifacts for platform compatibility
adityamaru Oct 12, 2025
214f917
Revert "chore: update build artifacts for platform compatibility"
adityamaru Oct 12, 2025
5a67c5a
fix: update package-lock.json with latest buf dependency
adityamaru Oct 12, 2025
38cda39
Merge pull request #32 from useblacksmith/add-stickydisk-delete-section
adityamaru Oct 12, 2025
2312437
fix: remove lost+found directory after formatting to prevent permissi…
adityamaru Oct 31, 2025
10e85cf
test: add placeholder test to satisfy CI requirements
adityamaru Oct 31, 2025
b9ad1ce
style: format code with prettier
adityamaru Oct 31, 2025
8ffbc08
fix: remove explicit buf package install from CI to prevent formattin…
adityamaru Oct 31, 2025
a652394
Merge pull request #34 from useblacksmith/fix/remove-lost-found-after…
adityamaru Nov 1, 2025
637a53f
docs: expand use cases with production-validated examples
adityamaru Nov 2, 2025
cb81162
docs: expand use cases with production-validated examples
adityamaru Nov 2, 2025
dad6f6c
fix: correct Nix example step order and action
adityamaru Nov 2, 2025
7182ea3
Merge pull request #35 from useblacksmith/docs/update-use-cases-with-…
adityamaru Nov 2, 2025
03bbd92
chore: promote stickydisk action from Alpha to Beta
adityamaru Nov 2, 2025
58d9166
Merge pull request #36 from useblacksmith/chore/move-to-beta
adityamaru Nov 2, 2025
ec1faef
docs: BLA-2526 - Update stickydisk limit from 5 to 10 disks
devin-ai-integration[bot] Nov 22, 2025
61ab530
feat(post): add explicit durability flush after unmount (BLA-3202)
devin-ai-integration[bot] Feb 3, 2026
36f8aa6
fix: apply prettier formatting
devin-ai-integration[bot] Feb 3, 2026
3234347
refactor: remove env var, change debug to info, reduce timeout to 10s
devin-ai-integration[bot] Feb 3, 2026
c8098aa
refactor: use shell timeout command for flush operation
devin-ai-integration[bot] Feb 3, 2026
8db9d81
Merge pull request #41 from useblacksmith/devin/BLA-2526-1763844368
adityamaru Feb 4, 2026
18dec29
Merge pull request #42 from useblacksmith/devin/1770147180-bla-3202-d…
adityamaru Feb 8, 2026
94119f5
ensure that sticky disk timeout is cleared even if thrown
bruce-y Mar 10, 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
76 changes: 76 additions & 0 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Basic Sticky Disk Test
on:
workflow_dispatch:
pull_request:

jobs:
test-sticky-disk:
name: Test Sticky Disk
runs-on: blacksmith
strategy:
matrix:
iteration: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
fail-fast: false
steps:
- name: Create directory called
run: sudo mkdir -p ./shouldseethis

- name: Mount First Sticky Disk
uses: useblacksmith/stickydisk@main
with:
key: foo
path: ./shouldseethis

- name: List first directory if exists
run: |
if [ -d "./shouldseethis" ]; then
ls -la ./shouldseethis
fi

- name: Write test file to first disk
run: sudo sh -c 'echo "Hello from first sticky disk" > ./shouldseethis/test.txt'

- name: Mount Second Sticky Disk
uses: useblacksmith/stickydisk@main
with:
key: bar
path: ./seconddisk

- name: List second directory if exists
run: |
if [ -d "./seconddisk" ]; then
ls -la ./seconddisk
fi

- name: Write test file to second disk
run: sudo sh -c 'echo "Hello from second sticky disk" > ./seconddisk/test.txt'

- name: Mount Third Sticky Disk
uses: useblacksmith/stickydisk@main
with:
key: baz
path: ./thirddisk

- name: List third directory if exists
run: |
if [ -d "./thirddisk" ]; then
ls -la ./thirddisk
fi

- name: Write test file to third disk
run: sudo sh -c 'echo "Hello from third sticky disk" > ./thirddisk/test.txt'

- name: Mount First Sticky Disk Again
uses: useblacksmith/stickydisk@main
with:
key: foo
path: ./shouldseethis_again

- name: List first directory again if exists
run: |
if [ -d "./shouldseethis_again" ]; then
ls -la ./shouldseethis_again
fi

- name: Write test file to first disk again
run: sudo sh -c 'echo "Hello again from first sticky disk" > ./shouldseethis_again/test2.txt'
26 changes: 25 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,37 @@ jobs:
with:
node-version-file: .nvmrc

- name: Setup Buf
uses: bufbuild/buf-setup-action@v1

- name: Configure Buf Registry
run: |
npm config set @buf:registry https://buf.build/gen/npm/v1/
npm config set //buf.build/gen/npm/v1/:_authToken ${{ secrets.BUF_TOKEN }}

- name: Install Dependencies
run: npm ci

- name: Check Prettier Formatting
run: |
npm run format
# Check if prettier generated any changes
if ! git diff --quiet; then
echo "Error: Code is not formatted with prettier. Please run 'npm run format' locally and commit the changes."
git status
git diff
exit 1
fi

- name: Check Lint
run: npm run lint

- name: Build Action
run: |
npm run build
git diff && git diff-index --quiet --exit-code HEAD
# Check if any files were changed during build
if ! git diff --quiet; then
echo "Error: Build generated changes that aren't committed. Please run 'npm run build' locally and commit the changes."
git diff
exit 1
fi
22 changes: 22 additions & 0 deletions .github/workflows/bump-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bump Tag

on:
workflow_dispatch:

jobs:
bump-tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Bump v1 tag
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -f v1
git push origin v1 -f
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,27 @@
!.git*
!.nvmrc

# Dependencies
node_modules/

# TypeScript
*.tsbuildinfo

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Test coverage
coverage/

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Binary file added Blacksmith_Logo-Black-Large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Blacksmith_Logo-White-Large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Claude Code Assistant Guidelines

This document contains important information for Claude when working on this codebase.

## Pre-commit Checks

**CRITICAL - MUST RUN BEFORE EVERY COMMIT**: The CI will fail if you don't run these commands before committing:

```bash
# 1. Run the linter (REQUIRED - CI will fail if there are lint errors)
npm run lint

# 2. Build the project (REQUIRED - CI will fail if dist/ files are out of date)
npm run build

# 3. Stage the dist files if they changed
git add dist/
```

**Why this matters**: The CI checks that:

1. Code passes all lint rules
2. The dist/ folder is up-to-date with the source code (no uncommitted build changes)

## Available Scripts

- `npm run lint` - Runs ESLint to check code style and potential issues
- `npm run build` - Builds the TypeScript code and creates distribution files
- `npm test` - Runs the test suite (currently empty)

## Code Style Guidelines

1. **Array Types**: Use `T[]` syntax instead of `Array<T>` (enforced by ESLint)
2. **TypeScript**: All source code should be in TypeScript
3. **Build Output**: Always rebuild (`npm run build`) after making changes to ensure dist/ files are updated

## Project Structure

- `src/` - Source TypeScript files
- `main.ts` - Main action entry point
- `post.ts` - Post-action cleanup
- `step-checker.ts` - Checks for failed workflow steps
- `utils.ts` - Utility functions
- `dist/` - Compiled JavaScript output (auto-generated, should be committed)
- `action.yml` - GitHub Action configuration

## Important Notes

1. This is a GitHub Action that manages sticky disks for caching in CI/CD workflows
2. The action has both a main phase (mounting) and a post phase (unmounting and committing)
3. Always ensure the dist/ folder is updated when source files change
4. The action integrates with Blacksmith's sticky disk service
Loading