-
Notifications
You must be signed in to change notification settings - Fork 11
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
K-14 list and set context (introduced configobj) #66
Conversation
…4-list-contexts # Conflicts: # cli/kaos_cli/commands/build.py
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.
Potential NameError
runtime bug, string formatting and use of print
s.
@ms-shankar - can you please commit and push your changes to the |
User Testing Session (No. 1)I performed a fresh install of kaos.
|
@ms-shankar - ➜ kaos build list
Warning - No active builds found. Please run kaos build deploy to deploy an environment
➜ kaos build deploy -c DOCKER -vy
Aborting - kaos backend is already built.
➜ kaos destroy -c DOCKER -vy
Warning - Unknown error: KeyError('DOCKER') |
Worked after force-build. You might want to include this in the CHANGELOG, a user out there might have to do a force-rebuild of their backend once they upgrade their kaos installation to your latest changes. ➜ kaos build deploy -c DOCKER -vyf
Apply complete! Resources: 1 added, 0 changed, 1 destroyed.
Info - Endpoint successfully set to http://localhost:80/api/
Info - Successfully built kaos environment ➜ kaos build list
+-------+---------+----------+-------+
| index | context | provider | env |
+-------+---------+----------+-------+
| 0 | DOCKER | DOCKER | local |
+-------+---------+----------+-------+ ➜ kaos destroy -c DOCKER -vy
Destroy complete! Resources: 21 destroyed.
Info - Successfully destroyed kaos environment
|
Build backend on DOCKER: ➜ kaos build deploy -c DOCKER -vy
...
Apply complete! Resources: 21 added, 0 changed, 0 destroyed.
Info - Endpoint successfully set to http://localhost:80/api/
Info - Successfully built kaos environment Get list of builds: ➜ kaos build list
+-------+---------+----------+-------+
| index | context | provider | env |
+-------+---------+----------+-------+
| 0 | DOCKER | DOCKER | local |
+-------+---------+----------+-------+ Deploy backend on AWS: ➜ kaos build deploy -c AWS -vy
...
Workspace "prod" already exists
Switched to workspace "prod".
...
module.registry.null_resource.build_push_tag[1]: Refreshing state... [id=676301818431185394]
Error: Failed to load config (; default context): invalid configuration: no configuration has been provided
on ../../../../../../../Ahmad/Workspace/kaos/infrastructure/aws/envs/__working_prod/config.tf line 13, in provider "kubernetes":
13: provider "kubernetes" {
...
module.registry.null_resource.build_push_tag[0]: Refreshing state... [id=3237394661645997731]
Error: Failed to load config (; default context): invalid configuration: no configuration has been provided
on ../../../../../../../Ahmad/Workspace/kaos/infrastructure/aws/envs/__working_prod/config.tf line 13, in provider "kubernetes":
13: provider "kubernetes" {
Warning - Unknown error: FileNotFoundError(2, 'No such file or directory') |
There is some weird behavior going on with ➜ kaos build list
+-------+---------+----------+-------+
| index | context | provider | env |
+-------+---------+----------+-------+
| 0 | DOCKER | DOCKER | local |
+-------+---------+----------+-------+ Destroy the backend➜ kaos destroy -c DOCKER -vy
...
Destroy complete! Resources: 21 destroyed.
Info - Successfully destroyed kaos environment After successful destroy,
|
The earlier failure cases were due to incomplete deployments which were caused by stale infrastructure state configurations. The following test case scenarios were tested from my side (DOCKER + GCP stage):
|
Tried to trick
|
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.
kaos destroy
command broke after pipenv update
:
➜ kaos build list
+-------+---------+----------+-------+
| index | context | provider | env |
+-------+---------+----------+-------+
| 0 | DOCKER | DOCKER | local |
+-------+---------+----------+-------+
➜ tree .kaos
.kaos
├── config
└── state
├── AWS
│ └── dev
│ └── None
└── DOCKER
├── config.json
└── terraform.tfstate
4 directories, 4 files
➜ kaos destroy -c DOCKER -vy
Warning - Unknown error: KeyError('None')
The issue discovered above pertains to a failed deployment from the previous run. But while trying to simulate the reported issue another issue was discovered during destroy, which was:
|
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.
kaos build set
fails with an uncaught error when there is no backend built
➜ kaos build list
Warning - No active builds found. Please run kaos build deploy to deploy an environment
➜ kaos build set -i 0
Warning - Unknown error: TypeError('sequence item 2: expected str instance, NoneType found')
…builds exist for list before deploy
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.
kaos train deploy
is broken after refactor:
➜ kaos build deploy -c DOCKER -vy
...
Apply complete! Resources: 21 added, 0 changed, 0 destroyed.
Info - Endpoint successfully set to http://localhost:80/api/
Info - Successfully built kaos environment
➜ kaos build list
+-------+---------+----------+-------+
| index | context | provider | env |
+-------+---------+----------+-------+
| 0 | DOCKER | DOCKER | local |
+-------+---------+----------+-------+
➜ kaos workspace create -n mnist
Info - Successfully set mnist workspace
➜ kaos template get --name mnist
Info - Successfully loaded mnist template
➜ kaos train deploy -s templates/mnist/model-train \
-d templates/mnist/data
Warning - Missing endpoint! Please set with - kaos init
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.
kaos workspace set
is broken due to an uncaught exception
➜ kaos workspace list
+-----+-------+
| ind | name |
+-----+-------+
| 0 | mnist |
+-----+-------+
➜ kaos workspace set -i 0
Warning - Unknown error: TypeError('list indices must be integers or slices, not str')
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.
kaos workspace kill
doesn't work anymore
➜ curl -X POST localhost/serve-mnist-ba1759/invocations \
--data-binary @templates/mnist/test_payload.jpg
{"result":[3]}
➜ kaos workspace kill
Warning - Are you sure about killing all mnist resources? [y/N]: y
in delete
Warning - Unknown error: TypeError("remove() got an unexpected keyword argument 'workspace'")
…igobj was introduced
The issue with workspace set by index is not due to the introduction of configobj added in this PR. However, this issue has now been resolved. The second issue with the workspace kill is due to the introduction of configobj and has now been adjusted to work correctly. |
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.
I re-tested the Quickstart Guide, AWS Deployment as well as all previously discovered bugs; the issues are now solved. GCP deployments didn't go through but that has to do with some infrastructure issues that @ms-shankar has to look through.
LGTM.
Description
Closes issue 14 and issue 80
Checklist