Skip to content

[server] infer extensions and add a comment #7392

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

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Dec 30, 2021

This commit adds vscode extensions to the inferred .gitpod.yml and adds a comment to the top, that links to the documentation.

follow up to: #7383

How to test

Start workspaces on repositories without .gitpod.yml and check the generated .gitpod.yml.

Release Notes

Also propose vscode extensions for yet unconfigured repositories.

@svenefftinge
Copy link
Member Author

svenefftinge commented Jan 2, 2022

/werft run

👎 cannot start job - please talk to whoever's in charge of your Werft installation

@aledbf
Copy link
Member

aledbf commented Jan 2, 2022

/werft run

👍 started the job as gitpod-build-se-more-inference.2

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Many thanks!

Code looks good to me at first glance. 👍

/approve

I wanted to test this, but couldn't start a workspace:

Screenshot 2022-01-03 at 12 00 33 Screenshot 2022-01-03 at 12 00 42 Screenshot 2022-01-03 at 12 00 57

Maybe an unstable deployment?

Re-triggering just in case:

/werft run

@jankeromnes
Copy link
Contributor

jankeromnes commented Jan 3, 2022

/approve no-issue

/werft run

👍 started the job as gitpod-build-se-more-inference.3

@roboquat
Copy link
Contributor

roboquat commented Jan 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jankeromnes

Associated issue requirement bypassed by: jankeromnes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -36,6 +37,11 @@ export class ConfigInferrer {
return ctx.config;
}

protected async checkYaml(ctx: Context): Promise<void> {
// always add the YAML extension to support .gitpod.yml editing
this.addExtension(ctx, 'redhat.vscode-yaml');
Copy link
Member

@akosyakov akosyakov Jan 3, 2022

Choose a reason for hiding this comment

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

We already always install it in VS Code, i.e. it is built-in extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed it 🙏

@akosyakov
Copy link
Member

@svenefftinge You should look at product.json of VS Code in your machine for inspiration of hints based on repo content.

@svenefftinge
Copy link
Member Author

@svenefftinge You should look at product.json of VS Code in your machine for inspiration of hints based on repo content.

Thanks, it's not the main intention to of this PR to have a complete list, but rather make a few non-controversial suggestions. Should definitely be further improved over time.

This commit adds vcode extensions to the inferred .gitpod.yml
and adds a comment to the top, that links to the documentation.
Copy link
Contributor

@jankeromnes jankeromnes 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 and works like a charm! 🧙

I see a few more potential small improvements, but these can definitely be done as follow-ups, so unblocking this outstanding PR. 🚀

Comment on lines +49 to +51
return `# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about the phrasing "to share the goodness with others", but I don't have a better proposal right now.

@gtsiolis Would you have any suggestions to improve this comment? (It's added to every auto-generated .gitpod.yml when you open a Gitpod workspace for any repository that doesn't already have one.)

Note: Let's not block this PR, but work on a better comment in a follow-up PR.

Comment on lines +53 to +54
${configString}
`;
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to add a second empty line at the bottom of the file (can also be fixed in a follow-up):

Suggested change
${configString}
`;
${configString}`;

@roboquat
Copy link
Contributor

roboquat commented Jan 4, 2022

LGTM label has been added.

Git tree hash: 38c422ae7e3d40a90361bf013b266762d55d97c9

@roboquat roboquat merged commit 46d55a7 into main Jan 4, 2022
@roboquat roboquat deleted the se/more-inference branch January 4, 2022 14:40
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants