Skip to content
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

Add lab 4 #17

Merged
merged 14 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<PackageVersion Include="OpenTelemetry.Instrumentation.EventCounters" Version="1.5.1-alpha.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
<!-- Grpc -->
<PackageVersion Include="Grpc.AspNetCore" Version="$(GrpcVersion)" />
<PackageVersion Include="Grpc.AspNetCore.Server.ClientFactory" Version="$(GrpcVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.3.24105.21" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ public static async Task<Results<NotFound, PhysicalFileHttpResult>> GetItemPictu
return TypedResults.PhysicalFile(path, contentType, lastModified: lastModified);
}

public static async Task<Results<BadRequest<string>, RedirectToRouteHttpResult, Ok<PaginatedItems<CatalogItem>>>> GetItemsBySemanticRelevance(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
string text)
{
return await GetItemsByName(paginationRequest, services, text);
}

public static async Task<Ok<PaginatedItems<CatalogItem>>> GetItemsByBrandAndTypeId(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"Version": "v1"
}
},
"ConnectionStrings": {
"EventBus": "amqp://localhost"
},
"EventBus": {
"SubscriptionClientName": "Catalog"
},
"CatalogOptions": {
"PicBasePathFormat": "items/{0}/pic/"
}
Expand Down
3 changes: 0 additions & 3 deletions labs/2-Create-Blazor-Frontend/end/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<Nullable>enable</Nullable>
<RootNamespace>eShop.WebApp</RootNamespace>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>

<!-- Disable RZ10021, which is failing due to a Razor bug, according to Mackinnon. -->
<NoWarn>$(NoWarn);RZ10021</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.3.24105.21" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ public static async Task<Results<NotFound, PhysicalFileHttpResult>> GetItemPictu
return TypedResults.PhysicalFile(path, contentType, lastModified: lastModified);
}

public static async Task<Results<BadRequest<string>, RedirectToRouteHttpResult, Ok<PaginatedItems<CatalogItem>>>> GetItemsBySemanticRelevance(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
string text)
{
return await GetItemsByName(paginationRequest, services, text);
}

public static async Task<Ok<PaginatedItems<CatalogItem>>> GetItemsByBrandAndTypeId(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"Version": "v1"
}
},
"ConnectionStrings": {
"EventBus": "amqp://localhost"
},
"EventBus": {
"SubscriptionClientName": "Catalog"
},
"CatalogOptions": {
"PicBasePathFormat": "items/{0}/pic/"
}
Expand Down
3 changes: 0 additions & 3 deletions labs/2-Create-Blazor-Frontend/src/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<Nullable>enable</Nullable>
<RootNamespace>eShop.WebApp</RootNamespace>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>

<!-- Disable RZ10021, which is failing due to a Razor bug, according to Mackinnon. -->
<NoWarn>$(NoWarn);RZ10021</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.3.24105.21" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>
</Project>
8 changes: 0 additions & 8 deletions labs/3-Add-Identity/end/Catalog.API/Apis/CatalogApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ public static async Task<Results<NotFound, PhysicalFileHttpResult>> GetItemPictu
return TypedResults.PhysicalFile(path, contentType, lastModified: lastModified);
}

public static async Task<Results<BadRequest<string>, RedirectToRouteHttpResult, Ok<PaginatedItems<CatalogItem>>>> GetItemsBySemanticRelevance(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
string text)
{
return await GetItemsByName(paginationRequest, services, text);
}

public static async Task<Ok<PaginatedItems<CatalogItem>>> GetItemsByBrandAndTypeId(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
Expand Down
6 changes: 0 additions & 6 deletions labs/3-Add-Identity/end/Catalog.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"Version": "v1"
}
},
"ConnectionStrings": {
"EventBus": "amqp://localhost"
},
"EventBus": {
"SubscriptionClientName": "Catalog"
},
"CatalogOptions": {
"PicBasePathFormat": "items/{0}/pic/"
}
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions labs/3-Add-Identity/end/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<Nullable>enable</Nullable>
<RootNamespace>eShop.WebApp</RootNamespace>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>

