Skip to content

fix: execute runbooks even if project framework isn't detected#468

Merged
MicaiahReid merged 2 commits intomainfrom
startup-runbook
Jan 12, 2026
Merged

fix: execute runbooks even if project framework isn't detected#468
MicaiahReid merged 2 commits intomainfrom
startup-runbook

Conversation

@MicaiahReid
Copy link
Copy Markdown
Collaborator

No description provided.


let mut on_disk_runbook_data = None;
let mut in_memory_runbook_data = None;
let runbook_input = cmd.runbook_input.clone();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see that you're cloning this inputs sometimes along this file, shouldn't be better to change the assemble_runbook_execution_futures signature to hold a &Arc<Vec<String>> instead and avoid some of this deep clones with cheap clones or no clones at all?

I think this could save some memory and since the inputs aren't changed on the process I don't see a case where the shared reference can be end up breaking things.

Also following the data, I found that the clone in the line 538 looks redundant - it's already moved into the closure.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In most cases, runbook_input is a vec of very small strings. It's rarely, if ever large data being shared. For example, if you run surfpool run <runbook> --runbook-input network_id=localnet, the network_id=localnet is the runbook input. Using Arc adds some overhead, without saving much in terms of memory, so I don't think it's worth it.

Also following the data, I found that the clone in the line 538 looks redundant - it's already moved into the closure.

Great find! Will remove!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

gotcha, thx!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

here

@MicaiahReid MicaiahReid merged commit f9658d8 into main Jan 12, 2026
2 of 3 checks passed
@lgalabru lgalabru deleted the startup-runbook branch January 20, 2026 18:14
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