Skip to content
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

Deploying only cron.yaml fails on output parsing #353

Open
TheEdward162 opened this issue Feb 16, 2024 · 4 comments
Open

Deploying only cron.yaml fails on output parsing #353

TheEdward162 opened this issue Feb 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@TheEdward162
Copy link

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

@TheEdward162 TheEdward162 added the bug Something isn't working label Feb 16, 2024
@danburkert
Copy link

This also happens when deploying a dispatch.yaml.

@sethvargo
Copy link
Member

This action currently only supports services.

@danburkert
Copy link

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?

@sethvargo
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants