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

Repo Gardening: log failures to send Slack messages #40369

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Nov 27, 2024

Fixes #40366

Proposed changes:

Until now, we used to try to send messages to Slack, and didn't do anything if the message could not be sent. We'll now log the message, either by sending a Slack message to myself, or the Quality team for folks outside of the Automattic organization.

This will allow us to better detect triage Slack actions that could not be completed, because a team no longer exists and their Slack channel has been archived for example.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

  • p1732723599754299-slack-C05KLDWRGAX

Does this pull request change what data or activity we track or use?

No

Testing instructions:

This can be tested in a fork. Here is an example:
jeherve#187

Here is the resulting message: p1732803634693709-slack-CN2FSK7L4

@jeherve jeherve added [Status] In Progress [Type] Task [Pri] Normal Actions GitHub actions used to automate some of the work around releases and repository management [Action] Repo Gardening Github Action: manage PR and issues in your Open Source project labels Nov 27, 2024
@jeherve jeherve self-assigned this Nov 27, 2024
Copy link
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!

Fixes #40366

Until now, we used to try to send messages to Slack, and didn't do anything if the message could not be sent. We'll now log the message, either by sending a Slack message to myself, or the Quality team for folks outside of the Automattic organization.

This will allow us to better detect triage Slack actions that could not be completed, because a team no longer exists and their Slack channel has been archived for example.

This also changes the Slack messaging utility to use Slack's own package instead of fetch, to give us more access to Slack's error management tools.
@jeherve jeherve force-pushed the update/repo-gardening-slack-report-message branch from 34c2612 to 4309982 Compare November 28, 2024 14:03
Copy link
Contributor

github-actions bot commented Nov 28, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the update/repo-gardening-slack-report-message branch.

    • For jetpack-mu-wpcom changes, also add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true ); to your wp-config.php file.
  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack update/repo-gardening-slack-report-message
    
    bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/repo-gardening-slack-report-message
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@jeherve jeherve added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Nov 28, 2024
@jeherve jeherve requested review from oskosk and a team November 28, 2024 14:49
Copy link
Member

@zinigor zinigor left a comment

Choose a reason for hiding this comment

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

I have no problems with this, except I don't know how to test it. But you have probably done it yourself.

@jeherve jeherve merged commit 7a60ed0 into trunk Nov 28, 2024
76 checks passed
@jeherve jeherve deleted the update/repo-gardening-slack-report-message branch November 28, 2024 17:06
@github-actions github-actions bot removed the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Nov 28, 2024
Comment on lines +95 to +96
// Let's send a direct message to @jeherve about it, so we can investigate.
// For folks outside of Automattic, let's use the Quality team channel.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not send all to the channel?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's what we'll end up doing on the long term, but for now I'd like to monitor the assignment list closely, especially as more teams get re-orged.

jeherve added a commit that referenced this pull request Dec 2, 2024
See #40369 (comment)

Co-authored-by: anomiex <anomiex@users.noreply.github.com>
jeherve added a commit that referenced this pull request Dec 2, 2024
See #40369 (comment)

Co-authored-by: anomiex <anomiex@users.noreply.github.com>
matticbot pushed a commit to Automattic/jetpack-changelogger that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-compat that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-config that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-ip that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-composer-plugin that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/patchwork-redefine-exit that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-yoast-promo that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-connection that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/woocommerce-analytics that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-plans that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-stats that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-boost-core that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-waf that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-boost-speed-score that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-sync that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-protect-status that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-import that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-licensing that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-transport-helper that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/scheduled-updates that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-explat that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-jitm that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-stats-admin that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-publicize that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-blaze that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-wordads that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-forms that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-masterbar that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-my-jetpack that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-backup that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-mu-wpcom that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-videopress that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-search that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/action-repo-gardening that referenced this pull request Dec 2, 2024
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Action] Repo Gardening Github Action: manage PR and issues in your Open Source project Actions GitHub actions used to automate some of the work around releases and repository management [Pri] Normal [Type] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo Gardening / Slack messages: detect when a message cannot be delivered
3 participants