Conversation
|
Containerapp |
* init containerapp version 0.3.7 * Use PATCH API for containerapp update. * Removed double lines. * fix bug * Fix microsoft/azure-container-apps#261 * Fixed issue where containerapp up would not honor --registry-server. (#128) * Fixed issue where containerapp up would not honor --registry-server. * Updated history. Co-authored-by: Haroon Feisal <haroonfeisal@microsoft.com> * bug fix * add tests * fix credscan suppressions * Use constant for acr registry prefix. * Fixed multi-container issue. * Removed comment. * Updated update_containerapp_yaml to use patch. Fixed minor style errors. * Fixed merge conflicts. * Rerecorded necessary tests. * Updated history. * Auto-populate secret values if passed without values. * Fixed bug where the containerapp had no secrets. Co-authored-by: Silas Strawn <strawnsc@gmail.com> Co-authored-by: Haroon Feisal <haroonfeisal@microsoft.com>
…to ci suppressions. Reran tests. (#135) Co-authored-by: Haroon Feisal <haroonfeisal@microsoft.com>
* Fixed yaml breaking change and bug where revision suffix would return invalid if user is adding a container and the previous revision has a revision suffix. * Fixed revision suffix yaml bug. Co-authored-by: Haroon Feisal <haroonfeisal@microsoft.com>
Validate containerapp name.
Fix log stream bug
|
@zhoxing-ms when you are online today could you review this please, we would like to get this payload released soon. Thanks! |
|
Unrelated to changes on this PR , however, want to understand this code. |
|
@calvinsID please review the changes as well, esp. the update using PATCH. Thanks! |
@panchagnula looks like this is needed since we're not using the SDK. The SDK automatically ignores readonly attributes that are set on a model before serializing it. @calvinsID is that right? (I believe you authored that part if I'm not mistaken since it's in the yaml command) |
Yeah this is needed since not using SDK. These properties shouldn't be passed into any PUT/PATCH api, but these properties are introduced from deserialization where normally SDK handles it |
| if not is_valid: | ||
| raise ValidationError(f"Invalid Container App name {name}. A name must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character and cannot have '--'. The length must not be more than 32 characters.") | ||
| raise ValidationError(f"Invalid Container App name {name}. A name must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character and cannot have '--'. The length must not be more than {MAXIMUM_CONTAINER_APP_NAME_LENGTH} characters.") | ||
|
|
There was a problem hiding this comment.
seems like the message is copied from portal ;) but "alphabetic character" seems incorrect English to me.
There was a problem hiding this comment.
This message is copied from the API
|
@StrawnSC - some of my comments are still not completely addressed - ex. adding comments to the helper library, explaining the need for those . & update help for container app name parameter, so that the format requirements are displayed in help docs? |
| return d | ||
|
|
||
|
|
||
| def _populate_secret_values(containerapp_def, secret_values): |
There was a problem hiding this comment.
@haroonf , don't need to change this logic for now, since we need to release the fix.
Can you help me understand the behavior in CLI with YAML here , when CLI parses the YAML with secretName & no value, does the payload to the API translate this object in JSON payload just name property & no value i.e{ name: xyz} or. {name: xyz, value: null}. if it is the former is the PATCH API, setting the value to null or is it cleaning these up because CLI explicitly passes null?
There was a problem hiding this comment.
The deserialization process leaves the json payload to {name: xyz, value: null}. The API returns an error "cannot set secret values to null."
@panchagnula Sorry about that - I must have misread your comment on the help text. Just pushed those changes. @haroonf can you take a look at Sisira's comment above |
panchagnula
left a comment
There was a problem hiding this comment.
LGTM - please do update the comments if possible in this one. & answer the pending Qs
|
@zhoxing-ms could you take a look at this when you get the chance? We've had some customers asking about these fixes for a while |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify
src/index.json.