Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69172

Unable to unshelve change: java.lang.IllegalStateException: Expected 1 instance of hudson.model.User$AllUsers but got 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • p4-plugin
    • Jenkins 2.346.2
      P4 Plugin Version 1.13.0
      p4 Version Rev. P4/NTX64/2021.2/2273812 (2022/04/14).
      OS Name Microsoft Windows Server 2019 Datacenter
      OS Version 10.0.17763 Build 17763
      OS System Manufacturer Amazon EC2

      After updating the plugin from v1.12.4 to v1.13.0 our unshelve operations resulted in the following error that looks related to saving the unshelve change to the changelog file:

      [2022-07-28T21:22:34.503Z] P4 Task: unshelve review: 1153859
      [2022-07-28T21:22:34.512Z] (p4):cmd:... p4 unshelve -f -s1153859 -cdefault
      [2022-07-28T21:22:34.512Z] p4 unshelve -f -s1153859 -cdefault
      ...
      [2022-07-28T21:22:34.676Z] ... duration: (173ms)
      [2022-07-28T21:22:34.709Z] (p4):cmd:... p4 change -o 1153859
      [2022-07-28T21:22:34.709Z] p4 change -o 1153859
      [2022-07-28T21:22:34.709Z] 
      [2022-07-28T21:22:34.719Z] (p4):stop:11
      [2022-07-28T21:22:34.781Z] (p4):stop:exception
      [2022-07-28T21:22:34.781Z] 
      [2022-07-28T21:22:34.781Z] Unable to unshelve change: java.lang.IllegalStateException: Expected 1 instance of hudson.model.User$AllUsers but got 0

      Rolling back the plugin to v1.12.4 unblocked us:

      [2022-07-28T22:09:46.594Z] P4 Task: unshelve review: 1153859
      [2022-07-28T22:09:46.604Z] (p4):cmd:... p4 unshelve -f -s1153859 -cdefault
      [2022-07-28T22:09:46.604Z] p4 unshelve -f -s1153859 -cdefault
      ...
      [2022-07-28T22:09:46.780Z] ... duration: (186ms)
      [2022-07-28T22:09:46.780Z] P4 Task: resolve: -Safe (-as)
      [2022-07-28T22:09:46.791Z] (p4):cmd:... p4 resolve -am C:\Workspace/...
      [2022-07-28T22:09:46.791Z] p4 resolve -am C:\Workspace/...
      [2022-07-28T22:09:46.791Z] 
      [2022-07-28T22:09:46.800Z] C:\Workspace/... - no file(s) to resolve.
      [2022-07-28T22:09:46.800Z] 
      [2022-07-28T22:09:46.800Z] (p4):stop:11
      [2022-07-28T22:09:46.800Z] ... duration: (20ms)

      This is the configuration of the unshelve command we are running:

      p4unshelve(
        credential: env.P4CREDENTIAL,                            
        ignoreEmpty: true,
        resolve: "Safe (-as)",
        shelf: params.Shelveset,
        tidy: false,
        workspace: streamSpec(
          charset: "auto",
          format: env.P4WORKSPACE,
          pinHost: false,
          streamName: env.P4STREAM
        )
      )

       

            Unassigned Unassigned
            kuzman Trent Kuzman
            Votes:
            10 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: