-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: create Gitpod configuration #12210
chore: create Gitpod configuration #12210
Conversation
One point I'm confused about - I'm pretty sure that the last time I tried gitpod, the node/yarn parts worked out of the box. So does their default option do some type of detection and install node for us dynamically? |
The default The
I'm not sure which is best:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions about RUN
command ordering and contents.
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Maybe we're better off waiting until Gitpod supports |
It takes way, way too long to go from "building image" to "starting work" (about 15 minutes or more). That's probably my fault, because I'm cobbling things together in the Dockerfile. 😄 When I start Gitpod from my fork, it gives me a default configuration, which works well for me, as:
I don't know enough Gitpod or Docker to get this PR in a state that we can merge it... 🙈 How about we use the simple Gitpod configuration, and mention in a comment in the file that for "real development work" you should use the |
@rarkins How about just using a default Gitpod configuration instead of this complicated stuff? For must of the stuff I do, the default works just fine. We can add a comment to the gitpod file that for "real development work" you should use GitHub Codespaces, as that's what the maintainers use. 😄 |
I've tried running
Example of failing test output:
Maybe the Gitpod environment lacks the power to complete the Jest tests within the timeout, or something else is slowing it down. I still need a basic Gitpod config so I can use Vale in the repository later (#14835). We could put a comment in the development docs and the Gitpod config file to warn contributors to only use Gitpod for limited work.
|
@rarkins I can't get the tests to pass when using Gitpod. Are you happy for me to use the default Gitpod configuration, and add a comment like this? # Use Gitpod for docs editing work only as the tests do not pass (yet).
# For development work, use GitHub Codespaces. |
@HonkingGoose Is there node v16 on that image? then you need to use |
Gitpod uses Node 16 on their default image. :) |
Let's just get something which works! |
Thank you @viceice, running Still two failed tests though: =============================== Coverage summary ===============================
Statements : 99.98% ( 27079/27083 )
Branches : 98.03% ( 8994/9174 )
Functions : 100% ( 3285/3285 )
Lines : 99.98% ( 26643/26647 )
================================================================================
Jest: "global" coverage threshold for statements (100%) not met: 99.98%
Jest: "global" coverage threshold for lines (100%) not met: 99.98%
Summary of all failing tests
FAIL lib/util/git/index.spec.ts (288.582 s, 209 MB heap size)
● util/git/index › isBranchModified() › should return false when author matches
expected true to be false or Boolean(false)
245 |
246 | it('should return false when author matches', async () => {
> 247 | expect(await git.isBranchModified('renovate/future_branch')).toBeFalse();
| ^
248 | expect(await git.isBranchModified('renovate/future_branch')).toBeFalse();
249 | });
250 |
at Object.<anonymous> (lib/util/git/index.spec.ts:247:68)
at runMicrotasks (<anonymous>)
● util/git/index › isBranchModified() › should return false when author is ignored
expected true to be false or Boolean(false)
253 | gitIgnoredAuthors: ['custom@example.com'],
254 | });
> 255 | expect(await git.isBranchModified('renovate/custom_author')).toBeFalse();
| ^
256 | });
257 |
258 | it('should return true when custom author is unknown', async () => {
at Object.<anonymous> (lib/util/git/index.spec.ts:255:68)
at runMicrotasks (<anonymous>)
Test Suites: 1 failed, 453 passed, 454 total
Tests: 2 failed, 8732 passed, 8734 total
Snapshots: 1144 passed, 1144 total
Time: 406.327 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Just the git problem remaining? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have access to GitHub Codespaces, so I need some help from you guys on the Codespaces parts. 😉
Pretty much. At least now nearly all tests pass, previously they all failed, due to me using the wrong version of the Do you need to set a GitHub Personal Access token for all tests to pass? What would you do if you set up a new development environment from scratch? I'm probably missing some vital step and that's why those two tests fail. |
I don't mind merging this as-is. Good and done is better than perfect and incomplete.
Don't think so? I always have a token though, so maybe I'm missing something.
I suspect it's because Gitpod is inserting a git author somewhere as part of the container startup. |
🎉 This PR is included in version 32.45.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
nvm
to "pin" node to a specific major versiondocs/development/remote-development.md
Context:
This works okay-ish, but it can probably be improved a lot by somebody competent with Docker.
The
.gitpod.Dockerfile
is cobbled together from the Gitpod programming language reference examples:The Gitpod docs are licensed under the MIT license, so not sure if that is compatible with our license or not. 4
Docker recommends that you use "multi-stage" builds 5 to reduce container size, but I have no clue how to do that properly, so I'm staying away from that myself.
TODO:
yarn jest
has 2 failing tests when running on Gitpod, but no failing tests on GitHub ActionsDocumentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via:
Footnotes
https://www.gitpod.io/docs/languages/java#sdkman-in-docker ↩
https://www.gitpod.io/docs/languages/javascript#node-versions ↩
https://www.gitpod.io/docs/languages/python#python-versions ↩
https://github.com/gitpod-io/website/blob/main/LICENSE ↩
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds ↩