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

Rendering build duration #2665

Merged
merged 1 commit into from
Jan 26, 2022
Merged

Rendering build duration #2665

merged 1 commit into from
Jan 26, 2022

Conversation

tpmai22
Copy link
Contributor

@tpmai22 tpmai22 commented Jan 18, 2022

Fixed #2542

  • Delete animated-indication.css
  • Delete duplicate result and duration column in builds.hbs
  • Delete datetime-calculator.js and it usage
  • Loading animation added
  • Adding progress column and showing build progressing animation

Co-authored-by: Tengzhen tengzhenzhao@gmail.com

To test the feature locally, do the following:

  • Change autodeploymentUrl in src\api\status\public\js\build-log\check-build-status.js
const autodeploymentUrl = (path) => `//dev.telescope.cdot.systems/deploy${path}`;  
  • Allow all connectSrc in src\api\status\src\server.js
connectSrc: ["'self'", "*"]

To trigger a build manually trigger redeliver one of the build which merged to refs/heads/master

Issue This PR Addresses

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Prefer to #2542

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Jan 18, 2022

@tpmai22 tpmai22 requested review from Andrewnt219, DukeManh, humphd and Yoda-Canada and removed request for Andrewnt219 January 18, 2022 06:14
@humphd
Copy link
Contributor

humphd commented Jan 18, 2022

This is going to need to change based on #2653, where I'm changing a bunch of the code around. You might want to rebase on that PR's branch and update your code to use what I have there already. Then when it lands, you can rebase on master.

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 18, 2022

@Andrewnt219 @humphd would you guys mind to take a look at datetime-calculator.js cause I did not see any usage of it even though I did refactor it

Copy link
Contributor

@Andrewnt219 Andrewnt219 left a comment

Choose a reason for hiding this comment

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

Don't worry about calculating the duration, it has already been done.

EDIT: This PR will be merged after #2653, so it's a good idea to accommodate changes from there.

src/api/status/public/js/build-log/datetime-calculator.js Outdated Show resolved Hide resolved
@humphd
Copy link
Contributor

humphd commented Jan 20, 2022

You should rebase this to get the changes I just landed for caching build logs.

Copy link
Contributor

@Andrewnt219 Andrewnt219 left a comment

Choose a reason for hiding this comment

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

Can you provide screenshots or videos in the PR's description? These are helpful for reviewing and documenting PR changes.

src/api/status/public/js/build-log/build-header.js Outdated Show resolved Hide resolved
@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 22, 2022

@humphd Hitting the /deploy/status gives me 404. I think the autodeployment url for development is wrong. Here is my shared workspace, can you confirm it?
https://tpmai22-telescope-5ekqsq7bamt.ws-us27.gitpod.io/

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 22, 2022

404 on both production and dev.
image

On production

image

This might be the line of code which broke production

`//${window.location.hostname.replace('.api', '')}/deploy${path}`;

It might need to change to replace replace('.api', '') to replace('api.', '')

@humphd
Copy link
Contributor

humphd commented Jan 22, 2022

Yeah, that's not going to work in gitpod I guess? I'm not sure if the autodeployment server gets run in gitpod, it would have to be started manually, it's not in a container.

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 22, 2022

Any guidance to run it. I went into tools\autodeployment then pnpm start but it say something about secrect

@Andrewnt219
Copy link
Contributor

So far, there's no way to locally start the autodeployment. In the previous PRs (see test description of #2582 for example), the workaround is pointing to the dev URL instead of the local.

So the only way to test it is to get everything ready and trigger the build manually (by Joshua or David). In your case, I believe the logic is doable to implement without checking the result all the time.

You said the build didn't work, can you elaborate more on what was not working?

  • Did the build log (terminal) show any text about the current build?
  • Did the build header show the latest commit info, duration, and status?

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 23, 2022

I did talk with David and I believe that was because of gitpod set up I will try to run it locally and see

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 25, 2022

I learn how to test it locally in #2582 and here is the result. Testing procedure provided in the PR description

Telescope.Build.log.-.Google.Chrome.2022-01-24.20-35-29.mp4

@Andrewnt219
Copy link
Contributor

Awesome! Just one UI fix, what I meant was having the text next to the icon (to indicate what the icon means), not in a separate column.

I'd love to test this out locally as well, but the redeliver link in PR description is broken.

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 25, 2022

@Andrewnt219 you can go to setting\webhook and resend one of the build that merged to master

@Andrewnt219
Copy link
Contributor

The settings is probably only available to OSD700 students. I can review them and someone else can test it.

@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 26, 2022

@Andrewnt219 After talking on Slack with Andrew, we decide to delete the text part and keep only the loading animation in the build-header
image

@tpmai22 tpmai22 added this to the 2.6 Release milestone Jan 26, 2022
Copy link
Contributor

@Andrewnt219 Andrewnt219 left a comment

Choose a reason for hiding this comment

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

Only a small typo left and it's good to go.

src/api/status/public/js/build-log/build-header.js Outdated Show resolved Hide resolved
src/api/status/public/js/build-log/build-header.js Outdated Show resolved Hide resolved
Andrewnt219
Andrewnt219 previously approved these changes Jan 26, 2022
Copy link
Contributor

@Andrewnt219 Andrewnt219 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for picking up this PR.

Need someone from OSD700 to follow the PR's test plan and test this locally.

- Delete duplicate result and duration column in builds.hbs
- Delete datetime-calculator.js and it usage
- Loading animation added
- Showing build progressing animation

Co-authored-by: Tengzhen <tengzhenzhao@gmail.com>
@tpmai22
Copy link
Contributor Author

tpmai22 commented Jan 26, 2022

This will also close #2562 if it got approved

@humphd humphd merged commit 855b39f into Seneca-CDOT:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indicate a build is in progress in Dashboard build page
4 participants