feat(dev): add local Function App server - #3188
Conversation
Register a feature-gated development server for Function Apps with reload support and Toolkit authentication. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
CI runners force ANSI color, which makes Rich split option names like --host across style codes, breaking substring assertions on rendered help text. Also fixes an import-order lint flagged by CI's pinned Ruff version. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Description
Adds
cdf dev function servefor local Cognite Function App development. The command starts the Function Apps ASGI development server with Toolkit authentication in either default reload or--no-reloadmode.The command is protected by the hidden
FUNCTION_APPSalpha flag. Enable it incdf.toml:Install its optional dependencies with:
Safety and behavior
CDF_BUILD_TYPE=prod.Validation
uv run pytest tests/test_unit -n8— 3260 passed, 32 skippeduv run ruff check ...anduv run mypy ...uv run pre-commit run --show-diff-on-failure --color=always --all-files--no-reload:/internal/healthand/docsreturn 200/internal/healthand/docsreturn 200handler.pycopy triggers reload and serves health successfully afterwardCoverage note
Coverage cannot currently collect any Toolkit tests in this environment:
pytest-covfails before collection while the existing Pandas/NumPy import chain initializes (numpy: cannot load module more than once per process). The ordinary full test suite is unaffected.Bump