-
Notifications
You must be signed in to change notification settings - Fork 378
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: Prevent old content from overwriting newer changes #2156
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not 100% working on LU files yet
cwhitten
requested changes
Mar 4, 2020
…Composer into benbrown/preventOverwrite
cwhitten
approved these changes
Mar 4, 2020
cwhitten
added a commit
that referenced
this pull request
Mar 19, 2020
* first commit of working prototype for mongoDB storage * change mechanism for creating zip file for syncing to runtime now builds all the files loaded into project (from arbitrary source) rahter than zipping a folder on disk * clean up console output * plugin loader looks for plugins, finds them * dynamically load in the storage provider via plugin loader use custom storage if one is specified * remove some debug traces * clean up some minor code formatting things * disable linter rule to allow for requiring in plugin modules * slight refactor of plugin loader to encapsulate functionality add sample web route plugin first tiny stab at publish -- TIME TO BRANCH * functioning auth implementattion using passportjs * sample github auth * first round of changes for multi-user support Related to #1918 and #1917 * add in the bot project id into the route * fix new bot * fix save as * rationalize all the URLS used in context of a project * plumb user identity down through storage * disable plugins * add readme * plugin readme * plugin readme * plugin readme * plugin readme * import publisher controller from other branch * update to readme * import prototype of publishing page * updates * delete environment and connector * add error checking for missing project by id * Better error handling for attempts to write to a missing or moved project Should fix last remaining item in #1918 * add publish method with localpublish plugin * keep bot dir clean * basic publish of localpublish plugin * remove hostBot * add gitignore file * change unzip template into copy template folder * Fix build script * Fix default projectMap not exists * change luis operation to match local plugin * polish default setting * use projectId * clean up * remove lib dir * use projectId * use limit 'currentBotProjects' cache * remove unused * Update copy * return error response when publish failed * update name initialization process * fix some test,hide publish tab and change deploy script * fix UT integrity check * fix bf-cli version error * update the version * remove @microsoft/bf-cli-command@1.0.0 * try to fix todo e2e test * fix lint * fix lint * remove some unused test and skip some failed unit tests * feat: Prevent old content from overwriting newer changes (#2156) * updates to write operations to prevent overwrite not 100% working on LU files yet * debounce lu * remove comment * remove some console logs * address feedback from chris * remove commented code * change hint word deploy to publish * fix lint * fix some test syntax * update the ui for notification page * fix luis publish path not found * fix some e2e tests * fix onboarding when using projectId * fix notification page bug * Back out simple overwrite protection, will replace with less error prone mechanism * add plugins volumn in docker * fix docker up * fix unit test * fix the filesetting path * change docker to map multi ports. in order to support multi runtime * add projectId when create and delete dialog * fix botstatus * fix botstatus * remove console log * fix settings files path * update the moke data Co-authored-by: Wenyi Luo <wenyluo@microsoft.com> Co-authored-by: Dong Lei <donglei@microsoft.com> Co-authored-by: zhixzhan <zhixzhan@microsoft.com> Co-authored-by: liweitian <liweitian93@outlook.com> Co-authored-by: leilzh <leilzh@microsoft.com> Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
lei9444
added a commit
to lei9444/BotFramework-Composer-1
that referenced
this pull request
Jun 15, 2021
* first commit of working prototype for mongoDB storage * change mechanism for creating zip file for syncing to runtime now builds all the files loaded into project (from arbitrary source) rahter than zipping a folder on disk * clean up console output * plugin loader looks for plugins, finds them * dynamically load in the storage provider via plugin loader use custom storage if one is specified * remove some debug traces * clean up some minor code formatting things * disable linter rule to allow for requiring in plugin modules * slight refactor of plugin loader to encapsulate functionality add sample web route plugin first tiny stab at publish -- TIME TO BRANCH * functioning auth implementattion using passportjs * sample github auth * first round of changes for multi-user support Related to microsoft#1918 and microsoft#1917 * add in the bot project id into the route * fix new bot * fix save as * rationalize all the URLS used in context of a project * plumb user identity down through storage * disable plugins * add readme * plugin readme * plugin readme * plugin readme * plugin readme * import publisher controller from other branch * update to readme * import prototype of publishing page * updates * delete environment and connector * add error checking for missing project by id * Better error handling for attempts to write to a missing or moved project Should fix last remaining item in microsoft#1918 * add publish method with localpublish plugin * keep bot dir clean * basic publish of localpublish plugin * remove hostBot * add gitignore file * change unzip template into copy template folder * Fix build script * Fix default projectMap not exists * change luis operation to match local plugin * polish default setting * use projectId * clean up * remove lib dir * use projectId * use limit 'currentBotProjects' cache * remove unused * Update copy * return error response when publish failed * update name initialization process * fix some test,hide publish tab and change deploy script * fix UT integrity check * fix bf-cli version error * update the version * remove @microsoft/bf-cli-command@1.0.0 * try to fix todo e2e test * fix lint * fix lint * remove some unused test and skip some failed unit tests * feat: Prevent old content from overwriting newer changes (microsoft#2156) * updates to write operations to prevent overwrite not 100% working on LU files yet * debounce lu * remove comment * remove some console logs * address feedback from chris * remove commented code * change hint word deploy to publish * fix lint * fix some test syntax * update the ui for notification page * fix luis publish path not found * fix some e2e tests * fix onboarding when using projectId * fix notification page bug * Back out simple overwrite protection, will replace with less error prone mechanism * add plugins volumn in docker * fix docker up * fix unit test * fix the filesetting path * change docker to map multi ports. in order to support multi runtime * add projectId when create and delete dialog * fix botstatus * fix botstatus * remove console log * fix settings files path * update the moke data Co-authored-by: Wenyi Luo <wenyluo@microsoft.com> Co-authored-by: Dong Lei <donglei@microsoft.com> Co-authored-by: zhixzhan <zhixzhan@microsoft.com> Co-authored-by: liweitian <liweitian93@outlook.com> Co-authored-by: leilzh <leilzh@microsoft.com> Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a mechanism that will prevent one instance of Composer from overwriting a newer version of that content. It does this by using the lastModified date provided by the storage layer.
Every write operation now includes the document's last modified date provided at read time. The server checks the date against the current date before accepting the write. If the provided date is older than the latest date "on disk," the write is rejected and the client presents a popup message.
Task Item
Fixes #1916