Skip to content
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

Add ACA dynamic session NodeLTS support in Azure CLI #7843

Merged
merged 31 commits into from
Aug 30, 2024

Conversation

ASHIQUEMD
Copy link
Contributor

@ASHIQUEMD ASHIQUEMD commented Aug 1, 2024

This PR includes below changes.

  • Adding new type NodeLTS for container_type parameter in az containerapp sessionpool create command.

Related command

Create Session Pool

az containerapp sessionpool create \
    --name <session-pool-name> \
    --resource-group <RESOURCE_GROUP> \
    --location westus2 \
    --container-type NodeLTS \
    --max-sessions 100 \
    --cooldown-period 300 \
    --network-status EgressDisabled

Execute Code

az containerapp session code-interpreter execute -n <session-pool-name> -g <RESOURCE_GROUP> --identifier <identifier > --code "console.log(\"inline-synchronous\")" --timeout-in-seconds 30 --session-pool-location northcentralusstage

Scenarios tested

  1. Creating session pool with NodeLTS as container-type
  2. Executed nodejs code using Azure cli 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? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Aug 1, 2024

⚠️Azure CLI Extensions Breaking Change Test
⚠️containerapp
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate containerapp sessionpool create cmd containerapp sessionpool create update parameter container_type: updated property choices from ['CustomContainer', 'PythonLTS'] to ['CustomContainer', 'NodeLTS', 'PythonLTS']

Copy link

Hi @ASHIQUEMD,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

Hi @ASHIQUEMD,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 1, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

github-actions bot commented Aug 1, 2024

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@ASHIQUEMD
Copy link
Contributor Author

Hi @ASHIQUEMD Can you show me where is the code for in terms of code execution, the container type will be derived from the session pool name, so I believe no changes are needed in that area? I check the code but didn't find it. Thanks.

And please add a test for command with argument and new value when the sessionpool name not contains container type: --container-type NodeLTS az containerapp sessionpool create -g {resource_group} -n {sessionpool_name_custom} --container-type NodeLTS

Here is the test

@Greedygre
Copy link
Contributor

About the test failed:
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerapp_env_commands.py::ContainerappEnvScenarioTest::test_containerapp_env_infrastructure_rg
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerapp_nfsazurefile.py::ContainerAppMountNfsAzureFileTest::test_container_app_mount_nfsazurefile_e2e

I will rerun and update the recording files in PR: #7913

@yanzhudd
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

self.cmd('configure --defaults location={}'.format(location))

env_name = self.create_random_name(prefix='aca-sp-env', length=24)
create_containerapp_env(self, env_name, resource_group, TEST_LOCATION)
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need to create env?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @ASHIQUEMD
The env_name is unused, please remove it is not necessary:
The code about creating env at test_containerapp_session_code_interpreter also not needed

@yanzhudd
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd
Copy link
Contributor

please fix the CI issues

@Greedygre
Copy link
Contributor

please fix the CI issues

Hi @yanzhudd
I update the recording files yesterday due to network update their api-version, but they revert their change and break our CI:
Azure/azure-cli@90f7650

What should we do? Thanks

@yanzhudd
Copy link
Contributor

yanzhudd commented Aug 28, 2024

please fix the CI issues

Hi @yanzhudd I update the recording files yesterday due to network update their api-version, but they revert their change and break our CI: Azure/azure-cli@90f7650

What should we do? Thanks

Hi @Greedygre sorry for the inconvenience. Please revert the PR that updated the API version as well.

@Greedygre
Copy link
Contributor

After this PR:#7919 merged, sync main branch the CI will fix.

@Greedygre
Copy link
Contributor

Hi @ASHIQUEMD
Please sync main branch to fix the CI issue.

@zhoxing-ms zhoxing-ms merged commit 1dc8537 into Azure:main Aug 30, 2024
20 checks passed
@ASHIQUEMD ASHIQUEMD deleted the node-cli branch September 2, 2024 09:33
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.

8 participants