Skip to content

feat: per-workflow tm1_instance result-push target#153

Merged
nicolasbisurgi merged 1 commit into
masterfrom
feat/per-workflow-tm1-instance
May 20, 2026
Merged

feat: per-workflow tm1_instance result-push target#153
nicolasbisurgi merged 1 commit into
masterfrom
feat/per-workflow-tm1-instance

Conversation

@nicolasbisurgi
Copy link
Copy Markdown
Collaborator

Summary

Adds a per-workflow tm1_instance setting for the results-push / auto-load target, with a graceful 4-tier resolution chain. Replaces the implicit reliance on default_tm1_instance (now deprecated but still honoured).

Precedence (highest wins):

  1. rushti run --tm1-instance <X>
  2. Taskfile JSON settings.tm1_instance
  3. settings.ini [tm1_integration].tm1_instance
  4. settings.ini [tm1_integration].default_tm1_instance (deprecated)

At push time the run logs Result upload target: <instance> (source: <tier>). When all four tiers are empty and push_results is enabled, a reworded warning fires and the run still succeeds.

Soft deprecations (both honoured indefinitely, warn only when actually used):

  • settings.ini [tm1_integration].default_tm1_instance → rename to tm1_instance
  • rushti tasks push --target-tm1-instance → alias for --tm1-instance

Behavioural change worth highlighting: push_results and auto_load_results set inside a taskfile JSON settings block now actually take effect on the run path. They were silently ignored before because get_effective_settings(..., json_settings=...) was never called with the taskfile dict. If you have divergent values between taskfile JSON and settings.ini, the taskfile value will now win — see CHANGELOG for the upgrade note.

Test plan

  • pytest tests/unit/ — 732 passed, 5 skipped
  • pytest tests/integration/ -m "not requires_tm1" — 36 passed
  • ruff check src/ tests/ — clean
  • Smoke: settings.ini with only default_tm1_instance set → DEPRECATION warning fires at load
  • Smoke: settings.ini with both tm1_instance and default_tm1_instance → no warning
  • Smoke: tasks push --target-tm1-instance X → still works, logs deprecation warning
  • Smoke: tasks push --tm1-instance X → works, no warning
  • TM1-backed integration tests (-m requires_tm1) — to be run by a maintainer with a live TM1

Notes

  • Issue Detailed per-execution results for expandable tasks (--detailed-results) #146's literal-string regression assertion is rewritten as behavioural tests of resolve_tm1_instance; the # Issue #146 regression comments are preserved.
  • Cube-sourced runs (--tm1-instance X --workflow Y) have no tier 2 because the cube schema doesn't store taskfile-level settings. This asymmetry is documented in docs/features/tm1-integration.md.

🤖 Generated with Claude Code

Introduce a canonical `tm1_instance` setting for the results-push target,
resolvable per workflow via the taskfile JSON `settings` block. The
deprecated `default_tm1_instance` is honoured as a final fallback and
warns only when it is the value actually being used.

Precedence (highest wins):
1. CLI `run --tm1-instance`
2. Taskfile JSON `settings.tm1_instance`
3. `settings.ini [tm1_integration].tm1_instance`
4. `settings.ini [tm1_integration].default_tm1_instance` (deprecated)

Wiring fix: `get_effective_settings(..., json_settings=...)` now actually
runs after the taskfile is parsed, so `push_results` and
`auto_load_results` set inside taskfile JSON take effect. This is a
behavioural change called out in CHANGELOG — taskfile-JSON values that
were previously silently ignored will now win over `settings.ini`.

`rushti tasks push --target-tm1-instance` is aliased to `--tm1-instance`;
the legacy flag continues to work but logs a DEPRECATION warning on use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nicolasbisurgi nicolasbisurgi self-assigned this May 19, 2026
@nicolasbisurgi nicolasbisurgi added the release:patch Triggers patch version bump (e.g.: 1.4.9 → 1.4.10) label May 19, 2026
@nicolasbisurgi nicolasbisurgi merged commit fa32534 into master May 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:patch Triggers patch version bump (e.g.: 1.4.9 → 1.4.10)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant