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: authorize upload error on create job endpoint #1642

Merged
merged 13 commits into from
Jan 16, 2024

Conversation

davidgamez
Copy link
Member

@davidgamez davidgamez commented Jan 15, 2024

Summary:

When utilizing the feed URL https://www.maricopa-az.gov/home/showpublisheddocument/6491/638307291320330000, an "Error authorizing upload" occurs. Upon attempting to save the file to GCP for validation, it was observed that the HTTP request lacked a user-agent, leading to rejection by the producer in this specific instance.

This is a missing fix from #1633.
Fixes #1632

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1479 sources (~0 %) are corrupted.
Commit: b146777
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

storage.signUrl(
blobInfo, 1, TimeUnit.HOURS, Storage.SignUrlOption.httpMethod(HttpMethod.POST));
try (WriteChannel writer = storage.writer(signedURL)) {
OutputStream outputStream = Channels.newOutputStream(writer);
Copy link
Member Author

Choose a reason for hiding this comment

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

Using the Channels output stream reduces the memory footprint by avoiding loading the full file in memory.

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1479 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1479 sources (~0 %) are corrupted.
Commit: 3517178
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@davidgamez davidgamez marked this pull request as ready for review January 16, 2024 02:30
@davidgamez davidgamez changed the title Fix/1632 authorize upload fix: authorize upload error on create job endpoint Jan 16, 2024
@davidgamez davidgamez merged commit 5384a3e into master Jan 16, 2024
334 checks passed
@davidgamez davidgamez deleted the fix/1632-authorize-upload branch January 16, 2024 19:51
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.

Feed generates error to authorize upload
2 participants