Allow float instead of integer for commit_ratio thresholds

Hi,
I suggest to allow fload for commmit_ratio service. It could be useful for rollback ratio if your rollback_ratio is under 1%.
Regards,

Didn't we discuss this and suggested to have a rollback_num to deal with such cases? I'm not sure what was the conclusion though.

I think it is not enough. For example, during the night, traffic goes down and we have 1 rollback/s with 1000TPS. During the day we have 20KTPS, so 20 rollbacks/s. Both corresponds to 0.1% rollbacks_rate. Which threshold shoud I use we rollback_num?

Mh, indeed. Digging more around, I'm sure we can find scenarios where it requires multiple threshold depending on the time period.
But anyway, moving from integer to float for this does not seems to be a big deal, so go for it :)

I'm sure we can find scenarios where it requires multiple threshold depending on the time period.
Hum, this should be managed from nagios side?

Are you ok with https://github.com/OPMDG/check_pgactivity/pull/198/commits/39fffced04d98a0e23b5e9760afbcafc38ae39f8 ?

I'm sure we can find scenarios where it requires multiple threshold depending on the time period.

Hum, this should be managed from nagios side?

This is my point, indeed.

Are you ok with 39fffce ?

I'm fine with it.


ACM-14986-ArgoCD-apps-remain-on-Ul-forever-after-deletion

Signed-off-by: John Swanke<EMAIL_ADDRESS>

/cherry-pick release-2.12

Overrode coverage requirements as code is specifically excluded when running in test environment


Resolve caches object[] args values

Hi,
I'm not sure if this is a issue or by design.
I am trying to create a ViewModel-factory
public class ViewModelFactory
{
        private readonly IResolver _resolver;
        public ViewModelFactory(IResolver resolver)
        {
            _resolver = resolver;
        }

        public T CreateViewModel<T>(params object[] args)
        {
            return (T)_resolver.Resolve(typeof(T), args);
        }
}

On the first call to CreateViewModel with a System.Guid as parameter
var editViewModel = _viewModelFactory.CreateViewModel<IEditViewModel>(guidId);
everything works as expected. The constructor of the registered EditViewModel is run with the provided guidId, and other parameters injected. However on a second call
var editViewModel = _viewModelFactory.CreateViewModel<IEditViewModel>(anotherGuidId);
the guid-value from the first call is injected to the constructor again.
It seems to me that DryIoc's Resolve caches object[] args values.
Is this intended?
I'm aware that I can use
var getter = _resolver.Resolve<Func<Guid,T>>();
getter(guidId)

but not all of my viewmodels require a guid as parameter. Some require no guid, some require two, and some might require other values only known at runtime.
Thanks for any advice

@kirodge, Thanks for posting.
Yes, it is probably a cache, but it should not be there because of arguments. I will check.

Thanks, I created a PR for testing the issue

The fix is available in DryIoc v3.1.0-preview-03

@dadhi Set milestone 3.1.0?

yep.

This issue is a show stopper for my project as well.
Any timelines for v4 ?
Maybe it could be back-ported to 3.1 in the mean time ?
Thanks.

V4 will be here soon. If you are watching the repo, you see that I am closing the last bugs.
Regarding back ports, I am open for PRs.

It appears that the issue is still there in v4.0.1.
I've prepared the tiniest use case I could come up with and placed it in a .NET fiddle.
Here's the code, for completeness:
// @nuget: DryIoc.dll -Version 4.0.1

using System;
using DryIoc;

public class Program
{
	public static void Main()
	{
		using (var container = new Container(ConfigureContainer))
		{
			container.Register<IAlpha, Alpha>();
			container.Register<IBravo, Bravo>();

			using (var scope = container.OpenScope())
			{
				Console.WriteLine("--- Scope #1");
				scope.ResolveNamed<IAlpha>("Alice");
				scope.ResolveNamed<IBravo>("Bob");
			}

			using (var scope = container.OpenScope())
			{
				Console.WriteLine("--- Scope #2");
				// I would expect the Container to throw on the following line,
				// because it doesn't know how to create an instance of Alpha.
				// Instead, it happily creates an Alpha named Bob!
				scope.ResolveNamed<IBravo>("Bob");
			}
		}
	}

	static Rules ConfigureContainer(Rules rules)
	{
		return rules
            .With(FactoryMethod.ConstructorWithResolvableArguments)
            .WithDefaultReuse(Reuse.ScopedOrSingleton);
	}
}

public static class ResolverExtensions
{
	public static TService ResolveNamed<TService>(this IResolver @this, string name)
	{
		return @this.Resolve<TService>(args: new object[] { name });
	}
}

public abstract class Service
{
	protected Service(string name)
	{
		Console.WriteLine("This is an instance of {0} called {1}.", GetType().Name, name);
	}
}

public interface IAlpha { }

public interface IBravo { }

public sealed class Alpha : Service, IAlpha
{
	public Alpha(string name)
		: base(name) { }
}

public sealed class Bravo : Service, IBravo
{
	public Bravo(string name, IAlpha alpha)
		: base(name) { }
}


Media query conditions should be responsive

Is it enough to watch for resize events? That seems like a good start at least.
The other approach here would be to apply CSS queries as CSS, which will respond dynamically without any other JS. We might still want a way to keep the 'hidden' attribute up to date?
@jamesnw curious if you have thoughts on that?

I think we should be able to listen for change events on the matchMedia query- https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Testing_media_queries. That way we can handle things like changing from dark theme to light theme.
Adding it to the CSS would work as well, but I'm not thinking of an easy way of keeping the hidden attribute up to date, which would make the has-media match behave differently than the others.


id: add support for showing SELinux context (--context/-Z)

Thanks to @koutheir 's brand new (published today) selinux crate, I could add SELinux (--context/-Z) support to uu_id (related: #2075).
On my local machine this passes GNU's coreutil Testsuite (8.32) for "tests/id/context.sh". It should also pass "tests/id/no-context.sh", but that depends on uu_ls -Z being implemented and therefore fails at the moment.
However, there are drawbacks:

GNU's Testsuite says: context.sh: skipped test: this system lacks SELinux support. So there won't be automatic testing because apparently the CICD docker images lack selinux support.
The selinux-sys crate fails to build on the ubuntu-latest docker image. There's a discussion about this going on here.
I had to bump the MSRV to 1.53 because the selinux crate has a dependency for arrayvec which needs 1.51 and the selinux crate uses the io::ErrorKind::Unsupported feature which needs 1.53.
I don't know how crucial these dependencies are, maybe they can be lowered, @koutheir ?
Edit: the dependencies have changed, see below.

Once we know how to deal with these drawbacks, adding SELinux Context support to the remaining uutils, e.g. uu_ls, uu_cp, uu_stat, etc. should be just as easy as this one.

I had to bump the MSRV to 1.53 because the selinux crate has a dependency for arrayvec which needs 1.51 and the selinux crate uses the io::ErrorKind::Unsupported feature which needs 1.53.
I don't know how crucial these dependencies are, maybe they can be lowered, @koutheir ?

The arrayvec dependency is used to avoid unnecessary heap allocations, so it is an optimization.
The std::io::ErrorKind::Unsupported is used because I always use the latest version of Rust, and mainly because I don't actively try to reduce the MSRV.
I can remove these limitations if they are problematic.

@jhscheer, I just removed the limitations stated above from the selinux crate. Please update to version 0.1.1 of the crate.

@koutheir I just noticed that "arrayvec" version = "0.5.2" is already in Cargo.toml.
So if the dependency ^0.7 could be lowered to ^0.5 there's no need to do without it.

Between using old code, and not using code, I prefer to not use code.

I tried selinux 0.1.1 and it looks like it can be compiled with the current MSRV 1.43.1 now.
However, compiling selinux-sys 0.4.2 needs:

Traits on larger arrays from rust 1.47.0
std::slice::strip_prefix from rust 1.51.0

@koutheir I'm just documenting this here. I'm not implying you should go out of your way and change something.
Personally, I would prefer a MSRV bump (to at least 1.47) for this project, but I don't know all the implications that might have and also that's not for me to decide.

Personally, I would prefer a MSRV bump (to at least 1.47) for this project, but I don't know all the implications that might have and also that's not for me to decide.

If you have drivers for this change, you could open an issue for this. One potential problem with 1.47 is that it's not supported by the current stable Debian release. I'm not really sure whether that's an issue.

One potential problem with 1.47 is that it's not supported by the current stable Debian release. I'm not really sure whether that's an issue.

it isn't ;)

@jhscheer , let's rebase this off of current master and see if it can be modified to give a clean/green CI with 1.51.
If so, we can push a release, increase the MSRV to 1.51, then merge this...

Could you please fix the conflicts? thanks

@rivy

@jhscheer , let's rebase this off of current master and see if it can be modified to give a clean/green CI with 1.51.
If so, we can push a release, increase the MSRV to 1.51, then merge this...

With 1.51 the selinux crate can be compiled.
However, there's still the much more grave problem that selinux-sys crate cannot be compiled in a docker image:
thread 'main' panicked at 'selinux-sys: Failed to find 'selinux/selinux.h': Kind(NotFound)', /cargo/registry/src/github.com-1ecc6299db9ec823/selinux-sys-0.4.2/build.rs:222:10

This PR cannot be merged before we know how to tackle this problem.
There's a discussion going on about it here

