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-49707] Agent missing after controller restart to fail resumption of node step, not kill whole build #180

Merged
merged 92 commits into from
Oct 17, 2022

Commits on Nov 16, 2021

  1. Configuration menu
    Copy the full SHA
    fec8b95 View commit details
    Browse the repository at this point in the history
  2. Amending test from jenkinsci#34

    jglick committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    5bb6378 View commit details
    Browse the repository at this point in the history
  3. Fixing Callback

    jglick committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    aeb67be View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Configuration menu
    Copy the full SHA
    aa00f8d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    57e1ed0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b43f084 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2021

  1. Configuration menu
    Copy the full SHA
    8796113 View commit details
    Browse the repository at this point in the history
  2. FilePathDynamicContext must take precedence over `ExecutorStepDynam…

    …icContext.FilePathTranslator`
    jglick committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    802accd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f0878c View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Fixing `ExecutorStepTest.nodeDisconnectMissingContextVariableExceptio…

    …n` by copying some diagnostic code from `FilePathDynamicContext`
    jglick committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    bfac529 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d03e043 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98fe3e8 View commit details
    Browse the repository at this point in the history
  4. Javadoc imports

    jglick committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    f149cdb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f798bfa View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. Configuration menu
    Copy the full SHA
    f8bcbe6 View commit details
    Browse the repository at this point in the history
  2. User-visible logging about 5m timeout now that `ExecutorPickle.printW…

    …aitingMessage` is unused
    jglick committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    3a6bad4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c0f41b View commit details
    Browse the repository at this point in the history
  4. Move TIMEOUT_WAITING_FOR_NODE_MILLIS from ExecutorPickle to `Exec…

    …utorStepExecution`
    jglick committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    1cc20e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    65a5749 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2d03a46 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. Do not block on FutureImpl.

    After jenkinsci/workflow-step-api-plugin#73 this caused `SecretsMasker` to block on a `KubernetesComputer`
    which in turn blocked provisioning of a `TaskListener`, causing `RestartPipelineTest.terminatedPodAfterRestart` to fail to find a message:
    
    ```
    FINE	o.j.p.w.s.d.DurableTaskStep$Execution#getWorkspace: rediscovering that terminated-pod-after-restart-1-8fb2m-j206k-8x125 has been removed and timeout has expired
    FINE	o.j.p.w.s.d.DurableTaskStep$Execution#_listener: JENKINS-34021: could not get TaskListener in CpsStepContext[9:sh]:Owner[terminated Pod After Restart/1:terminated Pod After Restart jenkinsci#1]
    java.util.concurrent.TimeoutException
    	at hudson.remoting.AsyncFutureImpl.get(AsyncFutureImpl.java:102)
    	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$Translator.get(ExecutorStepDynamicContext.java:115)
    Caused: java.io.IOException
    	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepDynamicContext$Translator.get(ExecutorStepDynamicContext.java:118)
    	at org.jenkinsci.plugins.workflow.steps.DynamicContext$Typed.get(DynamicContext.java:97)
    	at org.jenkinsci.plugins.workflow.cps.ContextVariableSet.get(ContextVariableSet.java:139)
    	at org.jenkinsci.plugins.workflow.cps.ContextVariableSet$1Delegate.doGet(ContextVariableSet.java:98)
    	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:75)
    	at org.csanchez.jenkins.plugins.kubernetes.pipeline.SecretsMasker$Factory.get(SecretsMasker.java:85)
    	at org.csanchez.jenkins.plugins.kubernetes.pipeline.SecretsMasker$Factory.get(SecretsMasker.java:73)
    	at org.jenkinsci.plugins.workflow.steps.DynamicContext$Typed.get(DynamicContext.java:95)
    	at org.jenkinsci.plugins.workflow.cps.ContextVariableSet.get(ContextVariableSet.java:139)
    	at org.jenkinsci.plugins.workflow.cps.CpsThread.getContextVariable(CpsThread.java:135)
    	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:297)
    	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:75)
    	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.getListener(DefaultStepContext.java:127)
    	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:87)
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution._listener(DurableTaskStep.java:421)
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.listener(DurableTaskStep.java:412)
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.getWorkspace(DurableTaskStep.java:363)
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:570)
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:553)
    	at …
    FINE	o.j.p.w.s.d.DurableTaskStep$Execution$NewlineSafeTaskListener#getLogger: creating filtered stream
    FINE	o.j.p.w.s.d.DurableTaskStep$Execution#_listener: terminated-pod-after-restart-1-8fb2m-j206k-8x125 has been removed for 15 sec, assuming it is not coming back
    ```
    jglick committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    b65ff1c View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2021

  1. A sh step could fail to find a workspace at the moment it starts.

    java.lang.NullPointerException
    	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:329)
    	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:319)
    	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:193)
    	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
    	at …
    jglick committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    1edef32 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6cd1cf2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2455149 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. Configuration menu
    Copy the full SHA
    64c123a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a54afe2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a49c9e View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2021

  1. jenkinsci/workflow-step-api-plugin#77 allows `retryNodeBlockSynchAcro…

    …ssRestarts` to be fixed
    jglick committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    a7f21b5 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Configuration menu
    Copy the full SHA
    0c554d3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5d83e63 View commit details
    Browse the repository at this point in the history
  3. Expanding MissingContextVariableException type list after noticing …

    …that `isUnix` requests `Launcher` not `FilePath`
    jglick committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    e138f6f View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2021

  1. Configuration menu
    Copy the full SHA
    8beb608 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8800d55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c71521 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b5880ca View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Configuration menu
    Copy the full SHA
    b78373e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1b4bb7 View commit details
    Browse the repository at this point in the history
  3. Deleting comment; for now it seems clearest to keep `ExecutorStepDyna…

    …micContext` as a distinct type
    jglick committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    3f0e140 View commit details
    Browse the repository at this point in the history
  4. Resolve longstanding tech debt from jenkinsci#104 & jenkinsci#117 abo…

    …ut `BodyExecution`.
    
    When we do not use pickles, there is no need for `transient`.
    Moving the reference to `ExecutorStepExecution` from `PlaceholderTask` avoids a memory leak.
    This is only possible now that `Callback` holds the `ExecutorStepExecution`.
    And we can now properly handle `AsynchronousExecution.interrupt`.
    jglick committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    dbc3387 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

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

Commits on Jan 7, 2022

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

Commits on Mar 14, 2022

  1. Configuration menu
    Copy the full SHA
    6a9854c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75b2375 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. Configuration menu
    Copy the full SHA
    79d4ff0 View commit details
    Browse the repository at this point in the history
  2. Allowing FilePathDynamicContext to block waiting for an agent to re…

    …connect.
    
    Not great since the CPS VM thread will only grant 5s.
    Better would be to avoid unnecessary use of `StepContext.get(FilePath.class)`
    (which implicitly requires a live `Channel`);
    perhaps `FilePathRepresentation` should become an API.
    Amends b65ff1c.
    jenkinsci#180 (comment)
    jglick committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    8b08398 View commit details
    Browse the repository at this point in the history
  3. Adding a comment about 8b08398

    jglick committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    46821ed View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2022

  1. Configuration menu
    Copy the full SHA
    db3d043 View commit details
    Browse the repository at this point in the history
  2. Refining 8b08398 to avoid tail call

    jglick committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    f4660d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    242f829 View commit details
    Browse the repository at this point in the history
  4. SpotBugs reminds me that WorkspaceStepExecution.Callback needs an S…

    …VUID; taking one from trunk
    jglick committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    8e25c8f View commit details
    Browse the repository at this point in the history
  5. Adding NodeTranslator

    jglick committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    1c42f39 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2022

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

Commits on May 3, 2022

  1. Configuration menu
    Copy the full SHA
    39b0bd3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b82cc9 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Configuration menu
    Copy the full SHA
    56e8777 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3035961 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02fbe3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7231de1 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2022

  1. Removing bogus waitForMessage (and unnecessary interrupt) from `u…

    …nrestorableAgent`. Sometimes a failing `waitForMessage` seems to trigger https://maven.apache.org/surefire/maven-surefire-plugin/faq.html#corruptedstream though I cannot track down why.
    jglick committed May 13, 2022
    Configuration menu
    Copy the full SHA
    c663479 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

  1. Configuration menu
    Copy the full SHA
    7cd4bdd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c134cc4 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

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

Commits on Jun 3, 2022

  1. Configuration menu
    Copy the full SHA
    f46dd04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f76de40 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    974a71e View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Configuration menu
    Copy the full SHA
    67f2180 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0a995a3 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Configuration menu
    Copy the full SHA
    9a63dd9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59ce004 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7b49dcb View commit details
    Browse the repository at this point in the history
  4. Forgot to make canceledQueueItem not use sh, though it should not…

    … really matter since this step is expected to fail anyway
    jglick committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    0a5c299 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2022

  1. Configuration menu
    Copy the full SHA
    b9618c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05c77e0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    48950fd View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2022

  1. Configuration menu
    Copy the full SHA
    b2bf524 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ebbf94 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a8e223 View commit details
    Browse the repository at this point in the history
  4. Responding to CancellationException in ExecutorStepDynamicContext

    … with `QueueTaskCancelled`, analogous to handling in `ExecutorPickle`
    jglick committed Jul 9, 2022
    Configuration menu
    Copy the full SHA
    2699896 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

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

Commits on Jul 19, 2022

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

Commits on Jul 21, 2022

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

Commits on Jul 22, 2022

  1. Configuration menu
    Copy the full SHA
    26175b3 View commit details
    Browse the repository at this point in the history
  2. Normalizing indentation

    jglick committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    8d39d15 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2e95e3a View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2022

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

Commits on Sep 8, 2022

  1. jenkinsci/workflow-step-api-plugin#124 deprecates an overload which 2…

    …e95e3a only handles at one call site; TBD if others should be switched to `actualInterruption`
    jglick committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    efdb6ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97365d4 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2022

  1. Configuration menu
    Copy the full SHA
    edbd309 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e022b6b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4b48432 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    84036f7 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

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