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

Updating alarms feed params does not change scheduled trigger execution #205

Open
duynguyen opened this issue Nov 12, 2020 · 5 comments
Open

Comments

@duynguyen
Copy link

In the manifest.yml file, you can specify schedule cron jobs with trigger feeds and rules.

actions:
    import-users:
      function: actions/import-user/index.js
      runtime: 'nodejs:12'
triggers:
  sync-users:
    feed: /whisk.system/alarms/interval
    inputs: 
      minutes: 1
rules:
  sync-users-rule:
    trigger: sync-users
    action: import-users

After that you might want to update the interval to be 3 minutes instead of 1. Then aio app deploy. After redeployed you can check the info of sync-users trigger. It shows 3 minutes correctly.

{
  "annotations": [
    {
      "key": "whisk-managed",
      "value": {
        ...
      }
    },
    {
      "key": "feed",
      "value": "/whisk.system/alarms/interval"
    }
  ],
  "limits": {},
  "name": "sync-users",
  "namespace": "my-namespace",
  "parameters": [
    {
      "key": "minutes",
      "value": 3
    }
  ],
  "publish": false,
  "rules": {
    "my-namespace/sync-users-rule": {
      "action": {
        "name": "import-users",
        "path": "my-namespace/test-app-alarms-0.0.1"
      },
      "status": "active"
    }
  },
  "updated": 1605187489818,
  "version": "0.0.6"
}

However the trigger is still fired every minute, like it was never updated.

This could be an issue with the alarms package itself, but creating this ticket for triaging purpose.

@meryllblanchet
Copy link

Thanks for raising this up @duynguyen !
Do you know if the configuration might be cached by the alarm package and hence would need to be refreshed somewhere else?

@duynguyen
Copy link
Author

@meryllblanchet , yes that's possible. We might need some inspection in the alarms provider at Runtime level.

@duynguyen
Copy link
Author

This only affects the "alarms related params", e.g. minutes for /whisk.system/alarms/interval, or cron for /whisk.system/alarms/alarm. Other params are updated properly with aio rt trigger update command as well as aio app deploy after manifest change.

@meryllblanchet
Copy link

Thanks for the update @duynguyen . Can you reproduce it using wsk CLI?

@moritzraho
Copy link
Member

this does works with the wsk CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants