Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Plugin facelift + JENKINS-50616 fix for JEP-200 #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented Apr 6, 2018

I would like to release #5 from @jglick, because we have got an extra regression in the whitelists. Curious fact: Version 0.13 referenced in the changelog (2016) has been never actually released. Likely @suryagaddipati experienced some issues with dev environment. So the release would also include a JRuby dependency bump.

  • - Update minimum core requirement to 2.102. We could do a release without this version first, but I doubt it worth the effort
  • - Update Parent POM
  • - Resolve upper bounds conflict with stapler && fix binary incompatibilities
  • - Fix JENKINS-50616 by adding a RubyNil object to the ClassFilter

@reviewbybees @jglick @suryagaddipati

@oleg-nenashev
Copy link
Member Author

Actually @jglick did a lot of facelifting in #5. I will integrate that PR first and add my one on the top of it

# Conflicts:
#	Jenkinsfile
#	pom.xml
#	src/main/java/ruby/RubyPluginRuntimeResolver.java
@oleg-nenashev oleg-nenashev changed the title Plugin facelift Plugin facelift + JENKINS-50616 fix for JEP-200 Apr 6, 2018
@oleg-nenashev
Copy link
Member Author

@jglick It seems that we both got confused... a bit. The actual code of the plugin seems to be hosted here: https://github.com/jenkinsci/jenkins.rb/blob/master/java-runtime/pom.xml

@jglick
Copy link
Member

jglick commented Apr 6, 2018

Hence jenkinsci/jenkins.rb#122. No one is merging these so I think we need to either take ownership or officially deprecate.

@@ -1 +1,2 @@
buildPlugin()
#!/usr/bin/env groovy
buildPlugin(jdkVersions: [8], jenkinsVersions: [null, "2.107.1"])
Copy link
Member

Choose a reason for hiding this comment

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

jdkVersions can be dropped as we do not build against 7 by default anyway.

@oleg-nenashev
Copy link
Member Author

@jglick I meant that https://github.com/jenkinsci/jenkins.rb/blob/master/java-runtime/pom.xml appears to be a full copy of this repository.

@jglick
Copy link
Member

jglick commented Apr 17, 2018

Ah, I think you are right. Since ruby-runtime-0.9 by @kohsuke in Feb 2012, the two repositories have diverged. @cowboyd merged ruby-runtime-plugin into jenkins.rb. So my #5 and your #6 and @suryagaddipati’s 96be241 need to be ported, and this repository needs to be cleaned out.

@jglick
Copy link
Member

jglick commented Apr 17, 2018

@oleg-nenashev in fact you knew about this before. :-( #4 (comment)

@jglick
Copy link
Member

jglick commented Apr 17, 2018

BTW the 0.13 plugin release seems to have been botched somehow. There is no “prepare for next development iteration” commit, and while Artifactory seems to contain some 0.13 artifacts, it is not on the update center. (0.11 was also botched. 0.12 was the last successful release.)

@oleg-nenashev
Copy link
Member Author

Yes, I mentioned 0.13 in the PR description. We need to cleanup this mess

@jglick
Copy link
Member

jglick commented Apr 17, 2018

I tried to get rake test passing without Travis (so we could switch to a Jenkinsfile), but seem to have run into rspec/rspec-core#2210 and am not sure how to work around it.

jenkins.rb$ docker volume create ruby && docker run --rm -v ruby:/tmp/bundler ubuntu chmod -v a+rwx,o+t /tmp/bundler && docker run --rm -v `pwd`:/src -w /src -u `id -u`:`id -g` -v ruby:/tmp/bundler ruby:2.5.1-stretch rake test
cd ruby-runtime && bundle install && rake spec
`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.
Fetching gem metadata from http://rubygems.org/..........
Fetching rake 12.3.1
Installing rake 12.3.1
Using bundler 1.16.1
Fetching diff-lcs 1.3
Installing diff-lcs 1.3
Using json 2.1.0
Fetching slop 3.0.4
Installing slop 3.0.4
Using jenkins-plugin-runtime 0.2.3 from source at `.`
Fetching jenkins-war 1.514
Installing jenkins-war 1.514
Fetching rspec-core 2.14.8
Installing rspec-core 2.14.8
Fetching rspec-expectations 2.14.5
Installing rspec-expectations 2.14.5
Fetching rspec-mocks 2.14.6
Installing rspec-mocks 2.14.6
Fetching rspec 2.14.1
Installing rspec 2.14.1
Bundle complete! 4 Gemfile dependencies, 11 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
rake aborted!
NoMethodError: undefined method `last_comment' for #<Rake::Application:0x000055d28eb79650>
/usr/local/bundle/gems/rspec-core-2.14.8/lib/rspec/core/rake_task.rb:118:in `initialize'
/src/ruby-runtime/Rakefile:10:in `new'
/src/ruby-runtime/Rakefile:10:in `<top (required)>'
/usr/local/bundle/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [cd ruby-runtime && bundle install && rake ...]
/src/Rakefile:4:in `block (2 levels) in <top (required)>'
Tasks: TOP => test => test:ruby_runtime
(See full trace by running task with --trace)

@jglick
Copy link
Member

jglick commented Apr 17, 2018

Well with the help of this Googled tip I could

diff --git a/ruby-runtime/jenkins-plugin-runtime.gemspec b/ruby-runtime/jenkins-plugin-runtime.gemspec
index 9788671..552da2d 100644
--- a/ruby-runtime/jenkins-plugin-runtime.gemspec
+++ b/ruby-runtime/jenkins-plugin-runtime.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
   s.add_dependency "json"
   s.add_dependency "slop", "~> 3.0.2"
 
-  s.add_development_dependency "rake"
+  s.add_development_dependency "rake", "< 11.0"
   s.add_development_dependency "rspec", "~> 2.14.1"
   s.add_development_dependency "jenkins-war", "> 1.445"
 end

but other stuff is still broken in /usr/local/bundle/gems/jenkins-war-1.514/lib/jenkins/war.rb, whatever that is—I cannot find it in this repo.

@oleg-nenashev
Copy link
Member Author

@jglick I have found https://github.com/alexei38/jenkins-war which sounds promising. The original https://github.com/n-rodriguez/jenkins-war is deleted

@oleg-nenashev
Copy link
Member Author

@hsbt Are you the current maintainer of jenkins.rb? If yes, we would appreciate help with migrating fixes to https://github.com/jenkinsci/jenkins.rb and releasing them. Currently some Ruby-dependennt Jenkins plugins cannot work properly on Jenkins 2.102+, e.g. CI Skip Plugin in https://issues.jenkins-ci.org/browse/JENKINS-50616

@hsbt
Copy link
Member

hsbt commented Apr 24, 2018

@oleg-nenashev What should I do? I don't use Jenkins in today. I'm okay with takeover jenkins.rb project to you or other maintainers. Thanks.

@oleg-nenashev
Copy link
Member Author

@hsbt Ack, thanks for the update! Generally we need to understand why there is a codebase duplication between https://github.com/jenkinsci/ruby-runtime-plugin and https://github.com/jenkinsci/jenkins.rb/blob/master/java-runtime/ and what would be the best way to address it. Maybe you have some knowledge of that, which would be really helpful.

If you are fine, I will mark the Ruby Runtime plugin for adoption so that others could take its ownership if they are interested.

@oleg-nenashev
Copy link
Member Author

I have created https://issues.jenkins-ci.org/browse/JENKINS-51074 as a follow-up. Ruby Runtime plugin is also marked for adoption

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants