Skip to content

Conversation

@rspurgeon
Copy link
Collaborator

Resolved #322

@rspurgeon rspurgeon changed the title Gh 322 Fix: Portal asset and api publication redundant update plans Jan 14, 2026
@rspurgeon rspurgeon marked this pull request as ready for review January 15, 2026 00:07
Copilot AI review requested due to automatic review settings January 15, 2026 00:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes issue #322, which reported that the planner was generating redundant UPDATE operations for portal assets (logo/favicon) and API publications on consecutive runs with no configuration changes. The root cause was that the planner was not comparing current state with desired state for these resources.

Changes:

  • Implemented data URL byte-comparison for portal asset updates (logo and favicon)
  • Added auth strategy reference resolution for API publication comparison
  • Added external portal checks to skip asset planning for non-managed portals

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/declarative/planner/portal_child_planner.go Implemented portalAssetNeedsUpdate, dataURLsEqual, and decodeDataURL functions to compare portal assets by decoding and comparing bytes; updated asset planning functions to use comparison logic
internal/declarative/planner/portal_planner.go Added external portal checks and error handling for asset planning; integrated asset comparison logic into portal child resource planning
internal/declarative/planner/api_planner.go Added resolveAuthStrategyIDsForComparison to resolve reference placeholders to actual IDs before comparing auth strategies in API publications
internal/declarative/planner/portal_asset_test.go Added unit tests for data URL comparison and portal asset update detection logic
internal/declarative/planner/api_planner_test.go Added tests for auth strategy reference resolution in API publication comparison
test/e2e/scenarios/portal/assets/scenario.yaml Updated expectations to verify that unchanged favicon does not trigger update (reduced from 3 to 2 updates)
test/e2e/scenarios/portal/auth-strategy-link/scenario.yaml Added no-op plan test to verify API publications are not updated when nothing changes
test/e2e/scenarios/portal/assets/overlays/002-update/favicon-unchanged.ico Added test fixture with unchanged favicon binary
test/e2e/scenarios/portal/assets/overlays/002-update/config.yaml Updated overlay to use unchanged favicon for testing byte comparison
docs/examples/declarative/basic/api-with-portal-pub.yaml Enhanced example to include auth strategy and portal assets
planning/ISSUE_322_NOISY_PLANNER_PORTAL_ASSETS.md Added comprehensive documentation of the issue investigation and resolution
.go-version Added Go version specification file
.tool-versions Added tool version specifications for jq, gh, and git

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rspurgeon rspurgeon merged commit b9ea614 into main Jan 15, 2026
16 checks passed
@rspurgeon rspurgeon deleted the gh-322 branch January 15, 2026 00:11
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.

Bug: Portal assets and publications plan changes with no updates to input configuration

2 participants