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.42 #1030

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Release/1.2.42 #1030

merged 2 commits into from
Sep 18, 2024

Conversation

sacOO7
Copy link
Collaborator

@sacOO7 sacOO7 commented Sep 18, 2024

Summary by CodeRabbit

  • New Features

    • Introduced attachOnSubscribe channel option for enhanced subscription behavior.
  • Bug Fixes

    • Fixed implicit attachment on subscription issues.
  • Documentation

    • Updated version numbers for the Ably libraries in the README and CONTRIBUTING files to reflect the latest version (1.2.42).
  • Chores

    • Incremented versionCode in the Android build configuration from 16 to 17.

Copy link

coderabbitai bot commented Sep 18, 2024

Walkthrough

The pull request introduces version 1.2.42 of the Ably Java library, featuring the new attachOnSubscribe channel option for improved subscription behavior. The changelog, dependency references, and versioning information across multiple files have been updated to reflect this new version. Additionally, several fixes and enhancements have been implemented, including updates to the CI configuration and test assertions.

Changes

Files Change Summary
CHANGELOG.md Updated to reflect the release of version 1.2.42 and the addition of attachOnSubscribe.
CONTRIBUTING.md Updated dependency version from 1.2.41 to 1.2.42 for the Ably Android library.
README.md Updated dependency versions for both Java and Android from 1.2.41 to 1.2.42.
android/build.gradle Incremented versionCode from 16 to 17.
common.gradle Updated version from 1.2.41 to 1.2.42 for the Ably Java client library.
lib/src/test/java/io/ably/lib/test/... Updated expected "agent" request parameter in tests from 1.2.41 to 1.2.42.

Possibly related PRs

Suggested reviewers

  • ttypic

Poem

🐰 In a garden where code does bloom,
New features hop, dispelling gloom.
Version 1.2.42, a joyful cheer,
With attachOnSubscribe, we draw near.
Bugs are fixed, and tests align,
In the world of Ably, all is fine! 🌼


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 7a360ae and 592a2e4.

Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • README.md (1 hunks)
  • android/build.gradle (1 hunks)
  • common.gradle (1 hunks)
  • lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java (1 hunks)
Files skipped from review due to trivial changes (3)
  • CONTRIBUTING.md
  • README.md
  • common.gradle
Additional comments not posted (3)
android/build.gradle (1)

34-34: Ensure consistent versioning across the project

While the versionCode has been incremented to 17, please verify that all other references to the version are updated accordingly to maintain consistency.

Run the following script to check for other occurrences of versionCode and versionName:

Verification successful

Versioning is consistent across the project

The verification process confirms that the versioning is consistent:

  • versionCode is correctly set to 17 in android/build.gradle
  • versionName is set to the version variable
  • The version variable is defined as '1.2.42' in common.gradle

This setup maintains consistency across the project, with versionCode and versionName serving their distinct purposes in Android versioning.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all occurrences of 'versionCode' and 'versionName' in Gradle files.
# Expect: 'versionCode' should be set to '17', and 'versionName' should reflect the correct version.

# Search for 'versionCode' and 'versionName' in Gradle files
rg --type gradle 'versionCode|versionName'

Length of output: 227


Script:

#!/bin/bash
# Description: Find the definition of the 'version' variable in Gradle files
# Expect: To see where and how the 'version' variable is defined

# Search for 'version =' or 'version=' in Gradle files
rg --type gradle 'version\s*='

Length of output: 164

lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java (1)

91-91: Avoid hardcoding the library version in tests

Hardcoding the library version '1.2.42' can lead to maintenance issues. Consider retrieving the version dynamically to ensure tests remain accurate after version updates.

Run the following script to identify other instances of hardcoded library versions:

Apply this diff to fetch the version from a central source:

-                        Collections.singletonList("ably-java/1.2.42 jre/" + System.getProperty("java.version")));
+                        Collections.singletonList("ably-java/" + BuildConfig.VERSION_NAME + " jre/" + System.getProperty("java.version")));

Ensure that BuildConfig.VERSION_NAME correctly references the library version.

Verification successful

To gather more information and make a well-informed decision, I'll run additional scripts to investigate the codebase further.


Based on the analysis of the codebase and the test file, I can now provide a final response regarding the hardcoded version in the test file.

Hardcoded version in test file is intentional and necessary

The hardcoded version "1.2.42" in RealtimeHttpHeaderTest.java is intentional and serves a specific purpose in testing. This test is designed to verify that the library correctly reports its version in HTTP headers, which is crucial for debugging and support purposes.

Key points:

  • The version in build.gradle (1.2.42) matches the hardcoded version in the test file.
  • The test specifically checks if the agent header contains the correct version string.
  • Dynamically retrieving the version in this test might defeat its purpose of verifying the correct version string.

While it's generally good practice to avoid hardcoding versions, in this case, it's necessary for the test to function correctly. The test ensures that the library is correctly reporting its version, which is an important aspect of the library's behavior.

To maintain this test effectively:

  • Update the hardcoded version in the test file whenever the library version is updated in build.gradle.
  • Consider adding a comment in the test file explaining why the version is hardcoded and reminding developers to update it when necessary.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for hardcoded library version strings in the codebase.
# Expect: No occurrences of 'ably-java/<version>' with a hardcoded version number.

# Search for patterns matching 'ably-java/' followed by a version number
rg --type java 'ably-java/[0-9]+\.[0-9]+\.[0-9]+'

Length of output: 233


Script:

#!/bin/bash
# Search for build configuration files and their content
echo "=== Build Configuration Files ==="
fd -e gradle -e properties -e xml --exec cat {}

echo "\n=== Other occurrences of 'ably-java/' ==="
rg "ably-java/" --type java

echo "\n=== Content of RealtimeHttpHeaderTest.java ==="
cat lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java

Length of output: 31000

CHANGELOG.md (1)

3-16: Changelog update is comprehensive and well-formatted

The changelog entries for version 1.2.42 are correctly structured and provide necessary details for users.


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 generate interesting stats about this repository and render them as a table.
    -- @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.

Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI o1 for code reviews: OpenAI's new o1 model is being tested for code reviews. This model has advanced reasoning capabilities and can provide more nuanced feedback on your code.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

@sacOO7
Copy link
Collaborator Author

sacOO7 commented Sep 18, 2024

thanks for approval

@sacOO7 sacOO7 merged commit ea94d2a into main Sep 18, 2024
9 of 10 checks passed
@sacOO7 sacOO7 deleted the release/1.2.42 branch September 18, 2024 12:31
@coderabbitai coderabbitai bot mentioned this pull request Oct 7, 2024
@coderabbitai coderabbitai bot mentioned this pull request Dec 10, 2024
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.

2 participants