Skip to content

feat!: Remove non-cli logic from cli.run_plan #1080

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Jun 20, 2025

Argument parsing has been moved into a click option validator, and task
creation has been moved into the client create_task methods.

This is a breaking change in the BlueapiClient as task methods now
accept plan name and parameters as separate arguments.

Fixes #593 leaving only CLI related code in run_plan in cli.py.

@tpoliaw tpoliaw requested a review from a team as a code owner June 20, 2025 16:20
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.03%. Comparing base (1ca02ab) to head (9ad70fc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
- Coverage   95.05%   95.03%   -0.03%     
==========================================
  Files          41       41              
  Lines        2528     2537       +9     
==========================================
+ Hits         2403     2411       +8     
- Misses        125      126       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@DiamondJoseph DiamondJoseph left a comment

Choose a reason for hiding this comment

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

Nothing blocking so approving but had some comments

@@ -194,10 +197,12 @@ def get_active_task(self) -> WorkerTask:

return self._rest.get_active_task()

@start_as_current_span(TRACER, "task", "timeout")
@start_as_current_span(TRACER, "name", "parameters", "timeout")
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the problems we've had with the logs being spammed with junk I'm hesitant to add a dict here, but I suppose better to add it and change the underlying behaviour that's causing problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the same content would have ended up in the logs when a task was being passed around. It still contained the same dict.

tpoliaw and others added 5 commits June 24, 2025 14:13
Argument parsing has been moved into a click option validator, and task
creation has been moved into the client create_task methods.

This is a breaking change in the BlueapiClient as task methods now
accept plan name and parameters as separate arguments.
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.

Move run_plan logic from cli.py into client.py
2 participants