qtile: Fix QTile restart environment

Description of changes
Issue
I stumbled across a bug in the QTile module where if qtile is restarted via their restart mechanism (https://github.com/qtile/qtile/blob/master/libqtile/core/lifecycle.py#L35), and there are extra packages configured in the module, the Python modules won't be in the new environment, and thus lead to ModuleNotFoundError if the modules are used in config.py.
Notes
The cause of this is that the executable that is being used for restart is the unwrapped package itself, not the python environment that contains the extra packages.
I would welcome a discussion about possible solutions. My solution is sort of an ad-hoc solution, that works, but doesn't seem ideal to me. It seems to me these are basically the options we have:

Change restart behavior inside of QTile to call the correct executable
Make sure the argv[0] for QTile is the python environment wrapper file instead of the QTile unwrapped package
pass packages to the unwrapped package to make module available inside of QTile unwrapped package (what I did)

The other issue is good implementation of one of these options.
I am open to suggestions and willing to implement them myself.
Current solution
Currently I implemented a solution where the package going to the module is overriden, and extraPackages are passed into the propagatedBuildInputs of the unwrapped package. This seems to be working fine. I have also removed the wrapping python environment since it seems to have become obsolete by the change I introduced.
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

This PR is obsolete since https://github.com/NixOS/nixpkgs/pull/307011 was merged with mostly the same code.

I disagree it's obsolete. This PR solves different issue. Yes, including with it also finalPackage that is now merged as well, so part of this PR should be adapted. The underlying issue is still present even with #307011, since it still uses wrapper environment instead of overriding the inputs of qtile itself.

Adapted the PR to new #307011 changes.

Interesting, thanks. And apologies for my too definitive word choice. I couldn't test this myself because I'm not running on xorg but on wayland (where restarting is not possible).
Anyway, I'm looking to change this code anyway in order to support actual session desktop files, so please hold on a bit longer. I hope the changes I want to make will help this case too.

TL;DR of the problem is that qtile sys.executable is set to one coming from pkgs.qtile instead of the finalPackage (final environment) that has the packages such as qtile-extras.

Qtile xorg user here.
Current my config is running on nixpkgs unstable at this commit (2024-05-21).
Using pkill -f qtile -SIGUSR2 to restart, seems to work fine
...
2024-05-31 13:55:42,431 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)

However, I updated my flake inputs to this commit (2024-05-31) and the same manipulation yield the following error:
...
2024-05-31 13:55:42,431 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)
2024-05-31 14:07:14,632 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)
2024-05-31 14:07:16,705 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)

(accidentally restart it twice)

With
 windowManager.qtile = {
   enable = true;
   backend = "x11";
+ extraPackages = ps: [ ps.qtile-extras ];
 };

it seems to work fine too
...
2024-05-31 14:07:16,705 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)
2024-05-31 14:12:13,115 WARNING libqtile lifecycle.py:_atexit():L33 Restarting Qtile with os.execv(...)

Am i missing anything?

Oh you right, added AnalogClock from qtile_extras.widgets
2024-05-31 14:19:54,244 ERROR libqtile manager.py:restart():L250 Preventing restart because of a configuration error:
Traceback (most recent call last):
  File "/nix/store/jn8bd651xg70rpv9d8b5w5a17ayy4058-python3.11-qtile-0.25.0/lib/python3.11/site-packages/libqtile/core/manager.py", line 248, in restart
    self.config.load()
  File "/nix/store/jn8bd651xg70rpv9d8b5w5a17ayy4058-python3.11-qtile-0.25.0/lib/python3.11/site-packages/libqtile/confreader.py", line 129, in load
    self._reload_config_submodules(path)
  File "/nix/store/jn8bd651xg70rpv9d8b5w5a17ayy4058-python3.11-qtile-0.25.0/lib/python3.11/site-packages/libqtile/confreader.py", line 118, in _reload_config_submodules
    importlib.reload(module)
  File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/importlib/__init__.py", line 169, in reload
    _bootstrap._exec(spec, module)
  File "<frozen importlib._bootstrap>", line 621, in _exec
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/sigmanificient/.config/qtile/core/bar.py", line 1, in <module>
    from qtile_extras import widget
ModuleNotFoundError: No module named 'qtile_extras'

It's a bit hard to test the fix as is for me (without modifying some stuff on my config), i'll write a nixos wm test for it

I made a series of patches on the qtile nixos vm test that showcase better the issue:

move qtile.nix -> qtile/default.nix
reflect qtile.nix -> qtile/default.nix in all-tests.nix

nixos/tests/qtile.nix:

add the default config with a small patch featuring qtile_extras
add a test running pkiill -f qtile -SIGUSR2 to force qtile restart
nix-build -A qtile-unwrapped.passthru.tests.qtile

qtile/add-widget.patch:

a small patch file to add the analogue clock from qtile-extras in the bar:

--- nixos/tests/qtile.nix	2024-05-31 14:58:12.676212784 +0200
+++ nixos/tests/qtile/default.nix	2024-05-31 15:09:25.927129179 +0200
@@ -1,15 +1,46 @@
-import ./make-test-python.nix ({ lib, ...} : {
+import ../make-test-python.nix ({ lib, ...} : {
   name = "qtile";

   meta = {
     maintainers = with lib.maintainers; [ sigmanificient ];
   };

-  nodes.machine = { pkgs, lib, ... }: {
-    imports = [ ./common/x11.nix ./common/user-account.nix ];
+  nodes.machine = { pkgs, lib, ... }: let
+    qtile-config = pkgs.callPackage
+      ({ stdenvNoCC, fetchurl, tree }:
+      stdenvNoCC.mkDerivation {
+      name = "qtile-config";
+      version = "0.0.1";
+
+      src = fetchurl {
+        url = "https://raw.githubusercontent.com/qtile/qtile/master/libqtile/resources/default_config.py";
+        hash = "sha256-Y5W277CWVNSi4BdgEW/f7Px/MMjnN9W9TDqdOncVwPc=";
+      };
+
+      prePatch = ''
+        cp $src config.py
+      '';
+
+      patches = [ ./add-widget.patch ];
+
+      dontUnpack = true;
+      dontBuild = true;
+
+      installPhase = ''
+        mkdir -p $out
+        cp config.py $out/config.py
+      '';
+    }) {};
+  in {
+    imports = [ ../common/x11.nix ../common/user-account.nix ];
     test-support.displayManager.auto.user = "alice";

-    services.xserver.windowManager.qtile.enable = true;
+    services.xserver.windowManager.qtile = {
+      enable = true;
+      configFile = "${qtile-config}/config.py";
+      extraPackages = ps: [ ps.qtile-extras ];
+    };
+
     services.displayManager.defaultSession = lib.mkForce "none+qtile";

     environment.systemPackages = [ pkgs.kitty ];
@@ -30,5 +61,8 @@
         machine.wait_for_window(r"alice.*?machine")
         machine.sleep(2)
         machine.screenshot("terminal")
+
+    with subtest("ensure we can restart qtile properly"):
+        machine.succeed("pkill -f qtile -SIGUSR2")
   '';
 })

--- /dev/null	2024-05-29 08:25:18.003968520 +0200
+++ qtile/add-widget.patch	2024-05-31 14:55:47.225636465 +0200
@@ -0,0 +1,19 @@
+--- a/config.py	2024-05-31 14:49:23.852287845 +0200
++++ b/config.py	2024-05-31 14:51:00.935182266 +0200
+@@ -29,6 +29,8 @@
+ from libqtile.lazy import lazy
+ from libqtile.utils import guess_terminal
+
++from qtile_extras import widget
++
+ mod = "mod4"
+ terminal = guess_terminal()
+
+@@ -162,6 +164,7 @@
+                 # NB Systray is incompatible with Wayland, consider using StatusNotifier instead
+                 # widget.StatusNotifier(),
+                 widget.Systray(),
++                widget.AnalogueClock(),
+                 widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
+                 widget.QuickExit(),
+             ],

--- all-tests.nix	2024-05-31 15:03:10.720117695 +0200
+++ all-tests.nix	2024-05-31 15:02:53.903519615 +0200
@@ -783,7 +783,7 @@
   qgis = handleTest ./qgis.nix { qgisPackage = pkgs.qgis; };
   qgis-ltr = handleTest ./qgis.nix { qgisPackage = pkgs.qgis-ltr; };
   qownnotes = handleTest ./qownnotes.nix {};
-  qtile = handleTest ./qtile.nix {};
+  qtile = handleTest ./qtile {};
   quake3 = handleTest ./quake3.nix {};
   quicktun = handleTest ./quicktun.nix {};
   quorum = handleTest ./quorum.nix {};

Using nix-build -A qtile-unwrapped.passthru.tests.qtile:
machine: must succeed: pkill -f qtile -SIGUSR2
machine # [   19.438641] xsession[973]: Current thread 0x00007fcf6d73e740 (most recent call first):
machine # [   19.440837] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/selectors.py", line 468 in select
(finished: must succeed: pkill -f qtile -SIGUSR2, in 0.04 seconds)
(finished: subtest: ensure we can restart qtile properly, in 0.04 seconds)
(finished: run the VM test script, in 20.08 seconds)
machine # [   19.443664] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/asyncio/base_events.py", line 1898 in _run_once
machine # [   19.446190] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/asyncio/base_events.py", line 608 in run_forever
machine # [   19.449796] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/asyncio/base_events.py", line 641 in run_until_complete
machine # [   19.452126] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/asyncio/runners.py", line 118 in run
machine # [   19.455474] xsession[973]:   File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/asyncio/runners.py", line 190 in run
machine # [   19.457604] xsession[973]:   File "/nix/store/vvcadscrir6vlrpf25zlln6vydypzlxr-python3-3.11.9-env/lib/python3.11/site-packages/libqtile/core/manager.py", line 203 in loop
machine # [   19.459820] xsession[973]:   File "/nix/store/vvcadscrir6vlrpf25zlln6vydypzlxr-python3-3.11.9-env/lib/python3.11/site-packages/libqtile/scripts/start.py", line 109 in start
machine # [   19.463392] xsession[973]:   File "/nix/store/vvcadscrir6vlrpf25zlln6vydypzlxr-python3-3.11.9-env/lib/python3.11/site-packages/libqtile/scripts/main.py", line 77 in main
machine # [   19.466019] xsession[973]:   File "/nix/store/pn9nnil1g0nvkal3xrcb89cxs65yxzp0-python3.11-qtile-0.26.0/bin/.qtile-wrapped", line 9 in <module>

Great, thanks for the test. I am not sure what's going on though, your test outputs an error that's completely unrelated to this issue, which can be seen from the stacktrace - for missing qtile-extras there would be stacktrace to config.py where import is. The error happens both with and without this PR applied if I am testing properly, so nothing new introduced by this.

Great, thanks for the test. I am not sure what's going on though, your test outputs an error that's completely unrelated to this issue, which can be seen from the stacktrace - for missing qtile-extras there would be stacktrace to config.py where import is. The error happens both with and without this PR applied if I am testing properly, so nothing new introduced by this.

Any idea how to fix this test?

This is not related to qtile-extras, the issue can be reproduced even without that config patch

This is not related to qtile-extras, the issue can be reproduced even without that config patch

I think the command check at the end is wrong, but i dont know what to replace it with

I can probably take a look at the test in the weekend.
Also, like I mentioned, I'm trying to make the qtile package provide proper desktop session files (for login managers), but this probably requires changes to the wrapping, potentially making work on this PR obsolete (in the best case) or incompatible.

Btw when nixos/tests/qtile: Run only on linux (#315749) will be merged, i think i'll pr a test with qtile-extras. Not restart check, but just a test to ensure it works in first place

FYI: the session files PR should now also fix the underlying issue that this PR addresses

Nice, yes, that includes basically the same code (and more of course), so it should fix this, thanks. Closing this PR.


Filter failed, opc-life-over?

This is a long-standing problem that I haven't found a solution. We currently can't print from the server to a network printer Konical Minolta C454e.
The server is running Ubuntu 16.04 with the distributed cups driver vesion 2.1.3. After many searchings in vain I decided to compile cups version 2.2.7 from this repo. I also installed epm to make deb packages. There were several problems about file conflicts with the installed 2.1.3 version. I forced install the deb packages.  However, upon running lpadmin -m, got this error something like this: Unable to start cups-driverd. I went back to run sudo make install. This solved the problem.
After all of these, I still get status "Stopped - Printer waring". A more detailed view of the status is in the attached screenshot.

FWIW, we can print from ours Windows 7 computers and from other Linux computer running Gentoo with CUPS 2.2.6

This is error_log for job id 72:
E [16/Apr/2018:15:05:20 +0200] [Job 72] Job stopped due to filter errors; please consult the error_log file for details.
D [16/Apr/2018:15:05:20 +0200] [Job 72] The following messages were recorded from 15:05:19 to 15:05:20
D [16/Apr/2018:15:05:20 +0200] [Job 72] Applying default options...
D [16/Apr/2018:15:05:20 +0200] [Job 72] Adding start banner page "none".
D [16/Apr/2018:15:05:20 +0200] [Job 72] Adding end banner page "none".
D [16/Apr/2018:15:05:20 +0200] [Job 72] File of type application/vnd.cups-pdf-banner queued by "user".
D [16/Apr/2018:15:05:20 +0200] [Job 72] hold_until=0
D [16/Apr/2018:15:05:20 +0200] [Job 72] Queued on "C454e" by "user".

D [16/Apr/2018:15:05:20 +0200] [Job 72] STATE: +connecting-to-device
D [16/Apr/2018:15:05:20 +0200] [Job 72] Looking up \"<IP_ADDRESS>\"...
D [16/Apr/2018:15:05:20 +0200] [Job 72] STATE: -connecting-to-device
D [16/Apr/2018:15:05:20 +0200] [Job 72] <IP_ADDRESS>=<IP_ADDRESS>
D [16/Apr/2018:15:05:20 +0200] [Job 72] PDF template file doesn\'t have form. It\'s okay.
D [16/Apr/2018:15:05:20 +0200] [Job 72] hrDeviceDesc=\"KONICA MINOLTA bizhub C454e\"
D [16/Apr/2018:15:05:20 +0200] [Job 72] PID 34152 (/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [16/Apr/2018:15:05:20 +0200] [Job 72] C454e: relocation error: C454e: symbol _ZN16QPDFObjectHandle9removeKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, version LIBQPDF_10 not defined in file libqpdf.so.17 with link time reference
D [16/Apr/2018:15:05:20 +0200] [Job 72] PID 34153 (/usr/lib/cups/filter/pdftopdf) stopped with status 127 (File too large)
D [16/Apr/2018:15:05:20 +0200] [Job 72] Hint: Try setting the LogLevel to "debug" to find out more.
D [16/Apr/2018:15:05:20 +0200] [Job 72] prtMarkerColorantValue.1.1 = \"cyan\"
D [16/Apr/2018:15:05:20 +0200] [Job 72] prtMarkerColorantValue.1.2 = \"magenta\"
D [16/Apr/2018:15:05:20 +0200] [Job 72] Printer make and model: KONICA MINOLTA C550
D [16/Apr/2018:15:05:20 +0200] [Job 72] Switching to Poppler\'s pdftops instead of Ghostscript for Brother, Minolta, Konica Minolta, and Apple LaserWriter 12/640 to work around bugs in the printer\'s PS interpreters
D [16/Apr/2018:15:05:20 +0200] [Job 72] Running command line for pstops: pstops 72 vql \'Test Page\' 1 \'job-uuid=urn:uuid:090670af-d6b7-3d90-4b34-38a8a2357ecd job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1523883919 time-at-processing=1523883919\'
D [16/Apr/2018:15:05:20 +0200] [Job 72] Using image rendering resolution 600 dpi
D [16/Apr/2018:15:05:20 +0200] [Job 72] Running command line for pdftops: pdftops -level3 -origpagesizes -nocenter -r 600 /tmp/0856a5ae0e3d7 -
D [16/Apr/2018:15:05:20 +0200] [Job 72] Started filter pdftops (PID 34171)
D [16/Apr/2018:15:05:20 +0200] [Job 72] Started filter pstops (PID 34172)
D [16/Apr/2018:15:05:20 +0200] [Job 72] prtMarkerColorantValue.1.3 = \"yellow\"
D [16/Apr/2018:15:05:20 +0200] [Job 72] Syntax Warning: May not be a PDF file (continuing anyway)
D [16/Apr/2018:15:05:20 +0200] [Job 72] Syntax Error: Couldn\'t find trailer dictionary
D [16/Apr/2018:15:05:20 +0200] [Job 72] Syntax Error: Couldn\'t find trailer dictionary
D [16/Apr/2018:15:05:20 +0200] [Job 72] Syntax Error: Couldn\'t read xref table
D [16/Apr/2018:15:05:20 +0200] [Job 72] The print file is empty.
D [16/Apr/2018:15:05:20 +0200] [Job 72] PID 34171 (pdftops) stopped with status 1!
D [16/Apr/2018:15:05:20 +0200] [Job 72] PID 34172 (pstops) stopped with status 1!
D [16/Apr/2018:15:05:20 +0200] [Job 72] PID 34154 (/usr/lib/cups/filter/pdftops) stopped with status 1.
D [16/Apr/2018:15:05:20 +0200] [Job 72] Hint: Try setting the LogLevel to "debug" to find out more.

D [16/Apr/2018:15:05:20 +0200] [Job 72] End of messages
D [16/Apr/2018:15:05:20 +0200] [Job 72] printer-state=3(idle)
D [16/Apr/2018:15:05:20 +0200] [Job 72] printer-state-message="Filter failed"
D [16/Apr/2018:15:05:20 +0200] [Job 72] printer-state-reasons=opc-life-over-warning

All of those filters are part of the cups-filters project...
The opc-life-over message coming from the printer just means that it is time to replace the imaging drum...


Somtimes trigger's activation fail

From time to time trigger's activation fail with error :
2021-05-19T12:14:09.7292870Z Failed starting trigger.
2021-05-19T12:14:09.8405136Z ##[warning]HTTP Status Code: BadRequest
Error Code: BadRequest
Error Message: Resource cannot be updated during provisioning
Request Id: e49f64f8-5a8f-4d60-a87e-3b2422aab0bc
Timestamp (Utc):05/19/2021 12:14:09
Should be great to handle this with, may be, a small sleep and a retry.

The issue was mentioned here either:
https://github.com/MicrosoftDocs/azure-docs/issues/30508

@NowinskiK this is an amazing tool you have developed and supported here for the fellow ADF user community.  The fix for this issue would only make this greater!


Refactor core sort functions out and use wrapper

GWTW can link directly to the files and get a good code example

done


cmd/go: get not using GOPROXY and bypassing operation to git

What version of Go are you using (go version)?

$ go version
go version go1.14.4 windows/386

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env

go1.14.4 env
set GO111MODULE=on
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\Vladimir\AppData\Local\go-build
set GOENV=C:\Users\Vladimir\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=*
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Vladimir\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org
set GOROOT=C:\Users\Vladimir\sdk\go1.14.4
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\Vladimir\sdk\go1.14.4\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\Vladimir\go\gpb\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Vladimir\AppData\Local\Temp\go-build933846070=/tmp/go-build -gno-record-gcc-switches

What did you do?
on not accesibly github.com (could be emulated by adding <IP_ADDRESS> github.com into c:\windows\system32\drivers\etc\hosts on windows host or into /etc/hosts on unix one) go get not using GOPROXY and trying to get it directly (bypassing this operation to git)
C:\Users\Vladimir>go get -v github.com/golang/example/hello
go get github.com/golang/example/hello: module github.com/golang/example/hello: git ls-remote -q origin in C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120: exit status 128:
        fatal: unable to access 'https://github.com/golang/example/': Could not resolve host: github.com

What did you expect to see?
go get -v -u github.com/gorilla/websocket
Fetching https://proxy.golang.org/github.com/gorilla/websocket/@v/list

What did you see instead?
fatal: unable to access 'https://github.com/golang/example/': Could not resolve host: github.com

Please rerun the command with -x to see the exact flow of requests.

C:\Users\Vladimir\go\gpb>go1.14.4 get -x github.com/golang/example/hello
# get https://github.com/?go-get=1
mkdir -p C:\Users\Vladimir\go\pkg\mod\cache\vcs # git3 https://github.com/golang/example
# lock C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120.lock# C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120 for git3 https://github.com/golang/example
cd C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120; git ls-remote -q origin
# get https://github.com/?go-get=1: Get "https://github.com/?go-get=1": dial tcp: lookup github.com: getaddrinfow: The requested name is valid, but no data of the requested type was found.
0.098s # cd C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120; git ls-remote -q origin
# get https://github.com/golang/example
# get https://github.com/golang/example: Get "https://github.com/golang/example": dial tcp: lookup github.com: getaddrinfow: The requested name is valid, but no data of the requested type was found.
go get github.com/golang/example/hello: module github.com/golang/example/hello: git ls-remote -q origin in C:\Users\Vladimir\go\pkg\mod\cache\vcs\3eb23b64ac0258a2f08ebd7b6cbc18375720f6f168ee29ad8527f1a84cf52120: exit status 128:
        fatal: unable to access 'https://github.com/golang/example/': Could not resolve host: github.com

/cc @bcmills @jayconrod @matloob

The answer is in your go env output:

set GONOPROXY=*

You have somehow set GONOPROXY to match all module paths — perhaps in your process environment, or perhaps via go env -w. If the latter, go env -u GONOPROXY should fix it.

Thanks, it did help. Need to have the following keys in environment:
>go1.14.4 env
set GO111MODULE=on
set GONOPROXY=
set GOPROXY=https://proxy.golang.org

I close issue


parameterized paths

Sometimes a parameter appears in the middle of a path, e.g.:
/users/{user_id}/profile
/users/{user_id}/friends
/users/{user_id}/preferences

The filesystem based routing scheme doesn't currently accommodate this use case well. Ideally we would model the above like so:
- users
   - user_id
       - friends.js
       - preferences.js
       - profile.js

But that will only match these URLs
/users/user_id/friends
/users/user_id/preferences
/users/user_id/profile

Whereas we want it to match URLs that look like this:
/users/12345/friends
/users/12345/preferences
/users/12345/profile

/users/86753/friends
/users/86753/preferences
/users/86753/profile

/users/99999/friends
/users/99999/preferences
/users/99999/profile

We need a way to identify that the user_id directory is a wildcard, not meant to be matched literally. Where would be the right place to encode that information? How about in user.js?
- users
   - user_id
       - friends.js
       - preferences.js
       - profile.js
- users.js <--- here

// users.js
const USER_ID_REGEX = /^\d{3,10}$/;

export function wildcard(key) {
   if(USER_ID_REGEX.test(key) {
       return 'user_id';
   }
   return key;
}

When parsing the URL /users/99999/profile, Counterfact will look at users.js and find that it has a wildcard function. Since "99999" is a valid user ID, it will next look for ./users/user_id.js and ./users/user_id/profile.js instead of ./users/99999.js and ./users/99999/profile.js
Profile.js will then look something like this:
//profile.js

export function GET({path, store}) {
   return {
      body: `User profile for ${path.user_id}: ${store.users[path.user_id].profile}`
   }
}

export function PUT({path, store, body}) {
    store.users[path.user_id].profile = body;
   return {
      body: `ok`
   }
}

Here's the new logic to look up the most specific matching GET/POST/PUT/PATCH/DELETE function. (I have not tested this code. It's a spike that I plan to rewrite with TDD.)
 endpoint(method, url) {
    function findHandler(tree, path, fallback) {
      const handler = tree.script?.[method] ?? fallback;

      if (path.length === 0) {
        return handler;
      }

      if (tree.children[path[0]]) {
        return findHandler(tree.children[path[0]], path.slice(1), handler);
      }

      const wildcard = tree.script?.wildcard?.(path[0]);

      if (wildcard) {
        return findHandler(wildcard, path.slice(1), handler);
      }

      return handler;
    }

    function notFoundFallback() {
      return {
        status: 404,
        body: `${method} method for endpoint at "${url}" does not exist`,
      };
    }

    return findHandler(
      this.moduleTree,
      url.split("/").slice(1),
      notFoundFallback
    );
  }

Im not sure if you've ever seen how next.js does this, but I really like it. https://nextjs.org/docs/routing/dynamic-routes

Oh, that's nice! Yeah I think I'm gonna steal that instead.

A incomplete and buggy implementation of next.js style routes: #2

I think I may have made this harder than it needs to be. With the current implementation, when Counterfact recieves a request for GET /foo/bar/baz, it will look for a GET function in ./foo/bar/baz.js. If it doesn't find one it will look in ./foo/bar.js and ./foo.js
With next.js style routing, we don't need to support that fallback pattern, and that should make the code a lot simpler.

This is "done" in the main branch now. (Still need to add more tests, update docs, and update the demo app.)

Docs and demo app are updated and I created #25 for tests.


Receiving error when attempting to preview markdown

Pressing Ctrl + Shift + G to preview the Markdown (or selecting that option from the menu) results in a message box displaying the following error using Sublime Text 3 on Windows 7 (64-bit):
Error in GitHubMarkdownPreview package:

fatal: Not a git repository (or any of the parent directories): .git

+1 Same problem

Same problem on mac :/

+1

+1 same problem

+1 same problem on linux

Well, this project seems abandoned.

+1 Same on mac...


chore(scripts): Add vscode launch configuration for debugging

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 46.92%. Comparing base (b943d7e) to head (6d498fa).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #90   +/-   ##
=======================================
  Coverage   46.92%   46.92%
=======================================
  Files          51       51
  Lines        3207     3207
=======================================
  Hits         1505     1505
  Misses       1568     1568
  Partials      134      134

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Adds earlyout on datapager sort

Gain few cpu time ms on old mobile and lowend desktop cpu as it's called each frame.
With that commit, the function disappear from the profiler,  as it seems the native "this._pendingNodes.sort" call is not that optimized, And as it's the most common case, I think it's worth it for such a small change.

@jtorresfabra in the case of paged, not sure about that, but Maybe the sort comparator func could be declared once and for all, instead of at each call.
Not sure if JS compiler optimizer will optimize that away as a "const func" or do the func allocate.
(many does a warning about "do not declare function in loop" and it did appear in profiler so...)

@jtorresfabra in the case of paged, not sure about that, but Maybe the sort comparator func could be >declared once and for all, instead of at each call.

Ok will do, thx.


rails 3 application behaving differently with the elasticsearch 1.7 using elasticsearch-rails and elasticsearch-model gem

Thanks for reading it. I am trying to implement the keyword search in my rails application. I wanted to categorize the results one after the other based on one field value. SO I tried to apply weight using function_score. The weight is working fine and I could able to categorize But the multi match query inside the function_score is not returning all results when I call from rails application But It is returning accurate results when I call it from sense.
Here is My sample Query:
"query": {
"function_score": {
"query": {
"multi_match": {
"query": "reading",
"fields": ["field_1","field_2","field_3"]
}
},
"boost_mode": "sum",
"functions": [
{
"filter": {
"term": {
"field_4": "a"
}
},
"weight": 500
},{
"filter": {
"term": {
"field_4": "b"
}
},
"weight": 400
},
{
"filter": {
"term": {
"field_4": "c"
}
},
"weight": 200
},
{
"filter": {
"term": {
"field_4": "d"
}
},
"weight": 100
},
{
"filter": {
"term": {
"field_4": "e"
}
},
"weight": 50
}
]
}
}
My result from sense: "hits": { "total": 397,
My result from rails3 application is giving 35 records.
Any help would be appreciated.

@raghavendra-prithvi Is this still an issue?

Closing this issue, please open a new one if the problem persists.


Identifying user selections in applications at runtime

The motivating case for this possible new feature involves a portal application in which users specify one or more input files to be staged for their job.  This selection takes place just before the job is submitted through the portal.  When the job runs, the specified files are staged to the execSystemInputDir, but the application does not have easy way to determine which files the user chose.  The best approach currently is for the application to inspect the execSystemInputDir and use a heuristic to discover the files selected by the user.
An improvement might be to support a naming convention known to the application to which user-specified files conform.  This naming convention could be established by the portal, for example, if the portal prefixes each selected file with a known string, such as "userfile_".  Alternatively, Tapis Apps and Jobs could establish a naming convention, for example, by prefixing each staged input file with a prefix in a similar way.  Tapis prefixing could be specified using a new "filePrefix" field in the FileInputs parameter definition.
Another approach would allow users to designate an environment variable that would be assigned the targetPath of a FileInputs definition.  The new "envKey" field in the FileInputs parameter definition would name the key and the value would be the targetPath.  Tapis would pass this key/value pair into container applications at runtime as an environment variable.
There may be other solutions to this problem and a similar solution may be desirable with other parameters that are specified in a system, app or job submission definitions.  In general, we want to make user selections through portals and other interfaces readily accessible to running applications without application developers having to write custom code.  Considerations include consistently extending support to other parameters, such as FileInputArrays, handling directories as well as files, making sure no new injection opportunities are created, etc.

Leaning towards adding envKey to fileInputs and fileInputArrays in Jobs submit requests and application definitions.  The envKey value cannot begin with "tapis" and can only contain characters valid in POSIX environment variable names, with the caveat that they should they should not start with a digit.  Specifically, names should match this regex:  [a-zA-Z][a-zA-Z0-9_]*


dns cache: do not runRemoveCallbacks if runAddUpdateCallbacks has not fired

Description: previously the DnsCacheImpl would fire runRemoveCallbacks for a host when TTL expired even if it had potentially never fired runAddUpdateCallbacks. Therefore, the callback's target (the Dynamic Forward Proxy Cluster) reaches bad state. The Cluster tries to remove a host that doesn't exist from its point of view and trips this assertion. This PR ensures that the DnsCacheImpl only fires runRemoveCallbacks if it has previously fired runAddUpdateCallbacks for a host.
Risk Level: low, fixes erroneous behavior.
Testing: added repro in existing unit tests, and verified that updated code fixed the test.
Signed-off-by: Jose Nino<EMAIL_ADDRESS>

This was originally reproduced in Envoy Mobile https://github.com/lyft/envoy-mobile/issues/671


Create Dockerfile

Create Dockerfile

Hey, really cool project. Do you need multi-arch image or just a specific arch image (e.g. amd64, arm)?

Hey, nice to hear that you like the project. I think it's okay (in 2017), if we only support amd64. But it would be really smart, if the Dokerfile supports multi arch (maybe also Windows) because Go also supports so much architectures. (Raspberry Pi could be also a possible afaik). I personally do not have so much experience in building Dockerfiles, only using or adjusting them for my needs.

Ya, I believe amd64 and arm would be a good entry point for docker images (i have 0 knowledge on docker for windows and/or windows containers atm). I'll do some digging on this topic as soon as i have free time from college.

Glad to hear, that you can take over this issue.


Do you have the complete release note?

I only see the ones after 3.0.0, what about the previous ones?
We are using 2.7.4, but we can no longer find the release note, nor any tag, so we don't know what has been changed in the release.

https://github.com/tronprotocol/tronweb/blob/d30684f5107dfad7f694c208483b43c02e718451/README.md#recent-history

https://github.com/tronprotocol/tronweb/blob/d30684f5107dfad7f694c208483b43c02e718451/README.md#recent-history


Testing technical functions

I'm a bit lost on how to start testing the more technical functions such as my filters and moving average. I don't want to copy and paste a giant array into my testing code/load pre-calculated values from a file, unless that is the only way. Should I mainly just check for input protection and assume that scipy does what it's supposed to? Even so, that won't show that my code does what I want it to...

My current game plan is to do something like this like we did in class: https://github.com/AznStevy/bme590hrm/blob/7c18db12c6a02b23d6b4da8a8f6e05ef706e9379/tests/test_filtered_signal.py#L21
Not sure if this is the best way or not...


How to use Java to load playlist with PierfrancescoSoffritti / android-youtube-player 12.1.0?

First of all thanks for your great works, I have managed to use [PierfrancescoSoffritti 12.1.0 to load Youtube video. I saw that you have supported Playlist Videos as well, I saw your GitHub homepage you have written the following code in Katlin for supporting Playlist , I was wondering what is the equivalent code in Java in regard of supporting playlist ? I mean what is the equivalent of following:
val iFramePlayerOptions = IFramePlayerOptions.Builder()
  .controls(1)
  .listType("playlist")
  .list(PLAYLIST_ID)
  .build()

This is the code I have used but as mentioned earlier only support Youtube Video not playlist . how should I set that the listType would be "playlist" in java , Please kindly help me to fix it to work with Playlist too. Thanks in advance.
here is the code that I need your assistant to kindly help me to fix it :

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.youtube_player);
 playListData = Objects.requireNonNull(getIntent().getExtras())
        .getString("YoutubePlayListUri", "PlayListKey");

    youTubePlayerView = findViewById(R.id.youtubePlay);
    getLifecycle().addObserver(youTubePlayerView);
    if (playListData.startsWith("PL")) {
      youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {
        @Override
        public void onReady(@NonNull YouTubePlayer youTubePlayer) {
          youTubePlayer.loadVideo(playListData, 1);
        }
      });

<com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:id="@+id/youtubePlay"
  app:enableAutomaticInitialization="true"
>

Kindest Regards,
Sincerely
Pooya

IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder().controls(1)
                .listType("playlist")
                .list(PLAYLIST_ID)
                .build();

IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder().controls(1)
                .listType("playlist")
                .list(PLAYLIST_ID)
                .build();

@billdzl Thank you so much for your respond. I have already Tried that but I am not sure if I miss anything I meanAlthough I am able to play Youtube Video but  when I use your suggestion still I can't play Youtube Playlist.  I have 2 questions from you which if you could reply I would highly appreciate it:

could you please kindly clarify after your suggestion code how can I play Youtube Playlists?
Should I change Anything in the Xml Layout to support Youtube Playlists?

I use following code but it can not still play Youtube PlayLists?
    youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {
         @Override
         public void onReady(@NonNull YouTubePlayer youTubePlayer) {
           IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
               .controls(1)
               .build();

// I am not sure how after build how can I play the Youtube Playlists (I have tried following code although I was able to run // YouTube Video but still I can't play Youtube playlist
        //   youTubePlayer.loadVideo(playListData, 1);
         }
       });

All the Best,
Kindest Regards,

you may can see https://github.com/PierfrancescoSoffritti/android-youtube-player/blob/master/core-sample-app/src/main/java/com/pierfrancescosoffritti/androidyoutubeplayer/core/sampleapp/examples/playlistExample/PlaylistExampleActivity.kt

Thanks again,  but as you know honestly the code sample you have provided is for Kotlin , and i have written my application with Java. I have test it by the following Youtube Playlist (PL22201173A69F18EA) which is Free Youtube playlist of Stanford University. could anyone please help me with what change to the my last comment I should do for java support for the Youtube playlist?
Sincerely,
Best Regards

Here you go:
package com.pierfrancescosoffritti.androidyoutubeplayer.core.sampleapp.examples.playlistExample;

import android.os.Bundle;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.YouTubePlayer;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.listeners.AbstractYouTubePlayerListener;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.options.IFramePlayerOptions;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView;
import com.pierfrancescosoffritti.aytplayersample.R;

public class PlaylistExampleActivity extends AppCompatActivity {
    private static final String PLAYLIST_ID = "PLEpEmEcrrKJUhZkyIAgQ17Oxyd3fx_y1j";
    private YouTubePlayerView youTubePlayerView;
    private YouTubePlayer youTubePlayer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_playlist_example);

        youTubePlayerView = findViewById(R.id.youtube_player_view);
        IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
            .controls(1)
            .listType("playlist")
            .list(PLAYLIST_ID)
            .build();

        getLifecycle().addObserver(youTubePlayerView);
        youTubePlayerView.initialize(youtubePlayerListener, true, iFramePlayerOptions);

        Button nextVideoButton = findViewById(R.id.next_video_button);
        nextVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.nextVideo();
            }
        });

        Button previousVideoButton = findViewById(R.id.previous_video_button);
        previousVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.previousVideo();
            }
        });

        Button playSecondVideoButton = findViewById(R.id.play_second_video_button);
        playSecondVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.playVideoAt(1);
            }
        });

        Button shuffleButton = findViewById(R.id.shuffle_button);
        shuffleButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.setShuffle(true);
            }
        });

        Button loopButton = findViewById(R.id.loop_button);
        loopButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.setLoop(true);
            }
        });
    }

    private final AbstractYouTubePlayerListener youtubePlayerListener = new AbstractYouTubePlayerListener() {
        @Override
        public void onReady(YouTubePlayer youTubePlayer) {
            PlaylistExampleActivity.this.youTubePlayer = youTubePlayer;
        }
    };
}

Here you go:
package com.pierfrancescosoffritti.androidyoutubeplayer.core.sampleapp.examples.playlistExample;

import android.os.Bundle;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.YouTubePlayer;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.listeners.AbstractYouTubePlayerListener;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.options.IFramePlayerOptions;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView;
import com.pierfrancescosoffritti.aytplayersample.R;

public class PlaylistExampleActivity extends AppCompatActivity {
    private static final String PLAYLIST_ID = "PLEpEmEcrrKJUhZkyIAgQ17Oxyd3fx_y1j";
    private YouTubePlayerView youTubePlayerView;
    private YouTubePlayer youTubePlayer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_playlist_example);

        youTubePlayerView = findViewById(R.id.youtube_player_view);
        IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
            .controls(1)
            .listType("playlist")
            .list(PLAYLIST_ID)
            .build();

        getLifecycle().addObserver(youTubePlayerView);
        youTubePlayerView.initialize(youtubePlayerListener, true, iFramePlayerOptions);

        Button nextVideoButton = findViewById(R.id.next_video_button);
        nextVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.nextVideo();
            }
        });

        Button previousVideoButton = findViewById(R.id.previous_video_button);
        previousVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.previousVideo();
            }
        });

        Button playSecondVideoButton = findViewById(R.id.play_second_video_button);
        playSecondVideoButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.playVideoAt(1);
            }
        });

        Button shuffleButton = findViewById(R.id.shuffle_button);
        shuffleButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.setShuffle(true);
            }
        });

        Button loopButton = findViewById(R.id.loop_button);
        loopButton.setOnClickListener(v -> {
            if (youTubePlayer != null) {
                youTubePlayer.setLoop(true);
            }
        });
    }

    private final AbstractYouTubePlayerListener youtubePlayerListener = new AbstractYouTubePlayerListener() {
        @Override
        public void onReady(YouTubePlayer youTubePlayer) {
            PlaylistExampleActivity.this.youTubePlayer = youTubePlayer;
        }
    };
}

@PierfrancescoSoffritti
Much Appreciate it. you are really and seriously great. I have searched the example folder but unfortunately  Could not find the XML layout for supporting Youtube  playlist. Could you please kindly provide the Xml Layout sample too? I mean regard your last respond how should I define ("R.id.next_video_button" , "R.id.previous_video_button", "R.id.next_video_button" , "R.id.play_second_video_button" , "R.id.shuffle_button" , "R.id.loop_button" , "R.id.loop_button". Thank you again. Please keep on Great Works. Sincerely,
Kindest Regards.

please refer to https://github.com/PierfrancescoSoffritti/android-youtube-player/tree/master/core-sample-app    ,
If you still don't know how to do it, I feel like you @pooya-mohammadhossein  can give up on Android.
@PierfrancescoSoffritti ,I guess it's possible that the monkey invited it

@PierfrancescoSoffritti  PierfrancescoSoffritti @billdizl  Thanks for your prompt respond. I have managed to successfully Add YouTube Playlist to my Application running on Google Tv chrome cast. however the buttons for handling nextVideo and previousVideo is not working to navigate to the playlists with Google Tv. any advice that how can I change following code in order to work with Google Tv Chromecast Device? ie I mean could you please kindly advice what changes should apply to following codes in order to be compatible with Google Tv? Much Appreciated.
   Button nextVideoButton = findViewById(R.id.next_video_button);
        nextVideoButton.setOnClickListener(v -> {
                youTubePlayer.nextVideo();

        });

Kindest Regards,
Sincerely


30). Add topic files 87 to 90

This PR is for user story #1576037.
It adds four article files, makes corresponding deletions from the C# and VB folders, and adds redirection entries.
Please merge #18050, #18156, and #18197 before merging this.
cc: @BillWagner @mairaw @tfosmark @marteeleigh
Contributes to #4728

do you wanna resolve the merge conflicts here @jameshkramer?


Repl.it demo not working

https://replit.com/@util/codemirror-vim
Hoping to use the demo as a bug testing ground, however I seem to just get a white box in there:

Ooof thanks! Not sure how that regressed but it seems to have been some mix up in dependencies. Should be working now. Fixed in https://github.com/replit/codemirror-vim/commit/e00785d60203419b18dc123ab7a6db81600df2ab


建议再增加 明亮、暗黑、自动 的UI风格显示参数设置

建议再增加 明亮、暗黑、自动 的UI风格显示参数设置

that sounds good

First of all, thanks for making this useful plugin.
I would second on this, I always use "dark" theme for Logseq, however, the drawio dark theme is really hard to use. It will be good if the drawio plugin theme setting could be independently separated from Logseq.
Thank you.

OMG, I can't thank you enough for the quick response and implementation.


feature: filter: add selectors to filter auid (login uid) and rest of credentials

Filtering by the auid (login uid) could be useful as in most daemon and services it is set to the invalid UID -1  unsigned<PHONE_NUMBER>.  https://linux.die.net/man/8/pam_loginuid
Filtering by process credentials is also helpful.
Reference: https://cilium.slack.com/archives/C03EV7KJPJ9/p1704500286846389?thread_ts=1704210424.442369&cid=C03EV7KJPJ9
Solution should be something like:

[ ] matchLoginUid
[ ] matchCredentials: multiple fields of credentials where most of them are unsigned integer matching operation.

- matchLoginUid:
  - operator: "NotEqual"
    values:
    -<PHONE_NUMBER>  # exclude daemons

- matchCredentials:
  - Uid
    operator: "Equal"
    values:
    - 0
    - 1
  - Gid
    operator: "gt"
    values:
    - 1000

I'm not sure about this format... feel free to discuss it first or a open a draft PR then we discuss it there...

/assign


Fix unused variable linting error

This keeps breaking CI for the PR's, so I'm pulling it out to a separate change that I hope is an easy approve.

lgtm


View generated reports on dashboard

User story

As a user
I want / need to view the generated reports on the reporting dashboard.

Acceptance criteria

[x] Last 10 reports generated needs to be shown in a tab on the reporting dashboard.
[x] There should be search functionality over all reports generated.
[x]  When user clicks on any of these reports, a report dashboard should be available (view similar to central dashboard).

Definition of done

Code review from peers has been completed and passed

Code is fully implemented and commented
Adheres to coding guidelines
Commits are not squashed
Code is checked into the repository

Unit tests for backend have been written and are passing
Manual performance tests on the browser are passing
No critical bugs are open

closed on 07.07.2021


feat(biome_js_analyze): useSemanticElements

Summary
this PR add useSemanticElements lint support #2614
Test Plan
insta test

I think you could make the rule name clearer, like useSemanticTagsOverRoles

I think you could make the rule name clearer, like useSemanticTagsOverRoles

sure, how to rename it?, does change directory name enough?

@isnakode  Actually, I don't know the right way, but the following will work.

Create a new rule.
Copy the logic from the old rule to the new one.
Remove references to the old rule in nursery.rs and options.rs.
Delete the old rule's files.
Execute just gen-lint .

Why was this PR closed? The wasn't any need, you could have asked for help :(

Why was this PR closed? The wasn't any need, you could have asked for help :(

oh, sorry, my laptop is being repaired right now, maybe for 2 weeks (maybe longer), so i decided to close the PR so other people can working on it 😄


Potential Security Risk: accessTokenExpiresAt should be mandatory.

Currently we don't prevent the user from "accidentally" returning an access token from the model that is not valid anymore.
I had the case where my accessTokenExpiry property was named expires (as back in the old days). Therefore no check was run and no error was thrown. Meaning an access token once granted was valid infinite.
This pull requests makes it mandatory that always an accessTokenExpiresAt is returned as part of the accessToken from the model.getAccessToken().
I hope I fixed the old unit tests in the correct manner. If not shoot me a message.

+1, This looks like an important change, preventing users from accidentally introducing a huge security risk into their application.
One tiny suggestion to keep the possibility of having infinitely valid access tokens: How about allowing users to specifically return accessTokenExpiresAt = null to indicate that the access token has infinite lifetime?

@maxtruxa Thanks for your review!
I am not sure. If a user receives his model from a database (esp. relational), the value might be set to null instead of undefined, by the database lib. Therefore once again putting the user at a huge sec risk.
Furthermore neither the documentation nor the code (at any point that I have seen) looks like an accessToken should be valid indefinitely. Therefore introducing such a possibility without putting security notices everywhere would create another security risk.
If more people are for allowing null I will put it in. But I don't think that a framework build for security should allow unsecure hacks, especially considering the doc state. 😉

I guess you're right. There isn't really a use case for permanent access tokens anyway, since backend services should use the client credentials grant to obtain an access token.


Create a contact info block

Add links to social networks (LinkedIn, Facebook, Instagram), phone number, email, Telegram username, etc.

I don't no what to discuss, so I added it just to pass the test.


Fallback for adaptive icon extractor

This a generic fix for the icon extractor. it fails to get the icon if extension is using adaptive icons. idk if res/jy.png is the name for 320 icon size but every extension I checked that is using adaptive icons have the same names for the png icons.

Yeah I know it's for within the app and the website. I use this site which seems to look the same but give icons in adaptive version. https://icons.learnpainless.com/icons-launcher.html
Maybe I'll use the other one from now on. I noticed because of the new UA extensions.


New Version?

Hi,
I was wondering if a new version will be cut anytime soon, I see there are many changes since a year ago.
I recently hit an error:
data.shape must start with partitions.shape, got data.shape = [2,64], partitions.shape = [1]\n\t [[{{node SGD/SGD/update_21/DynamicPartition_2}}]]

Which comes from the DynamicEmbeddingOptimizer trying to partition the data. I see in master you no longer use tf. dynamic_partition and use tfra_data_flow_ops.tfra_dynamic_partition which might solve it?

Hey @alykhantejani, thank you for connecting with us. The new version should be available very soon. We noticed the dynamic_partition issue and are working on it. We will get back to you when we get a point. Many thanks!

@rhdong ok thanks, so is still an issue in master?

Hi,
I was wondering if a new version will be cut anytime soon, I see there are many changes since a year ago.
I recently hit an error:
data.shape must start with partitions.shape, got data.shape = [2,64], partitions.shape = [1]\n\t [[{{node SGD/SGD/update_21/DynamicPartition_2}}]]

Which comes from the DynamicEmbeddingOptimizer trying to partition the data. I see in master you no longer use tf. dynamic_partition and use tfra_data_flow_ops.tfra_dynamic_partition which might solve it?

tfra_data_flow_ops.tfra_dynamic_partition is mostly same as tf.dynamic_partition except supporting additional input type. So you may pass an illegal parameter into tf.dynamic_partition OP.

Ok so this probably isnt going to solve my issue. @rhdong you said you noticed the dynamic partition issue? Is this a known bug, perhaps you could shed more light on to what the problem is?

Closing as 0.7.0 is released


Please add a reference to the minimum supported Windows 10 version

Working with some customers we have find out that not all the parameters of the Remove-AppxPackage command are supported in every version of Windows 10. For example, on Windows Server 2016 (based on Windows 10 14393), the -AllUsers parameter is not recognized. It works fine, instead, on machines running Windows 10 1809 and above.
Can you please add this information?
Thanks!

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

ID: bc0b0cd3-1201-f5e2-907e-5712eda675da
Version Independent ID: b722fa48-0af3-27ea-9f86-4f48b9972d19
Content: Remove-AppxPackage (appx)
Content Source: docset/windows/appx/Remove-AppxPackage.md
Product: w10
Technology: powershell-windows
GitHub Login: @andreabarr
Microsoft Alias: v-anbarr

An independent contributor will follow up with your feedback, thank you for the heads up.

Unfortunately, the existing documentation covers up to version 2016 and we have been informed that the documentation support for Server 2019 is in progress.
Thank you for providing feedback.


400 in Create VM with Secure Web Server

I think this is a known issue, but for completeness.

This is the issue that is dependent on the Cloud Shell team.  We are in discussion with their Eng and PM teams.

Note that this is no longer a CloudShell issue.  We need tokens that are not standard in the base Cloud Shell.  These are usually passed in via whatever blade/experience needs it, however we currently do not have the elevated permissions for this.  We are escalating with the permissions team.

PJ has escalated, but approval process from other teams is slow.  PJ has created a proposal for CloudShell adopting our React component.

Ticket for graph permissions is cancelled for now as little progress is expected.  However, the permissions to solve this specific issue (Key Vault) are still expected to be fixed.

Issue moved to private board


New v32 broke my workflow with Enter opening actions instead of selecting the item.

When working I often used the shortcut Super+z to open the list of items and select the one I want to reuse with my arrow keys and enter without having to use my mouse. Now I'm forced to move my hand from the keyboard and to the mouse just to select by clicking, making it a lot less efficient workflow.

Fixed in version 33


What does this pre-trained model do for the front-end?

This work is very inspiring.
I'm not sure if it's possible to think of an encoder that can be used on the front end like Hubert? Or for Speechtokenizer's loss alignment.
Do you have any thoughts or insights?

Ok. My WeChat num: ThuKaiLi.


Cursor Text Highlighting Color in Decompile Window

Describe the bug
The Cursor Text Highlighting feature allows you to highlight other instances of a variable etc. By default this is done with the middle button on the mouse, although this is customizable. If you change the button in the settings for the Listing Window then the button is also changed for the Decompile Window, which would indicate the settings are actually for both windows. However, a change in color is only applied to the Listing Window, not the Decompile Window. As best as I can tell there is no setting that will change the highlight color for Cursor Text Highlighting in the Decompile Window. I personally am trying to change the color since the nighttime blue light filter I use makes it near impossible to see the default color.
To Reproduce
Steps to reproduce the behavior:

Go to Edit->Tool Options.
Go to Listing Fields/Cursor Text Highlight
Change the highlight color
Use the chosen button (middle by default) to select something in the Listing window to observe the new color.
Use the chosen button to select something in the Decompile window to observe the original color.

Expected behavior
Either for the Decompile window to use the Cursor Text Highlighting color from the Listing Field options, or for there to be a separate settings window that controls both the color and mouse button for Cursor Text Highligting in the Decompile window.
Screenshots
The screenshot shows the DS register with the correct Cursor Text Color Highlighting color in the Listing window and the unaff_SS variable with the incorrect color in the Decompile window.

Environment:

OS: Windows 11 Pro 22H2
Java Version: 21.0.1
Ghidra Version: 10.4
Ghidra Origin: official GitHub distro

The Decompiler does share the middle-mouse highlight color with the Listing.  However, the option for changing that is not the one you have shown.  Instead, it can be found in the options under Listing -> Selection Colors -> Highlight Color.
The options screenshot above shows the values that are used specifically for the colors related to highlighting scoped register usage.  Granted, the fact that that shows Highlight Color is confusing, since it has the same name as the option I mentioned above.
This value can also be changed by editing the theme value for color.bg.highlight.listing.

Thank you. I can confirm this option changes the color in the Decompile window as desired.


Tests not executable from IDE

Describe the bug
It is not possible to run unit tests from within the IDE. I'm using IntelliJ, but have seen this with Eclipse, too.
When the IDE compiles the projects before launching tests, it can't resolve classes from package org.operaton.bpm.impl.juel.jakarta.el.
To Reproduce
Steps to reproduce the behavior:

Open the project in IntelliJ
Open a unit test, e.g. MBeanServiceContainerTest
Press Play Button
See error

Alternatively a similar issue can be produced running Open Rewrite from Maven CLI:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.activeRecipes=org.openrewrite.java.RemoveUnusedImports -Drewrite.exportDatatables=true

This will fail on module operaton-engine:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:testCompile (default-testCompile) on project operaton-engine: Compilation failure: Compilation failure:
[ERROR] /Users/kthoms/Development/git/github/operaton/engine/src/test/java/org/operaton/bpm/application/impl/el/CalledProcessApplication.java:[25,45] package org.operaton.bpm.impl.juel.jakarta.el does not exist
[ERROR] /Users/kthoms/Development/git/github/operaton/engine/src/test/java/org/operaton/bpm/application/impl/el/CalledProcessApplication.java:[39,13] cannot find symbol
[ERROR]   symbol:   class ELResolver
[ERROR]   location: class org.operaton.bpm.application.impl.el.CalledProcessApplication
[ERROR] /Users/kthoms/Development/git/github/operaton/engine/src/test/java/org/operaton/bpm/application/impl/el/CallingProcessApplication.java:[37,13] cannot find symbol
[ERROR]   symbol:   class ELResolver
[ERROR]   location: class org.operaton.bpm.application.impl.el.CallingProcessApplication
[ERROR] /Users/kthoms/Development/git/github/operaton/engine/src/test/java/org/operaton/bpm/engine/test/standalone/el/ExpressionBeanAccessTest.java:[26,45] package org.operaton.bpm.impl.juel.jakarta.el does not exist
[ERROR] /Users/kthoms/Development/git/github/operaton/engine/src/test/java/org/operaton/bpm/engine/test/standalone/el/ExpressionBeanAccessTest.java:[69,43] cannot find symbol
[ERROR]   symbol:   class PropertyNotFoundException
[ERROR]   location: class org.operaton.bpm.engine.test.standalone.el.ExpressionBeanAccessTest

Expected behavior
Any test is executable from the IDE.
Screenshots

Desktop (please complete the following information):

OS: macOS 15.0.1
IDE: IntelliJ IDEA 2023.3.3 (Community Edition)

I'm wondering why

module juel declares an optional dependency on jakarta.el-api. If this module is used then I don't see how the API can be optional. The code will need the API at compile time, and dependent modules as well.
Why is there an abstraction over the Jakarta API? So why is, for example, org.operaton.bpm.impl.juel.jakarta.el.ELContext imported instead of jakarta.el.ELContext.

I see that javax.el is still in the dependency graph. Maybe the transition to Jakarta is not complete?
Shouldn't we get rid of that and use Jakarta APIs only?

Part of the discussion is also here: https://forum.operaton.org/t/javax-vs-jakarta/51/2

One possibility would be to have the shaded classes in a separate artifact that is deployed to Maven Central. Then we could use it as a dependency.

This matches a suggestion that @shiftyseaotter had during a lunchtime discussion. The EL API is pretty stable.
The other question would be, if it is easier to remove the shading and embrace the jakarta namespaces entirely. This might break some (very) old setups with outdated JDK, but I'm not sure that would be a very big impact

I think for now it would be a nice idea to create a separate repository and remove the shading-lib from the monorepo. This separates the problematic code, results in the Maven build working again, and does not lead to any versioning-issues, as the shaded library does not need to follow any of Operatons release numbers. What do you thin?

I have now a PR ready that would refactor the usage of shaded classes by jakarta-el API. If we would agree that we do not need to shade jakarta-el, since it is quite stable and fulfill the needs, then we could go forward with it.
If you prefer to have the shaded "jakarta-el for juel", then feel free to create a repository. This could be a container for other 3rd party APIs then.


