-
Notifications
You must be signed in to change notification settings - Fork 1
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
Chat and Charts #104
Open
urumo
wants to merge
16
commits into
master
Choose a base branch
from
feature/chat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Chat and Charts #104
+2,044
−8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduced new configuration files `aspirate-state.json` and `manifest.json` to manage project settings, container images, secrets, and resource definitions. Added `docker-compose.yaml` to define and configure services for `aspire-dashboard`, `cache`, `nats`, `pg`, `clickhouse`, `smtpdev`, `argon-api`, and `argon-entry`, including their environment variables, volumes, ports, and restart policies.
Updated `aspirate-state.json` to change `outputFormat` from "compose" to "helm". Added Helm chart files: `Chart.yaml` and `values.yaml`. Created Kubernetes resources for various services including `argon-api`, `argon-entry`, `aspire-dashboard`, `cache`, `clickhouse`, `nats`, `pg`, and `smtpdev`. Resources include ConfigMaps, Secrets, Deployments, StatefulSets, and Services.
Introduced new configuration files `aspirate-state.json` and `manifest.json` to manage project settings, container images, secrets, and resource definitions. Added `docker-compose.yaml` to define and configure services for `aspire-dashboard`, `cache`, `nats`, `pg`, `clickhouse`, `smtpdev`, `argon-api`, and `argon-entry`, including their environment variables, volumes, ports, and restart policies.
Updated `aspirate-state.json` to change `outputFormat` from "compose" to "helm". Added Helm chart files: `Chart.yaml` and `values.yaml`. Created Kubernetes resources for various services including `argon-api`, `argon-entry`, `aspire-dashboard`, `cache`, `clickhouse`, `nats`, `pg`, and `smtpdev`. Resources include ConfigMaps, Secrets, Deployments, StatefulSets, and Services.
Modified docker-compose.yaml to comment out PostgreSQL env vars and simplify port mapping. Added ClickHouse packages to Argon.Api.csproj. Updated DatabaseFeature.cs with AddPooledClickhouse method. Enhanced ChannelGrain.cs and IChannelGrain.cs with GetMessages and SendMessage methods. Commented out GrainDirectory attribute in ChannelGrain.cs and ServerGrain.cs. Expanded Channel.cs with new enums and records. Introduced DevController for debug builds. Added empty ClickhouseContext class.
- Updated ClickhouseContext.cs to include new DbSet properties for ArgonMessage, Document, Image, Sticker, and Entity. - Added AddPooledClickhouse<ClickhouseContext>() service in Program.cs. - Added app.MapDefaultEndpoints() and app.MapGet("/") endpoints in Program.cs. - Moved EntityType enum and record types from Channel.cs to ArgonMessage.cs with modifications. - Added MessageId property and ForeignKey attributes to Entity, Sticker, Document, and Image records. - Updated ArgonMessage record to initialize the Image list property.
- Updated ClickhouseContext to use dependency injection and DbSet properties. - Repositioned FileId and added ArgonMessage navigation property in Sticker, Document, and Image records. - Added migration to create necessary tables and define schema. - Generated migration designer and model snapshot files.
Modified migration to use raw SQL for creating indexes with a hash type on various tables. Updated appsettings.json to change the ClickHouse connection string format for better compatibility.
Updated `docker-compose.yaml` to change `CLICKHOUSE_DB` from "postgres" to "argen". Modified `20250202183221_AddedClickhouseContext.cs` migration to use raw SQL for creating tables in ClickHouse. Updated `appsettings.json` to include `Database=argen` in the `clickhouse` connection string. i voobshe naxuy etot bash fluent api kogda delaesh chto-to ne standartnoe
Cleaned up the migration file by removing commented-out code that was previously used to create the `Messages`, `Documents`, `Entities`, `Images`, and `Stickers` tables. Also removed the code for creating indexes on the `CreatorId` column for these tables. This change is part of a refactoring effort to eliminate unused code.
Ensure both ApplicationDbContext and ClickhouseContext are initialized before running the application. This change prepares both contexts for use, likely related to database connections or other initialization tasks.
- Add `IDbContextFactory<ClickhouseContext> click` parameter to `ChannelGrain` constructor - Update `GetMessages` method in `ChannelGrain` to remove `NotImplementedException` and leave empty implementation - Apply minor formatting changes to `State` property initialization in `ChannelGrain` - Remove `ChannelUserChangedStateEvent` enum from `ChannelGrain.cs` - Reformat `Text` property and add `[NotMapped]` `UserName` property to `ArgonMessage` record in `ArgonMessage.cs`
Renamed `DbSet` properties in `ClickhouseContext`: - `Documents` to `MessageDocument` - `Images` to `MessageImage` - `Entities` to `MessageEntity` Updated `ChannelGrain` class: - Made `GetMessages` method asynchronous and added logic to fetch related entities and `UserName` - Implemented `SendMessage` method to save new messages Renamed and modified classes in `ArgonMessage.cs`: - `Entity` to `MessageEntity`, removed `Overwrites` - `Sticker`, removed `Overwrites` - `Document` to `MessageDocument`, removed `Overwrites` - `Image` to `MessageImage`, removed `Overwrites` Updated `ArgonMessage` class: - Changed property types for `Document`, `Image`, and `Entities` - Removed `Overwrites` property
Removed ChannelId property from ArgonMessage record. Changed ReplyToMessage property to nullable Guid?.
- Modified `DevController` to remove `userId` from `GetMessages` endpoint. - Simplified `GetMessages` in `ChannelGrain` by removing `pgCtx` and `UserName` logic. - Updated `SendMessage` in `ChannelGrain` to throw exception for non-text channels and fire `MessageSent` event. - Updated `IChannelGrain` interface to reflect `SendMessage` changes. - Changed `FileId` column type from `UUID` to `String` in migration file and `ClickhouseContextModelSnapshot`. - Added `SendMessage` and `GetMessages` methods to `ServerInteraction` and `IServerInteraction`. - Reformatted records in `ArgonMessage` and changed `FileId` type from `Guid` to `String`. - Added new `MessageSent` event class in `Argon.Streaming.Events`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.