Pick up - resources

Hi,
I have one comment about the "pick up" function. It is a very cool function, but when I pick up only one item (not a building) then I have to pay an extra resource to place it again, so it is better to destroy and place than to pick up because of the resource cost.
A good improvement would be to add a key that would cancel the "pick up" mode and place the item in its original place.

This is mostly meant as a creative mod (with no cost). I will add this todo list but will be a low priority.


Move to a more modern implementation of subsample scale image view

https://github.com/naveensingh/subsampling-scale-image-view  This is a fork of tibbi's project which was a fork of davemorrissey's project - I know davemorrissey's project is no longer maintained, not sure if tibbi's will end up that way after the sale of Simple Mobile Tools, probably best to stick with naveensingh's since he's stated he will maintain forks of SMT. Credit all three in the Apache license.
Seems to have rotation support built in and it was ported to Kotlin. I should fork that repo, copy over my changes from the older repo and update the Photo Maps tool to use it, and opt into the rotation at a later point (unless it is easy to do)

Might be superceded by #1345


fix: golden tests don't work with test optimisation flag

Description
Testing goldens don't work when using the test optimisation. It throws an error, only work around at the moment is not using optimisation.
Steps To Reproduce

Write a test with a golden in it.
Run very_good test --update-goldens
Run very_good test --optimization
See error

Expected Behavior
That I can run my golden tests while utilising test optimisation.
Additional Context
Running "flutter test" in /Users/wolfen/Projects/some_project...
✓ Optimizing tests (5.0s)
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: one widget whose rasterized image matches golden image "golden/my_component.png"
  Actual: _WidgetPredicateFinder:<exactly one widget with widget matching predicate (Closure:
(Widget) => bool) (ignoring offstage widgets): GameWidget<TestGame>(state:
_GameWidgetState<TestGame>#11074)>
   Which: Could not be compared against non-existent file: "golden/my_component.png"

When the exception was thrown, this was the stack:
#0      fail (package:test_api/src/expect/expect.dart:137:31)
#1      _expect.<anonymous closure> (package:test_api/src/expect/expect.dart:112:9)
<asynchronous suspension>
<asynchronous suspension>
(elided 6 frames from dart:async and package:stack_trace)

The test description was:
  renders correctly
════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed. See exception logs above.
The test description was: renders correctly
components_my_component_test_dart MyComponent renders correctly /Users/wolfen/Projects/some_project/test/.test_runner.dart (FAILED)
00:04 +1 -1: Some tests failed.

Hey @wolfenrain,
the problem is that the goldenFileComparator looks for the golden files relative from the file containing the golden test. So if you run a golden test from the file /Users/me/my_flutter_project/test/features/foo/foo_golden_test.dart which uses a something like matchesGoldenFile('golden/foo.png') or the goldenTest method from the Alchemist package, the goldenFileComparator will look for the file under /Users/me/my_flutter_project/test/features/foo/golden/foo.png.
Now when you use the test optimization, all tests are executed from Users/me/my_flutter_project/test/.test_runner.dart. Thus, the goldenFileComparator will search for the golden file relative from the .test_runner.dart file instead of relative from the original foo_golden_test.dart. So it wrongly expects the golden file to be at /Users/me/my_flutter_project/test/golden/foo.png instead of /Users/me/my_flutter_project/test/features/foo/golden/foo.png.
I found a pretty nifty workaround to fix this: when running with test optimization, change the implementation of goldenFileComparator so it knows about the implications of the optimization and returns the correct paths of the golden files. Concretely this means adding the following code to the generated .test_runner.dart:
import 'dart:io';

import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart';

// ... imports of all tests ...

class _TestOptimizationAwareGoldenFileComparator extends LocalFileComparator {
  final List<String> goldenFiles;

  _TestOptimizationAwareGoldenFileComparator()
      : goldenFiles = Directory.fromUri(
                (goldenFileComparator as LocalFileComparator).basedir)
            .listSync(recursive: true, followLinks: true)
            .whereType<File>()
            .map((file) => file.path)
            .where((path) => path.endsWith('.png'))
            .toList(),
        super(_getTestFile());

  static Uri _getTestFile() {
    final basedir =
        (goldenFileComparator as LocalFileComparator).basedir.toString();
    return Uri.parse("$basedir/.test_runner.dart");
  }

  @override
  Uri getTestUri(Uri key, int? version) {
    final keyString = fromUri(key);
    return Uri.parse(goldenFiles
        .singleWhere((goldenFilePath) => goldenFilePath.endsWith(keyString)));
  }
}

void main(){
  goldenFileComparator = _TestOptimizationAwareGoldenFileComparator();
  // ... execution of all tests ..
}

Hey @wolfenrain,
the problem is that the goldenFileComparator looks for the golden files relative from the file containing the golden test. So if you run a golden test from the file /Users/me/my_flutter_project/test/features/foo/foo_golden_test.dart which uses a something like matchesGoldenFile('golden/foo.png') or the goldenTest method from the Alchemist package, the goldenFileComparator will look for the file under /Users/me/my_flutter_project/test/features/foo/golden/foo.png.
Now when you use the test optimization, all tests are executed from Users/me/my_flutter_project/test/.test_runner.dart. Thus, the goldenFileComparator will search for the golden file relative from the .test_runner.dart file instead of relative from the original foo_golden_test.dart. So it wrongly expects the golden file to be at /Users/me/my_flutter_project/test/golden/foo.png instead of /Users/me/my_flutter_project/test/features/foo/golden/foo.png.
I found a pretty nifty workaround to fix this: when running with test optimization, change the implementation of goldenFileComparator so it knows about the implications of the optimization and returns the correct paths of the golden files. Concretely this means adding the following code to the generated .test_runner.dart:
import 'dart:io';

import 'package:flutter_test/flutter_test.dart';
import 'package:path/path.dart';

// ... imports of all tests ...

class _TestOptimizationAwareGoldenFileComparator extends LocalFileComparator {
  final List<String> goldenFiles;

  _TestOptimizationAwareGoldenFileComparator()
      : goldenFiles = Directory.fromUri(
                (goldenFileComparator as LocalFileComparator).basedir)
            .listSync(recursive: true, followLinks: true)
            .whereType<File>()
            .map((file) => file.path)
            .where((path) => path.endsWith('.png'))
            .toList(),
        super(_getTestFile());

  static Uri _getTestFile() {
    final basedir =
        (goldenFileComparator as LocalFileComparator).basedir.toString();
    return Uri.parse("$basedir/.test_runner.dart");
  }

  @override
  Uri getTestUri(Uri key, int? version) {
    final keyString = fromUri(key);
    return Uri.parse(goldenFiles
        .singleWhere((goldenFilePath) => goldenFilePath.endsWith(keyString)));
  }
}

void main(){
  goldenFileComparator = _TestOptimizationAwareGoldenFileComparator();
  // ... execution of all tests ..
}

Thanks for taking the time to investigate and for sharing your solution! We'll try to address this soon 👍

This got accidentally closed, reopening it as a few changes are still needed.


Write announcements for significant changes introduced in EF Core 2.0

This is an initial list of areas where an announcement might be useful. We will edit and update this list based on discussions within the team. We would also welcome feedback from anyone else who has used pre-release versions and has discovered something that would have been good for us to announce.
Discussed in triage and we will do one general announcement for impactful breaking changes and one general announcement for significant new features. Some very significant changes will have their own announcements.
Initial idea for process is:

People assigned below will write first draft as a comment on this issue.
We will then edit and when we're agreed it is ready we will check it off below.
Once everything is ready for a post, @divega will create the issue in Announcements and create the associated discussion issue.

[ ] Breaking changes

[x] Only 2.0 providers will work @ajcvickers
[x] Provider design-time packages removed @bricelam
[ ] Link to .NET Standed 2.0/No UWP yet/4.6.1 required @divega
[ ] Link to Throw for ignored includes @divega
[ ] Link to Design-time context discovery @divega
[x] Logging event IDs and payloads have changed @ajcvickers
[x] One-model-per-provider--metadata API changes #7166 @ajcvickers
[x] Don't call AddEntityFrameworkXxx or UseInternalServiceProvider @ajcvickers
[x] UseInMemoryDatabase changes #7482 @ajcvickers
[x] Read-only/store generated metadata changes #7913 #7914 @ajcvickers
[x] Cascade delete API #8654 @ajcvickers

[ ] Features

[x] Owned types and how they relate to complex types @AndriySvyryd
[x] Table splitting @AndriySvyryd
[x] Model-level query filters @anpete
[x] Attach now works consistently--easier to attach a graph when using generated keys #6990 @ajcvickers
[x] Context pooling and compiled queries @anpete
[ ] EntityTypeConfiguration @divega
[x] EF Functions @divega, @pmiddleton?
[x] String interpolation in FromSql, etc. #8557 @anpete

[x] Throw for ignored includes (include that it can be configured to not throw) @anpete
[x] Design-time DbContext discovery changes (BuildWebHost, IDbContextFactory, etc.) @bricelam

Initial drafts for my breaking change sections
EF Core 2.0 requires a 2.0 database provider
For EF Core 2.0 we have made many simplifications and improvements in the way database providers work. This means that 1.0.x and 1.1.x providers will not work with EF Core 2.0.
The SQL Server and SQLite providers are shipped by the EF team and 2.0. versions will be available as part of the 2.0 release. The open-source third party providers for SQL Compact, PostgreSQL, and MySQL are being updated for 2.0. For all other providers, please contact the provider writer.
Logging and Diagnostics events have changed
Note: these changes should not impact most application code.
The event IDs for messages sent to an ILogger have changed in 2.0. The event IDs are now unique across EF Core code. These messages now also follow the standard pattern for structured logging used by, for example, MVC.
Logger categories have also changed. There is now a well-known set of categories accessed through DbLoggerCategory.
DiagnosticSource events now use the same event ID names as the corresponding ILogger messages. The event payloads are all nominal types derived from EventData.
Event IDs, payload types, and categories are documented in the CoreEventId and the RelationalEventId classes.
EF Core relational metadata API changes
EF Core 2.0 will now build a different IModel for each different provider being used. This is usually transparent to the application. This has facilitated a simplification of lower-level metadata APIs such that any access to common relational metadata concepts is always made through a call to .Relational instead of .SqlServer, .Sqlite, etc. For example, 1.1.x code like this:
var tableName = context.Model.FindEntityType(typeof(User)).SqlServer().TableName;

Should now be written like this:
var tableName = context.Model.FindEntityType(typeof(User)).Relational().TableName;

Instead of using methods like ForSqlServerToTable, extension methods are now available to write conditional code based on the current provider in use. For example:
modelBuilder.Entity<User>().ToTable(
    Database.IsSqlServer() ? "SqlServerName" : "OtherName");

Note that this change only applies to APIs/metadata that is defined for all relational providers. The API and metadata remains the same when it is specific to only a single provider. For example, clustered indexes are specific to SQL Sever, so ForSqlServerIsClustered and  .SqlServer().IsClustered() must still be used.
Don’t take control of the EF service provider
EF Core uses an internal IServiceProvider (D.I. container) for its internal implementation. Applications should allow EF Core to create and manage this provider except in special cases. Strongly consider removing any calls to UseInternalServiceProvider. If an application does need to call UseInternalServiceProvider, then please consider filing an issue so we can investigate other ways to handle your scenario.
Calling AddEntityFramework, AddEntityFrameworkSqlServer, etc. is not required by application code unless UseInternalServiceProvider is also called. Remove any existing calls to AddEntityFramework or AddEntityFrameworkSqlServer, etc. AddDbContext should still be used in the same way as before.
In-memory databases must be named
The global unnamed in-memory database has been removed and instead all in-memory databases must be named. For example:
optionsBuilder.UseInMemoryDatabase("MyDatabase");

This creates/uses a database with the name “MyDatabase”. If UseInMemoryDatabase is called again with the same name, then the same in-memory database will be used, allowing it to be shared by multiple context instances.
Read-only API changes
IsReadOnlyBeforeSave, IsReadOnlyAferSave, and IsStoreGeneratedAlways have been obsoleted and replaced with BeforeSaveBehavior and AfterSaveBhevaior. These behaviors apply to any property (not only store-generated properties) and determine how the value of the property should be used when inserting into a database row (BeforeSaveBehavior) or when updating an existing database row (AfterSaveBehavior).
Properties marked as ValueGenerated.OnAddOrUpdate (e.g. for computed columns) will by default ignore any value currently set on the property. This means that a store-generated value will always be obtained regardless of whether any value has been set or modified on the tracked entity. This can be changed by setting a different Before\AfterSaveBehavior.
New ClientSetNull delete behavior
In previous releases, DeleteBehavior.Restrict had a behavior for entities tracked by the context that more closed matched SetNull semantics. In EF Core 2.0, a new ClientSetNull behavior has been introduced as the default for optional relationships. This behavior has SetNull semantics for tracked entities and Restrict behavior for databases created using EF Core. In our experience, these are the most expected/useful behaviors for tracked entities and the database. DeleteBehavior.Restrict is now honored for tracked entities when set for optional relationships.

You'll want to fix the spelling of AfterSaveBhevaior in the Read-only Api Changes section.

@DannyMeister Thanks.

Provider design-time packages removed
The Microsoft.EntityFrameworkCore.Relational.Design package has been removed. It's contents were consolidated into Microsoft.EntityFrameworkCore.Relational and Microsoft.EntityFrameworkCore.Design.
This propagates into the provider design-time packages. Those packages (e.g. Microsoft.EntityFrameworkCore.Sqlite.Design, Microsoft.EntityFrameworkCore.SqlServer.Design) were removed and their contents consolidated into the main provider packages.
To enable Scaffold-DbContext or dotnet ef dbcontext scaffold in EF Core 2.0, you only need to reference the single provider package:
 <ItemGroup>
   <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer"
                     Version="2.0.0-preview2-final" />
-  <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design"
-                    Version="2.0.0-preview2-final"
-                    PrivateAssets="All" />
   <PackageReference Include="Microsoft.EntityFrameworkCore.Tools"
                     Version="2.0.0-preview2-final"
                     PrivateAssets="All" />
   <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
                           Version="2.0.0-preview2-final" />
 </ItemGroup>

Brice, I find it slightly confusing that you have mentioned a non-existing package in the sample csproj file, despite the coloring

Agreed. I was hoping it would strike through the lines. Might need to find a better way to communicate. XML comments?

EF Core design-time DbContext discovery changes
There have been some changes made in 2.0 to the way EF Core discovers and creates your DbContext at design-time.
New way of getting application services
The reccommended pattern for ASP.NET Core web applications has been updated for 2.0 in a way that broke EF Core's design-time logic. Previously at design-time, EF Core would try to invoke Startup.ConfigureServices directly in order to access the application's service provider. In ASP.NET 2.0, Configuration is initialized outside of the Startup class. Applications using EF Core typically access their connection string from Configuration, so Startup by itself is no longer sufficient. If you upgrade an ASP.NET Core 1.x application, you may recieve the following error when using the EF Core tools.

No parameterless constructor was found on 'ApplicationContext'. Either add a parameterless constructor to 'ApplicationContext' or add an implementation of 'IDesignTimeDbContextFactory<ApplicationContext>' in the same assembly as 'ApplicationContext'

A new design-time hook has been added in ASP.NET Core 2.0. The static Program.BuildWebHost method enables EF Core to access the application's service provider at design time. If you are upgrading an ASP.NET Core 1.x application, you will need to update you Program class to resemble the following.
public class Program
{
    public static void Main(string[] args)
    {
        var host = BuildWebHost(args);

        host.Run();
    }

    public static IWebHost BuildWebHost(string[] args) =>
        new WebHostBuilder()
            .UseKestrel()
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseIISIntegration()
            .UseStartup<Startup>()
            .Build();
}

IDbContextFactory renamed
In order to support diverse application patterns and give users more controle over how their DbContext is used at design time, we have, in the past, provided the IDbContextFactory<TContext> interface. At design-time, the EF Core tools will discover implementations of this interface in your project and use it to create DbContext objects.
This interface had a very general name which mislead some users to try re-using it for other DbContext-creating scenarios. They were caught offguard when the EF Tools then tried to use their implementation at design-time and caused commands like Update-Database or dotnet ef database update to fail.
In order to communicate the strong design-time semantics of this interface, we have renamed it to IDesignTimeDbContext<TContext>.
DbContextFactoryOptions removed
Because of all the ASP.NET Core changes described above, we found that DbContextFactoryOptions was no longer needed on the new IDesignTimeDbContext<TContext> interface. Here are the alternatives you should be using instead.

Old property
New alternative

DbContextFactoryOptions.ApplicationBasePath
AppContext.BaseDirectory

DbContextFactoryOptions.ContentRootPath
Directory.GetCurrentDirectory()

DbContextFactoryOptions.EnvironmentName
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")

Model-level query filters
EF Core 2.0 includes a new feature we call Model-level query filters. This feature allows LINQ query predicates (a boolean expression typically passed to the LINQ Where query operator) to be defined directly on Entity Types in the metadata model (usually in OnModelCreating). Such filters are automatically applied to any LINQ queries involving those Entity Types, including Entity Types referenced indirectly, such as through the use of Include or direct navigation property references. Some common applications of this feature are:

Soft delete - An Entity Types defines an IsDeleted property.
Multi-tenancy - An Entity Type defines a TenantId property.

Here is a simple example demonstrating the feature for the two scenarios listed above:
public class BloggingContext : DbContext
{
    public DbSet<Blog> Blogs { get; set; }
    public DbSet<Post> Posts { get; set; }

    public int TenantId {get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Post>().HasQueryFilter(p => !p.IsDeleted && p.TenantId == this.TenantId );
    }
}

We define a model-level filter that implements multi-tenancy and soft-delete for instances of the Post Entity Type. Note the use of a DbContext instance level property: TenantId. Model-level filters will use the value from the correct context instance. I.e. the one that is executing the query.
Filters may be disabled for individual LINQ queries using the IgnoreQueryFilters() operator.
Limitations

Navigation references are not allowed. This feature may be added based on feedback.
Filters must currently be defined on the root Entity Type of a hierarchy.

DbContext pooling and explicit compiled queries
In EF Core 2.0 we added two new opt-in performance features designed to offer benefits in high-scale scenarios.
DbContext pooling
The basic pattern for using EF Core in an ASP.NET Core application usually involves registering a custom DbContext type into the dependency injection system and later obtaining instances of that type through constructor parameters in controllers. This means a new instance of the DbContext is created for each requests.
In version 2.0 we are introducing a new way to register custom DbContext types in dependency injection which transparently introduces a pool of reusable DbContext instances. To use DbContext pooling, use the AddDbContextPool instead of AddDbContext during service registration:
services.AddDbContextPool<BloggingContext>(options => options.UseSqlServer(connectionString));

If this method is used, at the time a DbContext instance is requested by a controller we will first check if there is an instance available in the pool. Once the request processing finalizes, any state on the instance is reset and the instance is itself returned to the pool.
This is conceptually similar to how connection pooling operates in ADO.NET providers and has the advantage of saving some of the cost of initialization of DbContext instance.
The new method introduces a few limitations on what can be done in the OnConfiguring() method of the DbContext but it can be adopted by many ASP.NET Core applications to obtain a performance boost.
Explicit compiled queries
Manual or explicitly compiled query APIs have been available in previous versions of EF and also in LINQ to SQL to allow applications to cache the translation of queries so that they can be computed only once and executed many times.
Although in general EF Core can automatically compile and cache queries based on a hashed representation of the query expressions, this mechanism can be used to obtain a small performance gain by bypassing the computation of the hash and the cache lookup, allowing the application to use an already compiled query through the invocation of a delegate.
// Create an explicit compiled query
private static Func<CustomerContext, int, Customer> _customerById =
    EF.CompileQuery((CustomerContext db, int id) =>
        db.Customers
            .Include(c => c.Address)
            .Single(c => c.Id == id));

// Use the compiled query by invoking it
using (var db = new CustomerContext())
{
   var customer = _customerById(db, 147);
}

String interpolation in FromSql and ExecuteSqlCommand
C# 6 introduced String Interpolation, a feature that allows C# expressions to be directly embedded in string literals, providing a nice way of building strings at runtime. In EF Core 2.0 we added special support for interpolated strings to our two primary APIs that accept raw SQL strings: FromSql and ExecuteSqlCommand. This new support allows C# string interpolation to be used in a 'safe' manner. I.e. in a way that protects against common SQL injection mistakes that can occur when dynamically constructing SQL at runtime.
Here is an example:
var city = "London";
var contactTitle = "Sales Representative";

using (var context = CreateContext())
{
    context.Set<Customer>().FromSql($@"SELECT * FROM ""Customers"" WHERE ""City"" = {city} AND ""ContactTitle"" = {contactTitle}").ToArray();
}

In this example, there are two variables embedded in the SQL format string. EF Core will produce the following SQL:
@p0='London' (Size = 4000)
@p1='Sales Representative' (Size = 4000)

SELECT * FROM ""Customers"" WHERE ""City"" = @p0 AND ""ContactTitle"" = @p1

@pmiddleton If you are interested in writing the announcement post for DbFunctions, you can write it here. Up to you, but I thought I would give you the option 😄

I'll take a crack at it.

How about: EF Core 2.0 no longer works with .NET 4.5.1, but requires 4.6.1 ?

(Added a comment about .NET Framework 4.6.1 to the .NET Standed 2.0 item.)

Attach can track a graph of new and existing entities
EF Core supports automatic generation of key values through a variety of mechanisms. When using this feature, a value is generated if the key property is the CLR default--usually zero or null. This means that a graph of entities can be passed to DbContext.Attach or DbSet.Attach and EF Core will mark those entities that have a key already set as Unchanged while those entities that do not have a key set will be marked as Added. This makes it easy to attach a graph of mixed new and existing entities when using generated keys. DbContext.Update and DbSet.Update work in the same way, except that entities with a key set are marked as Modified instead of Unchanged.

Warning as error for ignored Includes
A very common issue we see when looking at user LINQ queries is the use of Include where it is unnecessary. The typical pattern usually looks something like this:
context.Orders.Include(o => o.Product).Where(o => o.Product.Name == "Baked Beans").Select(o =>o.ProductId).ToList();

One might assume that the Include operation here is required because of the reference to the Product navigation property in the Where and Select  operations. However, in EF, these two things are orthogonal: Include controls which navigation properties are loaded in entities returned in the final results, and our LINQ translator can directly translate expressions involving navigation properties.
Previously we would generate a warning when we encountered queries like this, but in EF Core 2.0 we are changing the default WarningBehavior for this event to Throw. We are doing this primarily in the hopes of promoting a better understanding of the role that the Include operator plays in EF Core LINQ queries.
That said, it is easy to configure EF Core to use the previous, non-throwing behavior via our flexible 'warnings-as-errors' configuration system.
// In OnConfiguring or AddDbContext during start-up
optionsBuilder.ConfigureWarnings(w => w.Log(CoreEventId.IncludeIgnoredWarning)); // Log but don't throw

@AndriySvyryd Can you work on your sections today--then we can hand off to @divega.

I didn't have time this weekend to work my section.  I will tonight, but if there is a close deadline someone else can take it.

Table splitting
It is now possible to map two or more entity types to the same table where the primary key column(s) will be shared and each row will correspond to two or more entities.
To use table splitting an identifying relationship (where foreign key properties form the primary key) must be configured between all of the entity types sharing the table:
modelBuilder.Entity<Product>()
    .HasOne(e => e.Details).WithOne(e => e.Product)
    .HasForeignKey<ProductDetails>(e => e.Id);
modelBuilder.Entity<Product>().ToTable("Products");
modelBuilder.Entity<ProductDetails>().ToTable("Products");

Owned types
An owned entity type can share the same CLR type with another owned entity type, but since it cannot be identified just by the CLR type there must be a navigation to it from another entity type. The entity containing the defining navigation is the owner. When querying the owner the owned types will be included by default.
By convention a shadow primary key will be created for the owned type and it will be mapped to the same table as the owner by using table splitting. This allows to use owned types similarly to how complex types are used in EF6:
modelBuilder.Entity<Order>().OwnsOne(p => p.OrderDetails, cb =>
    {
        cb.OwnsOne(c => c.BillingAddress);
        cb.OwnsOne(c => c.ShippingAddress);
    });

private class Order
{
    public int Id { get; set; }
    public OrderDetails OrderDetails { get; set; }
}

private class OrderDetails
{
    public Address BillingAddress { get; set; }
    public Address ShippingAddress { get; set; }
}

private class Address
{
    public string Street { get; set; }
    public string City { get; set; }
}

Here is a write up for EF Functions.  The fluent api registration mentioned below has not been accepted via PR #8953 so if that code changes we will need to update the registration instructions here.
Please modify the wording as you see fit, or let me know if anything needs to be altered for clarification.
EF Functions
In EF Core 2.0 we added the ability to map methods to User-Defined Scalar Functions which can then be used when querying the database.
To map a UDF you must first declare and register a method.  This can be done in two ways.  You can declare a static method on your DbContext and use the DbFunctionAttribute to tag the method.
public class BloggingContext : DbContext
{
    [DbFunction]
    public static int PostReadCount(int blogId)
    {
        throw new Exception() ;
    }
}

Alternatively you can use the fluent api to register a method regardless of the class it is defined on.

public class DbUserDefinedMethods
{
    public static int PostReadCount(int blogId)
    {
        throw new Exception() ;
    }
}

public class BloggingContext : DbContext
{
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.HasDbFunction(() => DbUserDefinedMethods.PostReadCount(default(int)));
    }
}

Once a method has been registered you can use it in your queries select, order by, and where clauses.
     from p in context.Posts
     where BloggingContext.PostReadCount(p.Id) > 5

A few things to note.

By default the name of the method is used as the name of the UDF function when generating the query sql.  You can change the UDF name and schema during method registration.
Only scalar functions are supported.
You must create the mapped UDF in the database.
When using the fluent api the method being registered will not be executed.  However a full method call with default parameter values must be made.  Alternatively the fluent api also accepts a MethodInfo for registration.
For advanced mapping scenarios a custom translation can be provided by using the fluent api.

@divega I think all the submissions have come in now, so assigning to you to put it all together. Please bring others back as needed to make changes or add new info.

@ajcvickers working on it from yesterday, but I will get the blog post done first.

Throw for ignored includes is wrong. What if I need that additional data from include!?
Ex:
var query = from item in _dataContext.Forms.Include(x => x.Localizeds)
orderby item.DisplayOrder
where item.Status == PublishStatus.Published
select item;
return query.AsNoTracking().ToListAsync();
This will throw error because it detects that x.Localizeds is not needed. (maybe is not implemented correctly ). Or how the code will detect that I do not need include data later in UI for example!?
Also better it should let developer opt-in for throw error that opt-out for it in optionsBuilder.ConfigureWarnings.

@aghe Your example query will not generate the error because Localizeds is reachable from the final result of the query (item).

@aghe I responded with the same information to your comment in the blog post as well. There is now an announcement post with more details, hopefully it will be clearer. If you have any more feedback on this, I encourage you to post to the announcement's discussion thread. Thanks.

@AndriySvyryd re the owned types example code, is it supposed to just work as is in preview 2? I actually get an error:

System.InvalidOperationException occurred
HResult=0x80131509
Message=Cannot use table 'Orders' for entity type 'Order.OrderDetails#OrderDetails.BillingAddress#Address' since it is being used for entity type 'Order' and there is no relationship between the primary key {'OrderDetailsOrderId'} and the primary key {'Id'}.
Source=
StackTrace:
at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateSharedTableCompatibility(IEntityType newEntityType, List`1 otherMappedTypes, String tableName)
at Microsoft.EntityFrameworkCore.Internal.SqlServerModelValidator.ValidateSharedTableCompatibility(IEntityType newEntityType, List`1 otherMappedTypes, String tableName)
at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.ValidateSharedTableCompatibility(IModel model)
at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model)
at Microsoft.EntityFrameworkCore.Internal.SqlServerModelValidator.Validate(IModel model)
at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.<>c__DisplayClass5_0.b__0(Object k)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.b__7_1(IServiceProvider p)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactoryService(FactoryService factoryService, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass17_0.b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
at Microsoft.EntityFrameworkCore.DbContext.get_Model()
at ConsoleApp2.Program.Main(String[] args) in C:\Users\divega\Downloads\Backup\SelectTest\SelectTest\ConsoleApp2\Program.cs:line 11

@divega This was fixed post preview2, as a workaround you can rename the navigations to change the order. I can send you the fixed sample.

@AndriySvyryd Thanks. Glad to hear. It would be great if you can either give me a fixed example or more information about the workaround (I tried what I understood by "rename the navigation to change the order", but didn't help). I would like to update the preview2 announcement blog post with code that works, or otherwise add a disclaimer that this won't work correctly until RTM.

@divega Renaming Address to StreetAddress works. Updated the comment above.

@AndriySvyryd I tried out the Owner Types in Preview2 with the following classes:
public class ParentClass {
    [Required]
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid Id { get; set; }

    public virtual OwnedClass Ref { get; set; }
}

public class OwnedClass
{
    public string Field1 { get; set; }
    public string Field2 { get; set; }
}

and the following Mapping:
modelBuilder.Entity<ParentClass>()
    .OwnsOne<OwnedClass>(s => s.Ref, cb =>
    {
        cb.Property(c => c.Field1).HasColumnName("OwnedField1");
        cb.Property(c => c.Field2).HasColumnName("OwnedField2");
    });

Although it is stated above that when querying the owner (ParentClass) the owned types will be included by default, in my tests I have to explicitly include the "Ref" property. In this case loading works, however I ran into a few problems:

When I load a ParentClass with an OwnedClass and set the "Ref" property to null, saving the ParentClass fails.
When I try to delete a ParentClass item it throws an error of the ChangeTracker with a KeyNotFoundException.

Are these issues known in Preview 2?

@arjenvrh The navigations are not included automatically in preview2, however the other issue was not known, I filed it separately as https://github.com/aspnet/EntityFramework/issues/9086

@AndriySvyryd Thanks, that was quick! Another question regarding owned types: is it possible to define a custom index over the columns in the owned type?
Something like this:
modelBuilder.Entity<ParentClass>()
    .OwnsOne<OwnedClass>(s => s.Ref, cb =>
    {
        cb.Property(c => c.Field1).HasColumnName("OwnedField1");
        cb.Property(c => c.Field2).HasColumnName("OwnedField2");
    });

modelBuilder.Entity<ParentClass>()
    .HasIndex(s => new { s.Ref.Field1, s.Ref.Field2 }).HasName("IDX_CustomName");

@arjenvrh You can just create the index in the owned type configuration.
modelBuilder.Entity<ParentClass>()
    .OwnsOne<OwnedClass>(s => s.Ref, cb =>
    {
        cb.Property(c => c.Field1).HasColumnName("OwnedField1");
        cb.Property(c => c.Field2).HasColumnName("OwnedField2");
        cb.HasIndex(s => new { s.Field1, s.Field2 }).HasName("IDX_CustomName");
    });

However we don't support creating indexes that span across types, but if that's important for your scenario file it as a separate issue.

This was all added to the documentation page at https://docs.microsoft.com/en-us/ef/core/what-is-new/index on time for 2.0. Only created announcements for the specially controversial decisions in which we needed to actively seek the most feedback.


Add services catalog commands

Closes: https://github.com/manifoldco/engineering/issues/3056
I've started moving the api commands to the api pkg, in the near future we could move all fns currently in clients to there.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@jeffandersen can I get another look?


Spurious refs/tags/0.9.0^{}

👓 What did you see?
Pushing a singed tag to github and using git ls-remote --tags results in an extra ^{} tag. This breaks the up-to-date check.
mpkorstanje@Nyx:~/Projects/cucumber/polyglot-release$ git push --tags
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 545 bytes | 545.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:cucumber/polyglot-release.git
 * [new tag]         0.9.0 -> 0.9.0
mpkorstanje@Nyx:~/Projects/cucumber/polyglot-release$ git ls-remote --tags
From git@github.com:cucumber/polyglot-release.git
fab2cb1ddf3169bc8341aeb1a8ff402f6f850c03        refs/tags/0.9.0
b51fbc727fc569d4fbfc1435aef6ea8f24de2514        refs/tags/0.9.0^{}

Fixed by https://github.com/cucumber/polyglot-release/commit/5ea7670bf693210eb3beae6bd41f8562feebc727


do not use invoice mocks for regtest tests

don't use mock invoice for real wallet tests inside regtest

introduced is_regtest variable into test/helpers.py
fixed tests for bleskomat
test_pay_invoice_adminkey added regtest if
use logger.error for failed backend payments

Codecov Report

Merging #855 (7c3ec89) into main (05edd90) will decrease coverage by 11.08%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main     #855       +/-   ##
===========================================
- Coverage   50.76%   39.67%   -11.09%
===========================================
  Files         218      218
  Lines       11981    11981
===========================================
- Hits         6082     4754     -1328
- Misses       5899     7227     +1328

Impacted Files
Coverage Δ

lnbits/core/services.py
53.21% <0.00%> (-0.59%)
:arrow_down:

lnbits/wallets/lnd_grpc_files/router_pb2.py
0.00% <0.00%> (-61.91%)
:arrow_down:

lnbits/wallets/lnd_grpc_files/lightning_pb2.py
0.00% <0.00%> (-54.65%)
:arrow_down:

lnbits/wallets/lnd_grpc_files/router_pb2_grpc.py
0.00% <0.00%> (-52.03%)
:arrow_down:

...nbits/wallets/lnd_grpc_files/lightning_pb2_grpc.py
0.00% <0.00%> (-50.48%)
:arrow_down:

lnbits/wallets/lndgrpc.py
19.40% <0.00%> (-24.63%)
:arrow_down:

lnbits/wallets/lndrest.py
17.69% <0.00%> (-19.47%)
:arrow_down:

lnbits/wallets/cln.py
22.11% <0.00%> (-12.51%)
:arrow_down:

lnbits/db.py
80.80% <0.00%> (-9.61%)
:arrow_down:

lnbits/wallets/macaroon/macaroon.py
27.53% <0.00%> (-5.80%)
:arrow_down:

... and 3 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

I think we have to solve this differently. See here for an example of how to check for conditions in tests. I've tried resetting mocks in conftest but they aren't saved globally.
Closing for now until we find a good way to reset the mocks in different conditions, hope that's ok!

ok i'm fine with it, i have no idea yet and how we should do it


Selecting network interface counters

I would like to add performance counters for network interfaces, but it seems every server has a different NIC driver and NIC name.  So the performance counters are for all intents and purposes, uniquely named.  To my mind there are three ways forward

Wildcard feature.  Put in a "*" for instance, and it iterates through them all
Some way of detecting the active NIC and using that instance
As above, but checking for a NIC which is domain joined and using that instance

I found some useful code at the end of this post, it feels like it could be useful for this but it's a bit beyond my newbie C# kills to implement.
http://stackoverflow.com/questions/8657470/how-to-know-the-network-bandwidth-used-at-a-given-time#8666726

This should be doable
Might be a bit much complexity here. Carbonator would still report metrics, for example, the bytes in/out would just be 0.
Seems like it may be much for carbonator again, but perhaps you can adjust that in your metric path to suit your needs.

Something to keep in mind: carbonator is designed to be agnostic to whatever performance counters you intend to use with it. It serves more like 'glue logic' between Windows Performance Counters and Carbon/Graphite; so I aim to keep it as simple as that ;-)

works for me, and fits in with issue #5

Closed as duplicate of #5


Storage.writer(...) breaks the idea of 'generation'

Is your feature request related to a problem? Please describe.
I have an app that uploads a chunk of data to GCS, load that into BigQuery, and then delete this file from GCS. It does so many, many times over a period of time. Pseudo code below:
while(true) {
  try (var w=storage.writer(blobInfo)) {
    writeTo(w);
  }
  loadtoBQ();
  storage.delete(blobInfo.getBlobId());
}

I noticed that, some delete calls seem to sporadically fail with 503 service unavailable. The error message suggests those errors are transitory and I should retry that. In looking at the GCS storage library code, I noticed that there's a built-in retry mechanism to transparently handle this kind of situation, it treats delete as idempotent operation if the generation match requirement is given (see HttpRetryAlgorithmManager.getForObjectsDelete(). That makes sense!
Except, there's no way to actually capture the generation of my write. I can see that internally, the writer returned is BlobWriteChannel and its storageObject property represents the BlobInfo of a newly written blob, including the generation. That is how a method like Storage.create() can reliably return the Blob object that represents the state at the point of creation. But there seems to be no way to access the same information with the writer(...) methods. I consider this a library design problem.
Describe the solution you'd like
Storage.writer(...) should return a subtype of WriteChannel that can return Blob after its close method is invoked.
Describe alternatives you've considered
Call Storage.getBlob(BlobId) after the write is done to obtain a fresh Blob from GCS separately. This risks the race condition.
Additional context
https://github.com/googleapis/java-storage/issues/691 appears to be somewhat related, in the sense that it also wants additional information beyond WriteChannel

In the next release (mid April, we're currently in a code freeze for Cloud Next) we will have a new experimental API that allows access to the resulting object for the upload.
This new API is called BlobWriteSession and can be dropped in with minimal change.
Your example would change to the following:
Storage storage = StorageOptions.http().build().getService();

BlobInfo info = BlobInfo.newBuilder("bucket", "object").build();

while (true) {
  // new experimental API
  BlobWriteSession session = storage.blobWriteSession(info); // create the upload session for the object
  ApiFuture<BlobInfo> resultInfo = session.getResult(); // a Future for the object created when the WritableByteChannel below is closed
  try (WritableByteChannel w = session.open()) { // open the channel for writing
    writeTo(w); // write to the channel the same as before
  }
  // get the object with generation from the future
  BlobInfo gen1 = resultInfo.get(5, TimeUnit.SECONDS);

  // issue the delete operation, now with a generation
  storage.delete(gen1.getBlobId());
}

We decided not to change WriteChannel or Storage#writer, because we also have other features that are configured on StorageOptions and influence the way BlobWriteSessions will work. When using the new BlobWriteSession (and it's default settings), it will perform the same retried resumable uploads that Storage#writer does.
While this is a new @BetaApi and theoretically could experience breaking changes, the Default settings are not at all likely to change (~98% confident the default settings won't change from what will be present in the next release). The primary possibility of breaking changes is for some of the other settings that can change the type of upload performed.

Version 2.37.0 was released last week with the necessary plumbing for this code sample to work. libraries-bom should be released this week if you use that for version resolution.


Master

要解决的问题 Describe the problem to be solved

要解决的Issue编号（可多个） Associated issue number (multiple)

pull


digitalmarketplace-utils dependency: bump to 43.0.0, remove any featureflags references

Trello https://trello.com/c/ZH9trgjH/419-snyk-alert-for-flask-010x-vulnerability
Again another app without much out of the ordinary.

This should work once ris-flask-0-12 branch on dmutils has been rebased onto master


Fixed.


Add more test for find

Codecov Report

Merging #841 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #841      +/-   ##
==========================================
+ Coverage   53.16%   53.18%   +0.01%
==========================================
  Files          39       39
  Lines        7339     7339
==========================================
+ Hits         3902     3903       +1
  Misses       2938     2938
+ Partials      499      498       -1

Impacted Files
Coverage Δ

xorm.go
70% <0%> (+1.66%)
:arrow_up:

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 cd46810...832e535. Read the comment docs.


Add support for injecting private properties

By setting the property autowirePrivateProperties=true your private
ILogger properties will be injected with the proper logger. This helps
reducing noise in the public api by keeping the logging facility private.

Thanks for the PR, Henning!
I think, seeing as this integration is essentially a single file, that it is probably better to just use a modified version to support this use case.
As I understand it, Autofac doesn't do private property injection, so I'd rather stick with the same basic feature set in this module.
Hope this makes sense, and thanks again.


404 error code is not available.

I can not throw custom 422 errors.
I would like to be able to throw new http404();

released on 2.4.0


Set orientation origin

Is there any function where we can set the orientation to origin as shown in http://diagnostics.myo.com?

an origin orientation is an offset...

There is nothing in the SDK as far as I know. If you would like to offset the origin, just apply the reverse transformation on the data you receive.

Hi @NiklasRosenstein, can you tell me how do I apply reverse transformation? I am kinda new with the lib, so it will be a great help if you could guide me.

In diagnostics.myo.com site, it's possible to send 0x05 command to Recalibrate Myos orientation sensors. https://developer.thalmic.com/forums/topic/2610/
It's not available from SDK


Virtualisation

FEAT_VHE, Virtualization Host Extensions: v8.1
FEAT_NV, Nested virtualization support: v8.3
FEAT_NV2, Enhanced nested virtualization support: v8.4

Learn the architecture - AArch64 virtualization

http://www.cs.columbia.edu/~cdall/pubs/isca2016-dall.pdf

https://hc33.hotchips.org/assets/program/conference/day1/20210818_Hotchips_NeoverseN2.pdf

https://hc33.hotchips.org/assets/program/conference/day1/HC2021.C1.4 Intel Arijit.pdf


When to use hitType rather than event with Google Tag Manager

This is a...

[ ] :beetle: Bug Report
[ ] :rocket: Feature Request
[x] :scroll: Documentation Request

Note: for support questions, please use stackoverflow with the redux-beacon tag. This repository's issues are reserved for feature requests and bug reports.
Which version of Redux Beacon are you using?

v

Which target(s) are you using?

[ ] Google Analytics
[ ] Google Analytics (gtag)
[ ] React Native Google Analytics
[x] Google Tag Manager
[ ] React Native Google Tag Manager
[ ] Amplitude
[ ] Segment
[ ] Other/Third Party: ...(please specify here)

:rocket: :scroll: What's missing from Redux Beacon that you'd like to add?
I'm referring to the page at https://rangle.gitbook.io/redux-beacon/targets/googletagmanager, and the lines:

Only event objects with an event property will trigger a Custom Event in Google Tag Manager.
If an event object doesn't have an event property, but has a hitType property, this target will create an event property and set it to the hitType string.

I'm wondering when and why you'd want to use the hitType property? Why not just use the event property always? I originally assumed perhaps a hitType property might not trigger a custom event, and may be a way of including an 'event' key without triggering an event. But it seems hitType will trigger the event. So, why does hitType exist?
Thanks for redux-beacon!
Can you help out?

[x] :star2: I am a legend and can get started on a pull request right away given the go-ahead.

If you think a change to documentation is needed I'm happy to submit the PR.

[ ] :star: I am a superstar and would like to help out given some guidance.
[ ] :disappointed: I won't be able to help out on this one.

Hey @joshuapaling, good question!

I'm wondering when and why you'd want to use the hitType property? Why not just use the event property always?

We added this so we could use the Google Analytics event definition helpers without having to make any changes/customizations: https://rangle.gitbook.io/redux-beacon/targets/googleanalytics#event-definitions.
Essentially we wanted to make Google Tag Manager + Google Analytics integrations as simple as possible. Down the road I'd like us to have a pre-built Google Tag Manager container for Google Analytics integrations. I've discussed the idea briefly here: https://github.com/rangle/redux-beacon/pull/255.
The goal is to make it as easy as:

Sign up for GA + GTM
Import the GTM Container
Setup @redux-beacon/google-tag-manager, and use event definitions from @redux-beacon/google-analytics

This is to make it easier to do Google Tag Manager + Google Analytics integrations.


Copilot generates test case using chai although I explicitly asked for mocha

Testing #208409

@dbaeumer please attach the copilot chat logs


[general-sdk] add support for Swift Package Manager

This is easiest for us to tackle on the rest-kit branch.

Use swift build --init to create the directory structure.
Update Package.swift to reflect name, dependencies, and targets.
Migrate the code to the new directory structure.

An initial Package.swift file was created with the v0.3.0 release, but we still need to add targets and test it with the Swift Package Manager.

Targets were added with #282. However, we will keep this ticket open until the release of Swift 3 when we can test it. (The Swift Package Manager has not been included in recent builds of Swift 2.2.)


Inconsistent Send vs SendMultiple vs NewMessage

While Send takes a Message it returns a *Message. Send uses SendMultiple which works on Message only. Internally, receive works on Messages only. I suggest to change the Send signature to return a Message and modify NewMessage accordingly.

An alternative approach would of course be to use pointer to message consistently throughout. That would make for simpler error return values (nil instead of Message{}).

Hm... good point.
Still thinking ... to be honest I tend to like pointer everywhere more. Both would be breaking changes, but I assume expect you only the cmd utility is used by others (at least as I know).

I know the difference had caused me quite a bit of confusion. I‘d be happy either way.

Thanks for the issue and PR... have to find time to do it the pointer way, but doesn't hurry for now.


Swaggering Initiative not applying properly

The prompt is still working as intended when initiative is rolled, but it should just always apply to initiative as it is a status bonus. Someone on the pf2e discord said it has a predicate, but I'm unsure what that means exactly.

I realize in the screenshot that Cooperative nature is also superseding it AND applying twice. Will show that in another issue.

Swaggering Initiative is a free action, so it does not apply unless the player uses the action.

Swaggering Initiative is a free action, so it does not apply unless the player uses the action.

I guess it is working as intended then. We will just have to toggle it on in initiative.

Swaggering Initiative is a free action, so it does not apply unless the player uses the action.

In which case a Roll Option rule element should be added to the feat to allow players to toggle it on in their action tab instead of having to do it manually each and every time.

Swaggering Initiative is a free action, so it does not apply unless the player uses the action.

In which case a Roll Option rule element should be added to the feat to allow players to toggle it on in their action tab instead of having to do it manually each and every time.

That is not how actions work; you choose whether or not to use the action at the time it would be called for. You are more than welcome to set a RollOption on your character(s) for it, but the system is not going to add that.

I think we can add a toggle for it.

That was quick. I was about to submit my own PR 🤣


Update VITO Remote Sensing URL

Please update URL of VITO Remote Sensing to https://remotesensing.vito.be/
(which is a more direct/relevant reference than https://vito.be/en)

Updated, thank you!


add docker file for swift 5.5

motivation: keep with the times
changes:

update 5.4 docker file to use the release version instead of the development one
add a 5.5 dockerfile

@swift-ci please smoke test


Idea: make PwnedPasswordValidator's count configurable

Great library! We like the idea of using PwnedPasswordValidator in one of our projects, but we feel that it would be best to make the count value where it counts as a failure configurable. haveibeenpwned contains over half a billion leaked passwords, which of course will contain completely unique passwords used by one person before. It's probably not necessary to block all of these passwords from being used ever again - a count of 1 does not mean it is "commonly used on other websites". We'd only want to block a password if it has a count of 1.000 for example.

Hi @kevinrenskers
Thanks for your suggestion. I added the count_threshold option in v1.2.0.


Add functional tfexec client

Issue: Closes rancher/qa-tasks#984
Problem
There was no method via the golang test framework to interact with terraform.
Solution
Added a tfexec client which wraps the tfexec library to provide easy-to-use wrapper functions around common operations.
Testing

Did various tests on local machine, not tested in Jenkins.
Adds additional dependencies to go.mod:

github.com/hashicorp/go-version
github.com/hashicorp/hc-install
github.com/hashicorp/terraform-exec
github.com/hashicorp/terraform-json

Example tfexec config:
tfexec:
  workspaceName: "workspaceToApplyModuleIn"
  workingDir: /path/to/a/terraform/module/
  execPath: /path/to/executable/terraform <--- if omitted, there is an InstallTfVersion() function to enable installing a specified terraform version
  varFilePath: /path/to/terraform/module.tfvars
  planFilePath: "/pre/existing/plan/file/to/use"
  planOpts:
    outDir: /path/to/output/planfile/to

Engineering Testing
Manual Testing

Automated Testing
QA Testing Considerations

Regressions Considerations

@caliskanugur Anything else I should modify before I squash?

@git-ival can squash your commits, and push up the back ports?


Add location addresses data from Ukraine

Sure, i will do it. Thanks for the feedback

Please fix compilation error and one typo I mentioned in comments.
Also please give a star to the repository to make it more popular :fire:

Sorry, I will finish it tomorrow

I will close the PR after 3 days from now if not updated.


Add delete api samples

@ncmiller Still relevant. Currently we do not test and do not have any sample for LightDB DELETE API. See also https://golioth.atlassian.net/browse/DSDK-175

Covered in #269


DEVOPS-1686: Trigger an SNS notification when the outstanding requester list is updated

Only if SNS_TOPIC_ARN environment variable is set

Sorry, this was meant to be merged in our fork, not here.


Mic 4575/optimize last name proportion test

Mic 4575/optimize last name proportion test
Optimizes last name proportion test.

Category: Test
JIRA issue: MIC-4575
Research reference:

Changes and notes
-updates test to not use groupby and apply on sort values.
Verification and Testing
Test passes in 2 seconds instead of 47 minutes.

I'm evidently not a reviewer for this repo, but i think it looks great!!


Orders still active though their subscriptions are not active anymore.

Some orders are active though their subscriptions don't reflect it as their isActive field is marked as false.
This problem was caught due to a problem in the user-report.js monthly cron job that runs at the beginning of the month.
The orders status should follow the subscription isActive field, which means that it doesn't make sense to have ACTIVE orders if their subscription are not active.
this query results in 777 records(as of today) in prod:
SELECT * FROM "Orders" o
LEFT JOIN "Subscriptions" s ON o."SubscriptionId"=s.id
WHERE o.status='ACTIVE' AND s."isActive"=false and o."deletedAt" is null and s."deletedAt" is null;

After finding the root of the problem(We still need to dive deeper but as @znarf pointed out the problem may be related to the update of subscriptions) we should also think on creating an update query so the "bugged" orders may change their status to CANCELLED.
UPDATE "Orders" set status='CANCELLED' where id in (
SELECT o.id FROM "Orders" o
LEFT JOIN "Subscriptions" s ON o."SubscriptionId"=s.id
WHERE o.status='ACTIVE' AND s."isActive"=false and o."deletedAt" is null and s."deletedAt" is null);

Instead of only running the query we could think of creating a sequelize migration file so we can keep track of the queries we've ran.


changed min_version from float to string in theme.toml

When following this step:
https://gohugo.io/getting-started/quick-start/#step-4-add-some-content
The hugo new posts/my-first-post.md command failed with the following error:
PS C:\Hugo\Sites\quickstart> hugo new posts/my-first-post.md
Error: failed to read module config for "ananke" in "C:\\Hugo\\Sites\\quickstart\\themes\\ananke\\theme.toml": unmarshal failed: Near line 11 (last key parsed 'min_version'): Invalid float value: "0.30.2"

@budparr - just noticed #189 and #187 seem to be identical

Closing as fixed in #189 thank you!


Task to be run whenever a user (any user) logs on

Hi,
What I'm trying to achieve is creating a task that would run whenever a user (any user) is logging in.
So basically if the system has 2 users, the task should trigger in the following scenarios:

system boots up and user signs in -> task triggers after login
a user (user1) switches to another account (user2) -> should trigger twice, once for each user
logs out and logs in back -> should trigger

I came up with the following code but my feeling is that I'm doing it wrong, given the magic string specifying the "Users" group as userId parameter.
using (TaskService ts = new TaskService())
            {
                TaskDefinition td = ts.NewTask();

                td.Principal.RunLevel = TaskRunLevel.Highest;
                td.RegistrationInfo.Description = "Start whenever a user logs in";
                td.Triggers.Add(new LogonTrigger());
                td.Actions.Add(new ExecAction("PATH_TO_EXE", "SOME_PARAM", null));
                td.Settings.DisallowStartIfOnBatteries = false;
                td.Settings.DisallowStartOnRemoteAppSession = false;
                td.Settings.Hidden = true;
                td.Settings.StopIfGoingOnBatteries = false;

                ts.RootFolder.RegisterTaskDefinition(
                      "task-to-run-on-logon",
                      td,
                      TaskCreation.CreateOrUpdate,
                      "Users", // grrrrrr...
                      logonType: TaskLogonType.Group
               );
            }

Is this gonna work on other systems that are in different languages or where the default Users group is named for some reason differently?
Thanks!

Your code to define the task looks correct. To get the name of the Users group, you'll need to use a library or PInvoke call to convert the well known SID for that group to the name.

I just bumped in a very weird behavior.
So the task is registered on "Users" group (for now the group is specified through that magic string).
There are 2 users in the system (for simplicity will call it user1 and user2). The task was created when user1 was signed in. Now after restarting the computer, and signing in again with user1, I noticed that the task is running under user2. Is this a correct behavior? Is it me not understanding properly LogonTrigger?

That doesn't match what I'd expect either. The account to which you're logged in only affects the permission to create tasks. The account under which a task runs is specified by the RegisterTaskDefinition parameters. What I don't know is if Windows requires a user account to run a task when a Group is specified. If a group arbitrarily selects one of its members as the process owner, that could explain what you're seeing. I honestly just don't know.

On your localized name question, use the LookupAccountSid  function after creating a SID using ConvertStringSidToSid using S-1-5-32-545 as the string SID.

For getting the localized name for the builtin Users group i ended up using:
public string GetGroupNameFromSID(string sid)
        {
                return new SecurityIdentifier(sid)
                    .Translate(typeof(System.Security.Principal.NTAccount))
                    .ToString();
        }

GetGroupNameFromSID("S-1-5-32-545");

Regarding the process owner not being the user that just logged on, i will try changing the TaskLogonType while keeping the taskDefinition.Principal.GroupId set to the "BUILTIN\Users" (or whatever the GetGroupNameFromSID mentioned above would return) and see what I get.
Do you want me to keep the issue open and let you know my findings?

Yes, please.
On Tue, May 21, 2019, 2:40 AM Vlad<EMAIL_ADDRESS>wrote:

For getting the localized name for the builtin Users group i ended up
using:
public string GetGroupNameFromSID(string sid)
{
return new SecurityIdentifier(sid)
.Translate(typeof(System.Security.Principal.NTAccount))
.ToString();
}
GetGroupNameFromSID("S-1-5-32-545");
Regarding the process owner not being the user that just logged on, i will
try changing the TaskLogonType while keeping the
taskDefinition.Principal.GroupId set to the "BUILTIN\Users" (or whatever
the GetGroupNameFromSID mentioned above would return) and see what I get.
Do you want me to keep the issue open and let you know my findings?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dahall/TaskScheduler/issues/809?email_source=notifications&email_token=ADNPM5652EVZGYZYS5SUVA3PWOKMLA5CNFSM4HOCWQQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV25AKI#issuecomment-494260265,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADNPM5YSG5IIIPXJSRXXQWTPWOKMLANCNFSM4HOCWQQQ
.

What did you discover after more trials?

Ok. So it turns out that when LogonTrigger is used, a random user is used from the group in order to run the task. Was unable to find the root cause.
In order to obtain the expected behavior I switched to SessionStateChangeTrigger like
new SessionStateChangeTrigger() { StateChange = TaskSessionStateChangeType.SessionUnlock }

Still running tests but till now it seems that the task is ran under the user that logs in/unlocks the session. Will come back if finding something new.
Thanks for you help!


Add es6 module

Currently I'm maintaining my own fork of these bindings since I use es6 in all of my projects.
// bsconfig.json
...
  "package-specs": {
    "module": "es6",
    "in-source": true
  },
...

A lot of the changes are refmt changes, but in line 312 I added a ES6 module.
This is backwards compatible and won't affect anyone.

View build log
TravisBuddy Request Identifier: 07013380-65c6-11e9-aafa-87f824428b00

This probably affects (and hopefully resolves?) #31.

@mlms13 Yes this will solve that. I had the same issue.
By doing thi
Js.log2("moment", MomentRe.momentNow());

The following code is generated:
import * as Moment from "moment";
console.log("moment", Moment());

Also if you were wondering it's not possible to use the ES6 module with a commonjs project.
I setup a small commonjs project and by using the ES6 module I got moment.default is not a function


Joint likelihood set and area correction factors

Perhaps I'm missing it somewhere, but it seems the correction factors do not get fitted with a  during a set fit. Could this be a bug or should it be done in the data getter?

Yep!
you need to set up the correction factors yourself in the data getter.


[FEATURE]: Enable recursive deletion of a stack including all stack components

ZenML's zenml stack delete ... CLI command will currently delete your stack, but any stack components that were part of it aren't deleted.
This feature would enable this functionality such that when you delete a stack, all the stack components that are part of it would be deleted as well. Included as part of the work:

full unit testing for this new functionality
adding a new flag for the zenml stack delete subcommand to denote that you also want the components deleting as well
handling the common case of 'default' local components which might be treated differently depending on the implementation and what makes sense.

Hello, I am new to open source I have used zenml for personal project and I want to take this to start contributing.
Are you ok with that ?

Yes we'd love to receive a contribution on this issue. I checked with the team and it's still open.
The tricky thing will be not only handling the 'default' components (which shouldn't be deleted), but also making sure not to delete components associated with one stack if they are still being used / present in another stack. I imagine there might need to be some kind of user confirmation there. e.g. "Components X and Y cannot be deleted because they are part of other stacks. do you still want to delete the remaining components of the stacks (A, B, C)?"
Feel free to use this issue thread as a place to discuss the implementation, or to flesh out how you feel like you'd approach it, and of course please do check out our guide for contributors which includes a lot of useful information on how to submit so that your work passes the various linters etc.
Thanks for reaching out!

I am trying to install all integrations from the https://github.com/zenml-io/zenml/blob/main/CONTRIBUTING.md, which shows me an error that label-studio, kserve, and sagemaker have conflicting dependencies.
I need to install those integrations to run a test.

I think you can probably ignore that step for the purposes of this issue / PR, since this is mainly work for the core repository (i.e. not touching integrations). If mypy gives errors for the integrations code, you can ignore it therefore.

Implemented in version 0.37.0.


test_cd001_cell_data_types_override is failing with timeout

pytest reports failure in
tests/test_cell_data_type_override.py:8 test_cd001_cell_data_types_override

message is
selenium.common.exceptions.TimeoutException: Message: text -> 17/01/2024 not found within 10s, found: 04/02/11720

at commit 7ecc77637c, using ChromeDriver 127.0.6533.72

@gvwilson,
Can you pull main and try again?


Websocket implementation and Matching UI

UI:

Matching with timer (with cancel match option)
Successful Match
Unsuccessful match (with rematch option)

Websocket:

Connect frontend and backend (rabbitmq)
Add Cancel Match logic

Everything looks good!


@conda-forge-admin please add user @thewchan

Additional comment:
@ocefpaf @conda-forge/core so I was the original contributor for this package there's a consistent bug on my local machine when using gray skull it populates the wrong user name for the maintainer field. Can we add the correct user name instead?

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added user @thewchan in conda-forge/lineapy-feedstock#8.


add capacitor-splash-screen

could you add capacitor-splash-screen to your collection?
This is an awesome alternative to the default Capacitor Splashscreen where you can define animations.
@aparajita

I'd be happy to, but I should probably wait until I update it to Capacitor 3.

@aparajita agree, I have listed plug-in who support latest version only :


update watch output to ignore .git paths

currently, the watch command when pushing content outputs a bunch of text that's confusing if you expect it to only care about non-git directories.

This commit ignores those directories when adding paths to the watchlist and also adds a test that currently fails on main but passes with this commit. There's also a test to verify that the listFiles function is ignoring git paths as well.

I noticed there don't seem to be any tests currently in this repo, so if that's the preference, I can rebase out that addition.

Awesome stuff! Thanks for your contribution! Tests are always welcome, but it's not like having a test would prevent this particular bug. If I forgot to update the listDir path when adding the .git ignore logic, I'd also forget to write a test for it. Having more of an e2e test using something like bats might be more helpful - then the test wouldn't make any assumptions about the actual implementation of the push command (e.g., separation on listFiles and listDirs) and only validate that no there is no .git/** entries in the list of watched/pushed files. But such e2e tests are pretty expensive. So, it's always a trade-off.

Yeah, fair point. I mostly added the test to prove that it was failing without the code change and then just left it in, but you're right about e2e testing.
At any rate, my small 14 inch laptop monitor is very happy about this change, since I use the watch mode very frequently!


I think my settings are wrong. - 'idris.typecheck'

I can a little understand English. I use a translator so it's ok.
OS : windows 10
C:\Program Files\Microsoft VS Code.
C:\Users\i.vscode\extensions
|ms-vscode.atom-keybindings-3.0.2
| vscode-idris-master
| zjhmale.idris-0.9.8
I can see that it works.
"idris.add-clause", keybinding - Ctrl + Alt + A
"idris.case-split", keybinding - Ctrl + Alt + C
"idris.docs-for",   keybinding - Ctrl + Alt + D
"idris.make-lemma", keybinding - Ctrl + Alt + L
"idris.make-case",  keybinding - Ctrl + Alt + M
"idris.proof-search", keybinding - Ctrl + Alt + S
"idris.type-of",   keybinding - Ctrl + Alt + T

"idris.typecheck".. um.... hello???
"idris.typecheck" is no response.
what is a problem?
I wanna see that "file loaded successfully"  or error message.

Yeah it seems like the command isn't working: https://github.com/zjhmale/vscode-idris/issues/118
Which is too bad I really wanted to switch to VS Code, but I can't stand when trivial stuff doesn't work:)

Well ... I was forgetting vscode because I could not solve it. :)


change convert to fp25519 function

Upgrades the conversion within the PRF evaluation to compatibility with DZKP malicious security

before merging this, please do performance runs and make sure there are no regressions. Doing two 50M runs should be reasonable

I pushed a commit that captures the more straightforward revisions, but there is a bigger change coming. The current version increases the minimum work unit PROOF_CHUNK * CONV_CHUNK, which is too much for CI.

https://github.com/private-attribution/ipa/pull/1208/files


beam_width & maximum_iterations in BeamSearchDecoder.call instead of init?

Describe the feature and the current behavior/state.
Hi TFA team, the current seq2seq beam search decoder implementation takes in beam_width & maximum_iterations during decoder initialization init() instead of dynamic calls call. This makes it difficult for tuning beam_width when there's a trained model. However, it's a common request that in practice, when we have a trained model, we would like to tune the beam_width & maximum_iterations for best inference latency and performance without retraining or tweaking the model.
Can you support this request? Or is there any way to fulfill the above request in a simple way?
Relevant information

Are you willing to contribute it (yes/no): no
Are you willing to maintain it going forward? (yes/no): no
Is there a relevant academic paper? (if so, where): no
Is there already an implementation in another framework? (if so, where): no
Was it part of tf.contrib? (if so, where): no

Which API type would this fall under (layer, metric, optimizer, etc.)
Addons - Seq2seq
Who will benefit with this feature?
TensorFlow Addons users who want to tune beam_width with input params beam_width during inference time (TF serving, JNI etc.), instead of tweaking models
Any other info.

/cc @guillaumekln for visibility

Did you try creating the BeamSearchDecoder instance in your call method?

Hi @guillaumekln and @WindQAQ ,
Thanks for the issue edition and reply. I will try but maybe not in the short term future as currently I'm not focused on this.
I'm okay with keeping beam_width in the constructor, since you don't have to specify it in inference time if you are convinced about the value of beam_width. Just want to know if there's a way for dynamic tuning since it's common and very much needed to my understanding :)

Hi @StarWang

Hi TFA team, the current seq2seq beam search decoder implementation takes in beam_width & maximum_iterations during decoder initialization init() instead of dynamic calls call()
This makes it difficult for tuning beam_width when there's a trained model. However, it's a common request that in practice, when we have a trained model, we would like to tune the beam_width & maximum_iterations for best inference latency and performance without retraining or tweaking the model.

Though this is true, there's still a way to tune your beam_width in current implementation after your model has been trained which involves multiple instantiations of tfa.seq2seq.BeamSearchDecoder.  For example,
Say the decoder stack looks like this:
class Decoder(tf.keras.Model):
  def __init__(self, vocab_size, embedding_dim, dec_units, batch_sz, attention_type='luong'):
    super(Decoder, self).__init__()
    self.batch_sz = batch_sz
    self.dec_units = dec_units
    self.attention_type = attention_type

    # Embedding Layer
    self.embedding = tf.keras.layers.Embedding(vocab_size, embedding_dim)

    #Final Dense layer on which softmax will be applied
    self.fc = tf.keras.layers.Dense(vocab_size)

    # Define the fundamental cell for decoder recurrent structure
    self.decoder_rnn_cell = tf.keras.layers.LSTMCell(self.dec_units)

    # Sampler
    self.sampler = tfa.seq2seq.sampler.TrainingSampler()

    # Create attention mechanism with memory = None
    self.attention_mechanism = self.build_attention_mechanism(self.dec_units,
                                                              None, self.batch_sz*[max_length_input], self.attention_type)

    # Wrap attention mechanism with the fundamental rnn cell of decoder
    self.rnn_cell = self.build_rnn_cell(batch_sz)

    # Define the decoder with respect to fundamental rnn cell
    self.decoder = tfa.seq2seq.BasicDecoder(self.rnn_cell, sampler=self.sampler, output_layer=self.fc)

  def build_rnn_cell(self, batch_sz):
    rnn_cell = tfa.seq2seq.AttentionWrapper(self.decoder_rnn_cell,
                                  self.attention_mechanism, attention_layer_size=self.dec_units)
    return rnn_cell

  def build_attention_mechanism(self, dec_units, memory, memory_sequence_length, attention_type='luong'):
    if(attention_type=='bahdanau'):
      return tfa.seq2seq.BahdanauAttention(units=dec_units, memory=memory, memory_sequence_length=memory_sequence_length)
    else:
      return tfa.seq2seq.LuongAttention(units=dec_units, memory=memory, memory_sequence_length=memory_sequence_length)

  def build_initial_state(self, batch_sz, encoder_state, Dtype):
    decoder_initial_state = self.rnn_cell.get_initial_state(batch_size=batch_sz, dtype=Dtype)
    decoder_initial_state = decoder_initial_state.clone(cell_state=encoder_state)
    return decoder_initial_state

  def call(self, inputs, initial_state):
    x = self.embedding(inputs)
    outputs, _, _ = self.decoder(x, initial_state=initial_state, sequence_length=self.batch_sz*[max_length_output-1])
    return outputs

Then once you've trained your model, to test out outputs related to different beam widths, you can instantiate the BeamSearchDecoder multiple times without having to retrain your model.
# Define a beam-search decoder
decoder = tfa.seq2seq.BeamSearchDecoder(
    cell=decoderStack.rnn_cell,
    beam_width=beam_width,
    output_layer=projection_layer,
    length_penalty_weight=0.0,
    coverage_penalty_weight=0.0)

# decoding
outputs, _ = decoder(
    embedding_decoder,
    start_tokens=start_tokens,
    end_token=end_token,
    initial_state=decoder_initial_state)

Maybe it's not the ideal way to do it, but it serves the purpose of fin-tuning a beam_width and have future predictions according to it. Let me know if I'm missing something?

Let's close this issue as @abhishek-niranjan shared a good way to that. @StarWang Feel free to reopen if you think something is missing to properly tune the beam width.

Thanks all. I'll update this once I come across related issue.


tera: Attempt to obtain mutable reference.

I've come into a situation where I need to call Tera::full_reload so I can reload templates in a development environment (versus respawning this application). I'm not sure if allowing for a From<Arc<Tera>> for TeraHandler would have helped here (because then I can control the instance of Tera being used (to a degree).
I know I opened this up as a PR versus going into discussions—mainly because it seemed simple enough. However, I can't get this imported into my project locally so I wasn't able to fully test this.

I'll take a look at this; I don't think we want to expose Arc::get_mut without a lot of large warnings because it will panic if the application is being run. If we need to expose mutable access to the inner Tera, it will need to be in an RwLock to ensure we don't panic

Gotcha. And I can imagine something like that would change the internal representation a bit (perhaps to something like RefCell). I'm going to see if I can live without this and keep tinkering.

How are you triggering the reload? Is it a fs-watch driven thing? Do you think it might make sense to make "reload on each request" a development mode option?

I'm aiming to make it a development option, yeah. Right now, I'm killing the process and restarting it. My other option is to have a connection catch the request, clone the Tera instance into a mutable one and reload it from there (which, tbh, feels like the more 'correct' option because this is in a conditional handler when it's determined to be in a development mode).
On Sun, Mar 27, 2022, at 18:03, Jacob Rothstein wrote:

How are you triggering the reload? Is it a fs-watch driven thing? Do
you think it might make sense to make "reload on each request" a
development mode option?
--
Reply to this email directly or view it on GitHub:
https://github.com/trillium-rs/trillium/pull/190#issuecomment-1080027996
You are receiving this because you authored the thread.
Message ID: @.***>

Yeah, I've been just doing the following in my list of handlers, and it works well for me. I think I can just put this behind a feature flag in a separate function. The performance isn't really measurable yet (I only have about ten pages there):
            Box::new(|conn: Conn| async move {
                templates::TeraHandler::new("web/dist/**/*.html")
                    .run(conn)
                    .await
            }),

I actually do something similar in the code running my personal site, only to allow for runtime swapping of themes. If I do notice anything performance-wise, I'll come back with a better PR for that.
(Originally published at: https://jacky.wtf/2022/3/ZV/ZVqfcJwEH7Mo2g-hSTvCnXSb)

I'm a few days backlogged on trillium, but I do think this is a general purpose utility that people might want, so I'll make an issue to represent this. One of the outstanding design issues that I haven't really addressed is whether there should be some explicit notion of "development mode," and I think there are good arguments on both sides of that issue

That sounds good to me—in that case, I can probably spend some time this weekend looking into making this PR a bit more reasonable. In the case I had, just reloading the templates on disk would have been enough, so having a private flag that inform the handler to call full_reload every time it's run would work. Shouldn't be a big change, but it'd at least allow for this particular use case to work.
I think doing this removes it from being a development-specific use case (which falls into the case of my personal site) but still allows it to be used in such a context (for this Webmention server app I'm making)
.
(Originally published at: https://jacky.wtf/2022/3/nR/nRJ9TgFL45dF2Swh4UhxXYL7)


ui-pl issues

Found a couple of issues with the branding updates:
There needs to be a way to remove/not show the "get support" link from the nav menu.
The commercial support link on the home page should not be shown.
Community support links on the homepage should also be optionally hidden from a setting on the branding page. We should allow only showing the user-defined support link.
A possible solution would be to place the support links on the branding page.

Rancher version: 2.6 master-head (06/25/2021) c7f3cce
❌  - Needs Fix
ℹ  - Needs information
✅  - Working as expected

The Get Support link is visible in the Nav Bar with or without a Subscription ID. ❌
The Community Support Box in the Dashboard Home is visible always even if we uncheck the Show Rancher community support links in Branding (See screenshot). ❌

Should we force hiding that Support Box if a Subscription ID exists and it was never removed from home? ℹ
With Show Rancher community support links checked I only see the File an Issue link in /dashboard/support ✅

There is a PR up for this now, copying over an explanation of expected behavior:
This pr addresses remaining issues in #3029 with the exception of the 'Get Support' link visibility; there are conflicting requirements in https://github.com/rancher/dashboard/issues/2895. As per discussion with @nwmac this PR hides the support link for non-admins regardless of subscription status, and changes the label from 'Get Support' to 'Support' when a subscription key has been added. We've opted not to hide the link entirely in supported mode because the page still has utility. Other issues from #3029 :

The Community Support Box in the Dashboard Home is visible always even if we uncheck the Show Rancher community support links in Branding (See screenshot)

This should work correctly now, but if a custom issue-reporting url has been provided, it will be shown in the box regardless of whether show rancher community support links is checked or not.

Should we force hiding that Support Box if a Subscription ID exists and it was never removed from home? ℹ

We've opted not to hide the Community Support box when a subscription id is present because those resources are still helpful; eg a user may choose to read docs or peruse open issues before contacting support.

Rancher version: v2.6 master-head (07/19/2021) d3ad5d3
Validated the remaining issues fixed and described here.
I am missing the standard user validation due to issues accessing the dashboard. Probably related to RBAC WIP https://github.com/rancher/rancher/issues/32414

Rancher version: v2.6 master-head (07/20/2021) cfbd0d3
Validated the Standard user requirement of hiding the support link for non-admins.
Standard User has no Support Links available.