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

chore: dup of #28720 for tests #29436

Closed
wants to merge 29 commits into from
Closed

chore: dup of #28720 for tests #29436

wants to merge 29 commits into from

Conversation

murtaza98
Copy link
Contributor

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2023

⚠️ No Changeset found

Latest commit: 175e90b

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

@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #29436 (175e90b) into develop (7db2fc5) will increase coverage by 0.96%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #29436      +/-   ##
===========================================
+ Coverage    45.76%   46.72%   +0.96%     
===========================================
  Files          685      698      +13     
  Lines        12984    13100     +116     
  Branches      2208     2233      +25     
===========================================
+ Hits          5942     6121     +179     
+ Misses        6732     6663      -69     
- Partials       310      316       +6     
Flag Coverage Δ
e2e 46.70% <ø> (+0.97%) ⬆️

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

@murtaza98 murtaza98 marked this pull request as ready for review June 5, 2023 05:54
@murtaza98 murtaza98 requested review from a team as code owners June 5, 2023 05:54
return LivechatRooms.findOneById(rid);
const newRoom = await LivechatRooms.findOneById(rid);
if (!newRoom) {
logger.debug(`Room with id ${rid} not found`);
Copy link
Member

Choose a reason for hiding this comment

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

should be a logger.error since it is being throw ?

const newRoom = await LivechatRooms.findOneById(rid);
if (!newRoom) {
logger.debug(`Room with id ${rid} not found`);
throw new Error('room-not-found');
Copy link
Member

Choose a reason for hiding this comment

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

what happens to this error thrown? is it caught somewhere?

const agentObj = agentId && (await findAgent(agentId));
if (agentObj) {
if (isAgentWithInfo(agentObj)) {
const { username = undefined } = agentObj;
agent = { agentId, username };
agent = { agentId, username } as SelectedAgent;
Copy link
Member

Choose a reason for hiding this comment

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

this type cast looks wrong.. username cannot be undefined in SelectedAgent..

} else {
agent = { agentId };
agent = { agentId } as SelectedAgent;
Copy link
Member

Choose a reason for hiding this comment

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

this looks wrong as well, since username is mandatory on SelectedAgent.. maybe SelectedAgent needs to be modified to allow both use cases on this file, and then the type cast can be removed.

@KevLehman
Copy link
Contributor

Hey @sampaiodiego , this PR should be in draft, but pls move your comments to #28720 as this is supposed to be the same PR (not completely sure why this extra PR was needed tho, as we only do these for community)

@sampaiodiego
Copy link
Member

Hey @sampaiodiego , this PR should be in draft, but pls move your comments to #28720 as this is supposed to be the same PR (not completely sure why this extra PR was needed tho, as we only do these for community)

I'm confused 😞

@murtaza98
Copy link
Contributor Author

murtaza98 commented Jun 8, 2023

Sorry about the confusion guys. I was struggling with trying to reproduce an issue that which QA team was facing in the QA environment. That issue was not reproducible anywhere else locally except for that QA env. Hence we thought that something must be going wrong on that QA env due to which we decided to spin up yet another QA env for testing this PR. Hence I created this new PR to spin up a brand new QA env.
PS: Good news is that we found a solution to the problem we were facing before. It apparently was an issue with cronjobs not working on some of these QA env which was fixed here #29449

@murtaza98 murtaza98 closed this Jun 8, 2023
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