You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Backend: required metadata is never enforced when creating a mission #2474
POST /missions should reject a mission that is missing one of its project's required metadata types (unless ignoreTags / ignoreMissingMetadata is set). The check can never fire, because it joins its three conditions with &&:
A value can't be undefined, '' and null at once, so missingTags is always empty and the ConflictException ("All required tags must be provided …") is dead code. The eslint-disable-next-line @typescript-eslint/no-unnecessary-condition comments hide the lint warning that points at this.
The web UI and the CLI check required metadata on the client side. A request made straight to the API (or by any other client) can create a mission without its required metadata.
Fix
Use ||, and probably treat whitespace-only strings as missing too. Add an API test that creates a mission without a required metadata type and expects 409, plus one that sets ignoreMissingMetadata and expects success.
This changes behaviour: clients that currently get away with missing required metadata will start getting 409. Worth a line in the release notes.
After #2473 the code is in the same place, using the new names (requiredMetadataTypes, metadata ?? tags, ignoreMissingMetadata ?? ignoreTags).
Hi! I'd like to work on this. I have a fix ready: the required-metadata check now uses || (and treats blank strings as missing), with API tests for the 409 case and for ignoreMissingMetadata / ignoreTags. I'll open a PR against dev shortly.
Activity
VARUN3WARE commentedon Oct 4, 2026
Hi! I'd like to work on this. I have a fix ready: the required-metadata check now uses
||(and treats blank strings as missing), with API tests for the 409 case and forignoreMissingMetadata/ignoreTags. I'll open a PR againstdevshortly.fix(backend): enforce required metadata when creating a mission