Skip to content

Incorporate grid service websrv into program #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

nikita-petko
Copy link
Contributor

Fixes #340, #341, and #342

~ New assembly: Grid,.Bot.Web, pulls gRPC code out of utility and main app.
~ Remove gRPC server settings from Global and create new provider called Grpc (located grid-bot-settings/grpc)
~ Move custom MS logger adaptor to utility.
1. AvatarApiUrl -> Url for the avatar fetch API.
2. AvatarFetchCacheTraversalInterval -> Interval on which to traverse the avatar fetch cache to search for stale entries.
3. AvatarFetchCacheEntryTtl -> TTL for each avatar-fetch cache entry.
4. AvatarFetchShouldDowngradeBodyColorsFormat -> Determines whether or not body colors are downgraded to pre v2 (v1.1).

~ Drop client-settings-client
~ Add client-settings:
1. ClientSettingsViaVault -> Determines if data access should be via Vault or local JSON files.
2. ClientSettingsVaultMount -> Gets the Vault mount for the client settings.
3. ClientSettingsVaultPath -> Gets the Vault path for the client settings.
4. ClientSettingsVaultAddress -> Gets the vault address for the client settings.
5. ClientSettingsVaultToken -> Gets the vault token for the client settings.
6. ClientSettingsRefreshInterval -> Gets the interval for the refresh ahead within the client settings factory.
7. ClientSettingsFilePath -> Gets the absolute path to the client settings configuration file if ClientSettingsViaVaultis false.
8. ClientSettingsApplicationDependencies -> Resolves the dependency maps for specific application setting
9. PermissibleReadApplications -> A list of application names that can be read from the API endpoints.
10. Gets a command seperated list of API keys that can be used for reading non-permissable applications, as well as executing privalaged commands.

~ Update discord:
1. Update BotToken to not throw if DEBUG and empty.
2. DebugBotDisabled -> Disables logging into the bot.

~ Add web:
1. IsWebServerEnabled -> Determines if the web server is enabled
2. WebServerBindAddress -> Determines the bind address for the web server
3. IsWebServerBehindProxy -> Determines if the web server is nehind a proxy server (e.g. Traefik, HAProxy)
4. WebServerAllowedProxyRanges -> IP ranges that are permitted to set forwarded headers.
5. WebServerUseTls -> Determines if the web server should use TLS.
6. WebServerCertificatePath -> Path for web server cert.
7. WebServerCertificatePassword -> Password for server cert.
8. WebServerLoggerName -> Name for the web server logger
9. WebServerLoggerLevel -> Log level for the web server logger.

~ Bump Discord.Net version.
~ Client settings implementation
1. ClientSettingsFactory -> A factory that provides clients (Client, Grid Server) with sutiable settings from a source such as Vault, S3 or JSON.
2. ClientSettingsNameHelper -> Helper for determing filter statuses, extracting name information such as filter types and data types.
3. FilteredValues -> Normal client settings values, only they are an override to another value for specific places or datacenters.

~ Add utility classes like:
1. LazyWithRetry -> System.Lazy but with retry capabilities
2. RefreshAhead -> Class used for facilitating refresh ahead caching.

~ Add dictionary extensions for merging dictionaries.
~ Bump Discord.Net
~ Drop gRPC references.
~ Very basic implementation of grid-service-websrv, it only supplies what grid servers require.
1. Avatar -> If rbx-thumbnails is disabled, and native grid server character rendering is enabled, this endpoint returns JSON information used for rendering characters (e.g. accoutrements, body colors).
2. Client Settings ->  This contains endpoints for downloading crucial client settings onto grid-servers, this is technically the only required endpoint for grid-servers to function.
3. VersionCompatibility -> Returns an empty array, required otherwise grid-servers would crash.

~ Add middleware:
1. UnhandledExceptionMiddleware -> Similar to the recovery_middleware
2. Numerous metrics collection middleware.

~ Extensions:
1. HttpContext -> Extensions for HTTP context, HTTP requests and HTTP responses.
2. Service provider extensions.
~ Update client settings private command to use client settings factory instead of client settings client

~ Bump Discord.Net
~ Bump Discord.Net
~ Bump Discord.Net
~ Add client settings factory to the service provider.
~ Allow DEBUG builds to bypass token checks
#!components: grid-bot
@nikita-petko nikita-petko merged commit 817088c into master May 13, 2025
6 checks passed
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.

Clean up runner code Port the code for grid-service-websrv to app 2 parter
2 participants