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

Feature/93 expand executor interface #94

Merged
merged 7 commits into from
Mar 22, 2024

Conversation

MaartendeKruijf
Copy link
Collaborator

No description provided.

@MaartendeKruijf MaartendeKruijf linked an issue Mar 21, 2024 that may be closed by this pull request
@MaartendeKruijf MaartendeKruijf self-assigned this Mar 21, 2024
@MaartendeKruijf MaartendeKruijf force-pushed the feature/93-expand-executor-interface branch from 7c0300c to 170a612 Compare March 21, 2024 16:38
hidde-jan
hidde-jan previously approved these changes Mar 22, 2024
case "action":
return decomposer.ExecuteActionStep(step, variables)
case cacao.StepTypeAction:
details := action.StepDetails{Step: step, Targets: decomposer.playbook.TargetDefinitions, Auth: decomposer.playbook.AuthenticationInfoDefinitions, Agent: decomposer.playbook.AgentDefinitions[step.Agent], Variables: variables}
Copy link
Collaborator

@lucamrgs lucamrgs Mar 22, 2024

Choose a reason for hiding this comment

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

I personally find slightly confusing the naming of the struct fields here, because some are step-specific and some are not.

In StepDetails, we are inserting all targets definitions and all authinfo. I would then name the struct fields something more like PlaybookTargets, PlaybookAuthInfoDefinitions, and StepAgent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe playbook metadata is better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure what you mean. You mean instead of StepDetails? The role of the "details" variable is still to provide step details and related step context right? And also there's already the "metadata" var being used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can you also make this line shorter?

Copy link
Collaborator

@lucamrgs lucamrgs left a comment

Choose a reason for hiding this comment

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

Had a comment on the StepDetails struct. But overall looks nice and tidier than before.

case "action":
return decomposer.ExecuteActionStep(step, variables)
case cacao.StepTypeAction:
details := action.StepDetails{Step: step, Targets: decomposer.playbook.TargetDefinitions, Auth: decomposer.playbook.AuthenticationInfoDefinitions, Agent: decomposer.playbook.AgentDefinitions[step.Agent], Variables: variables}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you also make this line shorter?

@MaartendeKruijf MaartendeKruijf merged commit 3235add into development Mar 22, 2024
9 checks passed
@MaartendeKruijf MaartendeKruijf deleted the feature/93-expand-executor-interface branch March 22, 2024 15:11
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.

Expand executor interface
4 participants