Skip to content

fix(tapis): tolerate empty-string parameter bindings#117

Merged
mosoriob merged 2 commits into
masterfrom
fix/tapis-empty-binding-crash
May 3, 2026
Merged

fix(tapis): tolerate empty-string parameter bindings#117
mosoriob merged 2 commits into
masterfrom
fix/tapis-empty-binding-crash

Conversation

@mosoriob
Copy link
Copy Markdown
Contributor

@mosoriob mosoriob commented May 3, 2026

Summary

  • Treat empty-string parameter bindings as unset in submitExecutions to avoid Tapis crash
  • Add regression tests in src/classes/tapis/tests/helpers.test.ts
  • Bump Dockerfile base image to Node 24

Test plan

  • npm test passes locally
  • Submit execution with a parameter bound to "" and confirm no crash

mosoriob added 2 commits May 1, 2026 18:29
POST /executionEngines/tapis crashed with "Cannot read properties of
undefined (reading 'match')" when an input parameter had no default value
and the user-supplied binding was an empty string. The empty string is
falsy, so neither branch in getInputsParameters assigned parameters[ip.id],
and the subsequent regex check on the value threw.

The crash propagated into handleSubmissionFailure, which then crashed on
this.seeds.length because seeds was never initialized before
seedExecutions threw. The cleanup mutation never ran and the original
error was masked.

- Guard the geojson regex with optional chaining so undefined values pass
  through unchanged.
- Initialize this.seeds = [] at the start of submitExecutions so the
  failure cleanup path always has a valid array.
- Add unit tests covering empty-string, populated, and default-value
  parameter cases.
@mosoriob mosoriob merged commit d5e7da0 into master May 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant