Dockerizing

Hi,
I have great experiences with docker and want to encapsulate homebridge within a docker image.
This makes it runnable on every device which has docker support (e.g. some NAS like Synology)
Question:
Branch it here or do it in my own repository with a submodule link to here?

Someone tried the docker solution and since it didn't work for him, used chroot instead:
http://jensbouma.nl/hello-siri-turn-the-lights-on-the-siri-for-iot-bridge-running-on-a-synology-nas/

Do you know if Node.js version 4.x can compile on ARMv7 NAS like Synology DS215j (Armada 375) or  DS215+ (Alpine AL212) or are these models limited to node v0.12.x?

Docker can run on those models:
https://www.synology.com/de-de/dsm/app_packages/Docker
I do not know if Node can compile directly on an ARM NAS unfortunately

i've also tried to do a dockerrized version. it runs fine (dobsiin/fhem), but i cant get it in the eve elgato app, I really tried every port setting there is available. normally it is 51826 thought it would be enough to run homebridge inside a container. hopefully someone will figure it out. guess i'm going with chroot now.

Hey, my approach works:
https://github.com/patrickbusch/homebridge-docker
The trick for me was that it needs to be run with --net=host, otherwise the avahi-daemon would not be accessible from the outside.
This works on an PI with Hypriot OS (Raspbian with recompiled kernel for docker support)
Linux should also be fine, on a Mac however you may have to fiddle with the Ports to the Docker VM ;)
Cheers

Thank you!!!
I'm now able to run the homebridge docker container on my synology nas. Like you said the trick was --net=host which is unfortunately only available when you ssh into your synology nas and run the container with the
docker run -d --net=host -p 51826:51826 homebridge
cmd there.

Glad it worked :D

@dobsiin How did you install/build/run on the syno? All from command line or is there any possibility to use the gui besides for the running of the container?

I built the image on my computer with the [docker toolbox] (https://www.docker.com/docker-toolbox) with the cmd like docker build -t dobsiin/homebridge /path/to/Dockerfile then i pushed the built image to my [docker hub] (https://hub.docker.com) docker push dobsiin/homebridge  i personally would not do the build process on the syno.
then simply download the image with docker pull dobsiin/homebridge or download the docker image with the GUI from syno.
but to be able to run it you have to use ssh and the full range of docker cmd's because the problem is the syno GUI for docker is no capable of adding the option --net=host.
The GUI is only good for downloading images, and monitoring the container.

Has someone got @patrickbusch  docker image running on an raspberry pi?

@patrickbusch @snizzleorg thanks guys, my Homebridge Docker image is running.
But there is a strange behaviour:
Everytime I stop the container (homebridge-pi.sh stop) and  then start the container (homebridge-pi.sh start) there is a homebridge error and the container stops.
Homebridge is running on port 51826.
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: unknown
    at Error (native)
    at new Advertisement (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:352:20)
    at HAPServer.emit (events.js:104:17)
    at HAPServer._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:153:8)
    at EventedHTTPServer.emit (events.js:104:17)
    at EventedHTTPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:62:10)
    at Server.emit (events.js:104:17)
    at net.js:1171:12
    at process._tickCallback (node.js:355:11)

Only (homebridge-pi.sh remove / homebridge-pi.sh run) will work then.
The problem after that, I have to re-add Homebridge to Homekit in iOS, then it works until next rerun. This is not a good workaround cause after re-adding Homebridge to HomeKit all the configuraiton is gone (rooms, Scenes...)
The config.json is not changed, ID and MAC of HomeBridge are same, but the iOS device did not connect after rerun. Maybe there is more, that identifies Homebridge
any idea what that cause?

I have the same problem. No idea how to fix it however.

I have not myself found a solution for this problem. It has something to do the mdns advertisement, this only works correctly in docker when it has direct access to the hosts network interface (hence --net=hosts in the run script). When stopping the container this gets cleaned correctly. Maybe we can clean the host interface after stopping the container, that could work

well but still after restarting the whole raspberry pi i still have to re-add home bridge on the iPhone.. that can't really be an mdns problem - can it?

re-adding works for me without changing the name, but at first, I have to delete the current accessory.
After that I can re-add Homebridge again, with the same name

yeah but doing this every time home bridge is restarted is very annoying...

sure, maybe we should dockerize pimatic and run hombridge nativ?!

If I recall correctly there is something written to the home-directory by homebridge. I cannot check right now. exposing this as volume could help

so if you do homebridge-pi.sh attach you will find:
oot@razberry:~/.homebridge/persist# ls -la
total 24
drwxr-xr-x 2 root root 4096 Dec 15 11:57 .
drwxr-xr-x 1 root root 4096 Dec 15 11:56 ..
-rw-r--r-- 1 root root  491 Dec 15 17:30 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 8317 Dec 15 17:30 IdentifierCache.CC223DE3CE30.json
``

they seem to have the timestamp when started homebridge. Are they files persistent or will they be deleted while stopping the container?!

If they are needed, to reconnect to homebridge, how could they made persistant inside the container?

The persist directory contains important data about paired iOS devices and should not be deleted. If you are running in a container you will need to ensure this directory survives. You can customize the location of the directory using a command-line parameters (pass in --help for more info)

I had no chance to see if the files are changing when running start / stop (container exit)
but the AccessoryInfo.CC223DE3CE30.json is changing when running rerun (stop / remove / run)

I adapted the run script to use a volume for .homebridge. Can you check if this solves your problem?

thanks, still the same, where is that volume mounted? (root/.homebridge)?

you can run docker inspect homebridge-pi-v0.1-SNAPSHOT
in the mounts section you can see the dir on the host system.
if you want a certain dir, you can adapt homebridge-common.sh in run method:
Docker syntax is -v /path/on/host:/path/in/container

I created a pull request so that the config folder will be kept on the host. I could not verify whether it works though. If someone can test it here it is:
https://github.com/snizzleorg/homebridge-docker
for info on the volume option of docker see here:
https://docs.docker.com/engine/userguide/dockervolumes/

looks good. config.json can also be outside, yes.
We should also think about how we can configure what plugins to install (at creation of container).
I already have an idea - configure it in an additional file (plugins), add that at the build stage and perform installs according to it. I will give it a try in the next days

I'll test laster today. looks good means it is working on your iOS Device, you don't have to delete the Home in Homekit after rerun?!

I'm not at home so I couldn't test, I just checked the code changes

works for me. config is maintained, no need to re-add Homebridge after homebridge-pi.sh rerun thx!

I do have the same problem again, although the persist folder is outside of the container:
Homebridge is running on port 51826.
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: unknown
    at Error (native)
    at new Advertisement (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:352:20)
    at HAPServer.emit (events.js:104:17)
    at HAPServer._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:153:8)
    at EventedHTTPServer.emit (events.js:104:17)
    at EventedHTTPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:62:10)
    at Server.emit (events.js:104:17)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Failed to start message bus: The pid file "/var/run/dbus/pid" exists, if the message bus is not running, remove this file
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>

checking with bonjour browser i see indeed that the service is still registered even if the raspberry pi is reset.

actually for whatever reason the persist files are getting overwritten and are 0 file size. so this might be the cause of the problem?

ls -l /etc/homebridge/persist/
total 0
-rw-r--r-- 1 root root 0 Jan  6 16:47 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 0 Jan  6 16:47 IdentifierCache.CC223DE3CE30.json

If I use rerun it works and no error is produced
then the file sin the persist folder have a non-zero size after stoping and starting the files get reset...
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/
total 20K
-rw-r--r-- 1 root root 389 Jan  6 17:07 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 14K Jan  6 17:07 IdentifierCache.CC223DE3CE30.json
steffen@automator ~/src/homebridge-docker $ ./homebridge-pi.sh stop
homebridge-pi-v0.1-SNAPSHOT
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/
total 20K
-rw-r--r-- 1 root root 389 Jan  6 17:07 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 14K Jan  6 17:07 IdentifierCache.CC223DE3CE30.json
steffen@automator ~/src/homebridge-docker $ ./homebridge-pi.sh start
homebridge-pi-v0.1-SNAPSHOT
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/
total 20K
-rw-r--r-- 1 root root 389 Jan  6 17:07 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 14K Jan  6 17:07 IdentifierCache.CC223DE3CE30.json
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/
total 20K
-rw-r--r-- 1 root root 389 Jan  6 17:07 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 14K Jan  6 17:07 IdentifierCache.CC223DE3CE30.json
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/
total 0
-rw-r--r-- 1 root root 0 Jan  6 17:10 AccessoryInfo.CC223DE3CE30.json
-rw-r--r-- 1 root root 0 Jan  6 17:10 IdentifierCache.CC223DE3CE30.json
steffen@automator ~/src/homebridge-docker $ ls -lh /etc/homebridge/persist/

For those curious about running the docker image on a synology NAS: It works well in my environment with the --net=host parameter.

@cbrandlehner How did you add that parameter in your Synology? Using the gui?
As for the mdns error a few others mentioned, although I haven't figured out why it happens, I've found that running this after booting gets it running again:
/etc/init.d/dbus restart
service avahi-daemon start
service avahi-daemon start

The avahi-daemon line is entered twice because the first time it runs it always returns an error, but runs fine the second time.

@acseven I do not use the GUI. I created a file homebridge.sh with this content:
docker run -d --net=host -p 51826:51826 -v /volume3/docker/homebridge:/root/.homebridge cbrandlehner/homebridge:0.6-SNAPSHOT

To start the docker container I have to log in via SSH and start the script.

