Skip to content

LITE-33583: bump extension projects to the latest runner#254

Open
pcaro wants to merge 1 commit into
fix/LITE-33583-bootstrap-dependency-mismatchfrom
fix/LITE-33583-bump-runner-selection
Open

LITE-33583: bump extension projects to the latest runner#254
pcaro wants to merge 1 commit into
fix/LITE-33583-bootstrap-dependency-mismatchfrom
fix/LITE-33583-bump-runner-selection

Conversation

@pcaro

@pcaro pcaro commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Stacked on #252 — base is fix/LITE-33583-bootstrap-dependency-mismatch; will retarget to master once #252 merges. Only the last commit (b12ef75) belongs to this PR.

Follow-up to @qarlosh's comment on #252.

Problem

ccli project extension bump selected the runner image by the Connect platform major (get_pypi_runner_version_by_connect_version()). Now that the runner follows its own semver line, that lookup silently picks a stale image.

Fix

  • bump now uses the latest published runner, same as bootstrap.
  • Bumping only the docker images would recreate the dependency mismatch on existing projects (new runner + stale pyproject pins), so bump also rewrites the python and connect-eaas-core entries in [tool.poetry.dependencies] with the specifiers derived from the runner's PyPI metadata. Line-level rewrite — file formatting and dev-dependencies untouched. Skipped if the project has no pyproject.toml.
  • Dropped get_pypi_runner_version_by_connect_version() (no remaining users).

Verification

  • 72 extension tests pass, flake8 clean.
  • test_bump_runner_version now also asserts the pyproject pins get updated and dev-deps stay untouched.

`bump` selected the runner image by the Connect platform major, which is
obsolete now that the runner follows its own semver line — it silently
picked a stale image. Use the latest published runner instead, matching
the bootstrap behavior.

Bumping only the docker images would recreate the bootstrap dependency
mismatch on existing projects (new runner, stale pyproject pins), so
bump now also rewrites the `python` and `connect-eaas-core` entries in
[tool.poetry.dependencies] with the specifiers derived from the runner's
PyPI metadata. The rewrite is line-level to preserve the file's
formatting, and dev-dependencies are left untouched.

Drop the now-unused get_pypi_runner_version_by_connect_version().
@pcaro
pcaro requested review from arnaugiralt and qarlosh July 15, 2026 13:10
@pcaro pcaro changed the title fix(project): bump extension projects to the latest runner (LITE-33583) LITE-33583: bump extension projects to the latest runner Jul 16, 2026
@pcaro
pcaro marked this pull request as ready for review July 16, 2026 08:51

@arnaugiralt arnaugiralt 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.

Added a couple of non blocking comments, they are about docs and hardening.

Comment on lines +264 to +266
if new_value and stripped != f'{key} = "{new_value}"':
line = f'{key} = "{new_value}"\n'
to_be_replaced = True

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.

This loop only matches keys written as name = "spec". If the key is written any other way, the loop does nothing and does not tell anyone. Two cases hit this: a quoted key like "connect-eaas-core" = ">=30", and a table form like connect-eaas-core = { version = ">=30" }. In both cases the old version stays in the file next to the new runner. That is the same mismatch this PR wants to fix, but now it is silent. Bootstrap never writes those forms, so this only happens on files a user edited by hand. Please track which keys in new_values you actually updated. For any key you did not update, print a yellow warning telling the user to check pyproject.toml by hand.

if stripped.startswith('['):
section = stripped
elif section == '[tool.poetry.dependencies]':
# ponytail: handles the plain `name = "spec"` form bootstrap emits; a

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.

Two things about this comment. First, rewriting a table form to the plain form also drops any extra fields on that line, such as extras, markers, optional, or source. Second, and worse, a value that spans more than one line breaks. The code only rewrites the first line, so the leftover lines ({ ... }, and ]) stay behind and the file is no longer valid TOML. This is unlikely for python and connect-eaas-core, but if it happens the project stops building. If you keep this approach, please add one line to the comment saying it only supports single-line values.

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