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

docs(contributing): update Gitpod guidance #10380

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,29 @@ and let us know if it's not up-to-date (even better, submit a PR with your corr

### Gitpod

For setting up a local development environment,
For setting up a CDK development environment,
we recommend using [Gitpod](http://gitpod.io) -
a service that allows you to spin up an in-browser
Visual Studio Code-compatible editor,
with everything set up and ready to go for CDK development.
Best of all, the project is already built.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would move this below (where it discusses the build currently).


Just click the button below to create your private workspace:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/aws/aws-cdk)

This will start a new Gitpod workspace,
and immediately kick off a build of the CDK code.
Once it's done (it takes around an hour, unfortunately),
you can work on any package that you want to modify,
This will start a new Gitpod workspace.
You can now work on any package that you want to modify,
Comment on lines +64 to +65
Copy link
Contributor

Choose a reason for hiding this comment

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

While I agree the current wording is incorrect, we need more subtlety here, as it's possible in some cases that the workspace will not be pre-built, and the user will have to wait for the build to complete. See my blog article on this for details: https://www.endoflineblog.com/cdk-tips-02-how-to-contribute-to-the-cdk#gitpod-environment .

Maybe we can use a similar wording to that article (feel free to improve it of course 🙂):

(In rare cases, you might create a workspace just after a commit to the main branch has been pushed; since a full build of the project takes around 45 minutes, there is a short window of time after a push where the pre-build is not ready. In that case, you might have to wait a bit for the build to finish.)

as described in ['Quick Iteration'](#quick-iteration) below.
You can build and test only the module you're working on and its
consumers using `scripts/builddown`.
Comment on lines +67 to +68
Copy link
Contributor

Choose a reason for hiding this comment

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

How about instead of this, we link to the #partial-build section below?


We don't recommend doing a full build on GitPod; it takes over
an hour. Also, it will fail unless you include `--skip-prereqs`
on the `yarn build` command (because Docker doesn't work in a
Gitpod workspace). Instead, just discard your Gitpod workspace
and create a new one. You will get the latest source files and
bulid artifacts.
Comment on lines +70 to +75
Copy link
Contributor

Choose a reason for hiding this comment

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

How do you feel about moving this paragraph to the ### Main build scripts section below? Not sure it fits here.


Gitpod is free for 50 hours per month -
make sure to stop your workspace when you're done
Expand Down