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

Github action for reserving multiple machines with multi-device agent #415

Open
marosg42 opened this issue Nov 20, 2024 · 4 comments
Open

Comments

@marosg42
Copy link

GH action to reserve one machine works great.
However there is also multi device agent which allows to reserve several machines at once and they behave as a group, either all are reserved or job fails.
Input for the action will be valid Testflinger job in yaml file.
Output will be two lists

  • list of job ids of reservation jobs (so that they can be cancelled when machines are not needed before timeout)
  • list of IPs of reserved machines

To avoid complexity action can require that job always contains reservation data and never test or other than provisioning data

Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CERTTF-457.

This message was autogenerated

@mz2
Copy link
Collaborator

mz2 commented Dec 2, 2024

@marosg42 could you describe the output you'd expect from testflinger-cli exactly, please?

@marosg42
Copy link
Author

marosg42 commented Dec 4, 2024

Similar to single job action which has

outputs:
  id:
    description: 'The ID of the submitted job'
    value: ${{ steps.submit.outputs.id }}
  device-ip:
    description: 'The IP of the reserved device (if applicable)'
    value: ${{ steps.track-reservation.outputs.ip }}

Action for multiple devices will output JSON list of job ids and a JSON list of device-ips.

@boukeas
Copy link
Contributor

boukeas commented Dec 20, 2024

@marosg42 Please take a look at this draft PR. It comes with a test example on how to use the new action and shows what the output looks like.

On the latter: the structure of the output is what I'd most like some feedback on: in your original message you described the output as two lists containing job IDs and machine IPs whereas I opted for a JSON string that maps job IDs to machine IPs. Let me know if that is convenient for you to use in your workflows or if you'd like some variation of it -- it's really easy to re-structure the output, I think the main point is the action is able to retrieve the required data.

Also, note that this action is only for polling the parent multi-device job and retrieving the data of the child jobs. It is not for submitting the job, as the original request describes, since that can be accomplished using the existing submit action.

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

No branches or pull requests

3 participants