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

[dashboard] Remove Prebuild logs and button from Project Settings #8831

Merged
merged 1 commit into from
Apr 5, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Mar 15, 2022

Description

Removes the following:

  • Prebuild log view from Project Configuration
  • Ability to trigger prebuilds from Project configuration. See Before & After screenshots below.

Old:

Screenshot 2022-03-16 at 16 33 42

New:

Screenshot 2022-03-16 at 16 33 18

Related Issue(s)

How to test

  1. Open up preview environment
  2. Create a project
  3. Navigate to project settings
  4. Observe no toggle to run prebuilds or a log viewer

Release Notes

Remove Prebuild action and log view from Project Settings view
  • /werft with-clean-slate-deployment
    /hold

@easyCZ easyCZ changed the title WIP: Use normalized prebuild status in ProjectConfiguration WIP: [dashboard] Remove Prebuild logs and button from Project Settings Mar 16, 2022
@easyCZ easyCZ changed the base branch from mp/pb-status to main March 16, 2022 14:53
@easyCZ easyCZ force-pushed the mp/pb-status-proj-conf branch 4 times, most recently from 313f48b to 9261a39 Compare March 16, 2022 14:57
@easyCZ easyCZ force-pushed the mp/pb-status-proj-conf branch from 9261a39 to ca8a204 Compare March 16, 2022 15:22
@easyCZ easyCZ changed the title WIP: [dashboard] Remove Prebuild logs and button from Project Settings [dashboard] Remove Prebuild logs and button from Project Settings Mar 16, 2022
@easyCZ easyCZ marked this pull request as ready for review March 16, 2022 15:35
@easyCZ easyCZ requested a review from a team March 16, 2022 15:35
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 16, 2022
@easyCZ
Copy link
Member Author

easyCZ commented Mar 16, 2022

@jldec Let me know if this matches your expectation for the prebuild removal.

@stale
Copy link

stale bot commented Mar 26, 2022

This pull request 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 26, 2022
@easyCZ easyCZ removed the meta: stale This issue/PR is stale and will be closed soon label Mar 26, 2022
AlexTugarev
AlexTugarev previously approved these changes Mar 29, 2022
Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

Works as advertised!

Just confused with another PR of yours. This is next.

@AlexTugarev AlexTugarev self-requested a review March 29, 2022 08:59
@AlexTugarev
Copy link
Member

AlexTugarev commented Mar 29, 2022

/werft run

👍 started the job as gitpod-build-mp-pb-status-proj-conf.9

@easyCZ
Copy link
Member Author

easyCZ commented Mar 29, 2022

@gtsiolis @jldec I've now pushed a fix for the issue you've discovered, thanks! I'm moving this back into review.

The behaviour is now as follows when there is no gitpod.yml in the repo:

  1. Edit the config
  2. Click New Workspace which saves the config.

This doesn't feel like the most intuitive, but matches the original behaviour (which was Run prebuild rather than New Workspace).
We could explicitly introduce a button to save the config, which may be nicer.

@easyCZ easyCZ marked this pull request as ready for review March 29, 2022 12:02
@gtsiolis
Copy link
Contributor

gtsiolis commented Mar 29, 2022

Thanks, @easyCZ! Works as before now.

This doesn't feel like the most intuitive, but matches the original behaviour

Agree, this is also a bit confusing as we auto-save but not fast enough to include all latest changes in the updated and injected .gitpod.yml file. Maybe a subtle auto-save visual feedback on the editor along with a configuration validation action could help. 💭

issue: One seemingly important issue but probably not worth blocking merging this is that now when the configuration is invalid we're blocking the users from starting a new workspace without any error or visual feedback as we did with when having the ability to trigger a prebuild, see screenshot below. ❗

(BEFORE) Invalid configuration (Run Prebuild) (AFTER) Invalid configuration (New Workspace)
Screenshot 2022-03-29 at 3 23 12 PM Screenshot 2022-03-29 at 3 20 43 PM

@jldec
Copy link
Contributor

jldec commented Mar 29, 2022

@easyCZ, I expected the prebuild from the config to show up in the prebuild log view inside the start workspace page.
Is this not happening for some reason? I now see the prebuild and command task running inside the IDE.

Screenshot 2022-03-29 at 15 34 40

we auto-save but not fast enough to include all latest changes in the updated and injected .gitpod.yml file.

If @gtsiolis is right about ☝️ then the autosave is not working reliably - pending changes should be saved before the button click takes you out of the page.

I don't think we need a separate save button, but it would be nice indicate in the UI that the save has happened. I can live without this enhancement for this PR. See #6724

Bad gitpod.yml errors should also show up on the start workspace page e.g.

Screenshot 2022-03-29 at 15 40 54

@easyCZ
Copy link
Member Author

easyCZ commented Mar 29, 2022

I'm digging into this some more just now. It looks like for this behaviour to remain the same, the following must happen in order:

  1. Click start workspace
  2. The current gitpod.yml config is stored on the server
  3. A prebuild is triggered -> this then uses the previously saved gitpod.yml
  4. Redirect to the context URL to start a new workspace. Because there was a prebuild in step 3, it will show the prebuild steps.

In the current implementation, we're not triggering the prebuild and as such the workspace start drops you into the IDE with the before and init tasks being run in the current terminal.

The fix is to re-add the trigger of a prebuild when you're starting a workspace. However, now with the prebuild view gone, we don't have a place to report progress. How do you want to handle this @jldec?

@easyCZ easyCZ force-pushed the mp/pb-status-proj-conf branch 2 times, most recently from 41e8b26 to 61b07a9 Compare April 4, 2022 12:39
@easyCZ
Copy link
Member Author

easyCZ commented Apr 4, 2022

I've now updated this PR with the following:

  • Triggering a new workspace saves the config and starts a prebuild, once the prebuild request is accepted, we redirect to the workspace detail page where the prebuild logs will show
  • The button becomes disabled once clicked and shows the status - "Saving configration..." or "Starting a prebuild"

Once staging with new images becomes usable again, I'll put this back into review.

@easyCZ easyCZ force-pushed the mp/pb-status-proj-conf branch from 61b07a9 to 00972cb Compare April 4, 2022 14:36
@easyCZ
Copy link
Member Author

easyCZ commented Apr 4, 2022

/werft run

👍 started the job as gitpod-build-mp-pb-status-proj-conf.20

@easyCZ
Copy link
Member Author

easyCZ commented Apr 4, 2022

Screenshot 2022-04-04 at 16 56 38

@easyCZ easyCZ requested review from gtsiolis and a team April 4, 2022 20:21
Copy link
Contributor

@jldec jldec left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for starting the cleanup
I think this is good for now - I expect we will remove this dashboard editor feature entirely when we deprecate the config in DB with #9102

/hold for other reviews

@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 5, 2022

Looking at this now! 👀

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

UX LGTM.

Left some minor comments below, some of these probably could be best as follow up issues.

Thanks for the ping, @easyCZ! 🏓

useEffect(() => {
document.title = "Configure Project — Gitpod";
}, []);
setProgressMessage("Starting a new prebuild...");
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Is there a limitation that does not allow us to simply redirect to the workspace start page which automatically surfaces when a prebuild is running?

Copy link
Member Author

Choose a reason for hiding this comment

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

In my testing, starting a prebuild was required to actually use the new config. It wouldn't get picked up after the save without the prebuild. However, this may be a red-herring. I need to dig into the config & prebuild flow a bit more to understand why this is, and if in fact this is the case.

Will investigate!

Copy link
Member Author

Choose a reason for hiding this comment

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

I've attempted to remove the prebuild step but the saved configuration is not reflected in the workspace. I will continue to investigate but in the meantime, this PR is functionally complete and will land.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good! Thanks for taking a closer look, @easyCZ!

useEffect(() => {
document.title = "Configure Project — Gitpod";
}, []);
setProgressMessage("Starting a new prebuild...");
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: This could be minor but starting a prebuild is not always the case, right? When the default skeleton configuration is generated for a new project, a prebuild will not actually start, no?

tasks:
  - init: |
      echo 'TODO: build project'
    command: |
      echo 'TODO: start app'

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! Related to the other point raised around:

question: Is there a limitation that does not allow us to simply redirect to the workspace start page which automatically surfaces when a prebuild is running?

Will investigate!

@easyCZ
Copy link
Member Author

easyCZ commented Apr 5, 2022

/unhold

@roboquat roboquat merged commit 0c20837 into main Apr 5, 2022
@roboquat roboquat deleted the mp/pb-status-proj-conf branch April 5, 2022 14:04
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants