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

feat: waves for parallel builds with github options #490

Merged
merged 28 commits into from
Mar 2, 2023

Conversation

giseburt
Copy link
Contributor

Fixes #489

Removed the if-specific code from #377 and rebased on top of the latest main.

With this PR it's possible to have Waves without losing GitHub-specific settings properties.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi @giseburt! Thanks for the PR, and sorry for the delay in getting back to you. I really appreciate your continued interest in this library! Can you do the following steps to help create an easier entrypoint into this PR:

  • no stylistic changes -- it's cluttering the PR and makes it harder to find actual necessary changes. I'm not against it, but if you want to add them in they deserve to be in its own PR, with a way to enforce the same style in the future.
  • a README update -- The PR title tells me that this will support waves, but nowhere in the tests do I see how that would work in practice. I would like to work backwards from the use case here, in that I'd like to see what a README entry for the new feature would look like, before I dive into the nitty gritty implementation.

@giseburt
Copy link
Contributor Author

giseburt commented Feb 3, 2023

Sorry @kaizencc, I thought I had all the style changes removed. I have a format-on-save set in VSCode. I also thought I had it set to use the styles int he repo, but I've missed something, so it's making bigger changes than just the aslant that projen does. I'll adjust.

I also thought I had changed the ReadMe, but those are lost now, so I'll redo.

@giseburt
Copy link
Contributor Author

giseburt commented Feb 4, 2023

Ok, @kaizencc, I updated the docs to include the new objects and how to use them.

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi @giseburt! Some initial thoughts. I'm still mostly interested in seeing in visual form what a pipeline with waves looks like in GitHub Workflows.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
@giseburt
Copy link
Contributor Author

giseburt commented Feb 8, 2023

Ok, @kaizencc, I believe I have made all the requested changes and answered all questions. I'll keep an eye out or any more you might have. Thank you!

src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/stage-options.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
src/pipeline.ts Outdated Show resolved Hide resolved
test/stage-options.test.ts Show resolved Hide resolved
test/stage-options.test.ts Show resolved Hide resolved
@giseburt
Copy link
Contributor Author

giseburt commented Feb 9, 2023

Ok, @kaizencc - I think I got all the changes you asked for.

@giseburt giseburt mentioned this pull request Feb 9, 2023
@vincentgna
Copy link

@kaizencc any update on this?

Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi again @giseburt. Sorry for the delayed response. This is pretty much good to go and I'm prepared to approve tomorrow. I just have a few typo fixes and one comment about having both addWave and addGitHubWave as viable APIs, it might be confusing which one to use. Once that's addressed we're good!

Also, we recently added support for rosetta in our cdklabs repos too. You'll need to revisit the README and make sure that the examples compile. It might help to look at what I did in #514 to get our current examples to compile.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/waves.md Outdated Show resolved Hide resolved
Comment on lines +286 to +288
public addWave(id: string, options?: WaveOptions): Wave {
return this.addGitHubWave(id, options);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm we probably just want to direct users to use addGitHubWave instead of addWave entirely, right? It feels confusing to have both addWave and addGitHubWave as part of the API.

I think we should consider either throwing an error when you use addWave and explaining that you should be using addGitHubWave, or at the very least, providing a warning (via Annotations construct) that you should be using addGitHubWave.

Copy link
Contributor Author

@giseburt giseburt Mar 2, 2023

Choose a reason for hiding this comment

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

Unfortunately I spent a while trying to do this one to determine that it cannot be done, at least not without wrecking other things.

PipelineBase.addStage calls addWave internally. We'd have to rewrite addStage as well. I don't think it's worth it.

https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/pipelines/lib/main/pipeline-base.ts#L92-L97

I feel like the real solution would be upstream (adjust PipelineBase, etc.), but I can't determine the best route at the moment.

src/wave.ts Outdated Show resolved Hide resolved
src/wave.ts Outdated Show resolved Hide resolved
giseburt and others added 6 commits March 1, 2023 17:48
@giseburt
Copy link
Contributor Author

giseburt commented Mar 2, 2023

Ok, I once more believe I have all the changes you requested, or have a good reason not to (and commented to that elsewhere).

I did have to make some adjustments for the rosetta business, thanks for the heads-up. It's building as far as I can on my machine (without java, go, rust, etc. tooling).

@kaizencc kaizencc changed the title feat: Support waves for parallel builds with github options feat: waves for parallel builds with github options Mar 2, 2023
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Yay!

@mergify mergify bot merged commit e8d1dc0 into cdklabs:main Mar 2, 2023
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.

Ability to use Waves
3 participants