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

chore: init templates for v2 #11706

Merged
merged 4 commits into from
Nov 25, 2020
Merged

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Nov 25, 2020

Creates the v2 init templates by first copying the v1 init templates wholesale,
and then applying a series of changes to make the templates v2-compatible.
This mostly involves adjusting dependencies and import statements.

For ease of review, I suggest looking at the second commit, which is just the
changes to the v2 templates from the v1 baseline.

One call-out -- we don't (yet) have a plan for assert for v2. This is being
tracked in the v2 project board, but is currently out of scope for the alpha
release. This means I had to rewrite several tests that used assert to doing
much simpler/uglier validations. I used the Java tests as the basis for these
rewrites.

Tested against a recent build artifact to verify correctness.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@njlynch njlynch requested review from nija-at and a team November 25, 2020 14:33
@njlynch njlynch self-assigned this Nov 25, 2020
@gitpod-io
Copy link

gitpod-io bot commented Nov 25, 2020

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 25, 2020
Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Have you had a chance to look at whether we can run some of the unit tests in master? Would be nice to see if we can catch errors as part of PRs here rather than wait for the build in v2-main.

If not, we should update the v2-main branch to run these tests instead.

@njlynch
Copy link
Contributor Author

njlynch commented Nov 25, 2020

Have you had a chance to look at whether we can run some of the unit tests in master? Would be nice to see if we can catch errors as part of PRs here rather than wait for the build in v2-main.

I've been working at it, but haven't yet found the right combination of re-writing the source and messing with mocks to make this work. Happy to have another set of eyes if you have the time; I don't feel I'm making significant progress.

This is why (IMO) this should only be committed to v2-main, so the errors are caught on the same branch where the code is based, but we've already discussed that. :) With this as-is, we're going to be in the situation where: (1) someone commits v2 template changes to master (2) foward-merge job pulls change to v2 (3) unit tests fail on merge job.

If not, we should update the v2-main branch to run these tests instead.

This is already happening. See #11703 and the logs, where the tests are failing because the /v2/ directory doesn't exist yet.

@njlynch njlynch requested a review from nija-at November 25, 2020 15:31
@nija-at
Copy link
Contributor

nija-at commented Nov 25, 2020

Ok fair. Then let's move this to the v2-main branch. But please make sure that all changes in this PR are on the /v2 folder only.

@njlynch
Copy link
Contributor Author

njlynch commented Nov 25, 2020

While I still like having these on v2 only, I have managed to get the mocks working to be able to run both unit tests on master. See latest commit.

@nija-at nija-at changed the title chore: create init-templates for v2 chore: init templates for v2 Nov 25, 2020
@nija-at nija-at added pr/do-not-merge This PR should not be merged at this time. and removed pr/do-not-merge This PR should not be merged at this time. labels Nov 25, 2020
@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit c61efd3 into master Nov 25, 2020
@mergify mergify bot deleted the njlynch/v2-init-templates-on-master branch November 25, 2020 16:52
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 0f8d167
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants