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

Various cleanups to the typescript SDK. #24825

Merged
merged 2 commits into from
Dec 29, 2022

Conversation

robertwb
Copy link
Contributor

  • Better errors for bad serialization imports.
  • Semver-correct version for fake worker package.
  • Package source into temporary directory.
  • Allow "latest" as a xlang beam jar version for non-released SDKs.
  • Less verbose logging.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

 * Better errors for bad serialization imports.
 * Semver-correct version for fake worker package.
 * Package source into temporary directory.
 * Allow "latest" as a xlang beam jar version for non-released SDKs.
 * Less verbose logging.
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Just one optional suggestion, otherwise LGTM

Comment on lines +348 to +361
const metadata = await new Promise<string>((resolve, reject) => {
let data = "";
https.get(medatadataUrl, (res) => {
res.on("data", (chunk) => {
data += chunk;
});
res.on("end", () => {
resolve(data);
});
res.on("error", (e) => {
reject(e);
});
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: It might be worth considering a http client library that can do things like handle retries/redirects and will patch responses together for us - I'm partial to https://github.com/microsoft/typed-rest-client (the Http client, not the Rest client in this case), but there are plenty of options out there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to avoid taking on another dependency right now, but that's good to keep in mind if we end up needing to make these kinds of calls more often.

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

Copy link
Contributor Author

@robertwb robertwb left a comment

Choose a reason for hiding this comment

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

Thanks.

Comment on lines +348 to +361
const metadata = await new Promise<string>((resolve, reject) => {
let data = "";
https.get(medatadataUrl, (res) => {
res.on("data", (chunk) => {
data += chunk;
});
res.on("end", () => {
resolve(data);
});
res.on("error", (e) => {
reject(e);
});
});
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to avoid taking on another dependency right now, but that's good to keep in mind if we end up needing to make these kinds of calls more often.

@github-actions github-actions bot added the build label Dec 29, 2022
@robertwb robertwb merged commit 3f28d55 into apache:master Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants