Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Demo obfuscation for alerts API
Browse files Browse the repository at this point in the history
  • Loading branch information
Debanjan Dey authored and Debanjan Dey committed Dec 29, 2021
2 parents 079b64c + 53fbd8d commit 1bc2609
Show file tree
Hide file tree
Showing 69 changed files with 29,202 additions and 13,059 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
frontend
.env
docker
.venv
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FLASK_APP=run
FLASK_ENV=production
FLASK_DEBUG=0
FLASK_RUN_PORT=5000
SECRET_KEY=not-so-secret
SECRET_KEY="t8GIEp8hWmR8y6VLqd6qQCMXzjRaKsx8nRruWNtFuec="
SEND_FILE_MAX_AGE_DEFAULT=31556926
DB_HOST=localhost
DB_USERNAME=postgres
Expand All @@ -33,6 +33,9 @@ CACHE_DEFAULT_TIMEOUT=1
# Number of last checkpoints to retrieve in Task Monitor
TASK_CHECKPOINT_LIMIT=1000

# Version identification
CHAOSGENIUS_VERSION_POSTFIX=git

# === airbyte env vars start here ===
VERSION=0.29.12-alpha

Expand Down Expand Up @@ -137,3 +140,4 @@ MAX_ANOMALY_SLACK_DAYS=14
DAYS_OFFSET_FOR_ANALTYICS=2

SENTRY_DSN=
CHAOSGENIUS_ENTERPRISE_EDITION_KEY=
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ exclude =
docs,
frontend,
sandbox
max-complexity = 10
max-complexity = 10
docstring-convention = google
63 changes: 63 additions & 0 deletions .github/workflows/docker-build-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI to Docker hub [Dev-only latest tag]

on:
workflow_dispatch:

jobs:
docker-build-webapp:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: chaosgenius/chaosgenius-webapp
tags: latest

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: frontend
push: true
tags: ${{ steps.meta.outputs.tags }}

docker-build-server:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: chaosgenius/chaosgenius-server
tags: latest

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile=black
28 changes: 28 additions & 0 deletions chaos_genius/alerts/anomaly_alert_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ANOMALY_TABLE_COLUMN_NAMES_MAPPER = {
"series_type": "Dimension",
"data_datetime": "Time of Occurrence",
"y": "Value",
"severity": "Severity Score"
}

IGNORE_COLUMNS_ANOMALY_TABLE = [
"id",
"index",
"kpi_id",
"is_anomaly"
]

ANOMALY_ALERT_COLUMN_NAMES = [
"Dimension",
"Time of Occurrence",
"Value",
"Expected Value",
"Severity Score"
]

ANOMALY_TABLE_COLUMNS_HOLDING_FLOATS = [
"y",
"yhat_upper",
"yhat_lower",
"severity"
]
Loading

0 comments on commit 1bc2609

Please sign in to comment.