@acseven @cbrandlehner @patrickbusch  you have to restart bus in the container? or on the host (that does not really make sense after rebooting - doesn't it? And if in the container then it probably needs to be integrated in the startupscript inside the container  - right?
I tried rebooting the host and then starting bus but that did not work.
./homebridge-pi.sh start gives
Error response from daemon: Cannot start container homebridge-pi-v0.1-SNAPSHOT: [8] System error: dbus: connection closed by user
Error: failed to start containers: [homebridge-pi-v0.1-SNAPSHOT]

I still have to change the name in config.json and delete the persist files. Then of course in iOS homekitbridge has to be added again and everything has to be configured again.

@cbrandlehner
Hi,
I've been trying to install HomeKitBridge-Vera on my Synology using Docker for one week now, without success. It's very frustating ...
I tried a lot of things, following these tutoriels :
http://forum.micasaverde.com/index.php/topic,31716.msg237385.html#msg237385
http://forum.micasaverde.com/index.php/topic,31716.msg256791.html#msg256791
Could you please explain how did you manage to do it ?
Here is my story about that :
http://forum.micasaverde.com/index.php/topic,31716.msg267601.html#msg267601
You can use "history" command in bash to find all executed commands.
Regards

Hi @tahitibub
I posted a full documentation on my blog:
http://chris.brandlehner.at/Brandlehner/cab_blog.nsf/d6plinks/CBRR-A6XQUY

@cbrandlehner
Hi Chris,
Thank you very much for that, this is a very helpful explanation.
However, could you add the VERA plugin to your Docker container (I don't manage to do it by myself) :
https://www.npmjs.com/package/homebridge-vera
This plugin seems mandatory to operate with Micasaverde "Vera" domotic boxes (http://getvera.com/).
Kind regards,

@cbrandlehner
Hi Chris, great tutorial on your blog, but i get stuck at the very end. I get to see the docker images, but after the 'run' command, the containers keep stopping immediately.
The log says :
--- stdout 23:02:55 Loaded config.json with 0 accessories and 1 platforms.
stdout 23:02:55
--- stdout 23:02:55 Loaded config.json with 0 accessories and 1 platforms.
stdout 23:02:55
--- stdout 23:02:55 Loading 1 platforms...
stdout 23:02:55 /usr/lib/node_modules/homebridge/lib/api.js:88
stderr 23:02:55  throw new Error(&amp;quot;The requested platform '&amp;quot; + name + &amp;quot;' was not registere
stderr 23:02:55  ^
stderr 23:02:55 Error: The requested platform 'eDomoticz' was not registered by any plugin.
stderr 23:02:55  at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:88:13)

and so on....
I did use ssh to "npm install -g homebridge-edomoticz" and files are present in /usr/lib/node_modules/homebridge-edomoticz
I am pretty sure my config.json is okay too.  Can you give me a hint how to solve this?
Thanks, Tigo

Hi, every time you start a docker container, all changes made in previous sessions are lost.
I usually create a new docker container but you can try using "rerun" instead of "run".

Thanks for your reply Chris. Unfortunately it doesn't work. When I give the run command
docker run -d --net=host -p 51826:51826 -v /volume3/docker/homebridge:/root/.homebridge cbrandlehner/homebridge:0.6-SNAPSHOT
a new docker container is created but that is immediately stopped. Repeating the run command results in yet another container that is stopped, and so on. I have no idea why the container process is killed. Rerunning the container is not even an option, as every button stays gray.

Update: I seem to have made some progress. I updated the node.js package. Seems to have had some influence. Now the configuration is loading but the script is kicking me out because a problem (missing password) with the Nefit Thermostat. Seems I can fix that...

@Tigo72   Yesterday I published a new version that's based on Node 5.x because I wanted to try the mqtt bridge which asks for node 4. It runs on my Synology in docker.
https://github.com/cbrandlehner/homebridge-docker

@cbrandlehner
Thanks so much, great work! I got it up and running and it's stable.
One problem remains in my cae. What I cannot figure out is why my plugins are not registered. I keep getting errors such as these:
`/usr/lib/node_modules/homebridge/lib/api.js:88
throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
^
Error: The requested platform 'eDomoticz' was not registered by any plugin.
at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:88:13)
at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:196:45)`
It happens with every platform or accessory, except Philips Hue
If have installed plugins several times using
npm install -g homebridge-edomoticz
or similar plugins.
After hours of trying, I do not know how to fix this.

@Tigo72 I am afraid the plugins have to be installed in the docker container.
I just uploaded a new version 0.8 that contains homebridge-edomoticz
You may want to look into https://github.com/cbrandlehner/homebridge-docker and make your own docker container.

@cbrandlehner
Great, thanks for your help Chris!

Hi all, came across a strange issue when building my container for Homebridge.  My Dockerfile contains the ADD directive to copy my config.json into /root/.homebridge/
ADD config.json /root/.homebridge/config.json
For some unknown reason, the file never actually appears in the container.  During the build I can see the add is successful
Step 23 : ADD config.json /root/.homebridge/config.json
---> 5a167031a36e
I even added my own json files in the persist directory which worked perfectly.
Step 21 : ADD AccessoryInfo.CC223DE3CE32.json /root/.homebridge/persist/AccessoryInfo.CC223DE3CE32.json
---> 093b0067282c
Removing intermediate container ee65501acec8
Step 22 : ADD IdentifierCache.CC223DE3CE32.json /root/.homebridge/persist/IdentifierCache.CC223DE3CE32.json
---> b276e7ae0e75
I exported the container to a TAR file and extracted the config.json file ok, but every time I start the container it would complain, no config.json.
I got around it by adding the file to /root and then copying the files in place in the run.sh  and all works great.
if anyone has any idea why this doesn't work  please share.  I built the container on my mac and then pushed/pulled it so I figure this was not unique to the Synology but clearly something I am doing since no one else has seen this that I can tell
thanks

If you use the ADD command, you copy a file within the container.
However, if you start the container with the -v parameter, you map a directory into the container which has a higher priority than the files within the container.
So you should either use ADD which I think is unflexible as every change needs that you create a new docker image
OR
you place the config file outside of the container and map it via -v.

ok, thanks for that. (RTFM) :)

RE, the MDNS error when stopping/starting the container with docker stop/docker start
Tired the suggestion of @acseven (the restart of the avahi-daemon/dbus) but this   did not work.
What I have found is that providing a shutdown timeout for the container ensures a successful restart.
I used 120 seconds (docker stop -t 120 homebridge).
I tried 60 seconds but that breaks it again.
it seems like the additional time allows for a cleaner shutdown

I saw a similar issue on another docker project to the avahi issue mentioned in this thread (@EMCSizl, @snizzleorg), and found this one while seeking an answer. Sure enough, the situations do seem similar. So, here's what I think is going on.
project file run.sh
The way this file invokes dbus most likely causes the issue. dbus-daemon --system throws an error when it encounters the file at /var/run/dbus/pid. Using service dbus enable instead seems to gracefully handle the removal of that stale file, so you can survive restarts, etc. better. It might be worth it to look into using service avahi-daemon enable for avahi as well, mainly for consistency.

Here's a Pi image I put together as well. I prefer having everything in container and not using a shell script so that I can use compose.
https://github.com/ViViDboarder/docker-rpi-homebridge


Adding Refactor option, removing some description from PR template

Description
Updating PR template to include Refactor option, updating descriptions in some sections.
Fixes # (issue)
Feature # (details)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a  breaking change which will impact consuming tool(s).

[ ] Test A
[ ] Test B

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

agreed we can use forks for making PRs


bug:  Unable to build project

Running make setup gives me this error:
user@192 kakarot-rpc % make setup
chmod +x ./scripts/extract_abi.sh
git submodule update --init --recursive
cd lib/kakarot && make setup && make build && make build-sol && \
	mv build/ssj/contracts_Cairo1Helpers.contract_class.json build/cairo1_helpers.json && rm -fr build/ssj
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4560  100  4560    0     0  25691      0 --:--:-- --:--:-- --:--:-- 25762
rm -rf build/ssj
mkdir -p build/ssj
unzip -o dev-artifacts.zip -d build/ssj
Archive:  dev-artifacts.zip
  inflating: build/ssj/contracts_Cairo1Helpers.compiled_contract_class.json
  inflating: build/ssj/contracts_KakarotCore.compiled_contract_class.json
  inflating: build/ssj/contracts_Cairo1HelpersFixture.compiled_contract_class.json
  inflating: build/ssj/contracts.starknet_artifacts.json
  inflating: build/ssj/contracts_KakarotCore.contract_class.json
  inflating: build/ssj/contracts_UninitializedAccount.contract_class.json
  inflating: build/ssj/contracts_Cairo1Helpers.contract_class.json
  inflating: build/ssj/contracts_UninitializedAccount.compiled_contract_class.json
  inflating: build/ssj/contracts.sierra.json
  inflating: build/ssj/contracts_Cairo1HelpersFixture.contract_class.json
  inflating: build/ssj/contracts_AccountContract.contract_class.json
  inflating: build/ssj/contracts_AccountContract.compiled_contract_class.json
rm -f dev-artifacts.zip
poetry install
dyld[77687]: Library not loaded<EMAIL_ADDRESS>  Referenced from: <97881FA2-78EC-38F3-851F-E6952E30FF9F> /Users/user/Library/Application Support/pypoetry/venv/bin/python
  Reason: tried<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file), '/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file, not in dyld cache)
make[1]: *** [setup] Abort trap: 6
make: *** [setup] Error 2

I then tried to run the script itself which ran fine and then running
cargo build --release
user@192 kakarot-rpc % cargo build --release
   Compiling kakarot-rpc v0.6.19 (/Users/user/Documents/projects/kakarot-rpc)
error: JSON open file ./.kakarot/artifacts/account_contract.json error: No such file or directory (os error 2)
  --> src/eth_provider/starknet/kakarot_core.rs:26:5
   |
26 |     abigen_legacy!(AccountContract, "./.kakarot/artifacts/account_contract.json");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `abigen_legacy` (in Nightly builds, run with -Z macro-backtrace for more info)

error: JSON open file ./.kakarot/artifacts/kakarot.json error: No such file or directory (os error 2)
  --> src/eth_provider/starknet/kakarot_core.rs:32:5
   |
32 |     abigen_legacy!(KakarotCore, "./.kakarot/artifacts/kakarot.json");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `abigen_legacy` (in Nightly builds, run with -Z macro-backtrace for more info)

error: JSON open file ./.kakarot/artifacts/fixtures/ERC20.json error: No such file or directory (os error 2)
 --> src/eth_provider/starknet/mod.rs:8:1
  |
8 | abigen_legacy!(ERC20, "./.kakarot/artifacts/fixtures/ERC20.json");
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `abigen_legacy` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0432]: unresolved imports `super::starknet::kakarot_core::account_contract::AccountContractReader`, `super::starknet::kakarot_core::core::KakarotCoreReader`, `super::starknet::kakarot_core::core::Uint256`
  --> src/eth_provider/provider.rs:41:5
   |
