Skip to content

Conversation

@lukidzi
Copy link

@lukidzi lukidzi commented Nov 12, 2025

Summary

Fixes the upstream synchronization automation to support multi-module tagging and resolves GitHub Actions output format errors.

Changes

  1. Refactored version detection script (.github/scripts/get-version-tags.sh)

Problem: The original script only tracked the root module tag and failed in GitHub Actions with JSON format errors.

Solution: Complete rewrite with the following improvements:

  • Multi-module support: Now detects and tracks tags across all 5 modules (root, envoy, contrib, ratelimit, xdsmatcher)
  • Added reusable functions: strip_kong_suffix(), process_module_tags()
  • Used loops and arrays instead of duplicating logic for each module
  • Centralized module list in MODULES array for easy maintenance
    Actions can parse
  • Enhanced detection logic:
    • Identifies all new upstream tags per module since last Kong release
    • Determines if rebase is needed (root version changed)
    • Outputs multiple tags as JSON array for workflow consumption
  • Better error handling: Added set -e and proper exit codes
  1. Updated sync workflow (.github/workflows/sync-with-upstream.yaml)
  • Decoupled detection from sync: Tag detection now runs independently, not only when new commits exist
  • Multi-tag support: Workflow now creates all module tags (not just root)
  • New outputs consumed:
    • needs_release: Boolean indicating if action is needed
    • needs_rebase: Boolean indicating if rebase is required
    • new_tags: JSON array of all tags to create
  • Improved rebase logic: Uses --onto with proper base commit detection
  • Better workflow control: Added separate steps for "no action needed" vs "release with rebase"
  1. Enhanced documentation (DEVELOPMENT.md)
  • Added multi-module tagging section: Explains upstream's new multi-module tag structure
  • Improved conflict resolution instructions:
    • Better explanation of branch structure
    • Step-by-step rebase instructions with examples
    • Clarified that Kong tags point to HEAD (custom commits on top)
  • Manual release examples: Shows how to create all module tags when doing custom releases

lukidzi and others added 9 commits November 12, 2025 06:03
added instruction about conflict resolution

Signed-off-by: Lukasz Dziedziak <[email protected]>
Co-authored-by: Krzysztof Słonka <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
added instruction about conflict resolution

Signed-off-by: Lukasz Dziedziak <[email protected]>
Co-authored-by: Krzysztof Słonka <[email protected]>
Co-authored-by: Bart Smykla <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
Signed-off-by: Lukasz Dziedziak <[email protected]>
@lukidzi lukidzi requested a review from bartsmykla November 12, 2025 19:22
Signed-off-by: Lukasz Dziedziak <[email protected]>
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