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

Monkey Patch: URI.escape #663

Merged
merged 1 commit into from
Mar 23, 2022
Merged

Monkey Patch: URI.escape #663

merged 1 commit into from
Mar 23, 2022

Conversation

danielfor
Copy link
Member

@danielfor danielfor commented Mar 16, 2022

Related to problems in the bump to ruby 3.1 . From ruby 3 URI.escape function was removed. This is
a monkey patch to add that function again and restore the broken functionality.

[#181531703] [azure cpi] Fix the Docker image that builds the azure CPI

Signed-off-by: Daniel Felipe Ochoa danielfelipo@vmware.com

--------------------MESSAGE FROM ADMIN, DELETE BEFORE SUBMITTING----------------------

Thanks for submitting a pull request!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA) on-file with us. Please sign the appropriate CLA (individual or corporate).

When sending signed CLA please provide your github username in case of individual CLA or the list of github usernames that can make pull requests on behalf of your organization.

If you are confident that you're covered under a Corporate CLA, please make sure you've publicized your membership in the appropriate Github Org, per these instructions.

--------------------MESSAGE FROM ADMIN, DELETE BEFORE SUBMITTING----------------------

Checklist:

Please check each of the boxes below for which you have completed the corresponding task:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All unit tests pass locally (after my changes)
  • Rubocop reports zero offenses (after my changes)

Please include below the summary portions of the output from the following 2 scripts:

pushd src/bosh_azure_cpi
  ./bin/test-unit
  ./bin/rubocop_check
popd

NOTE: Please see how to setup dev environment and run unit tests in docs/development.md.

Unit Test output:

Finished in 8.26 seconds (files took 1.57 seconds to load)
1023 examples, 0 failures

Coverage report generated for RSpec to /Users/danielfelipo/workspace/bosh-azure-cpi-release/src/bosh_azure_cpi/coverage. 4275 / 4295 LOC (99.53%) covered.

Rubocop output:

4 offenses reside in files that were not modified in this PR.

190 files inspected, 4 offenses detected, 4 offenses auto-correctable
rubocop find some issues.
~/workspace/bosh-azure-cpi-release/src/bosh_azure_cpi

Changelog

  • Monkey patch that adds URI.escape function , to patch ruby 3.1 std library.

@danielfor danielfor force-pushed the Bugfix/ruby3.1-patches branch from 4733361 to 9759ee2 Compare March 16, 2022 17:54
@rkoster rkoster requested review from a team, beyhan and bgandon and removed request for a team March 16, 2022 18:19
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 16, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: aramprice / name: aram price (9759ee2)

@danielfor danielfor changed the title Monkey Patch: API.escape Monkey Patch: CPI.escape Mar 17, 2022
@danielfor danielfor changed the title Monkey Patch: CPI.escape Monkey Patch: URI.escape Mar 17, 2022
@danielfor danielfor force-pushed the Bugfix/ruby3.1-patches branch from 9759ee2 to 696d1bb Compare March 18, 2022 15:58
Copy link
Member

@beyhan beyhan left a comment

Choose a reason for hiding this comment

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

@aramprice @danielfor the pr looks good. There are just some new offenses when you execute the rubocop_checks. Could you please look into those?

Fixes the problems related to the bump to ruby 3.1. From ruby version 3
the URI.escape function was removed. This is a monkey patch to add that
function again and restore the broken functionality.

[#181531703] [azure cpi] Fix the Docker image that builds the azure CPI

Signed-off-by: Daniel Felipe Ochoa <danielfelipo@vmware.com>
@danielfor danielfor force-pushed the Bugfix/ruby3.1-patches branch from 696d1bb to a478caa Compare March 22, 2022 16:41
@danielfor
Copy link
Member Author

Hi @beyhan thanks for noticing the rubocop issues. The offenses were fixed.

@danielfor danielfor requested a review from beyhan March 22, 2022 18:40
@danielfor danielfor merged commit 5a54709 into master Mar 23, 2022
@rkoster rkoster deleted the Bugfix/ruby3.1-patches branch March 29, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

5 participants