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

Inject Hub() function on hub storage resources #1616

Merged
merged 5 commits into from
Jul 7, 2021

Conversation

theunrepentantgeek
Copy link
Member

@theunrepentantgeek theunrepentantgeek commented Jul 1, 2021

What this PR does / why we need it:

To support use of the Convertible interface, the hub storage version needs to implement a Hub() function. This pipeline stage modifies resources that have been flagged as "The storage version" by injecting this necessary function.

How does this PR make you feel:
gif

If applicable:

  • this PR contains tests

Requires PR #1606 to be merged first, as this reuses test support functions from that PR, and then rebasing on master.

Harvested from PR #1533.

@@ -153,6 +153,7 @@ func NewTestCodeGenerator(testName string, path string, t *testing.T, testConfig
"injectOriginalVersionFunction",
"injectOriginalVersionProperty",
"injectPropertyAssignmentFunctions",
pipeline.InjectHubFunctionStageId,
Copy link
Member

@Porges Porges Jul 1, 2021

Choose a reason for hiding this comment

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

makes me think a pipeline function should take IDFactory (as well as Configuration?) so we don't need to have a building function that in turn calls MakeStage, so that this would be injectHubFunction.name

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 see how this would work - whether the factory methods return functions or objects, we don't have a reference to the value here, so we can't dereference it to access name. #pleaseexplainmore

@theunrepentantgeek theunrepentantgeek force-pushed the feature/persist-apiversions branch from 6d73203 to 7319ad2 Compare July 5, 2021 04:19
@theunrepentantgeek theunrepentantgeek force-pushed the feature/hub-function branch 2 times, most recently from 93a5d65 to 8959fb7 Compare July 5, 2021 05:40
@theunrepentantgeek theunrepentantgeek force-pushed the feature/persist-apiversions branch from 74e3f6f to 3be33df Compare July 7, 2021 01:42
Base automatically changed from feature/persist-apiversions to master July 7, 2021 01:59
@theunrepentantgeek theunrepentantgeek merged commit 4b1363e into master Jul 7, 2021
@theunrepentantgeek theunrepentantgeek deleted the feature/hub-function branch July 7, 2021 02:53
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