Skip to content

Сысолятин Егор Лаб. 1 Группа 6512#104

Open
RYTpL wants to merge 7 commits intoitsecd:mainfrom
RYTpL:lb1_var34
Open

Сысолятин Егор Лаб. 1 Группа 6512#104
RYTpL wants to merge 7 commits intoitsecd:mainfrom
RYTpL:lb1_var34

Conversation

@RYTpL
Copy link
Copy Markdown

@RYTpL RYTpL commented Apr 13, 2026

ФИО: Сысолятин Егор
Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 34
Краткое описание предметной области: Программный проект
Краткое описание добавленных фич: Реализован сервис генерации контрактов на разработку ПО на основе Bogus с кэшированием ответов через IDistributedCache и Redis, структурным логированием через Serilog и оркестрацией через .NET Aspire.

@github-actions github-actions Bot added In progress Код в процессе проверки Lab 1 Лабораторная №1. Кэширование labels Apr 13, 2026
@github-actions github-actions Bot requested a review from Gwymlas April 13, 2026 12:35
Copy link
Copy Markdown

@Gwymlas Gwymlas left a comment

Choose a reason for hiding this comment

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

Для начала вычистить от ненужных проектов: CloudDevelopment.ApiService, CloudDevelopment.Web и так далее
Добавить в Aspire веб-интерфейс redis и клиент Client.Wasm, который шел изначально

@RYTpL
Copy link
Copy Markdown
Author

RYTpL commented Apr 18, 2026

Насколько я понял, вы смотрите не последнюю версию проекта. У меня там нет ни ApiService, ни Web. Есть и redis и Wasm. https://github.com/RYTpL/cloud-development/tree/lb1_var34

@Gwymlas
Copy link
Copy Markdown

Gwymlas commented Apr 23, 2026

CloudDevelopment.ApiService
CloudDevelopment.Web
CloudDevelopment.AppHost
и так далее. Этот код следует подчистить из репозитория, он никак не участвует в решении и является мусорным

В текущем AppHost нет веб-интерфейса для redis по типу redis insight или redis commander и Client.Wasm не запускается:

var builder = DistributedApplication.CreateBuilder(args);


var redis = builder.AddRedis("redis");


builder.AddProject<Projects.GenerationService>("generation-service")
    .WithReference(redis)      
    .WaitFor(redis);            

builder.Build().Run();

egors added 3 commits April 29, 2026 11:44
@RYTpL
Copy link
Copy Markdown
Author

RYTpL commented Apr 29, 2026

Сделал

Copy link
Copy Markdown

@Gwymlas Gwymlas left a comment

Choose a reason for hiding this comment

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

Сейчас клиент не обращается к сервису генерации, исправить
В StudentCard.razor заполнить данные

var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("redis")
.WithRedisInsight(); // ��������� ���-��������� Redis Insight
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Исправить кодировку

.WithReference(redis)
.WaitFor(redis);

builder.AddProject<Projects.Client_Wasm>("client-wasm");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Дождаться запуска сервиса генерации

@@ -0,0 +1,17 @@
<Project Sdk="Aspire.AppHost.Sdk/13.2.2">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Использовать версию Aspire 9.5.2

@@ -0,0 +1,14 @@
namespace GenerationService.Models;

public record SoftwareProjectContract(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Добавить summary

string ProjectManager,
DateOnly StartDate,
DateOnly PlannedEndDate,
DateOnly ActualEndDate,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ActualEndDate по заданию должно быть DateOnly?

Comment thread GenerationService/Program.cs Outdated
var cacheKey = $"contract:{id}";

// Пробуем достать из кэша
var cached = await cache.GetStringAsync(cacheKey);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GetStringAsync и SetStringAsync могут кинуть исключения, надо обернуть в try-catch

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Настроить CORS

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Удалить

Comment thread Services.Contracts/Models/Contract.cs Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Удалить

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Удалить все в Service.Contracts

@RYTpL
Copy link
Copy Markdown
Author

RYTpL commented May 1, 2026

это поправил

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In progress Код в процессе проверки Lab 1 Лабораторная №1. Кэширование

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants