Skip to content

deploy@v2 silently drops inactivity_sleep from app spec (outdated godo dependency) #274

Description

@naskio

Summary

When deploying with digitalocean/app_action/deploy@v2, the inactivity_sleep field in the app spec is not sent to DigitalOcean. The field is present in the YAML file but is missing from the deployed app spec.

The same spec works correctly when applied via the DigitalOcean control panel App Spec editor.

Environment

  • Action: digitalocean/app_action/deploy@v2
  • Validation: doctl apps spec validate (via digitalocean/action-doctl@v2)
  • App spec field: inactivity_sleep.after_seconds (Scale to Zero / inactivity sleep)

Steps to reproduce

  1. Add inactivity_sleep to a service in .do/app.yaml:
services:
  - name: my-service
    # ... other service config ...
    inactivity_sleep:
      after_seconds: 600
  1. Run doctl apps spec validate .do/app.yaml — passes successfully.
  2. Deploy with digitalocean/app_action/deploy@v2 and app_spec_location pointing at the same file.
  3. Fetch the deployed spec (e.g. doctl apps spec get <app-id>) or check the App Spec in the control panel.

Expected: inactivity_sleep is present in the deployed app spec.

Actual: inactivity_sleep is absent from the deployed app spec.

Control panel comparison

Scale to Zero was enabled on my account after requesting access from DigitalOcean support. When I add inactivity_sleep directly in the web UI App Spec editor and deploy, the setting persists and works as expected. The issue appears specific to the GitHub Action deploy path, not to the feature itself or my account access.

Root cause (suspected)

deploy@v2 depends on github.com/digitalocean/godo v1.165.1 (see go.mod). Support for InactivitySleep was added in godo v1.174.0 (#946).

Because AppServiceSpec in v1.165.1 has no InactivitySleep field, yaml.Unmarshal in deploy/main.go silently ignores inactivity_sleep when parsing the spec file. The API request is sent without the field.

Meanwhile, current doctl releases ship with a much newer godo (≥ v1.174.0), which explains why doctl apps spec validate accepts the field but the deploy action does not forward it.

Suggested fix

Bump github.com/digitalocean/godo to ≥ v1.174.0 (ideally aligned with current doctl, e.g. v1.194.x), run go mod tidy, and cut a new release.

Impact

This affects any private-preview or recently added app spec fields that exist in newer godo versions but not in v1.165.1. The failure is silent — no error is raised during deploy — which makes it easy to miss.

Workarounds

  • Apply the spec via doctl apps update instead of the deploy action
  • Fork app_action, bump godo, and use the fork until upstream is updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions