Failing to build models with VS Ext 8.0.4

Hi,
I have just tried to re-build my models ( first time in at least a week on this project ) and for some reason it is failing to create the models.
I currently have:
Umbraco Version: 7.14
The Visual Studio extension Version: 8.0.4
Umbraco.ModelsBuilder Version: 3.0.10
Umbraco.ModelsBuilder.API Version: 3.0.10
I wasn't sure if I should update the Umbraco.ModelsBuilder to the latest 8.0.x versions, I also tried this, but the error remained so I reverted them back.
I have updated my solution to .NET 4.7.2
The solution is set to use the latest version of C#
But after making both of the above changes, the error message remains the same, which is the following:
UmbracoModelsBuilder: Starting v8.0.4 3/20/2019 5:59:14 PM.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError)
{"Message":"An error has occurred.","ExceptionMessage":"Feature 'expression-bodied property' is not available in C# 5.  Please use language version 6 or greater.","ExceptionType":"Umbraco.ModelsBuilder.Building.CompilerException","StackTrace":"   at Umbraco.ModelsBuilder.Building.Compiler.ThrowExceptionFromDiagnostic(String path, String code, Diagnostic diagnostic) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 161\r\n   at Umbraco.ModelsBuilder.Building.Compiler.<>c__DisplayClass12_0.<GetCompilation>b__0(KeyValuePair`2 x) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 50\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Umbraco.ModelsBuilder.Building.Compiler.GetCompilation(String assemblyName, IDictionary`2 files, SyntaxTree[]& trees) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 46\r\n   at Umbraco.ModelsBuilder.Building.CodeParser.Parse(IDictionary`2 files, IEnumerable`1 references) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\CodeParser.cs:line 38\r\n   at Umbraco.ModelsBuilder.Api.ApiHelper.GetModels(String modelsNamespace, IDictionary`2 files) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Api\\ApiHelper.cs:line 16\r\n   at Umbraco.ModelsBuilder.Api.ModelsBuilderApiController.GetModels(GetModelsData data) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder.Api\\ModelsBuilderApiController.cs:line 65\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}
UmbracoModelsBuilder:    at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
   at Umbraco.ModelsBuilder.Api.ApiClient.GetModels(Dictionary`2 ourFiles, String modelsNamespace)
   at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)

Currently I am unable to update my client's site which is somewhat critical, any help you can give me would be much appreciated. :)

Looking at the error, it's a c# version error by the looks of it. Have you tried the suggestion here:
https://our.umbraco.com/forum/templates-partial-views-and-macros/83962-modelsbuilder-not-working-with-c6-code#comment-266274
This tells Models Builder which version of c# to use :-)

Hi @NikRimington
I have tried that but it didn't make any difference unfortunately. In the docs you linked to, it does say this is for the [Live]dll. However I am using the API and the Visual Studio plugin to generate the models, so maybe it doesn't effect the code that is generated by the Visual Studio extension?

Umbraco.ModelsBuilder.LanguageVersion (string, default is CSharp5) indicates the C# language version which is used when compiling the models in [Live]Dll. Can be set to CSharp6 or Experimental to try the new C# features.

My gut feeling is this is not related to the issue I am having... but I could be wrong :)

Hmm, I'm sure it used to take that into account as I had to do that on a project a little while back.

Well, I just tried again and it has worked :)
I am not sure what is different compared to when I tried it earlier today as I've tried so many different things, but this time, it's worked!
Thanks @NikRimington
I think it would still be a good idea for the documentation to be more detailed as to the required setup / configuration of these sort of bits :)

Just another thought on this @zpqrtbnk originally I was just trying to generate the models as I have done for the last 12 months, I had not intended to update to the latest version of C# and only did so because of this error message. I.e. it looks like there may be an issue with generating the code without the C# 6 setting?

Just out of interest, did you install a new property editor? Also what version of Umbraco did you upgrade from (I'm assuming you upgraded recently)?

Hi @NikRimington
The last time I generated the models was on the 4th March, on the 15th March I used Umbraco Cloud to auto-upgrade from 7.13.2 to 7.14.0
Before trying to use the Model's builder Extension this afternoon I had added a new Dropdown data type with 5 items to an existing Document Type.
When this failed I tried upgrading my C# version support in the solution, moved the entire solution to .NET 4.7.2 and also tried removing the new Data type in case that had been the issue.
What I find strange is that it's now working with the C#6 setting. I don't understand why it should make a difference when generating the files. I can understand if it generated C#6 code while I was using C#5 that at the point of my building the solution things would fail, however I don't understand why it fails to build the models for a C#5 solution, I am sure not everyone is going to want / or know how to upgrade their solution.

Quick update (will reply w/ more details later)

On the server/site: v7 requires ModelsBuilder 3.x and does not support MB 8.x, v8 requires MB 8.x
On Visual Studio: the extension 3.x supports only v7 sites, whereas 8.x supports both v7 and v8

Meaning that, in your case, you should not change anything at site level, and you can update the Visual Studio extension to 8.x (in order to support both v7 and v8 sites) and it all should work.
Well, obviously - something went wrong in your case, going to look into it in more details.

Hi @zpqrtbnk
I've just updated Visual Studio to the latest patch release 15.9.11 which might be related ( but I don't think so )
Anyhow, I am unfortunately again getting an error trying to generate the models and I'm not sure the best way to debug what is wrong with Model's builder.
I am now getting the following error:
UmbracoModelsBuilder: Starting v8.0.4 4/8/2019 6:29:31 PM.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError)
{"Message":"An error has occurred.","ExceptionMessage":"{ or ; expected","ExceptionType":"Umbraco.ModelsBuilder.Building.CompilerException","StackTrace":"   at Umbraco.ModelsBuilder.Building.Compiler.ThrowExceptionFromDiagnostic(String path, String code, Diagnostic diagnostic) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 161\r\n   at Umbraco.ModelsBuilder.Building.Compiler.<>c__DisplayClass12_0.<GetCompilation>b__0(KeyValuePair`2 x) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 50\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Umbraco.ModelsBuilder.Building.Compiler.GetCompilation(String assemblyName, IDictionary`2 files, SyntaxTree[]& trees) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 46\r\n   at Umbraco.ModelsBuilder.Building.CodeParser.Parse(IDictionary`2 files, IEnumerable`1 references) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\CodeParser.cs:line 38\r\n   at Umbraco.ModelsBuilder.Api.ApiHelper.GetModels(String modelsNamespace, IDictionary`2 files) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Api\\ApiHelper.cs:line 16\r\n   at Umbraco.ModelsBuilder.Api.ModelsBuilderApiController.GetModels(GetModelsData data) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder.Api\\ModelsBuilderApiController.cs:line 65\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}
UmbracoModelsBuilder:    at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
   at Umbraco.ModelsBuilder.Api.ApiClient.GetModels(Dictionary`2 ourFiles, String modelsNamespace)
   at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)

I couldn't find any further details in the log so I'm a bit unsure how to proceed?
Happy to try and help diagnose if this is a MB issue or if you think I've done something that might be breaking it, please do let me know.

Unfortunately haven't been able to dig into this - raising priority

@zpqrtbnk I could really do with a hand trying to debug this issue as currently I cannot continue with the development of my client's solution as I cannot create the new models ;(
If there is any chance we could maybe have a Skype call early next week to try and debug this remotely I'd be happy to help as it would probably be a win-win if we can fix an issue.

Can you share (email if you prefer) the content of your models directory before you trigger the generation, and get the error you reported above (with VS 15.9.11), along with the complete set of ModelsBuilder appSettings on the server?

No need to share files, the error you are seeing is because one of your file probably contains a line similar to:
  public string Something { get => _something; set => _something = value; }

Which is C#7 which you cannot support in 3.0.10 even with settings, because 3.0.10 relies on Roslyn 1.0 which did not support C#7 at all.
So... I have produced a 3.1.0 version which relies on Roslyn 2.10 which supports C# up to 7.3. All tests are OK, but I would need to test it on a real site. Also had to up the target framework from 4.5 to 4.6.2 because Roslyn 2.10 would not support 4.5.
Attached Zip archive contains the two corresponding NuGet packages. Any chance you can try them and report? If all works, then I'll upload them to the official NuGet servers.
v3.1.0.zip

Hi Stephan,
I have tried your new version, but its now showing a different error, I have guessed your email is likely to be firstname at your company dot com... but if I am wrong and it's now a lost email, please let me know your email address :)
If you did receive my email you will see the full details, but in a nut shell it now complains with the following error:
Could not load file or assembly 'System.Collections.Immutable, Version=<IP_ADDRESS>
( I have version 1.5.0 installed which is the latest version )
Chris

P.s. the email just bounced back... so please do let me know your email address, you could send it to me via our contact us form: https://www.vizioz.com/contact-us/ if you don't want to post it on GitHub :)

Going to be stephane  umbraco  com.
Was afraid of this: it's not a big deal, but the new Roslyn has tons of updated dependencies which require binding redirects in web.config. Maybe if you're willing to share the current state of your binding redirects, I can tell you what to update?

Hi @zpqrtbnk
The current bindings are;
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!-- Old asp.net ajax assembly bindings -->
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <!-- Ensure correct version of MVC -->
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <!-- Ensure correct version of HtmlAgilityPack -->
      <dependentAssembly>
        <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845DCD8080CC91" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

I tried adding a binding for System.Collections.Immutable but it then said I needed a reference for NetStandard 2.0 so I have reverted this in case I did it wrong  :)
I look forward to hearing from you,
Cheers, Chris

@zpqrtbnk
A quick update, I have added the following to the web.config file:
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>" newVersion="1.5.0" />
      </dependentAssembly>

And had to add:
<add assembly="netstandard, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>

The web site runs fine, both frontend and back office, however model's builder continues to fail, if I remove the C#7 syntax and then try and run model's builder it works fine.
E.g. changing this:
set => name = value;

to:
set
{
    name = value;
}

The error I am now getting from model's builder is definitely related to C#7, see below:

UmbracoModelsBuilder: Starting v8.0.4 4/15/2019 10:38:35 AM.
UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError)
{"Message":"An error has occurred.","ExceptionMessage":"Feature 'expression body property accessor' is not available in C# 6. Please use language version 7.0 or greater. (at C:\\Development\\Client Projects\\Segal Group\\SWCTF\\SegalGroup.Swctf.Core\\Models\\CourseScheduleEntityNode.cs:line 50).","ExceptionType":"Umbraco.ModelsBuilder.Building.CompilerException","StackTrace":"   at Umbraco.ModelsBuilder.Building.Compiler.ThrowExceptionFromDiagnostic(String path, String code, Diagnostic diagnostic) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 161\r\n   at Umbraco.ModelsBuilder.Building.Compiler.<>c__DisplayClass12_0.<GetCompilation>b__0(KeyValuePair`2 x) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 50\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Umbraco.ModelsBuilder.Building.Compiler.GetCompilation(String assemblyName, IDictionary`2 files, SyntaxTree[]& trees) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\Compiler.cs:line 46\r\n   at Umbraco.ModelsBuilder.Building.CodeParser.Parse(IDictionary`2 files, IEnumerable`1 references) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Building\\CodeParser.cs:line 38\r\n   at Umbraco.ModelsBuilder.Api.ApiHelper.GetModels(String modelsNamespace, IDictionary`2 files) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Api\\ApiHelper.cs:line 16\r\n   at Umbraco.ModelsBuilder.Api.ModelsBuilderApiController.GetModels(GetModelsData data) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder.Api\\ModelsBuilderApiController.cs:line 65\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}
UmbracoModelsBuilder:    at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
   at Umbraco.ModelsBuilder.Api.ApiClient.GetModels(Dictionary`2 ourFiles, String modelsNamespace)
   at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)

Ahh... just spotted:
<add key="Umbraco.ModelsBuilder.LanguageVersion" value="CSharp6" />

Which I have updated to:
<add key="Umbraco.ModelsBuilder.LanguageVersion" value="CSharp7" />

And now everything seems happy :)
Albeit there seem to be a LOT of exceptions showing in the debug output window, quite a few of which I have not see before. The site still seems to be running fine, but it can't be good to have all these exceptions, I'll try and take a deeper look into them once I've finished the current feature release for my client.
Thanks again for your help @zpqrtbnk
If you need me to test any other versions of Models Builder, just let me know.
Cheers, Chris

Note: you probably can remove the LanguageVersion appSetting entirely, as MB 3.1 is C# 7.3 by default.
So, what we have so far: version 3.1 of MB (with latest Roslyn 2.10) supports C# 7.3 and works, provided that some binding redirects are updated. I am going to experiment to find out the list of exact redirects that are needed.
Still, some exceptions in the Debug window: can you give me more details about these?

@zpqrtbnk these exceptions are not showing when I run Model's builder, so I think they are probably more related to the core than to MB, I will drop you an email with the details.


feat(pagination): allow changing resultsPerPage outside of GridSettings

When re-rendering Griddle with a different resultPerPage prop, it won't affect the results.
Lets say we have a wrapper component that holds in its state the number of results per page, and this number is being changed by another component outside of Griddle.
Currently Griddle won't use the new resultsPerPage value, won't set the page size, and won't re-render the grid.
Example:
...
getInitialState() {
  return {
     myResultsPerPage: 5
  };
}

onChange(newResults) {
   this.setState({ myResultsPerPage: newResults });
}

render() {
  return (
    <Griddle
      ....
      resultsPerPage={this.state.myResultsPerPage}
     />
  );
}

Thanks for adding this!


Clean up csproj files

From @davidfowl
Clean up all of the extraneous content, the extra content globs etc.

I'm interested in working on this issue. May I be assigned to this task?

[12:24 PM] Niharika Sai Duggi
Hi there,
I'm interested in working on issue , I've looked into the details and I'm ready to contribute, as a part of my university's requirement to contribute to open source project. If there are any specific guidelines or additional information I should know about, please assign this to me.
Thanks for the opportunity to contribute!


Suggestions

Hi all,
Thanks a lot for bringing OZ storage layout checks to foundry. However, the current way this library works makes hard to actually use Upgrades helper in tests, due to the need to add --ffi and that it often requires a clean full compilation, it hurts dev x.
My suggestion is that there is no need to map 1:1 the behavior from the hardhat version.
It feels unnecessary to pass the contract name in a string (and pass constructor arguments inside Options struct), have the upgrades helper load the info, then run storage checks through --ffi only in that contract, every contract.
In foundry, it's no big drama to just deploy the implementation contract and pass the address, something like
(TestProxyHelper just deploys an ERC1967)
address impl = address(new RoyaltyModule());
royaltyModule = RoyaltyModule(
    TestProxyHelper.deployUUPSProxy(
        impl,
        abi.encodeCall(
            RoyaltyModule.initialize, (
                address(governance)
            )
        )
    )
);

For the storage check, I'm going to have a base script that runs npx @openzeppelin/upgrades-core validate <build-info-dir> --requireReference
Anyway, hope this feedback is useful, thanks again!

Hi @Ramarti, thanks for the feedback.  I agree with your points, but would like to share why the current design was chosen.
The current behavior was designed to allow upgrade safety validations to run by default, to minimize the likelihood of unsafe deployments.  Passing in the contract name is needed so that we can programmatically identify the requested implementation contract, and use that identifier to 1) run validations, and 2) get the contract bytecode using vm.getCode for deployment via either a create operation or through Defender.
Similarly, even for the proxy contracts themselves, the internal functions of the library also retrieve them their bytecode by contract name, so that they could be deployed through Defender if needed.  This would allow users to use a salt with Defender deployments in order to get deterministic addresses on different chains.
For tests, is automation (i.e. ease of deploying proxies) the only scenario that you are interested in?   I see it could be useful to add additional functions such as what you proposed, to help automate proxy deployments with an existing implementation address.  It would be up to the user to ensure that they are using an implementation that is upgrade safe, and this would need to be documented clearly.


Fix PHP 7.4 deprecations

We had the deprecation handler on a too-low setting, so we missed deprecations under PHP 7.4: https://travis-ci.org/getsentry/sentry-php/jobs/622409178#L330-L345
This fixes them.

Can you please also update the AppVeyor config file to use Visual Studio 2019 as image and test against PHP 7.4? furthermore please also update the Composer version to 1.9.1

Any estimated date for this to be released? These deprecation warnings are getting logged on Sentry and it's burning through my events.

Don't take these words as written on stone, but probably tomorrow morning


DynamoDB deletion protection on production environment

Amplify CLI Version
12.6.0
Question
As deletion protection feature is available for DynamoDB.
announcement: https://aws.amazon.com/jp/about-aws/whats-new/2023/03/amazon-dynamodb-table-deletion-protection/
I'm wondering if it's possible to set this flag only to tables in the production environment.
Is it something we can do with override.ts ?

Hey @ggorge-etiqa, thank you for reaching out. Could you clarify if the DynamoDB table was created on the storage category or the API category?
for example on a DynamoDB table created on storage category, we should be able to use overrides to enable deletion protection.
example:
import {
  AmplifyDDBResourceTemplate,
  AmplifyProjectInfo,
} from "@aws-amplify/cli-extensibility-helper";

export function override(
  resources: AmplifyDDBResourceTemplate,
  amplifyProjectInfo: AmplifyProjectInfo
) {
    if(amplifyProjectInfo.envName === "dev") {
  resources.dynamoDBTable.deletionProtectionEnabled = true;
    }
}

Hi @ykethan I think it's in the API category. The DynamoDB tables I want to protect from deletion are created by AppSync.

@ggorge-etiqa thank you for the clarification. Please refer to this override example : https://github.com/aws-amplify/amplify-cli/issues/13465#issuecomment-1847511407
resources.models[<model>].modelDDBTable.deletionProtectionEnabled = true;

thanks @ykethan
    if (amplifyProjectInfo.envName === "prod") {

        for (const model in resources.models) {
            resources.models[model].modelDDBTable.deletionProtectionEnabled = true;
            console.log(resources.models[model].modelDDBTable); //ensure property is set
        }

    }

@ggorge-etiqa noticed the issue was re-opened. Is there anything else i can assist on this?


Create include to drive traffic from SignalR to SignalR Core

See https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/index as an example.
Obviously mention the core version is in preview.

The whole doc? And isn't it redundant if there is already an include stating where the new docs are? This issue needs to be more clear.

https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr needs something.
Probably remove Questions and comments


[fix]: base image elfutils version issue

ref https://github.com/sustainable-computing-io/kepler/actions/runs/11814219047/job/32912842046
it seems with elfutils version upgrade, our base image code need to be update accordingly.

it seems build success and fail at image sign process without secret available as PR from fork.

it seems build success and fail at image sign process without secret available as PR from fork.

but should we consider to bump up base image tag to libbpf 1.4?


Adding background export job

Fixes #1

Coverage decreased (-48.1%) to 51.88% when pulling 753a051df0336058b9d0444b7bb96fb64caf170a on export-job into a993c73f91f2574c0f728f6d7a9f4435827bd424 on master.

Coverage remained the same at 100.0% when pulling c94d3d1586cfe6d2bbe1a80aa35cc35d0dbbdfe0 on export-job into a993c73f91f2574c0f728f6d7a9f4435827bd424 on master.


Improve 'Magento' detection

Current Detection
    "Magento": {
      "cats": [
        6
      ],
      "cookies": {
        "frontend": "\\;confidence:50"
      },
      "cpe": "cpe:/a:magento:magento",
      "description": "Magento is an open-source ecommerce platform written in PHP.",
      "html": [
        "<script [^>]+data-requiremodule=\"mage/\\;version:2",
        "<script [^>]+data-requiremodule=\"Magento_\\;version:2",
        "<script type=\"text/x-magento-init\">"
      ],
      "icon": "Magento.svg",
      "implies": [
        "PHP",
        "MySQL"
      ],
      "js": {
        "Mage": "",
        "VarienForm": ""
      },
      "magento": "Magento/([0-9.]+)\\;version:\\1",
      "oss": true,
      "scripts": [
        "js/mage",
        "skin/frontend/(?:default|(enterprise))\\;version:\\1?Enterprise:Community",
        "static/_requirejs\\;confidence:50\\;version:2"
      ],
      "website": "https://magento.com"
    },

Example Sites which are missing detection -
https://www.shoebacca.com/
https://www.superatv.com/
We can improve Magento discussion by looking for 'data-image-optimizing-origin' / 'data-media-backend' attribute in HTML tag -

These sites are built using Magento PWA Studio and this repo shows that how these attributes are set - https://github.com/magento/pwa-studio/search?q=data-image-optimizing-origin
BuiltWith tracks 'Magento PWA Studio' as a separate technology but I think it's also OK to extend Magento detection by adding this additional logic - https://trends.builtwith.com/shop/Magento-PWA-Studio

Magento PWA Studio merged with regular Magento


Cursor.IsNil(): removed duplicate if block

Removed a duplicate if block in the Cursor.IsNil() method.

Merged to develop, thanks for the contribution!


StackStorm vs Kubernetes Use Cases

Patching your Kubernetes nodes is one of the solid use cases that I found. But there is a need to brainstorm and find other use-cases. I believe there are many use cases that are yet to be discovered.

Examples based on: https://www.devoperandi.com/stackstorm-for-kubernetes-just-took-a-giant-leap-forward/ blog post:

Imagine being able to configure network policies through an automated StackStorm workflow based on a particular projects needs.
Think about how RBAC could be managed using our Kubernetes Authz Webhook through StackStorm.
Or how about kicking of Kubernetes Jobs to Administer some cluster level cleanup activity but handing that off to your NOC.
Or allowing your Operations team to patch a HorizontalPodAutoscaler through a UI.
We could build a metadata framework derived from the Kubernetes API annotations/labels for governance.

The possibilities are now literally endless.

From the same author: Automating Deployment of RDS Database with stackstorm:
http://www.devoperandi.com/kubernetes-stackstorm-and-third-party-resources-part-2/

K8s app Blue/Green Deployments.
While K8s provides rolling upgrades for the Pods, the missing in the Kubernetes engine is Blue-Green deployments for the app K8s is running.
Following the https://www.ianlewis.org/en/bluegreen-deployments-kubernetes example, StackStorm can do that kind of automation in a good and more maintainable way with the Workflows.
Now how about triggering a K8s deployment for the new version of your app from the chat?

Security compliance checks & Remediation for every new K8s Deployment
StackStorm to listen for the new K8s deployments and run a series of security checks and rules once there is a new deployment. In case of failed security check, - open a ticket with report, create an alert, page human, etc. Potential Remediation action: block a deployment/restrict network access/etc.
Security response Automation based on K8s cluster audit events
StackStorm can be a consumer for a webhook request from the K8s cluster audit service  https://kubernetes.io/docs/tasks/debug-application-cluster/audit/ and react based on these events.
Security keys Rotation for the K8s cluster/apps
Rotation for any security items is rarely easy and frequently involves repetitive steps (ex: https://github.com/kubernetes/kubernetes/issues/20165). StackStorm can not just automate that as external orchestrator, but also keep this important operational workflow knowledge documented and maintained as a code. This could be applied for K8s cluster administration in general or even for individual apps running in K8s.

While we generally leverage Spinnaker for k8s deployments, we mainly use Stackstorm to provide chatops aliases for various day-to-day tasks like rolling restarts, regular restarts, maintenance mode on/off (bring down certain set of pods based on the type of maintenance), as well as kubernetes and flatcar/coreos version update. Once our clusters grew to unmanageable number of nodes (unmanageable by hand, I mean), I had to sit down and design a series of workflows to automate kubernetes version update. Since our clusters are own self-managed and self-hosted clusters, initially based on coreos, now flatcar linux, the approach is very specific (e.g. it's based on generating ignition configs; it's also using self-written microservices to generate certs and configs, etc) I am not sure if it's worth sharing them as they are. We also have nginx plus in front of the cluster and iBGP enabled calico-powered connectivity with the clusters with route reflectors running on BIRD software. All these things are utilized during cluster update to take nodes out of rotation safely (mainly for master nodes).
High level idea is pretty simple:

Update master nodes one at a time, safely taking it out of rotation on the respective load balancer, decrease its BGP preference for routing, ensure safe update, execute scripts if need be, update configuration files/manifests, optionally reboot it, and put it back into rotation once it's back from reboot, verify that the cluster is stable, and move on to the next node.
Update each worker by cordoning and draining it, execute any scripts needed, update configuration files/manifests, reboot if requested,  and uncordon it once it's ready.

The workflows also update on-going status into a redis instance, which we visualize later using a simple python flask backend + angular frontend apps.
Here's what it looks like:

All great ideas!
In particular, I like:

K8S based RBAC
utilizing K8S secrets
chatops for non config-based tasks (restarts, etc)
node patching/updating

Here are a few more i've come across:

K8S cleanup  - sensor to clean up old pods from jobs (or any otherwise "dangling" pods)
Helm support - helm doesn't always work (a failed deployment might get you into a "can't deploy because there are no deployed releases" scenario, for example).  A stackstorm sensor to detect that state and clean it up (if deployment logs live somewhere ST2 can reach them) or a webhook in the deployment script that says "if can't deploy [...], call ST2".
Dynamic environment cleanup - If you create dynamic environments (per pull request, for example) and don't have a direct way to clean it up, maybe give "namespaces" with a specific label a TTL via stackstorm

...as has already been mentioned, possibilities are endless.  I tend to try to find k8s solutions via the k8s ecosystem, but there are definitely gaps that ST2 can fill.
Also, here's a bonus i came across a while back:

https://github.com/flant/shell-operator (ya know.. in case your st2 instance(s) aren't allowed to talk to your k8s instance directly).
shell-operator -> script that calls an st2 webhook -> st2


Bad imports are only a warning in the UI codebase

My crap code was able to merge into the codebase which included a bad import statement as it is currently only a warning:
52:21-53 "export 'updateDisputeCrowdsourcerBalance' was not found in 'modules/markets/actions/update-markets-data'```

This sort of thing should probably be a full blown error that prevents merging.
...

@justinbarry can we force warnings as errors?
 -bthaile
...

We need to figure out how to set this for both eslint and webpack.
 -justinbarry
...

We now build the client in CI to prevent this sort of thing from getting into master. See ch7893
 -justinbarry
...

@justinbarry Can you please let us know if there's more work to do on this? If not, can you please close it?
 -adrake33
...

Ha! Looks like this is held up by rewire. We are working on replacing it. See ch15830
 -justinbarry

@petong As long as we are building the ui during the CI process these issues will be identified by webpack.
I'll close.


PyPI package

For 1.0, sshed should be installable via pip on all supported platforms.

sshed is now on pypi as sshedit (because https://github.com/cwood/sshed exists).


pathinfo UTF-8 bug

Hi
When I try to upload files with a name starting with UTF-8 characters (i.e. "Файл Test", first letters are cyrillic), after $file->upload() method $file->getName() prints string without UTF-8 characters (in my example just "Test", not "Файл Test").
As I understand this is caused by old bug with pathinfo() function. http://stackoverflow.com/questions/4451664/make-php-pathinfo-return-the-correct-filename-if-the-filename-is-utf-8
The issue seems to appear at line 156 of src/Upload/File.php
$this->name = pathinfo($this->originalName, PATHINFO_FILENAME);
As suggested in that SO thread, I put instead of this line following:
$this->name = pathinfo('1' . $this->originalName, PATHINFO_FILENAME);
$this->name = substr($this->name, 1);
and everything works fine. I could make pull request, but this solution seems a little bit hacky, and I don't know if this is good enough for your code conventions.
Thanks

before usage pathinfo
setlocale(LC_ALL,'en_US.UTF-8');
pathinfo(OriginalName, PATHINFO_FILENAME);
pathinfo(OriginalName, PATHINFO_BASENAME);

I'm about to use this lib for a production app. I'm expecting some of the files that are gonna be uploaded to have names starting with some UTF-8 characters so, I would like to know if this has been fixed?


Update install-unifi.sh

PFSense 2.4.5 and Unifi Controller 6.0.23... Package order and additions is important here or the script will run with a whole bunch of dependency errors. Controller is working fabulously.

This new version of the script (0c4a403) will in fact install clean with no errors on a fresh system. I tested this in a VM. PFSense 2.4.5 and Unifi controller 6.0.23 ... Python37 was replaced with Python27, Python37 is by no means being used by any of the dependent Packages (only Mongodb36 can use it, but it can also use Python27 instead). All of the dependent packages call for Python27. The only issue here is, Python27 according to the install is EOL and will be pulled on or after 2020-12-31. Packages that are dependent on Python27, is V8 (the current version of V8 is over 3 years old, if someone could port a new version of V8 for FreeBSD, we could potentially update Python. (Mongodb36, 40, 42, 44) can run on (Python27,37,38). So realistically the only changes that I see, that really need to be done is, we need a new version of V8 ported for FreeBSD... If we can get that done, we can then run Mongodb44, and Python38. Once that is done, this branch will be golden for a while.
Use this link to install on a clean machine, or if you are wanting to upgrade to 6.0.23. No errors will be presented:
fetch -0 - https://git.io/JUy6Z | sh -s


Cannot change dependencies of configuration ':lib:kapt' after it has been resolved.

* Where:
Build file '/Users/snowdream/workspace/snowdream/git/SnowdreamFramework/ToyBricks/lib/build.gradle' line: 12

* What went wrong:
A problem occurred evaluating project ':lib'.
> Cannot change dependencies of configuration ':lib:kapt' after it has been resolved.

apply plugin: 'com.github.snowdream.toybricks'
should write the bottom of the file "build.gradle"


Add merge/import command

Would it be possible to add a merge/import command where I could specify a kubeconfig file (e.g. generated by different systems) to import that kubeconfig file and append/merge it with the default ~/.kube/config file?

:)
What you're looking for is:
KUBECONFIG=file1:file2 kubectl config view --minify > ~/.kube/config

Oh cool didn't know that exist. I still think a shortcut method like kubectx import ./file1 would be more preferable (given that everything this util does exist anyways except shorter and more easy accessible)

I just don't think it's a super common operation that people do out there. But if this comes up from other people, I'll be open to doing it. I'm trying to keep feature creep out and keep the tool focused.

Hmm I just tested your solution and successful destroyed my kubeconfig file (thats on me). But unfortunately specifying multiple kubeconfig files in KUBECONFIG and using config view retracts certificate information which renders the result not usable.

specifying multiple kubeconfig files in KUBECONFIG and using config view redacts certificate information

This is my bad. :) I should've told you to use kubectl config view --merge --flatten. This preserves both cluster certficate-authority-data and user client-{certificate,key}-data fields. (see kubemci repo for example usages of this).

It would be a pretty useful thing to have as theres one specific use case which the above example doesn't cater to; if you're importing a configuration where one of the fields has the same name but different values; e.g. same username different token / ca.
I think it'd make more sense for it to be a different script though; kubecfg for example?

We have some kubectl plugins in Krew (http://krew.dev) already doing this, and there are even desktop tools like https://github.com/turkenh/KubeContext/blob/master/README.md#installation that do similar things.


Stacking fluctuates

I'm not sure if this is correct but stacking seems to fluctuate, i never get below 100 days always in-between 110 - 138.?

not a technical issue, estimated time to get a stake is just a imprecise estimation which can fluctuate based on many factors including individual and network weight


If cpus for process are > than max.cpus, adjust value

Values for pawsey and nimbus differ, check the max.cpus and if that is lower then the label process, assign new value.

Addressed by
https://github.com/ccdmb/qcflow-rnaseq/blob/1cb19ca1610991da74818ca07434b3c10f55d95a/nextflow.config#L68-L99

Useful command to see memory and CPU usage on slurm
seff <jobid>
sacct -j <jobid>--format="CPUTime,MaxRSS"


feat(version): syncing semantic release with npm and GitHub

This should publish a new v4.14.0 and sync Semantic Release, GitHub, and NPM.

:tada: This PR is included in version 4.14.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


investigate "sub" repos for publications

Added manuscripts as sub-modules to the job market survey 2019-2020 repo.


transition cache leak during ledger catchup

Currently, if transitions received from peers didn't pass validation, those transitions are not getting invalidated in unprocessed_transition_cache.
In current implementation ledger_catchup would be blocked by transitions in cache, and the catchup would fail. This is super inefficient.
The subtree of catchup_scheduler that passed to ledger_catchup is not used effectively; besides instead of passing just 1 subtree, we should pass a forest.

This PR try to fix the above problems.

Also, after I approve this PR, can you update the documentation for Ledger_catchup? It's slightly different after this PR update.

I'm trying to understand the whole final_state stuff that was added to the cache stuff. It seems like the only way it's used is just in a single test? If that's the case, is adding this really necessary? This adds a pretty good deal of complexity to the abstraction, and some of the changes made me question whether or not the cache can leak now, although I need to look closer and understand it better. Just some initial questions upon starting reviewing.


Bug | Blogcard | Topics click

Where ?

User visits the landing page or /blogs
User clicks on the topic from any blog card

What ?

The app should navigate to /blogs?tagId=[tag] instead of navigating to /blog/:blogid

Screenshot:

Finance tag

If you could get the video of issue and expected behaviour.

Hey. I want to work on this issue. This will be my first contribution. Can you assign it to me?

Sure, make sure you go through contributing.md doc before starting dev. All the best!

Hi Aadesh,
I'm trying to setup Prisma, I've generated and added API keys from Aiven and Prisma in .env file and Prisma API key in wrangler.toml file.
While running npm run deploy, I'm facing below error

I've also logged in on wrangler and installed accelerate as per Commands.md.
Can you help me out here?

Hi Aadesh, I'm trying to setup Prisma, I've generated and added API keys from Aiven and Prisma in .env file and Prisma API key in wrangler.toml file. While running npm run deploy, I'm facing below error
I've also logged in on wrangler and installed accelerate as per Commands.md. Can you help me out here?

You don't need to run the deploy command to run the app locally.
That command deploys the backend to Cloudflare. The Commands.md file can be ignored for setting up the codebase.
Its only used by me when I need to make deployments.

Thanks, Aadesh.

When I click the pill ("topics"), it already has the the tagid on it ("/blogs?tagId=[tag]").
Even in the codebase, tagid is attached already.

When I click on the pill, it redirects to showing all blogs/BlogCards which has Pill included in tags.
recording-2024-06-29-20-32-06.webm
Am I not understanding the issue here, or is it already solved?

Looks like it's already solved. Thanks for your contribution.


Analyzer downwards inference doesn't match up type variables correctly

The following program:
void main() {
  Null Function<R>(R Function(int)) f = <S>(g) {};
}

produces the following incorrect error when run against bleeding edge analyzer:
  error • A value of type '<S₀>((int) → S) → Null' can't be assigned to a variable of type '<R>((int) → R) → Null' at /Users/leafp/tmp/test.dart:2:41 • invalid_assignment

The inferred type for the lambda is <S₀>((int) → S) → Null, instead of the presumably correct <S₀>((int) → S₀) → Null .
It looks like downwards inference is correctly choosing a new canonical type variable S₀ to use to match up R and S, but is then constructing the final inferred type using a mix of S and
S₀ to produce an invalid type.

possibly related substitution problem: https://github.com/dart-lang/sdk/issues/30207

so, this happens any time we construct a (synthetic) function type, such as in TypeSystem. The resulting object cannot be substituted correctly because its free variable list (FunctionTypeImpl.typeParameters) is empty (because it did not have an enclosingElement scope chain available to populate the free variables).
This is going to be tricky to fix, but I'm working on it.
Other interesting finds:

function types are not considered equal unless their typeArguments arrays are. So int -> int is not the same as {int/T} T -> T ... I thought we'd fixed this, but it's back
GLB/LUB seems to ignore(!!) typeFormals of a generic function

Here are two more repros from #30822
main() {
  T Function() Function<T>() g =
      <S>() {
    S Function() f;
    if (f != null) return f;
    return () => f();
  };
}

and
// Wants a function that takes a function and returns a same-typed function.
void foo(T Function() Function<T>(T Function() f) parameterName) {}

// Using a function literal. -> the return type needs to be inferred.
foo(<T>(T Function() f) {
  if (true) return f;
  return () => f();
});

another example from https://github.com/dart-lang/sdk/issues/30207 is tests/language_2/generic_methods_generic_function_result_test.dart

this was recently fixed https://dart-review.googlesource.com/c/sdk/+/59160, #33159


optimization: 安装agent时，获取配置文件失败时安装流程主动终止 (close #195)

Codecov Report

:exclamation: No coverage uploaded for pull request base (V2.1.352rc@33dae7a). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             V2.1.352rc     #204   +/-   ##
=============================================
  Coverage              ?   61.87%
=============================================
  Files                 ?      224
  Lines                 ?    19434
  Branches              ?        0
=============================================
  Hits                  ?    12024
  Misses                ?     7410
  Partials              ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33dae7a...f54ad78. Read the comment docs.


Bug with the shadows when using Renko chart types? (an image, source data and a source code included)

Maybe I'm using this part of library incorrect? I've attached my source code, source data and the image as a output for that data. It looks like:

And my source code is:
let json = '[{"time":1551398400,"open":3814.26,"high":3857,"low":3813.01,"close":3823,"volume":23175,"mainPrice":3823},{"time":1551484800,"open":3822.17,"high":3841.31,"low":3772.25,"close":3819.93,"volume":19446,"mainPrice":3819.93},{"time":1551571200,"open":3819.97,"high":3835,"low":3781.32,"close":3807.75,"volume":16718,"mainPrice":3807.75},{"time":1551657600,"open":3807.32,"high":3830,"low":3670.69,"close":3715.3,"volume":34743,"mainPrice":3715.3},{"time":1551744000,"open":3716.1,"high":3877.1,"low":3703.55,"close":3857.73,"volume":32963,"mainPrice":3857.73},{"time":1551830400,"open":3857.58,"high":3907,"low":3813.09,"close":3861.84,"volume":24775,"mainPrice":3861.84},{"time":1551916800,"open":3861.84,"high":3905.4,"low":3840.4,"close":3873.64,"volume":26455,"mainPrice":3873.64},{"time":1552003200,"open":3873.63,"high":3932,"low":3800,"close":3864.89,"volume":34730,"mainPrice":3864.89},{"time":1552089600,"open":3864.88,"high":3971.75,"low":3854.75,"close":3943.04,"volume":30980,"mainPrice":3943.04},{"time":1552176000,"open":3943.43,"high":3943.43,"low":3881.69,"close":3916.82,"volume":23188,"mainPrice":3916.82},{"time":1552262400,"open":3915.99,"high":3936.98,"low":3830,"close":3871.61,"volume":38067,"mainPrice":3871.61},{"time":1552348800,"open":3871.61,"high":3905.2,"low":3826.06,"close":3882.73,"volume":26921,"mainPrice":3882.73},{"time":1552435200,"open":3882.69,"high":3893.56,"low":3840,"close":3866,"volume":24461,"mainPrice":3866},{"time":1552521600,"open":3866,"high":3920,"low":3810.43,"close":3877.12,"volume":27049,"mainPrice":3877.12},{"time":1552608000,"open":3877.12,"high":3939.22,"low":3872.2,"close":3923.76,"volume":21740,"mainPrice":3923.76},{"time":1552694400,"open":3924.46,"high":4056.98,"low":3921.98,"close":4005.98,"volume":28568,"mainPrice":4005.98},{"time":1552780800,"open":4005.98,"high":4012,"low":3950.01,"close":3981.14,"volume":18814,"mainPrice":3981.14},{"time":1552867200,"open":3981.85,"high":4037,"low":3953.33,"close":3987.81,"volume":22454,"mainPrice":3987.81},{"time":1552953600,"open":3987.83,"high":4031,"low":3970,"close":4015.53,"volume":19894,"mainPrice":4015.53},{"time":1553040000,"open":4017.48,"high":4050,"low":3980.5,"close":4043.04,"volume":23432,"mainPrice":4043.04}]';
let quotes = JSON.parse(json);
let quotesCount = quotes.length;

let renkoOriginalData = {
	ticker: "TICKER",
	timestamp: [],
	open: [],
	high: [],
	low: [],
	close: [],
	volume: [],
};
for (let i = 0; i < quotesCount; i++) {
	renkoOriginalData.timestamp.push(parseInt(quotes[i].time));
	renkoOriginalData.open.push(quotes[i].open);
	renkoOriginalData.high.push(quotes[i].high);
	renkoOriginalData.low.push(quotes[i].low);
	renkoOriginalData.close.push(quotes[i].close);
	renkoOriginalData.volume.push(quotes[i].volume);
}

let renko = new technicalIndicators.renko(Object.assign({}, renkoOriginalData, { brickSize: 10, useATR: false }));

let chartCandlesticks = [];
for (let i = 0; i < renko["open"].length; i++) {
	chartCandlesticks.push({
		time: renko["timestamp"][i],
		open: renko["open"][i],
		high: renko["high"][i],
		low: renko["low"][i],
		close: renko["close"][i],
	});
}

// plotting the chartCandleSticks

Why do I get such strange shadows?

If I use for testing purposes:
let renko = new technicalIndicators.HeikinAshi(renkoOriginalData).result;
all works fine. Shadows place in the right places. Looks like the issue only with the Renko chart type.


Add environment variable support to .terragrunt

Granted, might not be that useful feature for everyone but it was handy for me in the specific context where I use terraform.
Also, my first time with playing around with go. Nice features in a language.

Thanks for the PR!
Before diving into the code, could you explain the use case for this feature?
One of the goals with Terragrunt was to make it as declarative as possible, to prevent mistakes like forgetting to configure remote state storage. If the remote state storage depends on an environment variable, rather than the contents of a file, you are more likely to make a mistake.
I'm curious how you're using Terragrunt where you may need to dynamically change these values.

Is just a way to easily test terraform changes without breaking a production environment.
We use terraform with prefix variables in our resources names to test environment changes before applying them to production. We use terraform variables and environment variables for manage these.
TF_VAR_prefix=test terraform apply

This means that we can create a truly copy of our live environment for testing purposed without having to change any of the code and accidentally overwriting our production tfstate. We iterate on a test|development environment (with an independent tfstate stored in S3) and when happy, we change to production.
Is possible to use completely different configuration files but we found it to be more error prone and easier to leave something behind or even not being 100% sure which environment was being affected.
Before terragrunt we used wrapper scripts that ensure that the correct remote file was configured but it was not that clear. terragrunt makes it much easier to maintain but I just missed this feature of having multiple environments for not having to commit the file with the production setup and accidentally destroying its tfstate file when doing experimental changes in our parallel setup.
But I also see that is quite limited to the use case and that might be weird for a lot of people. For example, I considered not having a default and instead just break if the variable is not defined to prevent accidental overwrites.

Making it easier to use Terraform and Terragrunt with multiple environments is something we've been thinking about a lot. We have some ideas about how to do it, but are still coming up with a good design. I'd like to learn more about your env-var based approach. I'm also curious how it compares with the approach recommended by Kief Morris.
Also, one other question: don't you have to set different variables for each environment? E.g. different VPC IDs, IPs, DNS entries, AMI IDs, etc? If so, are you managing those through environment variables too?

@brikis98 Yes. We use terraform variables for that
Here is a simple example:
/*************************
  ElastiCache Production
************************ */
resource "aws_elasticache_cluster" "production-cache" {
  cluster_id = "${var.prefix}-${var.application["name"]}-prod"

  # General Config
  engine               = "redis"
  num_cache_nodes      = 1
  parameter_group_name = "default.redis3.2"

  # Instance Config
  node_type = "${var.cache["instance_type"]}"

  # Network
  port               = 6379
  subnet_group_name  = "${aws_elasticache_subnet_group.cache.name}"
  security_group_ids = ["${aws_security_group.instance.id}"]
}

${var.prefix} is a variable that needs to be set on tfvars or (preferably) via ENV variables:
TF_VAR_prefix="production" terraform  plan

Ah, interesting. Env vars strike me as a riskier way of doing this than .tfvars files, but I'm not totally against them. Let me look at the code...

Updated according to the suggestions and notes.
Point 1. is quite interesting and I was also thinking about it. Might be more relevant now that we are pulling all variables and not just the ones that were declared in the file.
Good idea of using the terragruntOptions for this. Much better than using the os directly.
using TF_VAR_* as a filter would reduce this but might not be so clear to the user since we are not really getting terraform variables.
Maybe

put a note on the documentation to use the full format if one wants to reuse?
change the function name to get_env_tf_var("variable", "") for TF_VAR_variable.

Regarding the tests I'm still fighting a bit this as is quite new to me.

I had to change all imports to local paths since using the github modules would of course not load my changed files.

-       "github.com/gruntwork-io/terragrunt/options"
+       "../options"

Is there a better way to do this?
I've been running the tests in each module. Is there a way to run them all with one command?
config
go test -v -parallel 128
=== RUN   TestPathRelativeToInclude
=== RUN   TestFindInParentFolders
=== RUN   TestResolveTerragruntInterpolation
=== RUN   TestResolveTerragruntConfigString
=== RUN   TestResolveEnvInterpolationConfigString
=== RUN   TestParseTerragruntConfigDynamoLockMinimalConfig
=== RUN   TestParseTerragruntConfigDynamoLockFullConfig
=== RUN   TestParseTerragruntConfigDynamoLockMissingStateFileId
=== RUN   TestParseTerragruntConfigRemoteStateMinimalConfig
=== RUN   TestParseTerragruntConfigRemoteStateMissingBackend
=== RUN   TestParseTerragruntConfigRemoteStateFullConfig
=== RUN   TestParseTerragruntConfigDependenciesOnePath
=== RUN   TestParseTerragruntConfigDependenciesMultiplePaths
=== RUN   TestParseTerragruntConfigRemoteStateDynamoDbAndDependenciesFullConfig
=== RUN   TestParseTerragruntConfigInvalidLockBackend
=== RUN   TestParseTerragruntConfigInclude
=== RUN   TestParseTerragruntConfigIncludeWithFindInParentFolders
=== RUN   TestParseTerragruntConfigIncludeOverrideRemote
=== RUN   TestParseTerragruntConfigIncludeOverrideAll
=== RUN   TestParseTerragruntConfigTwoLevels
=== RUN   TestParseTerragruntConfigThreeLevels
=== RUN   TestParseTerragruntConfigEmptyConfig
=== RUN   TestMergeConfigIntoIncludedConfig
--- PASS: TestPathRelativeToInclude (0.00s)
--- PASS: TestParseTerragruntConfigDependenciesMultiplePaths (0.00s)
--- PASS: TestParseTerragruntConfigDependenciesOnePath (0.00s)
--- PASS: TestParseTerragruntConfigInvalidLockBackend (0.00s)
--- PASS: TestParseTerragruntConfigRemoteStateFullConfig (0.00s)
--- PASS: TestParseTerragruntConfigRemoteStateMissingBackend (0.00s)
--- PASS: TestParseTerragruntConfigInclude (0.00s)
--- PASS: TestParseTerragruntConfigIncludeOverrideAll (0.00s)
--- PASS: TestParseTerragruntConfigRemoteStateMinimalConfig (0.00s)
--- PASS: TestParseTerragruntConfigRemoteStateDynamoDbAndDependenciesFullConfig (0.00s)
--- PASS: TestMergeConfigIntoIncludedConfig (0.00s)
--- PASS: TestParseTerragruntConfigDynamoLockMissingStateFileId (0.00s)
--- PASS: TestParseTerragruntConfigDynamoLockFullConfig (0.00s)
--- PASS: TestParseTerragruntConfigThreeLevels (0.00s)
--- PASS: TestParseTerragruntConfigDynamoLockMinimalConfig (0.00s)
--- PASS: TestParseTerragruntConfigEmptyConfig (0.00s)
--- PASS: TestResolveEnvInterpolationConfigString (0.00s)
--- PASS: TestParseTerragruntConfigTwoLevels (0.00s)
--- PASS: TestResolveTerragruntConfigString (0.00s)
--- PASS: TestResolveTerragruntInterpolation (0.00s)
--- PASS: TestParseTerragruntConfigIncludeOverrideRemote (0.00s)
--- PASS: TestFindInParentFolders (0.00s)
--- PASS: TestParseTerragruntConfigIncludeWithFindInParentFolders (0.00s)
PASS
ok  	_/Users/jose/source/terragrunt/config	0.261s

cli
 go test -v -parallel 128
=== RUN   TestParseTerragruntOptionsFromArgs
=== RUN   TestFilterTerragruntArgs
=== RUN   TestParseEnvironmentVariables
--- PASS: TestParseEnvironmentVariables (0.00s)
--- PASS: TestFilterTerragruntArgs (0.00s)
--- PASS: TestParseTerragruntOptionsFromArgs (0.00s)
PASS
ok  	_/Users/jose/source/terragrunt/cli	0.012s

put a note on the documentation to use the full format if one wants to reuse?

I guess since we don't have a concrete use case, for now, we shouldn't try to guess and end up violating YAGNI. Let's stick with the approach you have now and add a note to the README to call get_env("TF_VAR_XXX") if you're trying to reuse Terraform variables.

I had to change all imports to local paths since using the github modules would of course not load my changed files.

Go is very picky about the GOPATH. If you check this code out into your GOPATH, then those imports will work correctly without any changes. For example, my GOPATH is ~/source/go and that code is checked out into ~/source/go/src/github.com/gruntwork-io/terragrunt. You can read more about it here: https://golang.org/cmd/go/#hdr-GOPATH_environment_variable

I've been running the tests in each module. Is there a way to run them all with one command?

Yup, as it says in the README, you can run the following in the root terragrunt directory:
go test -v $(glide novendor)

BTW, the code looks good, so if you are able to sort out the import issues and all the tests are passing, let me know, and I'll merge.

@josesa Were you able to resolve the import issues and get all tests to pass?

@brikis98 Not yet, I have been on vacations with limited internet connection. For sure until the weekend.

@brikis98 Fixed the imports and run the tests. One of them is failing, (but is failing on master for me as well)
This is the failing test:
http://pastebin.com/yfeqHVND
And all of them them:
http://pastebin.com/L7xKkW0S

One of them is failing, (but is failing on master for me as well)

Make sure you pull in the latest version of master and re-run. I believe the test failure you're seeing was fixed with this commit: https://github.com/gruntwork-io/terragrunt/commit/559f20340f5d35d91787ad2296e8be81468f595a

You are right. Somehow I didn't rebase it correctly.
Now they are passing 🎉 :
http://pastebin.com/xQcwaiTF

Awesome, thx!

I just created a new release: https://github.com/gruntwork-io/terragrunt/releases/tag/v0.9.1. If the build passes, the new binaries will show up there shortly.

Love this, thank you!


[WinForms] Deprecate Switch.System.Windows.Forms.EnableVisualStyleValidation quirk

Deprecate Switch.System.Windows.Forms.EnableVisualStyleValidation quirk
Deprecate Switch.System.Windows.Forms.EnableVisualStyleValidation quirk
Version introduced
3.0
Old behavior
The quirk allowed to opt-out of validation of visual styles supplied in a numeric form.
New behavior
The switch is deprecated, and no alternative functionality is avialable.
Reason for change
.NET Core 3.0 is a new moderm development platform, and it brings significantly simpler servicing scenarios, thus allowing for removal of quirks targeting specific legacy use cases.
Recommended action
Remove the switch.
Category

Windows Forms

Affected APIs
Not detectable via API analysis

Issue metadata

Issue type: breaking-change

/cc: @OliaG @merriemcgaw


Change distance matrix for layout mapping

This new feature is used for layout method in Qiskit (also called "qubit mapping problem").
Ideas

Build a distance matrix that takes not only hardware topology, but also calibration data (cnot error rate and cnot execution time) into consideration.
Decide whether to insert a Swap gate or Bridge gate based on the score calculated by distance matrix.

These two ideas are proposed in [1].
[1] S. Niu, A. Suau, G. Staffelbach and A. Todri-Sanial, "A Hardware-Aware Heuristic for the Qubit Mapping Problem in the NISQ Era," in IEEE Transactions on Quantum Engineering, doi: 10.1109/TQE.2020.3026544. https://ieeexplore.ieee.org/document/9205650
Details
These modifications are based on SABRE layout method and improve both number of additional gates and output circuit fidelity.
In sabre_swap.py,  it used the distance matrix to calculate the score of the swap candidates and select the best one. The distance matrix used is as follow:
https://github.com/Qiskit/qiskit-terra/blob/3dec07aaccf3254432a93ed6b5990be27b47016d/qiskit/transpiler/coupling.py#L143-L158
In short, Distance matrix D = shortest path length
In [1], it proposed:
D = α1 * S + α2 * E + α3 * T
S：shortest path length matrix
E:   cnot error rate matrix
T:    cnot execution time matrix
The three α weight parameters can be tuned by the users for their different objectives. For example, the parameters can be set like α1 = 0.5, α2 = 0.5, α3 = 0 with the aim of improving the fidelity.
Using this new distance matrix, we can select the best Swap gate taking account into both calibration data and hardware topology. If the best selected Swap gate has a negative impact on the following gates, we should insert a Bridge gate instead (which will keep the current mapping).
What is the expected behavior?
In [1], it ran several benchmarks on two ibm devices: ibmq_almaden and ibmq_valencia. It compared with sabre_layout and noise_adaptive_layout.
Firstly, it set α1(distance) = 0.5, α2 (fidelity) = 0.5, α3 (execution time) = 0.
The result shows that it has the best output fidelity and the least number of additional gates.
Secondly, it set α1(distance) = 0.5, α2 (fidelity) = 0, α3 (execution time)= 0.5.
The result shows that the execution time is reduced and the fidelity is improved. (Always the least number of additional gates).

See #5105

See #5105
In 5105, it seems that you use cx error rate as the edge weights. I propose to normalize the shortest distance matrix, cx error rate matrix and cx execution time matrix to make the three matrices in the same order. Then add them using different weight parameters to create a new distance matrix. Use that new distance matrix as the edge weights.

Yeah I understand that but it does not quite make sense to me.  The execution time already places a role in the CX error rate so not sure why I would weight that again.  And the distance is the cx error rate in #5105, which is kind of the whole point.  Also it is unclear what the weights should be.  Indeed, the paper you highlight chose that as a heuristic metric as opposed to something more formal.  I am not claiming the one in #5105 is more than a heuristic, indeed all the swap mappers use heuristic inside, but the interpretation and useage is very simple, and in testing it seems to do what I want it to.

I see and thanks for telling me that execution time already impacts the CX error rate! I was wondering if the Bridge gate has already been integrated in Qiskit. I also saw a similar issue in https://github.com/Qiskit/qiskit-terra/pull/1803#issue-252563551..

Yeah I understand that but it does not quite make sense to me. The execution time already plays a role in the CX error rate so not sure why I would weight that again. And the distance is the cx error rate in #5105, which is kind of the whole point. Also it is unclear what the weights should be. Indeed, the paper you highlight chose that as a heuristic metric as opposed to something more formal. I am not claiming the one in #5105 is more than a heuristic, indeed all the swap mappers use heuristic inside, but the interpretation and useage is very simple, and in testing it seems to do what I want it to.

Even if the CX execution time has already impacted CX error rate, we still cannot optimise the CX execution time just by reducing the CX error rate, can we? I think it's better to give the user more options and the CX execution time is useful..
Moreover, I think at least it's better to combine  CX error rate matrix and shortest distance matrix together rather than only use CX error rate as the weight edges (like in https://github.com/Qiskit/qiskit-terra/pull/5105). Indeed, it makes no different for the swap candidates because the shortest distance is definitely one. However, if we use the "look-ahead" strategy and want to find the impact of the selected swap gate on the following gates, we need to use that "combined" matrix. When the error rates of all the links on the chip are approximately equal, it's true that the just using error rates matrix could represent both hardware topology and calibration data. But when we have different error rates (like current IBM chips that have a difference of up to 1 order of magnitude for different CX gate), I think it's more reasonable to combine the the two matrices together.

No you cannot find the shortest time circuit just from the cx error rates.  There are many more elements that go into those numbers.  Don't let me stop you from writing a PR for what you propose, I am just a bit confused about the implementation, and how one automates setting the weighting criteria.

No you cannot find the shortest time circuit just from the cx error rates. There are many more elements that go into those numbers. Don't let me stop you from writing a PR for what you propose, I am just a bit confused about the implementation, and how one automates setting the weighting criteria.

Thanks for your reply! I thought that I can write a PR only if I get the "permission" from here :)
I will do it asap!

No you cannot find the shortest time circuit just from the cx error rates. There are many more elements that go into those numbers. Don't let me stop you from writing a PR for what you propose, I am just a bit confused about the implementation, and how one automates setting the weighting criteria.

It's the first time that I try to contribute to Qiskit and I'm not familiar with the process.. I just clone the repository and I didn't find your code about https://github.com/Qiskit/qiskit-terra/pull/5105. But I saw your PR has already been merged.. I think it would be easier for me to implement based on your code.. Otherwise, I need to re-implement the same thing as you did.. Could you tell me what to do? Thanks!

So you could fork my branch and go from there, but the downside is my changes could get pulled into yours if not careful. Also my changes work for all swap mappers where as I believe you are proposing more in depth changes to the Sabre mapper. If so, it might be best to just start anew.

Also my PR is not merged. Indeed, changes to the mappers have an uphill climb to be accepted due to their importance.

Also my PR is not merged. Indeed, changes to the mappers have an uphill climb to be accepted due to their importance.

OK! Thanks for your advice!

Update for gosts_of_github_past
This issue may be solved by PR #5186 which is pending as work in progress or draft.

This issue was on its way to be fixed by #5186 If you want to build on top of that partial fix, please request to be assigned and don't forget add the original author as a co-author.


Rebase upstream/master

@kgugala : I rebased upstream/master into this branch and creating this PR merge request. Please comment if this is good to merge. This is prerequisite to merge local changes of last 2 weeks to upstream/master.


[vault backend] support for multitenancy

If I understand correctly, when using Vault as the backend, the external-secrets pod service account is used to retrieved the secrets from vault via the kubernetes authentication method.
This means that every namespace shares the same credentials as far a Vault access goes.
This obviously does not play well in a multitenant environment in which each namespace is assign to a different tenant and strict isolation between tenants must exist.
Can you confirm that this is the case?
If it is indeed the case what workarounds do exist?
Here are of a couple proposals:

the external-secrets controller can be scoped to watch only one namespace. One controller per namespace will be created. This has the undesirable drawback that a bunch of pods (mostly idle) will need to be created.
The external-secrets controller uses a service account of the namespace in which the external secret is defined to perform the kubernetes authentication to vault. The service account can be specified as an additional parameter and it could default to the default service account. This would be the ideal soltion.

I came here with the same concern.
In our cluster, each namespace gets its own ServiceAccount that provides it access to specific paths in vault using a Vault Policy. Number 2 in the above comment would be a nice solution.


Shapely with py2app -> crash when running the app due to geos

Hi,
Working in Mac OS X Yosemite with python 3.4
My file, test.py, runs a code with Shapely. When using the alias mode of py2app (python test.py py2app -A) the application runs perfectly. Now, I create the final standalone (python test.py py2app) and the output app crashes when trying to run it. The reason:
14/07/15 16:11:47,603 test[9027]: OSError: dlopen(/Users/myHouse/Desktop/me/test/dist/test.app/Contents/Resources/lib/python3.4/shapely/.dylibs/libgeos_c.1.dylib, 6): Symbol not found: __ZN4geos2io9WKBReader4readERSi
If I do not include Shapely under the "packages" option in the setup.py file that py2app is reading, the app runs perfectly. That is because (I guess) that in this later scenario the app uses the shapely copy in the computer (it does not run in other computers because of libgeos).
So basically I do not know how to use Shapely with the geometry module in py2app. Ideally, I just need to specify the package name in the setup.py file but then geos crashes. Maybe locations? It looks like the app cannot find things in their proper place.
Any help really appreciated!
Cheers,
A!

@AGMoreno sorry, I don't have the time to look into using Shapely with py2app, but if you have a patch with tests that helps you I'd be happy to review it.


Local Videos show on Simulator & Real Device but not Testflight

Bug
I am currently adding local videos to my application and trying to play them. These videos are very small in size ~500kb. I am storing these files in my assets folder and have tried adding these files to my XCode Pre-bundle.
I am able to see all of the videos while I'm on the simulator and my real device, but when I release my app to TestFlight, the space where my video is supposed to be is blank. What could be causing this? Is this a TestFlight limitation?
Platform
Which player are you experiencing the problem on:

iOS & XCode

I've tried using the latest 6.3 Alpha as well as 5.1.1. I've also used the newest stable version 5.2.1. Please help! Trying to avoid expo-av as it's package size is 6.3MB compared to this one (.5mb)
Example
const CreateVideo = require("../../assets/onboardingVids/CreateOnboardClip.mp4");

export const OnboardingPage: React.FC<OnboardingPageProps> = ({
}) => {
  const settingsObject = useSettingsObject();
  const appTheme = useAppTheme();
  const settingsNavigation = useNavigation<TimerScreenNavProp>();

  useEffect(() => {}, []);
  return (
    <View style={styles.container}>
//...
          <Video
            source={CreateVideo}
            style={{ width: "100%", height: "100%" }}
            muted
            resizeMode="contain"
            repeat
          />
//...
    </View>
  );
};
...

Update: The problem was actually in my Metro.config.js file. I had followed a tutorial a few months ago to add SVGs to my project, but little did I know that the code I was adding would wipe out all assets besides the ones with a .svg extension.... Sad.
For reference I once had an expo app and ejected to a bare metal app so the final metro config pulls from expo/metro-config. If you're able to pull from just metro-config, just do that.
My previous metroconfig.js
const { getDefaultConfig } = require('metro-config');

module.exports = (async () => {
    const {
      resolver: { sourceExts, assetExts },
    } = await getDefaultConfig();
    return {
      transformer: {
        babelTransformerPath: require.resolve('react-native-svg-transformer'),
      },
      resolver: {
        assetExts: assetExts.filter(ext => ext !== 'svg'),
        sourceExts: [...sourceExts, 'svg'],
      },
    };
  })();

As you can see, this is literally wiping out any asset that doesn't have a .svg extension (I think). So even tho my react-native.config.js was correctly declaring the asset folders I wanted in my applications, metro was only allowing svg files to get pulled in. Ultimately I didn't need svg-transformer so I reverted to the classic metro file and this fixed my problem.
The new file ->
// Learn more https://docs.expo.io/guides/customizing-metro
// You need the prefix expo or it won't work. You made your life like this.
const { getDefaultConfig } = require('expo/metro-config');

// Keep in mind that the default bundler knows how to create a folder of all of the assets that get "required" by each ts file
// The default config includes mp4 files and more. If you need to add svg in the future,
// Create a const value and push an extra value to the array. Svg transformer messed us up.
module.exports = getDefaultConfig(__dirname);

And my react-native.config.js remained unchanged (just make sure to include asset folders you care about)
module.exports = {
  assets: ["./assets/fonts/", "./assets/onboarding/"],
  dependencies: {
    // Disable auto linking for `react-native-vector-icons` and link
    // the required fonts manually to avoid duplicate resources issue in iOS.
    "react-native-vector-icons": {
      platforms: {
        ios: null,
        android: null,
      },
    },
  },
};

Don't forget to run react-native link and npm start -- --reset-cache afterwards!


100% cpu while running sample

The sample in https://github.com/spring-cloud/spring-cloud-zookeeper/tree/master/spring-cloud-zookeeper-sample is using 100% both in the java client and in the zookeeper server (That makes it 200% cpu).
I found that it is because the sample does not provide any configuration in zookeeper. At least, I have noticed the following type of behaviour when logging is in debug in zookeeper org.apache.zookeeper.ClientCnxn class.
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75689,3  replyHeader:: 75689,87,-101  request:: '/config/application,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75690,3  replyHeader:: 75690,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75691,3  replyHeader:: 75691,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75692,3  replyHeader:: 75692,87,-101  request:: '/config/application,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75693,3  replyHeader:: 75693,87,-101  request:: '/config/application,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75694,3  replyHeader:: 75694,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75695,3  replyHeader:: 75695,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75696,3  replyHeader:: 75696,87,-101  request:: '/config/application,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75697,3  replyHeader:: 75697,87,-101  request:: '/config/application,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75698,3  replyHeader:: 75698,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.046 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75699,3  replyHeader:: 75699,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75700,3  replyHeader:: 75700,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75701,3  replyHeader:: 75701,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75702,3  replyHeader:: 75702,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75703,3  replyHeader:: 75703,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75704,3  replyHeader:: 75704,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75705,3  replyHeader:: 75705,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75706,3  replyHeader:: 75706,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75707,3  replyHeader:: 75707,87,-101  request:: '/config/testZookeeperApp,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75708,3  replyHeader:: 75708,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/application serverPath:/config/application finished:false header:: 75709,3  replyHeader:: 75709,87,-101  request:: '/config/application,T  response::
12:35:03.047 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15013475773000c, packet:: clientPath:/config/testZookeeperApp serverPath:/config/testZookeeperApp finished:false header:: 75710,3  replyHeader:: 75710,87,-101  request:: '/config/testZookeeperApp,T  response::

If I remove the dependency to Maven: org.springframework.cloud:spring-cloud-starter-zookeeper-config:1.0.0.BUILD-SNAPSHOT by changing spring-cloud-starter-zookeeper-all to only spring-cloud-starter-zookeeper-discovery, then everything seems fine.

This is caused by a Curator TreeCache which is being used to cache the config from Zookeeper. Looking to see if the impact can be minimized.

running with --spring.cloud.zookeeper.config.cacheEnabled=false is howto enable this.
@marcingrzejszczak should the cache be off by default?

@spencergibb we haven't been using Zookeeper as PropertySource thus the only caching we were using came from ServiceCaches like this
ServiceCache serviceCache = serviceDiscovery.serviceCacheBuilder().name(path).build();
            serviceCache.start();

https://github.com/4finance/micro-infra-spring/blob/master/micro-deps/micro-deps/src/main/java/com/ofg/infrastructure/discovery/watcher/DependencyWatcher.java
We didn't have any issues with the caches that we were using. However if the TreeCache is blocking people's work then it should be off. Quite frankly I'm surprised that the usage is so high. I would have to investigate the issue further on for more information.

I haven't notice a huge hit either.

2de7b439a5a0bbb3ae5157508e219ada8f5679a2 opens this again. The default is to use the cache now. Running with --spring.cloud.zookeeper.config.cacheEnabled=false will disable the cache, but is poorly performant taking multiple minutes if the connection to zookeeper has some latency.

The non-TreeCache version should behave like a dumb onetime view of the data in zk. /refresh would be the only way to get current values from zk.


Added some translations to the file.

新增翻譯

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Everything LGTM! Thank you.


DBZ-7744 RS name is not required when cluster type is not REPLICA_SET

https://issues.redhat.com/browse/DBZ-7744

Applied to main (=2.7) and branch 2.6.