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

Switch from slackbot to email from desi cluster. #177

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

sybenzvi
Copy link
Contributor

Inform the DESI survey-ops slack channel of the focal plane sync status using an email rather than the now-obsolete slack webhook.

Requires the environment variable DESI_SLACK_MAIL_DESIMODEL_SYNC to be defined in the .bash_profile of the datasystems user. The variable should point to the email used for survey-ops (see the channel integrations menu in slack).

@coveralls
Copy link

coveralls commented Sep 25, 2024

Coverage Status

coverage: 50.113%. remained the same
when pulling 936715a on slack-logging-update
into 44b1a08 on main.

@sybenzvi
Copy link
Contributor Author

I have tested email to slack from desi-8 and it works. Once the cronjob runs successfully tomorrow (2024-09-26) by itself I think it's safe to merge this.

Copy link
Member

@tskisner tskisner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, assuming you are fine emailing the full logs every day.

# Post it.
slackerror=$(curl -X POST -H 'Content-type: application/json' --data "$(cat ${slackjson})" ${slack_web_hook})
echo "Slack API post ${slackerror}" >> "${logfile}"
cat ${logfile} | mailx -s "Focalplane sync: ${logdate}" ${slack_email}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you concerned about the cumulative file sizes being posted to slack (rather than a snippet showing pass/fail and the path of the full log)? Not sure if there are any constraints to worry about.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point @tskisner. We're paying more attention to the contents of the messages with the full logs being sent, but the larger logs can exceed 50k in size. Before I merge the PR, I'll check to see if the cumulative effect could cause a problem in slack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a conversation with @weaverba137, I think we'll send the full logs to slack for the time being. If the file size becomes an issue, we'll email an abbreviated report instead.

@sybenzvi sybenzvi merged commit f62def5 into main Oct 1, 2024
10 checks passed
@sybenzvi sybenzvi deleted the slack-logging-update branch October 1, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants