Repository navigation
fix(operator): record latest bundle digest for OCI module sources - #6
Merged
Merged
Conversation
The OCI fetcher copied bundle metadata into the catalog entry but never set entry.Digest, even though bundle.Digest is available from Pull. The module controller skips reconciliation when entry.Digest == "", so OCI modules never showed a digest and could not detect content drift behind a reused tag/version. Assign it, matching dir and upload sources. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
ValgulNecron
added a commit
that referenced
this pull request
Aug 23, 2026
Fix two critical edge cases in the capture-sidecar: 1. ENOSPC from WritePacket reported as "error" instead of "disk_full" (Z2 #6): When a bufio flush inside WritePacket fails with ENOSPC, the error doesn't wrap ErrLimitReached, so it falls through to the default case and gets reported as a generic "error" reason. This hides the root cause from operators investigating truncated captures. Fixed by checking both the error chain and the writer's LimitReason field in the default case to properly distinguish disk-full from other failures. Added TestCaptureENOSPCDuringWritePacketReportsDiskFull to verify ENOSPC surfaces as disk_full reason in both the writer and the handler. 2. Process shutdown never finalizes in-flight captures (Z2 #7): On SIGTERM, baseCtx is cancelled, causing runCapture to return without calling finish(), leaving the PCAPNG writer unflushed and the file potentially truncated and unreadable (worst failure mode for a forensic tool). Fixed by: - Adding Server.FinalizeCurrentCapture() to safely finalize the current capture with a timeout, logging if the goroutine doesn't exit in time - Calling FinalizeCurrentCapture() in main.go after server.Shutdown() This ensures captures are always properly closed before process exit, regardless of whether shutdown is graceful or forced by the container orchestrator. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EsywBB1qz8A6F68HPJpxv
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug 7 from BUG_REPORT.md
operator/internal/modsrc/oci.gocopied the latest bundle's metadata into the catalogModuleEntrybut never assignedentry.Digest, even thoughbundle.Digestis already returned byPull. Becausemodule_controller.goskips reconciliation whenentry.Digest == "", OCI modules:Non-OCI sources (
dir.go,upload.go) already populate the digest.Fix
One line:
entry.Digest = bundle.Digestafter the metadata copy.Test
Extended
TestOCIFetcher_Indexto assert the indexed entry carries the latest bundle's digest.🤖 Generated with Claude Code