You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy the default service (we'll call it frontend) to the GAE project
Deploy the api service to the GAE project
Deploy a 2nd version of the api service to the GAE project
Deploy a 2nd version of the frontend service to the GAE project with maxVersions: 1
When you complete step 4 you will see it delete 2 services instead of 1. One from frontend and one from backend.
If you do the same but switch the deploy order of frontend (default) and backend (such that it's BFFB) then you will see the last step will only delete 1 service.
here is a sample drone where it will delete from other services yaml:
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
image_pull_secrets:
- .dockerconfigjson
steps:
- name: deploy_dev_frontend_default1
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: frontend.yaml #THIS IS THE frontend (default) SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_backend1
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: backend.yaml #THIS IS THE API SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_backend2
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: backend.yaml #THIS IS THE API SERVICE
dir: frontend_src
max_versions: 2
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_frontend_default2
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: frontend.yaml #THIS IS THE frontend (default) SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
Here's a sample of the default an non-default swapped with no issue:
---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
image_pull_secrets:
- .dockerconfigjson
steps:
- name: deploy_dev_backend1
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: backend.yaml #THIS IS THE API SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_frontend_default1
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: frontend.yaml #THIS IS THE frontend (default) SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_frontend_default2
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: frontend.yaml #THIS IS THE frontend (default) SERVICE
dir: frontend_src
max_versions: 2
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
- name: deploy_dev_backend2
pull: if-not-exists
image: nytimes/drone-gae
settings:
action: deploy
app_file: backend.yaml #THIS IS THE API SERVICE
dir: frontend_src
max_versions: 1
project: nyt-project-dev
environment:
GAE_CREDENTIALS:
from_secret: google_credentials_dev
when:
event: [push]
Edit:
I've since confirmed that setting "service: default" in the drone.yaml or in the app.yaml will stop this plugin from deleting versions of all other services. However, that should probably happen without user having to specify.
The text was updated successfully, but these errors were encountered:
I've since confirmed that setting "service: default" in the drone.yaml or in the app.yaml will stop this plugin from deleting versions of all other services.
That's an interesting edge case. service:isn't required for the project's default service in app.yaml, but I wouldn't expect operations on the default service to affect other services.
I suppose we could update the plugin to log a warning if service isn't specified in either the app.yaml or the drone.yaml so that a user knows what's happening.
Do you think it would make sense to fix it so if no service is specified it:
Automatically assumes the service is default (like gcloud does)
Throws an error
Throws a warning
Answer (from Brian):
I think 1 and 2 would be a breaking change in the plugin and require a major version bump, in case anyone is relying on that behavior. I'm not opposed to 1 though, setting service to default if none is specified in app or drone yaml files. If your team wants to PR that or open an issue with the proposed solution we can at least have a conversation about it to see if any other users are opposed to the behavior.
Steps to reproduce:
When you complete step 4 you will see it delete 2 services instead of 1. One from frontend and one from backend.
If you do the same but switch the deploy order of frontend (default) and backend (such that it's BFFB) then you will see the last step will only delete 1 service.
here is a sample drone where it will delete from other services yaml:
Here's a sample of the default an non-default swapped with no issue:
Edit:
I've since confirmed that setting "service: default" in the drone.yaml or in the app.yaml will stop this plugin from deleting versions of all other services. However, that should probably happen without user having to specify.
The text was updated successfully, but these errors were encountered: