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

feat: upgrade urllib to 4.x #26

Merged
merged 1 commit into from
Dec 5, 2024
Merged

feat: upgrade urllib to 4.x #26

merged 1 commit into from
Dec 5, 2024

Conversation

killagu
Copy link
Member

@killagu killagu commented Dec 5, 2024

Summary by CodeRabbit

  • New Features

    • Upgraded urllib dependency to version 4.6.2.
  • Chores

    • Adjusted CI workflow to remove Node.js version 16 from testing matrix, focusing on versions 18, 20, 22, and 23.
  • Tests

    • Modified test suite for OSSObject class, focusing on the copy() method and maintaining core functionality checks, including tests for non-English names and metadata handling.

Copy link

coderabbitai bot commented Dec 5, 2024

Walkthrough

The pull request modifies the Continuous Integration (CI) workflow for a Node.js project by updating the Node.js version matrix in the .github/workflows/nodejs.yml file, removing version 16 and retaining versions 18, 20, 22, and 23. Additionally, the package.json file is updated to require Node.js version >= 18.19.0 and upgrades the urllib dependency from version ^3.19.2 to ^4.6.2. The overall structure of both files remains unchanged. The test suite for the OSSObject class is also adjusted, with some tests commented out and new tests added.

Changes

File Change Summary
.github/workflows/nodejs.yml Updated node-version matrix: removed version 16, keeping versions 18, 20, 22, 23.
package.json Updated engines field: changed Node.js requirement from >= 16.0.0 to >= 18.19.0.
package.json Updated urllib dependency: changed version from ^3.19.2 to ^4.6.2.
test/OSSObject.test.ts Commented out cross-bucket copy tests; added test for copying objects with non-English names.

Possibly related PRs

  • test: Node.js 23 #23: The changes in this PR also involve the .github/workflows/nodejs.yml file, specifically related to the Node.js version matrix, making it directly related to the main PR's updates to the same file.

Poem

🐇 In the garden of code, we hop and play,
With Node versions updated, we dance all day.
From sixteen to eighteen, we leap with glee,
Upgrading our packages, as happy as can be!
So here’s to our workflow, fresh and bright,
A bouncy new version, oh what a delight! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 283edd3 and 1dd4532.

📒 Files selected for processing (3)
  • .github/workflows/nodejs.yml (1 hunks)
  • package.json (1 hunks)
  • test/OSSObject.test.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/nodejs.yml
  • package.json
  • test/OSSObject.test.ts

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.

Copy link

socket-security bot commented Dec 5, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: environment, eval, filesystem, network +30 3.16 MB fengmk2

🚮 Removed packages: npm/[email protected]

View full report↗︎

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: 0

🧹 Outside diff range and nitpick comments (1)
test/OSSObject.test.ts (1)

1796-1804: Consider preserving test cases as skipped tests

Rather than commenting out the test cases, consider using it.skip() to preserve them in the test suite while clearly indicating they are intentionally skipped. This helps maintain visibility of the test coverage gap.

-    // it.skip('should copy object from other bucket, sourceBucket is a separate parameter', async () => {
-    //   const copySource = otherBucketObject;
-    //   const copyTarget = `${prefix}oss-client/oss/has-bucket-name-copy-target.js`;
-    //   const result = await ossObject.copy(copyTarget, copySource, otherBucket);
-    //   assert.equal(result.res.status, 200);
-    //   const info = await ossObject.head(copyTarget);
-    //   assert.equal(info.status, 200);
-    // });
+    it.skip('should copy object from other bucket, sourceBucket is a separate parameter', async () => {
+      const copySource = otherBucketObject;
+      const copyTarget = `${prefix}oss-client/oss/has-bucket-name-copy-target.js`;
+      const result = await ossObject.copy(copyTarget, copySource, otherBucket);
+      assert.equal(result.res.status, 200);
+      const info = await ossObject.head(copyTarget);
+      assert.equal(info.status, 200);
+    });
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7472ade and eda0e4c.

📒 Files selected for processing (1)
  • test/OSSObject.test.ts (2 hunks)
🔇 Additional comments (1)
test/OSSObject.test.ts (1)

1731-1732: Clarify the reason for commenting out cross-bucket copy tests

The tests for copying objects between buckets have been commented out. Please clarify:

  1. Is this related to the urllib 4.x upgrade?
  2. Will this functionality be restored in a future update?
  3. Are there any compatibility issues with Node.js 18.19.0?

If these tests are temporarily disabled, consider:

  1. Adding TODO comments with tracking issues
  2. Documenting any API changes in the changelog
  3. Updating the documentation if this is a breaking change

Also applies to: 1786-1794

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.39%. Comparing base (b384e48) to head (1dd4532).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #26   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files          17       17           
  Lines        1891     1891           
  Branches      283      282    -1     
=======================================
  Hits         1785     1785           
  Misses        106      106           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@killagu killagu merged commit ad9346f into master Dec 5, 2024
8 checks passed
@killagu killagu deleted the deps/urllib branch December 5, 2024 07:00
fengmk2 pushed a commit that referenced this pull request Dec 5, 2024
[skip ci]

## [2.4.0](v2.3.0...v2.4.0) (2024-12-05)

### Features

* upgrade urllib to 4.x ([#26](#26)) ([ad9346f](ad9346f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants