Skip to content

feat: Add new deployment check option#950

Merged
efiop merged 8 commits intomainfrom
tyler/serv-52-deployment-check
Apr 28, 2026
Merged

feat: Add new deployment check option#950
efiop merged 8 commits intomainfrom
tyler/serv-52-deployment-check

Conversation

@tylbees
Copy link
Copy Markdown
Contributor

@tylbees tylbees commented Apr 1, 2026

No description provided.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

@efiop efiop force-pushed the tyler/serv-52-deployment-check branch from 03ff9bd to d5786ef Compare April 21, 2026 16:54
@efiop
Copy link
Copy Markdown
Contributor

efiop commented Apr 21, 2026

@claude review

@claude

This comment was marked as outdated.

@tylbees tylbees force-pushed the tyler/serv-52-deployment-check branch from d5786ef to 5a6ca8d Compare April 27, 2026 18:56
@efiop
Copy link
Copy Markdown
Contributor

efiop commented Apr 27, 2026

@claude review

@claude

This comment was marked as outdated.

@efiop
Copy link
Copy Markdown
Contributor

efiop commented Apr 27, 2026

@claude also pls double check that we are not breaking backward compat for public API in ‎projects/fal/src/fal/api . Like deploy() etc.

@claude

This comment was marked as outdated.

@tylbees
Copy link
Copy Markdown
Contributor Author

tylbees commented Apr 28, 2026

@claude review

@claude

This comment was marked as outdated.

@tylbees
Copy link
Copy Markdown
Contributor Author

tylbees commented Apr 28, 2026

@claude review

@claude

This comment was marked as outdated.

@efiop
Copy link
Copy Markdown
Contributor

efiop commented Apr 28, 2026

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 28, 2026

Claude finished @efiop's task in 2m 8s —— View job


Code Review

  • Read CLAUDE.md for repo-specific guidelines
  • Read changed files and git diff
  • Compare against previous review findings
  • Analyze code for bugs, security issues, and best practices
  • Post review feedback

Fixed since previous review

  • DeploymentCheckSummary.source is now rendered_render_deployment_check_summary now emits "Triggered by: {source}" (deploy_check.py:463), and test_render_deployment_check_summary_includes_triggered_by confirms it. The last review incorrectly marked this as still open — this was fixed.

Nit: source values are displayed as raw literals

deploy_check.py:463:

console.print(f"[bold]Triggered by:[/bold] {summary.source}")

This renders as Triggered by: flag, Triggered by: env, or Triggered by: admin. The type values are fine for developers but could be more readable for end users:

Current Suggested
flag --check flag
env FAL_DEPLOY_CHECK env var
admin admin policy

A small display-name mapping would fix this without touching the type.


Minor: _effective_scale_config double computation (still open since Apr 27)

deploy_check.py:270-271:

desired_config = _desired_scale_config(prepared)
effective_config = _effective_scale_config(prepared, production_alias)

_effective_scale_config (deploy_check.py:376) internally calls _desired_scale_config(prepared) itself, so _desired_scale_config runs twice per _build_deployment_check_summary call. Harmless, but _effective_scale_config could accept a pre-computed desired_config arg to skip the redundancy.


Minor: "After Deploy" column misleading for --reset-scale-required rows (still open since Apr 21)

deploy_check.py:310-321: When field in INHERITED_SCALE_FIELDS and reset_scale=False and desired_value != production_value, the row shows desired_value (the code value) in the "After Deploy" column, colored yellow, with the note "Code value will not apply without --reset-scale". The value that will actually be in production after deploy is production_value, not desired_value. The column header "After Deploy" implies the opposite. The yellow style and note mitigate this, but the label is still misleading — the column for these rows is displaying the code value, not the deployed value.


Nit: _admin_requires_deploy_check fail-open/fail-closed inconsistency

deploy_check.py:164-180:

  • Network exceptions / parse errors → return True (fail-closed ✅, fixed in last round)
  • Non-OK HTTP status (e.g. 500) → return False (fail-open)

A transient 500 from the server would silently skip the admin-required check. Consider treating 5xx responses the same as network exceptions (return True), while keeping return False only for 4xx (which suggest the user has no admin-level policy rather than a server fault).


Nit: Double get_app_data_from_toml lookup in non-check path (still open since Apr 21)

When app_ref is an app name, _resolve_team_and_app_ref (cli/deploy.py:49) reads the toml once for team resolution, then _resolve_deployment_reference (api/deploy.py:136-145) reads it again. Harmless but redundant.


Summary of open items

Issue Severity Status
source displayed as raw literal in "Triggered by:" Nit 🆕 New
_admin_requires_deploy_check inconsistent fail behavior for 5xx Nit 🆕 New
_effective_scale_config double computation Minor Still open (since Apr 27)
"After Deploy" column misleading for --reset-scale-required rows Minor Still open (since Apr 21)
Double get_app_data_from_toml lookup (non-check path) Nit Still open (since Apr 21)

The last medium issue ("source not rendered") is now closed. Remaining items are all minor/nit — this is otherwise ready to merge.

@efiop efiop merged commit e79b221 into main Apr 28, 2026
21 of 26 checks passed
@efiop efiop deleted the tyler/serv-52-deployment-check branch April 28, 2026 22:33
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.

2 participants