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

Introduce (configurable) strict validation mode for all endpoints

    Details

    • Type: Task
    • Status: Resolved
    • Priority: High
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API

      Description

      • 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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: