deploy-appengine icon indicating copy to clipboard operation
deploy-appengine copied to clipboard

Deploying only cron.yaml fails on output parsing

Open TheEdda opened this issue 1 year ago • 5 comments

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

TheEdda avatar Feb 16 '24 19:02 TheEdda

This also happens when deploying a dispatch.yaml.

danburkert avatar May 06 '24 18:05 danburkert

This action currently only supports services.

sethvargo avatar May 06 '24 22:05 sethvargo

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?

danburkert avatar May 06 '24 23:05 danburkert

It's just not something we've had a lot of requests for yet, so it hasn't been prioritized.

sethvargo avatar May 07 '24 02:05 sethvargo

@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.

Jay-Pyo avatar Jun 06 '24 10:06 Jay-Pyo