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

[server] Bump gitpod-yml-inferrer #5438

Merged
merged 1 commit into from
Aug 31, 2021
Merged

[server] Bump gitpod-yml-inferrer #5438

merged 1 commit into from
Aug 31, 2021

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Aug 30, 2021

Tests

NextJS

Repo: https://github.com/gitpod-io/template-nextjs

Guessed:

tasks:
  - init: npm install && npm run build
    command: npm run start

Actual:

tasks:
  - name: Start development environment
    init: npm install
    command: npm run dev

TypeScript Node.js

Repo: https://github.com/gitpod-io/template-typescript-node

Guessed:

tasks:
  - init: npm install && npm run build
    command: npm run start

Actual:

tasks:
  - command: |
      mongod
  - init: |
      npm install
      npm run build
    command: |
      npm run start

Python Django

Repo: https://github.com/gitpod-io/template-python-django

Guessed:

(nothing)

Actual:

tasks:
  - init: |
      python -m pip install --upgrade pip
      python -m pip install Django
      python manage.py migrate
    command: |
      python manage.py runserver

Python Flask

Repo: https://github.com/gitpod-io/template-python-flask

Guessed:

tasks:
  - init: pip install .

Actual:

tasks:
  - before: |
      export FLASK_APP=flaskr
      export FLASK_ENV=development
    init: |
      pip install -e .
      flask init-db
    command: |
      flask run

Java

Repo: https://github.com/gitpod-io/spring-petclinic

Guessed:

tasks:
  - init: ./mvnw install -DskipTests=false

Actual:

tasks:
- init: ./mvnw package -DskipTests
  command: java -jar target/*.jar

Go

Repo: https://github.com/gitpod-io/template-golang-cli

Guessed:

tasks:
  - init: go get && go build ./... && go test ./...
    command: go run

Actual:

tasks:
  - init: |
      go get github.com/spf13/cobra/cobra
      go build
    command: |
      ./mycli --help

Rust

Repo: https://github.com/gitpod-io/template-rust-cli

Guessed:

tasks:
  - init: cargo build
    command: cargo watch -x run

Actual:

tasks:
  - init: |
      cargo build
    command: |
      cargo run

Ruby on Rails

Repo: https://github.com/gitpod-io/template-ruby-on-rails-postgres

Guessed:

tasks:
  - init: yarn install && bin/setup
    command: bin/rails server

Actual:

tasks:
  - init: >
      bundle install &&
      yarn install &&
      rake db:create
    command: >
      rails server -b 0.0.0.0

C

Repo: https://github.com/gitpod-io/template-c

Guessed:

tasks:
  - init: make

Actual:

tasks:
  - init: |
      make
    command: |
      make help

C++

Repo: https://github.com/gitpod-io/template-cpp

Guessed:

tasks:
  - init: cmake .

Actual:

tasks:
  - init: |
      cd build && make
    command: |
      cd build; conan info .

@csweichel
Copy link
Contributor

@svenefftinge does it still make sense that this is a separate repository? If not, could we fold it in to gitpod-io?

@csweichel
Copy link
Contributor

@jankeromnes are those tests automated?

@svenefftinge
Copy link
Member

@svenefftinge does it still make sense that this is a separate repository? If not, could we fold it in to gitpod-io?

No. We moved that out before we completely went open-source.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Aug 31, 2021

Happy to inline the inferrer if you'd prefer that. 👍

@jankeromnes are those tests automated?

No, they're very manual (i.e. fork the Gitpod example templates, delete .gitpod.yml in them, add them as Projects in my PR deployment, see what the Configurator UI gives).

Also, they're qualitative, thus hard to automate (test is "does this look correct & sufficiently similar to the existing setup, which is always more complicated with more bells & whistles").

@svenefftinge
Copy link
Member

svenefftinge commented Aug 31, 2021

Currently, the inferrer sometimes creates a broken configuration.

Screenshot 2021-08-31 at 14 35 46

Is this solved in this PR?

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Aug 31, 2021

Currently, the inferrer seems to create broken configuration.

Yes, this was on purpose. Ideally, the # TODO part should even be underlined in red.

The goal was to nudge users into editing the .gitpod.yml, instead of "blindly" clicking Next Next Next (and ending up with another hundred setups that just say echo "init" forever 🙄).

Please let me know if you'd like this to be different.

@svenefftinge
Copy link
Member

Ah ok, let's not put in such a stopper for users.
Running into such an error without doing anything would be a frustrating experience.

Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

lgtm

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: eae05dbc5af5ec2bff6b512aa4614b0a1a163fb6

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: svenefftinge

No associated issue. Requirement bypassed by manually added approval.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants