-
Notifications
You must be signed in to change notification settings - Fork 747
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
Prototype: Support for dynamic loading of provider definitions #10624
Conversation
67e79bd
to
34c5c8e
Compare
7a9165d
to
bf3a38f
Compare
src/Bicep.Core.IntegrationTests/Extensibility/TestExtensibilityNamespaceProvider.cs
Outdated
Show resolved
Hide resolved
|
||
public ApiVersionProvider(IFeatureProvider features, IAzResourceTypeLoader resourceTypeLoader) | ||
private readonly IEnumerable<ResourceTypeReference> resourceTypeReferences; | ||
public ApiVersionProvider(IFeatureProvider features, IEnumerable<ResourceTypeReference> resourceTypeReferences) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is laudable here but at the same time unsustainable @majastrz, @anthony-c-martin should we add a ticket to have a framework to test performance so we can apply consistently the necessary checks and also prevent unintended regressions?
src/Bicep.Core.UnitTests/Diagnostics/LinterRuleTests/UseRecentApiVersionRuleTests.cs
Outdated
Show resolved
Hide resolved
....UnitTests/Diagnostics/LinterRuleTests/UseRecentApiVersionRule_InReferenceFunctions_Tests.cs
Outdated
Show resolved
Hide resolved
src/Bicep.Core/Semantics/Namespaces/DefaultNamespaceProvider.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to get a second opinion on the syntax tree in type provider code issue.
Stephens concerns were assuaged by manually testing performance
…/prototype/dynamic-loading
This reverts commit 625341f.
This reverts commit 625341f.
…rt for dynamic loading of provider definitions (#10863) Revert "MAINT: Publish test output so that it can be consumed from wi… Revert "MAINT: Increase default timeout to add stability to ci on MST… Revert "MAINT: Remove config on MSTest (#10831)" Revert "Create Bicep function (LoadEnvironmentVariable) to enableusin… Revert "Formatter v2 part 5: Add test baselines for all data sets (#1… Revert "Support for dynamic loading of provider definitions (#10624[)"] ###### Microsoft Reviewers: [Open in CodeFlow](https://portal.fabricbot.ms/api/codeflow?pullrequest=https://github.com/Azure/bicep/pull/10863) --------- Co-authored-by: Stephen Weatherford <Stephen.Weatherford.com>
Overview
Adds support for loading the 'az' provider dynamically sourced from an OCI artifact registry. The artifact must be restored (downloaded to the appropriate location) manually under
$BicepCacheRootDir/br/mcr.microsoft.com/bicep$providers$az/${providerVersion}
which is the target location in the Bicep cache for theaz
provider.The work to restore the provider data to the cache will be handled in a separate PR for convenience so that reviewing PRs is easier.
To enable the feature
DynamicTypeLoadingEnabled
and must be set to true inbicepconfig.json
:Changes
DynamicTypeLoadingEnabled
AzResourceTypeLoader
that is handling the concern of deciding the provider loader to use based on the feature flag and presence of an import declaration syntax in the Bicep file being processed.ImportDeclarationSyntax
vs using a hardcoded valueFixes #10662
Contributing a feature
Microsoft Reviewers: Open in CodeFlow