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

Introduce (configurable) strict validation mode for all endpoints


    • Type: Task
    • Status: Accepted
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API
    • Labels:


      • Introduce strict validation and throw errors in case of
        • unknown json properties
        • invalid constraints
        • unreachable secrets (possible?!)
        • missing required values
        • attempts to change the app ID via the given body
        • unspecified query parameters (as decribed in MARATHON-1688)
      • Introduce command line argument to configure if this behavior is enabled or not.

      Strict mode implementation in slightly different context: https://phabricator.mesosphere.com/D703
      Thoughts from Ioannis Charalampidis on Error Messages in the DC/OS UI

      Todo in this review:

      • Remove validation endpoint dependency
      • Solve problem of nested types (see failing test)

      This should include strictly validating spec IDs. When updating an app via a PUT or PATCH, the AppsResource silently swallows changes to the id property. See here for the related code in 1.5.

      Users might intend to actually duplicate the app with the given name, or try to rename the app, which is not possible. Refer to MARATHON-7642. The pods endpoint issues a BAD_REQUEST for this action, so the AppsResource should arguably do the same.


          Issue Links



              • Assignee:
                junterstein Johannes Unterstein
                Orchestration Team
                Johannes Unterstein, Marco Monaco, Matthias Eichstedt
              • Watchers:
                3 Start watching this issue


                • Created: