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

run makefile tests for every sample in a separate CI workflow #247

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HarshCasper
Copy link
Member

No description provided.

Choose a reason for hiding this comment

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

if we are commenting the whole file out, why not just remove it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, that would be removed once I have an explicit approval that this is the way to go forward 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion, with git being used properly and everywhere, there is never a need for commented out code. You can always jump back, and commented code can't make it into code reviews or even in the mainline (where it just causes confusion and maintenance overhead - also for example like these comments here 😛).

Copy link
Contributor

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Thanks a lot for re-thinking / reviving these samples, their pipelines, and their ownership! 🦸🏽
I just chimed in to add these two comments. 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion, with git being used properly and everywhere, there is never a need for commented out code. You can always jump back, and commented code can't make it into code reviews or even in the mainline (where it just causes confusion and maintenance overhead - also for example like these comments here 😛).

Comment on lines +10 to +17
prepare_list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: |
echo "matrix=[$(find . -mindepth 2 -type f -name 'Makefile' ! -path './sample-archive/*' | sed 's|/Makefile||' | awk '{printf "\"%s\",", $1}' | sed 's/,$//')]" >> $GITHUB_OUTPUT
- run: echo "matrix=[$(find . -mindepth 2 -type f -name 'Makefile' ! -path './sample-archive/*' | sed 's|/Makefile||' | awk '{printf "\"%s\",", $1}' | sed 's/,$//')]"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a pretty dangerous approach, because it does not limit the amount of parallel runners at all. GitHub organizations have a limit of 20 concurrent Linux runners for free in public repos: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
This means that it would basically block all GitHub action executions for the time it takes to execute the pipeline for the whole localstack-samples org.
Since these samples are executed somewhat fast, it can be a conscious decision to leave it like this, but I would propose to at least limit the amount of concurrent runners to less than 20 (maybe 5-10) to allow other pipelines in the org to be scheduled at the same time.
You can implement that super-easily with the max-parallel setting in the matrix config: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#defining-the-maximum-number-of-concurrent-jobs

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.

3 participants