Skip to content

feat(integration): initialize Params map if nil in GetTaskDefinition#4089

Open
befika wants to merge 2 commits into
semaphoreui:developfrom
befika:fix/integration-extract-task-params
Open

feat(integration): initialize Params map if nil in GetTaskDefinition#4089
befika wants to merge 2 commits into
semaphoreui:developfrom
befika:fix/integration-extract-task-params

Conversation

@befika

@befika befika commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Fixed task parameter extraction when the task definition starts with an uninitialized parameters map.
    • Extracted values are now stored successfully instead of causing an error.
  • Tests

    • Added an integration test covering task parameter extraction from request data when the parameter map is initially nil/uninitialized.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 560f14d9-4b13-456f-9ac5-01e4cc23c156

📥 Commits

Reviewing files that changed from the base of the PR and between 7fa0dcc and 4feffcb.

📒 Files selected for processing (2)
  • api/integration.go
  • api/integration_test.go

📝 Walkthrough

Walkthrough

GetTaskDefinition now initializes a nil task parameter map before writing extracted values. An integration test verifies extraction stores data.limit as task.Params["limit"].

Changes

Task parameter extraction

Layer / File(s) Summary
Initialize and validate extracted task parameters
api/integration.go, api/integration_test.go
GetTaskDefinition allocates taskDefinition.Params when nil, and the integration test verifies extracted task values are populated.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: fiftin

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: initializing the Params map when nil in GetTaskDefinition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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