Skip to content
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

Set workflow description from asl comment #76

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Mar 29, 2024

We do something similar if you manually create a Workflow from a json payload since we don't have a file path, https://github.com/ManageIQ/manageiq-providers-workflows/blob/master/app/models/manageiq/providers/workflows/automation_manager/workflow.rb#L4 and I thought it'd add a nice "human readable" description

@@ -76,8 +76,26 @@ def sync_from_content(to_delete)
end

def create_workflow_from_payload(name, payload)
floe_workflow, payload_error =
begin
Floe::Workflow.new(payload)
Copy link
Member Author

Choose a reason for hiding this comment

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

I had this depend on #59 because we were already loading the Floe::Workflow there

[nil, err.message]
end

comment = floe_workflow&.payload&.[]("Comment")
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO I think having Floe::Workflow#comment accessor would be cleaner

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

🙇 thanks!, released v0.10.0 with that change

@agrare agrare force-pushed the set_workflow_description_from_asl_comment branch 2 times, most recently from 9c008e4 to 6f75795 Compare April 5, 2024 18:51
@kbrock
Copy link
Member

kbrock commented Apr 5, 2024

Can we merge this without the sync PR?
Seems like the schema PR is on hold for a bit

@agrare agrare force-pushed the set_workflow_description_from_asl_comment branch from 6f75795 to 25b5c2c Compare April 8, 2024 13:20
@agrare agrare changed the title [WIP] Set workflow description from asl comment Set workflow description from asl comment Apr 8, 2024
@agrare agrare force-pushed the set_workflow_description_from_asl_comment branch from 25b5c2c to 57b8bf5 Compare April 8, 2024 13:23
@agrare
Copy link
Member Author

agrare commented Apr 8, 2024

Okay rebased to not depend on #59

nil
end

description = floe_workflow&.comment
Copy link
Member

Choose a reason for hiding this comment

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

Yay

@kbrock kbrock merged commit 049c589 into ManageIQ:master Apr 8, 2024
3 of 4 checks passed
@agrare agrare deleted the set_workflow_description_from_asl_comment branch April 8, 2024 16:00
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