41 |     account_contract::AccountContractReader,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `AccountContractReader` in `eth_provider::starknet::kakarot_core::account_contract`
42 |     core::KakarotCoreReader,
   |     ^^^^^^^^^^^^^^^^^^^^^^^ no `KakarotCoreReader` in `eth_provider::starknet::kakarot_core::core`
43 |     core::{CallInput, Uint256},
   |                       ^^^^^^^ no `Uint256` in `eth_provider::starknet::kakarot_core::core`

error[E0432]: unresolved import `super::starknet::ERC20Reader`
  --> src/eth_provider/provider.rs:46:23
   |
46 | use super::starknet::{ERC20Reader, STARKNET_NATIVE_TOKEN};
   |                       ^^^^^^^^^^^ no `ERC20Reader` in `eth_provider::starknet`

error[E0412]: cannot find type `Option` in module `kakarot_core::core`
   --> src/eth_provider/provider.rs:627:37
    |
627 |         let to: kakarot_core::core::Option = {
    |                                     ^^^^^^ not found in `kakarot_core::core`
    |
help: consider importing one of these items
    |
1   + use alloy_rlp::private::Option;
    |
1   + use alloy_sol_types::private::Option;
    |
1   + use core::option::Option;
    |
1   + use serde::__private::Option;
    |
      and 1 other candidate
help: if you import `Option`, refer to it directly
    |
627 -         let to: kakarot_core::core::Option = {
627 +         let to: Option = {
    |

error[E0422]: cannot find struct, variant or union type `Option` in module `kakarot_core::core`
   --> src/eth_provider/provider.rs:630:41
    |
630 |                     kakarot_core::core::Option { is_some: FieldElement::ONE, value: into_via_wrapper!(to) }
    |                                         ^^^^^^ not found in `kakarot_core::core`
    |
help: consider importing this variant
    |
1   + use serde::de::Unexpected::Option;
    |
help: if you import `Option`, refer to it directly
    |
630 -                     kakarot_core::core::Option { is_some: FieldElement::ONE, value: into_via_wrapper!(to) }
630 +                     Option { is_some: FieldElement::ONE, value: into_via_wrapper!(to) }
    |

error[E0422]: cannot find struct, variant or union type `Option` in module `kakarot_core::core`
   --> src/eth_provider/provider.rs:632:42
    |
632 |                 _ => kakarot_core::core::Option { is_some: FieldElement::ZERO, value: FieldElement::ZERO },
    |                                          ^^^^^^ not found in `kakarot_core::core`
    |
help: consider importing this variant
    |
1   + use serde::de::Unexpected::Option;
    |
help: if you import `Option`, refer to it directly
    |
632 -                 _ => kakarot_core::core::Option { is_some: FieldElement::ZERO, value: FieldElement::ZERO },
632 +                 _ => Option { is_some: FieldElement::ZERO, value: FieldElement::ZERO },
    |

error[E0412]: cannot find type `Option` in module `self`
  --> src/eth_provider/starknet/kakarot_core.rs:38:30
   |
38 |         pub(crate) to: self::Option,
   |                              ^^^^^^ not found in `self`
   |
help: consider importing one of these items
   |
31 +     use alloy_rlp::private::Option;
   |
31 +     use alloy_sol_types::private::Option;
   |
31 +     use core::option::Option;
   |
31 +     use serde::__private::Option;
   |
     and 1 other candidate
help: if you import `Option`, refer to it directly
   |
38 -         pub(crate) to: self::Option,
38 +         pub(crate) to: Option,
   |

error[E0412]: cannot find type `Uint256` in this scope
  --> src/eth_provider/starknet/kakarot_core.rs:41:27
   |
41 |         pub(crate) value: Uint256,
   |                           ^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0422, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `kakarot-rpc` (lib) due to 10 previous errors

@hhamud you seem to have an error with your poetry installation:
poetry install
dyld[77687]: Library not loaded<EMAIL_ADDRESS>  Referenced from: <97881FA2-78EC-38F3-851F-E6952E30FF9F> /Users/user/Library/Application Support/pypoetry/venv/bin/python
  Reason: tried<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file), '/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file, not in dyld cache)
make[1]: *** [setup] Abort trap: 6
make: *** [setup] Error 2

@hhamud you seem to have an error with your poetry installation:
poetry install
dyld[77687]: Library not loaded<EMAIL_ADDRESS>  Referenced from: <97881FA2-78EC-38F3-851F-E6952E30FF9F> /Users/user/Library/Application Support/pypoetry/venv/bin/python
  Reason: tried<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file<EMAIL_ADDRESS>(no such file), '/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.12/Python' (no such file, not in dyld cache)
make[1]: *** [setup] Abort trap: 6
make: *** [setup] Error 2

is poetry still required if I just need the abi files?
I thought that the script extracted them for me if the setup command failed.

no you indeed will need poetry in order to compile the contracts and extract the abi


bug?: useSubscription in testing

I'm having some trouble writing a test leveraging the useSubscription hook. I'm using NextJS w/ Jest & RTL to test the component. Here is the component, when I render the component, wrapped in the StompSessionProviderMock it keeps creating an error, TypeError: Cannot read properties of undefined (reading 'delete') when following the example.
I was able to get it working with jest.mock, but it feels a bit hacky to me,
// imports...

const mockedMessage = jest.fn<IMessage, any, any>();

jest.mock("react-stomp-hooks", () => ({
  ...jest.requireActual("react-stomp-hooks"),
  useSubscription: (_topic: string, callbackFn: (message: IMessage) => void) => {
    if(mockedMessage.mock.calls.length) return;
    callbackFn(mockedMessage());
  },
}));

afterEach(() => {
    stompMock.reset();
    mockedMessage.mockReset();
});

test("should return null when no message received", () => {
  mockedMessage.mockReturnValue({ body: JSON.stringify("") } as IMessage);

  const { container } = render(
    <stompMock.StompSessionProviderMock>
      <WebSocketStatus topic="test-topic" />
    </stompMock.StompSessionProviderMock>
  );

  expect(container).toBeEmptyDOMElement();
});

I was using v2.2.1, but I've upgraded to v3.0.0, and the same issue occurs.

One way I did get it to work was by modifying the node modules for the subscriptionMock function. Added optional chaining to the return by modifying the node_modules and this resolved the problem. I was no longer receiving an error in component instantiation and was able to use the mockReceiveMessage function to simulate incoming messages.

Hello!
Sorry for the delayed response.
The react testing library registers a global afterEach function which causes the previously rendered components to unmount and execute their cleanup code. The react-stomp-hooks library currently expects this to happen before the reset method of the mock is called (~because i was lazy and used ts-ignore instead of implementing proper error handling directly~).
The difference between the provided example and your code is, that the example registers the call to reset via afterEach at the global/file-level, while your code has this nested inside a describe block. This causes the order of the calls to be reversed, as jest always calls the scoped afterEach handlers first.
I have just released a new version 3.0.1 which includes the optional chaining fix you suggested, so the order of the calls should now be irrelevant. This should fix your issue.
Please let me know should you encounter any other problems.


Improve CONTRIBUTING.md

What this PR does / why we need it:
Update some outdated info in our CONTRIBUTING.md file:

Mention OWNERS files and remove maintainers list.
Link to the new membership guidelines.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:
NONE

/cc @mazzystr

/unhold

/unhold


Displays a "close" button in addition to existing behavior for dismissing an alert

fixes #1094

awesome, thank you 👍

awesome


Missing last data when ToString()

It should be showing as [1, 2, 0].

will check after work. can't be too difficult.

Not just this one but I am worries about the checking ndim for 0 2 or other through out the source code.

ToString was completely rewritten by me some time ago. This issue is out of date. Closing.


feat: 🎸 Add support for SQ settlements V2

Description
This adds support for new SQ settlement changes while keeping the old SQ support as well
Breaking Changes

JIRA Link
DA-1254
Checklist

[ ] Updated the Readme.md (if required) ?

/fast-forward

:tada: This PR is included in version 24.7.0-alpha.10 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 24.7.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 24.7.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 24.7.0 :tada:
The release is available on:

npm package (@release-v24.8 dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 24.7.0 :tada:
The release is available on:

npm package (@revert-24-breaking dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Adding PyTorch Serving example

Adding PyTorch Serving example
Issue #, if available:
N/A
Description of changes:
Adding a very simple image classifier model based on densenet161. This classifier was trained 102 types of flower. We are providing a inference sample where PyTorch is backend engine for MMS.
Testing done:
Manual
To run CI tests on your changes refer README.md
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vdantu

Thanks for taking the efforts to build a PyTorch example with MMS. This will be a great add to the repository.


FastAPI ignores json_encoders in the Model

First check

[*] I added a very descriptive title to this issue.
[*] I used the GitHub search to find a similar issue and didn't find it.
[*] I searched the FastAPI documentation, with the integrated search.
[*] I already searched in Google "How to X in FastAPI" and didn't find any information.
[*] I already read and followed all the tutorial in the docs and didn't find an answer.
[*] I already checked if it is not related to FastAPI but to Pydantic.
[*] I already checked if it is not related to FastAPI but to Swagger UI.
[*] I already checked if it is not related to FastAPI but to ReDoc.
[*] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Below is an example that showcases the issue:

from typing import *

from pydantic import BaseModel
from fastapi.encoders import jsonable_encoder

def sort_func(x: Set[str]) -> List[str]:
   """This function should be called on every serialization. This will convert a Set of strings to a sorted List of strings."""
    print("i was called!")
    return sorted(x)

class SomeModel(BaseModel):
    stuff: Set[str] = ...

    class Config:
        """Define a custom encoder for Sets such that they are sorted lists."""
        json_encoders = {
            set: sort_func
        }

print(SomeModel(stuff={"z", "a", "f", "d"}).json())
# This prints:
# "i was called!"  # GOOD
# '{"stuff": ["a", "d", "f", "z"]}'  # GOOD
# The Pydandic serializer does what it's supposed to do.

print(jsonable_encoder(SomeModel(stuff={"z", "a", "f", "d"})))
# This prints:
# {'stuff': ['z', 'd', 'f', 'a']}  # BAD
# The fastapi encoder is not calling the `sort_func`

Description

The primary issue is that when a Pydantic model defines special serialization behavior, fastapi is not obeying it.
In my example, I'm trying to store a set of values internally, but then serialize it into a sorted list.
The desired behavior is for fastapi to be consistent and obey Pydantic's conventions.

I also looked at other issues that are similar, but not quite the same:

https://github.com/tiangolo/fastapi/issues/1722
https://github.com/tiangolo/fastapi/issues/1986

Environment

OS: macOS
FastAPI Version: fastapi==0.61.1
Python version: 3.8.5

Additional context
I'm not sure if this is related but I think this is also a bug in the jsonable_encoder:
def jsonable_encoder(
    obj: Any,
    include: Optional[Union[SetIntStr, DictIntStrAny]] = None,
    exclude: Optional[Union[SetIntStr, DictIntStrAny]] = None,
    by_alias: bool = True,
    exclude_unset: bool = False,
    exclude_defaults: bool = False,
    exclude_none: bool = False,
    custom_encoder: dict = {},  # <-------
    sqlalchemy_safe: bool = True,
) -> Any:

https://github.com/tiangolo/fastapi/blob/0dfde6e284b221bf6695a98762a56d13a995e807/fastapi/encoders.py#L34
The custom_encoder is a keyword argument that defines a mutable type.

I also tried overriding the .json() function (with the excellent suggestion from @reallistic). However, fastapi's jsonable_encoder doesn't call that either.

Hey @mikegrima, #2061 fixes this.You can temporarily create a workaround by moving custom encoder to the top.
https://github.com/tiangolo/fastapi/blob/e77ea635777d2494690ba3eb62bd005b9edeefde/fastapi/encoders.py#L116-L122

@ycd Thank you! I have confirmed that it does fix my bug. Would you like me to close this issue or keep it open until the PR is merged?

You are welcome, i think it should be open till it get's merged. but i did not understand, can you elaborate a little more ?

Sure, for the second part, take the SomeModel object:
class SomeModel(BaseModel):
    stuff: Set[str] = ...

    def json(*args, **kwargs):
         # MY LOGIC HERE
         return json_str

If you override the json function, in Pydantic, it would call it when generating a JSON string. However, that does not work in FastAPI as it's not called. Is there some good guidance on the best way to override the JSON that is dumped? I'm very familiar with Marshmallow in that you can add functions to the object that are run on serialization after all the fields are processed, but not quite sure how to do that with Pydantic+FastAPI.

@mikegrima FastAPI calls the dict function on Pydantic models, just like json does internally.
https://github.com/tiangolo/fastapi/blob/master/fastapi/routing.py#L65

@mikegrima FastAPI calls the dict function on Pydantic models, just like json does internally.
https://github.com/tiangolo/fastapi/blob/master/fastapi/routing.py#L65

I'm having troubles with this fragment here:
https://github.com/tiangolo/fastapi/blob/fdb6c9ccc504f90afd0fbcec53f3ea0bfebc261a/fastapi/encoders.py#L43-L46
In my case, I'm attempting to temporarily apply encoding logic for a pydantic object but I very much don't want it to be permanent on the model's Config.json_encoders dict. If line 44 would instead be something like:
encoder = dict(getattr(obj.__config__, "json_encoders", {}))

So as to copy the original encoders dict, so the permanent config mutation doesn't occur. I'm not sure this is a bug strictly, just an expectation issue: the jsonable_encoder should not ever mutate a pydantic class. Then again, I think the custom_encoder parameter is not even documented and maybe it's not intended for general use.

I'm having troubles with this fragment here:
https://github.com/tiangolo/fastapi/blob/fdb6c9ccc504f90afd0fbcec53f3ea0bfebc261a/fastapi/encoders.py#L43-L46
In my case, I'm attempting to temporarily apply encoding logic for a pydantic object but I very much don't want it to be permanent on the model's Config.json_encoders dict. If line 44 would instead be something like:
encoder = dict(getattr(obj.__config__, "json_encoders", {}))

So as to copy the original encoders dict, so the permanent config mutation doesn't occur. I'm not sure this is a bug strictly, just an expectation issue: the jsonable_encoder should not ever mutate a pydantic class. Then again, I think the custom_encoder parameter is not even documented and maybe it's not intended for general use.

I'm now trying to figure out the best way to get a sort_keys=True somehow passed into the JSON generation. I'm unsure of the best way to do that.

To help close the loop, if you wanted to have sorted JSON results back, you would need to have something that looks like this:
import json
import typing
from starlette.responses import Response
from fastapi import APIRouter
from pydantic import BaseModel

class SortedJSONResponse(Response):
    media_type = "application/json"

    def render(self, content: typing.Any) -> bytes:
        return json.dumps(
            content,
            ensure_ascii=False,
            allow_nan=False,
            indent=None,
            separators=(",", ":"),
            sort_keys=True   # <---
        ).encode("utf-8")

class SomeModel(BaseModel):
   some_value: int
   some_other_value: str
   and_something_else: bool

some_router = APIRouter()

@some_router.get("/some/api/path", response_class=SortedJSONResponse)
async def get_sorted_json_response_api() -> SomeModel:
   return SomeModel(some_value: 1, some_other_value: "some other value", and_something_else: True)

I'm having troubles with this fragment here:
https://github.com/tiangolo/fastapi/blob/fdb6c9ccc504f90afd0fbcec53f3ea0bfebc261a/fastapi/encoders.py#L43-L46
In my case, I'm attempting to temporarily apply encoding logic for a pydantic object but I very much don't want it to be permanent on the model's Config.json_encoders dict. If line 44 would instead be something like:
encoder = dict(getattr(obj.__config__, "json_encoders", {}))

So as to copy the original encoders dict, so the permanent config mutation doesn't occur. I'm not sure this is a bug strictly, just an expectation issue: the jsonable_encoder should not ever mutate a pydantic class. Then again, I think the custom_encoder parameter is not even documented and maybe it's not intended for general use.
EDIT: I'll leave my current workaround here: instead of passing a pydantic object to jsonable_encoder, I call the object's dict() method beforehand:
# assume obj is a pydantic object
# assume custom_encoder contains the custom encoders to be given for this encoding only
encoded = jsonable_encoder(obj.dict(), custom_encoder=dict(obj.__config__.json_encoders, **custom_encoder))

I just ran into this exact same issue. jsonable_encoder modifying the classes config has to be a bug. If not, this is EXTREMELY unintuitive behavior and should be changed.

Sorry if this question was answered elsewhere but what is the reason that FastAPI does not call json(..) on the Pydantic BaseModel? Given that Pydantic already provides functionality for its models to be serialized as JSON, shouldn't FastAPI simply delegate to the model?

+1 for this merge.

What's the workaround for the original issue? Overriding the model .dict method is pretty hacky because it affects other usages of the model. It seems like the only solution is to manually invoke jsonable_encoder yourself and mess around with the result until it looks the way you want. Big big +1 for making it possible to customize JSON serialization somehow whether or not using Pydantic config.

Agreed. In my case I wanted to change the parsing of datetime.time behavior but couldn't find an elegant solution. Just like this 10:30:00 -> 1030 .
At first I thought adding Config in BaseModel would solve this problem, but it was not working.
    class Config:
        """Define a custom encoder for Sets such that they are sorted lists."""
        json_encoders = {
            datetime.time: some_func
        }

I also think adding json_encoders in Config is consistent with the current behavior, since we are already using use_orm: bool in the Config, right?


DO NOT MERGE: add unit test to test loading of languages

Please ignore the change to the training scripts.  Thanks,

Please do not merge this as it includes some additional commits. I will resubmit along with any other suggested changes.
@stweil Is this ok as a test for loading ALL languages?

There does not seem to be too much difference in load times between different the three tessdata repos.
	Line 67: [       OK ] Tessdata_fast/LoadLanguage.eng/0 (237 ms)
	Line 317: [       OK ] Tessdata_best/LoadLanguage.eng/0 (242 ms)
	Line 566: [       OK ] Tessdata/LoadLanguage.eng/0 (267 ms)

comlete log is attached.
loadlang_test.log.txt

New PR https://github.com/tesseract-ocr/tesseract/pull/1677


HDDS-6926. Add support for shaded protobufs used by hadoop-client/spark.

What changes were proposed in this pull request?
Hadoop distributes two versions of their hdfs client:
hadoop-client-api-3.3.1.jar and hadoop-common-3.3.4.jar
The first uses shaded protobufs, eg: org.apache.hadoop.shaded.com.google.protobuf.Message
The second unshaded protobufs, eg: com.google.protobuf.Message
Currently, Ozone only supports unshaded protobufs, (with ozone-filesystem-hadoop3-1.3.0-SNAPSHOT.jar)
But projects like spark use shaded protobufs, (through hadoop-client-api-3.3.1.jar).
This PR adds the ozone-filesystem-hadoop3-client-1.3.0-SNAPSHOT.jar which is identical to the ozone-filesystem-hadoop3-1.3.0-SNAPSHOT.jar, except that it uses the shaded protobufs, (so as to work with spark and other systems distributed with the hadoop-client jars.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6926
How was this patch tested?
I installed spark and confirmed reading ozone keys with the new jar, (using the instructions below).  Note that the same instructions with the unshaded jar file, ozone-filesystem-hadoop3-1.3.0-SNAPSHOT.jar, will cause the cast exception reported in the jira ticket.
# install spark
<Download https://archive.apache.org/dist/spark/spark-3.2.1/spark-3.2.1-bin-hadoop3.2.tgz>
cd $OZONE_ROOT/hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT
mkdir spark
cd spark
tar -xzf ~/Downloads/spark-3.2.1-bin-hadoop3.2.tgz

# copy over the shaded jar file
cp   $OZONE_ROOT/hadoop-ozone/ozonefs-hadoop3-client/target/ozone-filesystem-hadoop3-client-1.3.0-SNAPSHOT.jar $OZONE_ROOT/hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT/spark/spark-3.2.1-bin-hadoop3.2/jars

# start up docker cluster
cd $OZONE_ROOT/hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT/compose/ozone
docker-compose up --no-recreate --scale datanode=3 -d

# init docker cluster
docker exec -it ozone_om_1 bash
cd /opt/hadoop/spark/spark-3.2.1-bin-hadoop3.2/conf
cp /etc/hadoop/ozone-site.xml .
cd /opt/hadoop/spark/spark-3.2.1-bin-hadoop3.2/bin

# init vol/bucket/key
ozone sh volume create testgbj2
ozone sh bucket create testgbj2/bucket1
echo k1 > k1.orig
ozone sh key put testgbj2/bucket1/k1 k1.orig

# read ozone from spark
./spark-shell
sc.setLogLevel("DEBUG")
spark.read.text("ofs://om/testgbj2/bucket1/k1").show()

@jojochuang Here is my attempt at fixing the shaded protobuf problem.  I'd like to try and get it into the 1.3 release.  Would you mind taking a look?

cc @tanvipenumudy

Shouldn't we include 3 in artifactId then?

@adoroszlai:
Done.  I'd like to get this in the 1.3 release.  Would you mind merging/cherry-picking it for me?

Hi @GeorgeJahad @adoroszlai @kerneltime,
Recently I was preparing the package ozone-1.3 rc0. When I uploaded the tarball to apache svn server, I found the uploading error. The Apache servers currently have a limit of 350mb for release artifacts.
svn: E175002: PUT request on '/repos/dist/!svn/txr/57920-1cpu/dev/ozone/1.3.0-rc0/ozone-1.3.0.tar.gz' failed
I made a comparison and found that the tarball of 1.2.1 before is less than 300M, while the current tarball of ozone-1.3.0 is 408M.  I found that this PR introduces a 59MB ozone-filesystem-hadoop3-client-1.3.0.jar.  I was wondering if we could move the shaded change to protobufs in this PR directly to ozone-filesystem-hadoop3-1.3.0.jar? Instead of introducing a new client jar.

@captainzmc I don't think it's possible to have them in the same jar, as the same Ozone code cannot use shaded/unshaded version of protobuf.  However, I think we can try to split up these two jars to avoid duplicating the common content.  Slightly more inconvenient (having to add two jars to the classpath), but it may be worth it, if possible.

Thanks to @adoroszlai  for your explanation.
hi, @GeorgeJahad, I have another question. My understanding of the new client.jar should be the same as the original except for shaded protobufs.  So:
ozone-filesystem-hadoop3-1.3.0-SNAPSHOT.jar should contain package "com.google.protobuf"
ozone-filesystem-hadoop3-client-1.3.0-SNAPSHOT.jar should contain package "org.apache.hadoop.shaded.com.google.protobuf"
However, I opened these two fat jars and found that they did not contain the above two packages. Did I get something wrong here?

As @adoroszlai mentioned, I think the best solution is to try to split the jar files so they don't have so much duplication.  I'll take a look when I get a chance.

@GeorgeJahad @adoroszlai. Let me contact the INFRA team first, to see if they can solve the upload size upper limit problem for Ozone. I see hadoop's tarball has reached 600+ MB, so it makes sense to increase Ozone's upper limit.
I opened jira at https://issues.apache.org/jira/browse/INFRA-23892.

That is good news @captainzmc!  Thank you!

Why not make the protobuf be part of the shaded client jar?

That wouldn't help, as they are already a part of the hadoop jars that these ozone jars are designed to complement: hadoop-client-api-3.3.1.jar and hadoop-common-3.3.4.jar


Update the README with default extensions packages

We need to share the default Java packages enabled in Spring for the ComponentScan.
In this way any developer can put his own Spring Beans annotated with @Service or @Component without declaring a configuration class.
For the current version of Activiti currently included in the bundle we have the following default extensions points:

org.activiti.app.extension.conf: custom configuration classes for Activiti App
org.activiti.app.extension.bean: custom Spring beans (delegates etc.) for Activiti App
org.activiti.rest.conf: custom Spring beans (delegates etc.) for Activiti Rest
classpath:activiti-custom-context.xml: custom Spring context for Activiti Rest

Fix included in v1.0.5:
https://github.com/OpenPj/activiti-sdk/releases/tag/v1.0.5


[Addition]:  Hotspots in Denylist earn 1.63 HNT per day, what a joke!

Hotspot b58 Addresses
11hsyViz32idrBHSrX4V5rdwwQJaZB4YnyV5vCkXVcfRTS8uYhj
Discord Handle
No response
Reason(s)
Blacklisted machines can also be high-yielding?What are you doing, helium developers?Why not stop such cheaters who change the signal-to-noise ratio?

Until HIP 40 is approved / validators are operating the denylist, the network cannot enforce the denylist across all makers. In this case, it appears that PantherX is not implementing the denylist.

Until HIP 40 is approved / validators are operating the denylist, the network cannot enforce the denylist across all makers. In this case, it appears that PantherX is not implementing the denylist.

But it's not panther X, it's SenseCAP


Update Person object to not require Address field

Requires:

Updating FXML and UI
Person implementation
Test cases

Added Github username field for Person.


Update ONNX providers for multiple contexts

Add CPUExecutionProvide fallback within roberta_onnx
Currently passing testing within ubuntu-latest runner via our CI mechanism but fails with a clean CPU backed EC2 instance

Linking the results of CI in with this too. Despite tetsing passing its obvious that it fails at the Inference step. This fix should resolve this.
Despite suggesstion in ONNX's documentation regarding a CPU fallback fix it looks like we're going to have to go for a siple try except.

-Fixed with the following. CI stills flags a Cuda Exception given the CPU only runner but falls back to a CPU execution provider in both testing an on installation of robonnx package.

See #5299 for discussion with regards to implementation within the InferenceSession class


PostgreSQL - _box (box[]) isn't formatted as an array correctly.

Description
Box arrays aren't getting parsed correctly

Should be like any other arrays:

DBeaver Version
<IP_ADDRESS>207240614
Operating System
Windows 11 build: 22000.856
Database and driver
Database: PostgreSQL 13
Driver: PostgreSQL JDBC Driver 42.2.25
Steps to reproduce

Connect to a database
Open a new sql script
run select '{(1\,2)\, (3\,4); (1\,2)\,(3\,4)}'::box[]

Additional context
https://www.postgresql.org/docs/current/arrays.html#ARRAYS-INPUT

I am guessing since box has a different delimiter character DBeaver's formatter is messing up.

thanks for the report


Validate all KF and AA example components that are shipped with v2.3

Verify that the example components that are included in 2.3 work as expected prior to release.
KF components

[ ] Lorem ipsum

AA components

[ ] Lorem ipsum

Open dependencies:

Identify KF example components
Identify AA example components
Remove all components that don't work
Create example pipeline for each component that runs out of the box


wallet_collect_genesis_balances issues a transaction even when you have no genesis balances

I tried out wallet_collect_genesis_balances on DVS, but it did nothing and cost me a fee.  The account has genesis keys, but I'd already transferred all genesis funds from the account.  Immediately beforehand, I did issue a wallet_collect_vested_balances which gave me some DVS, however.
The no-op transaction generated by wallet_collect_genesis_balances is in block 63216, txid 61824a7b

Already fixed in develop via: https://github.com/BitShares/bitshares/commit/8c87046384cdba3acde818b75a0eca885e41e852


Could not found a container for a registered process

After migration to Aya we can observe new issue.
How to reproduce it:

Install lockcd using normal procedure
Launch some example pods
Try to connect to pods
Upgrade helm lockcd release
After trying to connect to pods we can see following errors:

mjura@gecko:~/git/lockc> kubectl logs -n lockc lockcd-dn7kf -f
2022-02-09T14:08:17.937616Z ERROR lockcd: could not send eBPF command result although the operation was succeessful command="add_proceess

bpftool prog trace
...
runc-30504   [001] d..21<PHONE_NUMBER>42: bpf_trace_printk: error: get_policy_level: could not found a container for a registered process

mjura@gecko:~/lockc> kubectl exec -ti myapp-7bb5f9b56b-vqjxc -- bash
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "da94fe7fa19be99a826d1f93776b389112b7925bc13bdd45d97436431cb86db7": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:99: starting setns process caused: fork/exec /proc/self/exe: operation not permitted: unknown

This issue looks like similar issue for https://github.com/rancher-sandbox/lockc/pull/145

Potentially a bug in Aya, which should reuse the maps simply by the map_pin_path param here
https://github.com/rancher-sandbox/lockc/blob/main/lockc/src/load.rs#L14


Help users to authenticate Git with GitHub auth

VS Code transparently authenticates HTTPS Git commands made from within VS Code, once a user authenticated with GitHub in VS Code. This feels more of a side effect though, as GitHub auth is only triggered by the built-in settings sync, clone/publish GitHub prompts, and any extensions depending on it.
How might we make shared Git/GitHub auth a well-lit path that helps users during their Git setup, the first time they touch GitHub, and resolving any authentication issues?
Related:

Could also use GitHub to auto-set the username and email for #114049.
GitHub also guides users to install git and authenticate it using gh auth login

cc @esonnino @TylerLeonhardt @lszomoru

Just how we don't share the auth state between the browser and the desktop, I'm not sure if we should share auth between gh and VS Code.

With that said. gh auth status -t does give us a token in plaintext so maybe the move is to seed auth from that if it's available

@TylerLeonhardt sorry for the confusion, this is not about integrating anything with gh. This is about that we to authenticate Git CLI calls with VS Code's GitHub auth but don't have any onboarding or commands for it.
How could we set up Git and ask users to login for users so the commands are authenticated. Right now the only way for sign in is Settings Sync or starting a GitHub clone/publish flow.

VS Code "hooks into" the last possible hook into the git authentication pipeline. This has been an explicit decision which I believe was done so that VS Code would honour the git authentication settings that have been configured by the user. At the moment, if the user uses HTTPS and the auth request reaches VS Code we will show a quick input widgets for the user to enter the user name/password. If we detect that the git repository is hosted on GitHub we could:

Display a dialog asking the user to sign in with their GitHub identity into VS Code.
After they entered the user name/password show a notification suggesting to sign in with their GitHub identity.


Error: Cannot find module 'D:\charts\node_modules@react-financial-charts\annotations\lib\Annotate' imported from<EMAIL_ADDRESS>

When i have installed the package and tried to run, it throwed this  @error.
Error: Cannot find module 'D:\charts\node_modules@react-financial-charts\annotations\lib\Annotate' imported from<EMAIL_ADDRESS>

I am having this same issue, except I can load the page once fine but then on reload the error will throw.

Same issue for me after reload

Same here

Solution for create-react-app provided environment worked for me

Install craco package (https://github.com/gsoft-inc/craco) if it didn't installed before
Insert following config into craco.config.js file (or extend it):

module.exports = {
  webpack: {
    configure: {
      module: {
        rules: [
          {
            test: /\.m?js/,
            resolve: {
              fullySpecified: false,
            },
          },
        ]
      }
    }
  }
}

P.S. It's just a little overriding of default webpack 5 configuration provided by<EMAIL_ADDRESS>(my currently installed version).

I had this same issue on my Next.js app while using react-financial charts and was able to solve it with the solution by adamhwang here: https://github.com/react-financial/react-financial-charts/issues/606
You'll need this package: https://github.com/martpie/next-transpile-modules


when draw line and change thickness stroke incorrect

change thickness between draw line and incorrect line

Please try this again with the updated Source Code tree. I have updated the line drawing a bit, but I can't reproduce the graphical issues you are seeing.
Could you provide some source code on how you generate these curves, maybe that can help?


Question About Sungraph

Hello, first of all, thank you for a job well done. I have a question about GraphCL, which is the Subgraph part of the data enhancement, and I think there's a problem with the code

I think it should look something like this

Hi @ZhaoYuTJPU,
Thank you for the question. Please refer to https://github.com/Shen-Lab/GraphCL/issues/24 for information.


Fix (form range): change colors for hover and active states

Related issues
Fixes issue #1320
Description
Fix colors of the grab circle on hover and active state for Chrome and Firefox.
⚠ To know : It is impossible to change the horizontal bar color in Chrome to make it orange on a certain part. Therefore, it stays grey on all its length.
Motivation & Context
These colors changes are needed to respect the orange design system specifications.
Types of change

Bug fix (non-breaking which fixes an issues)

Live previews

https://deploy-preview-1605--boosted.netlify.app/docs/forms/range

Checklist

[x] I have read the contributing guidelines
[x] My code follows the code style of the project (using npm run lint)
[ ] My change introduces changes to the documentation
[ ] My change introduces changes to the migration guide
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[x] All new and existing tests passed

Haven't looked at the details of this PR but the new Sass var should be documented in the migration guide.

Don't know if things have changed in this PR but:

probably https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/1605#discussion_r1057149310 should be taken into account
double-check that everything still works (based on the recent modification of the color modes)
the branch has several conflicts that need to be resolved

I’ve checked the state colours for hover, press and drag for the grab handle and it all looks good (as specified on a white background). The cursor also behaves as expected with the hand cursor changing on press and drag.
I will change the look of the cursor hand on the Sketch file for the press and drag state.

As discussed with @louismaximepiton, I've removed the deprecation of $form-range-thumb-active-border instead of adding a new $form-range-thumb-active-border-color. It will avoid a migration for our users.
Done via https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/1605/commits/6794a07598234bb561f6489d425ca2a32957c4e9

Can rollback it but I'm suggesting to add a "Dark variant" section in the docs with https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/pull/1605/commits/519ce5f521893e3fd4663191ba22c708d41eb6a6. Thoughts?

Removing dark variant since apparently this PR is not treating this use case at all. Thought that it was OK for dark variant already. And replacing the custom prop with $black. And 🚀


Add 'kindergarten-garden'

This adds the kindergarten garden exercise. There wasn't a set of example data
that we had in the x-common repo, so I chose to mimic the tests from the Ruby
implementation (i.e. adding the ability to pass in custom names, which wasn't
expressly stated in the Readme).
I'm hoping that the tests that I set up are generic enough to offer various
ways of solving this problem and that they're not too prescriptive.

the return value of the full garden map already calculated for each student seems a little strange to me but I don't have any better ideas
are there any argument error cases we want to handle here?

Argument errors are an interesting idea. I went off of the Ruby implementation of this exercise, and I didn't see any there, so I figured I'd try and stay consistent with the current implementations of this exercise.
When you say:

the return value of the full garden map already calculated for each student seems a little strange to me but I don't have any better ideas

Do you mean that it might make sense to only calculate the garden for a given student when we get the data for each student, kind of in a lazy evaluation? I guess I don't totally know what you mean there.

you nailed exactly what I meant there.

well, I could refactor it to do that, but I don't think it would really need to be done. It would make the code very complex. I can see a way (I think) of using closures and anonymous functions to do that for us, but I don't think the benefit would be worth the added complexity - at least not for now. If someone were to explore doing that in their solution that the submit to exercism.io, then that would be cool to see, but for this we're more just proving that the test suite works and that the problem can be solved as described.

I think we're talking about 2 different cases here.
I mean something more like this:
# current
Garden.info("RC\nGG") # => %{name: {flowers} }
# my suggestion
Garden.info("RC\nGG", name) # => flowers

I get what you're saying now.
I don't think that would work since you won't know what flowers belong to which child in isolation. Because they're arranged alphabetically, you need the names of all the children to do any sort of decoding of the initial string.
# can't do this
Garden.info("RC\nGC", name) # => we won't know which flowers go to that student without knowing the other students in the class

# We could do this, though
Garden.info("RG\nGC", all_names, name) # => flowers

I think the strategy I have now of "decoding" the data into a map works pretty well, but we could also implement info\3 if you think the API above is worthwhile. Personally I don't see the benefit in it, but I'm happy to be convinced!

I'm not sure
something about this just makes sense to me in an OO language like ruby, but seems very strange in a functional language as elixir
I'm ok with both, but thought I'd bring it up

I totally see how it might look that way.
The way I chose to look at it, though, was essentially as a map/encryption operation. We have two datasets that we're using, one is kind of "encrypted" data (the string with the info), and the other is kind of the "key" to decrypt the data (the names of the students). We map over the encrypted data and use the key to decrypt it, giving us the decrypted data (the output map).
Maybe there's a better way to illustrate the problem in this way so it seems more idiomatic to Elixir/FP?

You could take inspiration from other FP language tracks that implement the exercise. Haskell has it, for example. It has separate functions for producing a garden (the map, in our case), and looking up a student in that garden. Clojure seems to simply produce a map, like this one.
I do think the naming is better in those two examples. info seems a bit generic. It's a map from students to plants. I'd suggest students_plants (as in the possessive "students' plants"), but maybe someone has a better idea. The name info bothers me a bit, though, and the test suite enforces it (except for people who've figured out they're allowed to change the tests).

How about Garden.decode_string or Garden.decrypt_string? Since that's kind of what we're doing, and it also makes the exercise sound a lot cooler than it seems at first, which is a big plus in my book 😉

@devonestes this looks good. One question. Why return tuples?

@parkerl Good question! I felt that it should either be a list or a tuple, and for some reason a tuple just made more sense to me. I'm not entirely sure why (maybe it's because I'm used to seeing atoms in tuples?), but I can't give a better reason than that. Is there some benefit to using something other than a tuple?

@devonestes as I expect, this now has a conflict with your other PR. Can you put it in its proper place in the new lineup?
As for the tuples, it causes the submitter to take an extra step. They probably will end up with a list  in end, as you did and have to tupleize it at the last.
IRL you would have to ask what operations this result will be fed into. If it is going to be iterated over down the line, a list is more appropriate. If it is going into pattern matches, then maybe a tuple is better. Food for thought. Ultimately it is a small issue.
Can you address the filename/module name mismatch?
Thanks

@parkerl Thanks for the info about lists vs. tuples. I guess in my mind I would envision pattern matching, but that's probably just cause it's a collection of atoms, and I see that so frequently in pattern matching.
Anyway, the other stuff is all done now!

Thanks! 🎉

Hi!
Could someone look at the test "gets the garden for all students with custom child names"?
I have the impression that the order is a bit mixed up there. Or am i missing something?
    names = [:maggie, :nate, :xander, ***:ophelia***, :pete, :reggie, :sylvia,
             :tanner, :ursula, :victor, :winnie, :ynold]
    garden_string = "VRCGVV***RV***CGGCCGVRGCVCGCGV\nVRCCCG***CR***RGVCGCRVVCVGCGCV"
    [...]
    assert garden_info.ophelia == {:violets, :violets, :clover, :grass}

(*** to highlight ophelias part of the garden)

@stosorio The problem there is that the names aren't in alphabetical order, and as the problem description says, the garden is arranged in alphabetical order 😉  This is kind of a "trick question" to ensure that your implementation can handle names that aren't input in alphabetical order.

Damn.
Thanks, i'll read the readmes more carefully now :smile:


Some improvements

This PR does the following:

Refactor insert and emplace methods so that insert uses emplace instead of the other way around so that the component isn't copied in the emplace method when it's passed to the insert method
Invert if statement for early return in remove method for better readability
Use initializer list in Entity constructor
Use std::size_t instead of size_t for consistency
Rename parameter 'entity' of 'has' to 'e' for consistency with other functions
Add .cache to .gitignore
Fix some typos

Thanks! Let me know if you are looking for a hiwi or TA job :) Will test it ASAP


Display embedded entity - smart composer (#4838)

Pull request opened by the merge tool on behalf of #4838

Merged in 05fad5e81fb6a8256aaf96241927b71caaf383ae


Loading line becomes strange when skip_lines is specified

If skip_lines is not specified
Ruby3.1.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, row_sep: "\r\n") { p _1.to_a } }
=> [["\n", ""]]

If specifying skip_lines that does not affect reading
Ruby3.1.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, skip_lines: /xxx/, row_sep: "\r\n") { p _1.to_a } }
CSV::MalformedCSVError: Any value after quoted field isn't allowed in line 1.

Probably CSV::Parser#skip_needless_lines is the cause

Could you try the latest csv gem?

@kou
It was the same result
Ruby3.2.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, row_sep: "\r\n") { p _1.to_a } }
[["\n", ""]]
=> [["\n", ""]]
Ruby3.2.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, skip_lines: /xxx/, row_sep: "\r\n") { p _1.to_a } }
CSV::MalformedCSVError: Any value after quoted field isn't allowed in line 1.
from /home/vagrant/.rbenv/versions/3.2.3/lib/ruby/3.2.0/csv/parser.rb:1067:in `parse_quotable_robust'

If CSV::VERSION isn't "3.2.8", you're not using the latest csv gem.

@kou
Sorry, I was wrong.
but the result was the same.
Ruby3.2.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, row_sep: "\r\n") { p _1.to_a } }
[["\n", ""]]
=> [["\n", ""]]
Ruby3.2.3 pry(main)> require 'csv'; Tempfile.open { |t| t.write(%|"\n",""\r\n|); t.rewind; CSV.open(t.path, skip_lines: /xxx/, row_sep: "\r\n") { p _1.to_a } }
CSV::MalformedCSVError: Any value after quoted field isn't allowed in line 1.
from /home/vagrant/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/csv-3.2.8/lib/csv/parser.rb:1066:in `parse_quotable_robust'
Ruby3.2.3 pry(main)> CSV::VERSION
=> "3.2.8"

Thanks for checking.
I've fixed this and released 3.2.9. Could you try it?

@kou Sorry for the late confirmation. I can confirm that it works properly.
Thank you for your quick response.


Setup automatic changelog

This PR has to be merged after #112

Testa are broken, probably because of https://circleci.com/gh/novafloss/formidable-core/274

I don't know, it's difficult to trust circleci :/

There are connection errors, weird things and when you rebuild without cache it's fine... :(

Travis says YES. It's fine for me.


Add test data

Is it possible to add tiny test data (maybe through a test profile) to quickly evaluate the workflow installation? It would make creating a container easier!

https://github.com/ncezid-biome/datasets
would this help?


REVISION file copy operation fails with unprivileged user

While trying to use Deploy to deploy to a server where the Ansible ssh user does not have sudo, the role will fail on the REVISION copy operation in update-code.yml:

fatal: [example.com]: FAILED! => {
      "failed": true,
          "msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: OpenSSH_7.4p1, LibreSSL 2.5.0\r\ndebug1: Reading configuration data /Users/username/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 81953\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\nchown: changing ownership of '/tmp/ansible-tmp-1515268463.91-198282885552037/': Operation not permitted\nchown: changing ownership of '/tmp/ansible-tmp-1515268463.91-198282885552037/source': Operation not permitted\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"
}

This can be fixed by replacing the copy operation with a `lineinfile` operation without causing any problems that I can see. Pull request forthcoming shortly to demonstrate.

Can't reproduce the issue myself, no reason for anyone else to spend any time on it :)


Updating the blog for personal use.

Please ignore this, raised by mistake, this was supposed to go into my main branch.

Oop!

Sure!

Hi @cassidoo, my blog is now live (and in a presentable state) at piyushmakwana.in. Also, I wanted to say that your blog has been inspiration towards the kind of blog I wanted to make. And thank you for making it open source; otherwise, I don't know how long I would've procrastinated in creating my own :D.


Cleanup feed items so that team deletion does not break

Remove all feed items (including achievements and solved_challenges) when a team is deleted so that challenges do not error when teams delete their account.

Coverage remained the same at 97.325% when pulling c4c02bcdf7ed6d29085c0f7821251f5a863e248f on cleanup-after-team-destroy into 672ef5ac15d15ad63b15c73b3c1b371aa37e5b97 on master.


Reorder delegate sets to avoid race condition

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

CLA for this is now personal (and signed), no longer conflated with Bigtable.NET.

This is ok to test

Sorry for a big delay - I wanted to take time to look at the code carefully. The result seems to be that there is no race condition here - setting of the delegates happens under a lock.
Actually, there is a good reason for setting the delegates after starting the operation on a call - C core gives a guarantee that if starting an operation fails, the internal state of the call stays unchanged. So if we catch an exception here, the operations haven't started and there's no point of setting the completion delegate.
I'm closing this PR for now.


Docker setup improvements

Proposal:

Speed up bundle install by adding jobs=2 config
Add a bundle cache volume so we don't need to install fresh gems on every docker iteration

Regarding bundle cache:  Is the intent to speed up docker build by having the gem cache?
As best I can tell, Docker already includes caching in the build process so that the Gems should not be installed unless Gemfile or Gemfile.lock are updated.  Not sure the problem that part is trying to fix.


Include Minor Version details

V10 is the latest major version however the version numbers also include the minor levels.  I had to physically download the file to determine that the version I had running elsewhere was behind.  I wasn't able to easily identify what the exact current version of azcopy.
After downloading, I was able to find the information via the releases section in GitHub, so maybe include a link to that repo in that top section where it mentions the latest version.
https://github.com/Azure/azure-storage-azcopy/releases

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

ID: 15911160-5ba2-fb0a-0b24-16b3857e20ce
Version Independent ID: d925bc9f-f825-2f82-168c-6c30d716b9ce
Content: Copy or move data to Azure Storage by using AzCopy v10
Content Source: articles/storage/common/storage-use-azcopy-v10.md
Service: storage
Sub-service: common
GitHub Login: @normesta
Microsoft Alias: normesta

Thanks for the feedback! I have assigned the issue to the content author to investigate this and update the document as appropriate.

#reassign: @jimmart-dev

The link azcopy releases link has been added to the article: https://github.com/Azure/azure-storage-azcopy/releases

#please-close

@airtank20 The #azcopy releases link has been added to the article:

Thanks so much!


Adding a new tag value from element dashboard doesn't redirect to dashboard

This should be resolved by moving this functionality into the AJAX call.


corerad: init at v0.1.4

Motivation for this change
CoreRAD is a new project I'm working on to create an extensible radvd replacement. I'm running it as of now on my NixOS home router via an overlay, but would like to get it packaged upstream as well.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
(none as of now)
cc @danderson, per our conversation last night about packaging this

@GrahamcOfBorg build corerad

Thanks for the review. This is a bug in the application and I'll resolve it upstream today so this change won't be necessary.

Updated to v0.1.4 which also fixes non-Linux support.
[matt@routnerr-2:~/src/nixpkgs]$ nix-build -A corerad
these derivations will be built:
  /nix/store/if9kbsrcbma7473yq49lv4dwr01q74dl-remove-references-to.drv
  /nix/store/zrlxld4wn7izmjwrnvjvb6hi4yc0rfdf-corerad-0.1.4.drv
[...]
[matt@routnerr-2:~/src/nixpkgs]$ ./result/bin/corerad -init

[matt@routnerr-2:~/src/nixpkgs]$ ./result/bin/corerad
2020/01/06 10:43:55 CoreRAD v0.1.4 (ALPHA) starting with configuration file "corerad.toml"
2020/01/06 10:43:55 failed to run: failed to look up interface "eth0": route ip+net: no such network interface

Ready for another review when you are @jonringer! Thank you.

@GrahamcOfBorg build corerad

@GrahamcOfBorg build corerad

I can't seem to figure out why my local system computes a different modSha256 than the builder, but both seem to work. If it matters, I am importing the package locally on my own machine via /etc/nixos/configuration.nix until it's upstream.
I have updated the PR with what the builder suggests.

@GrahamcOfBorg build corerad

I can't seem to figure out why my local system computes a different modSha256 than the builder

Most common cause is usually overlays which affect a dependency

Thanks for the review and merge!


Write shortest possible code: python how to reverse string (python)

Please write shortest code example for this question:
python how to reverse string in python
How to do it:

Go to python codes
Create new file (named in underscore case, should contain key words from title) with md extension (markdown file).
Propose new file with following content (please use all three blocks if possible - title, code itself and explanations list):

# python how to reverse string

```python
code part1 part2 part3 ...
```

- part1 - explain code part 1
- part2 - explain code part 2
- ...

More advanced template for examples and linked solutions. More docs here.

Hello sir, I think I can also solve this issue? Can you assign this for me?

python how to reverse string


select the synchronization direction

it is very convenient to manually choose which way to synchronize files:

from the phone to the server
from the server to the phone
in both directions

This change is necessary.

Can you say why you would need this? You already have one way sync with nextcloud official app...

For some users nextcloud is unnecessary, a simple webdav is enough with nas.

The nextcloud is a very large application that is accessible via webdav.
being able to synchronize data in different directions is very important, I can send photos to the server, and I can receive documents from it and from the server, and not vice versa. Perhaps you need to have files with tasks and then you need to synchronize in two directions from the north and from the phone at the same time. that's why I'm asking you to choose the direction of synchronization.
look at the functionality of this application, you may be able to copy the functions:
https://play.google.com/store/apps/details?id=com.sentaroh.android.SMBSync2


Rename all shifted days to " Shift" for consistency

This one's change a suggestion. It makes it easier to rename such holidays in your own code, e.g. by replacing " Shift" with " Substitute" or " (in lieau)". Unless there was some method to the madness (I mean, perhaps the inconsistencies were there for a reason..).

[x] Tests with a significant number of years to be tested for your calendar.
[ ] Changelog amended with a mention like: "Added <country> by @pseudo (#)".

Hello and thank you for this suggestion...
... but I feel a bit ambivalent due to this patch...
Usually, the labels of the shifted actually depend on the definition provided by the states or countries. For example, in the USA, the suffix "(observed)" is often added (and in other countries). As I am looking a bit deeper into the integration of i18n and label translations, I think more and more that these suffixes would vary... And so, I think that in order to keep things sane, the suffixing (is it a word?) will probably be rewritten.
As a consequence, I don't think that your patch would be integrated.
Not closing the PR yet, still. But the balance is not in its favour.


.NET 6: Add custom config provider code

See Custom configuration provider
Create a new ASP.NET Core 6 web app the implements the Custom configuration provider in https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/configuration/index/samples/6.x/EFconfigSample

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

ID: 0eb4d762-3910-2c57-8741-3306c15537b6
Version Independent ID: ba2254a0-ea8e-9b28-e94b-edd0fc58c043
Content: Configuration in ASP.NET Core
Content Source: aspnetcore/fundamentals/configuration/index.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

@fiyazbinhasan See the 6.x version and code

@Rick-Anderson taking care of it. However, why does it say 62 minutes to read? 😄

Is this some kind of a bug? Outputs are garbled. I'm on 6.0.100-preview.7.21379.14

Yes, that will be fixed in the next release. see https://github.com/dotnet/roslyn/issues/55461

@Rick-Anderson taking care of it. However, why does it say 62 minutes to read? 😄

I never liked those reading estimates.


feat(*)!: Various small doc updates

This update has 3 separate commits that addresses 3 small missing or out of date pieces of information:

Removed reference to bindle
Updated status names in wadm docs
Added documentation to the control interface for actor config

noooo

Submit another PR to add redirects for the deleted pages, please.

@thomastaylor312 find somewhere else to redirect all these pages:

docs/deployment/oci/bindle
docs/deployment/oci/bindle/actor-bindles
docs/deployment/oci/bindle/provider-bindles
docs/deployment/oci/bindle/using-bindles

Done in #236


Back-End | Wrap Compiler Explorer API

Compiler Explorer provides some API, wrap it for easy usage.

https://github.com/T1t4m1un/compiler-explorer-for-vscode/blob/main/src/utils/api.ts

Some filter options are not supported in specific compiler, get the detailed information from the API and disable to change the corresponding checkboxes.


feat(cli): add tsconfig file validation in LintRunner

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#2850  👈
#2849
#2848
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Dunqing and the rest of your teammates on  Graphite

Merge activity

Mar 29, 7:52 AM EDT: @Boshen started a stack merge that includes this pull request via Graphite.


[stable/sysdig] Upgrade to Sysdig Agent 0.92.3

Is this a new chart

NOTE: We're experiencing a high volume of PRs to this repo and reviews will be delayed. Please host your own chart repository and submit your repository to the Helm Hub instead of this repo to make them discoverable to the community. Here is how to submit new chart repositories to the Helm Hub.

What this PR does / why we need it:
This PR upgrades Sysdig Helm chart to its latest version (0.92.3)
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @bencer


Use --rdir=<dir> as base point for relative pathes

Adds a command argument that allows to set a custom directory as the base point for output pathes.
I opened this PR although the patch at this time only works for coverage 4 - in the hope that you may provide me with some answers so I can make it work for older supported versions too:

I noticed that there are multiple code branches in CoverallReporter.parse_file - for different versions of coveralls, I assume. It would be awesome if there were annotations as to which versions of coverage these code branches are intended for - but since there are none, I thought I'd just ask here first before digging all too deep in commit histories
which versions of coverage are currently supported?
what do you think about just dropping support for older versions of coverage?

The reason that I'd like to have this feature is that it greatly simplifies dealing with scenarios where the code is not tested in the git checkout directory but for example in an installation directory. This is useful when one not only wants to test whether the code in the git repository is correct, but also test the package created by setup.py in the same run (did I forget to include any relevant files?).

I'd rather try to fix this on coverage.py level, I suppose it can be done.
Coveralls should be a simple tool to upload gathered coverage and not much else (except for merging, which is still experimental feature).
In other words, changing how coverage.py works is out of scope, sorry.

fair enough:)


Usage with npm and node_modules folder

There is nothing out there on Google to properly explain how to use this from the node_modules folder in an angularJS app
I've tried var tableResize = require('./node_modules/angular-table-resize/scripts/resize-table-directive');
Says angular cant' be found.
I've tried (function (){
angular.module('myApp').controller('plannedController', plannedController), ['rzTable'];
in my controller.js file.

That would not work. You need to import from the dist directory instead. Also the use of require is limited to nodejs and tools like browserify. Be aware that this project is not written as a commonJS module, so your require statement may or may not work (untested). My suggestion is to use webpack and the ES6 import statement, or simply use a <script> tag. Remember also that this angular module must be loaded after AngularJS itself, or you will receive the error you describe above. Lastly, using npm with this project is not different from any other dependencies you may have in your package.json. Therefore the concrete usage of npm is not specific to this repository, and will not be covered in detail.

Well using the script tag didn't work, so I guess I'll have to try and learn how to use webpack and ES6 import :(


Polish translation

I'd like to contribute a Polish translation to the game. Can the request to add Polish on Transifex be accepted so I can join it?

I've added you, thank you!

Closing the bug as work is happening on Transifex. Thank you!


Add flatMap capability to errors

Proposed fix for #564

Really great idea! Instead of introducing a new method, I just added this functionality inside the original flatten method. I think it's a simpler API and avoids duplicative code.
Plus flatMap means something very specific in JS, and this doesn't perform a "flatMap" operation as most people understand it.
Great PR! Thanks for adding documentation too 🤙


why focus animation not builtin?

Description
I found a plugin 'hyprfocus', it provide focused window flash or shrink animation, without it ,focused window also flash a bit, but shrink is better, why not builtin focus animation? after 'hyprfocus' enabled, window pop animation is affected. focus is an understandable option in window actions.

whats wrong with it being a plugin? Hyprland doesn't have to have everything built in


ruff_formatter docs improvements

This PR updates some of the generated docs for the ruff_formatter crate. I figure I could throw some of these up as I'm reading through it.
I'd like to leave this as a draft PR so that I can ask questions with review comments if that's okay.

Hmm. Yea my questions so far are just specific to the Printer implementation. So I'll just throw those on discord and mark this as ready.

Thank you


MidiDeviceService: Oboe stereo output is disabled

context: https://github.com/atsushieno/android-audio-plugin-framework/issues/82#issuecomment-997167328
Currently Oboe output has bogus audio output on stereo channels, so I disabled it to only set 1 channel.

We can definitely fix the issue now that androidaudioplugin-manager works with stereo outputs. Rewriting with it would need some time though.


doc in book standard-types-and-funcitons string

Hi, wondering when this is merged? Is there any TODO open?


Fixed: Width Bug in the Editor (Closes #798)

closes #798
The bug in the editor which allowed the user to increase the width to greater values than which that can be contained in the parent element has been fixed!
Before and After Images are attached below.
Before:

After:

This should not load by default

This should not load by default

Sir could you let me know what would be the ideal default value of width would be? So it would be easier for me to default to it.

This should not load by default

Sir @smaranjitghose could you let me know what would be the ideal default value of width would be? So it would be easier for me to default to it.

It should touch the borders of the bounding box and not exceed or neither be too far from it. Just brushing.

PR not relevant. The bug is already resolved.

@anushbhatia This bug is still present. I had also noticed this, hence had been waiting for this PR to get merged.
On increasing the default width from 65 to 66 here's what happens (overflow):

@anushbhatia @smaranjitghose This bug is still present. I had also noticed this, hence had been waiting for this PR to get merged.
On increasing the default width from 65 to 66 here's what happens (overflow):

Just set the max width to 64

@anushbhatia @smaranjitghose This bug is still present. I had also noticed this, hence had been waiting for this PR to get merged.
On increasing the default width from 65 to 66 here's what happens (overflow):

Just set the max width to 64

Sir what I have done is defined the width as a function so the max value would remain the current 70 and that would also make it 100% of the width

This PR already solves this bug correctly, I tested the changes locally. It only needs to be merged @smaranjitghose @anushbhatia

When you are giving such kind of PR's attach a video on it. So that we can visualize it easily and without that don't expect it to be merged. The screenshot is not that clear cause it doesn't show up on large screen devices so both for me and @smaranjitghose it didn't turn up.

When you are giving such kind of PR's attach a video on it. So that we can visualize it easily and without that don't expect it to be merged. The screenshot is not that clear cause it doesn't show up on large screen devices so both for me and @smaranjitghose it didn't turn up.

Alright sir!


Backup: Allow import of instances and custom volume under different names

Adds optional last argument to lxc import and lxc storage volume import commands to allow importing an existing backup as a different instance or volume name respectively.

jenkins: test this please

Testsuite passed

@stgraber I've made those changes now.

Testsuite passed

Testsuite passed


Can we add configuration on dropping raw vectors from quantized formats after some period of time?

Description
Tangentially related to: https://github.com/apache/lucene/issues/13158
But, I have observed, that as the corpus reaches a fairly large size, the actual quantiles aren't changing much at all during segment merges. This is tricky to fully measure and make a promise about lossiness (users can always just start throwing garbage that shakes up the whole world). But if the data isn't a "bad actor", quantiles and quantization buckets become fairly stable over time.
Maybe we should add a configuration option, or a new codec, or some way to drop the raw floating point vectors. The 4x reduction in disk usage would be really nice for many use-cases.
I am not 100% sure how this would look (a threshold provided by the user, or we just do it based on internal statistics).

This is a neat idea -- it would allow the user to accept some "lossy compression" when they know/expect that loss will be minor for their use case.  Sort of like JPEG vs RAW image encoding.
One question (I don't know enough about how the HNSW merging works): if we did this, and segments with these "only the quantized vectors remain" are merged, we would have to use those quantized vectors to build the next HNSW graph right?  (Whereas today we always go back to the full precision vectors to build the graph for the newly merged segment?).  Or are we always using the quantized vectors to build the graph?
I suppose, if using the quantized vectors at search time is not hurting much, because the "quantization noise" in the resulting distance computation between two vectors is negligible, then building the graph off of the quantized forms should also not hurt much since that graph building is really just doing a bunch of searching to get the top K vectors that should be linked up in the graph?

I think it would make sense to be config option as opposed to default behavior. One reason during search I see for keeping vectors would be for doing a second phase full precision disk based re-score over initial search results of quantized structure to improve recall. This might make more sense at more aggressive quantization levels.