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: Prevent old content from overwriting newer changes #2156

Merged
merged 8 commits into from
Mar 4, 2020

Conversation

benbrown
Copy link
Contributor

@benbrown benbrown commented Mar 3, 2020

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

@benbrown benbrown changed the base branch from stable to benbrown/plugins March 3, 2020 19:22
@benbrown benbrown changed the title Prevent old content from overwriting newer changes feat: Prevent old content from overwriting newer changes Mar 3, 2020
@benbrown benbrown merged commit e96c744 into benbrown/plugins Mar 4, 2020
@benbrown benbrown deleted the benbrown/preventOverwrite branch March 4, 2020 20:30
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants