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

Build log for autodeployment is not working properly #2486

Closed
Andrewnt219 opened this issue Nov 17, 2021 · 1 comment · Fixed by #2514
Closed

Build log for autodeployment is not working properly #2486

Andrewnt219 opened this issue Nov 17, 2021 · 1 comment · Fixed by #2514
Assignees
Labels
area: autodeployment Anything related to auto deployment area: dashboard Related to Telescope's dashboard (the page that has stats) type: bug Something isn't working

Comments

@Andrewnt219
Copy link
Contributor

Andrewnt219 commented Nov 17, 2021

What happened:
Mismatch object shape. The script expects the response to have a started key...

const res = await fetch(autodeploymentUrl('status'));
if (!res.ok) {
throw new Error('unable to get build info');
}
const data = await res.json();
if (!data.started) {
return { building: false };
}
return {
building: true,
title: data.status,
startedAt: new Date(data.started),
};

... but the server response
const builds = {
// Whatever built most recently
previous: null,
// Whatever we're building now
current: null,
// Whatever we're building next
pending: null,
};

What should have happened:
The script should check for key current and grab value of current.startedDate

How to reproduce it (as precise as possible):

Anything else we need to know?:

Environment:

  • OS: Window 11
  • Browser: Chrome 96
@Andrewnt219 Andrewnt219 added the type: bug Something isn't working label Nov 17, 2021
@Andrewnt219 Andrewnt219 self-assigned this Nov 17, 2021
@humphd humphd added area: autodeployment Anything related to auto deployment area: dashboard Related to Telescope's dashboard (the page that has stats) labels Nov 18, 2021
@humphd
Copy link
Contributor

humphd commented Nov 23, 2021

While we're fixing this, let's also add Cache-Control: no-cache to the headers of the response we send out, so that browsers don't reuse the /status response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: autodeployment Anything related to auto deployment area: dashboard Related to Telescope's dashboard (the page that has stats) type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants