-
Notifications
You must be signed in to change notification settings - Fork 460
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
[Question/Feedback]: Report "breaking" changes when changing paths/names #3988
Comments
In addition, we use the paths to create names for our images in OCI. Naming like this, "config--appsettings" breaks az publish, Start publish on [resourcemodules/web/site/config--appsettings] version [2023-09-20] to registry [****bicepregistrydevcr] ERROR: The specified OCI artifact reference "br:****bicepregistrydevcr.azurecr.io/resourcemodules/web/site/config--appsettings:2023-09-20" is not valid. The module path segment "config--appsettings" is not valid. Each module name path segment must be a lowercase alphanumeric string optionally separated by a ".", "_" , or "-". |
Hey @Palving,
From where I am standing, I would recommend to pause your pipeline for the time being (especially if you're pulling from main as opposed to a stable release) until after the migration concluded. I cannot provide you with an exact timeline, but we hope to conclude the move before the end of the year. We're a bit dependent on the amount of changes we're expected to implement. In any case I want to provide you with a few pointers as to what we know of today:
We're currently working on a PoC for a handful of modules, so you should be able to see the result fairly soon. But again, until the migration is done, I would not recommend to pull in changes on the library-side. I hope that helps to leviate the uncertainty a bit. |
Hello again @Palving, Long story short, if you have an alternative idea we can go with that. I guess one of the other characters would also work (e.g., |
@AlexanderSehr Thanks for the quick reply, we'll adapt our current service and look forward to when all the changes are implemented :) As for the variation modules, it really is a challenging issue, and I remember we had the same issue when we initially began working with bicep and creating our own modules. Working with this repository, I've noticed kind of (but not really) the same issue with the roleassignments modules, where you have created a "main" main-bicep that refers to subfolders depending on the parameters of the main bicep. i.e Could a similar approach be considering for the providers that works the same as config? This would have to work a bit differently than roleassignments, with each "variant" deploying their own type instead of being referenced from the "root"-bicep like in roleAssignment config/ |
Hey @Palving, With the introduction of User Defined Types, we may get around this issue though. In case you're not familiar with that feature: It allows us to define the structure of an object / array. So we may actually be able to define different parameter sets in a single |
User defined types may be the way to go, I cant see any other way to solve this that is not a rough workaround for the contract. Another thing, this might be the wrong place to ask though so let me know if I should open another ticket. I found very little regarding this in the documenation (extenstion resources), but we've had some struggles with our larger bicep files that wraps the resource modules (10-15 resources deployed) because of the conditional resource deployments found in the resource modules. I.e private network, locks etc. We never deploy these, but when the bicep is converted to ARM they get brought along and can possibly create some very large ARM-templates. For example, if I were to deploy an app with roleassignments, I'd rather have a web/deploy.bicep that only deploys the web app, and a roleAssignment/deploy.bicep that deploys roleAssignments to principals to keep things separated and modular instead of conditionally handling roleAssignments via the web/deploy.bicep's parameters. What is the reason behind this design pattern? |
Hey @Palving, Long story short, why did we end up with the pattern we have today:
To get around the template size issues you have a few options which should all be considered workarounds as there is no perfect solution:
|
@AlexanderSehr Thank you for the in depth answers, it's given us a lot more insight into why things are the way they are. One approach we discussed if the size of the ARM-template should become problematic is the possibly of "blacklisting" certain modules from this repository, so that we can create our own versions of them with only the modules we need rather than pulling from here, but we'll cross that bridge when we get to it. Thanks again |
Hey @Palving, |
Hey @Palving, ... while unfortunately not helping with the template size though. Still ;) |
Description
Hello. We currently have an service which daily fetches the bicep modules located in this repository, and we create modules on top of these which we expose to our developers. All these modules are stored in Azure Container Registry.
However, we are experiencing a lot of breaking changes when paths or filenames are renamed, i.e
deploy.bicep -> main.bicep
microsoft.web -> web
microsoft.documentdb -> document-db
We could change things on our side, however the main issue is the uncertanity. Can we expect the current folder structure and namings to be the same going forward?
The text was updated successfully, but these errors were encountered: