stackabletech / operator-templating

Templates for ci and packaging files that are common across all operators
Apache License 2.0
5 stars 1 forks source link

Dynamic port number for tilt not working any more #411

Open soenkeliebau opened 1 month ago

soenkeliebau commented 1 month ago

When we parallelized the PR generation in https://github.com/stackabletech/operator-templating/commit/1ce22e88a5c3d7c3adef01ef080ec9697202a9c1 this broke the generation of a unique port number for Tilt. When run from github actions the loop index will always be 0 because the workflow replaces the repository list with a list with only one entry - so the port will be the same for every repository.

This is not a huge problem I guess, can always be edited manually .. but if we decide to go that route we should remove the incrementation code linked above because it'll just cause confusion.

Alternatively we can probably come up with a different way of doing this, if we want to keep the functionality. Keeping the port number in the metaqata would work, but require us to track it ..

In principle I have to say that I'm not in love with keeping the repository data in two places, the workflow file and the repositories config file.. maybe we could somehow read the matrix data for the workflow from the yaml file?

https://stackoverflow.com/questions/63517732/github-actions-build-matrix-for-lambda-functions/63736071#63736071 seems to suggest this might be possible..

soenkeliebau commented 1 month ago

paging @razvan

NickLarsenNZ commented 1 month ago

I have an idea to generate the port number based on the operator name. So it should be consistent, and non colliding, and small enough to be a valid port number.

Inspiration:

soenkeliebau commented 1 month ago

That sounds interesting..