Commit Graph
37 Commits
Author SHA1 Message Date
adminandGitHub 0bc84928c7 Add Scala staging runtime to Eagle server (#6810) 2026-05-29 18:44:28 -07:00
adminandGitHub e543d7b53f Run scalafmt hook through Bazel (#6753) 2026-05-24 13:01:56 -07:00
16a4b8f87e Replace file-based ClientTextStore with SQLite implementation (#5553)
* Replace file-based ClientTextStore with SQLite implementation

SQLite provides indexed lookups instead of loading/parsing a 5MB+ text file.
This should significantly reduce the ~142ms spent on loadTextStore during
game loading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add S3 sync for SQLite client text store

- Store dbPath and optional persister reference in SqliteClientTextStore
- Sync database file to cloud storage in saved() method
- Download from cloud storage on load if local file doesn't exist
- Pass persister to createWithData for new game creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync SQLite to S3 immediately after migration

Prevents data loss if server restarts before saved() is called after
migrating from old text-based format to SQLite.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 16:01:52 -08:00
b55df7cf3e Upgrade dependencies: grpc-java, rules_scala, flatbuffers, and more (#5890)
Upgrades:
- grpc-java: 1.71.0 -> 1.78.0
- rules_scala: 7.1.5 -> 7.2.1
- flatbuffers: 25.9.23 -> 25.12.19
- aspect_bazel_lib: 2.22.4 -> 2.22.5
- rules_jvm_external: 6.9 -> 6.10
- Netty: 4.1.110.Final -> 4.1.127.Final (to match grpc-java)

All builds and tests pass.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:55:03 -08:00
a7b7b0e444 Upgrade Scala 3.7.4, rules_scala 7.1.5, protobuf 33.0, grpc 1.76.0, Bazel 7.7.1 (#5871)
* Upgrade rules_scala 7.1.5, Scala 3.7.4, protobuf 32.1

- Update rules_scala from 7.1.1 to 7.1.5
- Update Scala from 3.7.2 to 3.7.4
- Update protobuf from 29.2 to 32.1 (required by rules_scala 7.1.5+)
- Add force_version for Maven dependency conflicts (gson, errorprone, guava)
- Update -Wconf pattern in tools/BUILD.bazel for Bazel 7/8 compatibility
- Add -Wno-deprecated-copy-with-dtor to suppress protobuf 32.x warning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add grpc 1.76.0, protobuf 33.0, and Bazel 7.7.1 compatibility fixes

- Upgrade grpc from 1.71.0 to 1.76.0.bcr.1 (required for protobuf 33.0)
- Upgrade protobuf from 32.1 to 33.0 (matches grpc 1.76.0 expectations)
- Upgrade Bazel from 7.6.1 to 7.7.1
- Add single_version_override for rules_swift 3.1.2 (grpc needs 3.x, rules_apple needs 2.x)
- Add --features=-module_maps workaround for grpc cf_event_engine macOS build issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:15 -08:00
e23a2ddd1b Update Sentry from 7.19.0 to 8.31.0 (#5755)
Major version upgrade with new features including:
- Feature flag evaluations on scope(s)
- MDC properties attached to structured logs as attributes
- Various bug fixes and improvements

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:06:01 -08:00
75c3d4cd9a Update AWS SDK from 2.28.1 to 2.41.18 (#5754)
Upgrade to the latest AWS SDK for Java v2, which includes many bug fixes,
performance improvements, and new features.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 07:48:41 -08:00
ecd089de59 Add Sentry integration for exception alerting (#5011)
- Add io.sentry:sentry dependency
- Initialize Sentry from SENTRY_DSN environment variable
- Report uncaught exceptions via ExceptionInterceptor
- Add SENTRY_DSN to docker-compose and CI workflow

When SENTRY_DSN is configured, uncaught exceptions in gRPC handlers
will be reported to Sentry for email/Slack alerts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 22:20:05 -08:00
ab485919ed Implement OAuth authentication with Discord and Google support (#4827)
Add server-side OAuth authentication infrastructure that supports both
Discord and Google as identity providers, while maintaining backwards
compatibility with existing Basic Auth.

## New Components

- **Auth Proto Definitions**: gRPC service with endpoints for OAuth flow
  (GetOAuthUrl, ExchangeCode, SetDisplayName, RefreshToken, GetCurrentUser)
- **User Proto**: Storage schema with admin flag for impersonation support
- **JwtService**: RS256 token creation/validation with 7-day access tokens
- **OAuthService**: OAuth code exchange with Discord and Google APIs
- **UserService**: User CRUD with file-based persistence via Persister
- **AuthServiceImpl**: gRPC service wiring OAuth flow together

## Key Features

- Dual auth: Basic Auth continues working; JWT activates when configured
- Admin impersonation: Set X-Impersonate-User header to debug as another user
- Display name validation: 3-20 chars, alphanumeric + underscore, unique
- Graceful degradation: Server starts without OAuth if keys not configured

## Environment Variables

```bash
# JWT (required for OAuth)
JWT_PRIVATE_KEY='{"kty":"RSA",...}'  # RSA key in JWK format

# Discord OAuth
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=

# Google OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
```

## Next Steps for Full Integration

1. Generate RSA key for JWT signing
2. Configure Discord/Google OAuth apps with redirect URI eagle0://auth/callback
3. Implement Unity client OAuth flow with system browser + deep links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:55:39 -08:00
a5b608d18a Switch to OkHttp for LLM streaming with read timeout support (#4713)
Java HttpClient lacks read timeout support for streaming connections.
If the server stops sending data without closing the connection, the
client waits forever. This is a known limitation with no workaround.

OkHttp supports read timeouts via `readTimeout()` on the client builder.
If no data is received for the configured timeout (60s by default), the
connection will timeout with an IOException, allowing proper error
handling and retry.

Changes:
- Add OkHttp and okhttp-sse dependencies to MODULE.bazel
- Create OkHttpSseListener to handle SSE events with CompletableFuture
- Convert ExternalTextGenerationCaller to use OkHttp instead of Java HttpClient
- Add toOkHttpRequest helper to convert Java HttpRequest to OkHttp Request

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 09:37:50 -08:00
adminandGitHub 678a3a1fbe Build with Scala 3 (#4363)
* getting there

* moar

* progress

* a few more dependency fixes

* a bit more is passing

* weird staging thing

* more fixes

* fix another

* fix another

* more fixes

* BattalionC constructor

* moar

* moar

* more

* try a regex, gulp

* fix a bunch

* another exception

* some more tests

* province converter

* fixed a few more

* this is actually making progress

* another dep

* more deps

* more deps

* more

* so slooow

* a few more

* remove an asInstanceOf

* moar

* server builds maybe

* different reflection

* hmm

* get exceptions

* missing deps

* a few more fixes

* moar tests

* a few more

* Moar test fixes

* almost there

* just reflection issues now

* Fix Scala 3 compatibility issues in UnrequestedTextHandlerTest

- Fix ScalaTest import for Scala 3 compatibility: use shouldBe and the from Matchers
- Resolve build error that was preventing all tests from passing

All 200 tests now pass successfully with Scala 3.

* remove reflectiveSelectable

* remove staging dependency

* upgrade migration doc
2025-08-29 08:42:56 -07:00
adminandGitHub 1f4822775b remove cruft from WORKSPACE and reorganize MODULE.bazel (#4360) 2025-08-26 06:59:20 -07:00
adminandGitHub 18d69c5eeb Update rules_scala to 7.0.0 and move to bzlmod (#4358)
* just the basics

* try this

* update one dep and replace remaining io_bazel_rules_scala

* cleanup

* unused deps

* cleanup

* moar
2025-08-26 06:39:22 -07:00
adminandGitHub 6e2fd1520a update apple_support and grpc (#4073) 2025-04-06 06:44:05 -07:00
adminandGitHub 87fdaa1f91 Move grpc-java from being a maven dep to a BCR dep (#3878)
* try using base grpc java

* still no

* move grpc-java from being a maven dep to a BCR dep

* oops
2025-01-04 18:58:27 -08:00
adminandGitHub 66775543d5 Another grpc (#3738)
* update to grpc 1.67

* bad

* still fail

* update rules_scala

* update grpc to 1.67.1 (from 1.53.0)

* 1.69.0

* more going back

* more

* protobuf too

* guess I did need the scalapb changes too

* resolve a couple of dep differences

* update protobuf path for ignoring warnings

* suppress another warning in parallel_hashmap

* another explicit dep

* delete, don't comment out
2025-01-02 12:35:31 -08:00
adminandGitHub 2132f3992b Update grpc maven deps to 1.68 (from 1.66) (#3747)
* update maven grpc modules to 1.68.0 (from 1.66.0)

* update maven grpc deps to 1.68
2024-10-11 21:11:33 -07:00
adminandGitHub e55d8686a0 Update main game to use AWS sdk v2, since v1 is deprecated (#3708)
* update S3Utils.scala to use aws sdk v2

* slf4j

* works
2024-09-16 21:32:35 -07:00
adminandGitHub a0c629f3bf put netty back in (#3704) 2024-09-15 15:26:59 -07:00
adminandGitHub eb32b21e57 more outdated libs (#3703) 2024-09-15 11:37:28 -07:00
adminandGitHub 8ff1335326 update Scala to 2.13.14 (from 2.13.12) (#3702)
* update Scala to 2.13.14 (from 2.13.12)

* rules_scala to newer version to support 2.13.14
2024-09-15 11:34:39 -07:00
adminandGitHub 3dcceb021b remove explicit netty imports (#3701)
* remove explicit netty imports

* remove, not just uncomment
2024-09-15 11:04:32 -07:00
adminandGitHub c0c0f96e25 update grpc and scalapb (#3693)
* with the unapply fixes

* a bunch of pattern match fixes

* fixed most of the failures

* it runs

* fix a couple of tests

* all tests build

* got some tests passing

* all tests passing

* dead code

* more comments

* another

* dead code

* a couple unnecessary ones

* cleanup

* remove guava dep
2024-09-14 08:35:16 -07:00
adminandGitHub 6e7e5805b1 update scalapb to 0.11.17 (from 0.11.13) (#3691) 2024-09-09 19:09:16 -07:00
adminandGitHub 22b3e8d18c Rules jvm (#3210)
* upgrade rules_jvm to 6.0 (from 5.3)

* update lock file
2024-02-15 07:42:55 -08:00
adminandGitHub 9f4c5c17ee update plugins (#3107) 2023-12-14 17:13:24 -08:00
adminandGitHub 35fef3b924 move rules_jvm_external import to use bzlmod and upgrade to 5.3 (from 4.2) (#2983) 2023-10-14 08:44:40 -07:00
adminandGitHub fee7caba21 upgrade scalapb (#2973) 2023-10-06 06:53:02 -07:00
adminandGitHub d435ab6425 upgrade scala to 2.13.12 (#2960) 2023-09-22 06:43:04 -07:00
adminandGitHub f2f3620adb Query parameters support all male or all female names (#2312)
* Support query parameters for all male or all female names

* Use the APIGateway response too

* Cleanup


Former-commit-id: aae671ee7015ddc02bae1b8ea9d4454677dbe454
2022-11-18 19:49:22 -08:00
adminandGitHub 9d938d91a3 Lambda name generator (#2311)
* Start building aws handler for name generator

* JVM name generator


Former-commit-id: c1d4835db9f429dd61d01d53a7493da6ef7da812
2022-11-18 19:06:48 -08:00
adminandGitHub 87c64019c4 upgrade Scala to 2.13.9 (from 2.13.8) and upgrade other deps (#2126)
Former-commit-id: 2078715d0300d32e61effb7d9347980ab62d764f
2022-10-02 10:55:22 -07:00
adminandGitHub 9ef5d5337f ditch maven.google.com which isn't resolving in CI (#1668)
* ditch maven.google.com

* repin without google

* remove comment


Former-commit-id: f1cfac0ac3025e811211944a84600d8fbb661640
2022-05-21 08:33:15 -07:00
adminandGitHub e24f38a889 json4s to 4.0.5 and ditch jackson (#1634)
Former-commit-id: e49f7fc016eb7232d71646744569bd9cc2fda385
2022-04-30 07:58:06 -07:00
adminandGitHub 68364b3977 Upgrade scalamock, scalapb, and netty-tcnative-boringssl-static (#1633)
* scalamock to 5.2.0

* upgrade scalapb

* upgrade netty


Former-commit-id: 51f82f87aadf51c4e0a419e0ceb5ee5ba312c638
2022-04-29 07:28:01 -07:00
adminandGitHub 9846729d2f Upload Eagle saves to Amazon (#1623)
* first use of s3 sdk

* successfully uploading to the right key

* async

* set the content length

* add jaxb

* unused imports


Former-commit-id: 15188b1517dff2054188e6006ae541f650dc0573
2022-04-25 21:51:39 -07:00
adminandGitHub 50103b8d4d switch to rules_jvm_external (#1620)
* add some comments

* move to rules_jvm_external

* fix the tests

* remove old 3rdparty and pin hashes


Former-commit-id: 3afee18102764228b637b906bcd079f7717088a8
2022-04-25 18:44:53 -07:00