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

Expose WebAppMain#DEFAULT_RING_BUFFER_SIZE actual value

    XMLWordPrintable

Details

    • 2.259

    Description

      For Evergreen, we want to detect if already too many logs were generated before the Evergreen Jenkins Plugin even had time to start up.

      The rationale being: if there are already 256 logs when plugin startup state is attained, then there is something (very) wrong per-se.

      The goal is to be able to do something like:

      if (Jenkins.logRecords.size() >= WebAppMain.getDefaultRingBufferSize()) {
          LOGGER.log(Level.SEVERE,
                     "The Jenkins logs buffer is already full. " +
                             "Some logs might have been missed, and so many logs shows something probably very wrong! (max={0})",
                     maxNumberOfLogs);
      }
      

      Currently, as an intermediate shim, I'm using reflection. In addition to being dirty, this is likely to become even more an issue to support Java 9 when using such hacks is being made harder and harder.

      Attachments

        Issue Links

          Activity

            batmat Baptiste Mathus created issue -
            batmat Baptiste Mathus made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-49805 [ JENKINS-49805 ]

            Code changed in jenkins
            User: Baptiste Mathus
            Path:
            src/main/java/io/jenkins/plugins/essentials/logging/EssentialsLoggingConfigurer.java
            http://jenkins-ci.org/commit/essentials-plugin/5f42dc4e3cca1981dc7c5636b4139731c0d16ec4
            Log:
            JENKINS-50669 reflective access shim

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Baptiste Mathus Path: src/main/java/io/jenkins/plugins/essentials/logging/EssentialsLoggingConfigurer.java http://jenkins-ci.org/commit/essentials-plugin/5f42dc4e3cca1981dc7c5636b4139731c0d16ec4 Log: JENKINS-50669 reflective access shim
            batmat Baptiste Mathus made changes -
            Sprint Essentials - Milestone 1 [ 511 ] Essentials - Milestone 2 [ 516 ]
            batmat Baptiste Mathus made changes -
            Labels essentials essentials-triggered essentials essentials-triggered technical-debt
            batmat Baptiste Mathus made changes -
            Labels essentials essentials-triggered technical-debt essentials essentials-triggered evergreen technical-debt
            batmat Baptiste Mathus made changes -
            Labels essentials essentials-triggered evergreen technical-debt essentials essentials-triggered evergreen evergreen-triggered technical-debt
            batmat Baptiste Mathus made changes -
            Labels essentials essentials-triggered evergreen evergreen-triggered technical-debt evergreen evergreen-triggered technical-debt
            batmat Baptiste Mathus made changes -
            Description For Essentials, we want to detect if already too many logs were generated before the _Essentials Jenkins Plugin_ even had time to start up.

            The rationale being: if there are already 256 logs when plugin startup state is attained, then there is something (very) wrong per-se.

            The goal is to be able to do something like:

            {code:java}
            if (Jenkins.logRecords.size() >= WebAppMain.getDefaultRingBufferSize()) {
                LOGGER.log(Level.SEVERE,
                           "The Jenkins logs buffer is already full. " +
                                   "Some logs might have been missed, and so many logs shows something probably very wrong! (max={0})",
                           maxNumberOfLogs);
            }
            {code}

            Currently, as an intermediate shim, I'm using reflection. In addition to being dirty, this is likely to become even more an issue to support Java 9 when using such hacks is being made harder and harder.
            For Evergreen, we want to detect if already too many logs were generated before the _Evergreen Jenkins Plugin_ even had time to start up.

            The rationale being: if there are already 256 logs when plugin startup state is attained, then there is something (very) wrong per-se.

            The goal is to be able to do something like:

            {code:java}
            if (Jenkins.logRecords.size() >= WebAppMain.getDefaultRingBufferSize()) {
                LOGGER.log(Level.SEVERE,
                           "The Jenkins logs buffer is already full. " +
                                   "Some logs might have been missed, and so many logs shows something probably very wrong! (max={0})",
                           maxNumberOfLogs);
            }
            {code}

            Currently, as an intermediate shim, I'm using reflection. In addition to being dirty, this is likely to become even more an issue to support Java 9 when using such hacks is being made harder and harder.
            batmat Baptiste Mathus made changes -
            Labels evergreen evergreen-triggered technical-debt evergreen evergreen-triggered n technical-debt
            batmat Baptiste Mathus made changes -
            Labels evergreen evergreen-triggered n technical-debt evergreen evergreen-triggered newbie-friendly technical-debt
            batmat Baptiste Mathus made changes -
            Sprint Evergreen - Milestone 2 [ 516 ]
            batmat Baptiste Mathus made changes -
            Assignee Baptiste Mathus [ batmat ]
            ddevpros Ben A made changes -
            Assignee Ben A [ ddevpros ]
            andreineagu Andrei Neagu made changes -
            Assignee Ben A [ ddevpros ] Andrei Neagu [ andreineagu ]
            andreineagu Andrei Neagu made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            markewaite Mark Waite made changes -
            Remote Link This issue links to "PR 4448 Public API to read RingBufferLogHandler size (Web Link)" [ 24360 ]
            danielbeck Daniel Beck added a comment -

            danielbeck Daniel Beck added a comment -
            danielbeck Daniel Beck made changes -
            Released As 2.259
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              andreineagu Andrei Neagu
              batmat Baptiste Mathus
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: