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: during publish, do not copy project into a build folder #6729

Merged
merged 17 commits into from
Apr 8, 2021

Conversation

benbrown
Copy link
Contributor

@benbrown benbrown commented Apr 6, 2021

Description

This PR removes the step that copies the runtime and project files into a temporary build folder, and instead performs the build and publish directly in the folder.

  • Do not copy the files
  • Ensure that, for JS apps, we do not leave a modified appsettings.json post-publish
  • Ensure that manifest files, etc are in the correct location.

Task Item

Fixes #6531

@coveralls
Copy link

coveralls commented Apr 7, 2021

Coverage Status

Coverage decreased (-0.02%) to 51.614% when pulling 2f17f1a on benbrown/nomoveproject into 9f6c16e on main.

@benbrown benbrown marked this pull request as ready for review April 7, 2021 16:54
@@ -157,12 +170,15 @@ export class BotProjectDeploy {
.glob('**/*', {
cwd: source,
dot: true,
ignore: ['**/code.zip'], // , 'node_modules/**/*'
ignore: ['**/code.zip', '**/settings/appsettings.json'],
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 is where the magic happens as we exclude appsettings from the zip...

})
.on('error', (err) => reject(err))
.pipe(stream);

stream.on('close', () => resolve());

// write the merged settings to the deploy artifact
archive.append(JSON.stringify(settings, null, 2), { name: 'settings/appsettings.json' });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

and then write it directly into the zip here!

* @param srcTemplate
* @param resourcekey
*/
private init = async (project: any, srcTemplate: string, resourcekey: string, runtime: any) => {
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 section of code is where we set up the temporary folders for handling non-ejected bots. BYE!

@@ -316,13 +316,6 @@ export default async (composer: any): Promise<void> => {
}
throw new Error(`Runtime already exists at ${destPath}`);
},
setSkillManifest: async (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

all of this work is now done as a standard part of the azure deploy

@cwhitten cwhitten added this to the R13 milestone Apr 7, 2021
@@ -114,13 +116,24 @@ export class BotProjectDeploy {
// this returns a pathToArtifacts where the deployable version lives.
const pathToArtifacts = await this.runtime.buildDeploy(this.projPath, project, settings, profileName);

// COPY MANIFESTS TO wwwroot/manifests
Copy link
Member

Choose a reason for hiding this comment

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

@luhan2017 FYI for the skill manifest scenarios you are working on

cwhitten
cwhitten previously approved these changes Apr 7, 2021
@benbrown benbrown merged commit be57182 into main Apr 8, 2021
@benbrown benbrown deleted the benbrown/nomoveproject branch April 8, 2021 17:57
alanlong9278 added a commit that referenced this pull request Apr 9, 2021
* wenyluo/skill: (30 commits)
  Force refresh of fluent List via slice (#6810)
  fix: Telemetry for Orchestrator R13 (#6689)
  fix: Fixed broken tenant ID on save (#6809)
  feat: Add devops and app insights to get started (#6790)
  fix: check for node on app start on users machine and notify if not installed (#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (#6781)
  fix: do not provision an endpoint key (#6791)
  remove folder if project fails to create (#6793)
  Removed preview from publish type names (#6795)
  fix: Fixing deep link for QNA and Luis (#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (#6788)
  Added workerRuntime value (#6784)
  fix: apply publishing profile to new runtime during publish (#6719)
  fix: during publish, do not copy project into a build folder (#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (#6697)
  polish UI
  remove trigger when remove skill, fix bugs
  fix orchestractor modal not show
  fix skill not added after add remote skill
  remove allowedCaller when remove skill
  ...
alanlong9278 added a commit that referenced this pull request Apr 9, 2021
* main:
  fix: make composer support https proxy (#6766)
  Force refresh of fluent List via slice (#6810)
  fix: Telemetry for Orchestrator R13 (#6689)
  fix: Fixed broken tenant ID on save (#6809)
  feat: Add devops and app insights to get started (#6790)
  fix: check for node on app start on users machine and notify if not installed (#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (#6781)
  fix: do not provision an endpoint key (#6791)
  remove folder if project fails to create (#6793)
  Removed preview from publish type names (#6795)
  fix: Fixing deep link for QNA and Luis (#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (#6788)
  Added workerRuntime value (#6784)
  fix: apply publishing profile to new runtime during publish (#6719)
  fix: during publish, do not copy project into a build folder (#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (#6697)
@cwhitten cwhitten mentioned this pull request May 20, 2021
benbrown pushed a commit to benbrown/BotFramework-Composer that referenced this pull request May 24, 2021
* wenyluo/skill: (30 commits)
  Force refresh of fluent List via slice (microsoft#6810)
  fix: Telemetry for Orchestrator R13 (microsoft#6689)
  fix: Fixed broken tenant ID on save (microsoft#6809)
  feat: Add devops and app insights to get started (microsoft#6790)
  fix: check for node on app start on users machine and notify if not installed (microsoft#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (microsoft#6781)
  fix: do not provision an endpoint key (microsoft#6791)
  remove folder if project fails to create (microsoft#6793)
  Removed preview from publish type names (microsoft#6795)
  fix: Fixing deep link for QNA and Luis (microsoft#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (microsoft#6788)
  Added workerRuntime value (microsoft#6784)
  fix: apply publishing profile to new runtime during publish (microsoft#6719)
  fix: during publish, do not copy project into a build folder (microsoft#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (microsoft#6697)
  polish UI
  remove trigger when remove skill, fix bugs
  fix orchestractor modal not show
  fix skill not added after add remote skill
  remove allowedCaller when remove skill
  ...
benbrown pushed a commit to benbrown/BotFramework-Composer that referenced this pull request May 24, 2021
* main:
  fix: make composer support https proxy (microsoft#6766)
  Force refresh of fluent List via slice (microsoft#6810)
  fix: Telemetry for Orchestrator R13 (microsoft#6689)
  fix: Fixed broken tenant ID on save (microsoft#6809)
  feat: Add devops and app insights to get started (microsoft#6790)
  fix: check for node on app start on users machine and notify if not installed (microsoft#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (microsoft#6781)
  fix: do not provision an endpoint key (microsoft#6791)
  remove folder if project fails to create (microsoft#6793)
  Removed preview from publish type names (microsoft#6795)
  fix: Fixing deep link for QNA and Luis (microsoft#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (microsoft#6788)
  Added workerRuntime value (microsoft#6784)
  fix: apply publishing profile to new runtime during publish (microsoft#6719)
  fix: during publish, do not copy project into a build folder (microsoft#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (microsoft#6697)
benbrown pushed a commit that referenced this pull request Jun 11, 2021
* wenyluo/skill: (30 commits)
  Force refresh of fluent List via slice (#6810)
  fix: Telemetry for Orchestrator R13 (#6689)
  fix: Fixed broken tenant ID on save (#6809)
  feat: Add devops and app insights to get started (#6790)
  fix: check for node on app start on users machine and notify if not installed (#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (#6781)
  fix: do not provision an endpoint key (#6791)
  remove folder if project fails to create (#6793)
  Removed preview from publish type names (#6795)
  fix: Fixing deep link for QNA and Luis (#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (#6788)
  Added workerRuntime value (#6784)
  fix: apply publishing profile to new runtime during publish (#6719)
  fix: during publish, do not copy project into a build folder (#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (#6697)
  polish UI
  remove trigger when remove skill, fix bugs
  fix orchestractor modal not show
  fix skill not added after add remote skill
  remove allowedCaller when remove skill
  ...
benbrown pushed a commit that referenced this pull request Jun 11, 2021
* main:
  fix: make composer support https proxy (#6766)
  Force refresh of fluent List via slice (#6810)
  fix: Telemetry for Orchestrator R13 (#6689)
  fix: Fixed broken tenant ID on save (#6809)
  feat: Add devops and app insights to get started (#6790)
  fix: check for node on app start on users machine and notify if not installed (#6578)
  feat: Expose default search query, pre-release flag and type for each feed. (#6781)
  fix: do not provision an endpoint key (#6791)
  remove folder if project fails to create (#6793)
  Removed preview from publish type names (#6795)
  fix: Fixing deep link for QNA and Luis (#6743)
  Make LUIS, QNA and Speech blocking modals so they cannot be dismiessed while active (#6788)
  Added workerRuntime value (#6784)
  fix: apply publishing profile to new runtime during publish (#6719)
  fix: during publish, do not copy project into a build folder (#6729)
  chore: Adapters: copy the 'type' passed in the adapter config to fully support adapter schemas (#6697)
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…ft#6729)

* do not copy project into a build folder

* * during publish, do NOT write the settings file to disk
* instead, append it to the zip file directly

* clean out code used for doing builds in temp folders

* Copy manifests into wwwroot/manifests as part of publish process

* fix lint

Co-authored-by: Chris Whitten <[email protected]>
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.

Bot publishing fails to include ProjectReferenced DLLs in Adaptive Runtime
3 participants