Skip to content

Fix implicit string concatenation breaking singleuser_lifecycle_hooks deprecation - #933

Open
Dev9269 wants to merge 2 commits into
jupyterhub:mainfrom
Dev9269:fix-deprecation-string-concat
Open

Fix implicit string concatenation breaking singleuser_lifecycle_hooks deprecation#933
Dev9269 wants to merge 2 commits into
jupyterhub:mainfrom
Dev9269:fix-deprecation-string-concat

Conversation

@Dev9269

@Dev9269 Dev9269 commented Aug 5, 2026

Copy link
Copy Markdown

Summary

In _deprecated_traits_09, two adjacent string literals were implicitly concatenated:

"singleuser_allow_privilege_escalation" "singleuser_lifecycle_hooks",

This produced a single bogus entry "singleuser_allow_privilege_escalationsingleuser_lifecycle_hooks", so singleuser_lifecycle_hooks never entered _deprecated_traits. Consequences:

  • the config migration in _handle_deprecated_config silently ignored c.KubeSpawner.singleuser_lifecycle_hooks (no warning, value dropped)
  • the runtime property hooks (_get_deprecated/_set_deprecated) were never created for it

Admins using the documented pre-0.9 name got lifecycle hooks silently never applied to pods.

Fix

Split the strings into separate list entries.

Tests

Added test_deprecated_singleuser_lifecycle_hooks verifying c.KubeSpawner.singleuser_lifecycle_hooks = {...} maps through to spawner.lifecycle_hooks. Fails on the old code (config value dropped, stays {}), passes with the fix.

Full unit run: 147 passed, 18 skipped (kube-cluster tests).

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.

1 participant