waybar crashes after laptop suspend

This occurs every time when my laptop closes, which suspends in my case.
Hopefully this is not a duplicate of many other crash reports, so that efforts are not wasted.
The log:
(waybar:12891): GLib-GIO-WARNING **: 01:42:13.584: Invalid id 2 passed to g_bus_unwatch_name()
terminate called without an active exception
Aborted (core dumped)

I am on waybar 0.9.7
os 5.12.15-arch1-1

I was coming to file the same issue. I've been experiencing it for a week or so, so to manually dig a bit deeper I ran waybar manually with valgrind and did a suspend cycle.
Here's the full log:

$ valgrind waybar
==12821== Memcheck, a memory error detector
==12821== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12821== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==12821== Command: waybar
==12821==
==12821== Warning: ignored attempt to set SIGRT32 handler in sigaction();
==12821==          the SIGRT32 signal is used internally by Valgrind
[2021-07-19 14:48:45.523] [info] Resources files: /home/mvdan/.config/waybar/config, /home/mvdan/.config/waybar/style.css
[2021-07-19 14:48:46.323] [error] media stopped unexpectedly, is it endless?
[2021-07-19 14:48:47.188] [warning] module battery#bat2: Disabling module "battery#bat2", No battery named BAT2
[2021-07-19 14:48:47.309] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:12821): WARNING **: 14:48:48.839: gtk-layer-shell v0.6.0 may not work on GTK v3.24.30. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

(waybar:12821): GLib-GObject-WARNING **: 14:48:48.975: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '73'

