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

feat(webex-core): catalog failure handling #3603

Merged
merged 4 commits into from
May 17, 2024

Conversation

Coread
Copy link
Contributor

@Coread Coread commented May 16, 2024

COMPLETES #< INSERT LINK TO ISSUE >

This pull request addresses

If the service catalog fails to initialize for whatever reason, e.g. network failure, the consuming application doesn't know

by making the following changes

Added a new attribute on the services called initFailed which is set if the catalog fails to init in the on webex ready handler. Consuming applications can either check webex.internal.services.initFailed directly or can listen for the change:initFailed event to spot when this occurs.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@Coread Coread requested a review from a team as a code owner May 16, 2024 08:54
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3603.d3m3l2kee0btzx.amplifyapp.com

@Coread Coread added the validated If the pull request is validated for automation. label May 16, 2024
@@ -795,8 +795,8 @@ describe('webex-core', () => {
describe('#fetchClientRegionInfo()', () => {
it('returns client region info', () =>
services.fetchClientRegionInfo().then((r) => {
assert.isDefined(r.countryCode);
assert.isDefined(r.timezone);
assert.isDefined(r.regionCode);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was failing due to an unrelated change in the response from the service

@@ -52,6 +52,7 @@ const Services = WebexPlugin.extend({

props: {
validateDomains: ['boolean', false, true],
initFailed: ['boolean', false, true],
Copy link
Collaborator

Choose a reason for hiding this comment

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

if I'm reading this correctly, the false, true bit means that it's not required and has a default true - is that right? so we say that init failed before init is attempted? That doesn't feel right....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it wasn't right. I changed initFailed: 'boolean' to add the default sequence after writing the check boolean test as it was returning undefined.. and got the default the wrong way round. Tests now cover this.

@Coread Coread changed the title Catalog failure handling feat(webex-core): catalog failure handling May 17, 2024
@Coread Coread merged commit 8ba8ed5 into webex:next May 17, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants