Skip to content

[CDTOOL-1707] add Python starter kit to the static config - #1877

Merged
kailan merged 2 commits into
mainfrom
cdtool-1707-python-starter-kit
Aug 7, 2026
Merged

kailan merged 2 commits into
mainfrom
cdtool-1707-python-starter-kit

Conversation

@kailan

@kailan kailan commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Change summary

Fixes CDTOOL-1707.

fastly compute init --language python reports that no starter kits exist:

$ fastly compute init --language python --non-interactive
ERROR: no default starter kits configured for this language; please specify a template using the --from flag.

Interactively it prints "No default starter kits are currently configured for this language" and falls back to prompting for a template git URL.

The starter kits embedded into the CLI binary are injected into pkg/config/config.toml at build time by ./scripts/config.sh, which holds its own hardcoded list of starter kit repositories. Python language support (#1811) added [language.python] to .fastly/config.toml and wired Python into NewLanguages(), but never added compute-starter-kit-python-default to that list — so kits.Python is empty and PromptForStarterKit takes its "no kits" branch. [language.python] is present, so compute build is unaffected; the gap is only starter kits.

This adds the repository to the list, plus a test asserting that every language offered at the compute init prompt has at least one starter kit in the static config, so the same drift is caught for the next language we add. CI generates the config with make config before running tests, so the test runs against the real generated config.

Depends on fastly/compute-starter-kit-python-default#6, which gives the kit a human-readable name in its fastly.toml. config.sh copies that field verbatim into the config, so until it merges the prompt renders [1] fastly-compute-python-app rather than [1] Default starter for Python. Nothing needs re-landing here once it merges — the config is regenerated on each build — but this PR should not be released before that one.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Verified end-to-end after make config:

$ fastly compute init --language python --non-interactive
...
SUCCESS: Initialized package proj

User Impact

Python users can init a project from the default starter kit instead of having to supply --from or paste a git URL.

Are there any considerations that need to be addressed for release?

No breaking changes and no config_version bump needed — NeedsUpdating already rewrites local configs when the CLI version changes, so existing users pick the new kit up on their next upgrade.

🤖 Generated with Claude Code

The starter kits embedded into the CLI binary are injected at build time
by ./scripts/config.sh, which holds a hardcoded list of starter kit
repositories. Python language support (#1811) never added the Python
starter kit to that list, so `compute init --language python` reported
that no starter kits were configured and fell back to asking the user
for a template git URL.

Add compute-starter-kit-python-default to the list, and a test that
asserts every language offered at the `compute init` prompt has at least
one starter kit in the static config, so the same drift is caught for
the next language we add.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kailan
kailan requested a review from a team as a code owner August 7, 2026 14:13
@kailan
kailan requested a review from philippschulte August 7, 2026 14:13
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@anthony-gomez-fastly anthony-gomez-fastly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kailan
kailan merged commit 199e896 into main Aug 7, 2026
14 checks passed
@kailan
kailan deleted the cdtool-1707-python-starter-kit branch August 7, 2026 15:09
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
fastly 15.6.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## [v15.6.0](https://github.com/fastly/cli/releases/tag/v15.6.0) (2026-08-07)

### Bug Fixes:

- fix(compute): add Python starter kit to the static config ([#1877](fastly/cli#1877))

### Enhancements:

- feat(audit-log): add event-mapping command group ([#1875](fastly/cli#1875))

### Dependencies:

- build(deps): `github.com/rogpeppe/go-internal` from 1.15.0 to 1.16.0 ([#1871](https://github.com/fastly/cli/pull/1871))</pre>
  <p>View the full release notes at <a href="https://github.com/fastly/cli/releases/tag/v15.6.0">https://github.com/fastly/cli/releases/tag/v15.6.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!16162
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