Add the ability to specify a list of candidate encodings when guessing encoding (#36951)

Corresponds to #36951 in Feature request.
This request adds a new setting files.candidateGuessEncodings.
Setting this will narrow down the encodings guessed by the charset auto-guesser (jschardet).
The threshold is also lowered from 0.2 to 0 so that the encoding can be guessed as much as possible.
This is to ensure that the encoding is returned even when the confidence level is small, as in the following added text

src/vs/workbench/services/textfile/test/node/encoding/fixtures/some.shiftjis.1.txt

In case it cannot be determined, files.encoding is respected

@yutotnh thanks for this, I have made some changes on top of yours.
One thing I would like to discuss outside of this PR is your change of threshold from 0.2 to 0. I reverted it back to how it was because I felt it was not part of solving the issue https://github.com/microsoft/vscode/issues/36951
Can you elaborate why you want to change the threshold and should that maybe be another new setting?

just installed insiders and have two bugs, one unrelated is trying to open files by rightclick now freezes file explorer window, menu never pops up, maybe some vscode insiders or something related preventing it get menu items list...
second, the guess DOES NOT WORK AT ALL awindows1250, pair with utf8 in candidate json list, reverse the order.. it always opens as utf8 - adding file for test, zipped to avoid modification on saving here
__textSample-windows1250.zip
the file always opens as utf, the detection of the windows1250 never passes. maybe lower the required score in jschardet if using this candidate list ?

@peminator I can see a change in jschardet for your file:
3.0.0
[
  { encoding: 'windows-1252', confidence: 0.95 },
  { encoding: 'ISO-8859-2', confidence: 0.5168639982162754 }
]

3.1.2
[
  { encoding: 'ISO-8859-2', confidence: 0.5168639982162754 },
  { encoding: 'windows-1252', confidence: 0.01 }
]

When in VS Code insiders I configure:
"files.candidateGuessEncodings": [
        "windows1252"
]

The file opens as Windows 1252 for me, can you try?
As for the change in jschardet, please report an issue to https://github.com/aadsm/jschardet

bpasero seems as specific problem for windows1250 maybe...
u were right if i set candidate include 1252 it opes as it...
{
    "files.candidateGuessEncodings": [
        "windows1250", "windows1252"
    ],
    "files.autoGuessEncoding": true
}

this opens the file as 1252... but its not proper in it see here:

i have entered the correct and expected windows1250 as first and it is skipped, wonder why,
bc thats the whole point, VsCode used to open if autogues various ISO8859-2 or Windows1252 sometimes.. but i really need to open as windows1250 if not valid utf-8

@peminator I do not see windows1250 ever being detected with jschardet, so how would it be able to return it when you configure that setting?

@aadsm any idea why the windows1250 not detected properly in this file ?

bpasero seems as specific problem for windows1250 maybe... u were right if i set candidate include 1252 it opes as it...
{
    "files.candidateGuessEncodings": [
        "windows1250", "windows1252"
    ],
    "files.autoGuessEncoding": true
}

this opens the file as 1252... but its not proper in it see here:
some characters ok, but some get the unknown symbol, and some get misinterpreted, see the last marked letter

should be ľ but is interpreted as ¾

i have entered the correct and expected windows1250 as first and it is skipped, wonder why, bc thats the whole point, VsCode used to open if autogues various ISO8859-2 or Windows1252 sometimes.. but i really need to open as windows1250 if not valid utf-8
Windows-1250 is a Central European encoding, used in Slovak or Czech texts, also as default for older Windows before it went Utf8, so wonder how it gets skipped

@peminator
When jschardet is unable to identify the charset the value set in files.encoding is used and you probably have it set to utf8, I tested the lasted Insider VS code build with the following settings and it does open your “ __textSample-windows1250.php” as windows1250
"files.autoGuessEncoding": true,
"files.encoding": "windows1250",
"files.candidateGuessEncodings": [
        "utf8",
        "windows1250"
    ]

The detection of utf8 seems more reliable then the other encodings, so when using utf8 and another encoding its best to have files.encoding set to the non utf8 encoding as that’s the fallback encoding that is used.

yes right, then it opens up as expected in windows1250,
but with an UNWANTED SIDE-EFFECT of having new files alsoe windows1250 by default

@peminator When jschardet is unable to identify the charset, the value set in files.encoding is used and you probably have it set to utf8, I tested the latest Insider VS code build with the following settings and it does open your “ __textSample-windows1250.php” as windows1250
"files.autoGuessEncoding": true,
"files.encoding": "windows1250",
"files.candidateGuessEncodings": [
        "utf8",
        "windows1250"
    ]

The detection of utf8 seems more reliable then the other encodings, so when using utf8 and another encoding its best to have files.encoding set to the non utf8 encoding as that’s the fallback encoding that is used.

If you need to ability to have new files created as utf8 for example with the "files.encoding": "utf8" and also have a fallback for when jschardet can’t determine the encoding then I guess there would need to be one more option added such as "candidateGuessEncodingsFallback": “windows1250” as an independent variable.

yes nfrance709 that may seem right, then it opens up as expected in windows1250, but with an UNWANTED SIDE-EFFECT of having new files saved as windows1250 by default,
i need exactly the oposite way, have all UTF except old files opened in windows1250 bc of two old projects I still have to manage (may store workkspace setting for it locally, but i also often open files directly on ftp server)

seems overcomplicated, al i now need would be to fix in jschardet to properly recognize also windows1250, i dont see any viable reason why it gets no probability listed in the result of guess, here above mentioned in https://github.com/microsoft/vscode/pull/208550#issuecomment-2151573902 ther is no mention of 1250... something fishy there

If you need to ability to have new files created as utf8 for example with the "files.encoding": "utf8" and also have a fallback for when jschardet can’t determine the encoding then I guess there would need to be one more option added such as "candidateGuessEncodingsFallback": “windows1250” or perhaps have the last value in the "files.candidateGuessEncodings" array be used as the fallback when jschardet can’t determine the encoding.

yes nfrance709 that may seem right, then it opens up as expected in windows1250, but with an UNWANTED SIDE-EFFECT of having new files saved as windows1250 by default,
i need exactly the oposite way, have all UTF except old files opened in windows1250 bc of two old projects I still have to manage (may store workkspace setting for it locally, but i also often open files directly on ftp server)

I have found a particular situation in which Encoding Detection is not working properly.
Having VSCode closed, when I open a file with .sql extension that was encoded with Windows-1252 encoding, via Windows context menu (right click - Open with - VSCode Insiders) it is wrongly opened as UTF-8.
If I open the same file from inside VSCode Insiders its encoding is detected correctly.
If I open the same file via Windows context menu, but having VSCode Insiders previously opened, the encoding is detected correctly.
If I change the file extension to .txt the issue doesn't happen.
Here are my settings:
	"files.autoGuessEncoding": true,
	"files.candidateGuessEncodings": [
		"windows1252",
		"utf8"
	],

I'm attaching the file that I'm using to perform the tests. Since I can't upload a file with .sql extension, it needs to be renamed so that one can replicate the scenario.
test.txt

Theres a nice setting for it too, im thrilled, sucesfully tested with a windows1250 central european text file.
Great work everyone adding to this, both vscode part, and also improving jschardet lib to be better in recognizing win1250.
with setting gues order for the 1250 first, and utf as default, i finallz have, what needed for long zears. All new files default to utf, and anz old files finallz properlz open as windows1250
perfect!


Investigate C# 7.3 & 8.0 impact

Need to verify that there are no new language features that require changes in Razor.

note that we also don't have things like unchecked { }. I think it's pretty safe to assume we don't need it if we've gone this long without some asking.
Giving infinite time, I'd want us to 100% compatible with C#'s feature set, but I wouldn't prioritize this over like anything else.


Broken Python patterns for nearest tests

Both #235 and #239 are based on some wrong assumptions, and has made vim-test to fail in some scenarios, at least for my particular usage:

We shouldn't have to change our existing code to prefix test classes with Test, when existing test classes with Test somewhere in their names already qualify for our test runners.
#239 forces us to use import unittest, and not even considers partial imports like from unittest import TestCase.
No support for test class inheritance, unless the child class is also prefixed with Test.

IMHO, these scenarios are more common than bug #232.

Thank you for the bug report, could you please include an example of the test you are trying to run and we can fix the implementation against it.

Using unittest docs as an example, these are some failing scenarios:
import unittest

class SimpleWidgetTestCase(unittest.TestCase):
    pass

class DefaultWidgetSizeTestCase(SimpleWidgetTestCase):
    def test_widget(self):
        pass

# Should result in DefaultWidgetSizeTestCase:test_widget

from unittest import TestCase

class DefaultWidgetSizeTestCase(TestCase):
    def test_widget(self):
        pass

# Should result in DefaultWidgetSizeTestCase:test_widget

I've created a branch to fix it, could you please give it a try.

Please let know if you have any further feedback on #245 otherwise shall merge during the week.

I've merged the fix into master. Could you please let me know if you still have issues.

I will close this, as https://github.com/janko-m/vim-test/pull/245 should have resolved the issue.

Looks like this is still an issue.


Added simple environment manager

Even though it does not have up to 10 stars yet as stated in CONTRIBUTION guide. I see it to be useful and easy to use, which why i wrote it.
https://github.com/matscode/cakephp-simple-environment-manager

https://github.com/matscode/cakephp-simple-environment-manager

I dont see composer support etc.

PS: Given the fact that https://github.com/cakephp/app/pull/526 and the PR before allows for env stuff natively, this here does not seem to offer much on top, does it?

As @dereuromark said since the 3.5 app skeleton has inbuilt support for .env files (which can be easily replicated in any existing app too), promoting another way for env based config seem unnecessary. Closing that reason.

If you check the date of creation.. it was before the release of cakePHP V3.5.x.. moreso, not everybody gets the hang of .env files... this makes use of internal cakePHP config override ability lets see some pros and cons of this convention and using .env file below..
Simple Environment Manager
Pros

Helps manage environment based configuration
Perfectly fits when working with team/openSource projects
easy to update production config locally
It automatically switch to use production config if environment is set to  local in bootstrap.php
it does not require .htaccess to discretely protect config files in production as it uses .php based configuration
it is really simple to implement in any environment

Cons

requires over writing cakePHP default bootstrap.php file with custom
it requires .gitignore when working with teamBased/OpenSource projects

.ENV
Pros

helps manage environment configuration
Perfectly fits when working with team/openSource projects

Cons

not every developer gets the hang of it
remote log on is required to update production config
requires  .htaccess file configuration to disable public visibility (else, it poses security issues and what if .htaccess gets deleted)
it requires .gitignore when working with teamBased/OpenSource projects

With this, i believe i should i have convinced you a bit and if theres more i have not stated in the pros and cons. I dont mind learning by been added.
PS: will do an update to make it usable in cakePHP v3.5.x

Even if someone doesn't want to use .env files environment based config is as easy as loading an extra file based on some criteria example for which is already shown in current app skeleton.
Or one can simply use a one liner like:
Configure::load('app_' . env(APP_ENV), 'default');

Someone will have to manually comment out that line each time theres wanting to be a push to production... Moreso imagine i created more configuration files e.g payment_api.php, twilio.php etc.. and all this files uses a different environments (production, local, staging/development) based configuration... in simple environment manager all you have to do is add your default and override configuration file name to the configList ...

and even if you forget to change your environment from local to production in production simple environment manager does some check and set the environment to production which will load production overrides instead of local overrides...

i hope i am not taking much of your time @ADmad ...

Should I go ahead make a new pull request? @ADmad @dereuromark

Even though I can see you have invested :heart: in your solution I must say that I see no added value in your solution either mr. @matscode.
FWIW I have been using .env a long time before 3.5 and thus far this has catered for all use cases you described (even with a static .env per environment). Besides that, I think it's very unwise to steer users away from what is core-supported and basically the de facto standard for environment based configurations.
Might not be the feedback you want to hear but alas.

:-D Now i see from your perspective. Nice meeting you guys... @bravo-kernel


Add KerboKatz - SmallUtilities - Afterburner from Kerbal Stuff

This pull request was automatically generated by Kerbal Stuff on behalf of SpaceTiger, to add KerboKatz - SmallUtilities - Afterburner to CKAN.
Please direct questions about this pull request to SpaceTiger.

This appears to be a sub-part of https://github.com/KSP-CKAN/NetKAN/blob/master/NetKAN/KerboKatzSmallUtilities.netkan


Browser automatically closing midtest

I have been running a protractor test that closes mid test. I am using jasmine with protractor. The defaultTimeoutInterval is set to defaultTimeoutInterval: 8000000, the allScriptsTimeout is set to   allScriptsTimeout: 10000000. My tests take almost an hour to run for each it() statement. This is because they are waiting on certain objects to appear. When I increase some of my internal times to make the objects appear quicker, the browsers dont close. But this causes the tests to fail as I need to wait for an extended period of time. So what is happening is that the browsers are closing on their own, mid test. I have 4 browser instances running. I do not have browser.close() anywhere in my code and I do nothing to prompt them to close. This is the only error that I get:
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.5', java.version: '1.8.0_73'
Driver info: driver.version: unknown```

I am running webdriver 2.24, newest version of chrome, with protractor version 4.0.9

This is what is causing to me to think that there is a bug somewhere in the codebase.

Hi there!
Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.
From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!


Implement schema option for PsDscAdapter

PR Summary
This pull request adresses partially the option to call dsc resource schema -r <resourceName> for PowerShell adapters. If I'm not wrong, there is also an overarching issue but I couldn't find it. Pardon me on it.
There are other questions popping up with this pull request:

How to define properties with types and description (proposal at 508)?
Should definition metadata be included?
How does the engine handle adapter resources to call schema executable through resource manifest?

PR Context

Please add some tests

@SteveL-MSFT I added one test now with a hardcoded resource manifest. I'm struggling to find out the logic how dsc.exe handles adapter resources types. For now to not break the tests, i have hardcoded the type.
Do you mind helping me out and point me in the right direction? I would have expected the engine to call the dsc schema command on adapter resources directly.


[BUG][Segment Replication] ReplicationFailedException and ALLOCATION_FAILED

Describe the bug
Shard failure, reason [replication failure]], failure [ReplicationFailedException
Failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException.||
Logs:
[2023-09-08T09:28:10,201][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298][0], node[ylgTCi8VSk-iytumnaGxlg], [R], s[STARTED], a[id=1OR-X-XDTrCMLvXWr8k0sw], message [shard failure, reason [replication failure]], failure [ReplicationFailedException[[ppe-000298][0]: Replication failed on  (failed to clean after replication)]; nested: CorruptIndexException[Problem reading index. (resource=/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe)]; nested: NoSuchFileException[/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe]; ], markAsStale [true]] [2023-09-08T09:28:10,201][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298][0], node[ylgTCi8VSk-iytumnaGxlg], [R], s[STARTED], a[id=1OR-X-XDTrCMLvXWr8k0sw], message [shard failure, reason [replication failure]], failure [ReplicationFailedException[[ppe-000298][0]: Replication failed on  (failed to clean after replication)]; nested: CorruptIndexException[Problem reading index. (resource=/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe)]; nested: NoSuchFileException[/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe]; ], markAsStale [true]] [2023-09-08T09:28:20,522][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298][0], node[EDhutdeXT5W5luFLpIF7sw], [R], recovery_source[peer recovery], s[INITIALIZING], a[id=5cUw3rGZSbuWLOSrQygkvA], unassigned_info[[reason=ALLOCATION_FAILED], at[2023-09-08T09:28:10.201Z], failed_attempts[1], delayed=false, details[failed shard on node [ylgTCi8VSk-iytumnaGxlg]: shard failure, reason [replication failure], failure ReplicationFailedException[[ppe-000298][0]: Replication failed on  (failed to clean after replication)]; nested: CorruptIndexException[Problem reading index. (resource=/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe)]; nested: NoSuchFileException[/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe]; ], allocation_status[no_attempt]], expected_shard_size[13863289464], message [failed to create shard], failure [IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [19241322ms]]; ], markAsStale [true]] [2023-09-08T09:28:20,522][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298][0], node[EDhutdeXT5W5luFLpIF7sw], [R], recovery_source[peer recovery], s[INITIALIZING], a[id=5cUw3rGZSbuWLOSrQygkvA], unassigned_info[[reason=ALLOCATION_FAILED], at[2023-09-08T09:28:10.201Z], failed_attempts[1], delayed=false, details[failed shard on node [ylgTCi8VSk-iytumnaGxlg]: shard failure, reason [replication failure], failure ReplicationFailedException[[ppe-000298][0]: Replication failed on  (failed to clean after replication)]; nested: CorruptIndexException[Problem reading index. (resource=/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe)]; nested: NoSuchFileException[/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe]; ], allocation_status[no_attempt]], expected_shard_size[13863289464], message [failed to create shard], failure [IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [19241322ms]]; ], markAsStale [true]] [2023-09-08T09:28:30,607][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298][0], node[ylgTCi8VSk-iytumnaGxlg], [R], recovery_source[peer recovery], s[INITIALIZING], a[id=A7J2Jm_7SAOY2RLIXH-qZA], unassigned_info[[reason=ALLOCATION_FAILED], at[2023-09-08T09:28:20.522Z], failed_attempts[2], failed_nodes[[EDhutdeXT5W5luFLpIF7sw]], delayed=false, details[failed shard on node [EDhutdeXT5W5luFLpIF7sw]: failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [19241322ms]]; ], allocation_status[no_attempt]], message [failed to create shard], failure [IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [20397ms]]; ], markAsStale [true]] [2023-09-08T09:28:30,607][WARN ][o.o.c.r.a.AllocationService] [master-2] failing shard [failed shard, shard [ppe-000298]
It seems segment replication event failed due to index corruption exception because of missing segment file
NoSuchFileException "/usr/share/opensearch/data/nodes/0/indices/rIJ86tpXTIG4h-Cn_MoPRg/0/index/_7tvv.cfe" doesn't exist
and ShardLockObtainFailedException on shard 0.
{   "index": "ppe-000298",   "shard": 0,   "primary": false,   "current_state": "unassigned",   "unassigned_info": {     "reason": "ALLOCATION_FAILED",     "at": "2023-09-08T14:12:35.637Z",     "failed_allocation_attempts": 5,     "details": "failed shard on node [ylgTCi8VSk-iytumnaGxlg]: failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [17065425ms]]; ",     "last_allocation_status": "no_attempt"   },   "can_allocate": "no",   "allocate_explanation": "cannot allocate because allocation is not permitted to any of the nodes",   "node_allocation_decisions": [     {       "node_id": "17zuTMYtQ9KvKKNa7gm0Ig",       "node_name": “\data-az1-1",       "transport_address": “*.*.*.*:9300",       "node_attributes": {         "zone": "az1",         "shard_indexing_pressure_enabled": "true"       },       "node_decision": "no",       "deciders": [         {           "decider": "max_retry",           "decision": "NO",           "explanation": "shard has exceeded the maximum number of retries [5] on failed allocation attempts - manually call [/_cluster/reroute?retry_failed=true] to retry, [unassigned_info[[reason=ALLOCATION_FAILED], at[2023-09-08T14:12:35.637Z], failed_attempts[5], failed_nodes[[EDhutdeXT5W5luFLpIF7sw, ylgTCi8VSk-iytumnaGxlg]], delayed=false, details[failed shard on node [ylgTCi8VSk-iytumnaGxlg]: failed to create shard, failure IOException[failed to obtain in-memory shard lock]; nested: ShardLockObtainFailedException[[ppe-000298][0]: obtaining shard lock for [starting shard] timed out after [5000ms], lock already held for [closing shard] with age [17065425ms]]; ], allocation_status[no_attempt]]]"         }       ]     }
Eventually replica shards fall behind primary for too long and huge lagging.
Screenshots
index                       shard prirep state          docs  store ip           node
ppe-000298 1     p      STARTED    33768999 31.4gb 10...*   data-az2-3
ppe-000298 1     r      STARTED     1412441  1.3gb 10...* data-az1-4
ppe-000298 2     p      STARTED    33763101 35.3gb 10...* data-az1-6
ppe-000298 2     r      STARTED     5928658  5.1gb 10...*   data-az2-2
ppe-000298 0     p      STARTED    33758088 30.1gb 10...*   data-az2-1
ppe-000298 0     r      UNASSIGNED
Host/Environment (please complete the following information):

OS: Linux
Version: 2.8.0

We have tried to manually reroute the shard allocation but that didn't help.

Can anyone please advise on how to fix this issue?

Hi @kksaha This looks like the same issue reported here.
To fix on the running cluster you would need to bounce the node that is trying to allocate this shard ppe-000298 0 r UNASSIGNED.
The cause of the corruption has been fixed with 2.9 with this PR.  However, we still need to figure out why the shard was not able to auto recover & re-allocate to the same node.
From your trace, it looks like the shard lock is still being held by the store https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/index/store/Store.java#L868C3-L868C3, meaning post corruption we weren't able to close the shard - so it is unable to recreate.  Working on reproducing this to see whats going on.


Use --allow-extra-chr in plink to accept chrX ALT contigs in VCF

seGMM failed to proceed with plink with an error,
>> Collected feature of X chromosome heterozygosity
When running: plink --vcf HG002.vcf --make-bed --out test_seGMM/plink
An error was occured, please check the parameters!

I tried the plink command outside of seGMM and it appears the problem lies when the input VCF contains ALT contigs like chrX_KI270880v1_alt. So an additional parameter --allow-extra-chr has to be passed to plink in order for it to accept this chromosome name.
Is there a way seGMM handles this? or if not, it would be helpful to add this.
Faizal

By default seGMM runs,
plink --vcf HG002.vcf --make-bed --out test_seGMM/

and this command fails to accept the chrX ALT contig.
But the below plink command worked,
plink --vcf HG002.vcf --make-bed --out test_seGMM/plink --allow-extra-chr

Hi Faizal-Eeman,
Thank you for bringing this to our attention. We appreciate your feedback. Just to clarify, ALT contigs present in the reference genome can sometimes result in multi-location mapping, which can impact the accuracy of variant calling. Therefore, we recommend considering removing ALT contigs from the reference genome prior to mapping to improve the accuracy of variant calling.
Regarding the calculation of the proportion of heterozygous variants on the X chromosome, seGMM uses plink to perform this task. In practice, you only need to provide the VCF file with the X chromosome. To address the issue of extracting variants located on autosomes and X chromosomes, you can use tools such as Vcftools or Bcftools.
We hope this helps clarify any confusion, and please let us know if you have any further questions or concerns.
Sihan

I also had same issue in that
but I debugged in main.py after that I got issue X map function can you resolve the function


Energy statistics for some days are not fetched/stored

Describe the bug
The daily energy stats are not always updating for me but I can manually fetch recordings (via service) for central heating or hot water and then it shows properly in energy dashboard.

Sometimes, on random, statistics for some days are not registered/fetched.
Also if I restart the integration, statistics are fetched and stored properly.
It can be solved by creating automation for fetching recordings daily, but it would be better if possible to find the reason behind this behavior.
Version
Home Assistant 2023.8.4
Supervisor 2023.08.3
Operating System 10.5
Frontend 20230802.1 - latest
HA Bosch component version v0.23.4
EasyControl CT200 v04.02.01

Simple automation which seems to work to fetch data and fill the gaps nightly
`alias: Fetch Bosch gas consumption from yesterday
description: ""
trigger:

platform: time
at: "04:00:00"
condition: []
action:
service: bosch.fetch_recordings_sensor_range
data:
uuid: "UUID-OF-YOU-CT200"
statistic_id: sensor.energy_hot_water
day: >
{{ (as_timestamp(now()) - 24*3600) | timestamp_custom("%Y-%m-%d", True)
}}
service: bosch.fetch_recordings_sensor_range
data:
uuid: "UUID-OF-YOU-CT200"
statistic_id: sensor.energy_central_heating
day: >
{{ (as_timestamp(now()) - 24*3600) | timestamp_custom("%Y-%m-%d", True)
}}
mode: single
`

Hi, thanks for script, i hope that solve my problem with non-working data fetch with old API at all (for widget).
Please, where I find uuid? I see only device_id.
PS: to author - will be good to have ability to switch off useless hourly! fetching for easycontrol CT200.

Hi
For UUID, go to Setting -> Integration -> Bosch Thermostat -> Devices -> Select device which represents your radiator valve, for example for me it is Living Room -> Under Device Info there is Hardware

Ah, sorry, as an IT person I know the standard UUID format, many alphanumeric characters with dashes. :)
In this case, "Hardware" is simply the serial number of the CT200. OK, I'll run your script with s/n as uuid.
Thanks.

Not working as legacy fetch. Only integration reload "some" working...
Nevermind, for my "yesterday" dashboard widget I was use my external fetched influxdb data as new input sensor for HA.
Now I need only one: how stop useless and unnecessary every-hour-fetch one/per/day data from CT200. @pszafer
PS: But still I want send many thanks for this integration. I look forward for sponsoring, but in first I must create some knd of virtual pay card for this.
Github: It is shamed if only direct payment card use is only one method to use ... :(

Fetching of stats should be fixed in https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/releases/tag/v0.24.1
Let me know.
Automation does change too, now you can choose device from the list and integration would find connected UUID itself.
I'll close issue now and reopen if you report that problem somehow still occurs.


Updated XSCreator.py for PHISICS interface

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
#611
What are the significant changes in functionality due to this change request?
Acceleration of parsing input

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[x] 1. Review all computer code.
[x] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[x] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[x] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[x] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[x] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[x] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[x] 8. If an analytic test is changed/added is the the analytic documentation updated/added?

@wangcj05 Since i added some modifications, I can not review this PR.
Can you do that?
Andrea

Yes, I can take a look.

From: Andrea Alfonsi - INL<EMAIL_ADDRESS>Sent: Tuesday, October 2, 2018 4:00:44 PM
To: idaholab/raven
Cc: Congjian Wang; Mention
Subject: Re: [idaholab/raven] Updated XSCreator.py for PHISICS interface (#810)
@wangcj05https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_wangcj05&d=DwMCaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=vJsbMjnzR6ErmdvVqv2kNhwbKhk1o91w6B8VQ4EHCto&m=ougGLehIQuP6uQl7kV8svK_6bgyEMEkLTE5GBxdd2lM&s=qMr35B7hwyxbqTxvJTFJjicw7_vJRCoj67t8IMuetJ8&e= Since i added some modifications, I can not review this PR.
Can you do that?
Andrea
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_idaholab_raven_pull_810-23issuecomment-2D426445302&d=DwMCaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=vJsbMjnzR6ErmdvVqv2kNhwbKhk1o91w6B8VQ4EHCto&m=ougGLehIQuP6uQl7kV8svK_6bgyEMEkLTE5GBxdd2lM&s=jIpRSirVwXr8oJhQ2VWApXKgs3zCaCCuMUABkKc1i00&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AG-2D17wPGx-2DmryUmnkzzFz8H-2DRxYmwFkJks5ug-2DIMgaJpZM4XEaic&d=DwMCaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=vJsbMjnzR6ErmdvVqv2kNhwbKhk1o91w6B8VQ4EHCto&m=ougGLehIQuP6uQl7kV8svK_6bgyEMEkLTE5GBxdd2lM&s=lEvb1hI8_PLUd2lj-u5NRkyWkRiZV2X4nYYHQi5sbbI&e=.

yes lets close it.