DeprecatrAI

Migrate from 2024-H1 to 2024-H2

Update event subscriptions and IAM roles for Slack API changes in 2024-H2.

within 90 days~4h effort2 breaking changes

What Changed

High

Event Subscriptions Endpoint Deprecation

The legacy event subscriptions endpoint (/events) is deprecated and will be removed. All event subscriptions must use the new '/events.v2' endpoint.

Before
client.post('/events', payload);
After
client.post('/events.v2', payload);
Medium

IAM Role Permission Changes

Required IAM roles for certain Slack API operations have been updated. Specifically, access to 'conversations.history' requires a new 'chat:history:read' scope.

Before
iam_role.add_permission('chat:read');
After
iam_role.add_permission('chat:read', 'conversations:history:read');

Migration Steps

  1. 1

    Review Release Notes

    code

    Thoroughly read the official Slack API 2024-H2 release notes to understand all changes, including any unannounced minor adjustments. Pay close attention to deprecation notices.

    • Note any changes to existing methods or parameters.
    • Check for new authentication or authorization requirements.
  2. 2

    Update Event Subscription Endpoint

    code

    Modify your application to use the new '/events.v2' endpoint for receiving Slack events. This involves updating the URL in your webhook configurations and any direct API calls.

    • Ensure your server is configured to handle requests to the new endpoint.
    • Test the new endpoint thoroughly in a staging environment.
  3. 3

    Adjust IAM Role Permissions

    config

    Update your IAM roles to include the new 'conversations:history:read' scope if your application accesses conversation history. This ensures continued functionality for related features.

    • Identify all services or functions that interact with conversation history.
    • Apply the updated IAM policies cautiously, testing in a non-production environment first.
  4. 4

    Update Slack SDK/Client

    code

    If you are using a Slack SDK or client library, check for updates that support the 2024-H2 API version. Update your dependencies to the latest compatible version.

    • Consult the SDK's documentation for migration instructions.
    • Pin the updated SDK version in your dependency management file.
  5. 5

    Perform Comprehensive Testing

    test

    Conduct thorough integration and end-to-end testing in a staging environment. Verify all Slack-related functionalities, especially those impacted by the breaking changes.

    • Automate as many tests as possible.
    • Include edge cases and error handling scenarios.
  6. 6

    Deploy to Production

    deploy

    Once testing is complete and successful, deploy the updated application to your production environment. Monitor the deployment closely for any unexpected issues.

    • Consider a phased rollout if possible.
    • Have a rollback plan in place.
  7. 7

    Monitor and Verify

    verify

    After deployment, continuously monitor your application logs and Slack activity for any errors or unusual behavior related to the API migration. Verify that all features are functioning as expected.

    • Set up alerts for critical API errors.
    • Gather user feedback on any functional changes.

Testing Checklist

  1. 1.

    Verify Event Subscriptions

    Send test events to Slack and confirm they are received and processed correctly by the '/events.v2' endpoint.

  2. 2.

    Test Conversation History Access

    Ensure that users can still access and view conversation history if the 'conversations:history:read' scope is required.

  3. 3.

    Check All API Endpoints

    Manually or automatically test all critical Slack API interactions (e.g., sending messages, fetching user info).

  4. 4.

    Validate Authentication and Authorization

    Confirm that authentication flows and permission checks are still working correctly.

Common Mistakes

Forgetting to update the event subscription endpoint URL.

Application will stop receiving Slack events, leading to service disruption.

Ensure all references to the old '/events' endpoint are replaced with '/events.v2' in configurations and code.

Not updating IAM roles for conversation history access.

Users may encounter errors when trying to access or view conversation history.

Add the 'conversations:history:read' scope to the relevant IAM roles.

Skipping comprehensive testing in a staging environment.

Unforeseen issues may arise in production, causing downtime or data inconsistencies.

Allocate sufficient time for thorough testing before deploying to production.

Never get blindsided by an API change again

Deprecatr AI monitors 150+ providers, maps changes to your codebase, and delivers migration checklists before your team hits a breaking change.

Join the Waitlist