Skip to content

fix: restore green CI (make-node ops in FSIndex + journal; RustFS replaces MinIO) - #26

Merged
tofarr merged 2 commits into
mainfrom
fix/make-node-ops-compile
Nov 16, 2026
Merged

tofarr merged 2 commits into
mainfrom
fix/make-node-ops-compile

Conversation

@tofarr

@tofarr tofarr commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

main is red for two independent reasons. This PR fixes both so CI can go green again.

1. main doesn't compile

#11 changed internal/fuse/fs.go to create nodes with Index.MakeFile / MakeDir / MakeSymlink, but never added them to the FSIndex interface:

internal/fuse/fs.go:223:22: n.f.idx.MakeFile undefined (type FSIndex has no field or method MakeFile)
internal/fuse/fs.go:251:22: n.f.idx.MakeDir undefined (type FSIndex has no field or method MakeDir)
internal/fuse/fs.go:277:22: n.f.idx.MakeSymlink undefined (type FSIndex has no field or method MakeSymlink)

#11 was written before the edit-log work (#21) introduced FSIndex, and merged onto main without being rebuilt on it.

internal/fuse/fs.go                 FSIndex += MakeFile, MakeDir, MakeSymlink
internal/journal/wrap.go            JournaledIndex.MakeFile / MakeDir / MakeSymlink (+ recordMade)
internal/journal/journal_test.go    new replay test

Adding the methods to FSIndex alone would compile, which is the trap: JournaledIndex embeds *index.Index, so it would satisfy the interface by method promotion and silently stop journaling every create, mkdir and symlink. The edit log would then miss them and as-of replay would be wrong.

So JournaledIndex gets explicit wrappers. Each records the same ops the old two-step path recorded, in the same order, so replay is unchanged:

call journaled ops
MakeFile / MakeDir CreateInode (nlink 0), AddDirEntry
MakeSymlink CreateInode (nlink 0), AddDirEntry, SetSymlink

CreateInode is journaled with nlink 0 because replay's AddDirEntry is what links the inode. A failed create (ErrExist) records nothing.

TestJournaledIndexMakeNodeOpsReplayToLiveState drives the three methods through JournaledIndex, checks 7 ops are journaled and that a duplicate create adds none, then replays the journal into a fresh index and compares lookups, inode type/nlink/mode and the symlink target against the live index. It fails (journal length 0, want 7) if the wrappers are removed.

2. CI can't start its S3 server

minio/minio is no longer published on Docker Hub (the community repo is archived and source-only), so the "Start MinIO" step fails at docker run (pull access denied) and go test never runs. This was hidden while go vet was failing first.

.github/workflows/ci.yml now starts rustfs/rustfs:1.0.6 (Apache-2.0, S3-compatible) with the same credentials and port, and probes RustFS's /health endpoint for readiness. No test code changes: all TestS3* integration tests pass against it. The run instructions in s3_test.go and the README are updated to match.

Verification

  • go build ./..., go vet ./... and go test -race -count=1 ./... pass, locally and in CI on this PR. I also ran the exact CI "Start RustFS" step locally and confirmed all 7 TestS3* tests pass against it.
  • The FUSE mount tests skip without /dev/fuse, as before.
  • RustFS is young (1.0 recently), so the tag is pinned.

This PR was created by an AI agent (OpenHands) on behalf of @tofarr.

#11 switched the FUSE layer to Index.MakeFile/MakeDir/MakeSymlink but did not
add them to the FSIndex interface, so main stopped compiling (go vet / go build
fail in internal/fuse). Add them to FSIndex.

JournaledIndex embeds *index.Index, so without explicit wrappers it would
satisfy the interface by promotion and silently skip the journal. Add wrappers
that record the same CreateInode + AddDirEntry (+ SetSymlink) ops the old
two-step create path recorded, so edit-log replay is unchanged. A failed
create (ErrExist) records nothing.

Add a test that drives the new methods through JournaledIndex and replays the
journal into a fresh index.

Co-authored-by: openhands <openhands@all-hands.dev>
minio/minio is no longer published on Docker Hub (the community repo is
archived and source-only), so the "Start MinIO" CI step fails at docker run
and go test never runs.

Use rustfs/rustfs (Apache-2.0, S3-compatible, pinned to 1.0.6) with the same
credentials and port. The readiness probe moves to RustFS's /health endpoint.
No test code changes; all TestS3* integration tests pass against it. Update the
run instructions in s3_test.go and the README to match.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr changed the title fix: restore main build by adding make-node ops to FSIndex and the journal fix: restore green CI (make-node ops in FSIndex + journal; RustFS replaces MinIO) Nov 16, 2026

@hieptl hieptl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

@tofarr
tofarr merged commit ea5f911 into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants