Skip to content

Auto: sync versions [release-v1.44] - #5298

Closed
github-actions[bot] wants to merge 0 commit into
release-v1.44from
auto-sync-versions-release-v1.44
Closed

Auto: sync versions [release-v1.44]#5298
github-actions[bot] wants to merge 0 commit into
release-v1.44from
auto-sync-versions-release-v1.44

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Automated sync of versions and CRDs from Calico and Calico Enterprise into
release-v1.44 via make gen-versions.

Triggered by scheduled workflow.

Copilot AI lite review requested due to automatic review settings September 2, 2026 19:07
@github-actions
github-actions Bot requested a review from a team as a code owner September 2, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are low-risk generated embed wrappers; the only feedback is minor naming/documentation clarity in the new admission embed helper.

Pull request overview

Automated update on release-v1.44 to sync in generated/versioned assets by adding small Go wrappers that expose embedded YAML content (CRDs and admission policies) as fs.FS for consumers.

Changes:

  • Add embed.go wrappers for Enterprise projectcalico.org v3 CRDs (v3.projectcalico.org) and v1 CRD-mode CRDs (v1.crd.projectcalico.org).
  • Add an embed.go wrapper for Enterprise admission policy YAMLs under pkg/imports/admission/enterprise.
File summaries
File Description
pkg/imports/crds/enterprise/v3.projectcalico.org/embed.go Introduces a small fs.FS accessor backed by go:embed for Enterprise v3 projectcalico.org CRD YAMLs.
pkg/imports/crds/enterprise/v1.crd.projectcalico.org/embed.go Introduces a small fs.FS accessor backed by go:embed for Enterprise v1 CRD-mode CRD YAMLs.
pkg/imports/admission/enterprise/embed.go Introduces a small fs.FS accessor backed by go:embed for Enterprise admission policy YAMLs.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +15 to +16
// Package admission serves the generated admission policies to the components
// that install them, so nothing has to keep a copy of its own.
Comment on lines +24 to +30
//go:embed *.yaml
var crds embed.FS

// FS returns the admission policy YAML in this directory.
func FS() fs.FS {
return crds
}
Copilot AI review requested due to automatic review settings September 8, 2026 20:07
@github-actions
github-actions Bot force-pushed the auto-sync-versions-release-v1.44 branch from 41813c6 to 56407f1 Compare September 8, 2026 20:07
@marvin-tigera

Copy link
Copy Markdown
Contributor

Removing "merge-when-ready" label due to new commits

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Newly-added Go files under embedded/iterated YAML directories will be treated as YAML inputs by existing loaders, which can cause runtime panics during CRD/admission policy parsing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment on lines +15 to +17
// Package admission serves the generated admission policies to the components
// that install them, so nothing has to keep a copy of its own.
package admission
Comment on lines +15 to +17
// Package crd serves the generated crd.projectcalico.org CRDs to the components
// that install them, so nothing has to keep a copy of its own.
package crd
Comment on lines +15 to +17
// Package crd serves the generated projectcalico.org v3 CRDs to the components
// that install them, so nothing has to keep a copy of its own.
package crd
Copilot AI review requested due to automatic review settings September 10, 2026 08:10
@github-actions
github-actions Bot force-pushed the auto-sync-versions-release-v1.44 branch from 56407f1 to 2a7248b Compare September 10, 2026 08:10
@marvin-tigera

Copy link
Copy Markdown
Contributor

Removing "merge-when-ready" label due to new commits

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The newly added embed.go files are placed inside directories that existing loaders embed and iterate as YAML-only, which will cause Go source files to be read/parsed as YAML and panic.

Review details

Suppressed comments (3)

pkg/imports/crds/enterprise/v1.crd.projectcalico.org/embed.go:25

  • This directory is currently treated as embedded data by pkg/imports/crds/crds.go (//go:embed enterprise) and getEnterpriseCRDSource() iterates ReadDir("enterprise/v1.crd.projectcalico.org") without filtering, assuming every entry is YAML. Adding embed.go here will cause the embedded FS to include a Go source file that then gets read and split/parsed as CRD YAML, leading to a panic in pkg/imports/crds/crds_test.go (and at runtime when CRDs are loaded). The fix should be to keep these CRD directories YAML-only or update the loader to ignore non-*.yaml entries / narrow the go:embed patterns.
// Package crd serves the generated crd.projectcalico.org CRDs to the components
// that install them, so nothing has to keep a copy of its own.
package crd

import (
	"embed"
	"io/fs"
)

//go:embed *.yaml
var crds embed.FS

pkg/imports/admission/enterprise/embed.go:25

  • pkg/imports/admission/admission.go embeds the entire enterprise directory (//go:embed enterprise) and getAdmissionPolicies() iterates ReadDir("enterprise") without filtering, assuming all entries are YAML policy bundles. Adding this embed.go means the embedded FS will include a Go source file that then gets read and parsed as YAML, which will fail (panic) when admission policies are loaded/tests run. Keep this directory YAML-only, or update the loader/embed patterns to exclude non-*.yaml files.
// Package admission serves the generated admission policies to the components
// that install them, so nothing has to keep a copy of its own.
package admission

import (
	"embed"
	"io/fs"
)

//go:embed *.yaml
var crds embed.FS

pkg/imports/crds/enterprise/v3.projectcalico.org/embed.go:25

  • This directory is currently treated as embedded data by pkg/imports/crds/crds.go (//go:embed enterprise) and getEnterpriseCRDSource() iterates ReadDir("enterprise/v3.projectcalico.org") without filtering, assuming every entry is YAML. Adding embed.go here will cause the embedded FS to include a Go source file that then gets read and split/parsed as CRD YAML, leading to a panic in pkg/imports/crds/crds_test.go (and at runtime when CRDs are loaded). The fix should be to keep these CRD directories YAML-only or update the loader to ignore non-*.yaml entries / narrow the go:embed patterns.
// Package crd serves the generated projectcalico.org v3 CRDs to the components
// that install them, so nothing has to keep a copy of its own.
package crd

import (
	"embed"
	"io/fs"
)

//go:embed *.yaml
var crds embed.FS
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 10, 2026 18:09
@github-actions github-actions Bot closed this Sep 10, 2026
@github-actions
github-actions Bot force-pushed the auto-sync-versions-release-v1.44 branch from 2a7248b to 20d105b Compare September 10, 2026 18:09
@github-actions
github-actions Bot deleted the auto-sync-versions-release-v1.44 branch September 10, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants