Skip to content

removed outdated okhttp lib, and updated java native library changes#230

Merged
olamy merged 1 commit into
jenkinsci:masterfrom
rlogasundaram:okhttp_security_correction
Sep 27, 2023
Merged

removed outdated okhttp lib, and updated java native library changes#230
olamy merged 1 commit into
jenkinsci:masterfrom
rlogasundaram:okhttp_security_correction

Conversation

@rlogasundaram
Copy link
Copy Markdown
Contributor

Changes made as per the github-api release version recommended:
https://github.com/hub4j/github-api/releases/tag/github-api-1.300

The third party API "okhttp-urlconnection" was outdated. Need to remove the library from the github-api-plugin

Pom.xml

  • Removed the deprecated okhttp-urlconnection dependency

SmokeTest.java

  • Removed the deprecated classes used in the connectFunctions() method - "HttpConnector", "OkUrlFactory", "OkHttpConnector"
  • Replaced the HttpConnector with GitHubConnector
  • Removed the mock test for OkHttpConnector which is deprecated.
  • Creating an object for OkHttpClient and passed as param to the OkHttpGitHubConnector rather than passing param as (new OkHttpClient() ).
  • Able to compile the code after making the changes with the below command as guided in the release version of github plugin

mvn -D enable-ci clean install site

Testing Done:

  • By compiling the code and build success. Since, SmokeTest.java is the test file which got affected.

Okhttp_Compilation_Status

@rsandell rsandell requested a review from a team September 11, 2023 12:53
Comment thread pom.xml
</exclusions>
</dependency>

<!-- Included for backward compatibility, should be removed once downstream plugins are updated to use okhttp3 -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Has this been verified?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, It has been verified and confirmed by @jtnord that "okhttp-urlconnnection 2.7.5" dependency need to be completely removed from the github-api-plugin and updated with the java native library changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The okhttp java native library changes made based on the the github-api release.

https://github.com/hub4j/github-api/releases/tag/github-api-1.300

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @amuniz . Yes The changes has been verified by running the usage-in-plugins under Rudi Controller. After running the job, I don't see any deprecated plugin usage. The verified link here:
https://gauntlet-3.cloudbees.com/rudi/job/usage-in-plugins/298/artifact/output/usage-by-plugin.html

Could you please confirm on it. Thank you
image

@olamy olamy added this pull request to the merge queue Sep 27, 2023
Merged via the queue into jenkinsci:master with commit 86f4668 Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants