Skip to content

Commit

Permalink
fixup: drop slack notification code
Browse files Browse the repository at this point in the history
  • Loading branch information
j23414 committed Mar 19, 2024
1 parent 7392f61 commit 2e14f00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
8 changes: 3 additions & 5 deletions ingest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,20 @@ Do the following to include sequences from static FASTA files.
## Configuration

Configuration takes place in `defaults/config.yaml` by default.
Optional configs for uploading files and Slack notifications are in `defaults/optional.yaml`.
Optional configs for uploading files are in `build-configs/nextstrain-automation/config.yaml`.

### Environment Variables

The complete ingest pipeline with AWS S3 uploads and Slack notifications uses the following environment variables:
The complete ingest pipeline with AWS S3 uploads uses the following environment variables:

#### Required

- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `SLACK_TOKEN`
- `SLACK_CHANNELS`

#### Optional

These are optional environment variables used in our automated pipeline for providing detailed Slack notifications.
These are optional environment variables used in our automated pipeline.

- `GITHUB_RUN_ID` - provided via [`github.run_id` in a GitHub Action workflow](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context)
- `AWS_BATCH_JOB_ID` - provided via [AWS Batch Job environment variables](https://docs.aws.amazon.com/batch/latest/userguide/job_env_vars.html)
Expand Down
14 changes: 0 additions & 14 deletions ingest/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ min_version(

configfile: "defaults/config.yaml"

send_slack_notifications = config.get("send_slack_notifications", False)

serotypes = ['all', 'denv1', 'denv2', 'denv3', 'denv4']

def _get_all_targets(wildcards):
Expand All @@ -34,18 +32,6 @@ def _get_all_targets(wildcards):
)
)

# Add additional targets for Nextstrain's internal Slack notifications
if send_slack_notifications:
all_targets.extend(
[
"data/notify/genbank-record-change.done",
"data/notify/metadata-diff.done",
]
)

if config.get("trigger_rebuild", False):
all_targets.append("data/trigger/rebuild.done")

return all_targets


Expand Down
5 changes: 0 additions & 5 deletions ingest/build-configs/nextstrain-automation/upload.smk
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ The rule `upload_all` can be used as a target to upload all files.
"""
import os

slack_envvars_defined = "SLACK_CHANNELS" in os.environ and "SLACK_TOKEN" in os.environ
send_notifications = (
config.get("send_slack_notifications", False) and slack_envvars_defined
)


rule upload_to_s3:
input:
Expand Down

0 comments on commit 2e14f00

Please sign in to comment.