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

Add workflow that scans orphaned PR environments #819

Merged
merged 6 commits into from
Jan 3, 2025
Merged

Conversation

lorenyu
Copy link
Contributor

@lorenyu lorenyu commented Jan 2, 2025

Ticket

Resolves #709

Changes

  • Add bin/orphaned-prs
  • Add scan-orphaned-pr-environments.yml workflow
  • Pulled out get_app_names into reusable function in util.bash
  • Commented out default system notifications config

Context for reviewers

I also pulled out get_app_names function from infra-deploy-status-check-configs into a utils.bash library file.

Testing

Developed and tested on navapbc/platform-test#143

@lorenyu lorenyu requested a review from coilysiren January 3, 2025 00:11
@lorenyu
Copy link
Contributor Author

lorenyu commented Jan 3, 2025

@coilysiren couple of other changes here:

  • added some lightweight docs
  • commented out the channel definition in system-notifications.tf and added some comments

@lorenyu lorenyu requested a review from doshitan January 3, 2025 18:01
Copy link
Contributor

@coilysiren coilysiren left a comment

Choose a reason for hiding this comment

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

🐑 it

Comment on lines 3 to 23
# Configuration for system notifications
# used by CI/CD workflows to send notifications for deployments,
# failed workflows, etc.
system_notifications_config = {

# channels is a map of notification channels, where each key is a
# notification channel and each value is the channel configuration.
#
# A channel configuration contains contains the following attributes:
# type: Type of notification channel (e.g. "slack", or "teams").
# currently only "slack" is supported
#
# If the channel `type` is missing or null, system notifications sent to
# that channel will result in a no-op.
#
# If the channel `type` is "slack", the configuration must also contain the
# following attributes:
# channel_id_secret_name: Name of the secret in GitHub that contains the
# Slack channel ID
# slack_token_secret_name: Name of the secret in GitHub that contains the
# Slack bot token
Copy link
Contributor

Choose a reason for hiding this comment

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

This took me a while to parse, but it LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Took a pass at improving it. Open to additional suggestions

@lorenyu lorenyu merged commit 2d87adf into main Jan 3, 2025
9 checks passed
@lorenyu lorenyu deleted the lorneyu/staleprenvs branch January 3, 2025 18:28
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

Successfully merging this pull request may close these issues.

Add check for orphaned PR environments
2 participants