(waybar:12821): GLib-GObject-WARNING **: 14:48:48.975: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '72'
[2021-07-19 14:48:49.034] [error] media stopped unexpectedly, is it endless?
[2021-07-19 14:48:49.390] [warning] module battery#bat2: Disabling module "battery#bat2", No battery named BAT2
[2021-07-19 14:48:49.421] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity
[2021-07-19 14:48:51.156] [info] Bar configured (width: 1706, height: 30) for output: eDP-1
[2021-07-19 14:48:51.198] [info] Bar configured (width: 2560, height: 30) for output: DP-1
[2021-07-19 14:48:51.537] [info] Bar configured (width: 1706, height: 30) for output: eDP-1
[2021-07-19 14:49:14.981] [info] Bar configured (width: 1706, height: 30) for output: eDP-1
==12821== Invalid read of size 8
==12821==    at 0x5E3E044: std::_Rb_tree_increment(std::_Rb_tree_node_base const*) (in /usr/lib/libstdc++.so.6.0.29)
==12821==    by 0x15B672: ??? (in /usr/bin/waybar)
==12821==    by 0x15B9F8: ??? (in /usr/bin/waybar)
==12821==    by 0x14681E: ??? (in /usr/bin/waybar)
==12821==    by 0x146A8F: ??? (in /usr/bin/waybar)
==12821==    by 0x14B2B6: ??? (in /usr/bin/waybar)
==12821==    by 0x5A745D8: ??? (in /usr/lib/libglibmm-2.4.so.1.3.0)
==12821==    by 0x5B58014: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5BABB98: ??? (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5B55870: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x59318B5: g_application_run (in /usr/lib/libgio-2.0.so.0.6800.3)
==12821==    by 0x12E47D: ??? (in /usr/bin/waybar)
==12821==  Address 0x7a46c58 is 24 bytes inside a block of size 80 free'd
==12821==    at 0x48419AB: operator delete(void*, unsigned long) (vg_replace_malloc.c:814)
==12821==    by 0x15B660: ??? (in /usr/bin/waybar)
==12821==    by 0x15B9F8: ??? (in /usr/bin/waybar)
==12821==    by 0x14681E: ??? (in /usr/bin/waybar)
==12821==    by 0x146A8F: ??? (in /usr/bin/waybar)
==12821==    by 0x14B2B6: ??? (in /usr/bin/waybar)
==12821==    by 0x5A745D8: ??? (in /usr/lib/libglibmm-2.4.so.1.3.0)
==12821==    by 0x5B58014: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5BABB98: ??? (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5B55870: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x59318B5: g_application_run (in /usr/lib/libgio-2.0.so.0.6800.3)
==12821==    by 0x12E47D: ??? (in /usr/bin/waybar)
==12821==  Block was alloc'd at
==12821==    at 0x483EF3F: operator new(unsigned long) (vg_replace_malloc.c:417)
==12821==    by 0x155371: ??? (in /usr/bin/waybar)
==12821==    by 0x156B55: ??? (in /usr/bin/waybar)
==12821==    by 0x15BCC6: ??? (in /usr/bin/waybar)
==12821==    by 0x12F329: ??? (in /usr/bin/waybar)
==12821==    by 0x13F565: ??? (in /usr/bin/waybar)
==12821==    by 0x13F879: ??? (in /usr/bin/waybar)
==12821==    by 0x140278: ??? (in /usr/bin/waybar)
==12821==    by 0x14704F: ??? (in /usr/bin/waybar)
==12821==    by 0x62E8ACC: ??? (in /usr/lib/libffi.so.7.1.0)
==12821==    by 0x62E8039: ??? (in /usr/lib/libffi.so.7.1.0)
==12821==    by 0x4884FE3: ??? (in /usr/lib/libwayland-client.so.0.3.0)
==12821==
==12821== Invalid read of size 8
==12821==    at 0x5E3E060: std::_Rb_tree_increment(std::_Rb_tree_node_base const*) (in /usr/lib/libstdc++.so.6.0.29)
==12821==    by 0x15B672: ??? (in /usr/bin/waybar)
==12821==    by 0x15B9F8: ??? (in /usr/bin/waybar)
==12821==    by 0x14681E: ??? (in /usr/bin/waybar)
==12821==    by 0x146A8F: ??? (in /usr/bin/waybar)
==12821==    by 0x14B2B6: ??? (in /usr/bin/waybar)
==12821==    by 0x5A745D8: ??? (in /usr/lib/libglibmm-2.4.so.1.3.0)
==12821==    by 0x5B58014: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5BABB98: ??? (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5B55870: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x59318B5: g_application_run (in /usr/lib/libgio-2.0.so.0.6800.3)
==12821==    by 0x12E47D: ??? (in /usr/bin/waybar)
==12821==  Address 0x7a46c48 is 8 bytes inside a block of size 80 free'd
==12821==    at 0x48419AB: operator delete(void*, unsigned long) (vg_replace_malloc.c:814)
==12821==    by 0x15B660: ??? (in /usr/bin/waybar)
==12821==    by 0x15B9F8: ??? (in /usr/bin/waybar)
==12821==    by 0x14681E: ??? (in /usr/bin/waybar)
==12821==    by 0x146A8F: ??? (in /usr/bin/waybar)
==12821==    by 0x14B2B6: ??? (in /usr/bin/waybar)
==12821==    by 0x5A745D8: ??? (in /usr/lib/libglibmm-2.4.so.1.3.0)
==12821==    by 0x5B58014: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5BABB98: ??? (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x5B55870: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.6800.3)
==12821==    by 0x59318B5: g_application_run (in /usr/lib/libgio-2.0.so.0.6800.3)
==12821==    by 0x12E47D: ??? (in /usr/bin/waybar)
==12821==  Block was alloc'd at
==12821==    at 0x483EF3F: operator new(unsigned long) (vg_replace_malloc.c:417)
==12821==    by 0x155371: ??? (in /usr/bin/waybar)
==12821==    by 0x156B55: ??? (in /usr/bin/waybar)
==12821==    by 0x15BCC6: ??? (in /usr/bin/waybar)
==12821==    by 0x12F329: ??? (in /usr/bin/waybar)
==12821==    by 0x13F565: ??? (in /usr/bin/waybar)
==12821==    by 0x13F879: ??? (in /usr/bin/waybar)
==12821==    by 0x140278: ??? (in /usr/bin/waybar)
==12821==    by 0x14704F: ??? (in /usr/bin/waybar)
==12821==    by 0x62E8ACC: ??? (in /usr/lib/libffi.so.7.1.0)
==12821==    by 0x62E8039: ??? (in /usr/lib/libffi.so.7.1.0)
==12821==    by 0x4884FE3: ??? (in /usr/lib/libwayland-client.so.0.3.0)
==12821==
[2021-07-19 14:49:15.213] [info] Bar removed from output: DP-1

(waybar:12821): GLib-GIO-WARNING **: 14:49:15.215: Invalid id 2 passed to g_bus_unwatch_name()

(waybar:12821): GLib-GIO-WARNING **: 14:49:15.224: Invalid id 3 passed to g_bus_unwatch_name()
terminate called without an active exception
==12821==
==12821== Process terminating with default action of signal 6 (SIGABRT): dumping core
==12821==    at 0x6152D22: raise (in /usr/lib/libc-2.33.so)
==12821==    by 0x613C861: abort (in /usr/lib/libc-2.33.so)
==12821==    by 0x5E19801: __gnu_cxx::__verbose_terminate_handler() [clone .cold] (vterminate.cc:95)
==12821==    by 0x5E25C89: __cxxabiv1::__terminate(void (*)()) (eh_terminate.cc:48)
==12821==    by 0x5E25CF6: std::terminate() (eh_terminate.cc:58)
==12821==    by 0x5E255FC: __gxx_personality_v0 (eh_personality.cc:673)
==12821==    by 0x60EB0B3: _Unwind_ForcedUnwind_Phase2 (unwind.inc:182)
==12821==    by 0x60EB7B1: _Unwind_ForcedUnwind (unwind.inc:217)
==12821==    by 0x6107373: __pthread_unwind (in /usr/lib/libpthread-2.33.so)
==12821==    by 0x60FCC08: sigcancel_handler (in /usr/lib/libpthread-2.33.so)
==12821==    by 0x610886F: ??? (in /usr/lib/libpthread-2.33.so)
==12821==    by 0x610A8C9: __futex_abstimed_wait_common64 (in /usr/lib/libpthread-2.33.so)
==12821==
==12821== HEAP SUMMARY:
==12821==     in use at exit: 4,451,938 bytes in 57,634 blocks
==12821==   total heap usage: 771,931 allocs, 714,297 frees, 56,933,377 bytes allocated
==12821==
==12821== LEAK SUMMARY:
==12821==    definitely lost: 156,610 bytes in 199 blocks
==12821==    indirectly lost: 318,868 bytes in 10,941 blocks
==12821==      possibly lost: 15,328 bytes in 56 blocks
==12821==    still reachable: 3,676,972 bytes in 44,139 blocks
==12821==                       of which reachable via heuristic:
==12821==                         multipleinheritance: 848 bytes in 16 blocks
==12821==         suppressed: 0 bytes in 0 blocks
==12821== Rerun with --leak-check=full to see details of leaked memory
==12821==
==12821== For lists of detected and suppressed errors, rerun with: -s
==12821== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 0 from 0)
Aborted (core dumped)

I can try a build with debug info if that would be more useful. I'm simply running 0.9.7 from the Arch repos.

Hm, I built 91cdf80c65dcecf16922e4ac724f37471cbad529 with make build-debug, and I can't get it to crash by suspending. So maybe it's been fixed since? @Inc0ns1st3nt perhaps you could also check if the latest master commit reproduces the crash for you.

I seem to have the same problem, but it also appears when I connect or disconnect an external monitor to my laptop (Waybar v0.9.7).

this seems to have the same root cause, I'd like to use #1158 to collect information on this issue.

Sorry for a late response, especially this new branch do fixes this issue for me, it has now been turned into a warning instead of crashing out the program as it seems
(waybar:81880): GLib-GIO-WARNING **: 00:23:53.616: Invalid id 2 passed to g_bus_unwatch_name()
[2021-07-24 00:23:53.625] [info] Bar removed from output: eDP-1
[2021-07-24 00:23:55.848] [warning] Waybar has been built without rfkill support.
[2021-07-24 00:23:55.850] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

On a side note the most recent update (v0.9.7-5) has caused waybar show after some timeout, the related log is the following
[2021-07-24 00:23:16.867] [info] Resources files: ~/.config/waybar/config, ~/.config/waybar/style.css
Failed to register: Timeout was reached
[2021-07-24 00:23:41.954] [warning] Waybar has been built without rfkill support.
[2021-07-24 00:23:41.964] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:81880): WARNING **: 00:23:42.068: gtk-layer-shell v0.6.0 may not work on GTK v3.24.30. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
[2021-07-24 00:23:42.238] [info] Bar configured (width: 1920, height: 38) for output: eDP-1

This for me is considered a minor issue, but it worth the attention, perhaps then it should be turned into a new thread on its own.

In case it's useful to someone, I've managed to workaround this issue of waybar crashing by moving to run sway with systemd using https://github.com/xdbob/sway-services and created a new service for waybar, so when waybar crashes, it gets restarted by systemd. I don't even notice waybar restarting this way.

Should be fixed on master/0.9.8

i'm in 0.9.13 and this is still happening

i'm in 0.9.13 and this is still happening

Same here.

i have a similar issue with the following setup:
2 Monitors - monitor 1: 1920x1200 (integrated display); external display: 5120x1440
Hyprland - latest git release
waybar - latest git release
module "hyprland/window" enabled
disconnect monitor 2 - wait a second that hyprland manages all the workspace-movements and resizes
reconnect monitor 2 - waybar crashes
waybar -l debug-Output: the last message is the first one after reconnecting monitor 2. waybar is visible on monitor 2 for half a second or so - then it crashes.
[2022-11-09 21:57:32.804] [debug] hyprland IPC received monitorremoved>>DP-4
[2022-11-09 21:57:32.804] [debug] Output removed: Dell Inc. Dell U4919DW
[2022-11-09 21:57:32.805] [debug] Workspace 7 created
[2022-11-09 21:57:32.806] [debug] Workspace 8 created
[2022-11-09 21:57:32.806] [debug] Workspace 9 created
[2022-11-09 21:57:32.807] [debug] Workspace 10 created
[2022-11-09 21:57:32.807] [debug] Workspace 6 changed to state 0
[2022-11-09 21:57:32.807] [debug] Workspace 5 changed to state 0
[2022-11-09 21:57:32.807] [debug] Workspace 9 changed to state 1
[2022-11-09 21:57:32.889] [info] Bar removed from output: DP-4
[2022-11-09 21:57:40.855] [debug] hyprland IPC received activewindow>>,
if i disable hyprland/window, it will not crash in my configuration.
i tried to detect the problem in the source-code - while doing it, i detected, i'm not a c++-programmer ;)
maybe its an empty activewindow sent by hyprlandwm while moving the workspaces back to monitor 2.
Here is the stack-trace - maybe it helps someone:
the segfault is happen in hyprland/window.cpp in line 86: lastview = windowName;
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_assign(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (Unknown Source:0)
libstdc++.so.6!std::__cxx11::basic_string<char, std::char_traits, std::allocator >::assign( __str, std::__cxx11::basic_string<char, std::char_traits, std::allocator > * const this) (/usr/src/debug/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:1571)
libstdc++.so.6!std::__cxx11::basic_string<char, std::char_traits, std::allocator >::operator=(std::__cxx11::basic_string<char, std::char_traits, std::allocator > * const this,  __str) (/usr/src/debug/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:805)
waybar::modules::hyprland::Window::onEvent(waybar::modules::hyprland::Window * const this, const std::string & ev) (/home/erik/.cache/yay/waybar-hyprland-git/src/waybar-hyprland-git/src/modules/hyprland/window.cpp:86)
operator()(const struct {...} * const __closure, const std::string & ev) (/home/erik/.cache/yay/waybar-hyprland-git/src/waybar-hyprland-git/src/modules/hyprland/window.cpp:28)
std::__invoke_impl<void, waybar::modules::hyprland::Window::Window(const std::string&, const waybar::Bar&, const Json::Value&)::<lambda(const std::string&)>&, const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&>(std::__invoke_other, struct {...} &)(struct {...} & __f) (/usr/include/c++/12.2.0/bits/invoke.h:61)
std::__invoke_r<void, waybar::modules::hyprland::Window::Window(const std::string&, const waybar::Bar&, const Json::Value&)::<lambda(const std::string&)>&, const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&>(struct {...} &)(struct {...} & __fn) (/usr/include/c++/12.2.0/bits/invoke.h:111)
std::_Function_handler<void(const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&), waybar::modules::hyprland::Window::Window(const std::string&, const waybar::Bar&, const Json::Value&)::<lambda(const std::string&)> >::_M_invoke(const std::_Any_data &, const std::__cxx11::basic_string<char, std::char_traits, std::allocator > &)(const std::_Any_data & __functor,  __args#0) (/usr/include/c++/12.2.0/bits/std_function.h:290)
std::function<void (std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)>::operator()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const(const std::function<void(const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&)> * const this,  __args#0) (/usr/include/c++/12.2.0/bits/std_function.h:591)
waybar::modules::hyprland::IPC::parseIPC(waybar::modules::hyprland::IPC * const this, const std::string & ev) (/home/erik/.cache/yay/waybar-hyprland-git/src/waybar-hyprland-git/src/modules/hyprland/backend.cpp:98)
operator()(const struct {...} * const __closure) (/home/erik/.cache/yay/waybar-hyprland-git/src/waybar-hyprland-git/src/modules/hyprland/backend.cpp:83)
std::__invoke_impl<void, waybar::modules::hyprland::IPC::startIPC()::<lambda()> >(std::__invoke_other, struct {...} &&)(struct {...} && __f) (/usr/include/c++/12.2.0/bits/invoke.h:61)
std::__invoke<waybar::modules::hyprland::IPC::startIPC()::<lambda()> >(struct {...} &&)(struct {...} && __fn) (/usr/include/c++/12.2.0/bits/invoke.h:96)
std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>)(std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > > * const this) (/usr/include/c++/12.2.0/bits/std_thread.h:252)
std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > >::operator()(void)(std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > > * const this) (/usr/include/c++/12.2.0/bits/std_thread.h:259)
std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > > >::_M_run(void)(std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::modules::hyprland::IPC::startIPC()::<lambda()> > > > * const this) (/usr/include/c++/12.2.0/bits/std_thread.h:210)
libstdc++.so.6!std::execute_native_thread_routine(void * __p) (/usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82)
libc.so.6![Unknown/Just-In-Time compiled code] (Unknown Source:0)


toString() of a CIDR

I think these should be joined by a / instead of , (which I think comes from Array.prototype.toString):
> ipaddr.parseCIDR("<IP_ADDRESS>/24").toString()
 "<IP_ADDRESS>,24"
> ipaddr.parseCIDR("::1%zone/24").toString()
"::1%zone,24"

Can you please prepare a PR?


Modal Rework

A dropdown menu or multi-select for the various proposal flags would be useful.
Current flags that may be used:
Structural - These pertains to structural implementation of budgetary processes (such as multi-sig protocol, fundraising logistics, tokenomics, or this proposal itself)
Bounty Project - These pertain to projects which will have associated $hue (or $bXP) Bounties.
Imbursement - These pertain to either pre-imbursement or re-imbursement for expenses
RUCs - This pertains to Recurring Unit Contributors (covering hiring, terminations, suspensions & mobility)

Assigning issue to self


Highlight table row and chart line

I'm concerned about the performance of UI response when there are many results.
and selected status will be initialized when new results fetched.


🐛 Bug Report: Unable to publish template to Azure

📜 Description
This bug was noted here but case was closed as it went stale: https://github.com/backstage/backstage/issues/13938
The publish:azure template action fails when pushing the code to Azure Git Repo when using Managed Identity for authentication.
We are using managed identity to integrate Backstage with Azure DevOps.

We can read from repo from backstage using MI.
We can create a repo from the template using MI.
We CANNOT push the initial commit to the repo from the template using MI.
NOTE: We CAN push the initial commit to the repo from the template when running local dev which uses a Personal Access Token with Read/Write/Manage Code scope:

app-config.production.yaml:
# In production environment, Backstage Azure DevOps plugin (README, CI/CD) uses Managed Identity to query data in Azure DevOps
# NOTE: Currently the Backstage Azure Devops Plugin is in a transition from `azureDevOps` key used for auth info to using `integrations.azure`
#       During this transition the `host` and `organization` settings are pulled from `azureDevOps` and the `credentials` are pulled from `integrations.azure`
#       Eventually the `azureDevOps` config key will be removed entirely.
azureDevOps:
  host: dev.azure.com
  token: dummy-token-value
  organization: REDACTED

# In production environment, Backstage Catalog plugin uses Managed Identity in App Service to load catalog entities from Azure DevOps Repositories
integrations:
  azure:
    - host: dev.azure.com
      credentials:
        - clientId: ${BACKSTAGE_MANAGED_IDENTITY_CLIENT_ID}
       # NOTE: PAT token from local dev machine works
       # - personalAccessToken: ${AZURE_DEVOPS_PAT} # This works

[69](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-69)2024-08-29T18:05:14.755Z info: Init git repository {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30}

[70](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-70)2024-08-29T18:05:14.933Z info: Adding file {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,filepath=.}

[71](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-71)2024-08-29T18:05:17.484Z info: Committing file to repo {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,message=initial commit}

[72](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-72)2024-08-29T18:05:17.595Z info: Creating new remote<EMAIL_ADDRESS>
[73](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-73)2024-08-29T18:05:17.605Z info: Pushing directory to remote {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,remote=origin}

[74](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-74)2024-08-29T18:05:17.722Z error: Failed to push to repo {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30, remote=origin}

[75](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-75)2024-08-29T18:05:17.725Z Error: HTTP Error: 401 Unauthorized {data={"statusCode":401,"statusMessage":"Unauthorized","response":""}}

[76](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-76)    at Git.push (/app/node_modules/@backstage/plugin-scaffolder-node/dist/index.cjs.js:289:15)

[77](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-77)    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

[78](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-78)    at async Object.initRepoAndPush (/app/node_modules/@backstage/plugin-scaffolder-node/dist/index.cjs.js:377:3)

[79](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-79)

👍 Expected behavior
After creating new repository the skeleton code should be pushed to the target Git Repo.
👎 Actual Behavior with Screenshots
After creating the new repository the git push error fails with 401.
[69](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-69)2024-08-29T18:05:14.755Z info: Init git repository {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30}

[70](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-70)2024-08-29T18:05:14.933Z info: Adding file {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,filepath=.}

[71](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-71)2024-08-29T18:05:17.484Z info: Committing file to repo {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,message=initial commit}

[72](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-72)2024-08-29T18:05:17.595Z info: Creating new remote<EMAIL_ADDRESS>
[73](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-73)2024-08-29T18:05:17.605Z info: Pushing directory to remote {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30,remote=origin}

[74](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-74)2024-08-29T18:05:17.722Z error: Failed to push to repo {dir=/tmp/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30, remote=origin}

[75](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-75)2024-08-29T18:05:17.725Z Error: HTTP Error: 401 Unauthorized {data={"statusCode":401,"statusMessage":"Unauthorized","response":""}}

[76](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-76)    at Git.push (/app/node_modules/@backstage/plugin-scaffolder-node/dist/index.cjs.js:289:15)

[77](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-77)    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

[78](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-78)    at async Object.initRepoAndPush (/app/node_modules/@backstage/plugin-scaffolder-node/dist/index.cjs.js:377:3)

[79](https://developers.dev.tc.gc.ca/create/tasks/7cce4f9f-18db-41d7-a822-5b7a2e3e3e30#line-79)

👟 Reproduction steps
app-config.production.yaml:
# In production environment, Backstage Azure DevOps plugin (README, CI/CD) uses Managed Identity to query data in Azure DevOps
# NOTE: Currently the Backstage Azure Devops Plugin is in a transition from `azureDevOps` key used for auth info to using `integrations.azure`
#       During this transition the `host` and `organization` settings are pulled from `azureDevOps` and the `credentials` are pulled from `integrations.azure`
#       Eventually the `azureDevOps` config key will be removed entirely.
azureDevOps:
  host: dev.azure.com
  token: dummy-token-value
  organization: REDACTED

# In production environment, Backstage Catalog plugin uses Managed Identity in App Service to load catalog entities from Azure DevOps Repositories
integrations:
  azure:
    - host: dev.azure.com
      credentials:
        - clientId: ${BACKSTAGE_MANAGED_IDENTITY_CLIENT_ID}
       # NOTE: PAT token from local dev machine works
       # - personalAccessToken: ${AZURE_DEVOPS_PAT} # This works

template.yaml:
apiVersion: scaffolder.backstage.io/v1beta3
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-template
kind: Template
metadata:
  name: aspnetcore8mvc
  title: ASP.NET core 8 MVC Web Application w/ All Toppings
  description: Foo Description

  owner: group:technical-advisor-center-of-excellence
  type: service

  # These parameters are used to generate the input form in the frontend, and are
  # used to gather input data for the execution of the template.
  parameters:
    - title: Provide name and owner of new component
      required:
        - name
      properties:
        name:
          title: Name
          type: string
          description: Unique name of the component to be created.  This name will be used in the Portal registration and the Pull Request created.
          ui:autofocus: true
          ui:options:
            rows: 5
        owner:
          title: Owner
          type: string
          description: Owner of the component
          ui:field: OwnerPicker
          ui:options:
            catalogFilter:
              kind: Group
    - title: Choose a target repo for the code generated
      required:
        - repoUrl
      properties:
        repoUrl:
          title: Repository Location
          type: string
          ui:field: RepoUrlPicker
          ui:options:
            allowedHosts:
              - dev.azure.com
            allowedOrganizations:
              - REDACTED
  steps:
    - id: fetch-base
      name: Fetch Base
      action: fetch:template
      input:
        url: ./skeleton
        values:
          component_id: ${{ parameters.name }}
          destination: ${{ parameters.repoUrl | parseRepoUrl }}
          owner: ${{ parameters.owner }}
          project: ${{ parameters.project }}
    - id: publish
      action: publish:azure
      name: Publish to Azure
      input:
        repoUrl: ${{ parameters.repoUrl }}
        defaultBranch: main
    - id: register
      name: Register
      action: catalog:register
      input:
        repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
        catalogInfoPath: '/catalog-info.yaml'
  output:
    links:
      - title: Repository
        url: ${{ steps['publish'].output.remoteUrl }}
      - title: Open in catalog
        icon: catalog
        entityRef: ${{ steps['register'].output.entityRef }}

📃 Provide the context for the Bug.
Trying to create templated apps/apis so we bring consistency to our org as well as enable changes to non-functional requirements and governance to just be adopted by dev teams without adding more cognitive load on them.
🖥 Your Environment
yarn run v1.22.21
$ /REDACTED/node_modules/.bin/backstage-cli info
OS:   Linux <IP_ADDRESS>-microsoft-standard-WSL2 - linux/x64
node: v20.9.0
yarn: 1.22.21
cli:  0.24.0 (installed)
backstage:  1.29.2
Dependencies:
@backstage/app-defaults                                          1.5.9
@backstage/backend-app-api                                       0.7.5, 0.8.0
@backstage/backend-common                                        0.21.7, 0.22.0, 0.23.3
@backstage/backend-defaults                                      0.4.1
@backstage/backend-dev-utils                                     0.1.4
@backstage/backend-openapi-utils                                 0.1.15
@backstage/backend-plugin-api                                    0.6.18, 0.7.0
@backstage/backend-tasks                                         0.5.27
@backstage/catalog-client                                        1.6.5
@backstage/catalog-model                                         1.5.0
@backstage/cli-common                                            0.1.14
@backstage/cli-node                                              0.2.7
@backstage/cli                                                   0.26.11
@backstage/config-loader                                         1.8.1
@backstage/config                                                1.2.0
@backstage/core-app-api                                          1.14.1
@backstage/core-compat-api                                       0.2.7
@backstage/core-components                                       0.14.9
@backstage/core-plugin-api                                       1.9.3
@backstage/e2e-test-utils                                        0.1.1
@backstage/errors                                                1.2.4
@backstage/eslint-plugin                                         0.1.8
@backstage/frontend-plugin-api                                   0.6.7
@backstage/integration-aws-node                                  0.1.12
@backstage/integration-react                                     1.1.29
@backstage/integration                                           1.13.0
@backstage/plugin-api-docs                                       0.11.7
@backstage/plugin-app-backend                                    0.3.71
@backstage/plugin-app-node                                       0.1.22
@backstage/plugin-auth-backend-module-atlassian-provider         0.2.3
@backstage/plugin-auth-backend-module-aws-alb-provider           0.1.14
@backstage/plugin-auth-backend-module-azure-easyauth-provider    0.1.5
@backstage/plugin-auth-backend-module-bitbucket-provider         0.1.5
@backstage/plugin-auth-backend-module-cloudflare-access-provider 0.1.5
@backstage/plugin-auth-backend-module-gcp-iap-provider           0.2.17
@backstage/plugin-auth-backend-module-github-provider            0.1.19
@backstage/plugin-auth-backend-module-gitlab-provider            0.1.19
@backstage/plugin-auth-backend-module-google-provider            0.1.19
@backstage/plugin-auth-backend-module-microsoft-provider         0.1.17
@backstage/plugin-auth-backend-module-oauth2-provider            0.2.3
@backstage/plugin-auth-backend-module-oauth2-proxy-provider      0.1.15
@backstage/plugin-auth-backend-module-oidc-provider              0.2.3
@backstage/plugin-auth-backend-module-okta-provider              0.0.15
@backstage/plugin-auth-backend-module-onelogin-provider          0.1.3
@backstage/plugin-auth-backend                                   0.22.9
@backstage/plugin-auth-node                                      0.4.17
@backstage/plugin-auth-react                                     0.1.4
@backstage/plugin-bitbucket-cloud-common                         0.2.21
@backstage/plugin-catalog-backend-module-azure                   0.1.42
@backstage/plugin-catalog-backend-module-logs                    0.0.1
@backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.1.20
@backstage/plugin-catalog-backend                                1.24.0
@backstage/plugin-catalog-common                                 1.0.25
@backstage/plugin-catalog-graph                                  0.4.7
@backstage/plugin-catalog-import                                 0.12.1
@backstage/plugin-catalog-node                                   1.12.4
@backstage/plugin-catalog-react                                  1.12.2
@backstage/plugin-catalog                                        1.21.1
@backstage/plugin-events-node                                    0.3.8
@backstage/plugin-org                                            0.6.27
@backstage/plugin-permission-backend                             0.5.46
@backstage/plugin-permission-common                              0.7.13, 0.8.0
@backstage/plugin-permission-node                                0.7.29, 0.8.0
@backstage/plugin-permission-react                               0.4.24
@backstage/plugin-proxy-backend                                  0.5.3
@backstage/plugin-scaffolder-backend-module-azure                0.1.14
@backstage/plugin-scaffolder-backend-module-bitbucket-cloud      0.1.12
@backstage/plugin-scaffolder-backend-module-bitbucket-server     0.1.12
@backstage/plugin-scaffolder-backend-module-bitbucket            0.2.12
@backstage/plugin-scaffolder-backend-module-gerrit               0.1.14
@backstage/plugin-scaffolder-backend-module-gitea                0.1.12
@backstage/plugin-scaffolder-backend-module-github               0.4.0
@backstage/plugin-scaffolder-backend-module-gitlab               0.4.4
@backstage/plugin-scaffolder-backend                             1.23.0
@backstage/plugin-scaffolder-common                              1.5.4
@backstage/plugin-scaffolder-node                                0.4.8
@backstage/plugin-scaffolder-react                               1.10.0
@backstage/plugin-scaffolder                                     1.23.0
@backstage/plugin-search-backend-module-catalog                  0.1.28
@backstage/plugin-search-backend-module-pg                       0.5.32
@backstage/plugin-search-backend-module-techdocs                 0.1.27
@backstage/plugin-search-backend-node                            1.2.27
@backstage/plugin-search-backend                                 1.5.14
@backstage/plugin-search-common                                  1.2.13
@backstage/plugin-search-react                                   1.7.13
@backstage/plugin-search                                         1.4.14
@backstage/plugin-signals-react                                  0.0.4
@backstage/plugin-techdocs-backend                               1.10.9
@backstage/plugin-techdocs-module-addons-contrib                 1.1.12
@backstage/plugin-techdocs-node                                  1.12.8
@backstage/plugin-techdocs-react                                 1.2.6
@backstage/plugin-techdocs                                       1.10.7
@backstage/plugin-user-settings-common                           0.0.1
@backstage/plugin-user-settings                                  0.8.10
@backstage/release-manifests                                     0.0.11
@backstage/test-utils                                            1.5.9
@backstage/theme                                                 0.5.6
@backstage/types                                                 1.1.1
@backstage/version-bridge                                        1.0.8
Done in 0.68s.
👀 Have you spent some time to check if this bug has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
No, but I'm happy to collaborate on a PR with someone else

Hmm, is this something to do with permissions or is it something to do with how we setup username and password in the Git client when using MI? I'm not super familiar with the Azure toolset, so if we can get some more help here would be great :pray:

@benjdlambert I'm happy to help debug or test but not equipped to contribute to the azure scaffolder.

Same issue. The repos are being created, but the initial commit fails unless a personal access token is used, which isn't an option for our production environment. I'm using an app registration instead of a managed identity.

@mattemoore @tomdean22 has this worked for either of you before or is this a new setup and it doesn't work?
@mattemoore if you can maybe have a play around with the above code in node_modules to see if you can get something different would be super useful. You could start by removing the if clause and always provide username and password which happen only when you provide a token and see if that yields different results.

@benjdlambert this is a new setup for us.  I can add that our Catalog backend integration uses Azure Managed Identity successfully.
@benjdlambert  I can poke around the code next week.  I will have to change to use app registration as managed identity won't work on my local dev environment.

@mattemoore @tomdean22 has this worked for either of you before or is this a new setup and it doesn't work?
@mattemoore if you can maybe have a play around with the above code in node_modules to see if you can get something different would be super useful. You could start by removing the if clause and always provide username and password which happen only when you provide a token and see if that yields different results.

This is a new set up for us. Within the last couple weeks.

@benjdlambert I will have time this week to look into this.
Can you confirm the following workflow please?

Modify code<EMAIL_ADDRESS>Run yarn dev
Test/validate/debug etc.?

Yep that should do it 👍

Popping this on my todo list to look into, mostly as I might have some ideas to help with debugging this.
@sanderaernouts who added support for managed identity is on vacation but including him here if he happens to be around and has a suggestion.

@awanlin it’s a bit hard to follow up on this on my phone. But IIRC the underlying (nodejs) library sets the Authorization HTTP header when passing the credentials. Username password results in basic authentication and token should result in Bearer (token) authentication. But from the error message it seems that doesn’t happen. 401 generally means you did not provide any authentication as opposed to the wrong credentials.
It has been a while, but I believe I also added support for the token option in the (git) credential in the first place so maybe that is a good place to start? I think I added support for both a promise and a value so maybe something is off there.
I’d be happy to help out but I’m on holiday till the 26th.

@awanlin I think I found my mistake. I set the Authorization header but that should have been the Authentication header: https://github.com/backstage/backstage/blob/661b354277d71a9a5005930b6b900c4d24601965/plugins/scaffolder-node/src/scm/git.ts#L91.
I’m a bit confused because I’m pretty sure the Authorization header is the correct one but the docs for isomorphic git say otherwise: https://github.com/isomorphic-git/isomorphic-git/blob/9103da548885b85dff89183d9ba654d23c6c3b09/docs/onAuth.md?plain=1#L17.
That being said, in hindsight I think using the onAuth callback instead of providing a “fixed” token is the more correct approach. You should be able to pass the bearer token as the value for password and the username name doesn’t matter as long as it’s not empty. The callback may then have a chance to refresh the token if needed whereas the fixed “token” may contain an expired token.

Thanks for taking a look @sanderaernouts, this is more than I expected as I know you are away.
@mattemoore, can you perhaps play around with the ideas shared?

When using PAT auth is:
{
   username: 'notempty',
   password: 'REDACTED PAT'
}

When using app registration (same app registration used for azure authentication):
azureDevOps:
host: dev.azure.com
token: dummy-token-value
organization: transport-canada
integrations:
  azure:
    - host: dev.azure.com
      credentials:
        # - personalAccessToken: ${AZURE_DEVOPS_PAT}
        - clientId: ${AZURE_CLIENT_ID}
          clientSecret: ${AZURE_CLIENT_SECRET}
          tenantId: ${AZURE_TENANT_ID}

I get the following error:
TF401444: Please sign-in at least once as 2008ffa9-c9b2-4d97-9ad9-4ace25386be7\2008ffa9-c9b2-4d97-9ad9-4ace25386be7\7ff59517-7427-409f-8235-216331e94bac in a web browser to enable access to the service.

I, unlike @tomdean22, cannot get the repo creation step to complete:
2024-09-09T18:16:53.000Z Beginning step Publish to Azure
[93](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-93)2024-09-09T18:16:53.000Z Error: TF401444: Please sign-in at least once as 2008ffa9-c9b2-4d97-9ad9-4ace25386be7\2008ffa9-c9b2-4d97-9ad9-4ace25386be7\7ff59517-7427-409f-8235-216331e94bac in a web browser to enable access to the service.
[94](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-94)    at RestClient.<anonymous> (C:\Users\MOOREMA\code\Backstage\Backstage\tc-backstage\node_modules\typed-rest-client\RestClient.js:202:31)
[95](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-95)    at Generator.next (<anonymous>)
[96](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-96)    at fulfilled (C:\Users\MOOREMA\code\Backstage\Backstage\tc-backstage\node_modules\typed-rest-client\RestClient.js:6:58)
[97](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-97)    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The service account has been granted Create Repository rights explicitly.

When using PAT auth is:
{
   username: 'notempty',
   password: 'REDACTED PAT'
}

When using app registration (same app registration used for azure authentication): azureDevOps: host: dev.azure.com token: dummy-token-value organization: transport-canada
integrations:
  azure:
    - host: dev.azure.com
      credentials:
        # - personalAccessToken: ${AZURE_DEVOPS_PAT}
        - clientId: ${AZURE_CLIENT_ID}
          clientSecret: ${AZURE_CLIENT_SECRET}
          tenantId: ${AZURE_TENANT_ID}

I get the following error: TF401444: Please sign-in at least once as 2008ffa9-c9b2-4d97-9ad9-4ace25386be7\2008ffa9-c9b2-4d97-9ad9-4ace25386be7\7ff59517-7427-409f-8235-216331e94bac in a web browser to enable access to the service.
I, unlike @tomdean22, cannot get the repo creation step to complete:
2024-09-09T18:16:53.000Z Beginning step Publish to Azure
[93](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-93)2024-09-09T18:16:53.000Z Error: TF401444: Please sign-in at least once as 2008ffa9-c9b2-4d97-9ad9-4ace25386be7\2008ffa9-c9b2-4d97-9ad9-4ace25386be7\7ff59517-7427-409f-8235-216331e94bac in a web browser to enable access to the service.
[94](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-94)    at RestClient.<anonymous> (C:\Users\MOOREMA\code\Backstage\Backstage\tc-backstage\node_modules\typed-rest-client\RestClient.js:202:31)
[95](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-95)    at Generator.next (<anonymous>)
[96](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-96)    at fulfilled (C:\Users\MOOREMA\code\Backstage\Backstage\tc-backstage\node_modules\typed-rest-client\RestClient.js:6:58)
[97](http://localhost:3000/create/tasks/3ce1e5e3-4f5b-44fe-a7d4-8cfabbc14460#line-97)    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The service account has been granted Create Repository rights explicitly.

I get this error when the account isn't a user in our Azure DevOps org. Add the app registration or managed identity to your Azure DevOps org as a user. Once I added it as a user, I put it in the Project Collection Service Accounts group (org level) to elevate its permissions, Project Collection Build Service Accounts might also do the trick.

I updated<EMAIL_ADDRESS>from:
class Git {
  constructor(config) {
    this.config = config;
    this.onAuth = config.onAuth;
    this.headers = {
      "user-agent": "git/@isomorphic-git",
      ...config.token ? { Authorization: `Bearer ${config.token}` } : {}
    };
  }

to
class Git {
  constructor(config) {
    this.config = config;
    this.onAuth = config.onAuth;
    this.headers = {
      "user-agent": "git/@isomorphic-git",
      ...config.token ? { **Authentication**: `Bearer ${config.token}` } : {}
    };
    console.log(`--------------------------------------------${this.headers}`)
  }

as requested and still received the 401 error:
2024-09-10T12:05:42.000Z info: Pushing directory to remote {dir=C:\Users\MOOREMA\AppData\Local\Temp\97623fd2-87dc-4682-a259-67020b0e6f21,remote=origin}

(http://localhost:3000/create/tasks/97623fd2-87dc-4682-a259-67020b0e6f21#line-98)2024-09-10T12:05:42.000Z error: Failed to push to repo {dir=C:\Users\MOOREMA\AppData\Local\Temp\97623fd2-87dc-4682-a259-67020b0e6f21, remote=origin}

(http://localhost:3000/create/tasks/97623fd2-87dc-4682-a259-67020b0e6f21#line-99)2024-09-10T12:05:42.000Z Error: HTTP Error: 401 Unauthorized {data={"statusCode":401,"statusMessage":"Unauthorized","response":""}}

(http://localhost:3000/create/tasks/97623fd2-87dc-4682-a259-67020b0e6f21#line-100)    at Git.push (C:\Users\MOOREMA\code\Backstage\Backstage\tc-backstage\node_modules\@backstage\plugin-scaffolder-node\src\scm\git.ts:289:7)

@awanlin  and @sanderaernouts
I can confirm that changing the code in https://github.com/backstage/backstage/commit/661b354277d71a9a5005930b6b900c4d24601965 to:
    const auth = {
        username: "notempty",
        password: ctx.input.token ?? credentials.token
      }

works with both PAT and Service Account.

@mattemoore @sanderaernouts nice that we have a fix!
@mattemoore do you want to raise a PR adjusting the logic to the working solution for both approaches? :pray:

@benjdlambert yes willing to do that.  Can you point me to the contribution process documentation.  I have not created a PR for backstage before.

Hi @mattemoore, that's here: https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md. Feel free to ping here if you have issue or in the PR when it's ready. Happy to help and do early reviews to move things along 🚀

@awanlin I have blessing from legal to commit. I've forked and cloned and made my change - ready to test.  How does one pull down the community plugins?  Do I just install it normally as per the plugin docs?  If so what dir to I cd into first before installing plugin?

This work would be done in the main Backstage repo, so the one you are in for this issue. This is NOT related to the Community Plugins repo. You do not need to install any plugins 👍
The main Backstage repo has an existing example app that you can use, so yarn install, and then yarn dev to start it up. In this case I think all you should have to do is import a Software Template that will trigger the issue as well as setup the Azure integration config in your app-config.local.yaml.

@awanlin sorry I used the wrong words in my comment above.  I do realize I'm making a change to a plugin that comes with backstage (even though I mentioned Community Plugins :) ).  I'm in the right repo and have the example app running.  I'm all good there.
When I go to publish my template to Azure it fails with:
Error
NotFoundError

Message
Template action with ID 'publish:azure' is not registered.

@awanlin nvm, I forgot to add the azure scaffolder plugin to my backend in packages\backend\src\index.ts

It sounds to me that having some better error handling can save time for troubleshooting missing plugins in classpath

All good @mattemoore, yeah, not all the Scaffolder modules are added to the example-app backend so in this case you would need to add it BUT make sure you use the workspace:^ syntax when you add it to the package.json file so that way you use the version in the repo and not the one published to NPM. It would be a lot like this:
https://github.com/backstage/backstage/blob/77146ae7f199fc3334b16b719a102cf6f91075bc/packages/backend/package.json#L52C5-L52C73

@awanlin adding it to the backend was all that I needed.  I did not have to add it to package.json.
PR is up: https://github.com/backstage/backstage/pull/26661

As PR was merged, closing this bug report


[MonorepoBuilder] Updating split paths does not cover all packages

The package-builder etc should be updated to local paths too:

The reason is that only root composer.json repositories are taken into an account. So if one dependency uses package-builder, it's looking into packagist anyway.
See https://getcomposer.org/doc/05-repositories.md#repository

Possibly related - https://getcomposer.org/doc/articles/repository-priorities.md#filtering-packages

Current status:


[Star Wars Saga Edition] Bugfixes

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description

Fixed Equipment Value box
Fixed Speed displaying as 0 in stat block because of the Speed input on the NPC sheet

Character Sheet Info Roll20 Internal Use only.


Install Uninstall UI enhancements

Added validation on Install and Uninstall buttons in the ProjectsPanel so buttons are enabled or disabled
Added links to quickly install and uninstall with single clicks.
Increased spacing between project items for clarity.
Added styles for disabling buttons and anchor tags.

I was not able to see that issue on my machine. tried all the vs code built-in themes as well.
anyways-  I have moved the uninstall link to keep it separate from the version label. hope it make it more consistent


Pitch Isaac for demo game images

Spec out for Isaac what we need, how long it will take. He is possibly available 5/5-5/6 but likely just part time due to other projects.

Closing as we are using a vendor for this work.


Documentation Feature Not Compatible with Elixir v1.7.x

Elixir v1.7 has hard-deprecated Code.get_docs/2. Since v0.2.3 of atom-elixir have modules that depend on this function, documentation no longer works.

Still and issue. I'm still learning Elixir and refactor the package to use Code.fetch_docs/1 is not as trivial as it seems. It seems too that the dev has abandoned the repo long ago, though.


ShareTarget sample: OnNavigatedTo handler is unclear and potentially dangerous

The ShareTarget sample's OnNavigatedTo handler dispatches its work using Task.Factory.StartNew as can be seen here.
I have two pieces of feedback about this:

Why does this work need to be dispatched? It's not clear to me. If this really needs to happen, there should be a comment describing why.
If we really need to dispatch the work, is there a good reason for using Task.Factory.StartNew instead of an alternative like Task.Run? If not, the sample should move away from Task.Factory.StartNew due to its gotchas: https://blog.stephencleary.com/2013/08/startnew-is-dangerous.html. Even if it works okay in this case, we probably don't want to encourage developers to use Task.Factory.StartNew more generally.

Random note. Look how confused this engineer is about how to properly use the sharing API: https://mtaulty.com/2015/08/13/m_15905/. He was getting exceptions using the sharing API so he tried things like spawning tasks, adding timeouts, and waiting for the window to be visible. Eventually, he found something that worked but doesn't understand why it worked. We should make it clearer when and how these APIs expect to be called and why.
Adam Comella
Microsoft Corp.

There is a comment that explains why:
// It is recommended to only retrieve the ShareOperation object in the activation handler,
// return as quickly as possible, and retrieve all data from the share target asynchronously

The code implements the recommendation. It kicks work to a background thread to extract information from the ShareOperation, allowing the main thread to return as quickly as possible.


Deleting All table data causes crash "Fatal error: Duplicate item [invalid object]"

When there is only one row, when I delete all data, it is OK.
But When there is more than one row, it will crash when I delete all table data, just like the screenshot below
DataSource.swift

I also got the information: "Item [invalid object] has already been indexed at (0, 0)"

I have a same problem.

Similar problem:
If I delete one item after one  button tap, all works fine.

Suppose this scenario:
import Foundation
import RealmSwift
import RxDataSources
// Grade Objet
class Grade: Object  {
@objc  dynamic var uid: Int = 0
@objc dynamic var grade: String = ""
override class func primaryKey() -> String? {
return "uid"
}
}
extension Grade: IdentifiableType {
var identity: Int {
return self.isInvalidated ? 0 : uid
}
}
// Student Objet
class Student: Object  {
@objc  dynamic var uid: Int = 0
@objc dynamic var name: String = ""
let grades = List<Grade>()
override class func primaryKey() -> String? {
return "uid"
}
}
extension Student: IdentifiableType {
var identity: Int {
return self.isInvalidated ? 0 : uid
}
}
In my tableView each section name is the student name and in the rows I list all grades.  If I create a action to delete all bad grades (p.e. "grade == 'F'), my application crashes  every time I tap the button. If I remove one by one, that's ok.
Is there a way to fix that, or this is a bug?

I solved this problem, but this not a good solution. Try replace RxTableViewSectionedAnimatedDataSource to RxTableViewSectionedReloadDataSource. But then sections not will not be animatable like fade, top, etc. Or you can also comment this line rxDebugFatalError(e) , but the problem with custom animation still remains unresolved

Solved my problem too. RxTableViewSectionedReloadDataSource works well, but no animation . Thanks for you suggestion. Perhaps I need I new approach in my app.

Write me please if you can resolved problem with animation

there are any updates on that issue?

This same problem happened to me, just had to make sure every section titles and all model identities were different.

I'm running into a similar issue as well. I'm getting the same error after simply updating a property of one of the model items. I expected an update to that cell only, with animation, but instead I get this same error and crash. I suspect this library is intended for use only with struct models, and lots of problems like this crop up when you start using class models. Unfortunately many of us use persistence frameworks that requires models to be classes. It is somewhat surprising to me that this is a problem, mainly because the framework already its own abstractions for identity and equality in place, which should enable them to make this work for both classes and structs. So I'm not sure what the problem is and I don't have a good workaround for this just yet (aside from just using the ReloadDataSource).

@dkbhowell see here @kzaher’s answer in regards to reference types not officially supported for animated reloads: https://github.com/RxSwiftCommunity/RxDataSources/pull/239#issuecomment-398163017

I believe it is quite simple.
Don't use duplicate ids
Don't mutate ids (if you mutate id, it's not id) return self.isInvalidated ? 0 : uid
Don't use reference types (or if you are, be aware that you are responsible for cell content updates, we won't be able to detect changes since the previous bound item will also have the same change)
On the other hand:
Do read messages
If the message says, duplicate xxx, and you have duplicate xxx, fix your code.

I solved this problem, because my sectionType's identity same when sometime

Hi,
eg:AllNotesSection(header: "", modelItems: [model])
header value must be unique， see this photo， u will clear

I solved them problem, but this not a good solution, if you are using Realm you can do something like this
```
typealias Identity = Int32
var identity: Int32 {
    return isInvalidated ? Int32.random(in: 1000000...10000000) : id
}

I solved them problem, but this not a good solution, if you are using Realm you can do something like this
typealias Identity = Int32

    var identity: Int32 {
        return isInvalidated ? Int32.random(in: 1000000...10000000) : id
    }

try this:
typealias Identity = String
var identity: Identity {
    return UUID().uuidString
}

@vitali36 lots of thanks from korea 👋

@vitali36 lots of thanks from korea 👋


Why use double node_modules?

My app directory grew by 210 MB because you are using a second node_modules for /electron instead of utilizing the one in the main project.
Can this not be more efficient to merge it? I don't understand the need for separation here.
Here is a way to solve it: https://github.com/SimulatedGREG/electron-vue/
Also has better colored console which is helpful.

@Zyles hi,
An Electron app has two processes running: the main thread and the renderer thread. Main thread is your /electron folder generated by the Electron wrapper, and the renderer thread is the actual Quasar app. Each have its own needs so that's why two node_modules folders.
Furthermore the point is to be able to write website + mobile apps + electron apps using the same project folder. Consider the Electron (or Cordova for that matter) wrapper as an addon to the default project folder being generated by the Quasar CLI.
There is a starter kit on the roadmap specifically for building ONLY Electron apps, which will be highly optimized to do just that.
PS: please use forum for questions. Thanks.
Regards,
Razvan


Can i contribute logo?

Can i contribute my logo design here?

Right now, not open for logo contribution.
Thank you


Generate ExecutionIDs, record and dump basic timing information (fixes qz-3343)

First pass on benchmarking infrastructure.

All queries have an associated "execution identifier", a pair of an integer which increments on every query and a start Instant (timestamp).
All queries have a set of "timing scopes" like "full query execution pipeline" and "parse SQL" which are pairs of start and end timestamps with identifiers attached. Adding a timing scope is as simple as a call into a type class wrapping some part of the query. There need to be a lot more of these; we haven't even separated query planning from query execution yet.
There's a "timing repository" containing a map from execution identifiers to maps containing all of the execution's timing scopes. It's size-limited, and drops the oldest executions when it goes over the size specified (with age measured by start-time). The goal here is to keep something like 200 timing scopes in memory at all times so that we can dump the info and understand why queries are slow, even after the fact (especially for customers).
When an execution finishes, there's an option to print out its timing info immediately. This option isn't currently exposed to the web server (and I'm not sure if it should), but it is to the REPL; use set printTiming = 1.

Potential issues:

It may be best to order executions by end time instead, which would require not eagerly adding an execution's info to the timing repository.
The integer part of the execution identifier may end up being redundant, the intention was to use it to keep them distinct and make it easier to index them mentally.
The timing repository could use some tests to ensure it behaves as specified. Manual testing seemed to show it was fine, though.
Code that populates timing scopes might need to be tested to ensure that it's doing it properly.

Some sample output from the REPL:
(v27.6.6) 💪 $ select substring(city, 0, 1), count(*) from zips
Query time: 0.3s
 0  | 1      |
----|--------|
 A  |  29353 |
 C  |  29353 |
 B  |  29353 |
 B  |  29353 |
 B  |  29353 |
 B  |  29353 |
 C  |  29353 |
 C  |  29353 |
 C  |  29353 |
 C  |  29353 |
Query execution 5 began at 2017-12-22T20:55:24.337Z
phase parse SQL: 6 ms
phase resolve imports: 1 ms
phase execute query: 363 ms
phase total query pipeline (REPL): 370 ms
(v27.6.6) 💪 $

FYI, "fixes qz-3343" in the title will not trigger the automation.  :-)

Should be #qz-3343 done

Thanks @jdegoes, @djspiewak; I wasn't sure if it provided that integration at all.

Whoops, tests don't compile.

This latest commit makes for the last work on this PR excepting review. Next thing I'll be working on is the infrastructure itself, and perhaps next breaking query planning down into phases; I'm doing that after because with the current state of the PR, I haven't been able to generate queries that are even slightly bottlenecked by query planning.

I'm doing that after because with the current state of the PR, I haven't been able to generate queries that are even slightly bottlenecked by query planning.

This doesn't surprise me at all.  QSU ftw.  :-D  I would imagine that for most queries, the bottleneck is primarily in the underlying datastore, but I also suspect that there is a massive amount of load that we generate that we don't need to be.


Install devenv via home-manager

Can we install devenv via home-manager?
There are severals ways to install devenv as we can see from
https://devenv.sh/getting-started/#3-install-devenv:

Newcomers
Flake profiles
Declaratively using flakes
Declaratively without flakes

Note: from https://search.nixos.org/flakes? there is no devenv package.

I am right now using devenv with home manager. I added the flake to my flake as an input and referenced the package in the home.packages.
https://github.com/shyim/nixcfg/blob/main/flake.nix#L17
https://github.com/shyim/nixcfg/blob/main/flake.nix#L152
https://github.com/shyim/nixcfg/blob/main/home/packages.nix#L42

I tried the relevant parts of the config from @shyim, but for me it wanted to pull aws-sdk-cpp and build it from source. I then tried adding devenv.cachix.org to my flake.nix extra-substituters, but that did nothing.
  # in home-manager `flake.nix`, next to `inputs`
  nixConfig = {
    extra-substituters = [ https://cache.nixos.org https://nix-community.cachix.org https://devenv.cachix.org ];
    extra-trusted-public-keys = [ cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= ];
  };

Any good ideas appreciated.

@THOUSAND-SKY what OS?

I am on ubuntu 20.04 5.15.0-89-generic #99~20.04.1-Ubuntu SMP Thu Nov 2 15:16:47 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

when you have the exact same remove the inputs follows https://github.com/shyim/nixcfg/blob/main/flake.nix#L23

devenv is now in nixpkgs so you can install it via pkgs.devenv


feat(playwrighttesting): Adding stacktrace into error list

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
API changes are not detected in this pull request.


path not showing in hyper and unable to use it  just after installing

[x] Your Hyper.app version is 3.0.2. Please verify your using the latest Hyper.app version
[ ] I have searched the issues of this repo and believe that this is not a duplicate

Any relevant information from devtools? (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):

Is the issue reproducible in vanilla Hyper.app?

Issue

Hyper version: undefined "3.0.2"

OS ARCH VERSION: win32 x64 10.0.16299

Electron: 3.1.3  LANG: undefined

SHELL: undefined   TERM: undefined

 ~/.hyper.js contents

          {
  "updateChannel": "stable",
  "fontSize": 12,
  "fontFamily": "Menlo, \"DejaVu Sans Mono\", Consolas, \"Lucida Console\", monospace",
  "fontWeight": "normal",
  "fontWeightBold": "bold",
  "lineHeight": 1,
  "letterSpacing": 0,
  "cursorColor": "rgba(248,28,229,0.8)",
  "cursorAccentColor": "#000",
  "cursorShape": "BLOCK",
  "cursorBlink": false,
  "foregroundColor": "#fff",
  "backgroundColor": "#000",
  "selectionColor": "rgba(248,28,229,0.3)",
  "borderColor": "#333",
  "css": "",
  "termCSS": "",
  "showHamburgerMenu": "",
  "showWindowControls": "",
  "padding": "12px 14px",
  "colors": {
    "black": "#000000",
    "red": "#C51E14",
    "green": "#1DC121",
    "yellow": "#C7C329",
    "blue": "#0A2FC4",
    "magenta": "#C839C5",
    "cyan": "#20C5C6",
    "white": "#C7C7C7",
    "lightBlack": "#686868",
    "lightRed": "#FD6F6B",
    "lightGreen": "#67F86F",
    "lightYellow": "#FFFA72",
    "lightBlue": "#6A76FB",
    "lightMagenta": "#FD7CFC",
    "lightCyan": "#68FDFE",
    "lightWhite": "#FFFFFF"
  },
  "shell": "C:\\Program Files\\Git\\git-bash.exe",
  "shellArgs": [
    "--login"
  ],
  "env": {},
  "bell": "SOUND",
  "copyOnSelect": false,
  "defaultSSHApp": true
}
      {

"plugins": [],
"localPlugins": []
}

Is this the current directory that you are in next to the line? EG C:\somefolder>
If so it could be the custom "shell" config line change the config to blank so it uses the default command line.
Does that help?

Side note I have just changed my config over to use git-bash and I get the same side effect doesn't load cmd and not useable could be an issue with using this custom shell.
Changing this line over to "shell": "", or "shell": "C:\Program Files\Git\git-cmd.exe"
Got my hyper working fine on 3.0.2

No,no directory path is showing when I open hyper.
Full blank terminal show with just a cursor rectangle where we can type.
But nothing is being typed whatever key I press...
On 07-Aug-2019 4:54 PM, "Laurence Jones"<EMAIL_ADDRESS>wrote:

Is this the current directory that you are in next to the line? EG
C:\somefolder>
If so it could be the custom "shell" config line change the config to
blank so it uses the default command line.
Does that help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zeit/hyper/issues/3786?email_source=notifications&email_token=AD3YQBQ5EIRWRHVUIUJC4RTQDKWFLA5CNFSM4IJ4PCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3YCPSY#issuecomment-519055307,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD3YQBVU7QVJVCLTKJH556TQDKWFLANCNFSM4IJ4PCGQ
.

Change the config of hyper to either
"shell": "C:\Program Files\Git\git-bash.exe",
or
"shell": "",


UIView.image does not capture subviews

Background
Resolves #276.
Breaking Changes
N/A
Meta

Tied to Version Release(s):

PR Checklist

[ ] CI runs clean?
[ ] Appropriate label has been added to this PR (i.e., Bug, Enhancement, etc.).
[ ] Documentation has been added to all open, and public scoped methods and properties.
[ ] Changelog has been updated
[ ] Tests have have been added to all new features. (not a requirement, but helpful)
[ ] Image/GIFs have been added for all UI related changed.

Screenshots
As an update in my own app, the label now appears again:

Yep, very helpful also to give AutoLayout time to update the constraints before we produce the image 👍


The site is not accessible by the link in the About section

I read the About section on https://github.com/objectionary/proof
I got 404 when I tried to access https://www.objectionary.com/proof/

@yegor256, please check whether the site is deployed correctly and please help fix this issue.

@deemp this URL works though: https://www.objectionary.com/proof/docs/
You just don't have index.html in the gh-pages branch

@yegor256, I see these options to make the link in the About section of this repository work:

Change the link to https://www.objectionary.com/proof/docs/.
Add an index.html in the root of the repo on the gh-pages branch. The index.html will redirect to https://www.objectionary.com/proof/docs/.
Keep the site files in the root of the repo on the gh-pages branch.

Which option is preferable?

@deemp I like the third option


Question: How to convert mlir::Value from memref to tensor?

So far, I've tried .cast<TensorType> and looks like that is wrong. Can you please point me to a function or what files I can use as reference to get an idea if I have to implement this myself?

getBroadCastRankedType in ONNXOpHelpers.cpp is a good place to look.
Specificall these lines
    elementType = type1.cast<MemRefType>().getElementType();
    RankedTensorType ty1 =
        RankedTensorType::get(type1.cast<MemRefType>().getShape(), elementType);

@philass, thanks for this, but I'm looking for something different. There is a method matchAndRewrite when implementing a conversion from one dialect to another,
The signature looks like this:
LogicalResult matchAndRewrite(Operation *op, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter);

I want to access llvm::dyn_cast<ONNXSqrtOp>(op).X() (first operand) which has a different type than operands[0] (also first argument). Both are of type mlir::Value.
I want to convert operands[0] to the type of op.X() and I'm a bit stuck on this.

I guess your question may be related to type converter for a conversion pass.

When we convert an ONNX op to Krnl, type will be converted from TensorType (used in ONNX) to MemRefType (used in Krnl) and buffers are allocated for MemRefs, I wonder why you need to convert back MemRefType to TensorType.

llvm::dyn_cast(op).X() (first operand) has a different type than operands[0] (also first argument). Both are of type mlir::Value.

op is the operation before conversion, so its X() value would still have type of TensorType, while operands are rewritten values and they are converted to MemRefType by the previous conversion. I recommend to use operand adapter if you need to obtain values by name: e.g. ONNXSqrtOpAdaptor operandAdaptor(operands);


replace unmaintained actions-rs/* actions in CI workflows

Basically all of the actions-rs/* actions are unmaintained. See https://github.com/actions-rs/toolchain/issues/216 for more information. Due to their age they generate several warnings in CI runs, for example in https://github.com/DioxusLabs/dioxus-std/actions/runs/5282023756:

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

To get rid of those warnings the occurrences of actions-rs/toolchain are replaced by dtolnay/rust-toolchain, and the occurrences of actions-rs/cargo are replaced by direct invocations of cargo.

Thanks so much! I took these from the Dioxus repo so if it's still using actions-rs, it would be great if you could open a PR there too.

The PR for Dioxus has been created, too: https://github.com/DioxusLabs/dioxus/pull/1099


Add documentation for HyperV provider

Under Query the Log examples, please add replicationProviderName_s option of "HyperVReplicaAzure".  I had to get this information by opening a support ticket, whereas if it were in the documentation it would have saved a call.
Thanks
Note
Some of the examples use replicationProviderName_s set to A2A. This retrieves Azure VMs that are replicated to a secondary Azure region using Site Recovery. In these examples, you can replace A2A with InMageAzureV2, if you want to retrieve on-premises VMware VMs or physical servers that are replicated to Azure using Site Recovery.
[Enter feedback here]

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

ID: ff08de1c-1661-5523-0f1a-eca1fd34c3e9
Version Independent ID: 64502dfc-db1c-ad5e-fa61-02e0163f85f6
Content: Monitor Azure Site Recovery with Azure Monitor Logs - Azure Site Recovery
Content Source: articles/site-recovery/monitor-log-analytics.md
Service: site-recovery
GitHub Login: @ankitaduttaMSFT
Microsoft Alias: ankitadutta

@jozarchukredapt
Thanks for your feedback! We will investigate and update as appropriate.

@jozarchukredapt - Thanks again for bringing this to our attention. We have updated the doc and it will be live once it's merged.  We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Use redux-validate for examples

This is not a serious pull request. I wanted to:

Draw attention to a recent rewrite of redux-validate, it adds several features including async & deep key support.
Make sure redux-validate works well with redux-form.

I think the changes to the fieldArrays example are particularly interesting, the code seems a lot easier to understand with the addition of redux-validate.

This is very interesting, @ashtonwar. The power of redux-validate was not obvious to me from its readme. You need to put some more words in there about each of the code examples. 😄
While, as you noted, it does not make sense for the standard examples to use a third party validation library, it would make sense for you to copy some or all of the examples from this repo over to an examples folder in your repo. I would be more than happy to include a "Does this code look disgusting? Check out redux-validate!" comment in my examples, especially the FieldArray one.

Linking to redux-validate in the examples would be really cool. I'll probably copy across the examples sometime next week & setup an interactive github.io demo based on them like you have.
In regards to improving the readme: I'm not sure which words to use or the order to put them in. It'd be awesome if you could open a PR with some revisions.
It occurred to me if if you're using field arrays a lot it might be helpful to define some higher-order validation functions like this (not sure whether it's suitable for documentation):
const moreThan = (ammount) => (value, key) => {
  if (isNaN(Number(value))) return 'Not a number'
  if (Number(value) <= ammount) return
  // convert 'members.0.hobbies._error' to 'hobbies'
  key = key.split('.').slice(-2)
  key = key[1] === '_error' ? key[0] : key[1]
  return `No more than ${stringify(ammount)} ${pluralize(key, ammount)} allowed`
}

Not 100% clear on what you meant by "Cool! It seems oriented to mostly Required validation. README would benefit from some < or > validations as well. It's non-obvious" on Twitter.
Did you mean:

Include more key manipulation examples with <>'s and {}'s?
Examples that show expressing errors in terms of other errors (e.g: if height or weight is invalid then so is BMI)?

2 Could be done like:
const validate = values => {
  let errors = _validate(['title', 'content'])(values)
  errors =
    _validate({title: title => title.replace('required', 'needed')})
      .then(null, error => error)(errors)
  return errors
}
validate() = {title: 'Title is needed', content: 'Content is required'}

With a next helper that could become:
_validate('title').then('content').next('title', title => title.replace('required', 'needed'))

By < and >, I meant if (min > max) { errors.min = 'Too big' }; I wasn't referring to your use of < and > in your rule notation.

I'm gonna close this, but I'm glad it's around to reference. Thanks.


History events showing All-service events, for all services

Should only show events which affected this service.
e.g. the history here.

Also in the CLI?

yes.

I can't recreate this in the cli. Works as expected.
 ~/source/gocode/src/github.com/weaveworks/flux   master ●  fluxctl history
TIME                 TYPE  MESSAGE
20 Apr 17 11:47 UTC  v0    Released: dockercloud/hello-world:stdout to no services, by phil, with message "Because I had to"
20 Apr 17 11:30 UTC  v0    Released: quay.io/weaveworks/helloworld:master-9a16ff945b9e to no services, by phil, with message "Because I had to"

 ~/source/gocode/src/github.com/weaveworks/flux   master ●  fluxctl history --service=default/web
TIME                 TYPE  MESSAGE
20 Apr 17 11:47 UTC  v0    Released: dockercloud/hello-world:stdout to no services, by phil, with message "Because I had to"

 ~/source/gocode/src/github.com/weaveworks/flux   master ●  fluxctl history --service=default/helloworld
TIME                 TYPE  MESSAGE
20 Apr 17 11:30 UTC  v0    Released: quay.io/weaveworks/helloworld:master-9a16ff945b9e to no services, by phil, with message "Because I had to"

Also seems to work in the UI. Did someone fix it?

Fixed by #532


Update the thor and tilt dependencies

I ran rake spec, and everything passed.

Hmm, seems listen doesn't like the ruby version.

There, looks like i fixed the travis issue.

Nice!

Available in 1.0.1 - thanks!

@henderea I added you as a collaborator, if you're not interested or don't have time I understand!

@colinta i don't mind, but i don't know that i'll do much of anything on the core stuff. i'm not all that familiar with xcode project systems or nib/storyboard source xml


CAS delegate cas protocol configuration problem.

CAS Server: 5.1.4
cas-server-support-pac4j-webflow : 5.1.4
When I try to set the property cas.authn.pac4j.cas[0].protocol to CAS20 I get a malformed URL exception.
I think that this is due to the incorrect CasConfiguration constructor (String, String) being called. The Pac4jProperties.Cas protocol property should be of type CasProtocol.
If this is the correct diagnosis, I can patch it and create a PR.
Cheers

Thanks for the find. Your diagnosis is correct. Rather than changing the type, simply parse and cast in the ctor. (CasProtocol.valueOf(...))


fix version forgot update

Please answer these questions before submitting pull request

Why submit this pull request?
[x] Bug fix
[ ] New feature provided
[ ] Improve performance

If you want to change, use 8.1.0, there is no 8.2.0-snapshot. 8.1-snapshot is pushed to the apache mavem for purpose only. This is not a local build version.
Take a look on the pom.xml.

got it, and change 8.1.0

@zhaoyuguang Please do an update?


Add support for building specific commit.

Add environment variable REPO_COMMIT which will accept commit hash.

Fixed in 55de83d024b91ac32465f6aeb8e194ccc1a9f091


it is not working

The login page is not working
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$file_path
Filename: controllers/Auth.php
Line Number: 58
Backtrace:
File: /opt/bitnami/apache2/htdocs/aya1/application/modules/auth/controllers/Auth.php
Line: 58
Function: _error_handler
File: /opt/bitnami/apache2/htdocs/aya1/application/core/MY_Controller.php
Line: 48
Function: login
File: /opt/bitnami/apache2/htdocs/aya1/index.php
Line: 317
Function: require_once
A Database Error Occurred
Error Number: 1146
Table 'aya1.settings' doesn't exist
SELECT * FROM settings WHERE id = 1 AND status = 1
Filename: modules/admin/models/Settings_model.php
Line Number: 61

sorry for late reply. please upload db.sql file fro db folder. or create a column file_path in users table hope it works
also i updated the project you can download again


Scalar: helper accessor to DataFrame values

There's inevitably a need to peek at DataFrame cells contents and it would be nice to have an ability to write a simple descriptor for each DataFrame and avoid string references and type casts. We may solve this problem with an API similar to Cayenne Property object. E.g.:
interface MyDF {
        Scalar<String> A = Scalar.at(Index.a);
        Scalar<String> B = Scalar.at(Index.b);
        Scalar<String> C = Scalar.at(Index.c);

        enum Index {a, b, c}
}

Scalar in turn can have methods to build Aggregators, JoinPredicates, Hashers, etc.

Mostly done. This is only the beginning of the work on Java-friendly type and name aware API, which would probably require on the spot class generation.


Fix bug in AsByteSequence implementation for String

This fixes a small bug in the AsByteSequence implementation for String which caused the library to panic when receiving and empty string property when calling get_property().

Thanks!


Ability to add context values

Checklist

[x] Are you running the latest v3 release? The list of releases is here.
[x] Did you check the manual for your release? The v3 manual is here.
[x] Did you perform a search about this feature? Here's the GitHub guide about searching.

What problem does this solve?
In old versions we could add context fields in Before function like this
  Before: func(c *cli.Context) error {
      db := "example"
      c.Context = context.WithValue(c.Context, "db", db)
      return nil
  },

It's useful for example for passing logger through all commands.
Solution description
Add some middleware layer to command with signature
func(ctx context.Context, command *cli.Command) func(ctx context.Context, command *cli.Command)

where we could modify passing ctx
Describe alternatives you've considered
Return back Context field to command

I agree context should be available everywhere 🥳

@nejtr0n What exactly are you trying to achieve ? when calling rootCmd.Run(ctx, args) you can pass in a ctx of your choice with whatever values you define. All subcmds will have a context with parent context set to that so you should have able to retrieve said values. Do you mean you want to pass in a new context to the Action function for the command based on what you set in Before ? I hadnt really thought about that use case. If you can give me a sample of Before/Action functions of your older code I can see what can be done.

@bartekpacia I am thinking this would be valuable. What do you think ?

It seems to be a valid feature request. @nejtr0n, could you show an API you'd like (just like you demonstrated what it looked like in "old"/v2 version of this module)?

I just encountered this problem as well and hope that the CLI can have this capability.
Based on my needs, the API usage scenario I hope for:
var name string
cmd := &cli.Command{
	Commands: []*cli.Command{
		{
			Name: "config",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "name",
					Destination: &name,
				},
			},
			Before: func(ctx context.Context, command *cli.Command) (context.Context, error) {
				switch {
				case strings.HasPrefix(name, "good-"):
					return context.WithValue(ctx, "name", name), nil
				case strings.HasPrefix(name, "bad-"):
					return nil, fmt.Errorf("bad name: %s", name)
				default:
					return context.WithValue(ctx, "name", "unknown-"+name), nil
				}
			},
			Action: func(ctx context.Context, command *cli.Command) error {
				name := ctx.Value("name").(string)
				fmt.Println(name)
				return nil
			},
		},
	},
}

or
var name string
cmd := &cli.Command{
	Commands: []*cli.Command{
		{
			Name: "config",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "name",
					Destination: &name,
				},
			},
			Before: func(ctx context.Context, command *cli.Command) error {
				switch {
				case strings.HasPrefix(name, "good-"):
					command.AddKey("name", name)
					return nil
				case strings.HasPrefix(name, "bad-"):
					return fmt.Errorf("bad name: %s", name)
				default:
					command.AddKey("name", "unknown"+name)
					return nil
				}
			},
			Action: func(ctx context.Context, command *cli.Command) error {
				name := command.GetValue("name").(string)
				fmt.Println(name)
				return nil
			},
		},
	},
}

Reason:
I hope the function of Before is to validate the Flag and generate a value based on the validation (which could be a struct, a string, etc.), so that Action can directly acquire this value for operation.
Take my current real needs as an example:
var doCtx = &do.DoContext{}

var name string
cmd := &cli.Command{
	Commands: []*cli.Command{
		{
			Name: "config",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "name",
					Destination: &name,
				},
			},
			Before: func(ctx context.Context, command *cli.Command) error {
				dc, err := do.Setup(name);
				if err != nil {
					return err
				}
				doCtx = dc
				return nil
			},
			Action: func(ctx context.Context, command *cli.Command) error {
				return dc.Start()
			},
		},
	},
}

Personally, I prefer the second option because it won't make destructive changes to v3 (even though it's currently in alpha), and it allows Action to have the same capabilities, so that After can also handle things based on the values set by Action :)

@BlackHole1 Can you submit a PR ?

@BlackHole1 Can you submit a PR ?

Of course, but before submitting a PR, I need to know which one urfave/cli currently prefers?

var name string
cmd := &cli.Command{
	Commands: []*cli.Command{
		{
			Name: "config",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "name",
					Destination: &name,
				},
			},
			Before: func(ctx context.Context, command *cli.Command) (context.Context, error) {
				switch {
				case strings.HasPrefix(name, "good-"):
					return context.WithValue(ctx, "name", name), nil
				case strings.HasPrefix(name, "bad-"):
					return nil, fmt.Errorf("bad name: %s", name)
				default:
					return context.WithValue(ctx, "name", "unknown-"+name), nil
				}
			},
			Action: func(ctx context.Context, command *cli.Command) error {
				name := ctx.Value("name").(string)
				fmt.Println(name)
				return nil
			},
		},
	},
}

var name string
cmd := &cli.Command{
	Commands: []*cli.Command{
		{
			Name: "config",
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:        "name",
					Destination: &name,
				},
			},
			Before: func(ctx context.Context, command *cli.Command) error {
				switch {
				case strings.HasPrefix(name, "good-"):
					command.AddKey("name", name)
					return nil
				case strings.HasPrefix(name, "bad-"):
					return fmt.Errorf("bad name: %s", name)
				default:
					command.AddKey("name", "unknown"+name)
					return nil
				}
			},
			Action: func(ctx context.Context, command *cli.Command) error {
				name := command.GetValue("name").(string)
				fmt.Println(name)
				return nil
			},
		},
	},
}

The first one seems better. @urfave/cli want to chime in ? Alternatively we could have Before with the current signature and also BeforeWithContext with new signature. Depends on how we want cli/v3 to evolve. I can understand the need for subcommands to pass new contexts down the hierarchy.

To add another datapoint, our current CLI has a global timeout flag that we use with context.WithTimeout in Before. Lack of this feature blocks us from migrating to v3.

@rykov @nejtr0n Want to test out my PR ?


topWritersOf() and writersOf() are identical for a DblBuf

I have a BRAM that is the accumulator in a Fold.  Both the writersOf and the topWritersOf this BRAM are the same, even though the topWritersOf should point to the outer metapipe.
See MatMult_outer.scala on branch maxj, commit 5d8f51aea519c.  The problem BRAM is BRAM3628_1, who has pipe3733_done instead of metapipe3735_done as the topWriterOf

Refactored to topControllerOf for readers and writers to buffers. Future issues should use a new issue


Update test config to support ATS hardware

[x] This contribution adheres to CONTRIBUTING.md.

What does this Pull Request accomplish?
Reference ATS hardware by host name rather than IP address for future flexibility.
Why should this Pull Request be merged?
Enable automated testing of this Custom Device
What testing has been done?
Pharlap system tests have been run against the latest software and driver versions on ATS hardware. See VI tester results below. Linux x64 was not tested, but config file changes were the same.
Chassis Clock test expected to fail, as it is fixed in Pull Request #32

@Karl-G1 just to confirm, the changes above were tested with the 19.0 release, which is why the PXI Chassis Clock fix was not present, correct?

@rtzoeller Correct; this was tested with the 19.0 release packages.

As you mentioned, the VI is saved in LabVIEW 2019. I'll merge this once the changes are backported.


BigQuery support available - Update list of integrations

Google has just announced support for reading Delta Lake tables from BigQuery by using manifest files. But the front page in https://delta.io still shows BigQuery as Coming Soon:

Should the image be updated to reflect that Data Lake support in BigQuery has already been released?
Similarly, should a BigQuery entry be added to the Services section at https://delta.io/integrations?

@manuteleco this is a bit of an open question and I think worthwhile to discuss here.  When we originally created Integrations, it was really about native integrations.  Using that context, then Google Big Query would not qualify because it's still using manifest at this time.
But, there is another call out here - with UniForm, by definition Big Query can query a Delta UniForm table with their Iceberg API.  Should we then include Big Query under integrations there or should we call out a different section per se?
Or should we change the front image to be per the @marmbrus keynote during Data + AI Summit 2023 per Delta Kernel and UniForm?


Lingua's use of Kotlin coroutines causes leaks in web applications

I'm using lingua 1.1.0 in a Java web application for language detection. The application is set up to load all models on the first request:
LanguageDetectorBuilder.fromAllLanguages().withPreloadedLanguageModels().build();
When I undeploy the web application from the application server, the models stay in memory. I took a heap dump using Eclipse Memory Anaylzer. The dump shows that there are still instances of the classes related to coroutines (e.g. kotlinx.coroutines.scheduling.CoroutineScheduler$WorkerState, kotlinx.coroutines.scheduling.WorkQueue, kotlinx.coroutines.scheduling.CoroutineScheduler) after undeploying the application. The coroutines still seem to reference the models.
I've built a reproducer using only Servlet API that seems to show similar behaviour on Tomcat. Tomcat shows warnings like this:

WARNUNG: The web application [lingua-reproducer] appears to have started a thread named [DefaultDispatcher-worker-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.park(CoroutineScheduler.kt:795)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.tryPark(CoroutineScheduler.kt:740)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:711)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Is there are way to ensure that the threads created by Lingua terminate when the application is undeployed?

Thank you.
I'd be willing to test a SNAPSHOT version for the next release when the bug is fixed on the main branch.

Hi Erik, you can now clone this repository, switch to branch v1.2.0-wip and execute ./gradlew jarWithDependencies. You can then use the resulting jar file lingua-1.2.0-SNAPSHOT-with-dependencies.jar in your project to test whether the coroutine bug is gone with the updated dependency.
I close this issue here because this is not a bug in Lingua.

Thank you.
I've tested the new version and the problem is still present.
Our applications are normally designed so that we can manually cancel outstanding tasks (e.g. java.util.concurrent.Future from ExecutorService) when the application is shut down. Is there a way to get access to Lingua's task classes so that the application can manually shut them down on undeploy?

I've just found out that there is a way to manually cancel coroutine execution. I will have to try this out:
https://kotlinlang.org/docs/cancellation-and-timeouts.html
Perhaps it makes sense for you to ask the coroutine devs directly as they surely know more about how to handle this than I do. Please let me know as soon as you find out anything new.
In the meantime, I'm going to re-open this issue again. There is obviously still something to do in my code.

I'm not at all familiar with Kotlin coroutines but from skimming the documentation, it sounds like CoroutineScope might be helpful ( https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html#coroutine-scope ).

@dnb-erik-brangs I'm a bit late, I know, but I have just applied some modifications to the LanguageDetector which might help to resolve the issue. Can you perhaps build the JAR file again on the branch v1.1.1-wip and check whether the issue still exists? Alternatively, can you tell me how exactly I can reproduce the issue myself? Thank you.

@dnb-erik-brangs I'm closing this issue now so that I can prepare the release 1.1.1. If your problem still exists despite the recent changes, please open a new GitHub issue. Thanks.

Thank you.
The problem still seems to exist. I will open a new issue and link a repository with an example application that exhibits the problem.

That's great. I'm still willing to find a solution to your problem and I'm sure that I will find one with the help of an example application of yours. :)


RPC relay

⚠ Rebase to master once #24 is merged.

Issue/Task Number: #5, #6
Closes #5
Closes #6
Overview
Basic Ethereum-flavored JSON-RPC request/response relay between Potterhat users and the nodes behind the scene.
Supports Parity for now.
Changes

Added PotterhatRPC subapp.

 It is up to the user to make sure
that either:

Potterhat's consumers do not rely on any client-type specific features, or
Use the same client type for all Potterhat backend nodes

Cross-client support maybe considered for Potterhat in the future but it will take some time.
Usage

Configure backend nodes via environment variables, e.g.

export RPC_PORT=8545
...
export POTTERHAT_NODE_1_ID="local_geth"
export POTTERHAT_NODE_1_LABEL="Local Geth"
export POTTERHAT_NODE_1_CLIENT="geth"
export POTTERHAT_NODE_1_RPC="http://localhost:8645"
export POTTERHAT_NODE_1_WS="ws://localhost:8646"
export POTTERHAT_NODE_1_PRIORITY=10
...
export POTTERHAT_NODE_2_ID="cluster_geth"
export POTTERHAT_NODE_2_LABEL="Cluster Geth"
export POTTERHAT_NODE_2_CLIENT="geth"
export POTTERHAT_NODE_2_RPC="http://localhost:8745"
export POTTERHAT_NODE_2_WS="ws://localhost:8746"
export POTTERHAT_NODE_2_PRIORITY=20

Make sure that these nodes are already running.

Run mix run --no-halt on Potterhat

Try make RPC calls to potterhat, e.g.

curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
--data '{
        "jsonrpc":"2.0",
        "method":"web3_clientVersion",
        "params":[],
        "id":1
}' | jq

You should see Ethereum-flavored, JSON-RPC response returned.

Bonus point: Try start/stop some or all of your nodes and see what happens.

Impact
Meh.

Remaining:

[ ] Add tests to cover various failover cases

Also instead of calling ActiveNode.deregister directly, should you not have some sort of function where it calls GenServer.stop(pid) where the process handle :stop and remove itself from the registry? So this is consistent with how :EXIT is handled.

Todo:

[ ] Make reconnection not blocking the Node process
[ ] Figure out how to deregister the node without going through the genserver lifecycle (too slow to deregister via genserver lifecycle)

@sirn Noting down before I forget after the sleep...
So I tried moving the deregistration to the node's exit process but the problem is that:

Currently I'm relying the most up to date list of nodes by always calling ActiveNodes.first/0 before a request.

To delegate deregistration to node's exit lifecycle means that the request forwarder is unavoidably blocked until the exit lifecycle reaches deregistration. Only then it can make another ActiveNodes.first/0, then the request.

This could be solved by querying ActiveNodes.all/0 only once at the beginning. Then reuse the list for all subsequent retries until the list is exhausted. But this means it misses newly resurrected nodes, and may make retries to already unhealthy nodes.

So I can think of 2 ways right now:
a) Keep calling ActiveNodes.first/0 for each retry. But triggers node deregistration before and outside the exit lifecycle (similar to current code). Short blocking, timeout penalty only once per occurence of unhealthy node, but code is not as elegant.
b) Call ActiveNodes.all/0 once and reuse until exhausted. No blocking, elevant code, but potentially more timeout penalties from retrying on unhealthy nodes.
c) Or any better ideas?
I'm currently in favor of a) because of the less false positives in exchange of cleaner code 😢

☝ Force-pushed to rebase against latest master

I'm going with a) in the meantime.

a) Keep calling ActiveNodes.first/0 for each retry. But triggers node deregistration before and outside the exit lifecycle (similar to current code). Short blocking, timeout penalty only once per occurence of unhealthy node, but code is not as elegant.

Changed my mind to b)

b) Call ActiveNodes.all/0 once and reuse until exhausted. No blocking, elevant code, but potentially more timeout penalties from retrying on unhealthy nodes.

Reasons:

Cleaner code
The time taken and the chance of having to go through all nodes is minimal

For some reason the last commit wasn't signed. So here's a forced push


Fix typo in pypi.md page

@jchomarat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@jchomarat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ramiMSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.


fix(schedules): autofill schedule stuck

:tada: This PR is included in version 2.98.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


less than direct guidance

For the type of driver that would use this structure, MapBuffers should be set to STOR_MAP_ALL_BUFFERS_INCLUDING_READ_WRITE.

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

ID: edda33b3-246f-1229-d613-79fcd7619de2
Version Independent ID: e7199ca7-bd33-9981-0b6b-99ee8024227e
Content: _VIRTUAL_HW_INITIALIZATION_DATA
Content Source: wdk-ddi-src/content/storport/ns-storport-_virtual_hw_initialization_data.md
Product: windows-hardware
GitHub Login: @windows-driver-content
Microsoft Alias: windowsdriverdev

Thanks, @BenWestbrook
@aahill can you please investigate?

Hi @BenWestbrook, I've added this information to the topic - should be visible soon. I've also added some information about the other mapbuffers, such as STOR_MAP_NON_READ_WRITE_BUFFERS, and STOR_MAP_NO_BUFFERS.
Thanks for bringing this to our attention, feel free to reach out again!


Team Management

Is this package support team management like laratrust or spatie-laravel-permission?

Not directly as they do, but you can support team permissions by putting the decorator on the teams model