refactor(vulnfeeds): migrate debian-copyright-mirror to Go - #5885
Open
jess-lowe wants to merge 7 commits into
Open
refactor(vulnfeeds): migrate debian-copyright-mirror to Go#5885jess-lowe wants to merge 7 commits into
jess-lowe wants to merge 7 commits into
Conversation
| } | ||
|
|
||
| for { | ||
| hdr, err := tr.Next() |
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.
Migrates the
debian-copyright-mirrorservice from Python to Go and extracts reusable networking, archive, and decompression utilities for othervulnfeedstools.Key Changes
debian-copyright-mirror.pyanddebian-copyright-mirror.shwith a native Go service (cmd/mirrors/debian-copyright-mirror/main.go).filelist.yaml.xzover HTTP through anxz -dcpipe directly into a custom streaming line parser, extracting ~44k package paths without disk writes.-max-failure-rate)..tarpackaging and direct streaming to Google Cloud Storage (cloud.google.com/go/storage).utility/decompress.go: Generic XZ streaming decompression helpers.utility/download.go: Resilient atomic file downloader with exponential backoff.utility/archive.go: Tar archive creation and extraction with traversal/bomb protections.gcs-tools/gcs.go: AddedParseGCSPathURI helper.alpine:3.21image with the Go binary as directENTRYPOINT, removing the need forgoogle-cloud-cliand wrapper shell scripts.Testing Done
go test ./...invulnfeeds(all tests passing).golangci-lint run(0 issues)..targeneration with live Debian changelog metadata.