digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 397 forks source link

Serverless triggers are not being deployed #1474

Open davidsbond opened 11 months ago

davidsbond commented 11 months ago

Describe the Issue:

Hi! I'm trying to use doctl to deploy a serverless function with a cron trigger. When I run the doctl serverless deploy command my function is deployed but the trigger is not. I do not see a section in my console output for the trigger.

Environment:

Additional Details:

Adding a trace flag provides no additional output. My project file looks like this:

packages:
  - name: jobs
    shared: false
    functions:
       - name: test
         runtime: go:default
         web: false
         triggers:
           - name: cron-trigger
             sourceType: scheduler
             sourceDetails:
               cron: "0 12 * * *"
               withBody: {}
davidsbond commented 11 months ago

Ah, it seems like scheduling doesn't work with go functions. Is this intended behaviour?

andrewsomething commented 11 months ago

@davidsbond I've confirmed with the Serverless team that it is currently the expected behavior. Unfortunately, triggers are not deployed when using remote builds and Go functions are always remote builds. Triggers can be used with Go functions, but they must be created in the control panel for now.

Let's keep this issue open for tracking. Even though it is the current behavior, it is something we should support in the future.

steevehook commented 10 months ago

The Digital Ocean cripling signature. Waiting for a product that actually works as expected

pippinmole commented 10 months ago

Hi,

I'm getting the same behaviour, but with python cron jobs.

packages:
  - name: my_package
    functions:
      - name: my_name
        runtime: python:3.11
        limits:
          memory: 512 # MB
        triggers:
          - name: cron-trigger
            sourceType: scheduler
            sourceDetails:
              cron: "0/15 * * * *" # every 15 minutes

Running:

doctl serverless deploy . --remote-build

And it's not showing up in the dashboard:

image

Environment:

doctl version: 1.103.0-release
OS: Windows

Really looking forward to this being fixed :)