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

Applying update to generators #30

Merged
merged 3 commits into from
Jan 11, 2023
Merged

Applying update to generators #30

merged 3 commits into from
Jan 11, 2023

Conversation

PhillypHenning
Copy link
Contributor

@PhillypHenning PhillypHenning commented Jan 6, 2023

Because of the dynamic name generation different length identifiers need to be created to created. For example, a continuously used state bucket is the X-tf named bucket, if a X-logs bucket needs to be created as well, then a separate identifier needs to be created for it.

This merges all common identifier generations into a single file to clean up repeat files.

Copy link
Contributor

@LeoDiazL LeoDiazL left a comment

Choose a reason for hiding this comment

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

Looking good

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

A brief description for the PR would be nice to have a better understanding as I had to spend a few cycles to understand the high-level idea first.
I understand some refactoring is happening here with overall code improvements which is great 👍 and left a couple of comments.

fi
}

function checkBucket() {
Copy link
Member

@arm4b arm4b Jan 9, 2023

Choose a reason for hiding this comment

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

It's nice to have a function here 👍

let's also follow the more common bash shellcheck naming standards (similar to python, lowercase with underscore separators):

Suggested change
function checkBucket() {
# a brief function description
function check_bucket_name() {

Could we also include a line comment for this function describing briefly what it does?


GITHUB_IDENTIFIER="$(echo $($GITHUB_ACTION_PATH/operations/_scripts/generate/generate_identifier.sh) | tr '[:upper:]' '[:lower:]')"

function generateIdentifiers () {
Copy link
Member

Choose a reason for hiding this comment

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

Same as for the other function, naming and description would be nice to haves.

And quickly looking at it, I didn't understand what kind of Identifiers the function generates.
generate_bucket_names() or generate_bucket_identifiers perhaps would be more clear?

@arm4b arm4b added the enhancement New feature or request label Jan 9, 2023
@PhillypHenning
Copy link
Contributor Author

Gotcha - Sorry about that @armab, this was work that was ported over from an upgrade to the docker-to-ec2. (Hence why I was pushing for a commons last week)

I'll post up some cleanup shortly

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

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

Thanks!

@PhillypHenning PhillypHenning merged commit 747d79c into main Jan 11, 2023
@PhillypHenning PhillypHenning deleted the bucket_name_fix branch January 11, 2023 15:56
@arm4b arm4b added this to the v0.2.0 milestone Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants