Skip to content

Fixes #38991 - Add chained task dependencies in the UI#788

Merged
adamruzicka merged 5 commits intotheforeman:masterfrom
ianballou:chaining-dependencies
Feb 26, 2026
Merged

Fixes #38991 - Add chained task dependencies in the UI#788
adamruzicka merged 5 commits intotheforeman:masterfrom
ianballou:chaining-dependencies

Conversation

@ianballou
Copy link
Contributor

image

Adds dependency information to the Foreman Tasks UI in a new Dependencies tab. Each dependency list is a table that shows the name of the task and the status.

Relates to Dynflow/dynflow#446

@ianballou
Copy link
Contributor Author

Katello PR to test with: Katello/katello#11540

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

This is generally what I had in mind, however the tests are red

<screenshot>

Would things fit if a task was blocking and blocked at the same time?

Comment on lines +25 to +31
{
id: task.id,
action: task.action,
humanized: task.humanized[:action],
state: task.state,
result: task.result
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't say I'm a huge fan of ad-hoc data formatting. Could we instead have a main rabl json template with this and have the other templates we already have extend it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adamruzicka I moved the data modeling part to a rabl json file and included it in the rabl json here as a partial.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That way the data is modeled once instead of twice. It's not exactly 'extending' as you mentioned, but lemme know if it does the trick for ya.

@ianballou
Copy link
Contributor Author

ianballou commented Jan 15, 2026

Would things fit if a task was blocking and blocked at the same time?

Here is what it looks like:

image

Here it is with a squished window:

image

At the moment, with content views, there is no way to achieve this naturally since composite content views cannot be in other composite content views. But, I could see this happening as more features start to use chaining.

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

Please bump dependency on dynflow, otherwise lgtm

@ianballou
Copy link
Contributor Author

@adamruzicka I've addressed the latest comments.

@ianballou
Copy link
Contributor Author

Rubocop is failing because the version of Ruby is too old.

@adamruzicka
Copy link
Contributor

Would you please include 8fb29ee here?

@ianballou ianballou force-pushed the chaining-dependencies branch 2 times, most recently from fb8b258 to 4e47763 Compare February 11, 2026 14:13
@ianballou
Copy link
Contributor Author

@adamruzicka 8fb29ee is included now.

@adamruzicka
Copy link
Contributor

Instead of having this sort of read-only, I would still like to have an interface to actually chain tasks using the foreman-tasks without having users reach into dynflow's internals to manipulate things directly. Something like the previous iteration had

@ianballou
Copy link
Contributor Author

@adamruzicka I've created the public API for it. Now there is a solid dependency between this PR and Katello/katello#11621, so this will need to merge first.

@ianballou
Copy link
Contributor Author

@adamruzicka I updated chain to accept either an array of task objects or an active record association. My Katello PR is updated now to use the change and everything is still working.

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

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

This is working nicely with the Katello PR with the dependency chaining on autopublish. Able to see the dependencies and blocks relations on the UI and navigate properly to the mapped tasks.

Image Image

@adamruzicka adamruzicka merged commit fa860f2 into theforeman:master Feb 26, 2026
12 checks passed
@ianballou ianballou deleted the chaining-dependencies branch February 26, 2026 21:30
@ianballou
Copy link
Contributor Author

Thanks for the reviews! Glad to see this getting in, it's been a long time coming.

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.

3 participants