doctl icon indicating copy to clipboard operation
doctl copied to clipboard

Serverless triggers are not being deployed

Open davidsbond opened this issue 6 months ago • 4 comments

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:

  • doctl version: 1.101.0-release
  • OS: Ubuntu
  • Installation method: Snap

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 avatar Dec 19 '23 00:12 davidsbond

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

davidsbond avatar Dec 19 '23 01:12 davidsbond

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

andrewsomething avatar Dec 20 '23 21:12 andrewsomething

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

steevehook avatar Dec 31 '23 00:12 steevehook

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 :)

pippinmole avatar Jan 22 '24 21:01 pippinmole