-
Notifications
You must be signed in to change notification settings - Fork 10
fix(component): emit _keboola block in flow scaffold _config.yml #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -298,27 +298,47 @@ def _build_flow_config_yml(name: str, component_id: str = "keboola.flow") -> str | |
|
|
||
| IDs are strings; phases carry next[].goto transitions (a phase id or null) | ||
| and tasks are typed (job/notification/variable). | ||
|
|
||
| The flow definition (``phases``/``tasks``) is nested under | ||
| ``_configuration_extra`` rather than emitted at the top level. This | ||
| matches the shape ``local_config_to_api`` (``sync/config_format.py``) | ||
| round-trips on ``sync push``: it only promotes ``parameters``, | ||
| ``input``/``output`` (under ``storage``), and ``processors`` to the API | ||
| body, merging every other top-level key back in verbatim from | ||
| ``_configuration_extra``. A top-level ``phases``/``tasks`` would be | ||
| silently dropped, pushing a flow with an empty configuration -- and it is | ||
| also the exact shape ``api_config_to_local`` produces when pulling a real | ||
| flow, so a scaffolded flow now round-trips identically to a pulled one | ||
| (issue #650 follow-up). | ||
| """ | ||
| lines = [ | ||
| "#", | ||
| "# NOTE: config_id will be assigned by Keboola on first push", | ||
|
Comment on lines
314
to
+316
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔍 Flow scaffold still omits the version field
Was this helpful? React with 👍 or 👎 to provide feedback.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch — this was a real lead, and chasing it down surfaced a bigger bug than the missing
Fixed in 9474c45: the scaffold now emits top-level |
||
| "version: 2", | ||
| f'name: "{name}"', | ||
| "description: |", | ||
| " TODO: describe this flow", | ||
| "phases:", | ||
| ' - id: "phase-1"', | ||
| ' name: "Phase 1"', | ||
| " next:", | ||
| ' - id: "default"', | ||
| " goto: null", | ||
| "tasks:", | ||
| ' - id: "task-1"', | ||
| ' name: "Task 1"', | ||
| ' phase: "phase-1"', | ||
| " enabled: true", | ||
| " task:", | ||
| " type: job", | ||
| ' componentId: "keboola.ex-http"', | ||
| ' configId: "TODO"', | ||
| " mode: run", | ||
| "_configuration_extra:", | ||
| " phases:", | ||
| ' - id: "phase-1"', | ||
| ' name: "Phase 1"', | ||
| " next:", | ||
| ' - id: "default"', | ||
| " goto: null", | ||
| " tasks:", | ||
| ' - id: "task-1"', | ||
| ' name: "Task 1"', | ||
| ' phase: "phase-1"', | ||
| " enabled: true", | ||
| " task:", | ||
| " type: job", | ||
| ' componentId: "keboola.ex-http"', | ||
| ' configId: "TODO"', | ||
| " mode: run", | ||
| # _keboola metadata (component_id required for sync push, config_id assigned on first push) | ||
| "", | ||
| "_keboola:", | ||
| f" component_id: {component_id}", | ||
| ] | ||
| return "\n".join(lines) + "\n" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Gotcha tagged with placeholder version instead of a release
The new gotcha entry is tagged
(since vNEXT), but the repo rules require every gotcha to name a released(since vX.Y.Z)version.vNEXTnames no release. TheGATE_REinscripts/check_version_gates.py:51matches only numeric versions, so the placeholder passes CI and can ship unnoticed.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deliberate, not an oversight — it's the convention this repo is introducing in PR #648: feature/fix PRs land without a version bump or a
changelog.pyentry, and any doc gate that would otherwise need a real version number (here, the(since vX.Y.Z)tag on a new gotcha) is tagged with the literal placeholdervNEXTinstead. A later, separate release PR bumpspyproject.toml, adds thechangelog.pyentry, and rewrites everyvNEXTplaceholder introduced since the last release to the actual shipped version.GATE_REinscripts/check_version_gates.py:51only matches a numericX.Y.Z, so it intentionally does not flagvNEXT— that's what lets this land without either a false-positive CI failure now or a stale/guessed version number that would need correcting later. No code change here; flagging for visibility since the convention isn't yet written down anywhere Devin's rule-check can see it.