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: Polling creation process #4804

Merged
merged 13 commits into from
Nov 17, 2020
Merged

feat: Polling creation process #4804

merged 13 commits into from
Nov 17, 2020

Conversation

pavolum
Copy link
Contributor

@pavolum pavolum commented Nov 13, 2020

Description

This PR implements the following:

  • BackgroundProcessManger service for server side tracking of processes defined by the developer
    • Ported over from provisioning branch (thanks @benbrown) and simplified for general platform use.
  • Status endpoint for acquisition of process status from BackgroundProcessManger for front end use
  • New creation flow for 'conversational core' templates (the only one in 1.3 being 'Conversational Core')
    • Largely similar to existing creation flow except
      • It triggers but does not await back end creation and instead registers and returns a JobId.
        • Front end uses that jobID to poll the status endpoint and get status updates on the creation process; running initialization code when the status indicates successful bot creation.
      • Runs additional build and merge code on creation to resolve dependent component packages of the template

It would be minimal work to light up this 'pollable' creation endpoint for all templates and remove the introduced redundant code, however in R12 the creation work will need this separation and scaffolding as it will significantly alter the creation flow. This method also has very little impact on the core creation flows prior to a release.

Task Item

fixes #4805

Screenshots

image

@pavolum pavolum changed the title Pavolum/polling creation feat: Polling creation process Nov 13, 2020
@pavolum pavolum marked this pull request as ready for review November 13, 2020 18:47
@coveralls
Copy link

coveralls commented Nov 13, 2020

Coverage Status

Coverage decreased (-0.3%) to 54.457% when pulling 49fe2ed on pavolum/pollingCreation into b9172b1 on main.

const timer = setInterval(async () => {
try {
const response = await httpClient.get(`/status/${jobId}`);
if (response.data?.httpStatusCode === 200 && response.data.result && response.data.result != {}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the last condition for? Why isn't it strict equality?

@cwhitten cwhitten merged commit 771af33 into main Nov 17, 2020
@cwhitten cwhitten deleted the pavolum/pollingCreation branch November 17, 2020 21:27
EricDahlvang pushed a commit that referenced this pull request Nov 27, 2020
* Added status controller for front end process status queries
Added backgroundprocessmanager as a service used for process tracking
Added routing to the controller

* Cleaning up unused aspects of ported polling pattern

* creating new 'create bot' server endpoint for new creation experinece back end
Refactoring exisitng endpoint for code sharing

* scaffolding new creation backend flow

* Implemented new backend creation flow with polling

* minor bug fix

* Stronger typing and minor clean up

* minor changes for clean 'yarn typecheck'

* Fixing server response status and nit clean up

* foxing return statement

* Update project.ts

Removed unnecessary check

Co-authored-by: Patrick Volum <pavolum@microsoft.com>
Co-authored-by: Soroush <hatpick@gmail.com>
benbrown pushed a commit to benbrown/BotFramework-Composer that referenced this pull request May 24, 2021
* Added status controller for front end process status queries
Added backgroundprocessmanager as a service used for process tracking
Added routing to the controller

* Cleaning up unused aspects of ported polling pattern

* creating new 'create bot' server endpoint for new creation experinece back end
Refactoring exisitng endpoint for code sharing

* scaffolding new creation backend flow

* Implemented new backend creation flow with polling

* minor bug fix

* Stronger typing and minor clean up

* minor changes for clean 'yarn typecheck'

* Fixing server response status and nit clean up

* foxing return statement

* Update project.ts

Removed unnecessary check

Co-authored-by: Patrick Volum <pavolum@microsoft.com>
Co-authored-by: Soroush <hatpick@gmail.com>
benbrown pushed a commit that referenced this pull request Jun 11, 2021
* Added status controller for front end process status queries
Added backgroundprocessmanager as a service used for process tracking
Added routing to the controller

* Cleaning up unused aspects of ported polling pattern

* creating new 'create bot' server endpoint for new creation experinece back end
Refactoring exisitng endpoint for code sharing

* scaffolding new creation backend flow

* Implemented new backend creation flow with polling

* minor bug fix

* Stronger typing and minor clean up

* minor changes for clean 'yarn typecheck'

* Fixing server response status and nit clean up

* foxing return statement

* Update project.ts

Removed unnecessary check

Co-authored-by: Patrick Volum <pavolum@microsoft.com>
Co-authored-by: Soroush <hatpick@gmail.com>
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Added status controller for front end process status queries
Added backgroundprocessmanager as a service used for process tracking
Added routing to the controller

* Cleaning up unused aspects of ported polling pattern

* creating new 'create bot' server endpoint for new creation experinece back end
Refactoring exisitng endpoint for code sharing

* scaffolding new creation backend flow

* Implemented new backend creation flow with polling

* minor bug fix

* Stronger typing and minor clean up

* minor changes for clean 'yarn typecheck'

* Fixing server response status and nit clean up

* foxing return statement

* Update project.ts

Removed unnecessary check

Co-authored-by: Patrick Volum <pavolum@microsoft.com>
Co-authored-by: Soroush <hatpick@gmail.com>
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.

Poll the back end creation process
6 participants