This diff fixes the import in the tests:
diff --git a/Cargo.toml b/Cargo.toml
index d0e9ff2e..3499e14a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -146,7 +146,7 @@ feat_os_unix_musl = [
 feat_require_crate_cpp = [
     "stdbuf",
 ]
-feat_selinux = ["id/selinux"]
+feat_selinux = ["id/selinux", "selinux"]
 # "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23)
 feat_require_unix = [
     "chgrp",
diff --git a/build.rs b/build.rs
index e9fe129e..4fbb27cc 100644
--- a/build.rs
+++ b/build.rs
@@ -28,8 +28,8 @@ pub fn main() {
         if val == "1" && key.starts_with(env_feature_prefix) {
             let krate = key[env_feature_prefix.len()..].to_lowercase();
             match krate.as_ref() {
-                "default" | "macos" | "unix" | "windows" => continue, // common/standard feature names
-                "nightly" | "test_unimplemented" => continue,         // crate-local custom features
+                "default" | "macos" | "unix" | "windows" | "selinux" => continue, // common/standard feature names
+                "nightly" | "test_unimplemented" => continue, // crate-local custom features
                 "test" => continue, // over-ridden with 'uu_test' to avoid collision with rust core crate 'test'
                 s if s.starts_with(feature_prefix) => continue, // crate feature sets
                 _ => {}             // util feature name

The problem is that selinux was not exposed to the tests so the dependency needs to be enabled (and then ignored in build.rs)

The selinux-sys crate requires libselinux headers and shared library to be accessible in the C toolchain. The crate can be built inside a container if this condition it true. Building it inside a container that does not provide the headers causes the error Failed to find 'selinux/selinux.h': Kind(NotFound). Furthermore, if a cross-compilation toolchain is used to cross-compile the selinux-sys crate, then the libselinux headers and shared library need to be provided by that toolchain (the host system headers and library are not used in this case). Using a cross-compilation toolchain that does not provide the libselinux headers results in the same issue.
A potential solution to this complication would be to ship libselinux sources with the selinux-sys crate, and cross-compile libselinux right before compiling selinux-sys. But in order to retain compatibility, the selinux-sys crate needs to know the exact version of libselinux to be used on the target. Using the same version of libselinux provided by the build system is not possible, because libselinux does not provide any means to detect its version, neither in the header files, nor in the shared library itself, unfortunately.
Using the cross tool to build selinux-sys works in some cases, but custom containers need to be built (based on the cross containers, with added packages) in order to install libselinux and libclang and friends. I don't think this is a sustainable solution.

This is ready for review.
With new feature flag, the SELinux specific parts are now gated behind --featues feat_selinux and this can  be compiled in the CI.
Since this is now decoupled from the CICD, I appreciate a volunteer to run:
cargo test test_id --features feat_selinux on an SELinux enabled Linux distribution with libselinux headers installed (e.g. on fedora dnf install libselinux-devel).
The feature works like this:
$ cargo run --features feat_selinux -- id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$ cargo run --features "id" -- id -Z
id: --context (-Z) works only on an SELinux-enabled kernel

@koutheir could you change selinux-sys to not use std::slice::strip_prefix?
Then this PR could be merged with only a bumb to MSRV 1.47 instead of 1.51 (https://github.com/uutils/coreutils/pull/2075#issuecomment-890327017).
I believe this PR could also be what you were talking about here (https://github.com/uutils/coreutils/pull/2075#issuecomment-890335344):

I'm waiting for any other PR to handle the issue of depending on SELinux and still please the CI servers somehow. Once that is done, I'll modify this PR to handle the issue in a similar fashion.

@koutheir could you change selinux-sys to not use std::slice::strip_prefix?
Then this PR could be merged with only a bumb to MSRV 1.47 instead of 1.51 (#2075 (comment)).

I don't understand why 1.47 is preferable to 1.51, but, yes, I can do that.

I believe this PR could also be what you were talking about here (#2075 (comment)):

I'm waiting for any other PR to handle the issue of depending on SELinux and still please the CI servers somehow. Once that is done, I'll modify this PR to handle the issue in a similar fashion.

I believe so too. Once that issue is addressed somehow, I'll modify PR #2075 in order to use the same approach if possible.

@koutheir could you change selinux-sys to not use std::slice::strip_prefix?
Then this PR could be merged with only a bumb to MSRV 1.47 instead of 1.51 (#2075 (comment)).

The requested change is implemented by version 0.5.1 of selinux-sys.

@koutheir could you change selinux-sys to not use std::slice::strip_prefix?
Then this PR could be merged with only a bumb to MSRV 1.47 instead of 1.51 (#2075 (comment)).

The requested change is implemented by version 0.5.1 of selinux-sys.

Thanks!
Could you please also update selinux crate? It is also using std::slice::strip_prefix.
https://github.com/koutheir/selinux/blob/f51890d3c5530a691b7e8e7737275e1ec1f2894a/src/lib.rs#L1157
Sorry, I didn't see this before.

Could you please also update selinux crate? It is also using std::slice::strip_prefix.
https://github.com/koutheir/selinux/blob/f51890d3c5530a691b7e8e7737275e1ec1f2894a/src/lib.rs#L1157

The requested change is implemented by version 0.1.3 of the selinux crate.

Well done :)


Question - (DEBUG) Valheim Server is not yet downloaded - waiting

I use Docker for Mac and I keep getting "(DEBUG) Valheim Server is not yet downloaded - waiting" message on the logs.
docker-compose.yaml:
version: "3"

services:
  valheim:
    image: lloesche/valheim-server
    cap_add:
      - sys_nice
    volumes:
      - $HOME/Documents/valheim/valheim-server/config:/config
      - $HOME/Documents/valheim/valheim-server/data:/opt/valheim
    ports:
      - "2456-2458:2456-2458/udp"
      - "9001:9001/tcp"
    env_file:
      - $HOME/Documents/valheim/valheim-server/valheim.env
    restart: always

and valheim.env:
SERVER_NAME="Z8OTester"
WORLD_NAME=WORLD
SERVER_PASS=secret
SERVER_PUBLIC=true

Can you paste the entire log? Without it I can just guess.
Could it be one of OSX' new security features where not every process is allowed to read and write every directory on the system?

Creating network "valheim-server_default" with the default driver
Creating valheim-server_valheim_1 ... done
Attaching to valheim-server_valheim_1
valheim_1  | 2021-03-06 22:48:25,319 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"
valheim_1  | 2021-03-06 22:48:25,320 INFO Set uid to user 0 succeeded
valheim_1  | 2021-03-06 22:48:25,335 INFO RPC interface 'supervisor' initialized
valheim_1  | 2021-03-06 22:48:25,336 INFO supervisord started with pid 1
valheim_1  | 2021-03-06 22:48:26,341 INFO spawned: 'valheim-bootstrap' with pid 13
valheim_1  | 2021-03-06 22:48:26 [13] (INFO) Setting timezone Etc/UTC
valheim_1  | 2021-03-06 22:48:26,373 INFO success: valheim-bootstrap entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
valheim_1  | 2021-03-06 22:48:26 [13] (DEBUG) Creating cron to do world backups using schedule 0 * * * *
valheim_1  | 2021-03-06 22:48:26 [13] (DEBUG) Creating cron to check for updates using schedule */15 * * * *
valheim_1  | 2021-03-06 22:48:26 [13] (DEBUG) Creating cron to restart valheim-server using schedule 0 5 * * *
valheim_1  | 2021-03-06 22:48:26,538 INFO spawned: 'syslogd' with pid 27
valheim_1  | Mar  6 22:48:26 118f478bf9a3 syslog.info syslogd started: BusyBox v1.32.1
valheim_1  | 2021-03-06 22:48:27,545 INFO success: syslogd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
valheim_1  | syslogd: started
valheim_1  | 2021-03-06 22:48:27,698 INFO spawned: 'crond' with pid 29
valheim_1  | Mar  6 22:48:27 118f478bf9a3 cron.info crond[29]: crond (busybox 1.32.1) started, log level 8
valheim_1  | 2021-03-06 22:48:28,711 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
valheim_1  | crond: started
valheim_1  | 2021-03-06 22:48:28,861 INFO spawned: 'valheim-updater' with pid 31
valheim_1  | 2021-03-06 22:48:28 [31] (DEBUG) Running Valheim Server updater as user root uid 0
valheim_1  | 2021-03-06 22:48:29 [31] (DEBUG) Valheim updater was just started - skipping connected players check
valheim_1  | 2021-03-06 22:48:29 [31] (INFO) Downloading/updating/validating Valheim server from Steam
valheim_1  | Unable to determine CPU Frequency. Try defining CPU_MHZ.
valheim_1  |
valheim_1  | 2021-03-06 22:48:29 [31] (INFO) Valheim Server is already the latest version
valheim_1  | 2021-03-06 22:48:29 [31] (DEBUG) Writing file to start Valheim server
valheim_1  | 2021-03-06 22:48:29,542 INFO spawned: 'valheim-server' with pid 67
valheim_1  | 2021-03-06 22:48:29 [67] (DEBUG) Valheim Server is not yet downloaded - waiting
valheim_1  | 2021-03-06 22:48:30,584 INFO success: valheim-updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
valheim_1  | valheim-updater: started
valheim_1  | 2021-03-06 22:48:30,736 INFO spawned: 'valheim-backup' with pid 73
valheim_1  | 2021-03-06 22:48:30 [73] (INFO) Backing up Valheim server worlds to /config/backups/worlds-20210306-224830.zip
valheim_1  |   adding: worlds/ (stored 0%)
valheim_1  |   adding: worlds/BumVille.db (deflated 69%)
valheim_1  |   adding: worlds/BumVille.db.old (deflated 69%)
valheim_1  |   adding: worlds/BumVille.fwl2021-03-06 22:48:32,536 INFO success: valheim-backup entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
valheim_1  | valheim-backup: started
valheim_1  |  (deflated 5%)
valheim_1  |   adding: worlds/BumVille.fwl.old (deflated 5%)
valheim_1  |   adding: worlds/steam_autocloud.vdf2021-03-06 22:48:32,564 INFO exited: valheim-bootstrap (exit status 0; expected)
valheim_1  |  (stored 0%)
valheim_1  | 2021-03-06 22:48:32 [73] (INFO) Removing backups older than 3 days
valheim_1  | 2021-03-06 22:48:36 [67] (DEBUG) Valheim Server is not yet downloaded - waiting
valheim_1  | 2021-03-06 22:48:39,609 INFO success: valheim-server entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
valheim_1  | valheim-server: started
valheim_1  | 2021-03-06 22:48:43 [67] (DEBUG) Valheim Server is not yet downloaded - waiting

Can this be it? Unable to determine CPU Frequency. Try defining CPU_MHZ. ?

Yea so the issue for you is that Steam is unable to download Valheim dedicated server on your system for whatever reason. It is straight up refusing to run.
The bug for me to fix is that we're not detecting the failed download correctly and instead of aborting the entire startup process think that Steam was successful in downloading the Valheim server.
What kind of system are you running the container on?

MacBook with Fresh install of macOS 10.15.7
Processor: 2.9 GHz Dual-Core Intel Core i7
Memory: 8GB
I'm using Docker for Mac to run the container. I don't know if that is what you need. Let me know if there anything else I can provide.

Check https://github.com/lloesche/valheim-server-docker#system-requirements for our recommendations re hardware resources. Valheim server is pretty demanding, even when idle.
I'm still confused by the whole Unable to determine CPU Frequency. Try defining CPU_MHZ. thing. And even more that adding more swap changed something on Steams ability of determining your CPU Frequency 🙂
I pushed a PR that fixes the whole "not detecting when Steam fails to download" thing.
Is the container now working for you or are there still other issues?

So according to "the Internet" this error Unable to determine CPU Frequency. Try defining CPU_MHZ. happens when /proc is not mounted and Steam can't read /proc/cpuinfo.
From https://www.reddit.com/r/Crostini/wiki/howto/install-steam
**Steam for Linux Errors:**

Error: *Unable to determine CPU Frequency. Try defining CPU_MHZ.*
Fix:  `export CPU_MHZ=<CPU_SPEED_in_MHZ>`
Example: 1.5GHz owners would enter: *export CPU_MHZ=1500.000*
Explanation: Error occurs when clock calibration fails on boot and cpu MHz output of /proc/cpuinfo is 0.000. This can be confirmed by `dmesg | grep -i tsc`. Steam doesn't like when the /proc/cpuinfo MHZ output is 0.000 and errors out but fortunately allows us to, instead, define the CPU_MHZ value. Seems this lack of cpu MHz output in /proc/cpuinfo is due to a race condition. At this time it is unknown if there is a way to force the clock calibration to try again, this would be ideal as it would correct the 0.000 cpu MHz output in /proc/cpuinfo and truly fix the issue rather than working around it by defining a superficial CPU_MHZ value just to make Steam happy.

So I might submit a PR that tries to read and set CPU_MHZ itself. I'm assuming the issue is resolved for you and will close it. If not feel free to open a new one. Hope the server works for you now and lots of fun playing Valheim! 🙂

The issue is resolved. I don't exactly why. I'mma do a new image download and run to see how it goes. Thanks for the help.

I'm currently seeing the same thing on a dual xeon. I've tried to recreate and change /opt/valheim into a volume. Anyone get to the bottom of this?

@publicvirtualvoid can you attach the complete logs? From startup to error.


General overhaul

Reorganize src files into losses and layers
Remove unnecessary trainings in tests
Use DifferentiableExpectations as a dependency

Rewrite perturbed using Reinforce
Remove pushforward, probability distributions, and other things that are now in DifferentiableExpectations
accordingly update losses relying on Perturbed

Rename GeneralizedMaximizer to LinearMAximizer
Use DocStringExtensions for docstrings
Remove ThreadsX as a dependency

Codecov Report
Attention: Patch coverage is 86.20690% with 16 lines in your changes missing coverage. Please review.

Files with missing lines
Patch %
Lines

src/layers/perturbed/perturbed.jl
67.85%
9 Missing :warning:

src/losses/fenchel_young_loss.jl
93.75%
3 Missing :warning:

src/layers/perturbed/perturbation.jl
80.00%
2 Missing :warning:

src/utils/linear_maximizer.jl
87.50%
2 Missing :warning:

Files with missing lines
Coverage Δ

ext/InferOptFrankWolfeExt.jl
100.00% <ø> (ø)

src/InferOpt.jl
100.00% <ø> (ø)

src/interface.jl
100.00% <100.00%> (ø)

src/layers/perturbed/utils.jl
100.00% <100.00%> (ø)

src/layers/regularized/regularized_frank_wolfe.jl
72.72% <100.00%> (ø)

src/layers/regularized/soft_argmax.jl
100.00% <ø> (ø)

src/layers/regularized/soft_rank.jl
71.79% <ø> (ø)

src/layers/regularized/sparse_argmax.jl
100.00% <ø> (ø)

src/layers/simple/identity.jl
77.77% <ø> (ø)

src/layers/simple/interpolation.jl
80.00% <ø> (ø)

... and 10 more


Version information out-of-date

This page's content should be synced / combined with (https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19), which contains more recent info.
"The current LTSC product is Windows Server 2016" should be changed to "Windows Server 2019".
"The current Semi-Annual Channel release is Windows Server, version 1803" should be changed to "version 1809".
All related references should be updated as well.

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

ID: 9709554a-64bd-51ae-5701-10de1b721284
Version Independent ID: 9d7dc454-8587-2fd3-4986-e0ff660f7d10
Content: Windows Server Semi-Annual Channel overview
Content Source: WindowsServerDocs/get-started/semi-annual-channel-overview.md
Product: windows-server-threshold
GitHub Login: @jaimeo

Thanks for letting us know! These issues should be fixed in the latest version of the docs, which I restructured some to make it easier to keep up-to-date.
Thanks again, and let us know if you spot anything else.
Jason Gerend - Technical Writer for Windows Server

Thanks for your dedication to our documentation. If we have been unable to review your issue in a timely manner, we sincerely apologize for the delayed response. We have captured the informtion you have provided for review. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


feat: Log tab enhancements

Adds a Live button which will allow us to tail logs
Adds a Fullscreen option
Adds the ability to do a simple filter
Use line numbers for logs

https://user-images.githubusercontent.com/4252787/193994644-88f951b5-85e8-41d6-b013-25bfad5f21ad.mov

Cool PR, I'll review it asap, thank you 🙏🏼

In addition there are several UX improvements,

The board doesn't supports Dark mode (maybe we should open a new issue for it), so the logs should be with a white theme. otherwise, it catches a lot of attention.
The custom scroller looks out of place, bulky, maybe it is better to make it a bit thiner.
There is no spacing between the percentage loader and the logs container.
The Buttons in the UI are based on icons, I think that it is better to make the Fullscreen & Live buttons as icons only
The search text is white on white, (I'm using a OS dark theme)

Overall, this is really great improvement to the logs section, and I'll happy to add it to the board 🙏🏼 .
I think that it is better to split these improvements into small PRs:

Fullscreen capabilities
Live mode when the job is active
Ability to search inside logs.

Some styles changes, and code refactoring

@salman-amjad I've made some improvements and style changes, can you review this branch?
git remote -v #check if you have an upstream points to this repo
git remote add upstream git@github.com:felixmosh/bull-board.git # run to add an upstream if not exists
git fetch upsteam
git branch -b pr-458-improvments

@salman-amjad I've made some improvements and style changes, can you review this branch?
git remote -v #check if you have an upstream points to this repo
git remote add upstream git@github.com:felixmosh/bull-board.git # run to add an upstream if not exists
git fetch upsteam
git branch -b pr-458-improvments

EDIT: I've pushed the changes :]

I actually got to something pretty similar myself haha

@felixmosh I've copied some of your improvements from pr-458-improvments. Using <ol /> to generate line numbers doesn't seems to be working as it won't preserve the line numbers after a filter is applied
I'll probably do another PR after this one to move settings like polling time etc to settings UI
https://user-images.githubusercontent.com/4252787/195755359-71be458e-79af-4f1a-bac8-6855e277a8e5.mov

@felixmosh I've copied some of your improvements from pr-458-improvments. Using <ol /> to generate line numbers doesn't seems to be working as it won't preserve the line numbers after a filter is applied
I'll probably do another PR after this one to move settings like polling time etc to settings UI
bull-board-logs-ui-update-v2.mov

Pay attention, I'm using ol, but not the default numbering... It do preserves line number

@felixmosh I've copied some of your improvements from pr-458-improvments. Using <ol /> to generate line numbers doesn't seems to be working as it won't preserve the line numbers after a filter is applied
I'll probably do another PR after this one to move settings like polling time etc to settings UI
bull-board-logs-ui-update-v2.mov

Pay attention, I'm using ol, but not the default numbering... It do preserves line number, and the benefit of this method is that all the logs are aligned (when a line number digit increases)

I know what that piece of code is doing and we need to use value attribute instead of data-line-number to make it work on all major browsers ( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-value ), but the issue is that it adds a lot of whitespace around some line numbers when the line numbers get up to 4+ digits length
Up to you tho, if you think it looks better with the ol plz feel free to add it back in

Thank you for this PR, and the co-operation
This PR released in v4.6.0


Update README.md

Quickly fixed a typo in the README installation instructions.
Previously:
E.g. to install only the dependencies for the Creation Module, run pip install .[creation] or pip install .[estimation] respectively.
Now:
E.g. to install only the dependencies for the Creation Module or the Estimation Module, run pip install .[creation] or pip install .[estimation] respectively.
(the change is in bold)

@jfcrenshaw @aimalz Please note that changes in the readme do not automatically propagate into docs/source (It’s the API documentation which is being auto-generated), so would need to update both.

Need to merge master back into this branch - that should fix the readthedocs fail. I also need to copy the installation instructions into docs/source/installation.rst. I will do these today.


[Impeller] Summarize the list of driver workarounds in Skia.

One of the initial hurdles in making the case for Impeller was that one of the more difficult-to-get-right elements would be to account for the list of GPU driver and vendor specific workarounds in Skia. A lot of the decisions were impacted by reading how and what Skia works around.
A lot of the workarounds don't make sense with Impeller and some of them seem to be overly broad.
This issue tracks documenting the themes of the issues being worked around and cross-referencing the bugs associated with these workarounds.

This will vary for GL, Metal, and Vulkan right?

Right, the GrCaps subclasses. Though, only the GL ones seem fully fleshed out.

We can always refer to the caps for the latest view. I don't think there is any action item here.


Add Proc#ruby2_keywords definition and signature

Motivation
Add RBi definition for Proc#ruby2_keywords.
Test plan

See included automated tests.

We have a policy of testing changes to Sorbet against Stripe's codebase before
merging them. I've kicked off a test run for the current PR.  When the build
finishes, I'll share with you whether or how it failed. Thanks!
Stripe employees can see the build result here:
→ https://go/builds/bui_HWIUFpzjWnpvvz


onDrag callback installed crashes apps in iOS since #161

Hey guys, love your work!
Since #161, onDrag callbacks are broken if there are no snapPoints defined for that Interactable.View on iOS.
I'm not an iOS developer by trade, but it seems reportDragEvent:targetSnapPointId: accepts nil values for targetSnapPointId, which results in a NSInvalidArgumentException since we just tried to put those nil values in an NSDictionary.
This happens because findClosestPoint:toPoint:withOrigin:, when snapPoints is nil, returns a nil point instead of something with an id of @"", and that null point.id is passed on straight to reportDragEvent:targetSnapPointId:, instead of an empty string instead. Should be fairly reproducible.
I could contribute a fix but I'm unaware of you how might want to fix this - we could make sure there's a good default value when there are no snap points, or we could simply replace nil values with empty strings on reportDragEvent:targetSnapPointId:.
https://gist.github.com/joaoanes/032a2463aba5ad570309cb3ff05ac295
Stack trace after moving an Interactable.View with a simple onDrag prop .
Code for the above:
https://gist.github.com/joaoanes/c6c195770b0f142c7ffbdb98b53cf5d0
package.json:
https://gist.github.com/joaoanes/eb54a3813dbab6148455940cca4b2989

I'm seeing this too!


Images never load if GeometryReader is used to set its frame width

Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

[x] I have read the wiki page and cheat sheet, but there is no information I need.
[x] I have searched in existing issues, but did not find a same one.
[x] I want to report a problem instead of asking a question. It'd better to use kingfisher tag in Stack Overflow to ask a question.

Issue Description
I have a SwiftUI view with a very simple body:
    var body: some View {
        GeometryReader { geo in
            KFImage(
                URL(string: "https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png")!
            )
                .placeholder { ProgressView() }
                .resizable()
                .scaledToFit()
                .frame(width: geo.size.width)
        }
    }

Unfortunately, this image never loads for me the first time (and I can add .forceRefresh() to reproduce this issue consistently). I added .onProgress and .onSuccess hooks and checked that while the image is downloaded successfully, KF never replaces the placeholder view with the actual image. This doesn't happen if the image is loaded from cache.
This seems to be somehow related to how GeometryReader plays out with KFImage. If I remove GeometryReader, or even just assign a fixed width to the image, the image loads correctly.
Is this a known issue?

Ummm,
I cannot reproduce this issue in the demo app in this repo.
What is your Kingfisher version or is it an issue only happens on some certain device or iOS version?
I also append a GIF of this, by using forceRefresh as well as manually cleaning the cache to make sure it loads from network.

Is it possible for you to prepare a reproducible sample so we can have a detail look? Thanks!

@onevcat thanks for checking. I created a minimal iOS project for that and I wasn't able to reproduce it either, so I dug a little bit and found out that the problem only happens when wrapped inside a NavigationView:
            NavigationView {
                GeometryReader { geo in
                    KFImage(
                        URL(string: "https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png")!
                    )
                        .placeholder { ProgressView() }
                        .forceRefresh()
                        .resizable()
                        .scaledToFit()
                        .frame(width: geo.size.width)
                }
            }

I overlooked this in my initial post because NavigationView was applied on the previous list view, sorry for the trouble. Can you reproduce it now?

Hi @onevcat, did you have a chance to take a second look at it?

@ruippeixotog Sure! Please give me some more time...Crazy busy recently. T-T

Hi, @ruippeixotog
I checked this in detail and it is yet another side effect as #1660
I suggest add a .loadImmediately() to make it work for now, until we can drop support of iOS 13 and switch to the @StateObject to have an actual solution.

Or if you do not like the loadImmediately way, you can extract the image related part of the code and make it "context-free" (which means it does not depend on the geo in its context, so it won't be evaluated again).
I don't know why it works without a NavigationView, but it is just some internal magic of SwiftUI View's lifetime 😂
NavigationView {
  GeometryReader { geo in
    MyView()
      .frame(width: geo.size.width)
  }
}

struct MyView: View {
  var body: some View {
    KFImage(
      URL(string: "https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png")!
    )
    .placeholder { ProgressView() }
    .forceRefresh()
    .resizable()
    .scaledToFit()
  }
}

Thanks @onevcat, .loadImmediately() works well for me! Incidentally, it also fixed a similar problem I had when I used .animation(.spring()) on Kingfisher images.

Nice to hear that. That was too bad the the @ObservedObject failed in several places. I really wish we could get rid of that soon.
Thanks for the feedback. Please let me close this for now.


Update preservica-client-fs2 to 0.0.90

About this PR
📦 Updates uk.gov.nationalarchives:preservica-client-fs2 from 0.0.89 to 0.0.90
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "uk.gov.nationalarchives", artifactId = "preservica-client-fs2" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "uk.gov.nationalarchives", artifactId = "preservica-client-fs2" }
}]

labels: library-update, early-semver-major, semver-spec-patch, commit-count:1

Superseded by #187.


[Agon] Island character sheet is buggy

In a previous version of the sheet for the game, there were only two different modes for the sheet of a character - the Player sheet and the Strife sheet. The Strife sheet contained both the celestial sky, the island log and also a section at the bottom where the strife can roll the dice for a challenge tweaking its options.
In the current version it seems the Strife sheet only contains the celestial sky and island log, and a new mode has been created as an "Island" sheet, for the sole purpose of keeping track of opponents and rolling the strife dice.
The Island sheet is buggy, so far I've noticed:

After creating the sheet and adding a first batch of opponent, you can roll the strife dice, by default set to d8, and it works; however, if you change the dice to any other, rolling the dice does not work anymore (even after setting it back to d8 or attempting to use a different opponent). Only way I've found for it to work again is to create a new Island sheet - but you cannot change it from d8 either
After adding a batch of opponents, I tried setting the divine favor dice at the top - it cause the batch of opponents to be deleted. I tried several times with the same result, but after that it never happened again (maybe it stopped after breaking the rolling with the first bug)

@mperes I think this is your work? @fredhicks I think this sheet belongs to Evil Hat?

Is this for the [Agon] sheet, or the [Agon Official] sheet? I see there are two folders in the repository, tho the non-Official was last touched 3 years ago so I think it's not for the 2nd edition of the game, so my assumption based on that is that it's the [Agon Official] one. That's not a sheet that I've personally touched much/at all, but Sean Nittner would know the history there better than I. I've referred him to this post.

Hi Megarancor,
We are unable to recreate this problem, which is usually an indication that the reported behavior is browser-specific. Can you please provide more information on this with that in mind, and/or potentially try using it on a different browser?
Here's a screnshot of on my end (Windows 10, Google Chrome browser) creating an Island and two island characters who both have non-d8 trait dice. I also added d10 Divine Wrath after creating them.
https://www.dropbox.com/s/04qm9bymo6febjr/Example of changing Strife Dice and using Divine Wrath.png?dl=0

I am going to try again right now, I will let you know what happens (if I can reproduce it, I could create a video for you)

Hello, I managed to reproduce it, with a kick - when playing to put this exactly as you had it in the screenshot, I wrote the name of the character, and then it was fixed for that character! So it seems by virtue of the character's name, the character is protected against this bug (or rather the name should be a required field and indicate that to the user for it to work properly).
This is amusingly fitting for the game, actually :)
I captured it in a video, in case you want to reproduce it or fix it in any fashion:
https://youtu.be/xPZ9lDeyAt0


Handle user-entered app link redirects

Task/Issue URL: https://app.asana.com/0/414730916066338/1200571376274550/f
Tech Design URL:
CC:
Description:
User-entered app links that redirect to intent:// links are not being handled after adding the app links feature.
This PR handles those cases.
Steps to test this PR:

Paste https://photoprints.page.link/t-mobile into the search bar
Verify that the "Open in another app" dialog is shown
Verify that clicking open, opens the Google Play app page
(Ensure that DuckDuckGo is the default browser)
Using a physical device, scan the QR code for the same link: https://duckduckgo.com/?q=qrcode+https%3A%2F%2Fphotoprints.page.link%2Ft-mobile
Verify that the "Open in another app" dialog is shown
Verify that clicking open, opens the Google Play app page

Internal references:
Software Engineering Expectations
Technical Design Template

LGTM 👍 GJ @joshliebe, tested and works as described.

Thanks for reviewing @cmonfortep!


Training dataset (sample)

Thanks a lot for open sourcing the repo, including the training code. Do you plan to publish the training datasets?
If not, would it be possible to release a small sample/dummy dataset that is in the format used for training?

Thanks for the clarification!


Feature/issue 882 new nav

Codecov Report

Merging #998 (d4c5cb3) into _V2.2.X_feature_issue_882_navi (ab45396) will not change coverage.
The diff coverage is n/a.

@@                       Coverage Diff                       @@
##           _V2.2.X_feature_issue_882_navi     #998   +/-   ##
===============================================================
  Coverage                           72.50%   72.50%
===============================================================
  Files                                 316      316
  Lines                               22729    22729
===============================================================
  Hits                                16480    16480
  Misses                               6249     6249

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


[Question]: how to launch service from source in an environment of windows and Vscode

Describe your problem
Whether we could execute the first page's steps of official "launch service from source" successfully in an environment of windows and Vscode. Or it is necessary of modify the scripts in steps .

I recomand to start it and debug it by docker container as long as you're not quite familiar with it, which will make an easy start for you.

Do you mean that I need build a updated docker image from source every time to deploy it to container in development stage ?

I recomand to start it and debug it by docker container as long as you're not quite familiar with it, which will make an easy start for you.

Do you mean that I need build a updated docker image from source every time to deploy it to container in development stage ?

Run containers or launch from code in WSL2 is much easier than porting code from linux to windoes.

@yuzhichang Can you please advise on how to set breakpoints for debugging


Update tools for hydrated test

When focused on testing the RPMs, we don't need to follow normal build
procedure. So updating the toolchain for hydrated test in below ways,

Remove unresolved dependency nodes. Let the build proceed and package
fail due to dependency failure. We'll get the info from the log
Don't rebuild a package if its dependency is built. As the build is
only for testing it, there won't be changes which will cause the
dependent package to fail
Don't stop the build after a package build failure. For that if a
package fails to build, record its failure in logs and proceed by
using its pre-built RPM

For this purpose, adding a new macro - RPM_HYDRATED_TEST

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/tools/cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge

Summary

When focused on testing the RPMs, we don't need to follow normal build
procedure. So updating the toolchain for hydrated test in below ways,
 * Remove unresolved dependency nodes. Let the build proceed and package
 fail due to dependency failure. We'll get the info from the log
 * Don't rebuild a package if its dependency is built. As the build is
 only for testing it, there won't be changes which will cause the
 dependent package to fail
 * Don't stop the build after a package build failure. For that if a
 package fails to build, recored its failure in logs and proceed by
 using its pre-built RPM

 For this purpose, adding a new macro - RPM_HYDRATED_TEST

Change Log

Does this affect the toolchain?

NO
Associated issues

Links to CVEs
Test Methodology

Local build

I'm not convinced to ignoring missing dependencies and trying to build anyway. This way we have to wait longer for a failing build and lose that additional information we have now, that the build didn't really fail due to spec misconfiguration but because it's missing a dependency.

I'm with Pawel on this one. I'm not sure I'd trust a positive result for packages building in this fashion, either. Some packages rely on implicit dependency detection in configuration scripts for optional dependencies, which could lead to applicable tests being skipped.

@PawelWMS @thcrain-msft,
the macro REBUILD_DEP_CHAINS served a different purpose. For example if we are rebuild openssl setting REBUILD_DEP_CHAINS=y will cause all the packages depending on openssl to be rebuilt. And this macro is not used anymore. Seems its just a zombie in the Makefile.
the macro STOP_ON_PKG_FAIL=y will stop the entire build on the first package build failure itself. Setting it to "n" will just proceed with the packages which are not depending on the failed package.
Neither of them serve the purpose I required. Here my target is to run ptest of all the packages that are having check section. The TestRPM pipeline is having the feature to run ptest for only one package. In that case all the dependencies of that package will hydrated from the BuildRPM pipeline. No package other than the one specified will be built. The same can be done for all the packages in the branch. But running this pipeline 500 times for 500 different packages is not practical.
With the changes in this PR, I'm trying to mimic running TestRPM pipeline for each package individually.

I removed the unresolved dependency. Otherwise the entire build process will stop at pkgGraph stage itself. Just because one package not having its dependency, all packages' ptest will not run. Like @thcrain-msft mentions it may skip some valid tests, but right now this is the best available option. I believe this will be resolved when we start addressing each package individually.
"STOP_ON_PKG_FAIL=n" will not help here. Because if a package fails to build, it shouldn't be marked as failed. Instead its RPM in the cache should be used for building all of its dependent packages. STOP_ON_PKG_FAIL doesn't provide this support.

@0xba1a: sorry for the long wait! First, let me shortly clarify that by asking to use REBUILD_DEP_CHAINS I meant reviving it in 2.0, since it seemed like you need its functionality anyway. After the detailed explanation of what you're looking for, however, I believe that might not be necessary (but still very welcome :)).
To your point: if I understand your needs, you'd like to use pre-built RPMs from the "regular" package builds to jump straight to building only the packages with a %check section without having to wait for the dependencies (since all of them are already present). If that's correct: love it, sounds like it's going to save everyone a ton of time. I think we should approach doing that a bit differently, though.
With the current implementation we're shredding the dependency graph to pieces, making it no longer reflect the dependencies between packages and rendering it useless for any post-failure analysis. Having to go through build logs to figure out what went wrong is a regression from what the dependency graph offers, and I'd prefer to avoid it. Instead of that, I'd suggest using a special kind of node we've introduced recently to break circular dependencies between pre-built RPMs: TypePreBuilt. What this would require:

Iterate through each SRPM's build node (type: TypeBuild, status: StateBuild).
For each SRPM build node, look for its pre-built dependencies (function: pkggraph.IsSRPMPrebuilt).
For each pre-built dependency: clone it, update the clone (type: TypePreBuilt, status: StateUpToDate).
Make all nodes for that SRPM from the 1st point depend on this new clone instead of the old dependency.

This way:

All packages you want to build will start immediately, since their dependencies should be already present.
At the same time we get a more universal solution, which will also handle cases where only some of the dependencies are present, which will be very useful for people performing local builds.
The graph still correctly reflects the dependencies between packages.
Any build errors will still be accurate and help with debugging any build issues.

Look inside the fixPrebuiltSRPMsCycle function to see how the steps above are implemented. It's possible you'll be able to re-use a part of that function if we're lucky.
And we can use the PACKAGE_BUILD_LIST and PACKAGE_REBUILD_LIST arguments to select a subset of packages to build (in your case, the ones with the %check section`).

Agree with Pawel re: editing the graph nodes to PreBuilt.
I'm not a huge fan of adding special more special case handling to the scheduler. We already have so many branching paths in there.
We are meant to have all the requirements satisfied since we started hydrated. If we make that a core assumption, we should be able to take a transformed graph like Pawel suggested. For every single build node, replace all its dependencies with prebuilt nodes. If anything isn't pre-built that means we didn't hydrate correctly, I think?
I'm actually curious if we can use the existing caching behaviour to do some of this (I haven't looked at it in detail, fyi). My understanding is that the scheduler won't rebuild existing packages unless we trip the dependent package check. If we add an option to suppress the rebuild of downstream packages, and pass a list of packages with check section to PACKAGE_REBUILD_LIST we might get the desired behaviour.

Another option: We add an optional graph processing step.
Take our normal graph:

Add a 'check' goal node
for every package with a %check section:

clone its nodes, add its dependencies as prebuilt versions

create a subgraph against the check goal
pass to the scheduler as normal

In theory every package with a check section should be immediately ready to build, and we should have no dependent package rebuilds because no packages actually depend on each other.

Ok, here are my suggestion: Add a step which converts nodes to the prebuilt nodes (if they are not part of the PACKAGE_REBUILD_LIST). This means any package which is present will be used, even if normally we would like to rebuild it. We can also have a flag to stop dependent packages rebuilding if needed.
If we do that we should be able to leave the scheduler mostly the same.
Personally, I might add an optional extra step in the makefile to do this step, but it could be included in the existing tools if desired.

Correct PR - https://github.com/microsoft/CBL-Mariner/pull/1958


How to create entity with existing FK

type Book struct {
    gorm.Model
    Name      string
    Authors   string
    Libraries []Library `gorm:"many2many:book_libraries"`
}

type Library struct {
    gorm.Model
    Name string
}

func createBook(name, author, lib){
    db.Model(&Book{}).Create(&Book{
        Name:      name,
        Authors:   authors,
        Libraries: []Library{Library{ID: uint(lib)}}, //can't create library with id
    })
}

How to create new Book if library with id lib alredy exist?
surely I must first make a selection like:
library := Library{}
db.First(&library, lib)

and then
db.Model(&Book{}).Create(&Book{
        Name:      name,
        Authors:   authors,
    }).Associations("Libraries").Append(library)

db.Create(&lib)


custom page for http errors also

Hi,
I saw in the source code that many http errors are directly returned as english messages like "403 unauthorized or 503 ressource unavailable  etc..."
I already defined a custom template for exception errors but these errors are not rendered with it.

Can you give me some example of how you're trying to implement it? If it's what I'm thinking, Are you referring to the Response::$codes static array with all the messages there? If that's true can you show me how you're trying to override it?

Sorry i'm not currently using this.
I just saw static "header('Location:' .....410) functions in source code.....

So is there something that still needs to be fixed if you aren't using it anymore?

I'm currently developing a dating website with the help of bolt AI that is based on Flightphp and Cash.js.
I have many other priorities, but as I've planned the website to be multilingual, it surprised me to see static error messages in a framework without the possibility of returning them to a custom page.

So you can actually overwrite the error method with any error that is thrown and you can put it through whatever mechanism you have for multiple languages.
https://docs.flightphp.com/learn/extending#overriding-framework-methods
Here's the list of extendable methods:
https://docs.flightphp.com/learn/api

Assuming this is fixed.

I completely dropped FlightPHP from the website.
I'm trying to rebuild all the website from a tiny router + a PSR11 container class.


Install os-agent in Debian (inside docker container)

I'm triying to install os-agent_1.5.1_linux_x86_64.deb in debian:stable image but show some errors:
root@8f1d877355be:/# dpkg -i os-agent_1.5.1_linux_x86_64.deb  (Reading database ... 15375 files and directories currently installed.) Preparing to unpack os-agent_1.5.1_linux_x86_64.deb ... System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/docker.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/containerd.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/ModemManager.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/NetworkManager.service": No such device or address Removed "/etc/systemd/system/multi-user.target.wants/haos-agent.service". Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/remote-fs.target": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/wpa_supplicant.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sockets.target.wants/docker.socket": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.timesync1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/graphical.target.wants/udisks2.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-pstore.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-resolved.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/apparmor.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service": No such device or address Failed to disable unit, file<EMAIL_ADDRESS>No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.resolve1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/e2scrub_all.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/fstrim.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/docker.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/containerd.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/ModemManager.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/NetworkManager.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/remote-fs.target": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/wpa_supplicant.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sockets.target.wants/docker.socket": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.timesync1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/graphical.target.wants/udisks2.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-pstore.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-resolved.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/apparmor.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service": No such device or address Failed to disable unit, file<EMAIL_ADDRESS>No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.resolve1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/e2scrub_all.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/fstrim.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer": No such device or address dpkg: warning: old os-agent package pre-removal script subprocess returned error exit status 1 dpkg: trying script from the new package instead ... System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/docker.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/containerd.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/ModemManager.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/NetworkManager.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/remote-fs.target": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/wpa_supplicant.service": No such device or address Failed to disable unit, file "/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sockets.target.wants/docker.socket": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.timesync1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/graphical.target.wants/udisks2.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-pstore.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-resolved.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/apparmor.service": No such device or address Failed to disable unit, file "/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service": No such device or address Failed to disable unit, file<EMAIL_ADDRESS>No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-org.freedesktop.resolve1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service": No such device or address Failed to disable unit, file "/etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/e2scrub_all.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/fstrim.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/apt-daily.timer": No such device or address Failed to disable unit, file "/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer": No such device or address dpkg: error processing archive os-agent_1.5.1_linux_x86_64.deb (--install):  new os-agent package pre-removal script subprocess returned error exit status 1 System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Created symlink /etc/systemd/system/multi-user.target.wants/haos-agent.service → /lib/systemd/system/haos-agent.service. System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down dpkg: error while cleaning up:  installed os-agent package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:  os-agent_1.5.1_linux_x86_64.deb
And my hardware is x86_64... what's wrong?
root@8f1d877355be:/# uname -a Linux 8f1d877355be 4.4.180+ #42962 SMP Sat Apr 8 00:14:26 CST 2023 x86_64 GNU/Linux
Thanks.

what's wrong?

What is wrong, is that this is not meant to be installed in a container.
As you can see during startup it misses all kinds of software and device access.
Even if you made it work in a container, it would be pretty useless to run there.
Closing this issue, as this is not a use case this was designed for.
../Frenck


Support for c-style arrays.

Calculate correct num_fields when there are nested c-style arrays in an aggregate. The idea is from #39 . The example in #39 will not trigger compile errors now, but the output is still not same as expected.
Whole support for c-style arrays need further works.

It's cool that the example no longer causes compile errors, but until there is a complete solution that outputs the expected result, I'd rather have using the library in this way cause a compile error over it failing silently and providing the wrong output.
Merging in this pull request at this point would thus allow users to use blindly trust the library to work in cases like these when it obviously shouldn't be. I think this should be treated as a draft PR.

@ChemiCalChems I agree. I will look into the code and find further solutions to the problem.

@hazby2002 if there are any questions, don’t hesitate to ask. I can help you wherever help is needed.
You are certainly on the right track with your implementation of the Parser for c arrays, though.

Hi all, I am glad to say that the example in #40 has printed expected results. I have added some json tests for write operations. Read operations need further work.

Supporting read operations is not a simple task, and at the very least we should support compilation-time expression of nested braces so that they can be used for aggregates containing c-arrays. Maybe we should do this in PR-s afterward.

Hello everyone, once again I am glad to announce that simple c array support has been implemented. More tests are required on more complex cases (such as combination of c-arrays with Flatten, Rename, etc.)

My implementation uses reinterpret cast, which is dangerous. I am not sure whether there is any hidden dangerous.

I think reinterpret cast is fine in principle...depends on how it is used, of course. I will take a look.

@hazby2002 , this is great work. Were you really born in 2002? Very impressive.
I have noticed a couple of minor things:

It appears that the read operation of your Parser_c_array.hpp simply repeats the code from Parser_array.hpp. There certainly is a fair degree of code duplication there. I think you could greatly simplify the code by having Parser_c_array::read simple call Parser_array::read.
Your test seems to be testing three things at once. It is usually good practice to have one thing to be tested per test. Could you break that up into three tests?
You have inherited from rfl::Result and rfl::Field and specialized that for your class. This violates quite a few C++ best practices. I think a better solution would to be to handle this special case inside the classes themselves. Even though I am not 100% sure what a good solution would like here.

But the important thing is that we now have a proof-of-concept that it can be done. Which is very cool. The rest can be fixed.

Yes, I am a fourth year undergraduate student.
I was exploring many ways and thus some codes do not follow best practices.

It appears that the read operation of your Parser_c_array.hpp simply repeats the code from Parser_array.hpp. There certainly is a fair degree of code duplication there. I think you could greatly simplify the code by having Parser_c_array::read simple call Parser_array::read.

OK. I simply copy the codes from Parser_array.hpp. The reason I didn't just call Parser_array::read is that at first I didn't know what template arguments R,W are and I'm afraid R/W differ between the two classes, but actually they seem to be same.

Your test seems to be testing three things at once. It is usually good practice to have one thing to be tested per test. Could you break that up into three tests?

OK. I was using Google Test and I tend to collect related tests into a single file.

You have inherited from rfl::Result and rfl::Field and specialized that for your class. This violates quite a few C++ best practices. I think a better solution would to be to handle this special case inside the classes themselves. Even though I am not 100% sure what a good solution would like here.

I tried to handle this special case inside the classes but the solution looks some complicated.

@hazby2002 , what is the current stage of this PR? Do you want me to take another look?

@liuzicheng1987  The PR is ready. I did git rebase and fixed the things in your comment. You can take a look at the last 4 commits.

OK, I have taken a closer look at this. (Sorry it took me a while, but I was on a transcontinental flight. I was able to write code, but didn't have access to the internet.).
The first problem that I find is that the logic breaks apart as soon as you add more that one array:
struct Test1 {
  int ints1[3];
  int ints2[3];
};

void test() {
  Test1 test1 = {.ints1 = {1, 2, 3}, .ints2 = {4, 5, 6}};
  write_and_read(test1, R"({"ints1":[1,2,3],"ints2":[4,5,6]})");
}

This fails to compile with the following message:
/home/ubuntu/PRs/hazby2002/reflect-cpp/tests/json/test_c_array_class1.cpp:22:17:   required from here
/home/ubuntu/PRs/hazby2002/reflect-cpp/include/rfl/Result.hpp:237:53: error: could not convert ‘rfl::parsing::NamedTupleParser<rfl::json::Reader, rfl::json::Writer, false, rfl::Field<rfl::internal::StringLiteral<6>{std::array<char, 5>{"ints"}}, int [3]>, rfl::Field<rfl::internal::StringLiteral<6>{std::array<char, 5>{"ints"}}, int [3]> >::collect_errors<1>(const rfl::json::Reader&, const std::array<std::optionalrfl::json::Reader::YYJSONInputVar, 2>&, std::vectorrfl::Error)::<lambda(rfl::Error&&)>((* & std::forwardrfl::Error((* & _value_or_err))))’ from ‘Result<int [3]>’ to ‘Result<std::array<int, 3>>’
237 |         return _f(std::forward(_value_or_err));
For some reason, your logic for transform c arrays to std::arrays fails here.
I am generally a bit unhappy about the fact that we have to implement this workaround in rfl::Result - it seems like a violation of separation of concerns. I don't really have a good solution, though.
Finally, I do not think we need the forward declaration in here:
https://github.com/hazby2002/reflect-cpp/blob/main/include/rfl/internal/bind_to_tuple.hpp
Unless I am missing something, you could simply place bind_to_tuple at the bottom of the code and that would be fine.

By the way...once again, this is very creative and very impressive.

@hazby2002 , the problems seems to arise due the fact that we forced to return std::array in the Parser implementation since normal arrays cannot be returned.

@liuzicheng1987 I agree. The key point id that we must have Result<int[3]> when c arrays cannot be returned. My initial solution is simply treat Result<int[3]> and Result<array<int, 3>> as the same. I don't have better solutions if we do not modify Result.

Yes, obviously, it would be possible to overload the various constructors to support this. But it would add a lot of complexity and that is not really what rfl::Result is meant to be used for. At the moment, I don’t have a very elegant solution either, though. I will have to think about it.

Here is an idea that might work:
We introduce a special wrapper type, rfl::internal::Array<…>. When transforming structs from and to named tuples, we could wrap and unwrap the wrapper type. So then the field type would not be rfl::Field<„Name“, int[3]>, but rfl::Field<„Name“, internal::Array<int[3]>>. So the special case would have to be handled in from_named_tuple and to_named_tuple. And then everything else, Field, Result, Parser could work exactly like it always does, since our wrapper type could be moved and returned.
Do you get what I mean?

@liuzicheng1987 I get it. I will try to implement it in a few days.

@hazby2002 , quick addendum: You would also have to adapt rfl/named_tuple_t. This works using ptr_named_tuple (and should continue to work that way, because otherwise we would not be able support non-copyable fields).
ptr_named_tuple should continue to simply return pointers to the original fields. But I think you can just adapt line 20 in this file:
https://github.com/getml/reflect-cpp/blob/main/include/rfl/named_tuple_t.hpp
You could replace std::remove_cvref_t<std::remove_pointer_t> with something like wrap_in_rfl_array_t<std::remove_cvref_t<std::remove_pointer_t>> and that should to the trick.
If you need any help, let me know. In the meantime, I will also think about ways we could reduce the compile time complexity of identifying the arrays.

@liuzicheng1987
I was stuck when trying to remove the specialization of Result<c-array>. IsReader and IsWriter will cause the instantiation of Result<c-array>, and a compile error where value() tries to return a c-array.  In a word, we must modify everything that might cause the instantiation of  Result<c-array>.
By the way, I have implemented your idea and tests are passed (only when I let AreReaderAndWriter=true and let json::read return auto).

Yes...I see the problem.
When you write a c-array (or a pointer thereto), it won't use rfl::Result, but the concept will still expect the reader to work and return a rfl::Result. I think the solution would be to adapt the concept.
https://github.com/hazby2002/reflect-cpp/blob/main/include/rfl/parsing/IsReader.hpp
There are two functions where rfl::Result<T> is expected. Instead of rfl::Result<T>, let it return rfl::Result< wrap_in_rfl_array_t<T>>. wrap_in_rfl_array_t is defined such that if T is an array, then it is wrapped and if it isn't then wrap_in_rfl_array_t is just T.

@liuzicheng1987
It works but I don't think it a good solution. Especially to_basic_type, I think we should judge the condition when T is basic type, maybe we should split requires into multiple concepts and connect them by logical expressions.

@hazby2002 , yes, I suppose we could do that. Let's have that as a separate issue though.

@liuzicheng1987
This PR is ready if we will do that in a separate PR.

I realized that the reinterpret_cast I'm using technically belongs to UB, and I'm thinking about modifying it.

So, in summary, this is looking very good.
I am very positively surprised that it didn't have any measurable impact on the compile time. Considering just about how much there is going on there, that's a very pleasant surprise. I was initially very concerned about this.
Yes, I agree...the Array probably needs some minor refactoring. Basically, I would use composition over inheritance here, meaning that your Array should HAVE a std_array_t instead of BEING one.
Inheritance is generally seen as something to be avoided in modern programming and inheriting from something that isn't meant to be inherited (like std::array) is not considered good practice.
I also don't really get why you do the reinterpret_cast in the first place...you already have std::array, but then you go ahead and transform in into a c-array, which is less convenient than std::array.
There are a couple of other minor things like this, but I can clean them up myself as well. I think you did an excellent job here.
The one thing that I still have to do is to test this on MSVC. But I arrived in Taiwan two days ago, and I am still pretty jetlagged, so I should get some sleep.
I will test it on MSVC tomorrow. If that runs through (I am optimistic that it will), I will merge the current status. Whatever is then left to do in terms of cleanup, I will do myself.
Really, really great job. Thank you so much for this. This is a very cool thing to do as a first PR.

Thank you for all your help and support. Also, I'm honored to be able to contribute my codes here. It's very cool and lots of fun.

@hazby2002 , I have created a special branch for this:
https://github.com/getml/reflect-cpp/tree/hazby2002-main
That's where I will resolve the remaining code beautifications. Also, some modifications were necessary because I redesigned the way the writer works.

@hazby2002 , merged. Thank you so much for your contribution.

@hazby2002 , do you maybe want to post in the r/cpp group on Reddit, in which you explain how this works? I think people would be very interested in this.

@liuzicheng1987, I have never posted on Reddit before... Maybe I can try to create a post and explain my ideas.

@hazby2002 , did you delete your Reddit account? I tried to message you.

@liuzicheng1987, I deleted the account that was previously associated with my gmail because the username was auto-generated and then I created a new one. I am not able to accept the chat invitation from you, with error message "Unable to join the room.", but I don't know the reason.

OK…I see.


docopt's option's description and [options] shortcut aren't working

according docopt's documentation:

An option's description allows to specify:
that some short and long options are synonymous,
that an option has an argument,
and the default value for an option's argument.

...

"[options]" is a shortcut that allows to avoid listing all options (from list of options with descriptions) in a pattern. For example:
Usage: my_program [options]
--all             List everything.
--long            Long output.
--human-readable  Display in human-readable format.
is equivalent to:
Usage: my_program [--all --long --human-readable]
--all             List everything.
--long            Long output.
--human-readable  Display in human-readable format.

this clearly isn't working in plugin at it's very bad.

I'm sorry but I don't understand your issue as this.

no feedback


calico upgrade to v3

Remake of https://github.com/kubernetes-incubator/kubespray/pull/2855 which i somehow broke :(

ci check this

@atoms we need to set enable_network_policy: true in group_vars/k8s-cluster.yml and in roles/kubespray-defaults/defaults/main.yml

Since all versions seem to follow the main versioning, condensing the 4 separate version variables into a single calico_version variable might might it a bit cleaner?

@verwilst it's going to vary again, most likely.

Canal is failing hard on the new patch.

Fresh install of 1.11.0 from this branch ( using calico ) seems to work like a charm. What kind of Canal issues are you encountering?

Can we get this merged into master to get more testing? ;-)

@verwilst the CI is failing on canal jobs, we should fix that first

Will try to fix this in nearest days, had no time to spawn my test cluster

I've merged this PR into my local clone and can confirm this fixes #3168.
kube-dns works as expected

/approve

/lgtm

Is the upgrade smooth?

@desaintmartin I was installing a new cluster so I didn't see any issues. Upgrade-wise I really can't tell..

@desaintmartin it should be, if not leave feedback or contact me with problems encountered in slack


[WIP] Add optional leveldb cache

This PR allows a leveldb instance to be passed as an option. If present, it will be used to cache processed content.

[x] Implementation
[x] Tests
[ ] maybe include a hash of the options object as part of the cache key.
[ ] Documentation

cc @juliangruber for feedback on this implementation, if you're free. :)

PS there's an experimental/theoretical redo of remark in the works that may help address the performance challenges: https://gist.github.com/wooorm/afb7a2d519d196508deaad60c427615f


Support of python 3.6

Hi @grahamgower,
I noticed that since new version of demesdraw v0.1.1 Python3.6 is no longer supported. Maybe it is possible to include it back? Some of my projects still use version 3.6 and I would like to use demesdraw there.

Ah, sorry. I released I hadn't actually tested 3.6 (not even in CI), so I just assumed it was broken. I'll add 3.6 to the CI tests and make another release ASAP.

Thank you very much @grahamgower, that was really fast!


tvOS and Web- Autoplay next

[x] BCC Media Web
[x] BCC Media tvOS
[x] BCC Media app
[x] Bible Kids app

Design

@fredrikved This does seem to be implemented in web. Can you verify?


Android_apps cannot read the real capacity of battery of Laptop in mA·h

Steps to reproduce
The screenshot will be uploaded later.
✔ Expected Behavior
Wish that
Developers could developed battery_driver of Java of Android to enrich BatteryManager of BatteryService of API of Android;
Android_apps could get and show the true capacity of battery of Laptop in mA·h.
❌ Actual Behavior
Android_apps always show 1000mA·h by mistakes.
WSA has battery_driver of Linux_Kernel,
but has no battery_driver of Java of Android.
So the BatteryManager of BatteryService of API of Android is not full.
Other Software
Nothing
Please specify the version of Windows Subsystem for Android
The newest

Hi, thank you for this feature request. Currently this isn't on our immediate roadmap, but we're always listening to the community!

This was a regression with the update to Android 13.  We'll fix it.

Apparently, the regression was intentional because Android's performance is noticeably worse on battery than on AC power.  We'll have to carefully consider whether to bring it back.  Would your app take advantage of knowing the battery level, and if so, how?

We're currently not planning anything in this space due to potential for app performance regressions and deferring to Windows' virtualization platform to better manage battery and power usage.


Adds function to convert address to/from RIPEMD-160 hash

One of the use-cases of RIPEMD-160 is to store it in the OP_RETURN, instead of the legacy address base58check to save byte space.
Memo.cash uses this to store addresses in the OP_RETURN in the case of actions 0x6d06 and 0x6d07 for example.

Thanks for clarifying, I've checked that these are HASH160 hashes. I've updated the functions, added the additional utility functions and added more test cases.
Great idea updating the docs, I'm on it.


10.0.19041.782 Not Supported

Does anyone have the ini file?

Does anyone have the ini file?

404 :-) Waiting for ini too.

Does anyone have the ini file?

404 :-) Waiting for ini too.

Temporary workaround:

Uninstalling KB4598291 reverts you to supported ver. 10.0.19041.746
Tested.

Hi, can you please give me the ini file that you are using?

Hi, can you please give me the ini file that you are using? Right Now, it's not listening, fully supported

Hi, I tried to run update.bat, but it tells me
[*] Current update date: 2018.10.10
[*] Latest update date: 2018.10.10

and it is still "Not supported".
Where can I find the .ini file to update it manually?

Ciao, puoi per favore darmi il file ini che stai usando? In questo momento, non sta ascoltando, completamente supportato

how did you solve?

See work for me

how did you solve?

After change and save rdpwrap.ini try reboot

how did you solve?

After change and save rdpwrap.ini try reboot

I uninstalled everything. Installed from scratch, I moved all the files to "C: \ Program Files \ RDP Wrapper" updated the ini file and restarted the pc.
Now works.
Previously in the folder "C: \ Program Files \ RDP Wrapper" I had only the files "rdpwrap.ini" and "rdpwrap.dll". Now, however, I also put the releae files. I believe this was the problem.
Thanks for the help


Vue2 - Using provide and inject in components from local file system

Version
2.6.12
Reproduction link
https://jsfiddle.net/egbhs3pt/
Steps to reproduce
Use a parent component and Child component from a folder in your local file system that is not in your current project folder.
This would be the case e.g. for testing reusable components located in their own project folder and wanting to debug them
What is expected?
Injected should be filled properly
What is actually happening?
While the provided function seems to run as it should inject in the child component will fail with "Injection "my_injection" not found"
so while the same component will work with
import { MyComponent } from "my-new-component"
will work (like in the fiddle)
import { MyComponent } from "../../my-new-component"
will fail

you will have to provide a reproduction that actually demonstrates the version that doesn't work. can be in a Github repo.
My suspicion would be that this is actually a problem with the project/build setup, not Vue core.

Plesae read https://new-issue.vuejs.org/?repo=vuejs/vue#why-repro and open a new issue if you manage to boil it down

Done! I made it as simple as possible. The only thing I had to do is to include the "external folder" in the repo as well, but that seems to have the same effect as long as it is an individual project.
11938


#13127: Update ttnn::Shape struct to maintain API parody with existing t::tt_metal::LegacyShape usages

Ticket
Link to Github Issue
Problem description
Remove LegacyShape.
What's changed

Constructor changes:

IMPORTANT: Remove tensor constructor with tt::tt_metal::LegacyShape
Add initializer list for ttnn::Shape
Make ttnn::Shape vector and array constructor non-explicit
Add ttnn::Shape constructor with Padding
Add ttnn::Shape constructor with shape and padding

Method changes:

Add to_array_4D() to ttnn::Shape
Add padding() to ttnn::Shape
Add get_normalized_index() to ttnn::Shape
Add reference to LegacyShape begin() and end() operator
Make return type of with_tile_padding() const

Checklist

[ ] Post commit CI passes
[ ] Blackhole Post commit (if applicable)
[ ] Model regression CI testing passes (if applicable)
[ ] Device performance regression CI testing passes (if applicable)
[ ] New/Existing tests provide coverage for changes

parody -> parity? 😄


[Bug]: Unocss transformerVariantGroup not work

Version
System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
    Memory: 4.99 GB / 15.75 GB
Browsers:
    Edge: Chromium (128.0.2739.63)
    Internet Explorer: 11.0.19041.4355
npmPackages:
    @rsbuild/core: ^1.1.8 => 1.1.10
    @rsbuild/plugin-vue: ^1.0.5

Details
In this way https://rsbuild.dev/guide/basic/unocss
Unocss transformerVariantGroup not work
import { defineConfig, presetUno, transformerVariantGroup } from 'unocss'

export default defineConfig({
  content: {
    filesystem: ['./src/**/*.{html,js,ts,jsx,tsx,vue,svelte,astro}'],
  },
  presets: [presetUno()],
  transformers: [transformerVariantGroup()], // not work
})

Rsbuild

The effect of not using transformers is as follows:

Rsbuild

Reproduce link
https://codesandbox.io/p/github/rspack-contrib/rsbuild-codesandbox-example/main
Reproduce Steps

Rsbuild

This might be an issue with UnoCSS, since Rsbuild only uses UnoCSS as a PostCSS plugin.
Can you file an issue to the unocss repository?

Yeah, I already did that


update kotlin version

I am trying to make sure kotlin dependencies are at > 1.4.0 to make CVE-2020-15824 go away. Kotlin is used by person-directory but only one azure related class:
org.jetbrains.kotlin:kotlin-stdlib:1.3.72
+--- com.squareup.okhttp3:okhttp:4.8.0
|    +--- com.squareup.retrofit2:retrofit:2.9.0 (requested com.squareup.okhttp3:okhttp:3.14.9)
|    |    +--- org.apereo.service.persondir:person-directory-impl:2.0.0
|    |    |    \--- runtimeClasspath

This PR puts the retrofit2 and okhttp3 into their own library and includes it for the azure module that uses that person-directory class that needs them and it includes that group whereever influxdb library is used (they used to be part of that library but I removed so as not to duplicate that block).
Kotlin is needed by jackson but only because jackson-module-kotlin. Not sure if that is used. I added the kotlin-stdlib (indirectly) to the jackson group with a kotlinVersion so it will be kept up to date. Since most person-directory users don't need kotlin, the jackson library is probably responsible for it being in most deployments.
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72
\--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72
     \--- org.jetbrains.kotlin:kotlin-reflect:1.3.72
          \--- com.fasterxml.jackson.module:jackson-module-kotlin:2.11.2
               \--- runtimeClasspath

This is fine, though I would suggest you consider removing kotlin altogether either explicitly or excluding it. I don't think it's used anywhere, and its absence only makes jackson issue a harmless warning.

I removed it from jackson which should keep it out of most deployments, but I removed jackson-module-kotlin (tests ran without it). kotlin-stdlib is still needed when okhttp is used but removing it from jackson library should keep it out of most deployments. I changed a couple annotations from jetbrains NotNull to lombok NonNull.


[REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare

This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.

cc @zhiics @yzhliu @ZihengJiang @Hzfengsy

Thanks @yzhliu @zhiics


Crashes when Batch importing textures.

I'm using the nightly version, but it still crashes every time I try to import multiple textures2d at once (all the texture names are correct).
LOG:
Plugin Batch import textures has crashed. Stacktrace:
System.InvalidOperationException: Target width 0 and height 0 must be greater than zero.
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeHelper.ThrowInvalid(String message)
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeHelper.CalculateTargetLocationAndBounds(Size sourceSize, ResizeOptions options)
at SixLabors.ImageSharp.Processing.Processors.Transforms.ResizeProcessor..ctor(ResizeOptions options, Size sourceSize)
at SixLabors.ImageSharp.Processing.ResizeExtensions.Resize(IImageProcessingContext source, ResizeOptions options)
at TexturePlugin.TextureEncoderDecoder.<>c__DisplayClass9_0.b__0(IImageProcessingContext i)
at TexturePlugin.TextureEncoderDecoder.Encode(Image1 image, Int32 width, Int32 height, TextureFormat format, Int32 quality, Int32 mips)    at TexturePlugin.TextureImportExport.Import(Image1 image, TextureFormat format, Int32& width, Int32& height, Int32& mips, UInt32 platform, Byte[] platformBlob)
at TexturePlugin.TextureImportExport.Import(String imagePath, TextureFormat format, Int32& width, Int32& height, Int32& mips, UInt32 platform, Byte[] platformBlob)
at TexturePlugin.ImportTextureOption.ImportTextures(Window win, List1 batchInfos)    at TexturePlugin.ImportTextureOption.ExecutePlugin(Window win, AssetWorkspace workspace, List1 selection)
at UABEAvalonia.PluginWindow.BtnOk_Click(Object sender, RoutedEventArgs e) in D:\a\UABEA\UABEA\UABEAvalonia\PluginWindow.axaml.cs:line 53

The code that's having the exception is the mipmapping code trying to scale your image down to 0. However, there's a lot of checks to make sure the image you're importing can be mipmapped. Are you sure you don't actually have a 0x0 image you're importing?

The code that's having the exception is the mipmapping code trying to scale your image down to 0. However, there's a lot of checks to make sure the image you're importing can be mipmapped. Are you sure you don't actually have a 0x0 image you're importing?

I exported all the textures and modified some of them again, seems to work now. I think one of my old textures was bugged when I saved it in Photoshop.
But I have another issue: when I try to import more than 50 modified textures, the program freezes (not responding) forever, is it due to my CPU? (2,9 ghz, 6 cores and 12 threads)

It might just be taking a while. Encoding is definitely slower than decoding. The texture import/export doesn't have a progress bar, but it's probably a good idea to add one in a future update.

It might just be taking a while. Encoding is definitely slower than decoding. The texture import/export doesn't have a progress bar, but it's probably a good idea to add one in a future update.

I went to sleep to see if it was just slow, but it was still not responding when I woke up after 9 hours. (I've tried it many times.). Then I asked a friend of mine (who has a better CPU than mine) to try it, and he did it with 80 textures, but when he tried to import more than 100, the program froze too.

I'll have to make a big bundle to test on, but 9 hours definitely isn't right. Is it at max cpu the whole time? How big are the textures you're trying to import? I don't think the code could get stuck in a loop after importing too many textures.

I'll have to make a big bundle to test on, but 9 hours definitely isn't right. Is it at max cpu the whole time? How big are the textures you're trying to import? I don't think the code could get stuck in a loop after importing too many textures.

It uses the maximum CPU in just a fraction of time; all the textures were 512x512.

Can you check what texture format they are? I can't reproduce this with DXT5 images. Ten 2048x2048 images import in one second on my computer with a slightly worse CPU than the one in your screenshot.

Can you check what texture format they are? I can't reproduce this with DXT5 images. Ten 2048x2048 images import in one second on my computer with a slightly worse CPU than the one in your screenshot.

All of them are PNG. I managed to import ten 2048x2048 images too, but my problem is when I try to import more than 50–80.
PS: My 2048x2048 image imports took longer than yours, but it worked. (ten textures)
And it used the maximum CPU the whole time, unlike my previous screenshot.

What texture format are the textures?

What texture format are the textures? Not like png, but like RGBA32 or DXT5. Single selecting a texture and clicking plugins -> edit texture will show this.

Oh sorry, all the textures are ASTC_RGB_8x8


add a unit test for broadcasted input to cover unary operators

@causten I think this PR can be merged.