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: CSP error right after setInlineScriptsAllowed #32108

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Apr 2, 2024

Proposed changes (including videos or screenshots)

setInlineScriptsAllowed is an asynchronous function, calling it and forgetting generally works, however in some cases of intensive CPU use, the next requests may receive invalid content

In real life it happens very rarely, but it happens a lot 🤣 (CI tasks)

it fixes flaky tests like: 1) omnichannel/omnichannel-livechat-department.spec.ts:69:6 › OC - Livechat - Department Flow › OC - Livechat - Chat with Department which is a test which the previous suite changed the value

Issue(s)

Steps to test or reproduce

Further comments

Copy link

changeset-bot bot commented Apr 2, 2024

⚠️ No Changeset found

Latest commit: 3b9c1b4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.27%. Comparing base (d1fd9da) to head (3b9c1b4).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32108      +/-   ##
===========================================
- Coverage    54.70%   54.27%   -0.44%     
===========================================
  Files         2298     2255      -43     
  Lines        50765    49959     -806     
  Branches     10394    10167     -227     
===========================================
- Hits         27770    27114     -656     
+ Misses       20493    20374     -119     
+ Partials      2502     2471      -31     
Flag Coverage Δ
e2e 52.90% <ø> (-0.83%) ⬇️
unit 75.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@ggazzo ggazzo marked this pull request as ready for review April 2, 2024 14:41
@ggazzo ggazzo added this to the 7.0 milestone Apr 2, 2024
@ggazzo ggazzo changed the title fix: http request fails right after setInlineScriptsAllowed fix: CSP error right after setInlineScriptsAllowed Apr 2, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: needs QA labels Apr 2, 2024
@kodiakhq kodiakhq bot merged commit fc97aed into develop Apr 2, 2024
45 checks passed
@kodiakhq kodiakhq bot deleted the fix/csp-race-condition branch April 2, 2024 17:25
gabriellsh added a commit that referenced this pull request Apr 4, 2024
* develop: (71 commits)
  fix: search room not reactive after room name changes (#32123)
  test: fix `should edit name of targetChannel` flaky test (#32121)
  fix: UI allowing to mark room as favorite despite room was not a `default` room (#32063)
  chore: Remove duplicated `ChannelDeletionTable` (#32114)
  test(livechat): fix Department flaky test (#32102)
  test(livechat): File upload settings (#32060)
  test: contact center after hook calling wrong endpoint (#32094)
  fix(livechat): registering guest multiple times cause message loss (#32069)
  test: allow csp for livechat tests (#32116)
  chore: Move portals to the portals folder (#32090)
  test: `InitialData.insertAdminUserFromEnv` (#32066)
  fix: `CSP` error right after `setInlineScriptsAllowed` (#32108)
  chore: Create/Edit room consistency (#31960)
  chore: Remove references to EE code from the app events (#31926)
  test(Livechat): Clean up after registerGuest() test (#32092)
  test: make presence api tests fully independent (#31782)
  test: make roles fully independent (#31783)
  chore: bump version to 7.0.0-develop
  test: make login api tests fully independent (#31786)
  fix!: api login should not suggest which credential is wrong (#32086)
  ...
gabriellsh added a commit that referenced this pull request Apr 4, 2024
* origin:
  refactor: `TeamsChannels` to typescript (#32109)
  fix: search room not reactive after room name changes (#32123)
  test: fix `should edit name of targetChannel` flaky test (#32121)
  fix: UI allowing to mark room as favorite despite room was not a `default` room (#32063)
  chore: Remove duplicated `ChannelDeletionTable` (#32114)
  test(livechat): fix Department flaky test (#32102)
  test(livechat): File upload settings (#32060)
  test: contact center after hook calling wrong endpoint (#32094)
  fix(livechat): registering guest multiple times cause message loss (#32069)
  test: allow csp for livechat tests (#32116)
  chore: Move portals to the portals folder (#32090)
  test: `InitialData.insertAdminUserFromEnv` (#32066)
  fix: `CSP` error right after `setInlineScriptsAllowed` (#32108)
@ggazzo ggazzo modified the milestones: 7.0, 6.8 Apr 9, 2024
Copy link
Contributor

dionisio-bot bot commented Apr 9, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is not mergeable
    Please fix the issues and try again
    If you have any trouble, please check the PR guidelines

@dionisio-bot dionisio-bot bot added stat: QA assured Means it has been tested and approved by a company insider and removed stat: ready to merge PR tested and approved waiting for merge stat: QA tested labels Apr 9, 2024
Copy link
Contributor

dionisio-bot bot commented Apr 9, 2024

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is not mergeable
    Please fix the issues and try again
    If you have any trouble, please check the PR guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants