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

Bugfix: RemoteFileSyncer handling of error responses #3440

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

Net-burst
Copy link
Collaborator

@Net-burst Net-burst commented Sep 12, 2024

🔧 Type of changes

  • new bid adapter
  • update bid adapter
  • new feature
  • new analytics adapter
  • new module
  • bugfix
  • documentation
  • configuration
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

RemoteFileSyncer never validated the server response status code and always saved the response body unless the request has timed out. This led to RemoteFileSyncer wiping perfectly valid files on periodic sync in case the remote server errors out for whatever reason.

🧠 Rationale behind the change

This PR adds a new check for 200 response status code before attempting to save the downloaded file.
Another bugfix here is that the RemoteFileSyncer now actually follows redirects.

🧪 Test plan

New logic is covered with unit tests.

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@Net-burst Net-burst force-pushed the remote-file-syncer-refactoring branch 2 times, most recently from 6d92a93 to 21e59e0 Compare September 12, 2024 15:03
@Compile-Ninja Compile-Ninja merged commit a69e3be into master Sep 13, 2024
5 checks passed
@Compile-Ninja Compile-Ninja deleted the remote-file-syncer-refactoring branch September 13, 2024 13:33
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.

RemoteFileSyncer does not follow redirects (http status 302 with location header)
3 participants