Skip to content

Containerapp 0.3.8 Release - #5026

Merged
Xing Zhou (zhoxing-ms) merged 13 commits into
Azure:mainfrom
calvinsID:containerapp-0.3.8
Jul 26, 2022
Merged

Xing Zhou (zhoxing-ms) merged 13 commits into
Azure:mainfrom
calvinsID:containerapp-0.3.8

Conversation

@StrawnSC

Copy link
Copy Markdown
Contributor

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

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.json automatically.
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.

@ghost
ghost requested a review from Yong Zhang (yonzhan) June 21, 2022 20:32
@ghost ghost added the Auto-Assign Auto assign by bot label Jun 21, 2022
@ghost
ghost requested a review from ZelinWang (wangzelin007) June 21, 2022 20:32
@ghost ghost added this to the Jun 2022 (2022-07-05) milestone Jun 21, 2022
@ghost ghost added the ContainerApp label Jun 21, 2022
@yonzhan

Copy link
Copy Markdown
Collaborator

Containerapp

Rune Feisal (oncerune) and others added 8 commits July 15, 2022 12:59
* 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>
@panchagnula

Copy link
Copy Markdown
Contributor

Xing Zhou (@zhoxing-ms) when you are online today could you review this please, we would like to get this payload released soon. Thanks!

Comment thread scripts/ci/credscan/CredScanSuppressions.json
Comment thread src/containerapp/HISTORY.rst Outdated
Comment thread src/containerapp/azext_containerapp/_up_utils.py Outdated
Comment thread src/containerapp/azext_containerapp/_up_utils.py
Comment thread src/containerapp/azext_containerapp/_up_utils.py Outdated
Comment thread src/containerapp/azext_containerapp/_utils.py
@panchagnula

Copy link
Copy Markdown
Contributor

Unrelated to changes on this PR , however, want to understand this code.
what is the purpose of this? Maintaining this means we keep track of any new read_only_attributes added & update this list?
def _remove_readonly_attributes(containerapp_def):
unneeded_properties = [
"id",
"name",
"type",
"systemData",
"provisioningState",
"latestRevisionName",
"latestRevisionFqdn",
"customDomainVerificationId",
"outboundIpAddresses",
"fqdn"
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few Qs/ comments in the chat. haroonf / Silas Strawn (@StrawnSC) please check. Thanks!

@panchagnula

Copy link
Copy Markdown
Contributor

calvin (@calvinsID) please review the changes as well, esp. the update using PATCH. Thanks!

@StrawnSC

Copy link
Copy Markdown
Contributor Author

Unrelated to changes on this PR , however, want to understand this code.
what is the purpose of this? Maintaining this means we keep track of any new read_only_attributes added & update this list?
def _remove_readonly_attributes(containerapp_def):
unneeded_properties = [
"id",
"name",
"type",
"systemData",
"provisioningState",
"latestRevisionName",
"latestRevisionFqdn",
"customDomainVerificationId",
"outboundIpAddresses",
"fqdn"
]

Sisira Panchagnula (@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. calvin (@calvinsID) is that right? (I believe you authored that part if I'm not mistaken since it's in the yaml command)

@calvinsID

Copy link
Copy Markdown
Contributor

Unrelated to changes on this PR , however, want to understand this code.
what is the purpose of this? Maintaining this means we keep track of any new read_only_attributes added & update this list?
def _remove_readonly_attributes(containerapp_def):
unneeded_properties = [
"id",
"name",
"type",
"systemData",
"provisioningState",
"latestRevisionName",
"latestRevisionFqdn",
"customDomainVerificationId",
"outboundIpAddresses",
"fqdn"
]

Sisira Panchagnula (@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. calvin (@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.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the message is copied from portal ;) but "alphabetic character" seems incorrect English to me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message is copied from the API

@panchagnula

Copy link
Copy Markdown
Contributor

Silas Strawn (@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):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deserialization process leaves the json payload to {name: xyz, value: null}. The API returns an error "cannot set secret values to null."

@StrawnSC

Copy link
Copy Markdown
Contributor Author

Silas Strawn (@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?

Sisira Panchagnula (@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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - please do update the comments if possible in this one. & answer the pending Qs

@StrawnSC

Copy link
Copy Markdown
Contributor Author

Xing Zhou (@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

@zhoxing-ms
Xing Zhou (zhoxing-ms) merged commit 8165036 into Azure:main Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot ContainerApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants