-
Notifications
You must be signed in to change notification settings - Fork 275
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
feat: Add the creation of 'Microsoft.CognitiveServices/accounts/deployments' in Cognitive Service Module - avm/res/cognitive-services/account
#1466
Conversation
avm/res/cognitive-services/account
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.
@AlexanderSehr - I have updated
I tried running the Did I do something wrong? Could you take a look at it, thanks! |
Well would you look at that - I should update the test's description (ref #1489). You did one thing wrong in that dot-sourcing a function requires an invocation with leading separate dot: That being said, I'd recommend to invoke the Set-AVMModule function you can find in the avm/utilities/tools folder. You can invoke it for the module's folder path and should be good to go |
Hey @zedy-wj, we may have a bit of a problem / something I'd need your advice about The PR added a new test for deployments, which is great. The caveat - it doesn't work in our subscription due to the error For the moment this means the deployment did fail and the new module version is not published. PS: I also checked region availability (which could be a concern), but the deployment did try 'WestEurope' and the availability looks good for gpt-35-turbo - 0301. cc: @ilhaan |
@AlexanderSehr - Okay, I suspect that the subscription used in the test does not support this feature. Could you help me verify the above guess in the test subscription? Steps:
When choosing the OpenAI model, I specifically chose |
Hey @zedy-wj, @ilhaan, is that ok with you? Personally, I don't know the CongitiveService resource well enough to judge if there is an easier alternative. If there is no easier solution, I'd strongly suggest to add the above instructions to the deployments test as a comment to help others that face the same issue. Just putting this out there to ensure the service only so hard to maintain as absolutely necessary 😉 cc: @eriqua, @ChrisSidebotham, @jtracey93 for awareness. Exciting times 😄 |
@AlexanderSehr Can we just pick a model we know is available in all regions without extra registration steps? |
Right, that's the ask. Does anybody know of one? 😄 |
@AlexanderSehr Sorry misunderstood your question earlier. @jceval any ideas? |
…yments' in Cognitive Service Module - `avm/res/cognitive-services/account` (Azure#1466) ## Description <!-- >Thank you for your contribution ! > Please include a summary of the change and which issue is fixed. > Please also include the context. > List any dependencies that are required for this change. Fixes Azure#123 Fixes Azure#456 Closes Azure#123 Closes Azure#456 --> Fixes Azure#1131 ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.cognitive-services.account](https://github.com/zedy-wj/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml/badge.svg?branch=fix%2F1131)](https://github.com/zedy-wj/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml) | ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] Update to CI Environment or utlities (Non-module effecting changes) - [x ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x ] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to day with the contribution guide at https://aka.ms/avm/contribute/bicep --> @jongio - for notification. --------- Co-authored-by: zedy <zedy@wicresoft.com> Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
It's likely due to the sub not being on the Azure OpenAI allow list. You can find out more here: https://learn.microsoft.com/en-us/legal/cognitive-services/openai/limited-access You can request here: https://aka.ms/oai/access |
Hey @jongio, |
Unfortunately there's no way around it. How about we disable the test by default? |
Ok, so the resource itself is just for OpenAI. In that case your suggestion may be the way to go. @ilhaan how do you feel about that? Truth be told, I don't exactly like the idea of having code in main that is not tested. cc: @eriqua, @ChrisSidebotham, @jtracey93 (please share if you have some thoughts about this too) Maybe we're in luck and sometime soon this onboarding isn't necessary anymore? 😄 |
@AlexanderSehr I am not a fan of either option, but if I had to pick one, I would go with @jongio's suggestion of disabling the test by default. |
Hey @ilhaan,
cc: @eriqua, @ChrisSidebotham |
Sorry, for me having a test file which is not continuously tested is really the last option. It's too likely to get stale and providing incorrect examples is way worse than not providing them at all. That said, what about the following:
|
Can we have a flag like "Microsoft Test" or something like that. So it is run by our CI, but not by every contributor? |
@AlexanderSehr - Is there anything I can do currently to fix CI so that new version can be published? |
Hi team. We already use these models in our deployments and need to rely on our own modules until this pr gets merged. We always engage customers with a pre-req for a subscription with OpenAI enabled (https://aka.ms/oai/access) - in my opinion that is similar to having to register a resource provider. This module is the last one we need to be able to provision our entire solution on AVM. I really wish you decide to enable OpenAI on the subscription you use for CI, so we can get the final bit of our template done. After all, it can't be too long before OpenAI becomes just another resource that can be activated on a subscription. Under all circumstances, the documentation should align with what is actually available form the current version of the module. The official documentation currently states, that we can do this: But when we try to do that in our deployment, we get the old module from the registry, that does not contain the deployments part of the template module: Our IaC superman had to track the error all the way to this repo before he could figure out, why the module didn't work. In the readme help for our private registry, we add extra information like ekstra requirements in the readme. Something similar could be done on this component. A simple Info box would do. |
…yments' in Cognitive Service Module - `avm/res/cognitive-services/account` (Azure#1466) ## Description <!-- >Thank you for your contribution ! > Please include a summary of the change and which issue is fixed. > Please also include the context. > List any dependencies that are required for this change. Fixes Azure#123 Fixes Azure#456 Closes Azure#123 Closes Azure#456 --> Fixes Azure#1131 ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.cognitive-services.account](https://github.com/zedy-wj/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml/badge.svg?branch=fix%2F1131)](https://github.com/zedy-wj/bicep-registry-modules/actions/workflows/avm.res.cognitive-services.account.yml) | ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] Update to CI Environment or utlities (Non-module effecting changes) - [x ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x ] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to day with the contribution guide at https://aka.ms/avm/contribute/bicep --> @jongio - for notification. --------- Co-authored-by: zedy <zedy@wicresoft.com> Co-authored-by: Alexander Sehr <ASehr@hotmail.de>
Hey @zedy-wj, @jongio I'll bring this up with the team. But I think that would be too far in the other direction as folks should / would need to be able to test it outside AVM. If we get a change in (unrelated to this feature) that would somehow break the feature and set PR would be merged and only validated in AVM, then the pipeline would fail, the code would be in main, and the module not published. @jtracey93 did you have similar cases for any of the features you used to worked on. I'm currently leaning most towards disabling the test (e.g. my manipulating the test file) and rely on manual tests. But this can (and probably) will eventually likely bring us a world of pain - unless - by then deployments can be generally tested. |
I think we just need to get this module published as AI is a hot topic right now. So disabling the test to get the new version out would be my suggestion for short term. Longer term what @eriqua suggested seems pragmatic and a already used approach. I think right now this option suggest by you @AlexanderSehr:
Whilst changing the readme generation logic to also include **I'm also agreeing with @jongio on changing the prefix from |
Hey @jtracey93, // Before
metadata name = 'WAF-aligned'
metadata description = '''This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.'''
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
(...)
}
]
//After
metadata name = 'WAF-aligned'
metadata description = '''
This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
Note: This test case is currently only validated manually.
'''
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: if (true == false) {
(...)
}
] This would only update the readme because of the disclaimer and the However, like @eriqua pointed out this could mean we're providing a potentially stale example over time. So if we don't want to provide it at all, we'd need to disable the test via a rename of the test file and accept that the file is only tested manually. |
100% agree. It's the very unfortunate sideeffect of the PR being merged without the pipeline going through. Something we'll only be able to prevent in the future by enabling contributors to test in our environment (which is on the roadmap, but is no low-hangning fruit) |
@zedy-wj will be working on a PR now
I had to resort to the option that essentially disables the test yet keeps the readme afterall. Reason being that we have a static tests that enforces a What I did not instead was to
It's not perfect, but I think it's better than pretending nothing is going on. |
Description
Fixes #1131
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.@jongio - for notification.