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

Seed workflows from plugins' content/workflows #57

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

agrare
Copy link
Member

@agrare agrare commented Oct 27, 2023

Seed workflows from plugins' content/workflows/**/*.asl

Depends on:

manager = ManageIQ::Providers::Workflows::AutomationManager.in_my_region.first
return if manager.nil?

manager.configuration_script_sources.find_or_create_by!(:type => name, :name => "Embedded Workflows")
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the name here. I think I'd prefer ManageIQ as the name similar to how we named the built-in automate domain as ManageIQ, but I'm not sure. Productization-wise it's a little weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, how to we productize the builtin automate domain? We could use a Setting and then override that

end

def git_repository
return super unless name == "Embedded Workflows"
Copy link
Member

Choose a reason for hiding this comment

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

Let's move the "internal" name into a constant so it's shared with the create side.

@Fryguy
Copy link
Member

Fryguy commented Oct 27, 2023

This is really cool! Looking forward to this.

@agrare agrare force-pushed the sync_workflows_from_content branch 2 times, most recently from 52720f1 to d02cb1b Compare October 30, 2023 17:16
@miq-bot miq-bot added the wip label Oct 31, 2023
@agrare agrare changed the title [WIP] Seed workflows from plugins' content/workflows Seed workflows from plugins' content/workflows Dec 4, 2023
@miq-bot miq-bot removed the wip label Dec 4, 2023
@agrare
Copy link
Member Author

agrare commented Dec 4, 2023

Hey @Fryguy this has been out there for a while, what do you think?

@Fryguy Fryguy self-assigned this Dec 6, 2023
@Fryguy Fryguy added the enhancement New feature or request label Dec 6, 2023
@miq-bot miq-bot added the stale label Mar 11, 2024
@miq-bot
Copy link
Member

miq-bot commented Mar 11, 2024

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

@agrare agrare force-pushed the sync_workflows_from_content branch from 9e505bd to 59755fc Compare March 29, 2024 14:01
@agrare agrare removed the stale label Mar 29, 2024
@agrare agrare force-pushed the sync_workflows_from_content branch from 5d43862 to aab48aa Compare March 29, 2024 16:45
Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

Just one small q

manager = ManageIQ::Providers::Workflows::AutomationManager.in_my_region.first
return if manager.nil?

manager.configuration_script_sources
Copy link
Member

Choose a reason for hiding this comment

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

Why the .tap? I assume you used it to return the seeded record but I thought we didn't care about the return value?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that's true, it was returning the seeded repository previously but we don't need to

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@agrare agrare force-pushed the sync_workflows_from_content branch from c6f353a to ea8bd2d Compare March 29, 2024 16:54
@miq-bot
Copy link
Member

miq-bot commented Mar 29, 2024

Checked commits agrare/manageiq-providers-workflows@5cd43ef~...ea8bd2d with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@Fryguy Fryguy merged commit 73f359f into ManageIQ:master Mar 29, 2024
4 checks passed
@agrare agrare deleted the sync_workflows_from_content branch March 29, 2024 17:19
@Fryguy
Copy link
Member

Fryguy commented May 23, 2024

This PR has been effectively backported to radjabov via the merge of master into radjabov.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants