$select on nullable $expand property throws ODataException

When I execute the following query (where an Account has a nullable/optional DepartmentId / Department:

http://localhost:5000/odata/Accounts?$top=50&$expand=Department($select=Name)

I get the following exception.
Microsoft.OData.ODataException: The property 'Name[Nullable=False]' of type 'Edm.String' has a null value, which is not allowed.
   at Microsoft.OData.WriterValidationUtils.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, IEdmModel model)
   at Microsoft.OData.WriterValidator.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, Boolean isTopLevel, IEdmModel model)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteNullProperty(ODataProperty property)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 properties, Boolean isComplexValue, IDuplicatePropertyNameChecker duplicatePropertyNameChecker)
   at Microsoft.OData.JsonLight.ODataJsonLightWriter.StartResource(ODataResource resource)
   at Microsoft.OData.ODataWriterCore.InterceptException(Action action)
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo)
   at OdataToEntity.AspNetCore.ODataResult`1.WriteNavigationProperty(ODataWriter writer, Object value, PropertyInfo navigationProperty)
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo)
   at OdataToEntity.AspNetCore.ODataResult`1.SerializeAsync(ODataWriter writer)
   at OdataToEntity.AspNetCore.ODataResult`1.ExecuteResultAsync(ActionContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
      Request finished in 259.252ms 200 application/json;odata.metadata=minimal;odata.streaming=true;charset=utf-8

If I adjust the query with either of the following, the query executes successfully

Do not apply the $select on the $expand

http://localhost:5000/odata/Accounts?$top=50&$expand=Department

Filter null Department entities

http://localhost:5000/odata/Accounts?$top=50&$expand=Department($select=Name)&$filter=DepartmentId ne null

This led me to believe the combination of $expanding a nullable property and $select was the culprit.
I was able to setup a local database and successfully run your entire test suite, and I attempted to write a failing test to confirm the issue using the existing models
[Theory]
[InlineData(0, false)]
[InlineData(1, false)]
[InlineData(0, true)]
[InlineData(1, true)]
public async Task ExpandNullableNestedSelect(int pageSize, bool navigationNextLink)
{
    var parameters = new QueryParameters<Order>()
    {
        RequestUri = "Orders?$expand=AltCustomers($select=Name)&$orderby=Id",
        Expression = t => t.Include(o => o.AltCustomer).OrderBy(o => o.Id),
        NavigationNextLink = navigationNextLink,
        PageSize = pageSize
    };
    await Fixture.Execute(parameters).ConfigureAwait(false);
}

but I am unable to execute the test due to a cleanup failure I can't figure out.

I think there is a similar issue with ICollection properties, but I haven't spent as much time trying to dig in and confirm yet.

@voronov-maxim I figured out if I disable the queryCount cache assertion in DbFixureInitDb...

I was able to get a better error as to why the test wasn't working (I had accidentally  put $expand=AltCustomers instead of $expand=AltCustomer`).  This test now shows the issue properly:
[Theory]
[InlineData(0, false)]
[InlineData(1, false)]
[InlineData(0, true)]
[InlineData(1, true)]
public async Task ExpandNullableNestedSelect(int pageSize, bool navigationNextLink)
{
    var parameters = new QueryParameters<Order>()
    {
        RequestUri = "Orders?$expand=AltCustomer($select=Name)&$orderby=Id",
        Expression = t => t.Include(o => o.AltCustomer).OrderBy(o => o.Id),
        NavigationNextLink = navigationNextLink,
        PageSize = pageSize
    };
    await Fixture.Execute(parameters).ConfigureAwait(false);
}

As always, thanks @voronov-maxim.  Could you cut another NuGet release when you get a chance?

@voronov-maxim when you refer to controllers, do you mean ASP.NET Controllers, or some other type of controller?
Also, I noticed the updated ODataToEntity package to 1.6.1, but ODataToEntity.EfCore and ODataToEntity.AspNet are still 1.6.0.  Should I be explicitly reference the ODataToEntity package when I use these, or should those be updated to 1.6.1 as well?

when you refer to controllers, do you mean ASP.NET Controllers, or some other type of controller?

OdataToEntity.AspNetCore.OeControllerBase

Should I be explicitly reference the ODataToEntity package when I use these, or should those be updated to 1.6.1 as well?

Assembly version no changed

where OdataToEntity.AspNetCore reference ODataToEntity, I didn't know if it needed to be updated/republished as well.

Hmm, I'm still getting the same exception as the original report (including when I pulled down the latest sources and uses project references instead of NuGet packages).
Microsoft.OData.ODataException: The property 'Name[Nullable=False]' of type 'Edm.String' has a null value, which is not allowed.
   at Microsoft.OData.WriterValidationUtils.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, IEdmModel model)
   at Microsoft.OData.WriterValidator.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, Boolean isTopLevel, IEdmModel model)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteNullProperty(ODataProperty property)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 properties, Boolean isComplexValue, IDuplicatePropertyNameChecker duplicatePropertyNameChecker)
   at Microsoft.OData.JsonLight.ODataJsonLightWriter.StartResource(ODataResource resource)
   at Microsoft.OData.ODataWriterCore.InterceptException(Action action)
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 242
   at OdataToEntity.AspNetCore.ODataResult`1.WriteNavigationProperty(ODataWriter writer, Object value, PropertyInfo navigationProperty) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 282
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 245
   at OdataToEntity.AspNetCore.ODataResult`1.SerializeAsync(ODataWriter writer) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 226
   at OdataToEntity.AspNetCore.ODataResult`1.ExecuteResultAsync(ActionContext context) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 144
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

This is when I hit http://localhost:5000/odata/Accounts?$top=50&$expand=Department($select=Name).
Controller
[Route("odata/[controller]")]
public class AccountsController : OeControllerBase
{
    public AccountsController(OeDataAdapter dataAdapter, IEdmModel edmModel)
            : base(dataAdapter, edmModel)
    {
    }

    [HttpGet]
    public ODataResult<Account> Get()
    {
        var asyncEnumerator = GetAsyncEnumerator(HttpContext, HttpContext.Response.Body);
        return OData<Account>(asyncEnumerator);
    }

    [HttpGet("$count")]
    public async Task<IActionResult> Count()
    {
        var asyncEnumerator = GetAsyncEnumerator(HttpContext, HttpContext.Response.Body);
        return await ODataScalar(asyncEnumerator);
    }
}

Relevant parts of Models
abstract public class AccountModel : EntityModelWithId<int>
{
    public virtual int? DepartmentId { get; set; }
    // other properties...
}

public class Account : AccountModel
{
    public virtual Department Department { get; set; }
    // other properties...
}

abstract public class DepartmentModel : EntityModelWithId<int>
{
    // other properties...
}

public class Department : DepartmentModel
{
    public virtual ICollection<Account> Accounts { get; set; }
    // other properties...
}

I don't know if the inheritance model is causing a problem, or if there is an issue with how the controller is setup vs. the test (I confirmed the new test is passing locally).
Any thoughts?

@voronov-maxim btw, I just ran this using OdataToEntity.Test.AspMvcServer accessing http://localhost:5000/api/Orders?$expand=AltCustomer($select=Name)&$orderby=Id (same as the ExpandNullableNestedSelect test) and it produced the same ODataException
Microsoft.OData.ODataException: The property 'Name[Nullable=False]' of type 'Edm.String' has a null value, which is not allowed.
   at Microsoft.OData.WriterValidationUtils.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, IEdmModel model)
   at Microsoft.OData.WriterValidator.ValidateNullPropertyValue(IEdmTypeReference expectedPropertyTypeReference, String propertyName, Boolean isTopLevel, IEdmModel model)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteNullProperty(ODataProperty property)
   at Microsoft.OData.JsonLight.ODataJsonLightPropertySerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 properties, Boolean isComplexValue, IDuplicatePropertyNameChecker duplicatePropertyNameChecker)
   at Microsoft.OData.JsonLight.ODataJsonLightWriter.StartResource(ODataResource resource)
   at Microsoft.OData.ODataWriterCore.InterceptException(Action action)
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 242
   at OdataToEntity.AspNetCore.ODataResult`1.WriteNavigationProperty(ODataWriter writer, Object value, PropertyInfo navigationProperty) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 282
   at OdataToEntity.AspNetCore.ODataResult`1.WriteEntry(ODataWriter writer, Object entity, EntityPropertiesInfo& entityPropertiesInfo) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 245
   at OdataToEntity.AspNetCore.ODataResult`1.SerializeAsync(ODataWriter writer) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 226
   at OdataToEntity.AspNetCore.ODataResult`1.ExecuteResultAsync(ActionContext context) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.AspNetCore/ODataResult.cs:line 144
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

error due to additional transformation EF(Tuple)->DTO

Is that something I need to handle in my controller?  If so, could you provide an example?

No, I'll fix it in an hour

@techniq
publish nuget 1.6.2

Thank you. I should get some time tonight to try it out and I'll report
back.
Thanks again for being so responsive.
On Tue, Jul 17, 2018, 3:52 PM Maxim<EMAIL_ADDRESS>wrote:

@techniq https://github.com/techniq
publish nuget 1.6.2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/voronov-maxim/OdataToEntity/issues/25#issuecomment-405706530,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAK1ROsFwDPuRsdX_UOSaUL65GLgOTeBks5uHkCOgaJpZM4VQgGQ
.

Hi @techniq, fix $expand($expand) changed only package OdataToEntity.AspNetCore
Nuget
Why you  use AspNetCore.Mvc (with controller), but not clean AspNetCore.Mvc.Core (without controller)?

@voronov-maxim as always, thanks.  I just pulled the latest source and tested my query with an ICollection which included some some additional filter/expand clauses).  I've said this timea and again, but I really appreciate the quick response.

Regarding the AspNetcore.Mvc vs AspNetCore.Mvc.Core, I'm not sure I'm following.  Are you referring to using the middleware instead of using Mvc routing with the Controllers (like I am now)?
If so, one thing I'm still trying to figure out is the ability to apply additional clauses to an IQueryable after ODataToEntity has applied the OData query to it (hoping something like this is supported, I'm still reading through source and learning how OdataToEntity works).
For example, in OData/WebApi I can take in the queryOptions and applying them manually in the controller, instead of just applying a [Queryable] attribute.  This returns a IQueryable<T> instance which I can continue to add .Where(), .Select(), joins, etc.  I use this pattern for 2 cases currently.
1.) Add additional filters to the query based on the user (HttpContext.User.Identity) to restrict the type of results they can return (without using say row level filtering at the database level)
2.) Use the query to produce a different result, such as a data export (build an excel file, csv, etc).
With OData/WebApi, it would look something like this (although it's currently broken in the ASP.NET Core / OData 7.0.0 version)
[HttpGet]
public IActionResult Export(ODataQueryOptions<Employee> queryOptions)
{
    var query = queryOptions.ApplyTo(DbContext.Set<Employee>()) as IQueryable<Employee>;
    var exportQuery = query.Select(e => new EmployeeExport
    {
        Name = e.Name,
        // ...
    });

    // build Excel file, CSV, etc

    return Ok(exportQuery);
}

Oh and another reason is to have more control over the exposed routes. I'd like to be able to use [Route("/odata/something/[controller]")] although when I last tried it didn't work.

For example, in OData/WebApi I can take in the queryOptions and applying them manually in the controller, instead of just applying a [Queryable] attribute. This returns a IQueryable instance which I can continue to add .Where(), .Select(), joins, etc. I use this pattern for 2 cases currently.

You can overrride method ExecuteEnumerator in OeEfCoreDataAdapter and get IQueryable. But complex query with $select, $expand leads to the fact that TResult has type Tupe<Tuple<>,Tupe<>> and complicate to add .Where(), .Select(). Can try Global Query Filters

Hi @techniq
Would you please pay attention to the next release with many changes. It is based on branch 'groupjoin', eliminates subquery (N+1)  and replaces them with 'LEFT JOIN'. Can your test this new version, please?

@voronov-maxim sounds great! I haven't moved to ODataToEntity just yet, as I'm dependent on a few features/workarounds I'm using with OData/WebApi needed to test more.

Support for non-root routes.  For example /odata/generalLedger/Accounts and /odata/organizations/Departments.  See my last few comments above.
Ability to apply an odata query but make additional modifications to the query (see https://github.com/OData/WebApi/issues/1257 and mentioned in my last few comments as well).
Support for in operator (I just haven't tested this yet, and need to modify my odata-query library to produce the correct query (part of the OData 4.0.1 spec)
More general testing of queries I'm creating.  My applications can leverage some pretty complicated nesting filtering / etc, and I just haven't had time yet to completely these these with ODataToEntity.

With all that said, I have an ODataToEntity branch that I will merge my latest into and give it a try when you cut the next NuGet release.  I have to make some additional moifications when I do (change the routes form /odata/generalLedger/Accounts to /odata/Accounts, etc, but most of those occur in 1 spot).
Thanks again for the awesome library.  I've already recently gotten more traction with the Microsoft folks regarding some of my open OData/WebApi issues and trying to see how fast they might be able to resolve them for me (although some have been open for close to a year now)

I can try solve two issues

Support for non-root routes
Support for in operator

To solve the third issue,  make additional modifications to the query it may take a long time.
2.0.0-beta

Hi @techniq
Support for non-root routes 44abdfb46a6cc10b69c19c6588d4c14d62b69e9d
Support for in operator b71ce24044a001729a3078c56636916059a0ddbd

@voronov-maxim I tried to build locally and use project references to use the latest commits (in groupjoin branch) as I have before in the past, but getting a build error.  Not sure if it's due to the Sourcelink change.  I'm on OSX.
/Users/techniq/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/Microsoft.Build.Tasks.Git.targets(5,5): Error MSB4044: The "Microsoft.Build.Tasks.Git.GetRepositoryUrl" task was not given a value for the required parameter "Root". (MSB4044) (OdataToEntity)

I also left a comment [here](https://github.com/voronov-maxim/OdataToEntity/commit/b71ce24044a001729a3078c56636916059a0ddbd#commitcomment-30079410 earlier by accident.

fyi, I renamed Directory.Build.targets to _Directory.Build.targets and restarted Visual Studio for Mac and I can build again.  I'm manually apply the branch to my latest code (wasn't going to merge cleanly).  Not sure I'll finish tonight, but I'll let you know once I do.

throwing an exception on startup

   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at OdataToEntity.ModelBuilder.OeEdmModelBuilder.BuildEdmModel() in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity/ModelBuilder/OeEdmModelBuilder.cs:line 102
   at OdataToEntity.EfCore.OeEfCoreDataAdapterExtension.BuildEdmModelFromEfCoreModel(OeDataAdapter dataAdapter) in /Users/techniq/Documents/Development/open-source/OdataToEntity/source/OdataToEntity.EfCore/OeEfCoreDataAdapterExtension.cs:line 18
   at Finance.Web.Startup.ConfigureServices(IServiceCollection services) in /Users/techniq/Documents/Development/sbcs-chh/app-finance/Finance.Web/Startup.cs:line 112
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at Finance.Web.Program.Main(String[] args) in /Users/techniq/Documents/Development/sbcs-chh/app-finance/Finance.Web/Program.cs:line 10

Likely a modeling error in my large CommonDbContext (since I'm back to using it and not my smaller FinanceDbContext.  I'm not sure I'll be able to dig in for a while to identity a small example

Ultimately CodingModel is an abstract class that also has an abstract generic IEntityTypeConfiguration<T> implementation that subclasses call
abstract public class CodingModelTypeConfiguration<T> : IEntityTypeConfiguration<T> where T : CodingModel
{
  ...
}

It appears to be some issue with this (works fine with my OData/WebApi setup), but I was able to work around the issue by adding public DbSet<CodingModel> CodingModels { get; set; } to my CommonDbContext.
I'm now getting exceptions thrown regarding my seed data (once again works fine in my other setup and not sure why it's a runtime issue as this is normally only involved when creating new migrations (dotnet ef migratoins add ...).

MaritialStatus is an example of a class that extends the abstract CodingModel and CodingModelTypeConfiguration<T> classes.
One note is within OnModelCreating() in our CommonDbContext, we call ApplyTypeConfigurations() extension method...

which scans the assembly for any IEntityTypeConfiguration implementors and applies those configurations to the modelBuilder.

At this point, it's probably going to be a while before I can get you much more details and try to work through this problem(s) to give you something you can reproduce.

throwing an exception on startup

CodingModel throw KeyNotFoundException
OdataToEntity support abstract class Test model

@voronov-maxim I commented out all my build.HasData(...) calls within subclasses of CodingModelTypeConfiguration<T> and I'm not back to this exception (even though I have public DbSet<CodingModel> CodingModels { get; set; } in my CommonDbContext)

For example, in OData/WebApi I can take in the queryOptions and applying them manually in the controller, instead of just applying a [Queryable] attribute. This returns a IQueryable instance which I can continue to add .Where(), .Select(), joins, etc. I use this pattern for 2 cases currently.
1.) Add additional filters to the query based on the user (HttpContext.User.Identity) to restrict the type of results they can return (without using say row level filtering at the database level)
2.) Use the query to produce a different result, such as a data export (build an excel file, csv, etc).

Add support filter and select result


Support using custom ClassLoaders when deserializing Class objects.

This PR adds support for registering a ClassLoader for a class with the Serializer. If a ClassLoader is registered it will be used to resurrect those class objects, otherwise the default ClassLoader will be used.
This PR addresses https://github.com/atomix/atomix/issues/153

Awesome @madjam! Looks good to me. :+1:


Initial update to 2.0 + translation sheet updated

Fixes #5
Fixes #6
Updated to 2.0. Uses new translation source (that is still updated).
Breaking changes:

Translation attributes are no longer english, french, etc, but uSen, eUfr, etc (due to change of translation sheet source)
Art is renamed Artwork in the sheet
Tools is renamed Tools/Goods in the sheet

Remaining things to do:

It initially fails when parsing Tools/Goods sheet because of the "/" character, saying the directory doesn't exist. To workaround, I created a subfolder Tools, let it parse Goods.json in it, and then move it to the top directory as Tools.json. This should be handled by the code.
USen and other translation attributes are renamed uSen, but it would be better to keep USen.
Take into account new tabs (mainly HHA expansion).
Take into account new translation tabs.
Check if there are new fields in the 2.0 sheet.
Update TypeScript models
Update documentation
etc

Yes, many things left to do, but at least, we have updated working json :)

It appears some translations are mismatched, I need to investigate why.

myb for the late message, have ya tried using the build script? but ill look into this in the next upcoming days, thank ya for your help

You mean the translation issue? I fixed it in an additional commit, it was due to a strict comparison while IDs were sometimes string, sometimes number ;)

naah i mean in package.json, i use a build script to generate the module and im wondering if u have used it to see if it is successful, but ignore it cause ill look at it rn

I only used npm run build:src && npm run start as per the documentation ;)

thats basically what i mean, so if its successful for you then it should be good, but ill run it on my end just in case

i see, i wasnt that specific but running it is what i meant, so if its successful for you then it should be good, but ill run it on my end just in case

Yes, but I made changes to the src/ directory, maybe you should have a look at it before modifying master a second time ;)
You also need to make the workaround for Tools/Goods (see first post). It's probably something to be fixed in the sheets dependency ;)

thank ya, and myb as it seems i overwritten your fork of the repo somehow?? i thought only pushes would go to this pull request :/ but i fixed the issue of the path thing when saving in sheets and everything else looks good, im going to run it a few more times to make sure and ill push the changes. thank u again for your help

No worries, the pull request is linked to my branch and I allowed you to make changes in case you needed to ;)


[Device Support Request] Existing device _TZE200_yjjdcqsq send unknown values ZTH01

Problem description
I have a TUYA temperature humidity sensor Model: ZTH01
I would like to connect it to Home Assistant through ZHA and Sonoff Donlge P
The interview and the recognition works as expected but in the sensor I only see unknown values
Here the device signature
{   "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",   "endpoints": {     "1": {       "profile_id": "0x0104",       "device_type": "0x0302",       "input_clusters": [         "0x0000",         "0x0001",         "0x0004",         "0x0005",         "0x0402",         "0x0405",         "0xef00"       ],       "output_clusters": [         "0x000a",         "0x0019"       ]     }   },   "manufacturer": "_TZE200_yjjdcqsq",   "model": "TS0601",   "class": "zhaquirks.tuya.ts0601_sensor.TuyaTempHumiditySensorVar03" }
Solution description
It would be great to correct the quirk or have the correct quirk for this sensor
Screenshots/Video
Screenshots/Video

Device signature
Device signature
[Paste the device signature here]

Diagnostic information
Diagnostic information
[Paste the diagnostic information here]

Logs
Logs
[Paste the logs here]

Custom quirk
Custom quirk
[Paste your custom quirk here]

Additional information
No response

Is the coordinator on latest firmware also is is connected to on good router and not to the coordinator (3 or more routes is needed for getting the mesh network working O ) ?

@MattWestb thanks for the tip, I have 4 routers at the moment so the mesh should work correctly. After some times and requesting temperature and humidity looks like it is working now.
I will keep monitoring but for the moment I will close the issue


added SizeConstraint, HorizontalAlignment and VerticalAlignment enums

Coverage increased (+0.04%) to 97.054% when pulling 446be6b6ea287e7b547a8ebd680619c9182cbd83 on aportner:add-align-and-constraint-enums into 7863d3b647fe61f3fa32f21d538fa2790a1da2d7 on LPGhatguy:master.


Cannot import JSON files using path aliases

Bug Report

🔎 Search Terms

is:issue json path alias on GitHub issues
json path alias typescript on StackOverflow
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about paths and json

⏯ Playground Link

Stackblitz link with relevant code
💻 Code

{
  "compilerOptions": {
    // other settings removed for terseness
    "resolveJsonModule": true,
    "paths": {
      "@files": [
        "files/src"
      ]
    }
  }
}

// Importing JSON using relative paths works
// import * as sample from './files/src/sample.json';

// Importing JSON using a path alias does not work
import * as sample from<EMAIL_ADDRESS>
console.log(sample);

🙁 Actual behavior

Module not found: Error: Can't resolve<EMAIL_ADDRESS>in '{{system path goes here}}'
🙂 Expected behavior

I expect to be able to import JSON files using path aliases, as I do with Typescript files. This avoids the use of unnecessarily long relative imports for things like config files, mock data etc.

Unless I'm mistaken, that's a runtime error, not a TypeScript error message.
TypeScript does not rewrite import paths. What you write is what you get, so if you are using aliases to attempt to shorten import paths, that code will not run unless your runtime also handles it.
Generally, path aliases should not be used to "shorten" import paths. They should be used to inform TypeScript about what works at runtime.

Thanks Jake, that makes sense. I'll look into it further 👍


Feat(eos_cli_config_gen): Add Monitor Session support

Change Summary

Add option to create monitor sessions

Related Issue(s)
Related to ##1412
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes

Proposal for the datamodel below, please review and let me know if that ok

monitor_session:
  - name: < session_name_1 >
    source:
      - < source_port_1 >
      - < source_port_2 >
    destination:
      - < dest_port_1 >
      - < dest_port_2 >
    encapsulation_gre_metadata_tx: < true | false >
    header_remove_size: < 1-90 >
    ip_access_group: < acl_name >
    ipv6_access_group: < acl_name >
    mac_access_group: < acl_name >
    sample: < 1-4294967294 >
    truncate_size: < 128 | 192 >

How to test

Checklist
User Checklist

N/A

Repository Checklist

[ ] My code has been rebased from devel before I start
[x] I have read the CONTRIBUTING document.
[ ] My change requires a change to the documentation and documentation have been updated accordingly.
[ ] I have updated molecule CI testing accordingly. (check the box if not applicable)

Hi guys, would appreciate a review of the datamodel before implementing the rest.
We should be able to use this in conjunction with a modification in eos_designs to solve: #1412
thanks

monitor_sessions:
  - name: < session_name_1 >
    sources:
      - source: < interface(s) >
        direction: < rx | tx | both >
        ip_access_group: < acl_name >
        ip_access_group_priority: < priority >
        ipv6_access_group: < acl_name >
        ipv6_access_group_priority: < priority >
        mac_access_group: < acl_name >
        mac_access_group_priority: < priority >
    destinations:
      - < interface(s) | cpu >
    encapsulation_gre_metadata_tx: < true | false >
    header_remove_size: < bytes >
    ip_access_group: < acl_name >
    ip_access_group_priority: < priority >
    ipv6_access_group: < acl_name >
    ipv6_access_group_priority: < priority >
    mac_access_group: < acl_name >
    mac_access_group_priority: < priority >
    rate_limit_per_egress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    sample: < int >
    truncate: < true | false >
    truncate_size: < bytes >

This CLI area is highly platform dependent. The supported values and features differ between chips, so I have removed all the specific numbers.
I have also adjusted a bit to cater for all the knobs, but you don't have to implement all of them. A lof of these are very rarely used, and ex. the source ACLs can be worked around by just appending the commands to the source interface.

Slight adjustment:
monitor_sessions:
  - name: < session_name_1 >
    sources:
      - name: < interface_name or range >
        direction: < rx | tx | both >
        ip_access_group: < acl_name >
        ip_access_group_priority: < priority >
        ipv6_access_group: < acl_name >
        ipv6_access_group_priority: < priority >
        mac_access_group: < acl_name >
        mac_access_group_priority: < priority >
    destinations:
      - < interface(s) | cpu >
    encapsulation_gre_metadata_tx: < true | false >
    header_remove_size: < bytes >
    ip_access_group: < acl_name >
    ipv6_access_group: < acl_name >
    mac_access_group: < acl_name >
    rate_limit_per_ingress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    rate_limit_per_egress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    sample: < int >
    truncate:
      enabled: < true | false >
      size: < bytes >

added: rate_limit_per_ingress_chip
removed: prio values for acls in general config, as far as I can see the only exist per source interface

Does it make sense to you to change to sth like:
monitor_sessions:
  - name: < session_name_1 >
    sources:
      - name: < interface_name or range >
        direction: < rx | tx | both >
        access_group:
          type: < ip | ipv6 | mac >
          priority: < priority >
    destinations:
      - < interface(s) | cpu >
    encapsulation_gre_metadata_tx: < true | false >
    header_remove_size: < bytes >
    access_group:
      type: < ip | ipv6 | mac >
    rate_limit_per_ingress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    rate_limit_per_egress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    sample: < int >
    truncate:
      enabled: < true | false >
      size: < bytes >

This might prevent users to input multiple ACLs of different types.. vs. slightly different to acutal CLI

@ClausHolbechArista & @tgodaA
Does it make sense to you to change to sth like:
monitor_sessions:
  - name: < session_name_1 >
    sources:
      - name: < interface_name or range >
        direction: < rx | tx | both >
        access_group:
          type: < ip | ipv6 | mac >
          priority: < priority >
    destinations:
      - < interface(s) | cpu >
    encapsulation_gre_metadata_tx: < true | false >
    header_remove_size: < bytes >
    access_group:
      type: < ip | ipv6 | mac >
    rate_limit_per_ingress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    rate_limit_per_egress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
    sample: < int >
    truncate:
      enabled: < true | false >
      size: < bytes >

This might prevent users to input multiple ACLs of different types.. vs. slightly different to acutal CLI

Good idea. Just remember to also add name under access_group

Good idea. Just remember to also add name under access_group

@ClausHolbechArista & @tgodaA
Implemented as discussed and added a first try for the documentation.
My thoughts on it:

Did not add general session settings explicitly. They are covered by the snippet. Adding them explicitly would most likely be somewhat redundant. Whats your take on it?
Regarding the table: Decided to but "Access Group" Settings in one column, using "Not defined" in case nothing is defined at all, or priority is not defined. Think replacing these cases with "No Access Group defined" and "No Priority defined" might make more sense. Splitting the three values in a column each seems overkill?

Did not add general session settings explicitly. They are covered by the snippet. Adding them explicitly would most likely be somewhat redundant. Whats your take on it?

You could do a "settings" table like we have under other features, where the columns are "setting" and "value" or similar. Check peer-groups under BGP.

Regarding the table: Decided to but "Access Group" Settings in one column, using "Not defined" in case nothing is defined at all, or priority is not defined. Think replacing these cases with "No Access Group defined" and "No Priority defined" might make more sense. Splitting the three values in a column each seems overkill?

I don't think you should build comma-separated fields inside a single table column. IMO it is not making it easier to read.
I suggest that you either create table columns for each value and use - as the default value, or write out the cli in the field like "ip access-list blah priority 123" and if priority is not set, just don't print it. Again - if no access-list is set.

Did not add general session settings explicitly. They are covered by the snippet. Adding them explicitly would most likely be somewhat redundant. Whats your take on it?

You could do a "settings" table like we have under other features, where the columns are "setting" and "value" or similar. Check peer-groups under BGP.

Regarding the table: Decided to but "Access Group" Settings in one column, using "Not defined" in case nothing is defined at all, or priority is not defined. Think replacing these cases with "No Access Group defined" and "No Priority defined" might make more sense. Splitting the three values in a column each seems overkill?

I don't think you should build comma-separated fields inside a single table column. IMO it is not making it easier to read. I suggest that you either create table columns for each value and use - as the default value, or write out the cli in the field like "ip access-list blah priority 123" and if priority is not set, just don't print it. Again - if no access-list is set.

Thanks Claus.
Let me split the "Access Group" part in columns, it really isn't readable the way it is now.
Regarding the general settings: Still have my doubts about it. We would basically end up with rows like:
| Setting | Value |
| Encapsulation Gre Metadata Tx | True |

Is that really helpful? If so, should we adjust the model to
monitor_sessions:
  - name: < session_name_1 >
    sources:
      - name: < interface_name or range >
        direction: < rx | tx | both >
        access_group:
          type: < ip | ipv6 | mac >
          name: < acl_name >
          priority: < priority >
    destinations:
      - < interface(s) | cpu >
    session_settings:
      encapsulation_gre_metadata_tx: < true | false >
      header_remove_size: < bytes >
      access_group:
        type: < ip | ipv6 | mac >
        name: < acl_name >
      rate_limit_per_ingress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
      rate_limit_per_egress_chip: < "<int> bps" | "<int> kbps" | "<int> mbps" >
      sample: < int >
      truncate:
        enabled: < true | false >
      size: < bytes >

This would allow us to easily check if something under "session_settings" is defined and only render this table if needed? Otherwise we would to check if anything besides "sources" and "destinations" and "name" exists or always render everything with default settings?

Regarding the general settings: Still have my doubts about it. We would basically end up with rows like:
| Setting | Value |
| Encapsulation Gre Metadata Tx | True |

Is that really helpful? If so, should we adjust the model to

Creating this table will at least show everything configured. It follows the same style as the rest of the documentation, but I agree it has limited value. Please do the table and we can get this merged :)

This would allow us to easily check if something under "session_settings" is defined and only render this table if needed? Otherwise we would need to check if anything besides "sources" and "destinations" and "name" exists or always render everything with default settings?

I don't think we should change the model. If you move destination up to the settings table you also avoid repeating the destination in each line in the source table, then the settings table would always be relevant, even with the minimal config.

If you move destination up to the settings table you also avoid repeating the destination in each line in the source table, then the settings table would always be relevant, even with the minimal config.

This sounds good, haven't thought about it this way. Let me adjust it accordingly and get back to you!
Thanks!


Create Task Ideas

Include a general description of the program
Add an idea of how this can be coded
Example
User Input:
Output: Water

A site that lets the user input color and outputs an art piece that has that color
This can be done by storing the names and images of different pieces in a library and tagging them with the color we want them to show up with, this library can then be accessed by our code which then outputs the tagged items.
Example
User Input: Blue
Output: Water Lilies by Claude Monet, Starry Night by Vincent Van Gogh, Old Guitarist by Pablo Piccaso, etc.


How can I know which page the current paragraph is on in the document?

No can do, at least not reliably:
https://stackoverflow.com/questions/36193159/page-number-python-docx


Misplaced apostrophe in AbstractProjectSpec.java (English grammar correction)

(Apologies in advance if I filled this out incorrectly. I'm doing my best, but this form is designed for bugs, not spelling changes, so it's a bit overkill in this case.)

Expected Behavior

When I receive a hint about unrelated builds, the phrase If this is an unrelated build, it must have it's own settings file should use "its" instead of "it's".
The word is being used in the possessive sense, whereas "it's" is reserved for contractions.
Current Behavior

Project directory (snipped) is not part of the build defined by settings file (snipped). If this is an unrelated build, it must have it's own settings file
Context

My multi-project build has mysteriously decided that the buildSrc directory is not part of the build for some reason, but I sense that's more information than necessary to reproduce.
Steps to Reproduce (for bugs)

This is just a text issue; it shouldn't require a complex setup to reproduce. I received this error message because something was wrong in my environment, but I'm not yet sure what caused it. If I knew how to reproduce the issue, I wouldn't be seeing it.

The change is a one-liner:
diff --git a/subprojects/core/src/main/java/org/gradle/initialization/AbstractProjectSpec.java b/subprojects/core/src/main/java/org/gradle/initialization/AbstractProjectSpec.java
index 5ba9d73b242..010f97d743e 100644
--- a/subprojects/core/src/main/java/org/gradle/initialization/AbstractProjectSpec.java
+++ b/subprojects/core/src/main/java/org/gradle/initialization/AbstractProjectSpec.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.List;

 public abstract class AbstractProjectSpec implements ProjectSpec {
-    private static final String UNRELATED_BUILD_HINT = " If this is an unrelated build, it must have it's own settings file.";
+    private static final String UNRELATED_BUILD_HINT = " If this is an unrelated build, it must have its own settings file.";
     public boolean containsProject(ProjectRegistry<? extends ProjectIdentifier> registry) {
         checkPreconditions(registry);
         List<ProjectIdentifier> matches = new ArrayList<ProjectIdentifier>();

Thanks, feel free to submit a PR for typos like this in the future.
You're getting this message because we require all builds to have a settings.gradle.  buildSrc is considered a separate build that provides plugins/configuration to the "main" build.


mkcert not found on Arch

Is there an existing issue for this?

[X] I have searched the existing issues

Output of ddev debug test
Expand `ddev debug test` diagnostic information
[COPY-PASTE HERE THE OUTPUT OF `ddev debug test`]

Expected Behavior
The install guide for arch linux can be followed as-is.
Actual Behavior
The guide tells the user that they should run mkcert -install as a one-time initialization when installing on arch linux. The guide never tells the user to explicitly install mkcert and the ddev-bin package doesn't include mkcert as dependency:
paru -Si ddev-bin
Repository      : aur
Name            : ddev-bin
Version         : 1.21.6-1
Description     : DDEV: a local web development environment
URL             : https://github.com/ddev/ddev
AUR URL         : https://aur.archlinux.org/packages/ddev-bin
Groups          : None
Licenses        : Apache 2
Provides        : ddev
Depends On      : docker
Make Deps       : None
Check Deps      : None
Optional Deps   : bash-completion
Conflicts With  : ddev
Maintainer      : cweagans
Votes           : 11
Popularity      : 0.868024
First Submitted : Mon, 30 Apr 2018 19:42:17 +0000
Last Modified   : Fri, 10 Mar 2023 19:37:59 +0000
Out Of Date     : No

Steps To Reproduce
On a arch install without mkcert follow the install guide:

paru/yay/whatever ddev-bin
mkcert -install

Anything else?
No response

A docs PR would be welcome. You can just click the pencil icon in the upper right of https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/ - or do a PR to add mkcert as a dependency of ddev-bin. Maybe the dependency got lost a year or two ago when we started using goreleaser for arch packages. https://github.com/ddev/ddev/blob/cd8d78a5d6244f4029774f5e134c4ef9cb64b6c4/.goreleaser.yml#L280-L297


[Experimental Query] - Query Pushdown - Issue with multiple queriers connected?

Thanos, Prometheus and Golang version used:
Thanos v0.27.0
What happened:
We enabled the experimental feature query-pushdown on all our thanos-query.
We have a thanos-query on top, connected to multiple thanos-query leaf (3 kubernetes, exposed with announced label "stack") which connects to sidecars of each k8s.
When we query max by, and we filter using an anounced labelset. The query returns no data. If we request the same without filtering, we have the correct metrics.

What you expected to happen:
Return the correct metrics set.
How to reproduce it (as minimally and precisely as possible):

Architecture: query1 (with query-pushdown exp feature) ---> query2 (with query-pushdown and announced labelset stack="query2") --> a sidecar.
query: max by (stack,version) (prometheus_build_info{stack="query2"}) and max by (stack,version) (prometheus_build_info)

Thanks for trying it out and the repro! Should be easy to reproduce. Help wanted.

Ok so we had a bit more look into it and the way to reproduce was a bit false.
Actually it happens only if the announced label used is given by the sidecar and not set on the query as selector-label
edit: to reproduce:

Architecture: query1 (with query-pushdown exp feature) ---> query2 (with query-pushdown with no selector-label) --> a sidecar connected to a prometheus with external labels (and so announced labelset by sidecar).

query: max by (extlabel,version) (prometheus_build_info{extlabel="extvalue"}) and max by (extlabel,version) (prometheus_build_info)

We will continue to investigate to hopefully find the code issue and propsoe a fix. (newbie here, we will keep you up-to-date if we succeed or not. Help wanted anyway :) )

Edit 2:
Actually only a single query to sidecar with prometheus externalLabels is enough!
executing a query using the externalLabel give no data.

Architecture: query (with query-pushdown and no selector-label flags) --> a sidecar connected to a prometheus with external labels (and so announced labelset by sidecar).

We would need help on this one, with @Gladorme, we tried but it seemsto be not as easy as it looks ... :/
@GiedriusS as you have implemented most of that feature, would you mind having a look at this one when you have time please? Thank you :)


gccgo can't find Go dependencies

What version of Go are you using (go version)?
# go version
go version go1.6.2 linux/amd64

# gccgo --version
gccgo (Ubuntu 6.0.1-0ubuntu1) 6.0.0 20160414 (experimental) [trunk revision 234994]
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What operating system and processor architecture are you using (go env)?
# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

What did you do?
From ubuntu:xenial:
$ apt-get update
$ apt-get install gcc git golang gccgo
$ export GOPATH=/go

$ go get github.com/mcandre/go-ios7crypt
$ cd "$GOPATH/src/github.com/mcandre/go-ios7crypt"
$ sh -c "cd cmd/ios7crypt && CGO_ENABLED=1 go build -compiler gccgo"
# github.com/mcandre/go-ios7crypt/cmd/ios7crypt
./main.go:8:29: error: import file 'github.com/docopt/docopt-go' not found
  "github.com/docopt/docopt-go"
                             ^
./main.go:27:18: error: reference to undefined name 'docopt'
  arguments, _ := docopt.Parse(Usage, nil, true, ios7crypt.Version, false)
                  ^

Initially, the error seems to be due to gccgo's lack of support for Go 1.5 vendoring. So we try explicitly obtaining the docopt dependency:
$ go get github.com/docopt/docopt-go
$ sh -c "cd cmd/ios7crypt && CGO_ENABLED=1 go build -compiler gccgo"
# github.com/mcandre/go-ios7crypt/cmd/ios7crypt
./main.go:8:29: error: import file 'github.com/docopt/docopt-go' not found
  "github.com/docopt/docopt-go"
                             ^
./main.go:27:18: error: reference to undefined name 'docopt'
  arguments, _ := docopt.Parse(Usage, nil, true, ios7crypt.Version, false)
                  ^

However, even with the dependency manually checked out into the right Go 1.0 directory structure, gccgo still fails to find it somehow.
What did you expect to see?
I was hoping that gccgo would be able to compile my application.
What did you see instead?
Dependency hell

Thanks for reporting this.  It's a dup of #15628 , which is fixed on tip.


Write a C# program to convert string to snakecase

Description
Write a C# program to convert string to snakecase
Snakecase is a style of writing in which all letters are lowercase and spaces are replaced with underscores.
Input  : "hello world"
Output : "hello_world"

How to contribute

Save the solution in program/ConvertStringToSnakecase.cs file
Add ConvertStringToSnakecase.cs file in convert-string-to-snakecase folder

!assign

!assign

https://github.com/codinasion/program/pull/7635


Pangram README claims input will only have ASCII

The README says:
The alphabet used consists of ASCII letters `a` to `z`, inclusive, and is case
insensitive. Input will not contain non-ASCII symbols.

There are German characters in one test which causes failures if not ignored or counted. But even then tests fail if code does not handle characters outside of ASCII. Specifically, Russian.
--- FAIL: TestPangram (0.00s)
pangram_test.go:37: Pangram test [Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.], expected [false], actual [true]
pangram_test.go:39: [Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.] should not be a pangram because : Panagram in alphabet other than ASCII

I am OK with having to check if a rune is ASCII or not. But the README explicitly says not to worry about it. Or is 'symbols' here meant to mean things other than letters like braces, emoji, and the like? Either way the README is at best not clear and at worst wrong.

Thanks @shaleh, you are exactly right. That line does not make a lot of sense when you look at the test input. Should be fixed in #802.
Thanks for letting us know!

Going to keep the README but remove the non-ASCII compatible test entries.

@tleen, I have not made it through all of the exercises yet. It would be good to have some of them show the capabilities of modern languages to in handling global inputs. I did not mind the Russian or German it was a good demonstration of not assuming English text. How many projects have we seen with the changelog entry "oh yeah, this ought to work outside of the US"?

I agree, especially considering how go really works the rune concept over characters as they are known in any other language. It is one of the pain points and great strengths of the language.
The way we addressed this specific issue is more or less to keep it consistent with the way this exercise is implemented across all all the Exercism tracks. It was decided that ASCII-only was the way to go here. We were an outlier. It is still a fairly early exercise in most tracks so that makes sense not to bring up character set issues just yet.
Don't worry there are definitely exercises coming up with non-ASCII stuff. Runetime!

Make sense. Sounds good.


HIVCaremedicationRequest

Think it would be best to include encounter in your profile since the medication is captured as part of an encounter.


⚠ ClamAV has degraded performance

In 062de97, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 70 ms

Resolved: ClamAV performance has improved in b4a1402 after 5 minutes.


column filtering did not display all record

hi vedmack. your yadcf really save my coding time...currently im using yadcf 0.8.9 with datatable 1.10.7.
really impressing with the function provided.just now i want to use column filtering with server side and pagination. the problem is only record in the current page that is been displayed in the column, not all record. when i set server side to true it solve this problem. but im still want to use server side because of the performance wise(over 30k records).
thanks for your feedbacks.

Hi,
When using DT with server side config you MUST provide yadcf with the values of each filter (think about it - you populate your DT with values of one page only, how do you expect yadcf to know what values exist in the other pages) so look at the showcase page - Server side source example see code snippet at the bottom and inspect the dev tools and the network tab to see how I provide the needed data for yadcf filters (sending yadcf_data_0 / yadcf_data_1 / etc.. from server along with the DT data).
p.s please use github issue for reporting a bug/asking for a new feature only, questions should be asked on stackoverflow and tag with yadcf


support build with go 1.18

currently function mesh uses go 1.13 to build the manager, but the project is failed to build with go 1.18. need to upgrade the dependencies and toolchains to support go 1.18.

fix by https://github.com/streamnative/function-mesh/pull/365


Extra comma producing invalid JSON output

What version of Citation.js are you using?
<EMAIL_ADDRESS>

What version of Node and what OS are you using?
<EMAIL_ADDRESS>and debian@jessie through the official docker node image running on OS X 10.11.6 (El Capitan)
docker pull node:10.1.0

What did you do? (this includes input data, configuration, etc.)
# refs.bib
@article{Creighton:2000gu,
      author         = "Creighton, Teviet",
      title          = "{Tumbleweeds and airborne gravitational noise sources for LIGO}",
      journal        = "Class. Quant. Grav.",
      volume         = "25",
      year           = "2008",
      pages          = "125011",
      doi            = "10.1088/0264-9381/25/12/125011",
      eprint         = "gr-qc/0007050",
      archivePrefix  = "arXiv",
      primaryClass   = "gr-qc",
      SLACcitation   = "%%CITATION = GR-QC/0007050;%%"
}
@article{Finstad:2018wid,
      author         = "Finstad, Daniel and De, Soumi and Brown, Duncan A. and Berger, Edo and Biwer, Christopher M.",
      title          = "{Measuring the viewing angle of GW170817 with electromagnetic and gravitational waves}",
      year           = "2018",
      eprint         = "1804.04179",
      archivePrefix  = "arXiv",
      primaryClass   = "astro-ph.HE",
      SLACcitation   = "%%CITATION = ARXIV:1804.04179;%%"
}

npm install --save-dev citation-js
npx citation-js -i refs.bib -f json -o refs

What did you expect to see?
Conversion of the two bibtex entries to a valid csl-json file.

What actually happened?
An almost valid csl-json file, but with an extra , separating the two elements of the output json
...
},
,{
...

I expected
...
},{
...

the full output is below
# refs.json
[{
	"author": [
	{
	"given": "Teviet",
	"family": "Creighton"
}
],
	"title": "Tumbleweeds and airborne gravitational noise sources for LIGO",
	"container-title": "Class. Quant. Grav.",
	"volume": "25",
	"page": "125011",
	"DOI": "10.1088/0264-9381/25/12/125011",
	"type": "article-journal",
	"citation-label": "Creighton:2000gu",
	"id": "Creighton:2000gu",
	"year-suffix": "gu",
	"issued": {
	"date-parts": [
	[
	2008
]
]
}
},
,{
	"author": [
	{
	"given": "Daniel",
	"family": "Finstad"
},
	{
	"given": "Soumi",
	"family": "De"
},
	{
	"given": "Duncan A.",
	"family": "Brown"
},
	{
	"given": "Edo",
	"family": "Berger"
},
	{
	"given": "Christopher M.",
	"family": "Biwer"
}
],
	"title": "Measuring the viewing angle of GW170817 with electromagnetic and gravitational waves",
	"type": "article-journal",
	"citation-label": "Finstad:2018wid",
	"id": "Finstad:2018wid",
	"year-suffix": "wid",
	"issued": {
	"date-parts": [
	[
	2018
]
]
}
}]

Attempting to import this via JSON.parse(...) fails. If you have more bibtex entries you get an extra comma between every paid of output items. For a single bibtex entry you get valid json output.

Thanks so much for an amazing package @larsgw :blush: 👍

Thanks for the bug report! I'm glad you find the package useful.
I made my own JSON serialisation function to be able to output HTML-formatted JSON. I don't know if there's a use case for that, but I included it anyway. That was probably a bad idea on my end, mainly because I know don't support JSON (not really, that is). I'll see what causes the issue and publish a fix when I can. Until then, you could create a script that serialises the data directly, i.e.:
var Cite = require('citation-js')

var data = new Cite(input)

var output = JSON.stringify(data.data)
// optionally JSON.stringify(data.data, null, 2) for nicer formatting

//  '[{...}, {...}]'

I'll also look at replacing this functionality with something more sensible. For updates on that, see #144.

@larsgw Thanks so much for the reply, I really appreciate it.
The solution worked great, thanks so much for finding one so quick.
I tried a few packages to do this conversion and citation-js was by far the easiest to use, and also the most reliable convertor (with others dropping fields that should have been converted, or mangling fields etc). Even thought the solution here is not on the command line, wrapping that in a script is simple enough and it's still the simplest solution :blush:
If there's a fix for this in the future that would be amazing, but I also completely appreciate that this is one of the more periphery features, so certainly no rush and if it's never fixed there is a working solution https://github.com/larsgw/citation.js/issues/143#issuecomment-388486047 👍
I'd be happy to close this in favour of #144 but I'll leave it for you in case you wanted this left open for reference.

No problem! I added a commit that should fix this issue to master, but a new release might take some time, while I'm shifting around methods and namespaces.


[MERGE] Merge branch-1.4 to master

Contains several fixes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13194/
Test PASSed.

Merged build finished. Test PASSed.


Investigate pkg-config lib dirs on Fedora and Ubuntu

Investigate if Fedora and Ubuntu place the CNDP libraries in the same/expected locations

it looks like @manojgop recently completed this.
So i'm going to close
Thanks @manojgop


[Discussion] Add kwarg to control fields visibility

This PRs is incomplete and should serve as a complement of the discussion at #361
For demonstration purposes i built a minimal schema with a hidden field that hides it from introspection and queries.
The behaviour of the visible function could be controlled by reading any relevant app config
Example schema
import strawberry

@strawberry.type
class Query:

    @strawberry.field
    def visible(self) -> str:
        return 'ABC'

    @strawberry.field(visible=lambda: False)
    def invisible(self) -> str:
        return 'ABC'

schema = strawberry.Schema(Query)
print('Schema SDL:\n', schema.as_str())
print('Introspection:\n', schema.execute_sync("""
    {
        __schema {
            types {
                name
                fields {
                    name
                }
            }
        }
    }""")
)
print('Query Attempt:\n', schema.execute_sync('{invisible}').errors)

Output
Schema SDL:
 type Query {
  visible: String!
}
Introspection:
 ExecutionResult(data={'__schema': {'types': [{'name': 'Query', 'fields': [{'name': 'visible'}]}, {'name': 'String', 'fields': None}, {'name': 'Boolean', 'fields': None}, {'name': '__Schema', 'fields': [{'name': 'description'}, {'name': 'types'}, {'name': 'queryType'}, {'name': 'mutationType'}, {'name': 'subscriptionType'}, {'name': 'directives'}]}, {'name': '__Type', 'fields': [{'name': 'kind'}, {'name': 'name'}, {'name': 'description'}, {'name': 'specifiedByUrl'}, {'name': 'fields'}, {'name': 'interfaces'}, {'name': 'possibleTypes'}, {'name': 'enumValues'}, {'name': 'inputFields'}, {'name': 'ofType'}]}, {'name': '__TypeKind', 'fields': None}, {'name': '__Field', 'fields': [{'name': 'name'}, {'name': 'description'}, {'name': 'args'}, {'name': 'type'}, {'name': 'isDeprecated'}, {'name': 'deprecationReason'}]}, {'name': '__InputValue', 'fields': [{'name': 'name'}, {'name': 'description'}, {'name': 'type'}, {'name': 'defaultValue'}]}, {'name': '__EnumValue', 'fields': [{'name': 'name'}, {'name': 'description'}, {'name': 'isDeprecated'}, {'name': 'deprecationReason'}]}, {'name': '__Directive', 'fields': [{'name': 'name'}, {'name': 'description'}, {'name': 'isRepeatable'}, {'name': 'locations'}, {'name': 'args'}]}, {'name': '__DirectiveLocation', 'fields': None}]}}, errors=None)
Query Attempt:
 [GraphQLError("Cannot query field 'invisible' on type 'Query'. Did you mean 'visible'?", locations=[SourceLocation(line=1, column=2)])]

Alternative APIs
Pass filter function to Schema construction (Reference)
def filter_types(gql_type) -> bool:
    pass

schema = strawberry.Schema(Query, except: filter_types)

Types of Changes

[ ] Core
[ ] Bugfix
[x] New feature
[ ] Enhancement/optimization
[ ] Documentation

Issues Fixed or Closed by This PR

#361

Checklist

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Hi, thanks for contributing to Strawberry 🍓!
We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!
So as soon as this PR is merged, a release will be made 🚀.
Here's an example of RELEASE.md:
Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver,so make sure to pick the appropriate type. If in doubt feel free to ask :)

@Ambro17 interesting solution. I do like the API, but I wonder if we could do something where we can hide the fields based on the request?
I imagined this for public and private API, for example some API keys might have more fields :)

As we discussed on discord, it is possible to hide fields based on context, but it requires changes on graphql-core
I leave the diff link here for anyone interested to peek at the required changes
https://github.com/graphql-python/graphql-core/compare/master...Ambro17:master

I think we could do something by adding some logic here
        with extensions_runner.validation():
            validation_errors = validate(schema, document)

If we added the context argument that is already available a few lines earlier we could send an error if any field is not visible for the given context.
What do you think about offering visibility as an extension? I'm not sure this was the intended use case when developed.. but it may work

What do you think about offering visibility as an extension? I'm not sure this was the intended use case when developed.. but it may work

Sorry I missed this message, so, for schema visibility to work we need these two things to happen:

the schema introspection doesn't return the hidden fields
the schema doesn't run any resolver related to the fields

I think they can both be done via extensions, as you suggested, but I wonder if it is the best way, as we are basically changing the behaviour of the schema, instead of changing the schema itself. It would be ideal to change the way the schema is composed before even running anything related to the execution.
I feel like the work that @BryceBeagle is doing in https://github.com/strawberry-graphql/strawberry/pull/489 will help with this

Hiding fields from the schema in build time is the easiest approach and it was what I first implemented, but i understood that you wanted to explore more granularity being able to hide them based on the context argument.
For that to work, the schema should have every field (perhaps wrapped in a custom object as the related pr proposes) and filter at execution time based on context.
In other words, if we want to dynamically hide fields, we would need a layer of abstraction on top of graphql core and perhaps the validation dance.
On the other hand, the second point may solve itself as soon as we decide on an approach on the first one.
I think it will never reach the resolver for a hidden field because a higher layer will be in charge of excluding it from a type fields

In other words, if we want to dynamically hide fields, we would need a layer of abstraction on top of graphql core and perhaps the validation dance.

yup, this is something we want to achieve with #489 :)
The idea is to run the schema building with the context of the request in mind, so we can allow developers to check for things like an API key :)

Oh i understand now,
strawberry.Schema(Query, Mutation, context={'api_scope': 'internal'}) would build schema A
and
strawberry.Schema(Query, Mutation, context={'api_scope': 'public'}) would build another schema.
Am i right?
In that case, the schema shown for each request would be the same?
Or should we update it/mask it once we receive a request?

Or should we update it/mask it once we receive a request?

I would do this, I think it might be the best option, I'll see if anyone has done something like this anywhere 😊

I think graphql ruby sets a good example, graphql java approach uses another approach using the visitor pattern that I didn't find really Pythonic but perhaps to disagree

@Ambro17 would you be ok to close this and move it to a discussion? :)

@Ambro17 would you be ok to close this and move it to a discussion? :)

No problem for me, I hadn't had the time to try passing the context to the query like ruby does not I won't have time on the near future so I think you can close it for staleness

No problem for me, I hadn't had the time to try passing the context to the query like ruby does not I won't have time on the near future so I think you can close it for staleness

@Ambro17 perfect. I think this is a feature we might support in future, will let you know!

@Ambro17 perfect. I think this is a feature we might support in future, will let you know!


using api result

I'm not getting same result of section using api from video

I'm not getting same result of section using api from video

which api result you are looking for exactly can u pls mention it? By seeing your img it seems like you are getting the exact

I'm not getting same result of section using api from video

bro
<% for(var i=0; i<users.length; i++) { %>

<%=i+1 %>
<%= users[i].name %>
<%= users[i].email %>
<%= users[i].Gender %>
<%= users[i].status %>

  <%} %>
 paste this code in _show.ejs file


SFX.Melee SOMEHOW duplicates the icon, but only in scene mode

This is caused by the melee effect grabbing the wrong icon.
new CoroutineAct(SFX.DoMeleeEffect(hero.Presenter.PortraitView.Image.gameObject, partner.Presenter.PortraitView.Image.gameObject, 1.0f, "Slash_0")),
hero.Presenter.PortraitView.Image.gameObject needs to somehow grab the CURRENT image


Drive Player for the Android

Hi Nicolas,  This is NOT a problem. You have a fantastic product. I have stage 4 cancer and wish to share Christian music that has inspired me and which may help others. Do you have a product that will play Google Drive music on the Android?
God Bless,
Ed Aeschlimann
<EMAIL_ADDRESS>904-422-0747

Hey @eaesch,
I've fixed a bug 2 days ago and the player should now work on Android.
Cheers!

Wonderful news.
Thank h you so much.
Ed
On Jul 1, 2015 4:41 AM, "Nicolas Garnier"<EMAIL_ADDRESS>wrote:

Hey @eaesch https://github.com/eaesch,
I've fixed a bug 2 days ago and the player should now work on Android.
Cheers!
—
Reply to this email directly or view it on GitHub
https://github.com/nicolasgarnier/drive-music-player/issues/52#issuecomment-117540983
.


Update History interface

https://html.spec.whatwg.org/multipage/browsers.html#the-history-interface
+type ScrollRestoration = "auto" | "manual";

 interface History {
     readonly length: number;
     readonly state: any;
-    back(distance?: any): void;
-    forward(distance?: any): void;
-    go(delta?: any): void;
-    pushState(statedata: any, title?: string, url?: string): void;
-    replaceState(statedata: any, title?: string, url?: string): void;
+    scrollRestoration: ScrollRestoration;
+    back(): void;
+    forward(): void;
+    go(delta?: number): void;
+    pushState(data: any, title: string, url?: string | null): void;
+    replaceState(data: any, title: string, url?: string | null): void;
 }

-declare var History: {
-    prototype: History;
-    new(): History;
-}

Just some notes based on what I googled. Personal opinions that people (who can actually action this) might find helpful.

your interpretation of the History interface is spot on.
The only reference I could find of history.back taking any value is : https://msdn.microsoft.com/en-us/library/ms536346(v=vs.85).aspx
if you do console.log(History) in chrome dev tools you do get something so I wouldn't want to delete that variable declaration :rose:

if you do console.log(History) in chrome dev tools you do get something so I wouldn't want to delete that variable declaration

I see, but I could not find a definition of History variable in spec.


Cannot update conflict resolution settings

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18.16.0
Amplify CLI Version
12.5.0
What operating system are you using?
Windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Describe the bug
I'm facing the issue, that Amplify Studio does not show my data model. Instead it displays an error message, that "New APIs created within Studio will now be configured with Conflict Resolution disabled by default. In order to use DataStore, this setting can be changed in the GraphQL API Settings page by selecting a conflict resolution option." When I activate Conflict Resolution, I can't hit save and deploy in Studio because that button is not displayed. As a solution I want to update this setting using the CLI.
To do so, I use amplify update api:
PS F:\git\kreinn\trackinn> amplify update api
? Select from one of the below mentioned services: GraphQL

General information
- Name: trackinn
- API endpoint: https://xxx.appsync-api.eu-central-1.amazonaws.com/graphql

Authorization modes
- Default: Amazon Cognito User Pool
- IAM

Conflict detection (required for DataStore)
- Conflict resolution strategy: Auto Merge

? Select a setting to edit Conflict resolution strategy
? Select the default resolution strategy Auto Merge
? Do you want to override default per model settings? No
⚠ WARNING: owners may reassign ownership for the following model(s) and role(s): Payment: [owner], Invite: [owner], Booking: [owner], Staffing: [owner], Project: [owner], EmploymentRelationship: [owner], Employee: [owner], Cust
omer: [owner], Company: [owner]. If this is not intentional, you may want to apply field-level authorization rules to these fields. To read more: https://docs.amplify.aws/cli/graphql/authorization-rules/#per-user--owner-based-da
ta-access.
✅ GraphQL schema compiled successfully.

Edit your schema at F:\git\kreinn\trackinn\amplify\backend\api\trackinn\schema.graphql or place .graphql files in a directory at F:\git\kreinn\trackinn\amplify\backend\api\trackinn\schema
✅ Successfully updated resource

In my transform.conf.json I can see that this is set. When I then run amplify push the setting in Amplify Studio is still disabled.
Expected behavior
amplify update api in combination with amplify push should push the implemented changes to the cloud.
Reproduction steps
sadly, I can't reproduce this issue because in an other project everything works fine.
Project Identifier
7a15e020679dc93ffd0710267d909f36
Log output

# Put your logs below this line

Additional information
No response
Before submitting, please confirm:

[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

Hey @jo2, thank you for reaching. tried reproducing the issue but did not observe this behavior.
Created a schema and pushed which disabled the save and deploy button, then used Amplify CLI to enable conflict resolution and push.
In the Studio application i refreshed the page and observed the Conflict resolution & offline capabilities enabled.
Could you let know if there are any additional information that could assist in reproducing the issue. For example, API configuration.
transferring the issue to studio repository.


Update JSON Attribute blocked by Guarded Check

Laravel Version: 8.47.0
PHP Version: 7.4.14
Database Driver & Version:

Description:
The JSON -> update helper, as described here: https://laravel.com/docs/8.x/eloquent-mutators#array-and-json-casting, does not work.
$user = User::find(1);

$user->update(['options->key' => 'value']);

Steps To Reproduce:

Create a model with protected $guarded = ['id']; and protected $casts = [ 'options' => 'array'];
Grab a model instance. $user = $user->find(1);
Attempt to update a nested value: $user->update(['options->dinner' => 'pizza']);

Area of Code
This fails in the trait Illuminate\Database\Eloquent\Concerns\GuardsAttributes because when checking $this->isFillable($key) the $this->isGuarded($key) will return true.
In this part of logic you are guarding anything that is not a "valid, guardable column" or basically in the database schema.
LINE 208: ! $this->isGuardableColumn($key = 'options->dinner')
But the issue is that a key of 'options->dinner' will not be in the database.
Solution
Taylor removed this check for JSON: https://github.com/laravel/framework/commit/897d107775737a958dbd0b2f3ea37877c7526371
I think the solution is just to add it back:
/**
     * Determine if the given key is guarded.
     *
     * @param  string  $key
     * @return bool
     */
    public function isGuarded($key)
    {
        if (empty($this->getGuarded())) {
            return false;
        }

       // < -- here -->
        if (strpos($key, '->') !== false) {
             $key = Str::before($key, '->');
        }

        return $this->getGuarded() == ['*'] ||
               ! empty(preg_grep('/^'.preg_quote($key).'$/i', $this->getGuarded())) ||
               ! $this->isGuardableColumn($key);
    }

Heya, thanks for reporting. This change was made intentional and isn't a bug.


Improve Jobs Service liveness check to limit the amount of time to get the leader status

Description
Augment the Jobs Service liveness health checks, to consider a configurable amount of time that limits the time to keep retrying to get the leader status.  If leader status can't be obtained in that time, the liveness check will produce a negative report.
Implementation ideas
Add a configuration parameter kogito.jobs-service.management.leader-check.expiration-in-seconds, to set the maximum time the jobs service will wait to get the leader status.  A negative value or zero, means no limit. The default value will be -1.

fixed by: https://github.com/apache/incubator-kie-kogito-apps/pull/2096


add option for event handlers to remove themselves when called

There are a lot of things in MPF, especially on the initial startup and init phases, that register for events that only need to be called once.
What about adding an option to the EventManager.add_handler() for remove_on_called which, if True, causes the event manager to remove that handler once it's been called?

Good idea


[Event Parameter Change] Codeunit 99000813 "Carry Out Action" - Procedure PrintPurchaseOrder - Event OnBeforePrintPurchaseOrder

We would like the parameter-/s PrintOrder added to the following event.
Codeunit 99000813 "Carry Out Action" - Procedure PrintPurchaseOrder - Event OnBeforePrintPurchaseOrder
Original:
Codeunit 99000813 - Carry Out Action - procedure PrintPurchaseOrder - event OnBeforePrintPurchaseOrder

OnBeforePrintPurchaseOrder(PurchHeader2, IsHandled);

[IntegrationEvent(false, false)]
local procedure OnBeforePrintPurchaseOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;

Change:
OnBeforePrintPurchaseOrder(PurchHeader2, IsHandled, PrintOrder); // <-- ADDED

[IntegrationEvent(false, false)]
local procedure OnBeforePrintPurchaseOrder(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; PrintOrder: Boolean) // <-- ADDED
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 44362.


Repeated messages

Messages are being sent repeatedly, and it's on the client side.

If the code is implemented as it is shown in the repo this does not happen.
This might be helpful if you coded it by yourself: StackOverflow


DOPS-90 Add build for iPhone simulator to CircleCI

Summary
iOS build for iPhone simulator is primarily used for RainforestQA and will eventually consume for in-house mobile UI automation. This PR includes build steps to build and ability to include in Github release.
Ticket Link
Jira ticket - https://mattermost.atlassian.net/browse/DOPS-90

The file .circleci/config.yml is in the blacklist and should not be modified from external contributors, please if you are part of the Mattermost Org submit this PR in the upstream.
/cc @mattermost/core-security @mattermost/core-build-engineers


python311Packages.can: 4.3.0 -> 4.3.1

Diff: https://github.com/hardbyte/python-can/compare/refs/tags/v4.3.0...v4.3.1
Changelog: https://github.com/hardbyte/python-can/releases/tag/v4.3.1
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 274023 run on x86_64-linux 1

23 packages built:

expliot
expliot.dist
gallia
gallia.dist
klipper
python310Packages.can
python310Packages.can.dist
python310Packages.canopen
python310Packages.canopen.dist
python310Packages.cantools
python310Packages.cantools.dist
python310Packages.pycyphal
python310Packages.pycyphal.dist
python311Packages.can
python311Packages.can.dist
python311Packages.canopen
python311Packages.canopen.dist
python311Packages.cantools
python311Packages.cantools.dist
python311Packages.pycyphal
python311Packages.pycyphal.dist
yakut
yakut.dist


How to hide card headers?

Case: only filters are displayed and there is no need to show these headers and buttons.
They take up a lot of screen space.

That should be an easy change, can you submit a PR suggesting this change?

Latest version now supports nova 4 and all these headers are gone!


Update the Tidelift enterprise language

@akrabat This updates the Tidelift language to use our new "for enterprise" language.

Coverage remained the same at 100.0% when pulling 54dfe86e1427b363485ac2d2dae848b3cd2deab1 on phated:patch-2 into a304b4e128e667464d512fb08e2c0a76f69f5cfa on slimphp:4.x.


xgb.cv´s folds list of test indices and "unnatural" corresponding train indices

When one gives a list of test indices, the most natural selection of train indices are the remaining lines. But in the code, all other teste indices are taken as train indices:
bst_folds <- lapply(seq_along(folds), function(k) {
        dtest <- slice(dall, folds[[k]])
        dtrain <- slice(dall, unlist(folds[-k]))
        handle <- xgb.Booster.handle(params, list(dtrain, dtest))
        list(dtrain = dtrain, bst = handle, watchlist = list(train = dtrain,
            test = dtest), index = folds[[k]])
    })
  })

This makes the selection of test/train very difficult. For example, one wants to take different tails sizes as test indices:
n=nrow(data) # =2275
ts1=seq(1000,125,-125) #~8 to 1 semesters
testX=lapply(ts1,function(x) (n-x):n)

If one puts this test indices in folds, xgb.cv will perform overfittinng using only test data of different tails.
One simple solution would be just changing unlist(folds[-k]) for  setdiff(1:nrow(dall),folds[[k]]):
bst_folds <- lapply(seq_along(folds), function(k) {
    dtest <- slice(dall, folds[[k]])
    #
    dtrain <- slice(dall, setdiff(1:nrow(dall),folds[[k]]))
    #
    handle <- xgb.Booster.handle(params, list(dtrain, dtest))
    list(dtrain = dtrain, bst = handle, watchlist = list(train = dtrain,
                                                         test = dtest), index = folds[[k]])
  })

Kindly,
Alex

@xmart It appears that the folds in testX are not mutually exclusive. So in the current XGBoost implementation, some data points will be repeated more than once. Is it common to have overlaps in test folds?

Even if there were no overlaps, the issue remains the same: the selection of other test indices as train indices.


Directive functions stopped working after rm package-lock.json and npm install

I had a dependency conflict somewhere between paper-input and gold-phone-input. I read in stackoverflow about it and cleared the node_modules directory as well as package-lock.json and reinstalled using npm install later. This fixed the dependency issue between paper-input and gold-phone-input.
And since then, none of the directives are seeming to work. And instead of applying a directive, it prints the javascript code of the directive I'm using into the html. There were no errors logged in console.

Here is the link to the package-lock.json
I'm using polymer-cli to serve up the files.

In version 0.13 of lit-html the way directives are defined has changed, and it sounds like this could have caused the issue you see. Make sure you don't have two different versions of lit-html, through some other dependencies, installed.

Try running npm dedupe

Hey! I found that there has been two versions of lit-html being used so I tried using a older version of lit-html installed at my root node_modules so that all are in sync. But didn't help. Also tried running npm dedupe. Same as before.

dedupe probably doesn't work because @material/mwc-base and @material/mwc-ripple require ^0.12.0 while @polymer/lit-element requires ^0.13.0. Downgrade @polymer/lit-element to version 0.6.2 (exactly) and it should work, since v0.6.3 upgraded to lit-html v0.13.0.


AttributeError: 'LocalAPI' object has no attribute 'chroma_api_impl'

Hello,
I am trying to retrieve a resposne for a question stored in a specific collection. I am passing the collection name as below.  Unsure if the error is from your side or  langchain.  My understanding of collection is like index, and we can create collections to store separate documents and use them back for retrieval using retrieveqa chain. am i correct?  Below is the error and the code causing the error.
error:

client setting

code causing error

Thanks

Hi there, I just tested a minimal example locally and everything seems ok. Can you post a bit more code here to reproduce what you are seeing? would love to help here.

Closing this (stale), let us know if it would be helpful to reopen


Joystick support on WindowPygame

Joystick event implementation added to enable joystick on desktop platforms running WindowPygame.
Code deeply inspired by WindowSDL2 joystick event implementation.
Regards,
Laurent

Looks good, thanks!

Hi Mathieu,
Thank's to you, you made a great job with this framework.
On another hand, I still have an issue to build sdl2 on Mac, it should be only a little trick, a symbolic link somewhere, a simple direction to search for, would be helpful.
https://groups.google.com/forum/#!topic/kivy-dev/ERbczST0bQk
Regards,
Laurent


Add DataObject::UpdateSource(), replacing GetSource()->Update() calls

DataObject::UpdateSource() offers a more efficient, more concise alternative to the following common pattern:
if (x->GetSource())
{
  x->GetSource()->Update();
}

Calling DataObject::UpdateSource() instead is more efficient, because it internally calls DataObject::GetSource() just once, instead of twice.
Replaced all (15) occurrences of the pattern with  x->UpdateSource() calls.
Follow-up to pull request #3602 "Each UpdateOutputInformation() member function should call GetSource() just once"

This change requires a little more thought, and I need to look into things a little closer.
The classes modified, and non-pipelined algorithms and don't follow the filter conventions...

This change requires a little more thought, and I need to look into things a little closer.
The classes modified, and non-pipelined algorithms and don't follow the filter conventions...

Thanks for your feedback @blowekamp but do you mean that the following pattern, that currently occurs 15 times in ITK, does not follow the filter conventions?
if (x->GetSource())
{
  x->GetSource()->Update();
}

The CenterTransformInitializer object is not derived from the ProcessingObject base class. The class is not a filter, it can not be used as part of a pipeline. The "Initializer" algorithm has input, and tries to "update" those inputs even though it is not a filter or a pipeline object. If the algorithm developer is propagating execution to the input's of the algorithm, then  the class should be derived from the ProcessObject for proper execution so that the conventions of a filter are followed.
I suspect the other classes modified are not derived from ProcessObject either.
Adding another method to the DataObject, that is not suppose to be used with the conical ITK pipelines may contribute to confusion.
Typically "algorithm" classes operate in immediate mode and don't propagate execution up their inputs.

Adding another method to the DataObject, that is not suppose to be used with the conical ITK pipelines may contribute to confusion.

Thanks for your explanation @blowekamp. Would it help to add a note to the documentation (doxygen) of the proposed DataObject::UpdateSource(), saying that its typical use cases are outside the canonical ITK pipelines?
Otherwise, how would you suggest to fix those 15 if (x->GetSource()) x->GetSource()->Update() cases addressed by https://github.com/InsightSoftwareConsortium/ITK/pull/3603/commits/7a3af8102be943a9d0a94633e6fb527de4bcbb13 ?

I suspect that the pattern if (x->GetSource()) x->GetSource()->Update() is not thread-safe. Because the DataObject x does not "own" its source. It only has a WeakPointer to the source:
https://github.com/InsightSoftwareConsortium/ITK/blob/c1839700a9d28946d1313caf91795e4ce160eb13/Modules/Core/Common/include/itkDataObject.h#L555
x->GetSource() returns a SmartPointer, which takes care of keeping the source "alive". However, it only does so until it goes out of scope. Or until the end of the statement, in this case. In between the two x->GetSource() statements, I guess the source may be removed by another thread. Which would break the x->GetSource()->Update() call. That's also why I would suggest to place the SmartPointer returned by x->GetSource() in a local variable that remains in scope when calling source->Update():
const auto source = x->GetSource();

if (source)
{
  source->Update();
}


Existing issued Secret is not up to date for spec: [spec.dnsNames]

Where should dnsNames be added?
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  dnsNames:
    - 'myweb.xyz'
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email<EMAIL_ADDRESS>    privateKeySecretRef:
      name: letsencrypt-prod
    disableAccountKeyGeneration: false
    solvers:
      - http01:
          ingress:
            class: nginx

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: web-nginx
  annotations:
    kubernietes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/tls-acme: "true"
spec:
  tls:
  - hosts:
    - myweb.xyz
    secretName: myweb-tls
  rules:
    - host: myweb.xyz
      http:
        paths:
        - path: /
          backend:
            serviceName: web-nginx
            servicePort: 32601

Status:
  Conditions:
    Last Transition Time:        2020-09-09T09:56:32Z
    Message:                     Existing issued Secret is not up to date for spec: [spec.dnsNames]
    Reason:                      SecretMismatch
    Status:                      False
    Type:                        Ready
    Last Transition Time:        2020-09-09T09:56:32Z
    Message:                     Issuing certificate as Secret was previously issued by Issuer.cert-manager.io/
    Reason:                      IncorrectIssuer
    Status:                      True
    Type:                        Issuing
  Next Private Key Secret Name:  myweb-tls-nkz8g
  Not After:                     2020-12-02T12:00:00Z
  Not Before:                    2019-12-03T00:00:00Z
  Renewal Time:                  2020-11-02T12:00:00Z

dnsNames is a property on the Certificate resource: https://cert-manager.io/docs/usage/certificate/
/triage support

Does it work with Ingress configuration. https://cert-manager.io/docs/usage/ingress/
`apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
# add an annotation indicating the issuer to use.
cert-manager.io/cluster-issuer: nameOfClusterIssuer
name: myIngress
namespace: myIngress
spec:
rules:

host: example.com
http:
paths:

backend:
serviceName: myservice
servicePort: 80
path: /
tls: # < placing a host in the TLS config will indicate a certificate should be created

hosts:

example.com
secretName: myingress-cert # < cert-manager will store the created certificate in this secret.`


Fail the build on changing the content of a changelog

Had used Liquibase with MySQL previously. With Liquibase, on changing the content of an already executed changelog fails the build. Which seems legit for obvious reasons.
However, that probably is not the case with Mongock. Correct me if I am wrong.
Do we want something like that?

Hi @pradipta ,
if I am not wrong, liquibase uses the checksum to check if an existing changeLog has been modified. From my point of view I see pros and cons. I didn't have a good experience with that feature when I used Liquibase, I found it a bit cumbersome. But I can see the pros too.
But I like Mongock to be built from the user's point of view, so what are your thoughts about?

Totally understand your point. Even I have faced that and fixing those builds are a pain.
But it does provide some safety and convenience.
This can probably be a property like restrict-changeset-modification
Totally depends on your and other contributors' and users' opinion.

Yeah, it seems that can be added optionally by properties, as everything we do.
Good suggestion, thanks! I will add it to the road map ;)

However, this could lead to some issues.
Consider this changeset:
@ChangeSet(order = "001", id = "insert user", author = "pradipta")
public void changeWithMongockTemplate(MongockTemplate mongockTemplate) {
  User user = new User("name", "email"); //User has two fields, name and email
  mongockTemplate.save(myEntity);
}

Now, if I add a new field to User, lets say String phoneNumber.
I would now have to change the method to add the new field to avoid compilation failure.

Hello @pradipta ,
yes, that's one of the issue when using domain classes. You need to change the changeSet, which is not ideal, plus the checksum validation would break.
There are different ways of avoiding this. From not using domain classes to delegate on another external classes, called factory if you wish, the creation of the object, passing through keeping the old constructor, with the two field.
That depends on your design. We'll work on a "best practice" or recommendation for this kind of situation


OpenLDAP user is related to the admin account

Rancher versions:
rancher/server or rancher/rancher: 2.0.6
rancher/agent or rancher/rancher-agent: 2.0.6
Infrastructure Stack versions:
healthcheck:
ipsec:
network-services:
scheduler:
kubernetes (if applicable):
Steps to Reproduce:
1 - Setup OpenLDAP authentication and login with any LDAP user.
2 - Go to user preferences
Results:
The account details for all users shows up as being the admin account, for which one can even attempt to change the password (see image).

It is the admin account and you can change the local password.  When you test and turn on a new form of auth the principal in that provider is associated with the account you're currently logged in as.