{"action":"created","issue":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/978","repository_url":"https://api.github.com/repos/SubPointSolutions/spmeta2","labels_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/978/labels{/name}","comments_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/978/comments","events_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/978/events","html_url":"https://github.com/SubPointSolutions/spmeta2/issues/978","id":214387927,"number":978,"title":"Incremental provision real time trace problems","user":{"login":"sergeisnitko","id":7835251,"avatar_url":"https://avatars0.githubusercontent.com/u/7835251?v=3","gravatar_id":"","url":"https://api.github.com/users/sergeisnitko","html_url":"https://github.com/sergeisnitko","followers_url":"https://api.github.com/users/sergeisnitko/followers","following_url":"https://api.github.com/users/sergeisnitko/following{/other_user}","gists_url":"https://api.github.com/users/sergeisnitko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergeisnitko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergeisnitko/subscriptions","organizations_url":"https://api.github.com/users/sergeisnitko/orgs","repos_url":"https://api.github.com/users/sergeisnitko/repos","events_url":"https://api.github.com/users/sergeisnitko/events{/privacy}","received_events_url":"https://api.github.com/users/sergeisnitko/received_events","type":"User","site_admin":false},"labels":[{"id":102271817,"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars1.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false},"assignees":[{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars1.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/milestones/146","html_url":"https://github.com/SubPointSolutions/spmeta2/milestone/146","labels_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/milestones/146/labels","id":2288623,"number":146,"title":"2017.03.06, 1.2.120","description":"","creator":{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars1.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":6,"state":"open","created_at":"2017-01-31T08:33:35Z","updated_at":"2017-03-15T22:56:35Z","due_on":"2017-03-05T08:00:00Z","closed_at":null},"comments":2,"created_at":"2017-03-15T13:25:36Z","updated_at":"2017-03-15T22:57:04Z","closed_at":null,"body":"Hello, I have some problems with real time trace in incremental provision\r\n\r\nVersion: SPMeta2.CSOM.Standard 1.2.120-beta2\r\n\r\nOn _OnModelNodeProcessed_ event I try to show the information about state of incremental provision (should it be deployed or not) and every time I get that the node don't need to be deployed. But after full deployment I can get the state of incremental provision of each node and it is correct. So the incremental deploy works correct, it works not so fine on _OnModelNodeProcessed_ event\r\n\r\nSome screenshots for more information:\r\n![screenshot_8](https://cloud.githubusercontent.com/assets/7835251/23950232/529b0188-099b-11e7-8c45-b9cee21fb8cf.png)\r\n\r\n![img_15032017_154856_0](https://cloud.githubusercontent.com/assets/7835251/23950177/22245cac-099b-11e7-968c-3dbe5123172a.png)\r\n\r\n![img_15032017_155011_0](https://cloud.githubusercontent.com/assets/7835251/23950191/2af59a6c-099b-11e7-94ca-a1b276b472c2.png)\r\n\r\n\r\nThe sample model:\r\n```c#\r\nvar SiteAssetsModel = SPMeta2Model.NewSiteModel(site =>\r\n{\r\n\tsite\r\n\t\t.AddUserCustomAction(Core.SpfActions.SpfSearchHackAction())\r\n\t\t.AddUserCustomAction(Core.SpfActions.SpfShortLinksAction())\r\n\t\t.AddUserCustomAction(Core.SpfActions.SpfMPArtefactsAction())\r\n\r\n\t\t.AddSiteFeature(Core.SpfFeatures.SharePointServerPublishingInfrastructure)\r\n\r\n\t\t.AddTaxonomyTermStore(SpfTaxonomy.DefaultSiteTermStore(), termStore =>\r\n\t\t{\r\n\t\t\ttermStore\r\n\t\t\t\t.AddTaxonomyTermGroup(SpfTaxonomy.MediaBankTermGroup(), group =>\r\n\t\t\t\t{\r\n\t\t\t\t\tgroup\r\n\t\t\t\t\t\t.AddTaxonomyTermSet(SpfTaxonomy.MediaBankCategoryTermSet())\r\n\t\t\t\t\t\t.AddTaxonomyTermSet(SpfTaxonomy.MediaBankKeywordsTermSet())\r\n\t\t\t\t\t\t.AddTaxonomyTermSet(SpfNavigation.GlobalNavigation(), navigation=>\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tnavigation\r\n\t\t\t\t\t\t\t\t.AddNavigationTerms()\r\n\t\t\t\t\t\t\t\t;\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t;\r\n\t\t\t\t})\r\n\t\t\t\t;\r\n\t\t})\r\n\t\t.AddRootWeb(new RootWebDefinition(), RootWeb =>\r\n\t\t{\r\n\t\t\tRootWeb\r\n\t\t\t\t.AddWebNavigationSettings(SpfNavigation.WebGlobalNavigation())\r\n\t\t\t\t.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list =>\r\n\t\t\t\t{\r\n\t\t\t\t\tvar FolderPath = Path.Combine(SpfExtentions.SystemPath, SpfExtentions.DinamicAssets);\r\n\t\t\t\t\tif (Directory.Exists(FolderPath))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSpfExtentions.FillApplytoFile();\r\n\t\t\t\t\t\tModuleFileUtils.LoadModuleFilesFromLocalFolder(list, FolderPath);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t})\r\n\t\t\t\t.AddWeb(SpfWebs.ShortLinksWeb(), InWeb =>\r\n\t\t\t\t{\r\n\t\t\t\t\tInWeb\r\n\t\t\t\t\t\t.AddWelcomePage(new WelcomePageDefinition\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tUrl = UrlUtility.CombineUrl(BuiltInListDefinitions.Pages.CustomUrl, SpfPublishPages.ShortLinkPage().FileName)\r\n\t\t\t\t\t\t})\r\n\r\n\t\t\t\t\t\t.AddMasterPageSettings(SpfPages.MasterPage())\r\n\r\n\t\t\t\t\t\t.AddWebFeature(Core.SpfFeatures.DisableMinimalDownloadStrategy)\r\n\t\t\t\t\t\t.AddWebFeature(Core.SpfFeatures.SharePointServerPublishing)\r\n\r\n\t\t\t\t\t\t.AddList(SpfPublishPages.Pages(), SitePages =>\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t SitePages\r\n\t\t\t\t\t\t\t\t.AddPublishingPage(SpfPublishPages.ShortLinkPage(), SPage =>\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tSPage\r\n\t\t\t\t\t\t\t\t\t\t.AddWebPart(Core.SpfPages.HideLeftNavWP())\r\n\t\t\t\t\t\t\t\t\t\t.AddWebPart(Core.SpfPages.ShortLinkCEWP());\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t});\r\n\t\t\t\t})\r\n\t\t\t\t;\r\n\r\n\t\t});\r\n});\r\nSiteAssetsModel.SetIncrementalProvisionModelId(\"Assets\");\r\n```\r\n\r\nThe deploy code is here:\r\n```c#\r\npublic static void DeployModel(this ClientContext Ctx, WebModelNode model)\r\n{\r\n\tBeforeDeployModel(x =>\r\n\t{\r\n\t\tx.DeployModel(SPMeta2.CSOM.ModelHosts.WebModelHost.FromClientContext(Ctx), model);\r\n\t});\r\n}\r\npublic static void DeployModel(this ClientContext Ctx, SiteModelNode model)\r\n{\r\n\tBeforeDeployModel(x =>\r\n\t{\r\n\t\tx.DeployModel(SPMeta2.CSOM.ModelHosts.SiteModelHost.FromClientContext(Ctx), model);\r\n\t});\r\n\r\n}\r\npublic static void BeforeDeployModel(Action<StandardCSOMProvisionService> Deploy)\r\n{\r\n\tvar provisionService = new StandardCSOMProvisionService();\r\n\r\n\tvar IncProvisionConfig = new IncrementalProvisionConfig();\r\n\tIncProvisionConfig.AutoDetectSharePointPersistenceStorage = true;\r\n\tprovisionService.SetIncrementalProvisionMode(IncProvisionConfig);\r\n\tprovisionService.OnModelNodeProcessed += ModelNodeProcessed;\r\n\tDeploy(provisionService);\r\n\tprovisionService.SetDefaultProvisionMode();\r\n\tConsole.WriteLine();\r\n\tConsole.WriteLine();\r\n}\r\n\r\npublic static void ModelNodeProcessed(object sender, ModelProcessingEventArgs args)\r\n{\r\n\tvar ModelId = args.Model.GetPropertyBagValue(DefaultModelNodePropertyBagValue.Sys.IncrementalProvision.PersistenceStorageModelId);\r\n\r\n\tbool shouldDeploy = args.CurrentNode.GetIncrementalRequireSelfProcessingValue();\r\n\r\n\tvar NodeName = args.CurrentNode.Value.ToString();\r\n\tif (NodeName.Length > 20)\r\n\t{\r\n\t\tNodeName = NodeName.Substring(0, 20) + \"...\";\r\n\t}\r\n\r\n\tConsole.WriteLine(\r\n\t\tstring.Format(\"{5}[{6}] [{0}/{1}] - [{2}%] - [{3}] [{4}]\",\r\n\t\tnew object[] {\r\n\t\t\targs.ProcessedModelNodeCount.AddZeros(3),\r\n\t\t\targs.TotalModelNodeCount.AddZeros(3),\r\n\t\t\tMath.Round(100d * (double)args.ProcessedModelNodeCount / (double)args.TotalModelNodeCount).AddSpacesBefore(3),\r\n\t\t\targs.CurrentNode.Value.GetType().Name,\r\n\t\t\tNodeName,\r\n\t\t\t(shouldDeploy == true) ? \"[+]\" : \"[-]\",\r\n\t\t\tModelId\r\n\t   }));\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/comments/286905669","html_url":"https://github.com/SubPointSolutions/spmeta2/issues/978#issuecomment-286905669","issue_url":"https://api.github.com/repos/SubPointSolutions/spmeta2/issues/978","id":286905669,"user":{"login":"SubPointSupport","id":8142869,"avatar_url":"https://avatars1.githubusercontent.com/u/8142869?v=3","gravatar_id":"","url":"https://api.github.com/users/SubPointSupport","html_url":"https://github.com/SubPointSupport","followers_url":"https://api.github.com/users/SubPointSupport/followers","following_url":"https://api.github.com/users/SubPointSupport/following{/other_user}","gists_url":"https://api.github.com/users/SubPointSupport/gists{/gist_id}","starred_url":"https://api.github.com/users/SubPointSupport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubPointSupport/subscriptions","organizations_url":"https://api.github.com/users/SubPointSupport/orgs","repos_url":"https://api.github.com/users/SubPointSupport/repos","events_url":"https://api.github.com/users/SubPointSupport/events{/privacy}","received_events_url":"https://api.github.com/users/SubPointSupport/received_events","type":"User","site_admin":false},"created_at":"2017-03-15T22:57:04Z","updated_at":"2017-03-15T22:57:04Z","body":"And really thank you for trying out incremental provision and providing feedback really appreciate that!"}}
{"actor":{"display_login":"SubPointSupport"}}