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

chore: Propose a refactor to use Js instead #4

Merged
merged 14 commits into from
May 29, 2024
Merged

Conversation

riosje
Copy link
Contributor

@riosje riosje commented May 23, 2024

This PR is to propose migrate this composite action to a Javascript, it will give a bit more flexibility.
This implementation contains the following:

  • AWS EC2 API to start and Stop the instances
  • Support array of instances to be started or stopped.
  • Propose another option/flag to be used along with the corn jobs to validate the status of the Runner, TODO on gitRunnerHandler.js

@riosje riosje requested a review from RafaelGSS May 23, 2024 16:10
// Wait for 5 seconds and send the request again to retrieve the status of the instances
await sleep(5000);
response = await client.send(command);
consoleTable(response.StartingInstances)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use core.info instead?

Copy link
Contributor Author

@riosje riosje May 23, 2024

Choose a reason for hiding this comment

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

I'm using console.table because I'm so lazy If we use core.info we need to create the table itself, Just if we want to use an ASCII table to list the instance status.

Copy link
Member

Choose a reason for hiding this comment

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

There's actually a way of doing that without reimplementing the wheel using the node:console API. But, I got you, that's fine for now.

riosje and others added 3 commits May 23, 2024 15:28
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
@RafaelGSS
Copy link
Member

@riosje is it ready to go?

@riosje
Copy link
Contributor Author

riosje commented May 28, 2024

@riosje is it ready to go?

@RafaelGSS do we want to improve the log output to not use console.table before merging this?
Could you elaborate a bit more about how would you implement this?

@RafaelGSS
Copy link
Member

@riosje is it ready to go?

@RafaelGSS do we want to improve the log output to not use console.table before merging this? Could you elaborate a bit more about how would you implement this?

We can do a follow up PR if needed

@RafaelGSS RafaelGSS merged commit 625920a into main May 29, 2024
1 check passed
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