8000 Blackout period doesn't work when service and/or tags are NULL · Issue #1977 · alerta/alerta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Blackout period doesn't work when service and/or tags are NULL #1977

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

Open
dvessey-fes opened this issue Aug 8, 2024 · 0 comments
Open

Blackout period doesn't work when service and/or tags are NULL #1977

dvessey-fes opened this issue Aug 8, 2024 · 0 comments

Comments

@dvessey-fes
Copy link

Issue Summary
If a blackout period is created with service and/or tags set to null, it doesn't take effect.

Environment

  • OS: Linux

  • API version: 9.0.1

  • Deployment: self-hosted

  • For self-hosted, WSGI environment: nginx/uwsgi

  • Database: Postgres

  • Server config:
    Auth enabled? Yes
    Auth provider? basic/builtin
    Customer views? No
    (or provide the /config endpoint output)

  • web UI version: Not sure, the latest I believe

  • CLI version: 8.5.2

To Reproduce
Steps to reproduce the behavior:

  1. Create a blackout - using the CLI works here: alerta blackout -E Production -r RES1 --text "blackout testing" --duration 7200
  2. this blackout works - alerts are rejected
  3. Now via python sdk: aconn.update_blackout(id=blackout.id, resource=RES1, endTime=blackout.end_time + datetime.timedelta(hours=6)`)
  4. Now when alerts are sent for this resource, the blackout DOESN'T work

Expected behavior
This seems like a data validation issue - not sure where/how it should be handled though. probably at the update_blackout / REST endpoint layer?

Screenshots
NA

Additional context
Noticed in the DB blackouts table that the service/tags column were NULL on these non-functioning blackouts, while others were set to empty array {}. Manually updated a specific blackout to set those values and then the blackout started working again.

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

1 participant
0