Skip to content

Conversation

@ianballou
Copy link
Contributor

Adds ForemanTasks support for Dynflow/dynflow#446. Creates a Task for the chained Dynflow Task. This implementation is quite basic, so let me know if there are improvements that can be made.

Comment on lines +75 to +81
begin
delayed_plan = dynflow.world.persistence.load_delayed_plan(result.id)
execution_plan = dynflow.world.persistence.load_execution_plan(result.id)
ForemanTasks::Task::DynflowTask.new_for_execution_plan(execution_plan).tap do |task|
task.update_from_dynflow(execution_plan, delayed_plan)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really necessary? Chaining is "just" a special case of delay, for which we don't do this

Copy link
Contributor Author

@ianballou ianballou Nov 4, 2025

Choose a reason for hiding this comment

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

I thought I needed this for it to be visible as a scheduled task in the ForemanTasks browser, but I can revisit that.
Eh, scratch that. I can probably remove this. Let me just double check that there wasn't a corner case why we needed to update the task, I can't remember now.

@ianballou
Copy link
Contributor Author

Closing, this is unnecessary.

@ianballou ianballou closed this Nov 5, 2025
@adamruzicka
Copy link
Contributor

I would still prefer to have this explicitly exposed in foreman-tasks, but maybe change the interface so that it takes task uuids (as opposed to internal dynflow uuids) or maybe even whole tasks or task scopes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants