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

Make next_cursor extraction logic even more robust (ref #1407) #1409

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

seratch
Copy link
Member

@seratch seratch commented Oct 5, 2023

Summary

This pull request improves the internal logic to extract next_cursor from Slack Web API response. As of today, all the public APIs return empty string (meaning "") when the API does not have its next page. With that being said, the platform may add some inconsistent behavior in the future. Thus, just in case, we want to make this SDK code even more robust for such scenario. Refer to #1407 for its context.

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@seratch seratch added enhancement M-T: A feature request for new functionality web-client Version: 3x labels Oct 5, 2023
@seratch seratch added this to the 3.23.1 milestone Oct 5, 2023
@seratch seratch self-assigned this Oct 5, 2023
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #1409 (4d58b5b) into main (2caacbb) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1409      +/-   ##
==========================================
- Coverage   85.47%   85.46%   -0.01%     
==========================================
  Files         111      111              
  Lines       11857    11857              
==========================================
- Hits        10135    10134       -1     
- Misses       1722     1723       +1     
Files Coverage Δ
slack_sdk/web/internal_utils.py 82.72% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@seratch seratch merged commit 9967dc0 into slackapi:main Oct 5, 2023
9 checks passed
@seratch seratch deleted the issue-1407 branch October 5, 2023 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant