Skip to content

refactor(hack): port merge-mac-metadata to Go, drop yaml.v2#423

Merged
skevetter merged 1 commit into
mainfrom
rewrite/merge-mac-metadata-go
May 24, 2026
Merged

refactor(hack): port merge-mac-metadata to Go, drop yaml.v2#423
skevetter merged 1 commit into
mainfrom
rewrite/merge-mac-metadata-go

Conversation

@skevetter

@skevetter skevetter commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rewrites hack/merge-mac-metadata.py as hack/merge_mac_metadata.go, invoked via go run from the release workflow. Removes the pip install pyyaml step.
  • Upgrades the two remaining gopkg.in/yaml.v2 callers (pkg/devcontainer/compose.go, cmd/pro/import_workspace.go) to gopkg.in/yaml.v3, so yaml.v2 is no longer a direct dependency.
  • Adds a hack/ path exclusion for forbidigo/gosec in .golangci.yaml — build-time scripts legitimately need fmt.Printf and accept CLI-arg paths.

Summary by CodeRabbit

  • Chores
    • Updated build and release infrastructure for improved efficiency.
    • Migrated YAML dependency to a newer version across the project.
    • Enhanced code linting configuration for better maintainability.

Review Change Stack

Rewrites hack/merge-mac-metadata.py in Go (`go run` from the release
workflow) so the build no longer needs Python/pyyaml. Upgrades the two
remaining yaml.v2 callers to yaml.v3 so yaml.v2 is no longer a direct
dependency.
@netlify

netlify Bot commented May 24, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev ready!

Name Link
🔨 Latest commit 67a7a8e
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a1320515800760008c4a93a
😎 Deploy Preview https://deploy-preview-423--devsydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 58e571e9-fcf4-461f-acab-8cafe3d10059

📥 Commits

Reviewing files that changed from the base of the PR and between 6d352a6 and 67a7a8e.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • .github/workflows/release.yml
  • .golangci.yaml
  • cmd/pro/import_workspace.go
  • go.mod
  • hack/merge-mac-metadata.py
  • hack/merge_mac_metadata.go
  • pkg/devcontainer/compose.go

📝 Walkthrough

Walkthrough

The PR migrates the macOS metadata merge tool from Python to Go, upgrades YAML dependencies from v2 to v3 throughout the codebase, and updates the release workflow to invoke the new Go-based implementation.

Changes

Python to Go Metadata Tool Migration with YAML v2→v3 Upgrade

Layer / File(s) Summary
YAML v2 to v3 dependency upgrade
go.mod, cmd/pro/import_workspace.go, pkg/devcontainer/compose.go
Direct dependency updated from gopkg.in/yaml.v2 to gopkg.in/yaml.v3 in go.mod, and all consuming imports updated accordingly.
Merge metadata tool rewrite (Python to Go)
hack/merge_mac_metadata.go, .golangci.yaml
Replaces hack/merge-mac-metadata.py with a Go CLI tool that walks the metadata directory for latest-mac.yml and beta-mac.yml files, concatenates file arrays from each architecture-specific YAML, applies top-level metadata from the first entry, and writes merged output YAML; linter config adds forbidigo and gosec exclusions for the hack/ directory.
Release workflow integration
.github/workflows/release.yml
Adds actions/setup-go@v6 step sourcing Go version from go.mod, and updates the metadata merge command to run the new Go tool instead of Python.

🎯 2 (Simple) | ⏱️ ~12 minutes


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skevetter
skevetter marked this pull request as ready for review May 24, 2026 17:06
@skevetter
skevetter merged commit bd67995 into main May 24, 2026
51 of 52 checks passed
@skevetter
skevetter deleted the rewrite/merge-mac-metadata-go branch May 24, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant