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

Remove circular shared source references in Azure.Core tests files #38607

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

annelo-msft
Copy link
Member

@annelo-msft annelo-msft commented Sep 11, 2023

One of the issues contributing to #27337 is that generated libraries reference shared source files that exist in both azure-sdk-for-net and autorest.csharp repos. This can make modifying these files challenging because a library may reference a shared file from azure-sdk-for-net but rely on the version in the autorest.csharp repo. Since generated code cannot be updated in the same PR, generated libraries can break when the azure-sdk-for-net files are modified first.

One approach to solving this is to have generated libraries use shared source files from the generator package. This would allow the following:

  1. Modifying azure-sdk-for-net files without breaking generated libraries
  2. Picking up changes in the autorest.csharp repo updating generated code to use them
  3. Regenerating azure-sdk-for-net libraries to use the updated versions from the autorest.csharp package

An advantage of this approach is that now code changes flow in a single direction.

Achieving this state is prevented today by some circular references in our test projects in Azure.Core. Azure.ResourceManager is a generated client library, so must depend on shared source files from autorest.csharp. But the Azure.Core.Tests and Azure.Core.TestFramework projects have a dependency on Azure.ResourceManager, so they must use those shared source files too. But, they need to be able to test changes made to the first iteration of shared source files in the azure-sdk-for-net repo. This cannot be achieved in the current state.

This PR removes the dependency of Azure.Core.Tests and Azure.Core.TestFramework projects on the Azure.ResourceManager project. It moves test assets and tests related to Azure.ResourceManager into the Azure.ResourceManager.Tests project directly.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@annelo-msft annelo-msft merged commit 35ce212 into Azure:main Sep 12, 2023
61 checks passed
m-nash added a commit that referenced this pull request Sep 14, 2023
* Revert "update api"

This reverts commit ae54d7d.

* Revert "remove serialization"

This reverts commit 748872b.

* Release v1.11.1 (#38602)

* [Event Hubs] September 2023 Release Prep (#38604)

The focus of these changes is to prepare the core Event Hubs library for
the September 2023 release.

* Sync eng/common directory with azure-sdk-tools repository (#38606)

* Don't allow setting Variant to Variant (#38592)

* Don't allow setting Variant to Variant

* pr fb

* Allow As<T> to return null for reference types (#38611)

* Allow As<T> to return null for reference types

* Improve cast exception message

* [Communication]Enable managed identity in ACScommunication resource sdk (#37566)

* Update autorest mark down to latest OpenApi spec

* initial code generation with new Swagger spec hash

* remove bugged format and generate code

* update spec link to remote link

* Adding test scenario for MI

* Update Export Api

* Update to most recent spec hash

* Update Sample Snippets

* Add Managed Identity tests session records assets

* Re-enforce resourceId format

* updated test recording

* updated recordings

* updated-recordings

* fix tests and Update test recordings

* Update changelog release history

* Provide backward compatibility to accomodate breaking change

* remove param from fallback overload

* Update customize folder with communication service resource data

* fix build issues

* fix build issues

* export api to support older resource data

* fix build issues

* Update release date of `1.2.0-beta.2`

---------

Co-authored-by: Joel Enikanorogbon <joelen@microsoft.com>
Co-authored-by: Jorge Beauregard <jbeauregardb@microsoft.com>
Co-authored-by: Mingzhe Huang <archerzz@users.noreply.github.com>

* Increment package version after release of Microsoft.Azure.WebJobs.Extensions.SignalRService (#38618)

* Increment package version after release of Azure.ResourceManager.Communication (#38617)

* Increment package version after release of Azure.Messaging.EventHubs (#38627)

* [Event Hubs] September 2023 Release Prep (non-core) (#38605)

The focus of these changes is to prepare the Event Hubs processor and
function extensions libraries for the September 2023 release.

* Remove circular shared source references in Azure.Core tests files (#38607)

* Initial reshuffle

* Second reshuffle

* nits

* fix

* [SignalR extensions] Release v1.11.2 (#38623)

* Release v1.11.2

* Fix test issue

* STG 90 GA release prep (#38631)

* Fix release date for Confidential Ledger (#38629)

* Increment version for eventhub releases (#38632)

* Increment package version after release of Microsoft.Azure.WebJobs.Extensions.EventHubs

* Increment package version after release of Azure.Messaging.EventHubs.Processor

* [AppConfig] Update API Compat version (#38628)

The focus of these changes is to update the API Compat target after the 1.2.1 release.

* Prepare for release (#38612)

* Prepare for release

* change log

* Increment package version after release of Azure.Communication.JobRouter (#38641)

* Increment version for storage releases (#38642)

* revert some unexpected sample configuration changes (#38619)

* Update AutoRest C# version to 3.0.0-beta.20230912.3 (#38653)

* Increment package version after release of Azure.Security.ConfidentialLedger (#38644)

* update version to patch (#38646)

* Update dockerfile for net6.0 (#38645)

* NonDisposingStream: delegate remaining Stream APIs to inner stream (#38184)

* [App Config] Snapshot API Updates Based on Arch Board Feedback (#38650)

 [App Configuration] Updates in snapshot API

* Fix casing on some events (#38674)

* Legacy checkpoint support (#38546)

* Sync eng/common directory with azure-sdk-tools for PR 6895 (#38672)

* Add legacy moniker migration logic

* Add functionality from Java testing

---------

Co-authored-by: Daniel Jurek <djurek@microsoft.com>

* .NET-specific changes: Move deprecated packages to legacy (#36194)

* First cut at migrating to legacy moniker

* Update-PackageMonikers.ps1

* Refinement

* Update docindex.yml for testing

* Rename

* ToC fixes

* Refactor namespace discovery

* Remove EnsureNamespaces

* Add "legacy" moniker

* Undo Service-Level-Readme-Automation.ps1 because it is generating incorrect package paths

* Better edge case handling, documentation

* Add fixes to service level overview generation

* Reset eng/common

* docindex changes

* Comment cleanup

* Fix ToC generation tests

* Test cleanup

* Remove unused <IncludeGeneratorSharedCode> MSBuild properties (#38648)

* Remove <IncludeGeneratorSharedCode> MSBuild properties

* revert personalizer

* Increment package version after release of Azure.Messaging.EventGrid (#38682)

* temp fix to release alpha package

* update api

* update code to not add new types

* update code to internalize types

* make model factory customer for now

* update api

* [Document Translation] Fix Document Translation README.md links (#38593)

* Fix Document Translation README.md links

* Remove extra whitespace and remove en-us from links

* Revert mocking link change

* Remove duplicate URL

---------

Co-authored-by: Rango Meadows <v-rameadows@microsoft.com>

* Prepare release for AppService (#38696)

* [WebPubSub] Increase isolated package version and fix a few issues (#38692)

* Increase isolated process package.

* Fix title

* Fixing scaler provider initialization pattern (#38673)

* src, test, and samples projects for DataMovement.Files.Shares (#38678)

* src, test, and samples projects for DataMovement.Files.Shares

* placeholder readme

* remove shared source

* more csproj

* blank changelog

---------

Co-authored-by: yzt <zityang@microsoft.com>
Co-authored-by: Jesse Squire <jsquire@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Anne Thompson <annelo@microsoft.com>
Co-authored-by: Joel Eniqs <32092984+Joeleniqs@users.noreply.github.com>
Co-authored-by: Joel Enikanorogbon <joelen@microsoft.com>
Co-authored-by: Jorge Beauregard <jbeauregardb@microsoft.com>
Co-authored-by: Mingzhe Huang <archerzz@users.noreply.github.com>
Co-authored-by: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com>
Co-authored-by: Christopher Scott <chriss@microsoft.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: Dapeng Zhang <dapzhang@microsoft.com>
Co-authored-by: Reuben Bond <203839+ReubenBond@users.noreply.github.com>
Co-authored-by: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com>
Co-authored-by: Alexey Rodionov <alrod@inbox.ru>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Matthew Meadows (Rango the Dog) <mbmeadows@gmail.com>
Co-authored-by: Rango Meadows <v-rameadows@microsoft.com>
Co-authored-by: Wei Hu <live1206@gmail.com>
Co-authored-by: JialinXin <jixin@microsoft.com>
Co-authored-by: Jocelyn <41338290+jaschrep-msft@users.noreply.github.com>
yaotongms pushed a commit to yaotongms/azure-sdk-for-net that referenced this pull request Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants