Skip to content

fix(deploy): disable idleTimeout when removed or set to 0 in yaml - #170

Merged
rsonghuster merged 1 commit into
masterfrom
fix/idle-timeout-disable
Oct 16, 2026
Merged

rsonghuster merged 1 commit into
masterfrom
fix/idle-timeout-disable

Conversation

@rsonghuster

@rsonghuster rsonghuster commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
  • Clear the online idleTimeout when the prop is removed from s.yaml: the component previously omitted the field from the update request, and UpdateFunction treats an omitted field as "keep old value", so the removal was silently ignored
  • Add idleTimeout: -1 to FC_RESOURCES_EMPTY_CONFIG so an unset prop resets the online value like other empty configs (-1 is the disable value, matching the state the console writes when the toggle is off)
  • Normalize idleTimeout: 0 / null in props to -1 during deploy, since the server rejects 0 (IdleTimeout is too small (min: 300)) and -1 is the only accepted value that disables it
  • Add unit tests covering unset / 0 / null / explicitly configured idleTimeout
  • Bump component version to 0.1.26

Summary by CodeRabbit

  • Bug Fixes
    • Idle timeout settings of 0 or null are now handled consistently during function deployment. When no timeout is configured, the default disables delayed release of elastic instances; other configured values are preserved.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 47a40ebc-2f69-455e-9761-0586332ac639
📥 Commits

Reviewing files that changed from the base of the PR and between f8f13d8 and 3d8ded4.

📒 Files selected for processing: 4
  • __tests__/ut/commands/deploy/impl/function_test.ts
  • publish.yaml
  • src/default/config.ts
  • src/subCommands/deploy/impl/function.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce115cd1-0565-417a-8e03-3b4dcabae80e
📥 Commits

Reviewing files that changed from the base of the PR and between 6af6661 and f8f13d8.

📒 Files selected for processing: 4
  • __tests__/ut/commands/deploy/impl/function_test.ts
  • publish.yaml
  • src/default/config.ts
  • src/subCommands/deploy/impl/function.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Function deployment now passes -1 when idleTimeout is omitted, 0, or null. Other values pass through unchanged. The default resource configuration sets idleTimeout to -1, and the component version changes to 0.1.26.

Changes: Function deployment idleTimeout

Layer / File(s) Summary
Normalize idleTimeout before deployment
src/default/config.ts, src/subCommands/deploy/impl/function.ts, __tests__/ut/commands/deploy/impl/function_test.ts, publish.yaml
The default configuration sets idleTimeout to -1. Service.run converts 0 and null to -1 before calling deployFunction, and preserves other values. Tests cover omitted, zero, null, and configured values. The component version changes to 0.1.26.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f8f13

The request carries -1 for the targeted idleTimeout values. The available evidence does not confirm whether the service accepts that sentinel, but it establishes no resulting deployment failure.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: disabling idleTimeout when it is removed or set to 0 in YAML. It matches the implementation and tests.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

UpdateFunction keeps the online value when the field is omitted, and the
server rejects 0 (min 300), so removing idleTimeout from s.yaml never
took effect. -1 is the only accepted value that disables it, matching
the state the console writes when the toggle is off.

- add idleTimeout: -1 to FC_RESOURCES_EMPTY_CONFIG so an unset prop
  clears the online value like other empty configs
- normalize idleTimeout 0/null in props to -1 during deploy
- add unit tests for unset/0/null/configured idleTimeout
- bump component version to 0.1.27
@rsonghuster
rsonghuster force-pushed the fix/idle-timeout-disable branch from f8f13d8 to 3d8ded4 Compare October 16, 2026 12:24
@rsonghuster
rsonghuster merged commit 9556231 into master Oct 16, 2026
6 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