Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-8458

Remove API heavy events from Marathon repository

    Details

      Description

      Overview

      API heavy events was hard removed in 1.8.0

      src/main/scala/mesosphere/marathon/DeprecatedFeatures.scala

        25 |   val apiHeavyEvents = DeprecatedFeature(
        26 |     "api_heavy_events",
        27 |     description = "Enables the legacy heavy events format returned via /v2/events which makes /v2/events unusable in larger cluster. Light events are returned with /v2/events?plan-format=light and include a subset of the fields.",
        28 |     softRemoveVersion = SemVer(1, 7, 0),
        29 |     hardRemoveVersion = SemVer(1, 8, 0))
        30 | 
      

      Acceptance criteria

      The deprecated feature flag is not removed

      The parameter allowHeavyEvents, and all dependent code branches followed when that value was true, is removed:

      marathon/src/main/scala/mesosphere/marathon/core/event/impl/stream/HttpEventStreamServlet.scala

        30 |     emitter: Emitter, allowHeavyEvents: Boolean) extends HttpEventStreamHandle {
        31 | 
      

      fullJsonString and lightJsonString are both removed. References are replaced with direct invocation of eventToJson, or potentially a Json formatter for MarathonEvent.

      marathon/src/main/scala/mesosphere/marathon/core/event/Events.scala

        22 |   @JsonIgnore
        23 |   lazy val fullJsonString: String = Json.stringify(eventToJson(this, false))
        24 | 
        25 |   @JsonIgnore
        26 |   lazy val lightJsonString: String = Json.stringify(eventToJson(this, true))
        27 | }
      

      The lightweightPlan parameter is removed:

      marathon/src/main/scala/mesosphere/marathon/api/v2/json/Formats.scala

       371 |   def eventToJson(event: MarathonEvent, lightweightPlan: Boolean): JsValue = event match {
      

      All "<entity}>Writes" Json formatters overwrite "<entity>Writes"

      The documentation is updated to remove all references to plan-format, IE

      marathon/docs/docs/rest-api/public/api/v2/events.raml

        19 |     plan-format:
        20 |         required: false
        21 |         description:
        22 |             Indicate whether to receive "light" events or full events including
        23 |             deployment plans. Defaults to full events.
        24 | 
      

      No mentions of "plan-format" (except in changelog) are found in the Marathon repository.

      The heavy event tests are removed from ./src/test/scala/mesosphere/marathon/core/event/impl/stream/HttpEventSSEHandleTest.scala; all mentions of "light" plans in test names are removed.

        Attachments

          Activity

            People

            • Assignee:
              tarunguptaakirala Tarun Gupta Akirala
              Reporter:
              tharper Tim Harper
              Team:
              Orchestration Team
              Watchers:
              Tarun Gupta Akirala, Tim Harper
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: