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

[JENKINS-36871] JNLPProtocol4 #92

Merged
merged 77 commits into from
Aug 11, 2016
Merged

[JENKINS-36871] JNLPProtocol4 #92

merged 77 commits into from
Aug 11, 2016

Commits on Jul 22, 2016

  1. Configuration menu
    Copy the full SHA
    8656468 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc00197 View commit details
    Browse the repository at this point in the history
  3. [JENKINS-36871] Need a SettableFuture and ListenableFuture withou…

    …t relying on external dependencies
    stephenc committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    3aa27ec View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e3f300 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a10785b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    960ea6e View commit details
    Browse the repository at this point in the history
  7. [JENKINS-36871] Findbugs!

    stephenc committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    82f43c7 View commit details
    Browse the repository at this point in the history
  8. [JENKINS-36871] Need some stream adapters to help with our ByteBuffer…

    …CommandTransport optimized implementation
    
    - The original implementation we had could not access some of the required methods due to being outside of the `hudson.remoting` package, so we didn't need these wrappers
    stephenc committed Jul 22, 2016
    Configuration menu
    Copy the full SHA
    c3e3262 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2016

  1. [JENKINS-36871] Add support for mark(limit) to the input stream

    - Some of the tests require JUnit 4.12
    stephenc committed Jul 27, 2016
    Configuration menu
    Copy the full SHA
    3707dfc View commit details
    Browse the repository at this point in the history
  2. [JENKINS-36871] Sync with latest version containing fix for NPE that …

    …occurs in "fast" protocols
    stephenc committed Jul 27, 2016
    Configuration menu
    Copy the full SHA
    402973c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b42be51 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9f2ef5d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    26f477f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2923f11 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    791292b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    06d9710 View commit details
    Browse the repository at this point in the history
  9. [JENKINS-36871] Add the v1 basic stress tester

    - Resurected from history as we will be forced to diverge to map against the JNLPProtocol APIs rather than follow the nicer implementation path from CJOC
    stephenc committed Jul 27, 2016
    Configuration menu
    Copy the full SHA
    509ac4f View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2016

  1. [JENKINS036871] Refactoring the API for protocols to make it symmetri…

    …c within remoting
    
    - rather than having one half of the protocol in jenkins and the other half in remoting.
    - I need to write tests for this and then remote the old classes
    stephenc committed Jul 29, 2016
    Configuration menu
    Copy the full SHA
    ff0f070 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4c8b49f View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2016

  1. Configuration menu
    Copy the full SHA
    124439e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    707bfe8 View commit details
    Browse the repository at this point in the history
  3. [JENKINS-36871] Unnecessary reset of length

    - Also causes commands that span multiple frames to be corrupted
    stephenc committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    7062224 View commit details
    Browse the repository at this point in the history
  4. [JENKINS-36871] Found an infinite loop under certain error state disc…

    …onnects
    
    - Don't think this affected any real protocols, but better to fix after finding
    stephenc committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    90425ad View commit details
    Browse the repository at this point in the history
  5. [JENKINS-36871] Slightly faster code path to get hex conversion

    - Avoids intermediate String representation. Could probably get faster still with BigInteger and zero-left-pad but it becomes harder to understand
    stephenc committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    d2504bc View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2016

  1. Configuration menu
    Copy the full SHA
    0ef5cac View commit details
    Browse the repository at this point in the history
  2. [JENKINS-36871] When tiered compilation kicks in, sometimes you can g…

    …et concurrent modification exceptions
    
    - They'll recover, but better is not to have to worry about it at all
    stephenc committed Aug 3, 2016
    Configuration menu
    Copy the full SHA
    adc6014 View commit details
    Browse the repository at this point in the history
  3. [JENKINS-36871] Suppress extra socket connection when all protocols h…

    …ave been tried
    
    - Also better setup of the SSLContext
    stephenc committed Aug 3, 2016
    Configuration menu
    Copy the full SHA
    9ad1ed1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a065e8a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6449a73 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8bb6354 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a6e45c5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0ac6dc3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d999b95 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    fc646c3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    aae74ae View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7d003c8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    38cd6e4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    bbb5865 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d40ca3d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4bc69f2 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2016

  1. [JENKINS-36871] Allow a filter to call completed() from both the re…

    …ceive and send sides without bombing out.
    
    Prevents stack traces such as
    
    ```
    Exception in thread "main" java.lang.IllegalStateException: Filter has already been completed
    	at org.jenkinsci.remoting.protocol.FilterLayer.completed(FilterLayer.java:106)
    	at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.complete(ConnectionHeadersFilterLayer.java:365)
    	at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.doSend(ConnectionHeadersFilterLayer.java:498)
    	at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doSend(ProtocolStack.java:691)
    	at org.jenkinsci.remoting.protocol.ApplicationLayer.write(ApplicationLayer.java:157)
    	at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.start(ChannelApplicationLayer.java:226)
    	at org.jenkinsci.remoting.protocol.ProtocolStack.init(ProtocolStack.java:202)
    	at org.jenkinsci.remoting.protocol.ProtocolStack.access$700(ProtocolStack.java:107)
    	at org.jenkinsci.remoting.protocol.ProtocolStack$Builder.build(ProtocolStack.java:555)
    	at org.jenkinsci.remoting.engine.JnlpProtocol4PlainHandler.connect(JnlpProtocol4PlainHandler.java:149)
    	at org.jenkinsci.remoting.engine.JnlpProtocolHandler.connect(JnlpProtocolHandler.java:140)
    	at org.jenkinsci.remoting.engine.HandlerLoopbackLoadStress.startClient(HandlerLoopbackLoadStress.java:466)
    	at org.jenkinsci.remoting.engine.HandlerLoopbackLoadStress.main(HandlerLoopbackLoadStress.java:426)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    ```
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    75c4cf7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6da1cb4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d942165 View commit details
    Browse the repository at this point in the history
  4. [JENKINS-36871] WIndows!?!

    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    4b291b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6cd9145 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    74bf4fa View commit details
    Browse the repository at this point in the history
  7. [JENKINS-36871] Stripped back higher performance ByteBufferQueue Inpu…

    …tStream implementation
    
    - Drops support for mark and unbounded read in return for faster performance
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    8e595fc View commit details
    Browse the repository at this point in the history
  8. [JENKINS-36871] Switch to FastByteBufferQueueInputStream

    - We don't need the general purpose mark support or unbounded reads, so lets get more performance
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    3c0db40 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b5656c0 View commit details
    Browse the repository at this point in the history
  10. [JENKINS-36871] Blocking I/O is faster when you have very few connect…

    …ions, so allow preference declaration
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    1edda2b View commit details
    Browse the repository at this point in the history
  11. [JENKINS-36871] The code was missing a NOTICE and LICENSE files

    - You'll see why I spotted this next
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    c8be845 View commit details
    Browse the repository at this point in the history
  12. [JENKINS-36871] Add a load testing client

    - This needs its own LICENSE and NOTICE files as it includes things like JUnit
    stephenc committed Aug 5, 2016
    Configuration menu
    Copy the full SHA
    19093e3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    41841e5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0529c15 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2ce2f8a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    ac9bcab View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ce597c3 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2016

  1. Configuration menu
    Copy the full SHA
    b753232 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2016

  1. Configuration menu
    Copy the full SHA
    75b173a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2cea38c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb802b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    debffee View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2016

  1. [JENKINS-36871] Fix import

    stephenc committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    3275213 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d98828 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3631af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    04ec717 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    58d8400 View commit details
    Browse the repository at this point in the history
  6. [JENKINS-36871] Expose the enum

    - though this technically is OK as protected or package scope as any derived classes can implement and Enum is a public class so there is a parent type that people can reference
    stephenc committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    c7f2c9c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5a9530f View commit details
    Browse the repository at this point in the history
  8. [JENKINS-36871] Formatting

    stephenc committed Aug 9, 2016
    Configuration menu
    Copy the full SHA
    7da8a85 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a9b8cf1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c6168a6 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e406ea8 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2016

  1. [JENKINS-37302] Experiment seems to show that this fixes the failures

    - Of course we are now weakening the equality test, but since this has come through the cipher
      this shouldn't be too bad.
    stephenc committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    3bb5f48 View commit details
    Browse the repository at this point in the history
  2. [JENKINS-37302] Follow-up on cookie mangling

    - Found another set of cases where the cookie gets mangled, as the EngineUtil.readLine does a `.trim()`
      If the encrypted cookie happens to being or end with a whitespace character... boom
      A first order analysis looks only at the single bytes that could be whitespace.
      There are 9 such bytecodes, but that includes `\n` which we have already tested for
      So there is an 8 in 256 or 1 in 32 chance that the first character is whitespace
      There is a 31 in 32 chance that it is not and a 1 in 32 chance that the last is whitespace
      Thus (1/32 + 32/32*1/32) = 6%... or in total 28% of the time the generated cookies will
      be unusable with the current handshaking ciphers
    
    - Also stop creating throw-away instances of `SecureRandom` because that is a waste
    stephenc committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    5566751 View commit details
    Browse the repository at this point in the history
  3. [JENKINS-36871] Remove excessive synchronization and rollback findbug…

    …s introduced bug
    
    - We don't want to synchronize as that will cause issues during the close. We can rely on the stack for ensuring that reads are serialized and writes are serialized and the `channel` field is write once with the write guarded by the synchronized setup method
    stephenc committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    926307a View commit details
    Browse the repository at this point in the history
  4. [JENKINS-36871] Fix flaky test

     - On machines with fewer cores than my machine, the selector thread may not have processed the interest removal and hence the test can fail randomly for lower spec machines
    stephenc committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    247f15b View commit details
    Browse the repository at this point in the history