<!-- Disable RZ10021, which is failing due to a Razor bug, according to Mackinnon. -->
<NoWarn>$(NoWarn);RZ10021</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,8 +17,4 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.1" />
</ItemGroup>

<ItemGroup>
<Protobuf Include="..\Basket.API\Proto\basket.proto" GrpcServices="Client" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static Uri ResolveIdpAuthorityUri(this ServiceEndPointResolverRegistry re
{
// Sync over async :(
var idpBaseUrl = resolver.ResolveEndPointUrlAsync(serviceName).AsTask().GetAwaiter().GetResult()
?? throw new InvalidOperationException($"Could not resolve IDP address using service name '{serviceName}'.");
?? throw new InvalidOperationException($"Could not resolve IdP address using service name '{serviceName}'.");
var identityUri = GetIdpRealmUri(new Uri(idpBaseUrl), configuration);

return identityUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.3.24105.21" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>
</Project>
8 changes: 0 additions & 8 deletions labs/3-Add-Identity/src/Catalog.API/Apis/CatalogApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ public static async Task<Results<NotFound, PhysicalFileHttpResult>> GetItemPictu
return TypedResults.PhysicalFile(path, contentType, lastModified: lastModified);
}

public static async Task<Results<BadRequest<string>, RedirectToRouteHttpResult, Ok<PaginatedItems<CatalogItem>>>> GetItemsBySemanticRelevance(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
string text)
{
return await GetItemsByName(paginationRequest, services, text);
}

public static async Task<Ok<PaginatedItems<CatalogItem>>> GetItemsByBrandAndTypeId(
[AsParameters] PaginationRequest paginationRequest,
[AsParameters] CatalogServices services,
Expand Down
6 changes: 0 additions & 6 deletions labs/3-Add-Identity/src/Catalog.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
"Version": "v1"
}
},
"ConnectionStrings": {
"EventBus": "amqp://localhost"
},
"EventBus": {
"SubscriptionClientName": "Catalog"
},
"CatalogOptions": {
"PicBasePathFormat": "items/{0}/pic/"
}
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions labs/3-Add-Identity/src/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<Nullable>enable</Nullable>
<RootNamespace>eShop.WebApp</RootNamespace>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>

<!-- Disable RZ10021, which is failing due to a Razor bug, according to Mackinnon. -->
<NoWarn>$(NoWarn);RZ10021</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,8 +16,4 @@
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery.Yarp" Version="8.0.0-preview.3.24105.21" />
</ItemGroup>

<ItemGroup>
<Protobuf Include="..\Basket.API\Proto\basket.proto" GrpcServices="Client" />
</ItemGroup>

</Project>
3 changes: 0 additions & 3 deletions labs/3-Add-Identity/src/WebApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
}
},
"AllowedHosts": "*",
"EventBus": {
"SubscriptionClientName": "Ordering.webapp"
},
"SessionCookieLifetimeMinutes": 60,
"Identity": {
"Enabled": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static Uri ResolveIdpAuthorityUri(this ServiceEndPointResolverRegistry re
{
// Sync over async :(
var idpBaseUrl = resolver.ResolveEndPointUrlAsync(serviceName).AsTask().GetAwaiter().GetResult()
?? throw new InvalidOperationException($"Could not resolve IDP address using service name '{serviceName}'.");
?? throw new InvalidOperationException($"Could not resolve IdP address using service name '{serviceName}'.");
var identityUri = GetIdpRealmUri(new Uri(idpBaseUrl), configuration);

return identityUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.0.0-preview.3.24105.21" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0-alpha.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.6.0-beta.2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.5.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.6.0-beta.3" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.7.0" />
</ItemGroup>
</Project>
Loading
Loading