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

ItemListener.onUpdated() isn't fired when modifying Item

    • 2.460, 2.452.2

      When a Seed job creates a new Item (e.g. a Job) by this plugin ItemListener.onCreated() is fired as expected.

      When a Seed job is executed for second (or yet another) time ItemListener.onUpdated() isn't fired even the Item is modified by this way.

          [JENKINS-64553] ItemListener.onUpdated() isn't fired when modifying Item

          Markus Winter added a comment -

          The root cause is in core where after posting the xml the ItemListener is not called. Same happens when using the CLI to update a job.

          Markus Winter added a comment - The root cause is in core where after posting the xml the ItemListener is not called. Same happens when using the CLI to update a job.

          On my side this is not fully fixed after upgrading to 2.452.2 At least not using organization folder. When saving them via UI all good, but not via JobDSL or CLI

          Basically I have an inline pipeline with a marker file (pom.xml) that build everything that have a pom.xml at the root.

          When updating this inline pipeline via CLI or JobDSL it's not propagated on child. So when running job and "old" pipeline is used.

          When saving via UI everything works and is updated.

          Not sure if it's the same bug or something related to multibranch or even `inline-pipeline`

          I will try to give reproduction steps later

          Valentin Delaye added a comment - On my side this is not fully fixed after upgrading to 2.452.2 At least not using organization folder. When saving them via UI all good, but not via JobDSL or CLI Basically I have an inline pipeline with a marker file (pom.xml) that build everything that have a pom.xml at the root. When updating this inline pipeline via CLI or JobDSL it's not propagated on child. So when running job and "old" pipeline is used. When saving via UI everything works and is updated. Not sure if it's the same bug or something related to multibranch or even `inline-pipeline` I will try to give reproduction steps later

          I've created a repo to reproduce the issue: https://github.com/jonesbusy/jenkins-reproduce

          My workaround for my use case is to reforce the scan of the organisation folder which update children items.

          Not sure if it's the normal behavior when updating jobs via CLI or JobDSL. Saving via the UI rescan the organization folder which update the items

          So it's probably a different issue than this one

          Valentin Delaye added a comment - I've created a repo to reproduce the issue: https://github.com/jonesbusy/jenkins-reproduce My workaround for my use case is to reforce the scan of the organisation folder which update children items. Not sure if it's the normal behavior when updating jobs via CLI or JobDSL. Saving via the UI rescan the organization folder which update the items So it's probably a different issue than this one

            mawinter69 Markus Winter
            pajasoft Pavel JanouĊĦek
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: