Simple query filter breaks simple projection

As reported by @klaussj here: https://github.com/aspnet/EntityFrameworkCore/issues/12951#issuecomment-427380358
Removing the query filter fixes the issue.
namespace DemoIssue
{
    public class Entity
    {
        public int Id { get; set; }
        public int? RefEntityId { get; set; }
        public RefEntity RefEntity { get; set; }
    }

    public class RefEntity
    {
        public int Id { get; set; }
        public bool Public { get; set; }
    }

    public class EntityDto
    {
        public int Id { get; set; }
        public int? RefEntityId { get; set; }
        public RefEntityDto RefEntity { get; set; }
    }

    public class RefEntityDto
    {
        public int Id { get; set; }
        public bool Public { get; set; }
    }

    public class DbTestContext : DbContext
    {
        public DbSet<Entity> Entities { get; set; }
        public DbSet<RefEntity> RefEntities { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<RefEntity>().HasQueryFilter(f => f.Public == true);
        }

        public DbTestContext(DbContextOptions<DbTestContext> options) : base(options)
        {

        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            using (var connection = new SqliteConnection("DataSource=:memory:"))
            {
                connection.Open();

                var options = new DbContextOptionsBuilder<DbTestContext>()
                    .UseSqlite(connection)
                    .Options;

                using (var db = new DbTestContext(options))
                {
                    db.Database.EnsureCreated();

                    db.RefEntities.Add(new RefEntity()
                    {
                        Id = 1,
                        Public = false
                    });

                    db.Entities.Add(new Entity()
                    {
                        Id = 1,
                        RefEntityId = 1
                    });

                    db.SaveChanges();

                    var notWorking = db.Entities.Select<Entity, EntityDto>(s =>
                        new EntityDto
                        {
                            Id = s.Id,
                            RefEntity = s.RefEntity == null ?
                                null :
                                new RefEntityDto()
                                {
                                    Id = s.RefEntity.Id,
                                    Public = s.RefEntity.Public
                                },
                            RefEntityId = s.RefEntityId
                        }).Single(p => p.Id == 1);
                }
            }
        }
    }
}

Exception:
Unhandled Exception: System.InvalidOperationException: Nullable object must have a value.
   at lambda_method(Closure , QueryContext , TransparentIdentifier`2 )
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ProjectionShaper.TypedProjectionShaper`3.Shape(QueryContext queryContext, ValueBuffer& valueBuffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_1`1.<CompileQueryCore>b__0(QueryContext qc)
   at System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
   at DemoIssue.Program.Main(String[] args) in C:\Stuff\TwoOneCore\TwoOneCore\Program.cs:line 79

@smitpatel to investigate

dbug: Microsoft.EntityFrameworkCore.Query[10101]
      Compiling query model:
      '(from Entity s in DbSet<Entity>
      where [s].Id == 1
      select new EntityDto{
          Id = [s].Id,
          RefEntity = [s].RefEntity == null ? null : new RefEntityDto{
              Id = [s].RefEntity.Id,
              Public = [s].RefEntity.Public
          }
          ,
          RefEntityId = [s].RefEntityId
      }
      ).Single()'
dbug: Microsoft.EntityFrameworkCore.Infrastructure[10407]
      'MyContext' disposed.
dbug: Microsoft.EntityFrameworkCore.Query[10104]
      Optimized query model:
      '(from Entity s in DbSet<Entity>
      join RefEntity s.RefEntity in
          from RefEntity f in DbSet<RefEntity>
          where [f].Public == True
          select [f]
      on Property([s], "RefEntityId") equals (Nullable<int>)Property([s.RefEntity], "Id") into s.RefEntity_group
      from RefEntity s.RefEntity in
          (from RefEntity s.RefEntity_groupItem in [s.RefEntity_group]
          select [s.RefEntity_groupItem]).DefaultIfEmpty()
      where [s].Id == 1
      select new EntityDto{
          Id = [s].Id,
          RefEntity = Property([s], "RefEntityId") == null ? null : new RefEntityDto{
              Id = (int)Property([s], "RefEntityId"),
              Public = (bool)?[s.RefEntity] | ?[s.RefEntity] | [s.RefEntity]?.Public == True? == True?
          }
          ,
          RefEntityId = [s].RefEntityId
      }
      ).Single()'
dbug: Microsoft.EntityFrameworkCore.Query[10107]
      (QueryContext queryContext) => IEnumerable<EntityDto> _InterceptExceptions(
      |__ source: IEnumerable<EntityDto> _ToSequence(() => EntityDto Single(IEnumerable<EntityDto> _ShapedQuery(
      |   |__ queryContext: queryContext,
      |   |__ shaperCommandContext: SelectExpression:
      |   |       SELECT TOP(2) [s].[Id], CASE
      |   |           WHEN [s].[RefEntityId] IS NULL
      |   |           THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT)
      |   |       END, [s].[RefEntityId] AS [Id0], [t].[Public], [s].[RefEntityId]
      |   |       FROM [Entities] AS [s]
      |   |       LEFT JOIN (
      |   |           SELECT [f].*
      |   |           FROM [RefEntities] AS [f]
      |   |           WHERE [f].[Public] = 1
      |   |       ) AS [t] ON [s].[RefEntityId] = [t].[Id]
      |   |       WHERE [s].[Id] = 1,
      |   |__ shaper: (QueryContext queryContext | TransparentIdentifier<ValueBuffer, ValueBuffer> t1) => new EntityDto{
      |           Id = int TryReadValue(t1.Outer, 0, Entity.Id),
      |           RefEntity = (bool)Nullable<bool> TryReadValue(t1.Outer, 1, null) ? null : new RefEntityDto{
      |               Id = (int)Nullable<int> TryReadValue(t1.Outer, 2, Entity.RefEntityId),
      |               Public = (bool)Nullable<bool> TryReadValue(t1.Outer, 3, null)
      |           }
      |           ,
      |           RefEntityId = Nullable<int> TryReadValue(t1.Outer, 4, Entity.RefEntityId)
      |       }
      |__ ))),
      |__ contextType: EFSampleApp.MyContext,
      |__ logger: DiagnosticsLogger<Query>,
      |__ queryContext: Unhandled parameter: queryContext)

It is not query filter which is issue.
We generated Left Join here and there are no matching rows (due to filter), For some reason we are trying to read Null values in non-null properties even though there is a check.
Assigning to @maumar

problem is because we optimize [s].RefEntity == null into [s].RefEntity.Id == null and then using PK-FK optimization to '[s].RefEntityId == null`
The RefEntityId is not null, even when the entity is supposed to be filtered out with query filter. So the check:
RefEntity = s.RefEntity == null ?
                                null :
                                new RefEntityDto()
                                {
                                    Id = s.RefEntity.Id,
                                    Public = s.RefEntity.Public
                                }

doesn't really work, and we still try to materialize the RefEntityDto even though the RefEntity that we want to use has been filtered out.
Per discussion with @divega and @smitpatel, we should not apply the PK-FK optimization if we need to access the entity anyway somewhere else in the query. Optimization can save us a join, but if the join is there anyway, it doesn't buy us much.

Notes from triage:

As soon as a query filter is used on the principal table, then the relationship essentially becomes unconstrained--see #13146. This means that it is no longer correct to assume that a dependent has a corresponding principal.
This means that optimizations that make this assumption cannot be used. For example, we cannot use an inner join, and we cannot assume that the FK value can be used instead of the PK value, since the PK value may be missing.
We need better documentation on best practices on how how to use query filters. For example:

Relationships will be marked as loaded. Disabling or changing query filter parameters will not reset this flag
More generally, changing a filter parameter on the fly in a given context instance should only be done with great care or the results can be unexpected
Query filters should be applied appropriately so that principal and dependent queries will return consistent results.

What a triage. Instead of better documentation - did it ocur to you to issue a hotfix that fixes a bug that makes a whole subsystem (i.e. query filters) totally unusable? And it is nice to see that you basically tell all of us to go home and use EF - because a bug that shuts down a whole subsystem is scheduled for - ah, 3.0. Nice. Basically "oh, sorry you rely on query filterrs, maybe in a year we prouce a usable product there".
This is a 1.0 feature that does not work. 2.1.5 is the next patch. It should get this into a usable state. At minimum 2.2 should include an emergency fix for this. Otherwise basically EF is it - I do not care about EF Core because now you actually tell me that the new features that make it worthwhile and everyone loves pointing out - do not work and will not get fixed.
Any manager going through tirage and handing out reprimands? Bevcause this is the 2nd time this particular bug is either not accepted as bug (hey, fix your data) or - ah, scheudled for some far point in the future, usage and impact on users being irrelevant. I personally can only be happy that I am slowly removing query filters anyway (related to some business logic that makes them jsut the wrong place - i.e. we will filter on the REST side, not the model, as some related objects may be "oiutdated" but in our case then still are visible read only, so general filters do not work). But I can bet other people actually use that and are not happy about a 3.0 schedule.

problem is because we optimize [s].RefEntity == null into [s].RefEntity.Id == null and then using PK-FK optimization to '[s].RefEntityId == null`

Shouldn't that fail too then ?
var works = db.Entities.Select(s =>
                        new
                        {
                            Id = s.Id,
                            RefEntityId = s.RefEntityId,
                            RefEntityPublic = s.RefEntity == null ? null : (bool?)s.RefEntity.Public
                        }).Single(p => p.Id == 1);

Changing it to this fails however:
var fails = db.Entities.Select(s =>
                        new
                        {
                            Id = s.Id,
                            RefEntityId = s.RefEntityId,
                            RefEntityPublic = s.RefEntity == null ? false : s.RefEntity.Public
                        }).Single(p => p.Id == 1);

Do you have any solution or workaround for this problem ?

@ajcvickers @smitpatel @maumar I'm working on migrating a very large Fintech app from Net Framework to Net Core and this now completely blocking our company moving forward. Is there any chance you could produce a small fork with the work around or tell me where to remove the optimisation myself so that we can push on? What's the justification for leaving this until version 3, it seems to be pretty core functionality?
Many thanks for in advance.

@armitagemderivitec
This is the code that performs the optimization
https://github.com/aspnet/EntityFrameworkCore/blob/5964b5d159e31b18c69e1f8933616ef15296fb85/src/EFCore/Query/ExpressionVisitors/Internal/NavigationRewritingExpressionVisitor.cs#L732-L740

@maumar that's great thanks! So I'd just need to fork and remove that block? Then the default would be used instead?

@armitagemderivitec yes, this will fix the case involving navigations (like in the original example). We will no longer try to convert entity.Navigation.Pk into entity.Fk.

Will calling .IgnoreQueryFilters() fix this?

That does seem to fix it.  But I would like to add to other peoples sentiment that this is really a critical bug that should probably be patched before 3.0.0

@maumar you guys have done an amazing job on EF Core, this is our only blocker now after re-optimising some of our older queries. I don't suppose you could add a feature flag to DbContextOptions to disable the optimisation as a 2.2 patch?  We are near completion of our .Net Core migration of a 140 project solution and it would be great to not to have to maintain our own fork on top of this. Happy to return the favour with an article of our migration experience or some dev time.

@maumar I've pulled EFCore locally and I don't even hit the code you mention above. The places where I am hitting this problem are all left joins where I am using DefaultIfEmpty() and then accessing properties on a potential nullable object. What's the correct form here because the select query does not present a nullable object?

The code I highlighted only addresses the case where EF is expanding navigation into a JOIN. If you create the joins yourself, and the query involves client evaluation you need to add your own null protection. You can do it using : ? operator, like so:
join o in ctx.Orders on c.Name equal o.CustomerName into grouping
from o in grouping.DefaultIfEmpty()
select o != null ? (int?)o.InvoiceNumber : null```

If the query is fully translated, the `? :` part will be optimized out during the translation, so the SQL should look exactly the same with and without this part. However, if client evaluation is present it should prevent the error from happening.

What you might also be seeing is that one of the result properties is expected to be non-nullable, but it ends up as null.

You will get this error for queries like:

```from c in ctx.Customers
join o in ctx.Orders on c.Name equal o.CustomerName into grouping
from o in grouping.DefaultIfEmpty()
select o.InvoiceNumber```

result is expected to be of type int, but SQL returns a null value and we cant fit it into the expected result type.

This is one of our complex joins returning this error:
        public static IQueryable<vBookUserAccess> vBookUserAccesses(this PortfolioDbContext context)
        {
            return from ga in context.GroupAccesses
                   join g in context.Groups on new { ga.GroupId, GroupTypeId = 2 } equals
                       new { GroupId = g.Id, g.GroupTypeId }
                   join at in context.AccessTypes on ga.AccessTypeId equals at.Id
                   join gs in context.GroupStatuses on g.GroupStatusId equals gs.Id
                   join u in context.AspNetUsers on ga.UserId equals u.Id
                   join uas in context.UserAccountStatuses on u.AccountStatus equals uas.Id
                   join jr in context.Relationships() on ga.GroupId equals jr.ChildGroupId into joined
                   from relationship in joined.DefaultIfEmpty()
                   select relationship == null
                              ? new vBookUserAccess
                                    {
                                        Id = ga.GroupId,
                                        Name = g.Name,
                                        Description = g.Description,
                                        StatusId = g.GroupStatusId,
                                        StatusName = gs.Name,
                                        StatusDescription = gs.Description,
                                        NumberOfParentPortfolios = null,
                                        ParentPortfolioRelationshipTypeId = null,
                                        ParentPortfolioRelationshipTypeName = null,
                                        ParentPortfolioRelationshipTypeDescription = null,
                                        AccessUserId = ga.UserId,
                                        AccessUserName = u.UserName,
                                        AccessUserFirstName = u.FirstName,
                                        AccessUserLastName = u.LastName,
                                        AccessUserEmail = u.Email,
                                        AccessUserAccountStatusId = u.AccountStatus,
                                        AccessUserAccountStatusName = uas.Name,
                                        AccessUserAccountStatusDescription = uas.Description,
                                        AccessTypeId = ga.AccessTypeId,
                                        AccessTypeName = at.Name,
                                        AccessTypeDescription = at.Description,
                                        AccessCreatedDate = ga.CreatedDate,
                                        AccessCreatedBy = ga.CreatedBy,
                                        AccessModifiedDate = ga.ModifiedDate,
                                        AccessModifiedBy = ga.ModifiedBy,
                                        AccessVersion = ga.RowVersion
                                    }
                              : new vBookUserAccess
                                    {
                                        Id = ga.GroupId,
                                        Name = g.Name,
                                        Description = g.Description,
                                        StatusId = g.GroupStatusId,
                                        StatusName = gs.Name,
                                        StatusDescription = gs.Description,
                                        NumberOfParentPortfolios = relationship.NumberOfParentPortfolios,
                                        ParentPortfolioRelationshipTypeId =
                                            relationship.ParentPortfolioRelationshipTypeId,
                                        ParentPortfolioRelationshipTypeName =
                                            relationship.ParentPortfolioRelationshipTypeName,
                                        ParentPortfolioRelationshipTypeDescription =
                                            relationship.ParentPortfolioRelationshipTypeDescription,

                                        AccessUserId = ga.UserId,
                                        AccessUserName = u.UserName,
                                        AccessUserFirstName = u.FirstName,
                                        AccessUserLastName = u.LastName,
                                        AccessUserEmail = u.Email,
                                        AccessUserAccountStatusId = u.AccountStatus,
                                        AccessUserAccountStatusName = uas.Name,
                                        AccessUserAccountStatusDescription = uas.Description,
                                        AccessTypeId = ga.AccessTypeId,
                                        AccessTypeName = at.Name,
                                        AccessTypeDescription = at.Description,
                                        AccessCreatedDate = ga.CreatedDate,
                                        AccessCreatedBy = ga.CreatedBy,
                                        AccessModifiedDate = ga.ModifiedDate,
                                        AccessModifiedBy = ga.ModifiedBy,
                                        AccessVersion = ga.RowVersion
                                    };
        }

        private static IQueryable<Relationship> Relationships(this PortfolioDbContext context)
        {
            return from gr in context.GroupRelationships
                   join gs in context.Groups on new { gr.ParentGroupId, GroupTypeId = 1 } equals
                       new { ParentGroupId = gs.Id, gs.GroupTypeId }
                   join relationshipType in context.RelationshipTypes on gr.RelationshipTypeId equals
                       relationshipType.Id
                   group gr by new
                                   {
                                       gr.ChildGroupId,
                                       gr.RelationshipTypeId,
                                       relationshipType.Name,
                                       relationshipType.Description
                                   }
                   into g
                   select new Relationship
                              {
                                  ChildGroupId = g.Key.ChildGroupId,
                                  ParentPortfolioRelationshipTypeId = g.Key.RelationshipTypeId,
                                  ParentPortfolioRelationshipTypeName = g.Key.Name,
                                  ParentPortfolioRelationshipTypeDescription = g.Key.Description,
                                  NumberOfParentPortfolios = g.Count()
                              };
        }

        private class Relationship
        {
            public int ChildGroupId { get; set; }

            public int NumberOfParentPortfolios { get; set; }

            public string ParentPortfolioRelationshipTypeDescription { get; set; }

            public int ParentPortfolioRelationshipTypeId { get; set; }

            public string ParentPortfolioRelationshipTypeName { get; set; }
        }

This worked in EF6 even without the null operator. Presumably the nested IQueryable is the cause. Any ideas?

@maumar
This is one of our complex joins returning this error:
public static IQueryable<vBookUserAccess> vBookUserAccesses(this PortfolioDbContext context)
{
	return from ga in context.GroupAccesses
	   join g in context.Groups on new { ga.GroupId, GroupTypeId = 2 } equals
		   new { GroupId = g.Id, g.GroupTypeId }
	   join at in context.AccessTypes on ga.AccessTypeId equals at.Id
	   join gs in context.GroupStatuses on g.GroupStatusId equals gs.Id
	   join u in context.AspNetUsers on ga.UserId equals u.Id
	   join uas in context.UserAccountStatuses on u.AccountStatus equals uas.Id
	   join jr in context.Relationships() on ga.GroupId equals jr.ChildGroupId into joined
	   from relationship in joined.DefaultIfEmpty()
	   select relationship == null
		  ? new vBookUserAccess
				{
					Id = ga.GroupId,
					Name = g.Name,
					Description = g.Description,
					StatusId = g.GroupStatusId,
					StatusName = gs.Name,
					StatusDescription = gs.Description,
					NumberOfParentPortfolios = null,
					ParentPortfolioRelationshipTypeId = null,
					ParentPortfolioRelationshipTypeName = null,
					ParentPortfolioRelationshipTypeDescription = null,
					AccessUserId = ga.UserId,
					AccessUserName = u.UserName,
					AccessUserFirstName = u.FirstName,
					AccessUserLastName = u.LastName,
					AccessUserEmail = u.Email,
					AccessUserAccountStatusId = u.AccountStatus,
					AccessUserAccountStatusName = uas.Name,
					AccessUserAccountStatusDescription = uas.Description,
					AccessTypeId = ga.AccessTypeId,
					AccessTypeName = at.Name,
					AccessTypeDescription = at.Description,
					AccessCreatedDate = ga.CreatedDate,
					AccessCreatedBy = ga.CreatedBy,
					AccessModifiedDate = ga.ModifiedDate,
					AccessModifiedBy = ga.ModifiedBy,
					AccessVersion = ga.RowVersion
				}
		  : new vBookUserAccess
				{
					Id = ga.GroupId,
					Name = g.Name,
					Description = g.Description,
					StatusId = g.GroupStatusId,
					StatusName = gs.Name,
					StatusDescription = gs.Description,
					NumberOfParentPortfolios = relationship.NumberOfParentPortfolios,
					ParentPortfolioRelationshipTypeId =
						relationship.ParentPortfolioRelationshipTypeId,
					ParentPortfolioRelationshipTypeName =
						relationship.ParentPortfolioRelationshipTypeName,
					ParentPortfolioRelationshipTypeDescription =
						relationship.ParentPortfolioRelationshipTypeDescription,

					AccessUserId = ga.UserId,
					AccessUserName = u.UserName,
					AccessUserFirstName = u.FirstName,
					AccessUserLastName = u.LastName,
					AccessUserEmail = u.Email,
					AccessUserAccountStatusId = u.AccountStatus,
					AccessUserAccountStatusName = uas.Name,
					AccessUserAccountStatusDescription = uas.Description,
					AccessTypeId = ga.AccessTypeId,
					AccessTypeName = at.Name,
					AccessTypeDescription = at.Description,
					AccessCreatedDate = ga.CreatedDate,
					AccessCreatedBy = ga.CreatedBy,
					AccessModifiedDate = ga.ModifiedDate,
					AccessModifiedBy = ga.ModifiedBy,
					AccessVersion = ga.RowVersion
				};
}

private static IQueryable<Relationship> Relationships(this PortfolioDbContext context)
{
	return from gr in context.GroupRelationships
	   join gs in context.Groups on new { gr.ParentGroupId, GroupTypeId = 1 } equals
		   new { ParentGroupId = gs.Id, gs.GroupTypeId }
	   join relationshipType in context.RelationshipTypes on gr.RelationshipTypeId equals
		   relationshipType.Id
	   group gr by new
		   {
			   gr.ChildGroupId,
			   gr.RelationshipTypeId,
			   relationshipType.Name,
			   relationshipType.Description
		   }
	   into g
	   select new Relationship
		  {
			  ChildGroupId = g.Key.ChildGroupId,
			  ParentPortfolioRelationshipTypeId = g.Key.RelationshipTypeId,
			  ParentPortfolioRelationshipTypeName = g.Key.Name,
			  ParentPortfolioRelationshipTypeDescription = g.Key.Description,
			  NumberOfParentPortfolios = g.Count()
		  };
}

private class Relationship
{
	public int ChildGroupId { get; set; }

	public int NumberOfParentPortfolios { get; set; }

	public string ParentPortfolioRelationshipTypeDescription { get; set; }

	public int ParentPortfolioRelationshipTypeId { get; set; }

	public string ParentPortfolioRelationshipTypeName { get; set; }
}

This worked in EF6 even without the null operator. Presumably the nested IQueryable is the cause. Any ideas?

@armitagemderivitec I filed the new bug - https://github.com/aspnet/EntityFrameworkCore/issues/14773 since this looks like a different issue, no QueryFilters seem to be involved in the scenario.

What a triage. Instead of better documentation - did it ocur to you to issue a hotfix that fixes a bug that makes a whole subsystem (i.e. query filters) totally unusable? And it is nice to see that you basically tell all of us to go home and use EF - because a bug that shuts down a whole subsystem is scheduled for - ah, 3.0. Nice. Basically "oh, sorry you rely on query filterrs, maybe in a year we prouce a usable product there".
This is a 1.0 feature that does not work. 2.1.5 is the next patch. It should get this into a usable state. At minimum 2.2 should include an emergency fix for this. Otherwise basically EF is it - I do not care about EF Core because now you actually tell me that the new features that make it worthwhile and everyone loves pointing out - do not work and will not get fixed.
Any manager going through tirage and handing out reprimands? Bevcause this is the 2nd time this particular bug is either not accepted as bug (hey, fix your data) or - ah, scheudled for some far point in the future, usage and impact on users being irrelevant. I personally can only be happy that I am slowly removing query filters anyway (related to some business logic that makes them jsut the wrong place - i.e. we will filter on the REST side, not the model, as some related objects may be "oiutdated" but in our case then still are visible read only, so general filters do not work). But I can bet other people actually use that and are not happy about a 3.0 schedule.

Its the manager who decides whether it is useful for marketing or not, problem is EF team has never taken problems seriously but are always busy in introducing new in built features of SQL Server or now Cosmos DB in EF Core. The whole focus is on Cosmos DB and all bugs are scheduled for future !!
Open source term is misleading here, there is no community and there is no control over what will happen next.

Dirty hack till this is fixed,
    public static class NullPropagation
    {

        public static IQueryable<TReturn> SafeSelect<T, TReturn>(this IQueryable<T> query, Expression<Func<T, TReturn>> selector)
            where T: class
        {

            // modify selector...
            var tv = new TreeVisitor<T, TReturn>(selector);

            selector = tv.Compile();

            return query.AsNoTracking().Select(selector);
        }

    }

    public class TreeVisitor<T, TReturn> : ExpressionVisitor
    {
        private Expression<Func<T, TReturn>> selector;

        public TreeVisitor(Expression<Func<T, TReturn>> selector)
        {
            this.selector = selector;
        }

        internal Expression<Func<T, TReturn>> Compile()
        {
            var body = this.selector.Body;
            body = this.Visit(body);

            return Expression.Lambda<Func<T, TReturn>>(body, selector.Parameters);
        }

        protected override Expression VisitNew(NewExpression node)
        {
            var types = node.Members.OfType<PropertyInfo>().Select(x => x.PropertyType).ToList();
            var args = node.Arguments.Select((x, i) => NullCheck(x, types[i])).ToList();

            return node.Update(args);
        }

        private Expression NullCheck(Expression node, Type type)
        {
            if (node is NewExpression n)
            {
                return this.VisitNew(n);
            }

            var start = node;
            Stack<MemberExpression> stack = new Stack<MemberExpression>();
            if (!(node is MemberExpression nm))
            {
                return node;
            }
            node = nm.Expression;
            while(node is MemberExpression me)
            {
                var p = me.Member as PropertyInfo;
                stack.Push(me);
                node = me.Expression;
            }
            if (stack.Any())
            {
                Expression be = null;
                do
                {
                    Expression c = Expression.NotEqual(stack.Pop(), Expression.Constant(null));
                    be = be == null ? c: Expression.AndAlso(be, c);
                } while (stack.Any());
                return Expression.Condition(be, start, Expression.Default(type));
            }

            return start;
        }
    }

Usage:
   query.SafeSelect( x => ... )

@ajcvickers @maumar - The optimization which broke this scenario has been removed from new query pipeline. What is pending action item here?

@smitpatel Probably just verify fixed.

I didn't have this issue in .NET Core 2.2, Now I'm using .NET Core 3.0 and I'm having trouble with this when using a QueryFilter.

@MusicDemons - Please file a new issue with repro code which we can run. Your issue does not seem to be related to this issue.

some developers are using bad practices (yielding results from a potentially large DbSet before
executing a linq query)

Given the state of EfCore query execution that is not bad practice - is it an approach that works. I do the same. I route ALL queries through a helper method. The helper method does use analyisis of the query parameters and the LINQ nodes to decide whether or not to offload the query to SQL. If not - all data is laoded and evaluated in memory.
Bad practice? NO. It is a workaround until I either get so tired to rip out EfCore, or they fix the bugs and I slowly take out cases where I need to evaluate locally.

@NetTecture you're clearly frustrated with the state of things, but can you please refrain from posting comments that aren't relevant to the issue? The team is working extremely hard to address issues to the best of our abilities, and this doesn't help us make progress.


FE displaying metadata for map in second tab

Describe the bug
Currently, only the metadata for the active map tab is fetched, thus not displaying metadata about ohter pinned but not selected maps
To Reproduce
Steps to reproduce the behavior:

Pin second map
Select metadata via tab menu
Metadata not fetching correctly

Expected behavior
Metadata should be displaying correctly, even for not active (but pinned) maps
Screenshots

Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Done with #347


YETUS-721. personalities shouldn't directly set repository information

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/1/console in case of problems.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
8
Precommit patch detected.

_ Prechecks _

+1
@author
0
The patch does not contain any @author tags.

_ master Compile Tests _

_ Patch Compile Tests _

+1
shellcheck
3
There were no new shellcheck issues.

+1
shelldocs
1
There were no new shelldocs issues.

+1
whitespace
0
The patch has no whitespace issues.

_ Other Tests _

+1
asflicense
6
The patch does not generate ASF License warnings.

31

Subsystem
Report/Notes

GITHUB PR
https://github.com/apache/yetus/pull/31

Optional Tests
dupname  asflicense  shellcheck  shelldocs

uname
Linux asf938.gq1.ygridcore.net 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/us-github-multibranch_PR-31-7BJNNLTWKXFOWPNH5HVEDVEMFU73TXAOTZ56A6TRNKMNCS4PONOQ/out/precommit/personality/provided.sh

git revision
master / ae6d2fb

maven
version: Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00)

shellcheck
v0.3.7

modules
C: precommit U: precommit

Console output
https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/1/console

Powered by
Apache Yetus 0.9.0-SNAPSHOT http://yetus.apache.org

This message was automatically generated.

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/2/console in case of problems.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
0
Docker mode activated.

-1
docker
614
Docker failed to build yetus/yetus:2f69401.

Subsystem
Report/Notes

GITHUB PR
https://github.com/apache/yetus/pull/31

Console output
https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/2/console

Powered by
Apache Yetus 0.9.0-SNAPSHOT http://yetus.apache.org

This message was automatically generated.

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/3/console in case of problems.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
883
Docker mode activated.

_ Prechecks _

+1
@author
0
The patch does not contain any @author tags.

_ master Compile Tests _

_ Patch Compile Tests _

+1
shellcheck
4
There were no new shellcheck issues.

+1
shelldocs
0
There were no new shelldocs issues.

+1
whitespace
0
The patch has no whitespace issues.

_ Other Tests _

+1
asflicense
9
The patch does not generate ASF License warnings.

914

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/3/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/yetus/pull/31

Optional Tests
dupname  asflicense  shellcheck  shelldocs

uname
Linux b78f12bed92e 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
precommit/src/main/shell/personality/yetus.sh

git revision
master / ed57f34

maven
version: Apache Maven 3.3.9

shellcheck
v0.4.6

Max. process+thread count
46 (vs. ulimit of 2000)

modules
C: precommit U: precommit

Console output
https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/3/console

Powered by
Apache Yetus 0.9.0-SNAPSHOT http://yetus.apache.org

This message was automatically generated.

(!) A patch to the testing environment has been detected.
Re-executing against the patched versions to perform further tests.
The console is at https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/4/console in case of problems.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
39
Docker mode activated.

_ Prechecks _

+1
@author
0
The patch does not contain any @author tags.

_ master Compile Tests _

_ Patch Compile Tests _

+1
shellcheck
4
There were no new shellcheck issues.

+1
shelldocs
1
There were no new shelldocs issues.

+1
whitespace
0
The patch has no whitespace issues.

_ Other Tests _

+1
asflicense
9
The patch does not generate ASF License warnings.

69

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/4/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/yetus/pull/31

Optional Tests
dupname  asflicense  shellcheck  shelldocs

uname
Linux 2297d36987f9 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
precommit/src/main/shell/personality/yetus.sh

git revision
master / 3a14572

maven
version: Apache Maven 3.3.9

shellcheck
v0.4.6

Max. process+thread count
51 (vs. ulimit of 2000)

modules
C: precommit U: precommit

Console output
https://builds.apache.org/job/yetus-github-multibranch/job/PR-31/4/console

Powered by
Apache Yetus 0.9.0-SNAPSHOT http://yetus.apache.org

This message was automatically generated.


Multiple file uploader not working properly

1- Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
2- View is not responsive

Hi there @dESourcesra,

Please make sure you're using the latest version of dropzone plugin, their documentation was really helpful while integrating this with our code, here is the author website: http://www.dropzonejs.com , if you encounter problems with the actual plugin take a look on their git account (https://github.com/enyo/dropzone/issues), maybe someone had the same issues.

We had some testing with responsive scenarios however there are a lot of devices and browsers version over there, please provide some screenshots so we can figure out how can we improve this even further!

Regards,
Andrew.


remove unnecessary jit check

A common misconception is that the LuaJIT ffi doesn't work if the JIT isn't on. This fixes that.

My understanding was that FFI works without JIT, but suffers performance penalties worse than the non-FFI implementation. I'll need to run some benchmarks to confirm / deny this before accepting this request:
http://lua-users.org/lists/lua-l/2011-06/msg01016.html

The performance penalties that link refers to is with regards to calling C functions from Lua. This is just accessing raw memory, so there's no need to JIT, afaik.

Huh. A quick test shows that this improves performance even with the JIT turned off (jit.off()) which is mildly surprising. Though to be fair, this is the difference between like 18 FPS and 30 FPS, neither of which is going to knock anyone's socks off. Either way, it doesn't seem to hurt performance and it's one fewer special case in main.lua; I'll merge it in. Sorry it took me so long to swing around to testing this.
I've accepted that the Love2D shell is going to depend on LuaJIT / FFI to achieve fullspeed performance, and that's okay. As cool as it is to run the project on esoteric platforms (I got it running in Minecraft on OpenComputers a while back) I don't plan to worry about performance of the emulator in those situations.


perf(suspense): make suspense optimizable

Since compiled slot is function for sure, we can skip checking if it's a function and normalizing its children

This is not going to be perf-critical due to its low usage frequency, so I think it's to just keep the logic simple.

okay, suspenses are pretty rare and update rarely too


[WFLY-17070][WFLY-17053][WFLY-16867] Drop source transformation for the Agroal subsystem

Jira issue: https://issues.redhat.com/browse/WFLY-17070
In addition, amends minor fixes for:
https://issues.redhat.com/browse/WFLY-17053
https://issues.redhat.com/browse/WFLY-16867

Good catch @bstansberry , thanks for reviewing it

Thanks, @yersan


Permissions

Hi @stingram @parmitam, can one of you please give me and @morgandu permissions to write to this repo? Thanks!

Done.


When downloading large files, the CPU is fully occupied, resulting in slow download speed

When downloading large files, the CPU is fully occupied, resulting in slow download speed

Please use the bug report template from https://github.com/mitmproxy/mitmproxy/issues/new?assignees=&labels=kind%2Ftriage&projects=&template=bug_report.md&title= and edit your post accordingly.


wallet balance not accurate

wallet balance not accurate.
seems to be from dependency on this service for the utxo information:
https://rest.bch.actorforth.org/v2/address/utxo
and the service is not showing accurate information (not synced).
here is an example:
https://blockchair.com/bitcoin-cash/outputs?q=recipient(qzxtfemsxz2qt4av3zj85qgtqa0vpd9sruqf99t9r3),is_spent(false)#
shows 4 utxos
https://rest.bch.actorforth.org/v2/address/utxo/qzxtfemsxz2qt4av3zj85qgtqa0vpd9sruqf99t9r3
shows 1 utxo.
see screenshots:

This should now be fixed.
https://rest.bch.actorforth.org/v2/address/utxo/qzxtfemsxz2qt4av3zj85qgtqa0vpd9sruqf99t9r3 now shows 4 UTXOs


Xcode build fails after adding some dependencies.

The error happens after adding some dependencies like image_picker, cached_network_image and shared_preferences. i've tried flutter clean and pub get it doesnt work. The app runs fine on android. I am using an intel  macbook pro late 2013. All of the dependencies show the same error as shown in the images below

so i just found out the issue was not from flutter but from cocoapods. and mainly it was cause in my path one of the files had an ' . so be careful.


allow values to be set to nil (or "")

[some_section]
foo=

When this is parsed, it will be {}. I'd sort of like to have it look more like {"some_section"=>{"foo"=>""}}
This would match the default behavior in the python config parser. Using
cfg = ConfigParser.RawConfigParser()
cfg.read('/tmp/foo.cfg')
cfg.get('some_section', 'foo')
=> ''

Thank you so much for spotting this for me.
This is now tested and patched in 0.1.5.  Please test and confirm.

Awesome, thanks a bunch. It's working for me (installed the gem version 0.1.5).


Update SetupViewport so that it doesn't subtract offset from render d…

…imensions when calling rlViewport

@michaelfiber thanks for the review!


os: add Ignition example for grub.cfg

updated PR for: https://github.com/coreos/docs/pull/1240

Already approved PR. I'm not doing further checks on the docs change, just merging to unblock this fix.


Update README.md

Make urls for clone and releases match new repo location

sorry been busy will go through your pulls requests shortly, this one is getting merged


Improved vertex color handling for GLB files

Fixes https://github.com/playcanvas/engine/issues/4118 (great investigation and solutions @willeastcott )

instead of using DefaultMaterial for missing materials inside GLB, use GLB specific default material
assume 8but colors in draco compressed glb format are normalized (some compressor don't set that flag correctly, I've seen it few times in the past)

yes, those options are what make the vertex colors to work
On Fri, Apr 22, 2022 at 6:08 PM Donovan Hutchence @.***>
wrote:

@.**** commented on this pull request.
In src/resources/parser/glb-parser.js
https://github.com/playcanvas/engine/pull/4209#discussion_r856420644:

@@ -2293,7 +2294,9 @@ class GlbParser {
constructor(device, assets, maxRetries) {
this._device = device;
this._assets = assets;

   this._defaultMaterial = getDefaultMaterial(device);

   this._defaultMaterial = createMaterial({

What is the difference between the material created here and the device
default material? It looks like the device default material has had
shadingModel
https://github.com/playcanvas/engine/blob/main/src/framework/app-base.js#L648
set, but that's the standard material default anyway
https://github.com/playcanvas/engine/blob/main/src/scene/materials/standard-material.js#L1057
.
Is it missing:
material.diffuseTint = true;
material.diffuseVertexColor = true;

material.specularTint = true;
material.specularVertexColor = true;

?
—
Reply to this email directly, view it on GitHub
https://github.com/playcanvas/engine/pull/4209#pullrequestreview-950365464,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJIA27TV7SV4NHWSRL6SHDVGLMGZANCNFSM5UCM3NDQ
.
You are receiving this because you were assigned.Message ID:
@.***>


Typo - Skype for Business Server 2019 was released in October 2019

I'm assuming that it should read "was released in October 2018"

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fbeb59c4-349f-944c-5183-4fb26a34c22b
Version Independent ID: 2beb18af-35a6-de0a-d90f-89c94533b8da
Content: FAQ - Upgrade Journey from Skype for Business to Microsoft Teams - Microsoft Teams
Content Source: Teams/FAQ-journey.md
Service: msteams
GitHub Login: @dearbeen
Microsoft Alias: dearbeen

@albertherd  - Thank you for submitting this feedback.
I was able to get this into the backlog for the Teams team. The team will get this prioritized into a sprint plan. Thank you for reporting and making the docs better. Much appreciated.
I made a note to request the team to update this when the work is complete.

@dearbeen - OK to update?

Yes the date should be Oct 2018. Thanks.

Article has been updated. Thanks, Debbie.


Updated and added docs for 1.18-6

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/hold

/unhold


Tracking: date/time functions

https://www.postgresql.org/docs/current/functions-datetime.html
Caveats:

A month can have 28, 29, 30, or 31 days.
A day may have 23 or 25 hours during Daylight Saving Time switch.
The same instant may have a different reading of year (or month, day, hour, minute, second) in different zones.
PostgreSQL does not handle leap seconds.
PostgreSQL uses the proleptic Gregorian calendar rather than the Julian calendar for dates before 1582-10-15.
ISO 8601 year 0 is generally referred to as 1 BC

proto ExprType 101..=108
Cast

[x] implicit: date -> timestamp -> timestamptz
[x] implicit: time -> interval
[x] assign: timestamptz -> timestamp -> date
[x] assign: interval -> time
[x] assign: timestamptz -> time
[x] assign: timestamp -> time

Arithmetic operators

[x] #924

Basic

age(timestamp, timestamp) -> interval
age(timestamptz, timestamptz) -> interval
date_bin(interval, timestamp, timestamp) -> timestamp
date_bin(interval, timestamptz, timestamptz) -> timestamptz
[x] date_trunc(field, interval) -> interval
[x] date_trunc(field, timestamp) -> timestamp
[x] date_trunc(field, timestamptz, zone) -> timestamptz
[x] date_part / extract #8817
[x] AT TIME ZONE
[x] to_timestamp(double) -> timestamptz
justify_days / justify_hours / justify_interval
make_date / make_timestamp / make_timestamptz / make_time / make_interval
OVERLAP
isfinite
#9091 (not in PostgreSQL)

Formatting

to_char / to_date / to_timestamp in #8831

Current

[x] current_timestamp / transaction_timestamp() / now() -> timestamptz
localtimestamp -> timestamp
current_date -> date / age(timestamp) -> interval / age(timestamptz) -> interval
localtime -> time

Nonstandard:

statement_timestamp() -> timestamptz
clock_timestamp() -> timestamptz / timeofday() -> varchar
'now' / 'today' / 'tomorrow' / 'yesterday'

No support

pg_sleep https://github.com/risingwavelabs/risingwave/issues/2561#issuecomment-1127386742
current_time -> timetz
current_time(int) -> timetz

Aggregate

[x] sum / avg for interval

Set Returning Functions

[ ] generate_series(start T, stop T, step INTERVAL) -> setof T where T is timestamp / timestamptz

Is it possible to add to the list date_diff?
Current alternative is taking the epoch and then subtracting by given unit you want:
(EXTRACT(EPOCH FROM date2 - date1) / 86400)::int


Block/BlockHeader-by-height fetchers must check for sufficient finality signatures when checking storage

When a fetcher is fetching a block or block header by height, it must make sure there are sufficient finality signatures when checking storage first.

Closed with #1998


Implement Ordered Deck

Currently the deck in the simulator is unordered. But some cards since version 4.7 (or 4.6?) assumes an ordered deck, so the update is required.

I'll sort it in a few days.

Implemented and applied in 68d1055


[FEATURE] Certificate hot-reload support for SSL only mode clusters.

Is your feature request related to a problem?
Yes, Currently for SSL only mode reloadcerts and certs info apis are not supported.
What solution would you like?
SSL certificate reload and certificate info api support also for SSL only mode clusters.
What alternatives have you considered?
Don't have any other alternative in existing code to support certificate hot-reload feature in ssl mode cluster.(Currently node reboot needed to rotate certificates.)
Do you have any additional context?
In existing code we are not registering certificate related handlers for SSL Only Mode.
Code ref:- https://github.com/opensearch-project/security/blob/2.10/src/main/java/org/opensearch/security/OpenSearchSecurityPlugin.java#L496

[Triage] Hi @shubhmkr-amazon, thank you for filing this issue. The first item here should be making sure this is in fact not supported. If it is not, this seems like a good request for support.


Wrong generated type for generic function

I have this reason code:
type request('request, 'response) =
  (RxRpcClient.t, 'request, Js.Dict.t(string)) =>
  ('response, RxRpcClient.unaryCallResult);

module type Service = {
  type requestType;
  type responseType;
  let request: request(requestType, responseType);
};

[@genType]
type service('requestType, 'responseType) = (module Service with
                                                type requestType = 'requestType and
                                                type responseType = 'responseType);

[@genType]
type decorator('requestType, 'responseType) =
  request('requestType, 'responseType) =>
  request('requestType, 'responseType);

[@genType]
type decorateFunc('requestType, 'responseType) =
  (
    service('requestType, 'responseType),
    decorator('requestType, 'responseType)
  ) =>
  (module Service);

[@genType]
let decorateService =
    (
      type requestType,
      type responseType,
      service: (module Service with
                  type requestType = requestType and
                  type responseType = responseType),
      decorator:
        request(requestType, responseType) =>
        request(requestType, responseType),
    ) => {
  module Origin = (val service);
  let decoratedRequest = decorator(Origin.request);
  (
    (module
     {
       type requestType = Origin.requestType;
       type responseType = Origin.responseType;
       let request = decoratedRequest;
     }): (module Service)
  );
};

and this generated code:
/**
 * @flow strict
 * @generated
 * @nolint
 */
/* eslint-disable */

// $FlowExpectedError: Reason checked type sufficiently
import * as Curry from 'bs-platform/lib/es6/curry.js';

// $FlowExpectedError: Reason checked type sufficiently
import * as ServiceBS from './Service.bs';

// flowlint-next-line nonstrict-import:off
import type { Dict_t as Js_Dict_t } from './shims/js.shim';

// flowlint-next-line nonstrict-import:off
import type { t as RxRpcClient_t } from './RxRpcClient.gen';

// flowlint-next-line nonstrict-import:off
import type { unaryCallResult as RxRpcClient_unaryCallResult } from './RxRpcClient.gen';

export type request<request, response> = (
  RxRpcClient_t,
  request,
  Js_Dict_t<string>,
) => [response, RxRpcClient_unaryCallResult];

export type service<requestType, responseType> = {|
  +request: request<requestType, responseType>,
|};

export type decorator<requestType, responseType> = (
  request<requestType, responseType>,
) => request<requestType, responseType>;

export type decorateFunc<requestType, responseType> = (
  service<requestType, responseType>,
  decorator<requestType, responseType>,
) => {| +request: request<requestType, responseType> |};

export const decorateService: <T1, T2>(
  {| +request: request<requestType, responseType> |},
  (request<T1, T2>) => request<T1, T2>,
) => {| +request: request<requestType, responseType> |} = function _(
  Arg1,
  Arg21,
) {
  const result = Curry._2(
    ServiceBS.decorateService,
    [
      function _(Arg11, Arg2, Arg3) {
        const result1 = Arg1.request(Arg11, Arg2, Arg3);
        return [
          result1[0],
          {
            cancel: function _(Arg12) {
              const result2 = result1[1].cancel(Arg12);
              return result2;
            },
          },
        ];
      },
    ],
    function _(Arg13) {
      const result3 = Arg21(function _(Arg14, Arg22, Arg31) {
        const result4 = Curry._3(Arg13, Arg14, Arg22, Arg31);
        return result4;
      });
      return function _(Arg15, Arg23, Arg32) {
        const result5 = result3(Arg15, Arg23, Arg32);
        return [
          result5[0],
          {
            cancel: function _(Arg16) {
              const result6 = result5[1].cancel(Arg16);
              return result6;
            },
          },
        ];
      };
    },
  );
  return {
    request: function _(Arg17, Arg24, Arg33) {
      const result7 = Curry._3(result[0], Arg17, Arg24, Arg33);
      return result7;
    },
  };
};

There are two type parametres T1 and T2 instead of requestType and responseType. So in signature request<requestType, responseType> is wrong

@meafmira thanks for the report.
There's currently no support for type equations in first-class modules (module X with type t = ...).
Looking into adding that to build up towards more interesting examples.

@meafmira the two commits just above should handle the issues you have outlined.
Feel free to test your full example with master, or add a self-contained example here.

In release https://github.com/cristianoc/genType/releases/tag/v2.12.0.
@meafmira Feel free to re-open if there are any remaining issues with your example.

@cristianoc I have no option to reopen this issue. But now I have another problem. For this function:
[@genType]
let decorateService =
    (
      type requestType,
      type responseType,
      service: (module Service with
                  type requestType = requestType and
                  type responseType = responseType),
      decorator:
        request(requestType, responseType) =>
        request(requestType, responseType),
    )
    : (module Service) => {
  module Origin = (val service);
  let decoratedRequest = decorator(Origin.request);
  (module
   {
     type requestType = Origin.requestType;
     type responseType = Origin.responseType;
     let request = decoratedRequest;
   });
};

we have generated code:
export const decorateService: <T1, T2>(
  {| +request: request<T1, T2> |},
  (request<T1, T2>) => request<T1, T2>,
) => {|
  +request: request<Service_requestType, Service_responseType>,
|} = function _(Arg1, Arg21) {
  const result = Curry._2(
    CallBS.decorateService,
    [
      function _(Arg11, Arg2, Arg3) {
        const result1 = Arg1.request(Arg11, Arg2, Arg3);
        return [
          result1[0],
          {
            cancel: function _(Arg12) {
              const result2 = result1[1].cancel(Arg12);
              return result2;
            },
          },
        ];
      },
    ],
    function _(Arg13) {
      const result3 = Arg21(function _(Arg14, Arg22, Arg31) {
        const result4 = Curry._3(Arg13, Arg14, Arg22, Arg31);
        return result4;
      });
      return function _(Arg15, Arg23, Arg32) {
        const result5 = result3(Arg15, Arg23, Arg32);
        return [
          result5[0],
          {
            cancel: function _(Arg16) {
              const result6 = result5[1].cancel(Arg16);
              return result6;
            },
          },
        ];
      };
    },
  );
  return {
    request: function _(Arg17, Arg24, Arg33) {
      const result7 = Curry._3(result[0], Arg17, Arg24, Arg33);
      return result7;
    },
  };
};

where Service_requestType and Service_responseType are undefined. I try to fix this by add type annotation:
[@genType]
let decorateService =
    (
      type requestType,
      type responseType,
      service: (module Service with
                  type requestType = requestType and
                  type responseType = responseType),
      decorator:
        request(requestType, responseType) =>
        request(requestType, responseType),
    )
    /* here */: (module Service with type requestType = requestType and type responseType = responseType) => {
    /* ... */

so we have this code:
export const decorateService: <T1, T2>(
  {| +request: request<T1, T2> |},
  (request<T1, T2>) => request<T1, T2>,
) => {| +request: request<T1, T2> |} = function _(Arg1, Arg21) {
  const result = Curry._2(
    CallBS.decorateService,
    [
      function _(Arg11, Arg2, Arg3) {
        const result1 = Arg1.request(Arg11, Arg2, Arg3);
        return [
          result1[0],
          {
            cancel: function _(Arg12) {
              const result2 = result1[1].cancel(Arg12);
              return result2;
            },
          },
        ];
      },
    ],
    function _(Arg13) {
      const result3 = Arg21(function _(Arg14, Arg22, Arg31) {
        const result4 = Curry._3(Arg13, Arg14, Arg22, Arg31);
        return result4;
      });
      return function _(Arg15, Arg23, Arg32) {
        const result5 = result3(Arg15, Arg23, Arg32);
        return [
          result5[0],
          {
            cancel: function _(Arg16) {
              const result6 = result5[1].cancel(Arg16);
              return result6;
            },
          },
        ];
      };
    },
  );
  return {
    request: function _(Arg17, Arg24, Arg33) {
      const result7 = Curry._3(result[0], Arg17, Arg24, Arg33);
      return result7;
    },
  };
};

but now we have flow error Cannot assign function to decorateServicebecause the expected type is not parametric in T1[1], perhaps due to the use of*or the lack of a type annotation in type argument request[2] of propertyrequest of the return value.
To fix this we need to add T1 and T2 parameters to generated function. Like this:
export const decorateService: <T1, T2>(
  {| +request: request<T1, T2> |},
  (request<T1, T2>) => request<T1, T2>,
) => {| +request: request<T1, T2> |} = function _<T1, T2>/* here */(Arg1, Arg21) {
// ...

@meafmira thanks.
Here's a small repro:
type pair('x, 'y) = {
  x: 'x,
  y: 'y,
};

[@genType]
let id = (p: pair(_)) => p;

giving
// $FlowExpectedError: Reason checked type sufficiently
import * as ABS from './A.bs';

export type pair<x,y> = {| +x: x, +y: y |};

export const id: <T1,T2>(pair<T1,T2>) => pair<T1,T2> = function _(Arg1) {
  const result = ABS.id([Arg1.x, Arg1.y]);
  return {x:result[0], y:result[1]}
};

@meafmira this https://github.com/cristianoc/genType/commit/a8c75ee383236439e842992eaa0d0fd0fa33eb6a takes care of the issue of type parameters for polymorphic conversion functions.
Let me know if there are any other outstanding issued.

@cristianoc thank you so much for your work and responsiveness and great tool. I'll check this issue tomorrow

@cristianoc I checked generation. Now it works as expected. Thank you so much

@cristianoc Also could you pls release npm package with these changes?

@meafmira that's great thanks.
Now in release 2.12.1.


iss8

Implement static and dynamic cues. Also, implement functionality to import EMG data and extract cues from it.

Basic functionality added.


AzureServiceBusResource should include possibility to specify subscriptions for each topic.

Azure Service Bus Resource in Aspire.Hosting.Azure should include the possibility for users to specify subscriptions for each topic. Today, if Service Bus is used with Aspire.Hosting.Azure.Provisioning, and one or more topic is specified, they can't be used from a subscriber point-of-view since no subscriptions exist.
https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#topics-and-subscriptions
Basically this needs to be updated to include a list of subscriptions for each topic, and provisioner then needs to be updated accordingly in order to support creating subscriptions.
https://github.com/dotnet/aspire/blob/0d1f8ea7750b69c8f221816077e9e5a5baa1bc0a/src/Aspire.Hosting.Azure/AzureServiceBusResource.cs#L23-L26

@davidfowl, as this change might break manifest (depending on how it's implemented) it might be wise to consider a fix before GA.
If you think it's worth prioritizing, I can send a PR for a fix.

Yes we should fix this.

Yes we should fix this.

We should probably look at creating separate resources for queues and topics while we are at it. These would probably be better off as parent-child relationships. Azure Service Bus Namespace being the parent, and queues and topics (with subscriptions) being children.

I agree, we should re-design this. AZD can support both formats for a short time frame but we can change this in preview4. Would you be willing to send a PR?
cc @ellismg for heads up.

Would you be willing to send a PR?

 I'm doing a massive refactoring of our azure resources and provisioner so maybe wait a little with this one.
https://github.com/dotnet/aspire/pull/2056

@davidfowl thanks for the heads up. I have the PR almost ready (just wanted to do some verifications before submitting).
Do you happen to have a branch for the massive refactoring? Just so I can have a look, and maybe try rebasing my work on top of that.

https://github.com/dotnet/aspire/tree/davidfowl/bicep-resource/src/Aspire.Hosting.Azure/Bicep

https://github.com/dotnet/aspire/tree/davidfowl/bicep-resource/src/Aspire.Hosting.Azure/Bicep

Interesting 🤔 So instead of using .NET ARM SDK, you're looking into provisioning using Bicep 🙂

Yep. We’re hoping to get rid of this package by GA so we can rely on azd for both local dev and deploy scenarios.
the manifest modeling let’s azd get of the business of defining every resource type. We just need a few primitives.

@bjorkstromm let me know what you want to do. I service bus is the second last resource I need to migrate. Might be better to do a follow up on my PR (which will have crappy bicep) after I'm done.

@davidfowl yes, I can do a follow up PR. Don't need to wait for me 🙂

Looking at this now, and it seems we'll run into a use-case not yet solved by the Bicep provisioner.
Since Bicep lacks support for nested loops I can't do something like this
param queues array = []
param topics object = {}

resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-10-01-preview' = {
  ...

  resource queue 'queues@2022-10-01-preview' = [for name in queues:{
    name: name
  }]

  resource topic 'topics@2022-10-01-preview' = [for topic in items(topics):{
    name: topic.key

    resource subscription 'subscriptions@2022-10-01-preview' = [for subscription in topic.value.subscriptions: {
      name: subscription.name
    }]
  }]
}

And instead I'd need a module for the topics (see https://stackoverflow.com/a/76105656).
To solve this, should I
a) Make AzureBicepServiceBusTopic (and maybe Queue also) inherit from AzureBicepResource and create a separate Bicep files. Haven't looked into the Bicep provisioner, but hopefully I could have the topic resource to depend on the Service Bus namespace?
b) Add support for dependent modules in BicepTemplateFile and make AzureBicepResource.GetBicepTemplateFile emit all needed files to disk upon provisioning.
c) Try to get everything working in a single Bicep file. Might not even be doable, and it sure won't be pretty :smile:
Anyway, opened draft PR here #2232 where we can discuss further.

b) @mitchdenny predicted that we would need to do this, so it seems like a good thing to do.
d) Use a template string and generate the bicep in C# instead of using a resource file.

b) @mitchdenny predicted that we would need to do this, so it seems like a good thing to do.
d) Use a template string and generate the bicep in C# instead of using a resource file.

Thanks! I'll go with option b), and hopefully get the PR ready for review in the next days.

Thanks! I'll go with option b), and hopefully get the PR ready for review in the next days.

This is a big change 😄, full transparency, there's a big PR here in azd with this support https://github.com/Azure/azure-dev/pull/3349 that we've been testing. You can test your multi file support with it and see if we need to make more changes there (but I hope we don't).
@bjorkstromm We had a change WRT child resource and how they appear in the manifest.

It needs to be referenced by other resources as a value/connection string
It needs to be provisioned by the deployment tool.

Topics and queues are currently provisioned by the service bus (well namespace) bicep file so there's no need for them to appear in the manifest at all outside of being parameters.
Just an FYI.
Thanks again!

Also we're going to be deleting the old service bus resource as part of this so expect a little churn.

Thanks! I'll go with option b), and hopefully get the PR ready for review in the next days.

This is a big change 😄, full transparency, there's a big PR here in azd with this support Azure/azure-dev#3349 that we've been testing. You can test your multi file support with it and see if we need to make more changes there (but I hope we don't).

Does this mean that the BicepProvisioner will be removed / or just shell out to azd instead of doing the ARM depoyment? Or is the linked PR "just" for azd deployment using manifest? Do you see that we still need BicepProvisioner that understands AzureBicepResource and can provision with the "F5 experience"?

Fixed!

Does this mean that the BicepProvisioner will be removed / or just shell out to azd instead of doing the ARM depoyment? Or is the linked PR "just" for azd deployment using manifest? Do you see that we still need BicepProvisioner that understands AzureBicepResource and can provision with the "F5 experience"?

Long term we want to just use azd for this flow as well https://github.com/dotnet/aspire/issues/1758. We'll keep the provisioner until we make that transition.


Incorrect behavior if PCR test certificate cannot be issued

Describe the bug
During PCR test retrieval, the Request EU COVID Certificate fragment is shown even if the site doesn’t support them. After requesting, the error that the certificate is not “yet” available is shown. Only once touching Try Again in the certificates tab for the pending certificate, one can read that the testing point does not issue them at all.
For rapid tests, the Request screen is not shown if the certificate is not available.
Steps I performed that lead to this issue

Perform PCR test

Wait until PCR test result is available

Scan CWA QR code

Enter correct DOB on Request Certificate screen

See error message: certificate not available yet
https://github.com/corona-warn-app/cwa-app-android/blob/63df24be9d2bc1bfb324325d79b1c8b0f8606f4d/Corona-Warn-App/src/main/res/values/green_certificate_strings.xml#L81

Go to certificates tab

Touch Try Again

See error message: certificate won't be issued, site doesn't support it
https://github.com/corona-warn-app/cwa-app-android/blob/63df24be9d2bc1bfb324325d79b1c8b0f8606f4d/Corona-Warn-App/src/main/res/values/green_certificate_strings.xml#L75

PCR Test Result screen displays status "not available yet".
https://github.com/corona-warn-app/cwa-app-android/blob/63df24be9d2bc1bfb324325d79b1c8b0f8606f4d/Corona-Warn-App/src/main/res/values/strings.xml#L1101

Expected behaviour

Don't show Request certificate screen if no certificate can be generated, like is the case for RATs (if technically possible, otherwise show disclaimer that some labs may not be supported)
Show correct error message upon first try
Don't store certificate in certificates tab

Internal Tracking ID: EXPOSUREAPP-8543

@fynngodau Thanks. Internal Tracking ID: EXPOSUREAPP-8543

Corona-Warn-App Open Source Team


duplicity fails when using the b2 backend due to unmet dependency

Describe the bug
Attempting to use the b2 backend of duplicity now results in the error:
BackendException: B2 backend requires B2 Python SDK (pip install b2sdk)

I assume this is related to the recent merge of  #76988. This seems to require #78116?
Metadata

system: "x86_64-linux"
host os: Linux 5.4.20, NixOS, 20.09pre213994.e2b4abe3c8f (Nightingale)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.3
channels(root): "nixos-20.09pre213994.e2b4abe3c8f"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

I'm seeing this on the https://nixos.org/channels/nixos-19.09 channel as well.

This ought to be resolved by https://github.com/NixOS/nixpkgs/pull/95714.


Handle Octothorpe

Building upon the test that @docwhat contributed, this lets people use '#' in their password.

W00T!
Sent with GitHawk

@jdxcode any chance this can get a review/merge?

@jdxcode any chance this can get a review/merge?

@bigkevmcd any chance you can review this and/or merge it?


revert #36819

Details

This PR reverts https://github.com/Expensify/App/pull/36819 as it caused a regression
Fixed Issues

$ https://github.com/Expensify/App/issues/37472
PROPOSAL: https://github.com/Expensify/App/issues/37472#issuecomment-1970701582
Tests

Launch app
Tap on a report
Enter J.com in compose box and note URL link is shown
Send the message
Verify that the text is converted to a URL

[x] Verify that no errors appear in the JS console

Offline tests

Launch app
Tap on a report
Enter J.com in compose box and note URL link is shown
Send the message
Verify that the text is converted to a URL

QA Steps

Launch app
Tap on a report
Enter J.com in compose box and note URL link is shown
Send the message
Verify that the text is converted to a URL

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/6880914/b0076668-392d-4bbe-b458-f975eac14a21

MacOS: Desktop

Merged without checklist since it's a straight revert of a deploy blocker.

🚀 Cherry-picked to staging by https://github.com/puneetlath in version: 1.4.45-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
cancelled 🔪

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.45-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Daemon times out after X seconds even if changes were made.

Despite many changes over the timeout period, the daemon timed out as if none had been made.
Expected: Each change detected and pushed resets the timeout clock.
Observed: Timeout clock was never reset and ran out X seconds from launch.

Seems the issue was the isDirty function in repomgr.js wasn't actually returning the result of its checks. Updated to return true or false when completing its checks (and pushes as necessary).

Update committed and pushed.


⚠ Samsung has degraded performance

In 40eb7db, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2426 ms

Resolved: Samsung performance has improved in 413b833.


Error when importing testtoolkit or other apps: "Exception has been thrown by the target of an invocation"

Describe the issue
When creating a brand new container (BC25 Sandbox) and using the parameters: -includeTestToolkit and -includeTestLibrarieskOnly, I get an error when the testtoolkit is being imported. This also occurs, when I try to installing apps afterwards. Changed proces isolation to Hyper V did not resolve the issue.
Scripts used to create container and cause the issue
New-BcContainer `
    -accept_insiderEula `
    -accept_eula `
    -containerName $containername `
    -artifactUrl $artifactUrl `
    -Credential $credential `
    -auth UserPassword `
    -licenseFile $licenseFile `
    -updateHosts `
    -memoryLimit 8G `
    -dns <IP_ADDRESS> `
    -isolation hyperv `
    -includeTestToolkit `
    -includeTestLibrarieskOnly `
    -assignPremiumPlan

Full output of scripts
PS C:\WINDOWS\system32> New-BcContainer `
    -accept_insiderEula `
    -accept_eula `
    -containerName $containername `
    -artifactUrl $artifactUrl `
    -Credential $credential `
    -auth UserPassword `
    -licenseFile $licenseFile `
    -updateHosts `
    -memoryLimit 8G `
    -dns <IP_ADDRESS> `
    -isolation hyperv `
    -includeTestToolkit `
    -includeTestLibrarieskOnly `
    -assignPremiumPlan
BcContainerHelper is version 6.0.25
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Pro - 10.0.22631.4317
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 20.10.9
Docker Server Version is 20.10.9
Removing entries from hosts
Removing BC250-M365 from container hosts file
Removing BC250-M365-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\BC250-M365
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:ltsc2022
Creating Container BC250-M365
Style: sandbox
Multitenant: Yes
Version: 25.0.23364.25294
Platform: 25.0.25266.0
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.20348.2402 (ltsc2022)
Host OS Version: 10.0.22631.4317 (23H2)
Using hyperv isolation
Using locale nl-NL
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file http:// bla bla /bc.bclicense
Downloading C:\ProgramData\BcContainerHelper\Extensions\BC250-M365\my\license.bclicense
Files in C:\ProgramData\BcContainerHelper\Extensions\BC250-M365\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.bclicense
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container BC250-M365 from image mcr.microsoft.com/businesscentral:ltsc2022
049374f5a505e65261de69dc638f99f099e32e049772c6fb900a6c5fd0f8594b
Waiting for container BC250-M365 to be ready
Using artifactUrl https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/25.0.23364.25294/nl
Using installer from C:\Run\240
Installing Business Central: multitenant=True, installOnly=False, filesOnly=False, includeTestToolkit=False, includeTestLibrariesOnly=False, includeTestFrameworkOnly=False, includePerformanceToolkit=False, appArtifactPath=c:\dl\sandbox\25.0.2336
4.25294\nl, platformArtifactPath=c:\dl\sandbox\25.0.23364.25294\platform, databasePath=c:\dl\sandbox\25.0.23364.25294\nl\BusinessCentral-NL.bak, licenseFilePath=c:\dl\sandbox\25.0.23364.25294\nl\Cronus.bclicense, rebootContainer=True
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\25.0.23364.25294\platform\ServiceTier\Program Files
c:\dl\sandbox\25.0.23364.25294\platform\ServiceTier\System64Folder
Copying Web Client Files
c:\dl\sandbox\25.0.23364.25294\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\25.0.23364.25294\platform
c:\dl\sandbox\25.0.23364.25294\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\25.0.23364.25294\nl\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\25.0.23364.25294\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\25.0.23364.25294\nl\Extensions
Copying Applications
C:\dl\sandbox\25.0.23364.25294\platform\Applications
Copying Applications.NL
C:\dl\sandbox\25.0.23364.25294\nl\Applications.NL
Copying dependencies
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 140 seconds
Installation complete
Initializing...
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file
Starting Container
Hostname is BC250-M365
PublicDnsName is BC250-M365
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 8CABBA0B0B35E7556A40DE0EF26ED248108ECD37
DNS identity BC250-M365
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Using license file 'c:\run\my\license.bclicense'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ADMIN
Container IP Address: <IP_ADDRESS>
Container Hostname  : BC250-M365
Container Dns Name  : BC250-M365
Web Client          : http://BC250-M365/BC/?tenant=default
Dev. Server         : http://BC250-M365
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting BC250-M365 to <IP_ADDRESS> in host hosts file
Setting BC250-M365-default to <IP_ADDRESS> in host hosts file
Setting BC250-M365-default to <IP_ADDRESS> in container hosts file

Files:
http://BC250-M365:8080/ALLanguage.vsix

WARNING: You are running a container which is 166 days old.
Microsoft recommends that you always run the latest version of our containers.

Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 4.6Gb

Initialization took 37 seconds
Ready for connections!
Reading CustomSettings.config from BC250-M365
Creating Desktop Shortcuts for BC250-M365
Synchronizing Permissions Mock on default
App successfully synchronized
Installing Permissions Mock on default
Exception has been thrown by the target of an invocation.

Container Free Physical Memory: 4.4Gb
Disk C: Free 14Gb from 20Gb

Services in container BC250-M365:
Import-TestToolkitToBcContainer Telemetry Correlation Id: 75254268-d462-4923-9ef6-99cb2a2892db
New-BcContainer Telemetry Correlation Id: bb4daa3f-3fd4-41fe-9903-06a429a05301
Exception has been thrown by the target of an invocation.
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.25\ContainerHandling\Invoke-ScriptInNavContainer.ps1:301 char:25
+                         throw $errorMessage
+                         ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Exception has b... an invocation.:String) [], RuntimeException
    + FullyQualifiedErrorId : Exception has been thrown by the target of an invocation.
...

Additional context

does it happen all the time?
yes, tried multiple times
did it use to work?
yes, until today

Sorry, I see another issue has similarity #3611 , will try to prune the images first

Removing all docker images resolved the issue


Redesigning tutorial/code examples

Dear Calfem for Python developers,
Thank you for your great effort in providing a simple yet intuitive program for the finite element method. This is very helpful for me to re-learn and tutoring FEM. To gain more adoption, I am proposing the new redesign of tutorial or code examples in the Calfem-for Python documentation. What I am proposing is:

Use existing python example files in examples directory inside of writing rst file from scratch.This can be achieved by using literalinclude in rst file.
Using jupyter-notebook if possible. This can be achieved using nbsphinx extension.

Both methods ensure that the tutorial or code examples are from the most recent example version. Also, we don't need to update rst file once we modified the original examples.
I believe documentation especially tutorial is a crucial part of software development to gain market share. I have been able to convert the current tutorial to above approaches and will make PR if this proposal is accepted.
Let me know your opinion.

I think it would be a great idea. Send a PR and I will look at it.
Jonas


How do I access FormContainer().formContext ?

How can I get to the formContext of FormContainer ?
I want to programmatically disable the Form Submit button until the user has entered 2 of 3 fields (name is required, plus one of: email or phone number)
All of the examples at react-hook-form use formContext and I can't figure out how to access formContext before the submit handler is called.

@ajoslin103 can you share your code? You simply need to create a sub component inside of the  where you use the react-hook-form context hook and all the functionality of react-hook-form applies

Thank You for your time --
I need this form to only enable the submit button when the name AND ( phone OR email ) has been filled out
I tried creating a sub component to 'useForm' -- but I still must be doing something wrong
// https://material-ui.com/components/switches/
import { Box, Button, Grid } from '@material-ui/core'

// https://www.npmjs.com/package/react-hook-form-mui
import { FormContainer, TextFieldElement } from 'react-hook-form-mui'

import AttendeeCreateButton from 'src/components/AttendeeCreateButton'

import useSharedClasses from 'src/hooks/shared-styles'

export interface CreateFormValues {
  name: string;
  phone: string;
  email: string;
}

export const FormCreate = ({ onCancel, onSubmit, submitName, submitType }: { onCancel: () => void; onSubmit: (values: any) => void; submitName: string; submitType: string }) => {
  const classes = useSharedClasses()

  const formDefaults: CreateFormValues = {
    name: '',
    phone: '',
    email: '',
  }

  const [disabled, setDisabled] = React.useState(true)

  const formDiv = React.useRef<HTMLDivElement>(null)
  React.useEffect(() => {
    console.debug('innerWidth', formDiv.current.clientWidth)
  })

  return (
    <FormContainer defaultValues={formDefaults} onSuccess={onSubmit}>
      <div ref={formDiv} className={classes.formRoot}>
        <Box className={classes.comfortableWidth}>
          <TextFieldElement name="name" label={`Attendee Name`} required />
        </Box>
        <Box className={classes.comfortableWidth}>
          <TextFieldElement name="phone" label={`Attendee Phone`} required />
        </Box>
        <Box className={classes.comfortableWidth}>
          <TextFieldElement name="email" label={`Attendee EMail`} required />
        </Box>
        <Grid container spacing={2}>
          <Grid item xs={6}>
            <Button variant="contained" onClick={onCancel}>
              Cancel
            </Button>
          </Grid>
          <Grid item xs={6}>
            <AttendeeCreateButton submitName={submitName} />
          </Grid>
        </Grid>

        <Box></Box>
      </div>
    </FormContainer>
  )
}

export default FormCreate;

subcomponent
// https://material-ui.com/components/switches/
import { Box, Button, Grid } from '@material-ui/core'

// https://www.npmjs.com/package/react-hook-form
import { useForm } from 'react-hook-form'

const AttendeeCreateButton = ({ submitName  }) => {
  const { watch } = useForm()

  const [enabled, setEnabled] = React.useState(false)

  const formData = watch()
  setEnabled = (!!formData.name && (!!formData.phone || !!formData.email))

  return (
    <Button variant="contained" color="primary" type="submit" enabled={!enabled}>
      {submitName}
    </Button>
  )
}

export default AttendeeCreateButton

@ajoslin103 your code is not right, you should either use useFormContext or useWatch from react-hook-form. Here is a simple example for what you trying to archive:
https://github.com/dohomi/react-hook-form-mui/blob/master/stories/FormContainer.stories.tsx#L18

Thanks!
This worked great !!
(I'll have to study, later when I get 2 minutes to rub together, to determine why mine didn't work)


Fix missing method error

Codecov Report

Merging #425 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #425   +/-   ##
=======================================
  Coverage   76.47%   76.47%
=======================================
  Files          45       45
  Lines        2733     2733
=======================================
  Hits         2090     2090
  Misses        643      643

Continue to review full report at Codecov.

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


Allow for multiple pages

As it stands, the template's XSL transformation stylesheets assume that the TEI-XML encoded document they use to generate the HTML webpages only contain a single page. But, of course, the documents students digitise for their digitization projects usually contain multiple pages.
It would therefore be useful to reconfigure the XSL stylesheets to some extent, so they provide room where students can add in multiple document pages (scans, and textual transcriptions), so they don't have to figure out how they might go about setting something like that up for themselves.
A good way to go towards solving this problem would be to wrap each image/transcription pair in its own
 in the resulting HTML, by using a <xsl:for-each> for-loop in the XSL for each
 in the XML. This would require a more explicit pointer link from each
 to its corresponding <facsimile> image though.

[ ] new
 <xsl:for-each>
+<surface>
[ ] devise pointing mechanism to link
 to the relevant <surface> using respectively @facs and @xml:id
[ ] include new changes in all relevant XSL stylesheets
[ ] clean up (and possibly rename pointer)
[ ] double-check all XSL stylesheets
[ ] double-check all HTML


Incorrect ordering in moderation page

Expected ordering is to display not moderated posts first and then display the rest from the latest (no matter if they are rejected or approved).
Currently ordering is as follows:

Not moderated posts (approved = null)
Rejected posts (approved = false) from the lasest
Accepted posts (approved = true) from the lastest

As a result latest approved posts are at ~17 page in data table.

Fix ready


fcm_options link not working

My function here
public function pushNotificationWithLink(Request $request)
{
try {
$config = WebPushConfig::fromArray([
'notification' => [
'title' => '$GOOG up 1.43% on the day',
'body' => '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
'icon' => 'https://my-server/icon.png',
],
'fcm_options' => [
'link' => 'https://5tmusic.vn',
],
]);
        $title = 'My Notification Title';
        $body = 'My Notification Body';
        $imageUrl = 'http://lorempixel.com/400/200/';
        $notification = Notification::create($title, $body);

        $data = [
            'first_key' => 'First Value',
            'second_key' => 'Second Value',
        ];

        $message = CloudMessage::withTarget('topic', 'TopicMeoMeo')
            ->withNotification($notification) // optional
            ->withData($data) // optional
        ;

        $message = $message->withWebPushConfig($config);

        $this->messaging->send($message);

        return response()->json([
            'code' => Response::HTTP_CREATED,
            'success' => true,
            'message' => "Push notification with link successfully"
        ], Response::HTTP_CREATED);

    } catch (Exception $exception) {

        $exceptionMessage = $exception->getMessage();

        return response()->json([
            'code' => Response::HTTP_BAD_REQUEST,
            'success' => false,
            'message' => "Push notification with link failed with message $exceptionMessage"
        ], Response::HTTP_BAD_REQUEST);
    }
}

It still pushes the notification but when I click on the notification it doesn't redirect. Can you check for me. Thanks !

Hi, and thanks for raising this issue - unfortunatelym there is not much I can check for you. Your message composition looks good, and Firebase accepts the message, but how this is handled in the browser/web app is out of the SDK's control here.
As reference (but you certainly have looked this up already)

https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#WebpushFcmOptions
https://firebase.google.com/docs/cloud-messaging/js/receive

In the second link, I find this passage interesting:

If the link value points to a page that is already open in a browser tab, a click on the notification brings that tab into the foreground. If the page is not already open, a notification click opens the page in a new tab.
Because data messages don't support fcm_options.link, you are recommended to add a notification payload to all data messages. Alternatively, you can handle notifications using the service worker.

To debug this further, you could enable HTTP debug logging (https://github.com/kreait/laravel-firebase/blob/main/config/firebase.php#L151) and check if the sent JSON message contains everything it should.
If nothing helps (checking the sent messages, checking the handling in the receiving browser/operating system), I believe it would be best to ask in the community for the client-side library you're using, or open a support ticket with Firebase directly at https://firebase.google.com/support
🤞


Check if all strings will be translated

also default values in forms

@normanjaeckel The info_text is translated in django.po but the rest api sends always the English string.
https://github.com/OpenSlides/OpenSlides/blob/master/openslides/users/views.py#L259

see #1928 (first part)
still open: translate workflow names in motion form

translation workflows now done in #1928.

@normanjaeckel ping (see info_text message)


Expect json input separated by STX, fix #43

So we now exit if we get invalid input which means either a parse failure or some random stuff between a parse and a separator. in particular that means that each message must be followed by a separator directly which seems reasonable to me.

Updated the error handling, I chose to for an empty string as the plugin name since we don't have anything reasonable to use.

Hmm... is this one way only? I mean, does HIE also produce json-stream that is \STX separated?
I think both ways streaming should look the same and use same separator character (if any). Note that HIE might also accidentally spit garbage to stdout because it is pretty easy to do this in Haskell while coding a plugin, or when a plugin calls an external executable.

@gracjan It would be great if you could figure out why this is failing on travis. The tests ran through flawlessly locally.