Skip to content

fix(build): generate backend plugins before every build - #5587

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/backend-plugin-generation
Jul 6, 2026
Merged

fix(build): generate backend plugins before every build#5587
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/backend-plugin-generation

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

What

Two build-system fixes:

  1. Plugin generation runs before every backend build. extra_plugins.go is generated from plugin-config.yaml and gitignored, so a fresh checkout compiled a plugin-less jetstream: no cloudfoundry plugin, Unknown endpoint type "cf" warnings in the log, and a silently empty endpoints page in the UI (the cf group never reaches /pp/v1/info, while /api/v1/endpoints still returns DB rows). Only the korifi target and cross-compile.sh ran the generator. The step is now an internal gen-plugins prerequisite shared by build backend and build korifi (dev backend inherits it via its delegated build), and cross-compile.sh gains a repo-root guard since its paths are root-relative.

  2. Silence spurious site.mk include noise on make 3.81. macOS's bundled GNU Make 3.81 prints No rule to make target 'site.mk'. Stop. for a missing -include'd file and then continues anyway; newer make is silent. Wrapping the include in $(wildcard) keeps 3.81 quiet with no behavior change when a site.mk is present.

Verification

  • make -n build backend PLATFORM=…, make -n build korifi, and the cross-compile branch all show generation running first
  • Cold-build test: deleted extra_plugins.go, ran make build backend PLATFORM=darwin/arm64 — file regenerated, resulting binary contains the cloudfoundry plugin
  • site.mk A/B: message gone when absent, include still honored when present
  • make help unchanged (gen-plugins is an internal hidden target)

extra_plugins.go is generated from plugin-config.yaml and gitignored, so
a fresh checkout compiled a plugin-less jetstream: no cloudfoundry
plugin, 'Unknown endpoint type "cf"' warnings, and a silently empty
endpoints page. Only the korifi target and cross-compile.sh ran the
generator.

Consolidate the step as an internal gen-plugins prerequisite shared by
'build backend' and 'build korifi' (dev backend inherits it), and guard
cross-compile.sh against running outside the repo root.
macOS's bundled GNU Make 3.81 prints 'No rule to make target site.mk.
Stop.' for a missing -include'd file (then continues anyway); newer
make is silent. Wrap the include in $(wildcard) so 3.81 never attempts
the file when absent. Behavior with a site.mk present is unchanged.

@norman-abramovitz norman-abramovitz 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.

LGTM

@norman-abramovitz
norman-abramovitz merged commit 0e7f433 into cloudfoundry:develop Jul 6, 2026
18 checks passed
@nabramovitz
nabramovitz deleted the norm/fix/backend-plugin-generation branch July 6, 2026 21:57
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.

2 participants