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

Per conversation with Billy, let's remove the release gate for unreli… #405

Merged
merged 1 commit into from
Feb 8, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,57 +47,57 @@ jobs:
run: |
dotnet test --no-restore --verbosity normal --filter "Category!=Acceptance"

acceptance-tests:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: |
8.0.x

- name: Install dependencies
run: dotnet restore

- name: Build
run: |
dotnet build --configuration Release --no-restore

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Functions
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Cosmos Event Sourcing
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Container Creation
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
# acceptance-tests:
# needs: build
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@main
# - name: Setup .NET
# uses: actions/setup-dotnet@main
# with:
# dotnet-version: |
# 8.0.x

# - name: Install dependencies
# run: dotnet restore

# - name: Build
# run: |
# dotnet build --configuration Release --no-restore

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Functions
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Cosmos Event Sourcing
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Container Creation
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
80 changes: 0 additions & 80 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

104 changes: 52 additions & 52 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,61 @@ jobs:
run: |
dotnet test --no-restore --verbosity normal --filter "Category!=Acceptance"

acceptance_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: |
8.0.x
- name: Install dependencies
run: dotnet restore

- name: Build
run: |
dotnet build --configuration Release --no-restore

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Functions
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Cosmos Event Sourcing
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"

- name: Prune databases
working-directory: ./tools/CosmosTestHelper
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: dotnet run

- name: Test Container Creation
env:
CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
run: |
dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"
# acceptance_tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@main
# - name: Setup .NET
# uses: actions/setup-dotnet@main
# with:
# dotnet-version: |
# 8.0.x
# - name: Install dependencies
# run: dotnet restore

# - name: Build
# run: |
# dotnet build --configuration Release --no-restore

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Functions
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type!=Container&Type!=CosmosEventSourcing"

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Cosmos Event Sourcing
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=CosmosEventSourcing"

# - name: Prune databases
# working-directory: ./tools/CosmosTestHelper
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: dotnet run

# - name: Test Container Creation
# env:
# CosmosConnectionString: ${{ secrets.COSMOS_INTEGRATION_TEST_CONNECTION_STRING }}
# run: |
# dotnet test --no-restore --verbosity normal --filter "Category=Acceptance&Type=Container"

deploy:
needs:
- acceptance_tests
# - acceptance_tests
- unit_tests
if: github.event.base_ref == 'refs/heads/main'
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public AcceptanceTests(ITestOutputHelper outputHelper)
_changeFeedService = _provider.GetRequiredService<IChangeFeedService>();
}

[Fact]
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
public async Task CosmosEventSourcingTest()
{
ICosmosClientProvider clientProvider =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@

namespace Microsoft.Azure.CosmosRepositoryAcceptanceTests.ChangeFeed;

public class RatingByCategoryChangeFeedProcessor : IItemChangeFeedProcessor<Rating>
public class RatingByCategoryChangeFeedProcessor(
ILogger<RatingByCategoryChangeFeedProcessor> logger,
IRepository<RatingByCategory> ratingByCategoryRepository) : IItemChangeFeedProcessor<Rating>
{
private readonly ILogger<RatingByCategoryChangeFeedProcessor> _logger;
private readonly IRepository<RatingByCategory> _ratingByCategoryRepository;

public RatingByCategoryChangeFeedProcessor(
ILogger<RatingByCategoryChangeFeedProcessor> logger,
IRepository<RatingByCategory> ratingByCategoryRepository)
{
_logger = logger;
_ratingByCategoryRepository = ratingByCategoryRepository;
}
private readonly ILogger<RatingByCategoryChangeFeedProcessor> _logger = logger;
private readonly IRepository<RatingByCategory> _ratingByCategoryRepository = ratingByCategoryRepository;

public async ValueTask HandleAsync(Rating rating, CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ChangeFeedBasicTests(ITestOutputHelper testOutputHelper) : base(testOutpu
_changeFeedService = _provider.GetRequiredService<IChangeFeedService>();
}

[Fact]
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
public async Task Create_Rating_For_Product_Is_Replicated_To_Be_Partitioned_By_Category()
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ namespace Microsoft.Azure.CosmosRepositoryAcceptanceTests;
/// <summary>
/// Required as item options are cached in a static collection, the key is the Type
/// </summary>
public class DisabledOffer : Offer
public class DisabledOffer(string offerType, string createdBy) : Offer(offerType, createdBy)
{
public DisabledOffer(string offerType, string createdBy) : base(offerType, createdBy)
{
}
}

[Trait("Category", "Acceptance")]
[Trait("Type", "Container")]
public class DisabledStrictTypeCheckingTests : CosmosRepositoryAcceptanceTest
public class DisabledStrictTypeCheckingTests(ITestOutputHelper testOutputHelper) : CosmosRepositoryAcceptanceTest(testOutputHelper, DisabledStrictTypeCheckingOptions)
{
private const string OffersDatabaseName = "offers";
private const string OffersContainerName = "offers";
Expand Down Expand Up @@ -50,7 +47,7 @@ public class DisabledStrictTypeCheckingTests : CosmosRepositoryAcceptanceTest
});
};

[Fact]
[Fact(Skip = "In discussing this with Bill, we've decided that this might not be reliable enough to justify having it be a release gate.")]
public async Task GetAsync_BaseClassSetupWithoutStrictTypeChecking_ReturnSubClassesOnlyDeserializedIntoBaseType()
{
try
Expand Down Expand Up @@ -88,8 +85,4 @@ public async Task GetAsync_BaseClassSetupWithoutStrictTypeChecking_ReturnSubClas
await GetClient().UseClientAsync(PruneDatabases);
}
}

public DisabledStrictTypeCheckingTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper, DisabledStrictTypeCheckingOptions)
{
}
}
Loading