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: get skill status should only poll when in progress #508

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

spkai
Copy link
Contributor

@spkai spkai commented Feb 26, 2024

Issue #, if available:

Description of changes:
Currently, ask new continues polling for >15 minutes when one of the steps has failed, instead of displaying the error message. This CR will ensure polling occurs when a step is in progress.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@spkai spkai merged commit d93715c into develop Feb 26, 2024
14 checks passed
empty(statusTracker.interactionModel) ||
empty(statusTracker.hostedSkillProvisioning) ||
// retry if one of manifest, interaction model, provisioning are in progress
statusTracker.manifest === CONSTANTS.HOSTED_SKILL.MANIFEST_STATUS.IN_PROGRESS ||
Copy link
Contributor

Choose a reason for hiding this comment

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

JW do we need three constants for IN_PROGRESS?

Also, I think if we use variables, then we don't need the comments:

const isAllResourcesCreated = [
   statusTracker.manifest,
   statusTracker.interactionModel,
   statusTracker.hostedSkillProvisioning
].every(Boolean)

const isAnyResourceInProgress = [
   statusTracker.manifest, 
   statusTracker.interactionModel,
   statusTracker.hostedSkillProvisioning
].includes(Status.IN_PROGRESS)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if there was some maintainability reason behind separate constants/if they are subject to change, but I agree, it can be collapsed into a single constant. and this does look a lot cleaner! Will update in the next PR, missed your comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh no worries, it was minor, thanks for fixing this!

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