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

Extract Aspire.Hosting.Python.Tests project #4915

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Jul 15, 2024

Contributes to #4294

Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 15, 2024
{
options.ProjectDirectory = Path.GetFullPath(projectDirectory);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this property is internal, and we don't want to use InternalsVisibleTo for extension tests. So I used reflection instead

@eerhardt eerhardt enabled auto-merge (squash) July 16, 2024 15:26
@radical
Copy link
Member

radical commented Jul 16, 2024

Closed/re-opened to pick up fix from #4932 .

@radical radical enabled auto-merge (squash) July 16, 2024 22:05
# Conflicts:
#	Aspire.sln
#	tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj
@radical radical merged commit cc32ebd into dotnet:main Jul 17, 2024
9 checks passed
radical added a commit to radical/aspire that referenced this pull request Jul 17, 2024
commit 2b3cce9
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:19:27 2024 -0400

    comment

commit 5fe9ab1
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:14:31 2024 -0400

    Add comment, and simple cleanup

commit 610bf1f
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:05:15 2024 -0400

    Add README.md for Shared/RepoTesting

commit 54b2037
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:01:38 2024 -0400

    fix merge

commit a15b208
Merge: 994695a 1f94dac
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:00:13 2024 -0400

    Merge remote-tracking branch 'origin/main' into tests-out-of-repo-targets

    # Conflicts:
    #	tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj

commit 1f94dac
Author: James Newton-King <[email protected]>
Date:   Wed Jul 17 08:42:10 2024 +0800

    Add span links to dashboard UI (dotnet#4805)

commit cc32ebd
Author: Eric Erhardt <[email protected]>
Date:   Tue Jul 16 19:28:21 2024 -0500

    Extract Aspire.Hosting.Python.Tests project (dotnet#4915)

    Contributes to dotnet#4294

commit 994695a
Merge: 065dc6e 6de43ed
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:16:21 2024 -0400

    Merge remote-tracking branch 'origin/main' into tests-out-of-repo-targets

    # Conflicts:
    #	tests/testproject/TestProject.AppHost/TestProject.AppHost.csproj

commit 065dc6e
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:14:22 2024 -0400

    address review feedback from @ eerhardt

commit 1326f38
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:10:54 2024 -0400

    address review feedback from @ eerhardt

commit b41f773
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 18:53:28 2024 -0400

    Update tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj

    Co-authored-by: Eric Erhardt <[email protected]>

commit 1fe6b17
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:38:38 2024 -0400

    Move Directory.Packages.Helix.props to RepoTesting

    .. as it is only used by that.

commit c532b48
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:36:03 2024 -0400

    update docs

commit b591ceb
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:23:45 2024 -0400

    update docs

commit 6a7997f
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:06:47 2024 -0400

    Fix up EndToEnd tests

    - `TestsRunningOutsideOfRepo` now means that the whole project builds
      from source outside the repo.
      - But for `EndToEnd` tests only supporting test project is built in
        that mode.
      - So, update the property and the corresponding `#define` to reflect
        that

    - And track changes from adding the new props/targets

commit 5ca6430
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:18:10 2024 -0400

    Track changes in Aspire.Hosting.Tests

commit 2a92aeb
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:17:50 2024 -0400

    Track changes in Workload tests

commit e577386
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:16:34 2024 -0400

    Remove the redundant Directory.Build.props for various projects

    .. which were there essentially to import Hosting.props/targets .
    Instead, now the `Aspire.Testing.Repo.{props,targets}` are imported by
    default, which decide how to get the hosting targets.

commit 50235a1
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:34:56 2024 -0400

    Extract bits required for running tests outside of repo into

    .. `Aspire.Testing.Repo.{props,targets}`.

    From the comments:
    ```
        This provides support for running tests outside of the repo, for example on a helix agent.
        - For this you need the source of the tests, and any dependencies.
        - Instead of direct `ProjectReferences` to the various Aspire hosting, and component projects use
          `@(ComponentReferenceForTests)`, and @(NonComponentReferenceForTests)`.
          - These are converted to `ProjectReference` when `$(TestsRunningOutsideOfRepo) != true`.
          - But converted to `PackageReference` when `$(TestsRunningOutsideOfRepo) == true`.

        - To allow building such test projects, the build is isolated and patched to build outside the
          repo by adding appropriate `Directory.Build.{props,targets}`, and `Directory.Packages.props`
          - and using a custom `nuget.config` which resolves the Aspire packages from the locally built packages
          - and a `Directory.Packages.Versions.props` is generated with PackageVersions taken from the repo
            - This also adds properties named in `@(PropertyForHelixRun)` from the repo, like `$(NetCurrent)`
    ```

commit edf4b75
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:30:12 2024 -0400

    move out more shared files from workload testing for use in other projects

commit 6e07d55
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:26:08 2024 -0400

    Add new target to generate a Packages.Versions.props with all the relevant properties, and remove old custom tasks

commit 9e519b3
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:24:29 2024 -0400

    Move '_ExtractTestClassNames' target to tests/Directory.Build.targets for more common use

# Conflicts:
#	playground/Directory.Packages.props
#	tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj
#	tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj
#	tests/Shared/RepoTesting/Aspire.Testing.Repo.props
#	tests/Shared/RepoTesting/Aspire.Testing.Repo.targets
@eerhardt eerhardt deleted the ExtractPythonTests branch July 17, 2024 03:18
radical added a commit to radical/aspire that referenced this pull request Jul 17, 2024
commit d5231fd
Author: Ankit Jain <[email protected]>
Date:   Wed Jul 17 15:58:21 2024 -0400

    Combine NonComponentReferenceForTests, and ComponentReferenceForTests into AspireProjectOrPackageReference

commit d805dc9
Author: Ankit Jain <[email protected]>
Date:   Wed Jul 17 15:41:08 2024 -0400

    Rename Aspire.Testing.Repo to Aspire.RepoTesting - feedback from @ eerhardt

commit 45524c3
Merge: 2b3cce9 cd6f024
Author: Ankit Jain <[email protected]>
Date:   Wed Jul 17 15:38:48 2024 -0400

    Merge remote-tracking branch 'origin/main' into tests-out-of-repo-targets

commit cd6f024
Author: Mitch Denny <[email protected]>
Date:   Thu Jul 18 03:21:17 2024 +1000

    Disable local auth for service bus. (dotnet#4938)

commit 752bc58
Author: Mitch Denny <[email protected]>
Date:   Thu Jul 18 03:21:05 2024 +1000

    DisableLocalAuth for AppConfig. (dotnet#4774)

    * DisableLocalAuth for AppConfig.

    * Update playground and test.

commit 54d47fa
Author: MerlinBot <MerlinBot>
Date:   Tue Jul 16 21:21:17 2024 +0000

    This pull request includes baselines **with an expiration date of 180 days from now** automatically generated for your 1ES PT-based pipelines. Complete this pull request as soon as possible to make sure that your pipeline becomes compliant. Longer delays in completing this PR can trigger additional emails or S360 alerts in the future.

    1ES PT Auto-baselining feature helps capture existing violations in your repo and ensures to break your pipeline only for newly introduced SDL violations after baselining. Running SDL tools in break mode is required for your pipeline to be compliant. Go to https://aka.ms/1espt-autobaselining for more details.
    **Please do not Abandon this PR.** Please reach out to 1ES PT for support. More details: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/support

commit 12ad5c3
Author: Tim Mulholland <[email protected]>
Date:   Wed Jul 17 06:31:12 2024 -0700

    Create hover tokens for grid row hover effect (dotnet#4892)

commit 85802db
Author: James Newton-King <[email protected]>
Date:   Wed Jul 17 11:43:37 2024 +0800

    Revert change to always display first endpoint (dotnet#4935)

commit bab8610
Author: James Newton-King <[email protected]>
Date:   Wed Jul 17 11:43:23 2024 +0800

    Add producer-consumer telemetry example to stress app (dotnet#4927)

commit 6ba7b1e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Jul 17 03:05:21 2024 +0000

    Bump the orleans group with 5 updates (dotnet#4914)

    * Bump the orleans group with 5 updates

    Bumps the orleans group with 5 updates:

    | Package | From | To |
    | --- | --- | --- |
    | Microsoft.Orleans.Client | `8.1.0` | `8.2.0` |
    | Microsoft.Orleans.Sdk | `8.1.0` | `8.2.0` |
    | Microsoft.Orleans.Clustering.AzureStorage | `8.1.0` | `8.2.0` |
    | Microsoft.Orleans.Persistence.AzureStorage | `8.1.0` | `8.2.0` |
    | Microsoft.Orleans.Server | `8.1.0` | `8.2.0` |

    Updates `Microsoft.Orleans.Client` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Sdk` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Clustering.AzureStorage` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Sdk` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Persistence.AzureStorage` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Server` from 8.1.0 to 8.2.0

    Updates `Microsoft.Orleans.Sdk` from 8.1.0 to 8.2.0

    ---
    updated-dependencies:
    - dependency-name: Microsoft.Orleans.Client
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Clustering.AzureStorage
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Persistence.AzureStorage
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Server
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    - dependency-name: Microsoft.Orleans.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: orleans
    ...

    Signed-off-by: dependabot[bot] <[email protected]>

    * error

    ---------

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Dan Moseley <[email protected]>

commit 3a0e547
Author: James Newton-King <[email protected]>
Date:   Wed Jul 17 09:40:13 2024 +0800

    Fix metrics page (dotnet#4934)

commit 2b3cce9
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:19:27 2024 -0400

    comment

commit 5fe9ab1
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:14:31 2024 -0400

    Add comment, and simple cleanup

commit 610bf1f
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:05:15 2024 -0400

    Add README.md for Shared/RepoTesting

commit 54b2037
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:01:38 2024 -0400

    fix merge

commit a15b208
Merge: 994695a 1f94dac
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 21:00:13 2024 -0400

    Merge remote-tracking branch 'origin/main' into tests-out-of-repo-targets

    # Conflicts:
    #	tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj

commit 1f94dac
Author: James Newton-King <[email protected]>
Date:   Wed Jul 17 08:42:10 2024 +0800

    Add span links to dashboard UI (dotnet#4805)

commit cc32ebd
Author: Eric Erhardt <[email protected]>
Date:   Tue Jul 16 19:28:21 2024 -0500

    Extract Aspire.Hosting.Python.Tests project (dotnet#4915)

    Contributes to dotnet#4294

commit 994695a
Merge: 065dc6e 6de43ed
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:16:21 2024 -0400

    Merge remote-tracking branch 'origin/main' into tests-out-of-repo-targets

    # Conflicts:
    #	tests/testproject/TestProject.AppHost/TestProject.AppHost.csproj

commit 065dc6e
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:14:22 2024 -0400

    address review feedback from @ eerhardt

commit 1326f38
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 19:10:54 2024 -0400

    address review feedback from @ eerhardt

commit b41f773
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 18:53:28 2024 -0400

    Update tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj

    Co-authored-by: Eric Erhardt <[email protected]>

commit 1fe6b17
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:38:38 2024 -0400

    Move Directory.Packages.Helix.props to RepoTesting

    .. as it is only used by that.

commit c532b48
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:36:03 2024 -0400

    update docs

commit b591ceb
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:23:45 2024 -0400

    update docs

commit 6a7997f
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:06:47 2024 -0400

    Fix up EndToEnd tests

    - `TestsRunningOutsideOfRepo` now means that the whole project builds
      from source outside the repo.
      - But for `EndToEnd` tests only supporting test project is built in
        that mode.
      - So, update the property and the corresponding `#define` to reflect
        that

    - And track changes from adding the new props/targets

commit 5ca6430
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:18:10 2024 -0400

    Track changes in Aspire.Hosting.Tests

commit 2a92aeb
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:17:50 2024 -0400

    Track changes in Workload tests

commit e577386
Author: Ankit Jain <[email protected]>
Date:   Tue Jul 16 02:16:34 2024 -0400

    Remove the redundant Directory.Build.props for various projects

    .. which were there essentially to import Hosting.props/targets .
    Instead, now the `Aspire.Testing.Repo.{props,targets}` are imported by
    default, which decide how to get the hosting targets.

commit 50235a1
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:34:56 2024 -0400

    Extract bits required for running tests outside of repo into

    .. `Aspire.Testing.Repo.{props,targets}`.

    From the comments:
    ```
        This provides support for running tests outside of the repo, for example on a helix agent.
        - For this you need the source of the tests, and any dependencies.
        - Instead of direct `ProjectReferences` to the various Aspire hosting, and component projects use
          `@(ComponentReferenceForTests)`, and @(NonComponentReferenceForTests)`.
          - These are converted to `ProjectReference` when `$(TestsRunningOutsideOfRepo) != true`.
          - But converted to `PackageReference` when `$(TestsRunningOutsideOfRepo) == true`.

        - To allow building such test projects, the build is isolated and patched to build outside the
          repo by adding appropriate `Directory.Build.{props,targets}`, and `Directory.Packages.props`
          - and using a custom `nuget.config` which resolves the Aspire packages from the locally built packages
          - and a `Directory.Packages.Versions.props` is generated with PackageVersions taken from the repo
            - This also adds properties named in `@(PropertyForHelixRun)` from the repo, like `$(NetCurrent)`
    ```

commit edf4b75
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:30:12 2024 -0400

    move out more shared files from workload testing for use in other projects

commit 6e07d55
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:26:08 2024 -0400

    Add new target to generate a Packages.Versions.props with all the relevant properties, and remove old custom tasks

commit 9e519b3
Author: Ankit Jain <[email protected]>
Date:   Fri Jul 12 21:24:29 2024 -0400

    Move '_ExtractTestClassNames' target to tests/Directory.Build.targets for more common use

# Conflicts:
#	playground/Directory.Packages.props
#	tests/Directory.Build.props
#	tests/Directory.Build.targets
#	tests/Shared/RepoTesting/Directory.Build.props
#	tests/Shared/RepoTesting/Directory.Build.targets
#	tests/Shared/RepoTesting/README.md
#	tests/testproject/TestProject.AppHost/TestProject.AppHost.csproj
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants