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 always firing onConfigChanged hook #87

Merged
merged 4 commits into from
Jul 7, 2023
Merged

Conversation

z4kn4fein
Copy link
Member

@z4kn4fein z4kn4fein commented Jul 7, 2023

Describe the purpose of your pull request

This PR fixes an issue that the configChanged hook is emitted in browser environments even when the downloaded config JSON isn't changed.
Part of the issue is that we get 200 response from the browser even when the server responds with 304 due to the Cache-Control: max-age=0, must revalidate header we introduced to bypass unnecessary OPTIONS requests.

Related issues (only if applicable)

JS-SDK issue

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@z4kn4fein z4kn4fein requested a review from a team as a code owner July 7, 2023 10:18
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (406d749) 92.24% compared to head (7250320) 92.24%.

❗ Current head 7250320 differs from pull request most recent head 896b2d6. Consider uploading reports for the commit 896b2d6 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #87   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files          18       18           
  Lines        1496     1496           
  Branches      380      380           
=======================================
  Hits         1380     1380           
  Misses        115      115           
  Partials        1        1           
Impacted Files Coverage Δ
src/ConfigServiceBase.ts 88.43% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@z4kn4fein z4kn4fein merged commit 24a36ab into master Jul 7, 2023
@z4kn4fein z4kn4fein deleted the fix-onconfigchanged-hook branch July 7, 2023 10:44
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.

3 participants