Comments (13)
Another [semi-related] thing I just thought of (which probably also needs manual validation) is that if something can be done in the template, it must be done in the template, not in the script. And trying to avoid having too many scripts/modules that are working around issues in the platform (e.g. replication) - though admittedly I struggle with some of these...
The CI probably cannot help here, since checking if a script is doing something unnecessary requires domain knowledge. IMHO it must be done as part of the module proposal / code review process.
from bicep-registry-modules.
I wonder if we should leave the implementation of idempotency tests to the deployment-script module authors. What we can do is to ask them to provide Boolean outputs in the
main.test.bicep
file to assert scripts1.output.x == script2.outputs.x (if outputs.x should be idempotent). The CI can check if the outputs are true after deploying the test file.
I like this idea (and second your point about doing this for all RPs not just scripts)... Though I also wonder if we should just leave it to a manual review - given we'd have to for the domain knowledge of the scenario (i.e. is this possible in a template without a script) we could do it for idempotency as well... I think it's at least worth trying manually - see how many we get, how hard the problem is, before we try to automate it...
from bicep-registry-modules.
FYI @bmoore-msft
from bicep-registry-modules.
Good suggestion. I can modify our CI to repeat the deployment step for main.test.bicep
.
from bicep-registry-modules.
The other part of it though will be ensuring the result is the same...
from bicep-registry-modules.
The other part of it though will be ensuring the result is the same...
Agreed, but I don't if that's possible. What-If seems to be the right tool to use, but the results can be noisy for some RPs...
from bicep-registry-modules.
I think the goal of idempotency is that you get the same output with the same input... If we can't verify that, then not sure how much value the test will have - probably greater than zero, but doesn't tell you if it's a good script or not.
what-if won't tell you anything about the script part of the deployment script, or rather - what it's doing/changing.
from bicep-registry-modules.
We should be able to compare the results of script.properties.outputs
on run one and run two, right? Brian, do you think that covers it?
from bicep-registry-modules.
that will certainly help - but what if the script just does stuff - and/or has no outputs? I think #62 just copied images. Granted that one is pretty easy to "check" but still has to be done manually...
I think all of the things we can do have some merit - just need to be aware of the cost/benefit and how much it can really tell us.
Another [semi-related] thing I just thought of (which probably also needs manual validation) is that if something can be done in the template, it must be done in the template, not in the script. And trying to avoid having too many scripts/modules that are working around issues in the platform (e.g. replication) - though admittedly I struggle with some of these...
from bicep-registry-modules.
I thought we were talking about all resource types in general. If it is for deployment scripts only, comparing the outputs of the script requires the module author to export the script outputs as template level outputs of the test Bicep file. It also doesn't work if the outputs depend on some dynamic values (like timestamps).
from bicep-registry-modules.
Brian also raised a good point...
from bicep-registry-modules.
I wonder if we should leave the implementation of idempotency tests to the deployment-script module authors. What we can do is to ask them to provide Boolean outputs in the main.test.bicep
file to assert scripts1.output.x == script2.outputs.x (if outputs.x should be idempotent). The CI can check if the outputs are true after deploying the test file.
from bicep-registry-modules.
Dear @bmoore-msft , Azure Verified Modules (AVM) will become the single Microsoft standard for Bicep modules. Transitioning to AVM, requests for new features or bug fixes will need to be submitted against the appropriate AVM module via AVM Module Issues.
For bugs or new features with existing modules in the /modules
directory of this repository, we encourage you to first try the AVM equivalent module if available and if the module is lacking any features, you can file an AVM Module Issue. If the module is not available yet, you can file a new AVM Module Proposal.
See this informational notice for more details on the upcoming changes.
Thank you for your understanding!
from bicep-registry-modules.
Related Issues (20)
- [AVM Module Issue]: deploying a sub with all resource providers throws error in rg "rsg-australiasoutheast-ds | Deployments" The sku Sku: Standard_ZRS, Kind: StorageV2 is not available in zone. (Code: SkuUnavailableInZone HOT 3
- [AVM Module Issue]: Add storage account service endpoints to output to use for other modules HOT 3
- [AVM Module Issue]: adding private.endpoint on an existing privateLinkService fails, GroupId cannot be empty. HOT 2
- [Failed pipeline] avm.res.search.search-service HOT 3
- [AVM Module Issue]: avm/res/insights/scheduled-query-rule implement "alertDisplayName" property HOT 3
- [AVM Module Issue]: Setting up 'AvailabilityZones' is not supported in Sku :'Developer' HOT 4
- [AVM Module Issue]: dns-zone nameServers output HOT 2
- [Failed pipeline] avm.res.portal.dashboard HOT 2
- [Failed pipeline] avm.res.network.connection HOT 3
- [Failed pipeline] avm.res.managed-identity.user-assigned-identity HOT 3
- [Failed pipeline] avm.res.synapse.workspace HOT 2
- [Failed pipeline] avm.res.automation.automation-account HOT 3
- [Failed pipeline] avm.res.databricks.workspace HOT 2
- [Failed pipeline] avm.res.key-vault.vault HOT 2
- [Failed pipeline] avm.res.network.azure-firewall HOT 2
- [Failed pipeline] avm.res.sql.server HOT 9
- [AVM Module Issue]: Machine Learning Module should add the creation of `Microsoft.MachineLearningServices/workspaces/endpoint` and `Microsoft.MachineLearningServices/workspaces/connections` HOT 5
- [AVM Module Issue]: MySQL Flexible Server Module should add the output `mysqlServer.properties.fullyQualifiedDomainName` HOT 2
- [AVM Module Issue]: DBforPostgreSQL Flexible Servers Private Endpoints HOT 4
- New directory under storage account container HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bicep-registry-modules.