Job configuration submission should be a bulk change

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When I submit an empty Freestyle job config in the default configuration of Jenkins 2.35, the data is being saved to the disk 8 times. All of them happen in this code: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Job.java#L1227-L1246

      • setDisplayName
      • Project#getBuildWrappersList().rebuild (onModified handler)
      • Project#getBuilderList().rebuild (onModified handler)
      • Project#getPublisherList().rebuild (onModified handler)
      • AbstractProject#makeDisabled
      • AbstractProject#setScm
      • AbstractProject#triggers.replaceBy
      • final save()

      I think there is not so much sense to submit partial configurations to the disk due to the risk of data inconsistency there. I propose to wrap the selected code segment into a bulk operation

            Assignee:
            Oleg Nenashev
            Reporter:
            Oleg Nenashev
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: