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

Fix Studio CI Tests #1836

Merged
merged 17 commits into from
Aug 23, 2023
Merged

Fix Studio CI Tests #1836

merged 17 commits into from
Aug 23, 2023

Conversation

hjpotter92
Copy link
Member

hopefully it fixes the tests

@hjpotter92 hjpotter92 self-assigned this Aug 7, 2023
@vercel
Copy link

vercel bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2023 6:35am

It resolves to IPv6 sometimes and breaks local env
Also improve error handling a bit but we're still
limited by jest.
@leszko leszko changed the title test.yaml: Use kebab-naming instead of snake_case for NODE_OPTIONS value Fix Studio CI Tests Aug 22, 2023
@leszko leszko requested a review from a team as a code owner August 22, 2023 07:31

app.use((err, _req, res, _next) => {
if (frontend && !_req.path.startsWith(httpPrefix)) {
wwwHandler(_req, res, _next);
Copy link
Contributor

Choose a reason for hiding this comment

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

@iameli I'm not sure this works, because I don't know in which scenarios it is used 🙃 Could you double-check?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's being used to setup a proxy from api server to frontend for livepeer-in-a-box project.

Copy link
Contributor

Choose a reason for hiding this comment

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

Will this work after my change? 🙃

Copy link
Member Author

@hjpotter92 hjpotter92 Aug 22, 2023

Choose a reason for hiding this comment

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

should be easy to verify by updating the manifest.yaml file for that project to your commit in this project. once the build pipeline finishes: https://github.com/livepeer/studio/actions/runs/5938452782/job/16102930628?pr=1836

Copy link
Member Author

Choose a reason for hiding this comment

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

*branch + commit sha

Copy link
Member

@victorges victorges Aug 22, 2023

Choose a reason for hiding this comment

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

You probably want to check if err is null, otherwise this could eat api handler exceptions afaik

It would be weird for this to be called without an error tho as per the express error handler docs

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, update to handle err in the frontend handler.

Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

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

LGTM either way, especially after confirming if this works when running with the frontend, incl api error responses etc

packages/api/src/test-server.ts Show resolved Hide resolved
@hjpotter92 hjpotter92 merged commit 4b2fb4c into master Aug 23, 2023
10 of 11 checks passed
@hjpotter92 hjpotter92 deleted the hjp/fix-tests branch August 23, 2023 08:02
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.

4 participants