deploy-appengine
deploy-appengine copied to clipboard
Deploying only cron.yaml fails on output parsing
TL;DR
When deploying only cron jobs with gcloud app deploy api/cron.yaml --promote the action fails after the cronjobs are deployed.
Expected behavior
The action doesn't fail when successfully deploying only cron jobs.
Observed behavior
The action fails on output parsing, specifically complains about versions field being empty.
Deploying from CLI gives JSON output:
{
"configs": [
"cron"
],
"versions": []
}
Clearly the versions array is empty, but since the cronjobs deploy successfully this is also clearly a valid state to be in.
Action YAML
---
name: staging
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- id: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.STAGING_GCP_CREDENTIALS }}
- name: Deploy cron
uses: google-github-actions/deploy-appengine@v2
with:
deliverables: api/cron.yaml
Log output
Run google-github-actions/deploy-appengine@v2
with:
deliverables: api/cron.yaml
promote: true
Successfully authenticated
Running: gcloud app deploy --quiet --format json api/cron.yaml --promote
Error: google-github-actions/deploy-appengine failed with: failed to parse deploy response: missing or empty "versions", stdout: ***
"configs": [
"cron"
],
"versions": []
***
Additional information
No response
This also happens when deploying a dispatch.yaml.
This action currently only supports services.
It does appear to deploy dispatch.yaml successfully, it just causes the GHA to fail with a spurious error. Any reason it wouldn't support non-service deployments other than this response handling issue?
It's just not something we've had a lot of requests for yet, so it hasn't been prioritized.
@danburkert I am also experiencing the same issue when deploying dispatch.yaml.
Although it's not an ideal solution and more of a temporary fix, downgrading to v1.0.0 resolves the problem. I thought this might help you.