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

[GitHub.com only] Prebuilds no longer triggering if gitpod.yml uses a 'before' task without an 'init' #10336

Closed
jldec opened this issue May 30, 2022 · 5 comments · Fixed by #10352
Assignees
Labels
team: webapp Issue belongs to the WebApp team

Comments

@jldec
Copy link
Contributor

jldec commented May 30, 2022

The following .gitpod.yml used to trigger prebuilds on each commit (on GitHub only) but as of 21d3f00 it no longer does.

# .gitpod.yml
tasks:
  - before: |
      echo `gp url` >> before.txt
    command: |
      echo `gp url` >> command.txt

Since the old behavior was somewhat unexpected, and GitHub-specific, and atypical (the standard way to configure a prebuild is with init) the proposal for this issue is NOT to fix this, but rather to clarify the recommended use of init in our docs.

@jldec jldec added the team: webapp Issue belongs to the WebApp team label May 30, 2022
@jldec
Copy link
Contributor Author

jldec commented May 30, 2022

@jldec
Copy link
Contributor Author

jldec commented May 30, 2022

Here is an example where the prebuild stopeed working
https://github.com/mautic/mautic/blob/4.x/.gitpod.yml#L8

@jankeromnes
Copy link
Contributor

jankeromnes commented May 30, 2022

Ah, indeed, sorry that was indeed my fault. 😬

The previous and current hasPrebuildTasks code considers before tasks differently:

Screenshot 2022-05-30 at 15 12 00

Screenshot 2022-05-30 at 15 11 54

My change actually "aligned" the github.com App behavior with prebuilds from all other platforms (GitHub Enterprise, GitLab, Bitbucket...), but that wasn't really on purpose.

I'm happy to re-introduce before as an independently recognized "prebuild task" if that's useful (one-line fix).

EDIT: See PR (feel free to aprove or close it)

@geropl
Copy link
Member

geropl commented May 30, 2022

Since the old behavior was somewhat unexpected, and GitHub-specific, and atypical (the standard way to configure a prebuild is with init) the proposal for this issue is NOT to fix this, but rather to clarify the recommended use of init in our docs.

@jldec @jankeromnes While aligning with other Git hosters is nice please be aware that GitHub is at least 90% of our users. Did you think about reversing this, and making the "before" behavior the default for all hosters? (Not pushing for this, just want to make sure we thought about this from all perspectives. 👍 )

@jankeromnes
Copy link
Contributor

While aligning with other Git hosters is nice please be aware that GitHub is at least 90% of our users.

Good point. 👍

Did you think about reversing this, and making the "before" behavior the default for all hosters?

I think this would make sense, and have implemented that here: #10352

Repository owner moved this from In Progress to Done in 🍎 WebApp Team Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: webapp Issue belongs to the WebApp team
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants