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

Remove jna-posix #5560

Merged
merged 2 commits into from Jun 19, 2021
Merged

Remove jna-posix #5560

merged 2 commits into from Jun 19, 2021

Conversation

basil
Copy link
Member

@basil basil commented Jun 5, 2021

jna-posix was superseded by jnr-posix in Jenkins core in 2013 in commit 2a1d163, but our fork of org.jruby.ext.posix:jna-posix (1.0.3-jenkins-1) remains present for backward compatibility. jna-posix is not compatible with Java 10+. Carrying this dependency seems undesirable for the Jenkins project in 2021. Isn't it time we moved on?

This PR makes incompatible changes to PosixException to remove the exposure of jna-posix. I used usage-in-plugins to look for usages of PosixException. PosixException is used in Copy Artifact, CloudBees Backup Plugin, and Operations Center Context Plugin. But in none of these three cases is the constructor or the getErrorCode() method called. They are all just catching PosixException. So removing the second argument from the constructor and removing getErrorCode() shouldn't break anything.

I also used usage-in-plugins to look for usages of classes in the jna-posix JAR as well as hudson.os.PosixAPI#get, hudson.os.PosixAPI#isNative, and hudson.os.PosixAPI#supportsNative. Here we go again. hudson/os/PosixAPI#get()Lorg/jruby/ext/posix/POSIX; is still used in three ancient plugins:

I propose we move forward with this removal whether these plugins get released or not. jna-posix has been deprecated in Jenkins core for 8 years, and it won't work with Java 11. It's time to move on. Once this PR is merged, I'll file a PR in the Update Center to officially mark these three plugins as deprecated.

Proposed changelog entries

Developer: Remove jna-posix dependency from Jenkins core. Plugins that use jna-posix functionality, including Maven Repository Scheduled Cleanup, SICCI for Xcode, and java.io.tmpdir cleaner, must be migrated from jna-posix to jnr-posix.

Proposed upgrade guidelines

The jna-posix dependency has been removed from Jenkins core. Plugins that use jna-posix functionality, including Maven Repository Scheduled Cleanup, SICCI for Xcode, and java.io.tmpdir cleaner, are no longer supported and must be removed.

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@basil basil added dependencies Pull requests that update a dependency file developer Changes which impact plugin developers upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed labels Jun 5, 2021
@basil basil added the squash-merge-me Unclean or useless commit history, should be merged only with squash-merge label Jun 10, 2021
@timja timja requested a review from a team June 10, 2021 07:01
@timja timja requested a review from a team June 10, 2021 07:26
@timja timja added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jun 14, 2021
@timja
Copy link
Member

timja commented Jun 14, 2021

This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@res0nance res0nance merged commit 36528c1 into jenkinsci:master Jun 19, 2021
@basil basil deleted the jna-posix branch June 19, 2021 06:19
basil added a commit to basil/update-center2 that referenced this pull request Jul 5, 2021
daniel-beck pushed a commit to jenkins-infra/update-center2 that referenced this pull request Sep 19, 2021
@basil basil mentioned this pull request Nov 28, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file developer Changes which impact plugin developers ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback squash-merge-me Unclean or useless commit history, should be merged only with squash-merge upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed
Projects
None yet
4 participants