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

Release 1.2.35. #2001

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Release 1.2.35. #2001

merged 2 commits into from
Nov 28, 2024

Conversation

maratal
Copy link
Collaborator

@maratal maratal commented Nov 28, 2024

Summary by CodeRabbit

Release Notes for Version 1.2.35

  • New Features

    • Added new fields to support an upcoming chat SDK.
  • Improvements

    • Updated installation instructions to reflect the new version number (1.2.35).
    • Enhanced error handling and connection state management for better resilience during network issues.
  • Bug Fixes

    • Fixed various issues related to token expiration and fallback host logic.
  • Documentation

    • Updated the changelog and README to include details of changes and new version number.
  • Tests

    • Expanded test coverage for connection handling and error management scenarios.

Copy link

coderabbitai bot commented Nov 28, 2024

Walkthrough

The pull request introduces version 1.2.35 for the Ably iOS, tvOS, and macOS client library SDK. It updates the changelog, modifies the README.md for installation instructions, and changes the version in various source files, including ARTMessage, ARTClientInformation, and test files. Enhancements in tests cover connection handling, error management, and HTTP request scenarios, ensuring robust client behavior across various network conditions and error situations.

Changes

File Change Summary
CHANGELOG.md Added version entry for 1.2.35, detailing changes from 1.2.34, including new fields in ARTMessage.
README.md Updated version numbers in installation instructions and modified clientId in push notification example.
Scripts/jazzy.sh Updated module version from 1.2.34 to 1.2.35.
Source/ARTClientInformation.m Changed constant ARTClientInformation_libraryVersion from 1.2.34 to 1.2.35.
Test/Tests/ARTDefaultTests.swift Updated expected output in testVersions from 1.2.34 to 1.2.35.
Test/Tests/ClientInformationTests.swift Updated expected agent version from 1.2.34 to 1.2.35 in multiple test methods.
Test/Tests/RealtimeClientConnectionTests.swift Enhanced tests for connection states, error handling, and added checks for protocol messages.
Test/Tests/RestClientTests.swift Expanded tests for HTTP requests, error handling, and fallback host logic, updating expected version.
Version.xcconfig Updated CURRENT_PROJECT_VERSION from 1.2.34 to 1.2.35.

Possibly related PRs

Suggested reviewers

  • lawrence-forooghian
  • umair-ably

Poem

🐇 In the garden of code, we hop with glee,
A new version blooms, 1.2.35 you see!
With messages richer, and tests that gleam,
We leap through the changes, a coder's dream!
So raise up your carrots, and cheer with delight,
For Ably's new version is shining so bright! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to staging/pull/2001/features November 28, 2024 17:13 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/2001/jazzydoc November 28, 2024 17:16 Inactive
@maratal maratal changed the title Bump version to 1.2.35. Release 1.2.35. Nov 28, 2024
@maratal maratal marked this pull request as ready for review November 28, 2024 17:21
Copy link
Contributor

@ttypic ttypic left a comment

Choose a reason for hiding this comment

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

LGTM

@maratal maratal merged commit aca9a7c into main Nov 28, 2024
2 of 8 checks passed
@maratal maratal deleted the release/1.2.35 branch November 28, 2024 17:27
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
Test/Tests/RealtimeClientConnectionTests.swift (2)

Line range hint 1440-1446: Consider simplifying the host order arrangement logic.

Reversing expectedHostOrder before mapping may make the code less intuitive. Consider defining expectedHostOrder in the desired order to eliminate the need for reversal.


Line range hint 1441-1446: Prefer using Swift Array instead of NSMutableArray.

Using Swift's native [Any] type instead of NSMutableArray improves code safety and compatibility with Swift features.

Apply this diff to refactor:

-        let shuffleArrayInExpectedHostOrder = { (array: NSMutableArray) in
+        let shuffleArrayInExpectedHostOrder = { (array: inout [Any]) in
             let arranged = expectedHostOrder.reversed().map { array[$0] }
             for (i, element) in arranged.enumerated() {
                 array[i] = element
             }
         }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5a9b7ba and 31d83d3.

📒 Files selected for processing (9)
  • CHANGELOG.md (1 hunks)
  • README.md (3 hunks)
  • Scripts/jazzy.sh (1 hunks)
  • Source/ARTClientInformation.m (1 hunks)
  • Test/Tests/ARTDefaultTests.swift (1 hunks)
  • Test/Tests/ClientInformationTests.swift (3 hunks)
  • Test/Tests/RealtimeClientConnectionTests.swift (1 hunks)
  • Test/Tests/RestClientTests.swift (1 hunks)
  • Version.xcconfig (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • Scripts/jazzy.sh
  • Source/ARTClientInformation.m
  • Version.xcconfig
🧰 Additional context used
🪛 Markdownlint (0.35.0)
CHANGELOG.md

5-5: null
Bare URL used

(MD034, no-bare-urls)


9-9: null
Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (13)
Test/Tests/ARTDefaultTests.swift (1)

9-9: LGTM! Version update is aligned with release objectives.

The test expectation has been correctly updated to match the new version 1.2.35.

Let's verify version consistency across all related files:

✅ Verification successful

Version 1.2.35 is consistently updated across all relevant files

The verification confirms that version 1.2.35 is properly synchronized across:

  • CHANGELOG.md header
  • README.md installation instructions
  • Source/ARTClientInformation.m constant definition
  • All relevant test files including version expectations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify version number consistency across all relevant files
# Expected version: 1.2.35

echo "Checking version numbers in key files..."

# Check CHANGELOG.md
echo "CHANGELOG.md:"
rg "## \[1\.2\.35\]" CHANGELOG.md

# Check README.md
echo -e "\nREADME.md installation instructions:"
rg "1\.2\.35" README.md

# Check Source files
echo -e "\nSource files version constants:"
rg "ARTClientInformation_libraryVersion.*1\.2\.35" Source/

# Check other test files
echo -e "\nTest files version expectations:"
rg "1\.2\.35" Test/Tests/

Length of output: 1623

Test/Tests/ClientInformationTests.swift (3)

12-12: LGTM: Version assertion correctly updated

The version string has been properly updated to "1.2.35" in the basic agent assertion test.


30-30: LGTM: Agent identifier version correctly updated

The version string has been properly updated in the agent identifier format test case (nil agents scenario).


45-45: LGTM: Version update consistent with other changes

The version string has been properly updated in the agent identifier format test case (with additional agents).

Let's verify version consistency across the codebase:

✅ Verification successful

Version string "1.2.35" is consistently used across the codebase

The version update has been properly synchronized across all relevant files:

  • Version.xcconfig: CURRENT_PROJECT_VERSION = 1.2.35
  • Source/ARTClientInformation.m: ARTClientInformation_libraryVersion = "1.2.35"
  • README.md: Package and download references
  • Test files: All test assertions use "1.2.35"
  • CHANGELOG.md: Latest version entry is 1.2.35
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify version string consistency across the codebase
# Expected: All version strings should be "1.2.35"

echo "Checking for any inconsistent version strings..."
rg -g '!.git' '1\.2\.(3[0-9]|[4-9][0-9])' --no-heading

echo "Checking specific version-related files..."
for file in CHANGELOG.md README.md Source/ARTClientInformation.m; do
    if [ -f "$file" ]; then
        echo "=== $file ==="
        rg '1\.2\.[0-9]+' "$file"
    fi
done

Length of output: 8633

README.md (2)

64-64: LGTM! Version update for Swift Package Manager installation.

The version number is correctly updated to 1.2.35 in the Swift Package Manager installation instructions.


104-104: LGTM! Version update for manual installation.

The version number and GitHub release link are correctly updated to 1.2.35 in the manual installation instructions.

Test/Tests/RealtimeClientConnectionTests.swift (7)

387-387: Version number updated correctly.

The agent version in the query parameter now reflects the new version 1.2.35.


Line range hint 1481-1481: Custom shuffle function assigned correctly to test options.

The shuffleArray is now set to shuffleArrayInExpectedHostOrder as intended.


Line range hint 2329-2329: Fallback hosts mapped using expected host order.

The expectedFallbackHosts array is correctly constructed by mapping expectedHostOrder to ARTDefault.fallbackHosts().


Line range hint 2394-2394: Verify the equality of fallback hosts.

Ensuring that resultFallbackHosts matches expectedFallbackHosts is essential for the test validity.


Line range hint 2591-2600: Refactored code into testUsesAlternativeHostOnResponse for reusability.

Extracting common logic into this helper function improves code modularity and reduces duplication across tests.


Line range hint 2726-2780: Introduced testMovesToDisconnectedWithNetworkingError for better test organization.

This helper function enhances code reusability and maintainability by handling connectivity error tests in a centralized manner.


Line range hint 2453-2494: Verify direct modification of connectionDetails.

Directly modifying connectionDetails properties, such as maxIdleInterval, may not be appropriate. Ensure that this approach is safe and does not lead to unexpected behavior. Consider using a mock or a subclass if you need to alter these properties for testing purposes.

Run the following script to check if setMaxIdleInterval is a valid method or property setter:

README.md Show resolved Hide resolved
Test/Tests/RestClientTests.swift Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants