Skip to content

feat(velocity): support static server discovery - #75

Merged
lusu007 merged 9 commits into
mainfrom
feat/static-server-discovery
Aug 23, 2026
Merged

feat(velocity): support static server discovery#75
lusu007 merged 9 commits into
mainfrom
feat/static-server-discovery

Conversation

@lusu007

@lusu007 lusu007 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Adds strict static Velocity backend discovery through GROUNDS_STATIC_SERVERS using name=host:port entries. Static registrations are excluded from lobby selection and protected from Agones reconciliation through registration-identity ownership tracking.

Fixes drain handling so only actual round roles (game and match) defer transfer. During automatic drain only, Java players on a static backend preserve that backend across the proxy move through a short-lived HMAC-signed transfer cookie. The source confirms an exact client echo before transfer; the target validates signature, TTL, and the current static registration. Missing, invalid, or timed-out cookies fall back to normal routing. Manual /region and other proxy moves are unchanged.

The existing Velocity image placeholders are removed only when their exact baked name/address pairs match; unrelated registrations and external same-name replacements are preserved.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • ♻️ Refactoring
  • 📚 Documentation
  • 🔧 Chore

Related Issues

  • Addresses the review feedback about static backends being treated as active rounds.

Testing

  • Unit tests pass
  • Manual testing completed
  • New tests added for new functionality

Commands run:

./gradlew --no-daemon spotlessCheck check
./gradlew --no-daemon :velocity:test --rerun-tasks

Results: full build successful; 71 Velocity tests passed.

Checklist

  • I have performed a self-review of my own code
  • Tests have been added/updated and pass (if needed)
  • Documentation has been updated (if needed)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98c8ccdf99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread velocity/src/main/kotlin/gg/grounds/discovery/DiscoveryService.kt
@sonarqubecloud

Copy link
Copy Markdown

@lusu007
lusu007 merged commit dd82813 into main Aug 23, 2026
3 checks passed
@lusu007
lusu007 deleted the feat/static-server-discovery branch August 23, 2026 18:09
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.

1 participant