Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 214
Add support for configuring app.yaml options for apps via bundle config#4271
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
279c8cf30c4b7a349a5f5ddfd4fcfc553e217f9fb5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import os | ||
| from flask import Flask | ||
| app = Flask(__name__) | ||
| @app.route("/") | ||
| def home(): | ||
| return "Hello from inline config app!" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| command: | ||
| - python | ||
| - app.py | ||
| env: | ||
| - name: MY_ENV_VAR | ||
| value: test_value_old |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| bundle: | ||
| name: app-inline-config-$UNIQUE_NAME | ||
| resources: | ||
| apps: | ||
| myapp: | ||
| name: $UNIQUE_NAME | ||
| description: my_app_description | ||
| source_code_path: ./app | ||
| config: | ||
| command: ["flask", "--app", "app", "run"] | ||
| env: | ||
| - name: MY_ENV_VAR | ||
| value: test_value | ||
| - name: ANOTHER_VAR | ||
| value: another_value |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/app-inline-config-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> [CLI] apps get-deployment [UNIQUE_NAME] [DEPLOYMENT_ID] | ||
| { | ||
| "command": [ | ||
| "flask", | ||
| "--app", | ||
| "app", | ||
| "run" | ||
| ], | ||
| "env_vars": [ | ||
| { | ||
| "name": "MY_ENV_VAR" | ||
| }, | ||
| { | ||
| "name": "ANOTHER_VAR" | ||
| } | ||
| ] | ||
| } | ||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete resources.apps.myapp | ||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/app-inline-config-[UNIQUE_NAME]/default | ||
| Deleting files... | ||
| Destroy complete! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| envsubst < databricks.yml.tmpl > databricks.yml | ||
| cleanup() { | ||
| trace $CLI bundle destroy --auto-approve | ||
| rm out.requests.txt | ||
| } | ||
| trap cleanup EXIT | ||
| trace $CLI bundle deploy | ||
| APP_NAME=$($CLI bundle summary -o json | jq -r '.resources.apps.myapp.name') | ||
| $CLI bundle run myapp > /dev/null 2>&1 | ||
| DEPLOYMENT_ID=$($CLI apps get "$APP_NAME" | jq -r '.active_deployment.deployment_id') | ||
| echo $DEPLOYMENT_ID:DEPLOYMENT_ID >> ACC_REPLS | ||
| trace $CLI apps get-deployment "$APP_NAME" "$DEPLOYMENT_ID" | jq '{command, env_vars}' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Local = false | ||
| Cloud = true | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
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.
Can we have it on testserver as well? Cloud-only tests are painful to update.
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.
This would be a relatively useless test, as here we are confirming backend behaviour that it overwrites values in app.yaml with whatever is passed to the Deploy call
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 see. However, even if test itself is not useful, having local run means we can regenerate the output quickly with 'make test-update'.
The longer running 'make test-update-aws' skips tests that have Local=true.
Ideally, we are able to update all test output with local runs.