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

4/26 release: Up with --repo/--browse, exec (ssh) command, replica commands, log streaming commands #72

Merged
merged 168 commits into from
Apr 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
0bfdddd
Skeleton code
calvinsID Feb 3, 2022
16afa69
az containerapp env show
calvinsID Feb 3, 2022
2323591
List kube/managed environments
calvinsID Feb 3, 2022
9397d54
Create kube environment, wait doesn't work yet
calvinsID Feb 4, 2022
4fa3771
Update containerapp stubs (check if it is supported now)
calvinsID Feb 4, 2022
0d7ce56
Containerapp env delete, polling not working yet
calvinsID Feb 4, 2022
055907f
Added polling for create and delete
calvinsID Feb 4, 2022
31b2415
Use Microsoft.App RP for show, list, delete command
calvinsID Feb 5, 2022
232512f
Create containerapp env using Microsoft.App RP
calvinsID Feb 6, 2022
baf19b4
Add optional containerapp env create arguments
calvinsID Feb 8, 2022
76f62ba
Remove old kube environment code, naming fixes
calvinsID Feb 8, 2022
12524a7
Containerapp create almost done
calvinsID Feb 11, 2022
99a3d38
Done containerapp create, except for --yaml. Need to test
calvinsID Feb 11, 2022
1c74c2e
Containerapp show, list
calvinsID Feb 11, 2022
3c0c501
Fix helptext
calvinsID Feb 11, 2022
958facf
Containerapp delete
calvinsID Feb 11, 2022
2a230f0
Containerapp update. Needs secrets api to be implemented, and testing
calvinsID Feb 14, 2022
c65b264
Add scale command
calvinsID Feb 14, 2022
2901b61
Various validations, small fixes
calvinsID Feb 15, 2022
02cf535
listSecrets API for updates, autogen log analytics for env
calvinsID Feb 18, 2022
fbd6407
Use space delimiter for secrets and env variables
calvinsID Feb 24, 2022
6513981
Verify sub is registered to Microsoft.ContainerRegistration if creati…
calvinsID Feb 25, 2022
bacf864
Containerapp create --yaml
calvinsID Feb 23, 2022
9777c5f
Fix updating registry to do create or update
calvinsID Feb 23, 2022
71e9c9b
Fix containerapp update command. Add image-name parameter to support …
calvinsID Feb 23, 2022
5e3888a
started update with --yaml. Need to do create or update for when an a…
calvinsID Feb 23, 2022
b419f8d
use space delimiter for startup_command and args, instead of comma de…
calvinsID Feb 24, 2022
84c56b5
Traffic weights
calvinsID Mar 1, 2022
07cae9d
List and show revisions
calvinsID Feb 24, 2022
7df8730
az containerapp revision restart, activate, deactivate
calvinsID Feb 24, 2022
43897cc
Add ability for users to clear args/command in az containerapp update
calvinsID Mar 3, 2022
7a380e3
Various fixes, traffic weights fixes
calvinsID Mar 3, 2022
983af7c
Verify subnet subscription is registered to Microsoft.ContainerServices
calvinsID Mar 4, 2022
328683b
GitHub Actions Update (#17)
runefa Mar 8, 2022
0f582e0
Remove --location since location must be same as managed env
calvinsID Mar 8, 2022
d4272d8
Add options for flag names: --env-vars and --registry-srever
calvinsID Mar 8, 2022
42519dc
Empty string to clear env_vars
calvinsID Mar 8, 2022
8caebc7
Default revisions_mode to single
calvinsID Mar 8, 2022
11e7fe0
Infer acr credentials if it is acr and credentials are not provided
calvinsID Mar 8, 2022
85fd0f5
fix help msg
calvinsID Mar 8, 2022
6bf5a56
if image is hosted on acr, and no registry server is supplied, infer …
calvinsID Mar 9, 2022
25e1250
Added subgroups (Ingress, Registry, Secret) and updated revisions (#18)
runefa Mar 11, 2022
22e428c
More p0 fixes (#20)
calvinsID Mar 11, 2022
e12b19c
Update help text (#21)
anthonychu Mar 14, 2022
abece41
New 1.0.1 version
calvinsID Mar 14, 2022
7d8b9ba
Added identity commands + --assign-identity flag to containerapp crea…
runefa Mar 14, 2022
bc8c58b
Dapr Commands (#23)
runefa Mar 14, 2022
869c11b
Rename --image-name to --container-name
calvinsID Mar 14, 2022
0857b6b
Remove allowInsecure since it was messing with the api parsing
calvinsID Mar 14, 2022
a0acb01
Fix for env var being empty string
calvinsID Mar 14, 2022
0f4f385
Rename to --dapr-instrumentation-key, only infer ACR credentials if -…
calvinsID Mar 14, 2022
144ce57
Remove az containerapp scale
calvinsID Mar 14, 2022
3b01ec6
Fix delete containerapp errors
calvinsID Mar 14, 2022
b671af3
Remove ingress, dapr flags from az containerapp update/revision copy
calvinsID Mar 14, 2022
df1ae0b
Fix revision list -o table
calvinsID Mar 14, 2022
9962e29
Help text fix
calvinsID Mar 14, 2022
ef031f4
Bump extension to 0.1.2
calvinsID Mar 14, 2022
a26df8c
Update managed identities and Dapr help text (#25)
anthonychu Mar 15, 2022
ea45ec8
Env var options + various bug fixes (#26)
runefa Mar 16, 2022
43acd4b
Fixed style issues, various bug fixes (#27)
runefa Mar 18, 2022
a607ed9
Update src/containerapp/azext_containerapp/tests/latest/test_containe…
runefa Mar 18, 2022
9652f3e
Specific Error Types + Bugfixes (Help, remove app-subnet-resource-id,…
runefa Mar 21, 2022
46b5a94
Reset to 0.1.0 version, remove unneeded options-list
calvinsID Mar 21, 2022
a8e75ba
Update min cli core version
calvinsID Mar 21, 2022
c1288b7
Fixed style issues. (#30)
runefa Mar 21, 2022
d4fbdae
Fix linter issues
calvinsID Mar 21, 2022
48f2eb9
Use custom-show-command
calvinsID Mar 21, 2022
f19323f
Removed --ids from revision, secret, registry list.
Mar 21, 2022
0f402d8
Add linter exclusions
calvinsID Mar 21, 2022
8f006f1
Fix polling on delete containerapp
calvinsID Mar 21, 2022
f259b6f
Fix error handling
calvinsID Mar 21, 2022
c96f1e5
Add Container App Service
calvinsID Mar 21, 2022
3b823cf
Fix flake linter
calvinsID Mar 21, 2022
0e5552d
Fix help text
calvinsID Mar 22, 2022
51c540b
Mark extension as preview
calvinsID Mar 22, 2022
ff2ba40
Add python 3.9 and 3.10 as supported
calvinsID Mar 22, 2022
c45cbd0
Remove registries and secrets from az containerapp update, in favor o…
calvinsID Mar 22, 2022
126878c
Fix YAML not working
calvinsID Mar 22, 2022
e64cbef
Move import to inside deserialize function
calvinsID Mar 22, 2022
40d112c
Dapr moved from Template to Configuration
calvinsID Mar 22, 2022
bade2b1
Use aka.ms link for containerapps yaml
calvinsID Mar 22, 2022
0922c68
Updated dapr enable/disable to current spec.
Mar 22, 2022
2badc74
Fixed oversight.
Mar 22, 2022
2bf3686
Remove revisions-mode from containerapp update
calvinsID Mar 23, 2022
eec4e1a
Fixed dapr enable property names. (#47)
runefa Mar 23, 2022
c43d1ca
Fix exceptions with using --yaml in containerapp create/update
calvinsID Mar 23, 2022
a0e7ca1
Rename history msg
calvinsID Mar 24, 2022
5f68333
Include fqdn in containerapp table output
calvinsID Mar 24, 2022
0b6fb6f
Added ingress messages.
Mar 23, 2022
2f07b6e
Revert history msg
calvinsID Mar 24, 2022
ad6ff27
Add basic test case
calvinsID Mar 24, 2022
a4d1ec2
Remove managed-identity support for first release of CLI
calvinsID Mar 24, 2022
b0aab4f
Need to investigate test flakiness
calvinsID Mar 24, 2022
5d0bef3
Update _help.py
panchagnula Mar 25, 2022
03ed09a
Added prototype of container up.
Mar 29, 2022
5797a89
Fixed deploy from acr registry image infer credentials issue.
Mar 29, 2022
9910366
Tried to add source.
Mar 30, 2022
c8e460e
Added acr build.
Mar 31, 2022
52abab9
Finished acr build functionality.
Mar 31, 2022
4a71bb8
Added acr create functionality and pull registry from existing contai…
Mar 31, 2022
bcb1954
Fixed bugs.
Apr 1, 2022
7dae662
Check if rg exists and create one with name if it doesn't.
Apr 1, 2022
cddad94
initial containerapp ssh implementation
StrawnSC Apr 4, 2022
b2f8909
Merge branch 'main' into containerapp-ssh
StrawnSC Apr 4, 2022
3d9c67a
fix interactive commands (vim); handle ctrl + c instead of exiting
StrawnSC Apr 4, 2022
c8130a4
fix style and linter issues
StrawnSC Apr 5, 2022
d94a36d
Added disable verbose. Moved utils into utils.py.
Apr 5, 2022
581d629
fix for ssh for windows clients
StrawnSC Apr 5, 2022
2ca69cd
fix for unix
StrawnSC Apr 5, 2022
dadc702
Disable verbose now uses sdk poller so it gives running animation.
Apr 5, 2022
a7c880a
Added helps for params. Added error handling for non acr registry pas…
Apr 6, 2022
9eea137
Updated disable_warnings ignore. Removed disable_warnings from update…
Apr 6, 2022
5bc365d
add terminal resizing
StrawnSC Apr 6, 2022
d0271f7
reorganize code; implement terminal resizing, add startup command par…
StrawnSC Apr 6, 2022
19d91bb
organize code, remove token from warning output
StrawnSC Apr 6, 2022
06088cd
add validations, add replica commands
StrawnSC Apr 7, 2022
668082b
use the correct API for fetching default container; remove is_preview
StrawnSC Apr 7, 2022
5b2b3c6
Renamed silent to quiet.
Apr 7, 2022
bba0599
Fixed style issues.
Apr 7, 2022
99fb00f
add log streaming, bump version number and add to HISTORY.rst
StrawnSC Apr 7, 2022
5a6e739
add basic ssh test
StrawnSC Apr 8, 2022
b8315bc
Added workspace name and fqdn to dry_run_str. Added indicators of if …
Apr 8, 2022
45faea7
fix ssh test for windows
StrawnSC Apr 8, 2022
0329a53
Check RP for location when not provided. Open Dockerfile and use EXPO…
Apr 8, 2022
dc8953f
fix windows arrow keys after exit
StrawnSC Apr 8, 2022
fe28fce
fix typo, add logstream test, remove token from logstream output
StrawnSC Apr 8, 2022
51a868f
Removed print statement.
Apr 11, 2022
429fbaa
Updated dockerfile expose automatic ingress feature.
Apr 11, 2022
402f6df
Removed dry run str, added dry run obj instead.
Apr 11, 2022
337a454
use bearer auth; fix --command bug
StrawnSC Apr 12, 2022
74fe23b
add handling for smooth transition to new URL path
StrawnSC Apr 12, 2022
6021037
Merge branch 'main' into containerapp-ssh
StrawnSC Apr 12, 2022
8e81c93
Merged main.
Apr 12, 2022
f53be71
Fixed merge conflict.
Apr 12, 2022
f114468
fix merge conflicts
StrawnSC Apr 12, 2022
2f3e8b3
Create env if name passed and it doesn't exist.
Apr 13, 2022
45dd7f8
Added missing import from merge.
Apr 13, 2022
dd38d8d
Merge pull request #2 from haroonf/demo
StrawnSC Apr 13, 2022
3380c63
Added prototype for new environment workflow.
Apr 13, 2022
8fbf360
Finished environment logic.
Apr 14, 2022
c65196f
Minor updates before demo.
Apr 15, 2022
67d6858
add 'az containerapp github up' (wip)
StrawnSC Apr 17, 2022
43fb1a4
merge calvinsid/main and resolve conflicts
StrawnSC Apr 17, 2022
4f04ac9
various fixes for demo
StrawnSC Apr 17, 2022
125d56f
rearrange github up code
StrawnSC Apr 19, 2022
78f1bf0
merge haroonf/containerappup
StrawnSC Apr 19, 2022
0e86947
merge haroonf/containerappup
StrawnSC Apr 19, 2022
ac98e1c
finish merge
StrawnSC Apr 19, 2022
6b03b8f
Merge branch 'calmain' into github-up-demo
StrawnSC Apr 19, 2022
3e1dca2
start up refactor
StrawnSC Apr 20, 2022
3526d67
add --repo to up and refactor up
StrawnSC Apr 20, 2022
057bdc1
reorganize code more; fix various bugs
StrawnSC Apr 21, 2022
4a16e17
fix linter issues, fix lingering exec/tail improvements
StrawnSC Apr 21, 2022
1e80127
update history
StrawnSC Apr 21, 2022
dd84735
update output
StrawnSC Apr 21, 2022
e8c3c34
bug fixes for --repo
StrawnSC Apr 21, 2022
16bf2b8
fix --source bug
StrawnSC Apr 21, 2022
a877444
fix --source
StrawnSC Apr 21, 2022
0f49ce0
minor bug fixes
StrawnSC Apr 21, 2022
e886ea4
Added API change.
Apr 21, 2022
bfcace8
Finished API change, added helloworld image auto ingress, checked pro…
Apr 21, 2022
b3aae19
fixes for sisira's comments
StrawnSC Apr 21, 2022
78b1c50
fix minor typo
StrawnSC Apr 21, 2022
0ba7185
bug fix where commands fail if providing registry creds
StrawnSC Apr 22, 2022
39dad3d
Merged.
Apr 22, 2022
b0061f3
Merge pull request #4 from haroonf/APIChanges
runefa Apr 22, 2022
c7e07db
Fixed style issues.
Apr 22, 2022
ba1d01e
Updated help and version text.
Apr 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes for sisira's comments
StrawnSC committed Apr 21, 2022
commit b3aae19ace335ee9df9ed8e4f4bb8348096b36cd
2 changes: 1 addition & 1 deletion src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
Release History
===============

0.4.0
0.3.2
++++++
* Create or update a container app and all associated resources (container app environment, ACR, Github Actions, resource group, etc.) with 'az containerapp up'
runefa marked this conversation as resolved.
Show resolved Hide resolved
* Open an ssh-like shell in a Container App with 'az containerapp exec'
6 changes: 3 additions & 3 deletions src/containerapp/azext_containerapp/_clients.py
Original file line number Diff line number Diff line change
@@ -367,7 +367,7 @@ def list_replicas(cls, cmd, resource_group_name, container_app_name, revision_na
resource_group_name,
container_app_name,
revision_name,
PREVIEW_API_VERSION)
STABLE_API_VERSION)

r = send_raw_request(cmd.cli_ctx, "GET", request_url)
j = r.json()
@@ -395,7 +395,7 @@ def get_replica(cls, cmd, resource_group_name, container_app_name, revision_name
container_app_name,
revision_name,
replica_name,
PREVIEW_API_VERSION)
STABLE_API_VERSION)

r = send_raw_request(cmd.cli_ctx, "GET", request_url)
return r.json()
@@ -410,7 +410,7 @@ def get_auth_token(cls, cmd, resource_group_name, name):
sub_id,
resource_group_name,
name,
PREVIEW_API_VERSION)
STABLE_API_VERSION)

r = send_raw_request(cmd.cli_ctx, "POST", request_url)
return r.json()
10 changes: 5 additions & 5 deletions src/containerapp/azext_containerapp/_help.py
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@

helps['containerapp exec'] = """
type: command
short-summary: Open an SSH-like interactive shell within a container app replica (pod)
short-summary: Open an SSH-like interactive shell within a container app replica
examples:
- name: exec into a container app
text: |
@@ -132,7 +132,7 @@

helps['containerapp logs show'] = """
type: command
short-summary: Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one revision, replica (pod), and container.
short-summary: Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one revision, replica, and container.
examples:
- name: Fetch the past 20 lines of logs from an app and return
text: |
@@ -148,12 +148,12 @@
# Replica Commands
helps['containerapp replica'] = """
type: group
short-summary: Manage container app replicas (pods)
short-summary: Manage container app replicas
"""

helps['containerapp replica list'] = """
type: command
short-summary: List a container app revision's replicas (pods)
short-summary: List a container app revision's replica
examples:
- name: List a container app's replicas in the latest revision
text: |
@@ -165,7 +165,7 @@

helps['containerapp replica show'] = """
type: command
short-summary: Show a container app replica (pod)
short-summary: Show a container app replica
examples:
- name: Show a replica from the latest revision
text: |
8 changes: 3 additions & 5 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ def load_arguments(self, _):

with self.argument_context('containerapp exec') as c:
c.argument('container', help="The name of the container to ssh into")
c.argument('replica', help="The name of the replica (pod) to ssh into. List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.")
c.argument('replica', help="The name of the replica to ssh into. List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.")
c.argument('revision', help="The name of the container app revision to ssh into. Defaults to the latest revision.")
c.argument('startup_command', options_list=["--command"], help="The startup command (bash, zsh, sh, etc.).")
c.argument('name', name_type, id_part=None, help="The name of the Containerapp.")
@@ -44,21 +44,20 @@ def load_arguments(self, _):
c.argument('tail', help="The number of past logs to print (0-300)", type=int, default=20)
c.argument('container', help="The name of the container")
c.argument('output_format', options_list=["--format"], help="Log output format", arg_type=get_enum_type(["json", "text"]), default="json")
c.argument('replica', help="The name of the replica (pod). List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.")
c.argument('replica', help="The name of the replica. List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.")
c.argument('revision', help="The name of the container app revision. Defaults to the latest revision.")
c.argument('name', name_type, id_part=None, help="The name of the Containerapp.")
c.argument('resource_group_name', arg_type=resource_group_name_type, id_part=None)

# Replica
with self.argument_context('containerapp replica') as c:
c.argument('replica', help="The name of the replica (pod). ")
c.argument('replica', help="The name of the replica. ")
c.argument('revision', help="The name of the container app revision. Defaults to the latest revision.")
c.argument('name', name_type, id_part=None, help="The name of the Containerapp.")
c.argument('resource_group_name', arg_type=resource_group_name_type, id_part=None)

# Container
with self.argument_context('containerapp', arg_group='Container') as c:
# c.argument('image', type=str, options_list=['--image', '-i'], help="Container image, e.g. publisher/image-name:tag.")
c.argument('container_name', type=str, help="Name of the container.")
c.argument('cpu', type=float, validator=validate_cpu, help="Required CPU in cores from 0.25 - 2.0, e.g. 0.5")
c.argument('memory', type=str, validator=validate_memory, help="Required memory from 0.5 - 4.0 ending with \"Gi\", e.g. 1.0Gi")
@@ -225,7 +224,6 @@ def load_arguments(self, _):
c.argument('name', configured_default='name', id_part=None)
c.argument('managed_env', configured_default='managed_env')
StrawnSC marked this conversation as resolved.
Show resolved Hide resolved
c.argument('registry_server', configured_default='registry_server')
c.argument('dryrun', help="Show summary of the operation instead of executing it.")
c.argument('source', type=str, help='Local directory path to upload to Azure container registry.')
c.argument('image', type=str, options_list=['--image', '-i'], help="Container image, e.g. publisher/image-name:tag.")
c.argument('browse', help='Open the app in a web browser after creation and deployment, if possible.')
6 changes: 3 additions & 3 deletions src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ def is_int(s):
return False


def await_github_action(cmd, token, repo, branch, name, resource_group_name, timeout=300):
def await_github_action(cmd, token, repo, branch, name, resource_group_name, timeout_secs=300):
from .custom import show_github_action
from github import Github
from time import sleep
@@ -187,7 +187,7 @@ def await_github_action(cmd, token, repo, branch, name, resource_group_name, tim
sleep(1)
animation.tick()

if (datetime.utcnow() - start).seconds >= timeout:
if (datetime.utcnow() - start).seconds >= timeout_secs:
raise CLIInternalError("Timed out while waiting for the Github action to start.")

animation.flush()
@@ -202,7 +202,7 @@ def await_github_action(cmd, token, repo, branch, name, resource_group_name, tim
animation.tick()
status = [wf.status for wf in workflow.get_runs() if wf.id == run_id][0]
animation.flush()
if (datetime.utcnow() - start).seconds >= timeout:
if (datetime.utcnow() - start).seconds >= timeout_secs:
raise CLIInternalError("Timed out while waiting for the Github action to start.")

if status != "completed":
2 changes: 1 addition & 1 deletion src/containerapp/setup.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.

VERSION = '0.4.0'
VERSION = '0.3.2'


# The full list of classifiers is available at