Skip to content

presist signals fired via gp sync{await, done} so they survive workspace restarts #2186

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

Closed
nisarhassan12 opened this issue Nov 17, 2020 · 7 comments
Labels
component: gp cli feature: prebuilds feature: tasks meta: stale This issue/PR is stale and will be closed soon team: IDE type: question reporter has a general question

Comments

@nisarhassan12
Copy link
Contributor

nisarhassan12 commented Nov 17, 2020

I was recently Gitpodifying https://github.com/niklasvh/html2canvas and below is how my config looked like:

tasks:
  - name: Build
    init: npm install && npm run build && gp sync-done boot

  - name: Website
    before: cd www/
    init: npm install
    command: gp sync-await boot && npm start
    openMode: split-right

ports:
  - port: 8000
    onOpen: open-preview

The same config worked without the pre-builds while with the pre-builds it seemed to be stuck as if the npm start thing did not work. The behaviour was kind of odd and I had no idea What I was doing wrong.

Screenshots

Without Pre-build

image

With Pre-build

image

Thanks to @svenefftinge who pointed out:

the init tasks are not executed during startup of a prebuilt workspace. Therefore the gp sync-done boot command is never executed and as a consequence the other terminal is waiting forever.

moving the gp sync-done boot to the command section instead of init made it work as expected.

As a user looking at https://www.gitpod.io/docs/config-start-tasks/ I was expecting gp sync-done boot to work in the init phase. Sven proposed:

Maybe we should persist signals fired on disk so they survive workspace restarts.

I agree with him as the current behaviour unless we clearly document it is alienating.

Front logo Front conversations

@akosyakov akosyakov added type: feature request New feature or request type: question reporter has a general question gp-cli labels Nov 20, 2020
@csweichel csweichel added component: gp cli and removed gp-cli type: feature request New feature or request labels Jan 7, 2021
@stale
Copy link

stale bot commented Mar 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 17, 2021
@stale stale bot closed this as completed Mar 27, 2021
@axonasif axonasif reopened this Oct 24, 2022
@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Oct 24, 2022
@axonasif
Copy link
Member

BTW, this is still an issue.

@Palanikannan1437
Copy link
Contributor

Palanikannan1437 commented Nov 22, 2022

I've been facing the same issue and for now I've made use of shifting gp sync-done ... to command for it to work properly!

Also, if anyone has not been working on this issue, though I'm new to gitpod..I'd like to contribute!

@felladrin
Copy link
Contributor

Thanks for bringing it up! The IDE team responsible for this part won't be able to prioritize it now. But it's been added to #7671 Epic, and it will be revisited later.

Also, if anyone has not been working on this issue, though I'm new to gitpod..I'd like to contribute!

We love the will to contribute! Although we won't be able to give the directions for what/where to change (due to it not being planned yet), you can submit your PR, and it will be for sure reviewed by the team!

@Palanikannan1437
Copy link
Contributor

Thanks for bringing it up! The IDE team responsible for this part won't be able to prioritize it now. But it's been added to #7671 Epic, and it will be revisited later.

Also, if anyone has not been working on this issue, though I'm new to gitpod..I'd like to contribute!

We love the will to contribute! Although we won't be able to give the directions for what/where to change (due to it not being planned yet), you can submit your PR, and it will be for sure reviewed by the team!

Ohh I see, sure I'll try exploring around and see if I could come up with a PR! Thank you😄

@jean
Copy link

jean commented Dec 5, 2022

I just ran into this. The docs strongly imply that init runs to completion before command, and I think this is also the logical assumption. What's the point of a section to install dependencies if you can't depend on the dependencies having been installed?
Persisting sync feels like it might be adding required boilerplate to paper over a usability issue.

Turns out I was flummoxed by YAML. I had

  - init:
  - command:

instead of

 - init:
   command:

@stale
Copy link

stale bot commented Mar 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 12, 2023
@stale stale bot closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: gp cli feature: prebuilds feature: tasks meta: stale This issue/PR is stale and will be closed soon team: IDE type: question reporter has a general question
Projects
None yet
Development

No branches or pull requests

8 participants