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

Eliminate most use of hard coded strings for pipeline stage names #1640

Merged
merged 22 commits into from
Jul 21, 2021

Conversation

theunrepentantgeek
Copy link
Member

@theunrepentantgeek theunrepentantgeek commented Jul 12, 2021

What this PR does / why we need it:

Largely eliminates the use of magic strings to identify pipeline stages, which will help with future stability.

For a couple of stages where the prerequisites are intrinsic to correct behaviour, I moved the declaration of the prerequisite into the stage itself where it is less likely to be inadvertently removed.

Also includes a handful of other code gardening changes.

Prerequisites

How does this PR make you feel:
gif

@theunrepentantgeek theunrepentantgeek self-assigned this Jul 12, 2021
@theunrepentantgeek theunrepentantgeek added this to the codegen-alpha-1 milestone Jul 12, 2021
@theunrepentantgeek theunrepentantgeek changed the title Standardize on 'stage' for the local variable name Code Gardening for Alpha 0 release Jul 12, 2021
@theunrepentantgeek theunrepentantgeek changed the title Code Gardening for Alpha 0 release Eliminate most use of hard coded strings for pipeline stage names Jul 12, 2021
@theunrepentantgeek theunrepentantgeek force-pushed the feature/convertible-resources branch from 7a5ba94 to 8890b7e Compare July 14, 2021 03:30
@theunrepentantgeek theunrepentantgeek force-pushed the improve/code-gardening-202107 branch from 3cbf7cf to 48fea67 Compare July 14, 2021 03:57
@theunrepentantgeek theunrepentantgeek force-pushed the feature/convertible-resources branch from 8890b7e to 994c3b5 Compare July 17, 2021 23:37
@theunrepentantgeek theunrepentantgeek force-pushed the improve/code-gardening-202107 branch from 48fea67 to b1c83a1 Compare July 17, 2021 23:38
@theunrepentantgeek theunrepentantgeek force-pushed the feature/convertible-resources branch from 994c3b5 to 55dd583 Compare July 17, 2021 23:53
@theunrepentantgeek theunrepentantgeek force-pushed the improve/code-gardening-202107 branch from b1c83a1 to cbd24f7 Compare July 17, 2021 23:53
@theunrepentantgeek theunrepentantgeek force-pushed the feature/convertible-resources branch from 131ec1b to 3fb22f1 Compare July 21, 2021 03:06
@theunrepentantgeek theunrepentantgeek force-pushed the improve/code-gardening-202107 branch from cbd24f7 to 88c2074 Compare July 21, 2021 05:07
Copy link
Member

@matthchr matthchr left a comment

Choose a reason for hiding this comment

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

LGTM!

pipeline.InjectOriginalVersionFunctionStageID,
pipeline.InjectOriginalVersionPropertyStageID,
pipeline.InjectPropertyAssignmentFunctionsStageID,
//pipeline.InjectHubFunctionStageID,
Copy link
Member

Choose a reason for hiding this comment

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

minor: Is this commented out for a reason? I think yes and it will be enabled later? Might be worth a TODO here

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we'll want to include this stage in tests, but we can't remove it until it's formally included in the pipeline. Comment added.

Base automatically changed from feature/convertible-resources to master July 21, 2021 19:32
@theunrepentantgeek theunrepentantgeek force-pushed the improve/code-gardening-202107 branch from 88c2074 to 3aa75b8 Compare July 21, 2021 20:09
@theunrepentantgeek theunrepentantgeek merged commit 1e5b3d2 into master Jul 21, 2021
@theunrepentantgeek theunrepentantgeek deleted the improve/code-gardening-202107 branch July 21, 2021 20:43
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