-
Notifications
You must be signed in to change notification settings - Fork 767
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
ADR: Process for publishing the AZ provider types (alpha) #11757
Comments
This folder changes very frequently - I'd possibly consider having a lower bound for how frequently we push updates to avoid having an overwhelming number of versions published. |
I think we can publish the |
Would this preclude using GitHub actions or policies? I don't believe any of our existing automation can watch an external repo for changes, so we might need to write a custom bot to achieve this. |
What is the usecase for the |
Isn't this in contradiction with the final "desired state" point? Or is "desired state" larger than the scope of this ADR. Might be worth clarifying that. |
I'm skeptical that such a heuristic exists. Why not use something that can always be reliably calculated (e.g., date-based versioning)? |
I think |
I think it makes sense to use ORAS to start with, but I think eventually we will need to generalize the ability to publish providers. At which point, I think we will need to add a new verb to Bicep CLI that accomplishes the same thing but is also capable of performing additional validation on the type provider content that is specific to our scenario. (For example, validating the types JSON.) |
I would also clarify that this workflow needs to be testable, to validate we're pushing out the correct format. |
Agreed. I already have a PR to add to modules. |
As discussed, it would be helpful to clarify that this isn't the desired state of this proposal - rather the eventual desired state. It would be helpful to explain the desired state for this proposal as part of the doc. |
Really don't want to see us with another apiVersion type of non-semantic versioning where you can't tell at all whether there are supposed to be breaking changes or not. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Process for publishing the az provider types (alpha)
Date: 2023-09-07
Status
Draft
Context
The goal of this ADR is to formally describe the recommended process for publishing the az resource types provider
as an OCI artifact for the purpose of dynamic loading as described in proposal #10662 (previously accepted by the Bicep maintainers) for an alpha milestone.
This means some concrete process so we can publish experimental az types packages so we can inform our decisions moving forward.
Current State
In the current state we have two workflows that are executing in the repository.
main
. Builds thegenerator
and its dependencies and publishes a NuGetpackage with the Azure resource type definitions.
main
branch from the
azure/azure-rest-api-specs
repo, runs the generation script on the snapshot and commits the result to the/generated
folder in theautogenerate
orazure/bicep-types-az/tree/autogenerate-<git-commit-ish>
branches depending on the trigger (a '<git-commit-ish>
' is a truncated commit sha256 digest)When a new version of the Bicep is released, the person cutting the release performs the following steps:
main
or manually trigger the update-types.ymlworkflow to update the
/generated
folder. This will update the definitions stored in/generated
in themain
branch and triggerthe build.yml workflow which in turn will publish a NuGet package with a bumped version.
Bicep.Core.csproj
file in theazure/bicep
repo to the new packageversion
azure/bicep
The current process allow us to catch the odd regression before impacting any customers (e.g. the time where we accidentally deleted all of the types for Microsoft.Compute)
Desired State (For Alpha)
az-types-provider-package
OCI artifact each time theres a change in theazure/bicep-types-az/tree/main/generated folder.
Azure/bicep-types-az
and the OCI registry artifact with a version0.0.X-alpha
whereX
is corresponding tothe topological distance, measured as count of commits made on the folder since the first publication (
0.0.1-alpha
).Out of Scope
Proposed Changes
We propose to add a new workflow
publish-az-provider-to-registry.yml
that triggers on push tomain
that will publish an OCI artifact to the bicep public registry (syndicated with MCR).The workflow will:
/generated
folder with the state of the previous version.X-alpha
version by one if a change is detected.azure/bicep-types-az
commit with the new version..json
files in the/generated
folder into a.tgz
fileaz-types-provider-package
artifact to the Bicep public registry under the following prefix:bicep/providers
(e.g.mcr.microsoft.com/bicep/providers/az:1.0.0
). The tag for the OCI artifact will match the semantic version.The OCI types provider artifact structure
A resource types provider artifact MUST conform to the following requirements:
Decision
Consequences
The text was updated successfully, but these errors were encountered: