Run via Docker

It'd be great to be able to run this program via docker. There are many benefits like HealthChecks so when it's not working properly with issues signing in or connecting, it can auto-restart, and also not having to have a terminal/shell open 24/7, not to mention it'd really make this applications installation streamlined and easier to update.
I find the possibilities and benefits to making this application work with Docker fairly significant.
It's probably been mentioned that docker cannot communicate with the Discord client, when performing a normal app install, however this should be very possible if you install discord via a docker image running in a container, so that the two containers can communicate with each other, either using independent conainers or both within compose.
It'd be great to see this application get to this point, as it's my favorite one for Plex Rich Presence, and really don't want to use anything else. I hope this message reaches you and can be implemented!

https://hub.docker.com/r/kasmweb/discord
https://github.com/davidk/docker-discord

Thanks!

A docker container might be able to connect to the Discord client if its running on the host network because programs just connect via a IPC or websocket connection

https://github.com/phin05/discord-rich-presence-plex#running-using-docker
Test it and let me know if it works.

@phin05
I'm not quite sure what this means, or what is needed for this step. Could you help me out?

The directory where Discord stores its inter-process communication Unix socket file needs to be mounted into the container at /run/app. The path for this would be the first non-null value from the values of the following environment variables:
XDG_RUNTIME_DIR
TMPDIR
TMP
TEMP
Fallback path: /tmp

-v /run/user/1000:/run/app:ro \

What's the output of echo $XDG_RUNTIME_DIR for you?

What's the output of echo $XDG_RUNTIME_DIR for you?

There is no output for me, when I run this in terminal. I am using MacOS if that helps.

Check the other three environment variables in the same way.
echo $TMPDIR
echo $TMP
echo $TEMP
If none of them are set, then type ls /tmp and see if there's a discord-pipe-0 file in that directory. If there is, you can mount /tmp into the container as /run/app (-v /tmp:/app/run:ro).

Also which Discord image are you using? So I can test using a similar environment as you.

My Discord isn't running inside a container. If you're running Discord inside a container, you would need to find out where Discord is storing the discord-pipe-0 file inside that container (value of one of those environment variables or /tmp if all of them are empty). Mount an empty folder from the host to replace that. Mount the same folder as /run/app for the script's container.

My Discord isn't running inside a container.

But which Docker image are you using?

But which Docker image are you using?

It's installed normally as a native application, not using Docker.

Oh sorry I totally misread your comment, thought you said you had it running in an container.

For example, in the first image you linked in your post, the Unix socket is in /tmp because none of the specified environment variables are set. So you would mount an empty directory from the host to relpace /tmp in that container, and mount the same host directory into the script's container as /run/app.

Which one are you using?

I'll just use the regular discord desktop client for now to see if I can get it to work, and then move on to that if so.
I tried going through the normal flow to set it up brand new doing the Plex authentication, it's unable to get passed that part alone.
2023-10-01T15:02:38.968592166Z   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen
2023-10-01 08:02:38     retries = retries.increment(
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
2023-10-01 08:02:38     raise MaxRetryError(_pool, url, error or ResponseError(cause))
2023-10-01 08:02:38 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='plex.tv', port=443): Max retries exceeded with url: /api/v2/pins/458359844.json?code=inufqn4z67yc6jpjq6hwz6m8b (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))
2023-10-01 08:02:38
2023-10-01 08:02:38 During handling of the above exception, another exception occurred:
2023-10-01 08:02:38
2023-10-01 08:02:38 Traceback (most recent call last):
2023-10-01 08:02:38   File "/app/main.py", line 49, in <module>
2023-10-01 08:02:38     authCheckResponse = requests.get(f"https://plex.tv/api/v2/pins/{response['id']}.json?code={response['code']}", headers = {
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 75, in get
2023-10-01 08:02:38     return request('get', url, params=params, **kwargs)
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 61, in request
2023-10-01 08:02:38     return session.request(method=method, url=url, **kwargs)
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
2023-10-01 08:02:38     resp = self.send(prep, **send_kwargs)
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
2023-10-01 08:02:38     r = adapter.send(request, **kwargs)
2023-10-01 08:02:38   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 514, in send
2023-10-01 08:02:38     raise SSLError(e, request=request)
2023-10-01 08:02:38 requests.exceptions.SSLError: HTTPSConnectionPool(host='plex.tv', port=443): Max retries exceeded with url: /api/v2/pins/458359844.json?code=inufqn4z67yc6jpjq6hwz6m8b (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))
2023-10-01 08:02:39 [01-10-2023 08:02:39 AM] [INFO] Discord Rich Presence for Plex - v2.3.3
2023-10-01 08:02:39 [01-10-2023 08:02:39 AM] [INFO] No users found in the config file. Initiating authentication flow.
2023-10-01 08:02:39 [01-10-2023 08:02:39 AM] [INFO] Open the below URL in your web browser and sign in:
2023-10-01 08:02:39 [01-10-2023 08:02:39 AM] [INFO] https://app.plex.tv/auth#?clientID=discord-rich-presence-plex&code=8hjoldv0a0bhe2ga5okjjphgk&context%5Bdevice%5D%5Bproduct%5D=Discord%20Rich%20Presence%20for%20Plex
2023-10-01 08:02:44 [01-10-2023 08:02:44 AM] [INFO] Checking whether authentication is successful...
2023-10-01 08:03:12 [01-10-2023 08:03:12 AM] [ERROR] An unexpected error occured
2023-10-01 08:03:12 Traceback (most recent call last):
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen
2023-10-01 08:03:12     httplib_response = self._make_request(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 403, in _make_request
2023-10-01 08:03:12     self._validate_conn(conn)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
2023-10-01 08:03:12     conn.connect()
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect
2023-10-01 08:03:12     self.sock = ssl_wrap_socket(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
2023-10-01 08:03:12     ssl_sock = _ssl_wrap_socket_impl(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
2023-10-01 08:03:12     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
2023-10-01 08:03:12     return self.sslsocket_class._create(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/ssl.py", line 1104, in _create
2023-10-01 08:03:12     self.do_handshake()
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/ssl.py", line 1375, in do_handshake
2023-10-01 08:03:12     self._sslobj.do_handshake()
2023-10-01 08:03:12 ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)
2023-10-01 08:03:12
2023-10-01 08:03:12 During handling of the above exception, another exception occurred:
2023-10-01 08:03:12
2023-10-01 08:03:12 Traceback (most recent call last):
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
2023-10-01 08:03:12     resp = conn.urlopen(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen
2023-10-01 08:03:12     retries = retries.increment(
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
2023-10-01 08:03:12     raise MaxRetryError(_pool, url, error or ResponseError(cause))
2023-10-01 08:03:12 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='plex.tv', port=443): Max retries exceeded with url: /api/v2/pins/1234943974.json?code=8hjoldv0a0bhe2ga5okjjphgk (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))
2023-10-01 08:03:12
2023-10-01 08:03:12 During handling of the above exception, another exception occurred:
2023-10-01 08:03:12
2023-10-01 08:03:12 Traceback (most recent call last):
2023-10-01 08:03:12   File "/app/main.py", line 49, in <module>
2023-10-01 08:03:12     authCheckResponse = requests.get(f"https://plex.tv/api/v2/pins/{response['id']}.json?code={response['code']}", headers = {
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 75, in get
2023-10-01 08:03:12     return request('get', url, params=params, **kwargs)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 61, in request
2023-10-01 08:03:12     return session.request(method=method, url=url, **kwargs)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
2023-10-01 08:03:12     resp = self.send(prep, **send_kwargs)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
2023-10-01 08:03:12     r = adapter.send(request, **kwargs)
2023-10-01 08:03:12   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 514, in send
2023-10-01 08:03:12     raise SSLError(e, request=request)
2023-10-01 08:03:12 requests.exceptions.SSLError: HTTPSConnectionPool(host='plex.tv', port=443): Max retries exceeded with url: /api/v2/pins/1234943974.json?code=8hjoldv0a0bhe2ga5okjjphgk (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))
2023-10-01 08:03:12 [01-10-2023 08:03:12 AM] [INFO] Discord Rich Presence for Plex - v2.3.3
2023-10-01 08:03:12 [01-10-2023 08:03:12 AM] [INFO] No users found in the config file. Initiating authentication flow.
2023-10-01 08:03:12 [01-10-2023 08:03:12 AM] [INFO] Open the below URL in your web browser and sign in:
2023-10-01 08:03:12 [01-10-2023 08:03:12 AM] [INFO] https://app.plex.tv/auth#?clientID=discord-rich-presence-plex&code=rtcpwhrzjowxpl2g039ezs2mm&context%5Bdevice%5D%5Bproduct%5D=Discord%20Rich%20Presence%20for%20Plex
2023-10-01 08:03:17 [01-10-2023 08:03:17 AM] [INFO] Checking whether authentication is successful...

Alternatively in response to it unable to authenticate I tried to bypass the setup with authentication and having to setup a config.json file again, by just adding mine that is used already, and it that would not work either.
Steps to Reproduce

Run container
Docker auto creates directory and config file
I replaced the config file with my other one
restart container
check output errors below

2023-10-01T15:12:18.843727083Z EOFError: EOF when reading a line
2023-10-01 08:12:20 [01-10-2023 08:12:20 AM] [INFO] Discord Rich Presence for Plex - v2.3.3
2023-10-01 08:12:20 [01-10-2023 08:12:20 AM] [INFO] [wonka/200B0] Signing into Plex
2023-10-01 08:12:20 [01-10-2023 08:12:20 AM] [ERROR] An unexpected error occured
2023-10-01 08:12:20 Traceback (most recent call last):
2023-10-01 08:12:20   File "/app/main.py", line 65, in <module>
2023-10-01 08:12:20     userInput = input()
2023-10-01 08:12:20 EOFError: EOF when reading a line
2023-10-01 08:12:24 [01-10-2023 08:12:24 AM] [INFO] Discord Rich Presence for Plex - v2.3.3
2023-10-01 08:12:24 [01-10-2023 08:12:24 AM] [INFO] [wonka/5DA0A] Signing into Plex
2023-10-01 08:12:24 [01-10-2023 08:12:24 AM] [ERROR] An unexpected error occured
2023-10-01 08:12:24 Traceback (most recent call last):
2023-10-01 08:12:24   File "/app/main.py", line 65, in <module>
2023-10-01 08:12:24     userInput = input()
2023-10-01 08:12:24 EOFError: EOF when reading a line
2023-10-01 08:12:31 [01-10-2023 08:12:31 AM] [INFO] Discord Rich Presence for Plex - v2.3.3
2023-10-01 08:12:31 [01-10-2023 08:12:31 AM] [INFO] [wonka/8F8BD] Signing into Plex
2023-10-01 08:12:31 [01-10-2023 08:12:31 AM] [ERROR] An unexpected error occured
2023-10-01 08:12:31 Traceback (most recent call last):
2023-10-01 08:12:31   File "/app/main.py", line 65, in <module>
2023-10-01 08:12:31     userInput = input()
2023-10-01 08:12:31 EOFError: EOF when reading a line

@phin05 I also tried running it not detached using docker run -it instead of docker run -d, and it worked just fine without issue, and able to see my config.json` file that I placed, to bypass setup.
So it would seem to me that the issue is somewhere within running detached.

Pull the latest image (v2.3.4) and try again. The issue with non-interactive environments should be fixed.
The initial setup with authentication is working for me so I'm not sure what the issue is. Might be related to MacOS.

You should be able to do this now. See this section of the README.

Sorry not seeing anything about entering a server name for running with docker section.
Looks like it's unable to connect to Discord Client.
2023-10-01 09:08:26 [01-10-2023 09:08:26 AM] [INFO] Discord Rich Presence for Plex - v2.3.4
2023-10-01 09:08:26 [01-10-2023 09:08:26 AM] [INFO] [wonka/ED16D] Signing into Plex
2023-10-01 09:08:26 [01-10-2023 09:08:26 AM] [INFO] [wonka/ED16D] Signed in as Plex user "ZLuckyTraveler"
2023-10-01 09:08:26 [01-10-2023 09:08:26 AM] [INFO] [wonka/ED16D] Connecting to Plex Media Server "wonka"
2023-10-01 09:08:27 [01-10-2023 09:08:27 AM] [INFO] [wonka/ED16D] Connected to Plex Media Server "wonka"
2023-10-01 09:08:27 [01-10-2023 09:08:27 AM] [INFO] [wonka/ED16D] Listening for alerts from user "ZLuckyTraveler"
2023-10-01 09:09:28 [01-10-2023 09:09:28 AM] [DEBUG] [wonka/ED16D] Request for list of clients to check connection: []
2023-10-01 09:09:45 [01-10-2023 09:09:45 AM] [DEBUG] [wonka/ED16D] Received alert: {'sessionKey': '61', 'clientIdentifier': '5f75f37d9aa308a0-com-plexapp-android', 'guid': 'plex://episode/63700b48dae965292a15caa2', 'ratingKey': '294363', 'url': '', 'key': '/library/metadata/294363', 'viewOffset': 658, 'playQueueItemID': 35315, 'playQueueID': 2581, 'state': 'playing'}
2023-10-01 09:09:46 [01-10-2023 09:09:46 AM] [DEBUG] [wonka/ED16D] Uploading image
2023-10-01 09:09:49 [01-10-2023 09:09:49 AM] [INFO] Connecting Discord IPC Pipe
2023-10-01 09:09:49 [01-10-2023 09:09:49 AM] [ERROR] An unexpected error occured during a RPC handshake operation
2023-10-01 09:09:49 Traceback (most recent call last):
2023-10-01 09:09:49   File "/app/services/DiscordRpcService.py", line 34, in handshake
2023-10-01 09:09:49     self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(self.ipcPipe) # type: ignore
2023-10-01 09:09:49   File "/usr/local/lib/python3.10/asyncio/streams.py", line 98, in open_unix_connection
2023-10-01 09:09:49     transport, _ = await loop.create_unix_connection(
2023-10-01 09:09:49   File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 255, in create_unix_connection
2023-10-01 09:09:49     await self.sock_connect(sock, path)
2023-10-01 09:09:49   File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
2023-10-01 09:09:49     return await fut
2023-10-01 09:09:49   File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect
2023-10-01 09:09:49     sock.connect(address)
2023-10-01 09:09:49 ConnectionRefusedError: [Errno 111] Connection refused

Sorry not seeing anything about entering a server name for running with docker section.

The link points to the environment variables section.

Looks like it's unable to connect to Discord Client.

The directory you mounted into the container, /var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T, does that have a discord-ipc-0 file inside of it? Also, that looks like a very temporary path that might change often. Which environment variable was set to this path? Check the environment variables again and see if the path has changed.

There is no discord-ipc-0 file in this directory. The environment variable has stayed the same after double checking all of the options again.

Are you able to search your whole filesystem (/) for a discord-ipc-0 file? Or with a wildcard like discord-ipc-*.

Search your whole filesystem for a discord-ipc-* file by running sudo find / -name discord-ipc-*.

There is nothing.
Lucky@p8-6 ~ % sudo find / -name discord-ipc-*
zsh: no matches found: discord-ipc-*

Try discord-ipc-0 instead of the wildcard. I'm not sure if that find commands works the same way as it does on Linux.

I tried that myself to find it without wildcard, same result nothing.
That is the proper command as well, and Discord is definitely running, it's never stopped.

Can you check if the script is working while running natively, outside of the Docker container?

Can you check if the script is working while running natively, outside of the Docker container?

It works just fine, using the latest repo release.

I'm not sure what's going on. The script looks for discord-ipc-0 in the following locations:
$XDG_RUNTIME_DIR
$TMPDIR
$TMP
$TEMP
/tmp
If you've checked all these and they have no discord-ipc-0 file inside of them, the script shouldn't be working even outside of a container.

I think I might have misunderstood your original question. Which script are you referring to? I updated my last message as well.

discord-ipc-0 is a special Unix socket file created by Discord. My script finds this file in one of those 5 locations and uses it to communicate with Discord. When my script is running in a Docker container, you have to mount the folder containing that discord-ipc-0 file into the container at path /run/app to allow it to communicate with Discord.
If that file isn't present in any of those 5 locations as you say, the script shouldn't be working at all, regardless of whether it's running in a container.

So I tried running the program locally, and then trying to find the discord-ipc-0 file, and it seems that it does find it, exactly as where echo $TMPDIR says it is, however I have checked that directory manually myself, and there is. no file or folder with that name.
Password:
find: /System/Volumes/Data/.Spotlight-V100: No such file or directory
find: /System/Volumes/Data/boot: No such file or directory
find: /System/Volumes/Data/mnt: No such file or directory
find: /System/Volumes/Data/.fseventsd: No such file or directory
/System/Volumes/Data/private/var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T/discord-ipc-0
find: /System/Volumes/Data/.DocumentRevisions-V100: No such file or directory
find: /System/Volumes/Data/.PreviousSystemInformation: No such file or directory
find: /System/Volumes/Data/.TemporaryItems: No such file or directory
find: /System/Volumes/iSCPreboot: No such file or directory
find: /System/DriverKit: No such file or directory
/private/var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T/discord-ipc-0
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /dev/fd/6: Not a directory```

<img width="1331" alt="Screenshot 2023-10-01 at 10 02 09 AM" src="https://github.com/phin05/discord-rich-presence-plex/assets/97180817/409543d4-4016-41b2-9608-ed20291b768e">

I think it wouldn't show up in the file explorer GUI since it's a special Unix socket file. I'm able to see it using the ls command.
The path is /private/var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T, but you mounted /var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T into the container. Mount the former instead and try.

Looks like it's the same issue.
Here's my full run command.
docker run -it --name Plex-RPC --restart unless-stopped -e TZ=US/Pacific -v /Applications/Apps/Programs/Discord/Plex-RPC/data:/app/data -v /private/var/folders/p_/88q8qfbn76v7r_03k6fcf0p00000gn/T:/run/app:ro ghcr.io/phin05/discord-rich-presence-plex:latest

[01-10-2023 10:15:30 AM] [INFO] Discord Rich Presence for Plex - v2.3.4
[01-10-2023 10:15:30 AM] [INFO] [wonka/3BCC5] Signing into Plex
[01-10-2023 10:15:30 AM] [INFO] [wonka/3BCC5] Signed in as Plex user "ZLuckyTraveler"
[01-10-2023 10:15:30 AM] [INFO] [wonka/3BCC5] Connecting to Plex Media Server "wonka"
[01-10-2023 10:15:31 AM] [INFO] [wonka/3BCC5] Connected to Plex Media Server "wonka"
[01-10-2023 10:15:31 AM] [INFO] [wonka/3BCC5] Listening for alerts from user "ZLuckyTraveler"
[01-10-2023 10:15:37 AM] [DEBUG] [wonka/3BCC5] Received alert: {'sessionKey': '61', 'clientIdentifier': '5f75f37d9aa308a0-com-plexapp-android', 'guid': 'plex://episode/63700b48dae965292a15caa2', 'ratingKey': '294363', 'url': '', 'key': '/library/metadata/294363', 'viewOffset': 299125, 'playQueueItemID': 35315, 'playQueueID': 2581, 'state': 'paused'}
[01-10-2023 10:15:38 AM] [INFO] Connecting Discord IPC Pipe
[01-10-2023 10:15:38 AM] [ERROR] An unexpected error occured during a RPC handshake operation
Traceback (most recent call last):
  File "/app/services/DiscordRpcService.py", line 34, in handshake
    self.pipeReader, self.pipeWriter = await asyncio.open_unix_connection(self.ipcPipe) # type: ignore
  File "/usr/local/lib/python3.10/asyncio/streams.py", line 98, in open_unix_connection
    transport, _ = await loop.create_unix_connection(
  File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 255, in create_unix_connection
    await self.sock_connect(sock, path)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 509, in _sock_connect
    sock.connect(address)
ConnectionRefusedError: [Errno 111] Connection refused

I believe this is a MacOS problem because the Docker engine doesn't run natively on MacOS but instead uses a Linux virtual machine. The Unix socket file created by Discord running natively on MacOS is probably not compatible with programs in Docker containers which run under Linux. Try https://github.com/phin05/discord-rich-presence-plex/issues/69#issuecomment-1742108883

https://github.com/docker/for-mac/issues/483

docker/for-mac#483

Well this disappointing, all I use is macOS.
Do you think it could work if Discord could be containerized along with discord-rich-presence-plex running in docker compose, so they could communicate with each other?
Of course this would mean you'd also have to "Dockerize" Discord app as well, but it would then be one entire seamless application. Probably asking for way too much at this point though, but hey, I've gotta try  haha
I just tried using those 2 example of discord docker I provided in the original post too.
Unfortunately KASM only works on Linux, and the other the docker run command is outdated and no longer works with an error of "docker run" requires at least 1 argument.

I saw a comment regarding a workaround, idk what it is, but would this be a viable solution?

That seems to be hosting the Unix socket inside a container instead of the host, which would be the same thing that would happen here if you were running Discord in a container.

Do you think it could work if Discord could be containerized along with discord-rich-presence-plex all running within docker compose, so they could communicate with each other?

Docker Compose wouldn't change anyting since it's just a way to compose multiple Docker commands.
If Discord was bundled together with my script in a single Docker image, it would most likely work, but unfortunately that's outside the scope of how far I would like to take this, mainly because there's a lot of complications with dockerising a proprietary desktop application. It would also be difficult for me to test MacOS compatability. I'm on Windows and can manage testing on Linux by using one of my Linux servers or a virtual machine, but not MacOS.

Unfortunately KASM only works on Linux

That should still work since Docker on MacOS uses a Linux VM anyways. What error is it showing? If you get Kasm to work, if the workaround mentioned in that comment you linked is valid, you might be able to share the Unix socket by mounting the same folder from the host into both the Kasm container and my script's container.

What error is it showing?

There’s no error. I run the container, go to IP:6092, login with username & password, and then there is a pop up saying to “Update”. There are 3 options, Ubuntu, Linux, & “I’ll figure it out”. Doesn’t matter which option I select, the page just reloads with the same update pop up.

I encountered the same problem while testing it earlier. Change the image tag from 1.13.0 to 1.14.0.

Unfortunately now I just receive a blank white webpage.
Here is the output. log.txt

I encountered the same problem while testing it earlier. Change the image tag from 1.13.0 to 1.14.0.

I think the issue is my browser for some reason, as I just tried with FireFox instead of Safari, and it worked as expected!
If you don't mind giving me some steps to try and see if this will work, I'd be happy to test this out.

Create an empty directory anywhere on your machine.
Use -v /path/to/above/empty/directory:/tmp while running the Kasm container.
Use -v /path/to/above/empty/directory:/run/app:ro while running my container.

What do you mean by use while container is running?
Do you mean to add that volume mount to the docker run command for each application?

Not while running. Stop the containers and run them again but with those volume mounts added to the docker run command you're using.

Your container fails to connect to the server now.
2023-10-01 12:53:11 [01-10-2023 07:53:11 PM] [INFO] Discord Rich Presence for Plex - v2.3.4
2023-10-01 12:53:11 [01-10-2023 07:53:11 PM] [INFO] [wonka/A3202] Signing into Plex
2023-10-01 12:53:11 [01-10-2023 07:53:11 PM] [INFO] [wonka/A3202] Signed in as Plex user "ZLuckyTraveler"
2023-10-01 12:53:11 [01-10-2023 07:53:11 PM] [INFO] [wonka/A3202] Connecting to Plex Media Server "wonka"
2023-10-01 12:53:42 [01-10-2023 07:53:42 PM] [ERROR] [wonka/A3202] Failed to connect to Plex Media Server "wonka": Unable to connect to resource: wonka
2023-10-01 12:53:42 [01-10-2023 07:53:42 PM] [ERROR] [wonka/A3202] Reconnecting in 10 seconds
2023-10-01 12:53:52 [01-10-2023 07:53:52 PM] [INFO] [wonka/A3202] Signing into Plex
2023-10-01 12:53:53 [01-10-2023 07:53:53 PM] [INFO] [wonka/A3202] Signed in as Plex user "ZLuckyTraveler"
2023-10-01 12:53:53 [01-10-2023 07:53:53 PM] [INFO] [wonka/A3202] Connecting to Plex Media Server "wonka"
2023-10-01 12:54:16 [01-10-2023 07:54:16 PM] [ERROR] [wonka/A3202] Failed to connect to Plex Media Server "wonka": Unable to connect to resource: wonka
2023-10-01 12:54:16 [01-10-2023 07:54:16 PM] [ERROR] [wonka/A3202] Reconnecting in 10 seconds

Are you sure the server is running? What we changed now doesn't affect anything related to that connectivity. Did anything else change? What's the docker run commands you used?

Are you sure the server is running?
Sorry server went down, and didn't even know, but a movie was playing still, so didn't think of that.

After getting the server back online, it looks like there is a different issue now.
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Signing into Plex
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Signed in as Plex user "ZLuckyTraveler"
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Connecting to Plex Media Server "wonka"
[01-10-2023 07:57:08 PM] [INFO] [wonka/80757] Connected to Plex Media Server "wonka"
[01-10-2023 07:57:08 PM] [INFO] [wonka/80757] Listening for alerts from user "ZLuckyTraveler"
[01-10-2023 07:58:09 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []
[01-10-2023 07:59:09 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []
[01-10-2023 08:00:10 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []

What's the docker run commands you used?

docker run -d --name Discord --restart unless-stopped --shm-size=512m -p 6901:6901 -e VNC_PW=password -v /Applications/Apps/Programs/Discord/RPC:/tmp kasmweb/discord:1.14.0

docker run -d --name Plex-RPC --restart unless-stopped -v /Applications/Apps/Programs/Discord/Plex-RPC/data:/app/data -v /Applications/Apps/Programs/Discord/RPC:/run/app:ro ghcr.io/phin05/discord-rich-presence-plex:latest

I think the data was stale, so I rebooted the PMS server, because IT IS WORKING!

You might want to add a disclaimer or specific instructions for macOS using Kasm Discord image. That would be very helpful for everyone else.

@phin05 I just wanted to say thank you for implementing this new feature! It was literally the only applicationI had constantly running in a terminal window because macOS cannot run terminal detached.
In addition, I really appreciate you helping me out in troubleshooting and to find a solution that works!
The only thing I would request is if you could possibly add a HEALTHCHECK to the dockerfile, so this way the application will remain running without any intermittent issues, and is capable of working with Docker Autoheal.

I think the data was stale, so I rebooted the PMS server, because IT IS WORKING NOW!

Great! Glad it works.

You might want to add a disclaimer or specific instructions for macOS using Kasm Discord image. That would be very helpful for everyone else.

I've added some information at the end of the Docker section in the README.

The only thing I would request is if you could possibly add a HEALTHCHECK to the dockerfile

A health check with the intention to ensure that the script is running normally is beneficial in this case only when the script can tell that something is definitely wrong and that this issue cannot be solved without restarting the script. There is no such circumstance because the script should be able to recover from errors already, and if it's not doing that, it wouldn't be able to respond negatively to the health check anyways. I'm not sure what's going on in https://github.com/phin05/discord-rich-presence-plex/issues/59, but it's not something that can be solved with health checks because the script wouldn't be able to indicate that something is definitely wrong.

it's not something that can be solved with health checks because the script wouldn't be able to indicate that something is definitely wrong

This is where Docker Autoheal comes into play. If HEALTHCHECK can be added and used in unison with this other container, which is a massively popular repo and how I know everyone takes advantage of HEALTHCHECK.

I know that Docker Autoheal can restart unhealthy containers, but what I'm saying is that the container would never get marked as unhealthy. Health checks are just commands that are run inside the container. For example, the script would write it's status to a file on disk and the health check command and read this file and determine if the container is healthy. But, since the script should be able to recover from errors by itself, it would never report negatively to the health check. If it's not recovering from an error, it means that the script itself doesn't know that there's an error, and the health check wouldn't know either.

@phin05 By any chance is there a way to change the Activity Status from displaying Playing a Game to something else like Streaming or Playing a Movie/Playing a TV Show, etc?

See https://github.com/phin05/discord-rich-presence-plex/issues/33#issuecomment-1123555125 and https://discord.com/developers/docs/game-sdk/activities#data-models-activitytype-enum

ActivityType is strictly for the purpose of handling events that you receive from Discord; though the SDK/our API will not reject a payload with an ActivityType sent, it will be discarded and will not change anything in the client.

That’s unfortunate. What about instead of trying to replace the text, can it just be removed entirely from displaying at all?

Well shucks I tried. So what’s next on the roadmap? ….Emby Integration? 😆

Not really planning to do much else for now since I'm busy with other things

Emby Integration? 😆

Probably not next haha. If I do add support for another media server, it would be Jellyfin because that's what I've been using instead of Plex for the past several years.

If I do add support for another media server, it would be for Jellyfin

That’s too bad. I’ve seen other Rich Presence Programs for Jellyfin, however there are none for Emby that are still working and being maintained.
I know they are both basically the same base source code though.

It’d also be cool to see this project get to the point of GUI for setup and configuration, possibly via an application or a Web-UI using Localhost:Port.
A lot people aren’t that comfortable on a command line or know proper JSON formatting, and would help the “Non-Techie” people out, I’m sure.
Although doesn’t make much of a difference for those of us who are already using this project.
On another note, this is the most starred Repo for a Plex Rich Presence! Believe it’s in the top page too for Rich Presence in general as well, it’s come so far along!

I know they are both basically the same base source code though.

Jellyfin was forked from Emby over 5 years ago so I imagine the underlying code would have changed quite a bit by now, but I might look into adding Emby support too if I do get around to adding Jellyfin support.

It’d also be cool to see this project get to the point of GUI for setup and configuration, possibly via an application or a Web-UI

I'll add something like that in the future.

This project has come so far along, congratulations!

Thanks for the support!

Are you sure the server is running?

Sorry server went down, and didn't even know, but a movie was playing still, so didn't think of that.
After getting the server back online, it looks like there is a different issue now.
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Signing into Plex
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Signed in as Plex user "ZLuckyTraveler"
[01-10-2023 07:56:48 PM] [INFO] [wonka/80757] Connecting to Plex Media Server "wonka"
[01-10-2023 07:57:08 PM] [INFO] [wonka/80757] Connected to Plex Media Server "wonka"
[01-10-2023 07:57:08 PM] [INFO] [wonka/80757] Listening for alerts from user "ZLuckyTraveler"
[01-10-2023 07:58:09 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []
[01-10-2023 07:59:09 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []
[01-10-2023 08:00:10 PM] [DEBUG] [wonka/80757] Request for list of clients to check connection: []

What's the docker run commands you used?

Kasm
docker run -d --name Discord --restart unless-stopped --shm-size=512m -p 6901:6901 -e VNC_PW=password -v /Applications/Apps/Programs/Discord/RPC:/tmp kasmweb/discord:1.14.0

DRPP
docker run -d --name Plex-RPC --restart unless-stopped -v /Applications/Apps/Programs/Discord/Plex-RPC/data:/app/data -v /Applications/Apps/Programs/Discord/RPC:/run/app:ro ghcr.io/phin05/discord-rich-presence-plex:latest

I tried to follow your instructions for mounting the kasmweb/discord tmp folder, but I get this error in the Docker logs. Did you run into this?
no locks present Creating default config /home/kasm-user/.vnc/kasmvnc.yaml xauth:  file /home/kasm-user/.Xauthority does not exist Failed to bind unix sock Unrecognized option: -UnixRelay

@totaltentigers No I never had that issue. It sounds like you made tmp folder in the Docker Discord instead of the Discord Rich Presence Plex
Here are the steps you should be taking to make it work with Docker.
DOCKER INSTALL

Create a Directory.
Within the Directory create a folder named unix-socket
Run Discord Docker (Replace your info first)
Go to https://YOUR-IP:6901
User = kasm_user
Password = Set in Run Command
Login to your Discord Account
Run Discord Rich Presence Plex Docker (Replace your info first)
Check output for URL to connect Plex account
Add extra settings to config.jsonand restart Plex-RPC container (Optional)

Replace with your own information.

 It sounds like you made tmp folder in the Docker Discord instead of the Discord Rich Presence Plex
Here are the steps you should be taking to make it work with Docker.
DOCKER INSTALL
1. Create a Directory.

2. Within the Directory create a folder named `unix-socket`

3. Run Discord Docker (Replace your info first)

4. Go to https://YOUR-IP:6901

5. User = `kasm_user`

6. Password = Set in Run Command

7. Login to your Discord Account

8. Run Discord Rich Presence Plex Docker (Replace your info first)

9. Check output for URL to connect Plex account

10. Add extra settings to `config.json`and restart Discord Rich Presence Plex Docker container (Optional)

Replace with your own information.
* `/PATH/TO/DIRECTORY/`

* `PASSWORD`

* `YOURSERVER`

  --name Discord \
  --restart unless-stopped \
  --shm-size=512m \
  -p 6901:6901 \
  -e VNC_PW=PASSWORD \
  -v /PATH/TO/DIRECTORY/unix-socket:/tmp \
  kasmweb/discord:1.14.0```

```docker run -d \
  --name Discord Rich Presence Plex \
  --restart unless-stopped \
  -e PLEX_SERVER_NAME=YOURSERVER \
  -v /PATH/TO/DIRECTORY/data:/app/data \
  -v /PATH/TO/DIRECTORY/unix-socket:/run/app:ro \
  ghcr.io/phin05/discord-rich-presence-plex:latest```

I haven't even tried the Docker image for this repo yet, I wanted to make sure I got the Discord image up and running.
Here is the command I used:
sudo docker run -d --name Discord --restart unless-stopped --shm-size=512m -p 6901:6901 -e VNC_PW=password -v /volume2/configs/kasmdiscordcfg/unix-socket:/tmp kasmweb/discord:1.14.0

Sorry then I do not know. I suggest trying the docker run I provided, if that doesn't work you should contact the Docker Image owner, which is Kasm.

@totaltentigers Also as previously mentioned you are adding the unix-socket folder to the wrong directory, you shouldn't be adding anything to the Discord Docker directory.

@totaltentigers Also as previously mentioned you are adding the unix-socket folder to the wrong directory, you shouldn't be adding anything to the Discord Docker directory. Also your volume mounts are incorrect. I highly recommend following the steps I provided.

@zluckytraveler My volume mount is a folder on my host machine (/volume2/configs/kasmdiscordcfg/unix-socket). Your instructions said to make a directory (/volume2/configs/kasmdiscordcfg) and unix-socket folder within it, which I have done.
Also, how is the volume mount incorrect? It is the same as yours. Unless I am reading something wrong.
Thank you for the help!

It looks like your volume mount is within the Kasm discord directory, it should be I the same directory as the Plex rich presence.
It's also very possible that you do not have the directory enabled for Docker file sharing, and would need to add it.
Docker Desktop > Settings > Resources > File Sharing

@totaltentigers I ran into the same "Unrecognized option: -UnixRelay" error while testing something now and figured out the cause. Make sure that the permissions on the directory you're mounting into the container as /tmp (/volume2/configs/kasmdiscordcfg/unix-socket in your case) is set to 777.

@totaltentigers I ran into the same "Unrecognized option: -UnixRelay" error while testing something now and figured out the cause.
Make sure that the permissions on the directory you're mounting into the container as /tmp (/volume2/configs/kasmdiscordcfg/unix-socket in your case) is set to 777.
You can run chmod 777 /volume2/configs/kasmdiscordcfg/unix-socket to do this.

Totally forgot I left a commend here. The fix that worked for me was changing the file ownership of the .../unix-socket/discord-ipc-0 file, but good to know there's another fix!


Links with cyrillic characters are not being redirected

Issue Summary
I added some redirects through Ghost admin panel → Settings → Labs → Redirects. But the redirects with Cyrillic characters are not working - it just shows the 404 page. Here's the content of a YAML file I uploaded:
301:
    /joloonii-surgaltuud/b-angilal/: /joloonii-angilal/#в-ангилал
    /joloonii-surgaltuud/c-angilal/: /joloonii-angilal/#с-ангилал
    /joloonii-surgaltuud/а-ангилал/: /joloonii-angilal/#а-ангилал
    /joloonii-surgaltuud/м-ангилал: /joloonii-angilal/#м-ангилал

The first two works fine, but not the last two (I assume it's because they contain Cyrillic characters like л, г, н, etc)
Steps to Reproduce

Upload a .yaml file containing redirects with Cyrillic characters on Ghost admin panel → Settings → Labs → Redirects
Check if the redirect works

Ghost Version
5.9.4
Node.js Version
v16.14.2
How did you install Ghost?
Ubuntu 20.04.4 LTS
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct

[X] I agree to be friendly and polite to people in this repository

Hey @zolbayars, thank you so much for the detailed bug report.
That does look like something that shouldn't happen! A PR to fix this issue would be very welcome 🙂

I'm gonna take a look 🙂


Set-MpPreference -SubmitSamplesConsent Always  interpreted as AlwaysPrompt

Earlier Windows has None(0), Always(1), Never(2).
But newer Windows 10 has AlwaysPrompt(0), SendSafeSamples(1), NeverSend(2), SendAllSamples(3).

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

ID: 5f8ccc01-1b04-e443-ef75-6ffe6c866dd5
Version Independent ID: fa2eaa0f-db04-785a-3894-8244947b9cd5
Content: Enable cloud-delivered protection in Windows Defender Antivirus
Content Source: windows/security/threat-protection/windows-defender-antivirus/enable-cloud-protection-windows-defender-antivirus.md
Product: w10
Technology: windows
GitHub Login: @Dansimp
Microsoft Alias: dansimp

@officedocsbot assign @mypil

@0xbadfca11 - Thank you for submitting feedback.
I will get this issue over to the Win10 ITPro writing team for investigation.
Thank you for reporting and making the docs better. Much appreciated.
I made a note to request the team to update this when the work is complete.

Hello @0xbadfca11 ! thanks for your feedback.
I could verify so I created a pull request to correct the parameter value.
Thank you

@0xbadfca11 - From our understanding, the issue has been resolved but it may take a few days for the merged content to appear in the article. If you feel it hasn't been resolved, please re-open this issue.
Thank you for your contribution to make the docs better! Much appreciated!

@officedocsbot close


[SPARK-33183][SQL] Fix EliminateSorts bug when removing global sorts

What changes were proposed in this pull request?
This PR aims to fix a correctness bug in the optimizer rule EliminateSorts. A global sort should not be eliminated even if its child is ordered since we don't know if its child ordering is global or local. For example, in the following scenario, the first sort shouldn't be removed because it has a stronger guarantee than the second sort even if the sort orders are the same for both sorts.
Sort(orders, global = True, ...)
  Sort(orders, global = False, ...)

Since there is no straightforward way to identify whether a node's output ordering is local or global, a global sort node should only be eliminated when its child is ordered and is 1) another global sort or 2) a range operator.
Why are the changes needed?
To fix a bug in rule EliminateSorts.
Does this PR introduce any user-facing change?
Yes
How was this patch tested?
Unit tests

Test build #130011 has started for PR 30093 at commit bf6e45a.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34618/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34618/

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34618/
Test FAILed.

cc @viirya and @sunchao

Test build #130011 has finished for PR 30093 at commit bf6e45a.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130011/
Test PASSed.

Shouldn't it be like this?
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
index c37dac90c5..79610b4ab2 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
@@ -1058,15 +1058,9 @@ object EliminateSorts extends Rule[LogicalPlan] {
     case s @ Sort(orders, _, child) if orders.isEmpty || orders.exists(_.child.foldable) =>
       val newOrders = orders.filterNot(_.child.foldable)
       if (newOrders.isEmpty) child else s.copy(order = newOrders)
-    case s @ Sort(orders, global, child)
-        if SortOrder.orderingSatisfies(child.outputOrdering, orders) =>
-      (global, child) match {
-        case (false, _) => child
-        case (true, r: Range) => r
-        case (true, s @ Sort(_, true, _)) => s
-        case (true, _) => s.copy(child = recursiveRemoveSort(child))
-      }
-    case s @ Sort(_, _, child) => s.copy(child = recursiveRemoveSort(child))
+    case Sort(orders, false, child) if SortOrder.orderingSatisfies(child.outputOrdering, orders) =>
+      child
+    case s @ Sort(_, true, child) => s.copy(child = recursiveRemoveSort(child))
     case j @ Join(originLeft, originRight, _, cond, _) if cond.forall(_.deterministic) =>
       j.copy(left = recursiveRemoveSort(originLeft), right = recursiveRemoveSort(originRight))
     case g @ Aggregate(_, aggs, originChild) if isOrderIrrelevantAggs(aggs) =>

Two simpler rules:

Remove local sort if child satisfies the required ordering
Keep global sorts, but remove all sorts from child

This fails two tests:

Range test, but it is not correct because of what @viirya said
In the "remove two consecutive global sorts with same ordering" this keeps the parent sort, but in the test it keeps the child sort.

Taking it a bit further we can also remove local child sorts inside a local sort:
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
index c37dac90c5..dee3e40f0d 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
@@ -1058,33 +1058,29 @@ object EliminateSorts extends Rule[LogicalPlan] {
     case s @ Sort(orders, _, child) if orders.isEmpty || orders.exists(_.child.foldable) =>
       val newOrders = orders.filterNot(_.child.foldable)
       if (newOrders.isEmpty) child else s.copy(order = newOrders)
-    case s @ Sort(orders, global, child)
-        if SortOrder.orderingSatisfies(child.outputOrdering, orders) =>
-      (global, child) match {
-        case (false, _) => child
-        case (true, r: Range) => r
-        case (true, s @ Sort(_, true, _)) => s
-        case (true, _) => s.copy(child = recursiveRemoveSort(child))
-      }
-    case s @ Sort(_, _, child) => s.copy(child = recursiveRemoveSort(child))
+    case Sort(orders, false, child) if SortOrder.orderingSatisfies(child.outputOrdering, orders) =>
+      child
+    case s @ Sort(_, global, child) => s.copy(child = recursiveRemoveSort(child, global))
     case j @ Join(originLeft, originRight, _, cond, _) if cond.forall(_.deterministic) =>
       j.copy(left = recursiveRemoveSort(originLeft), right = recursiveRemoveSort(originRight))
     case g @ Aggregate(_, aggs, originChild) if isOrderIrrelevantAggs(aggs) =>
       g.copy(child = recursiveRemoveSort(originChild))
   }

-  private def recursiveRemoveSort(plan: LogicalPlan): LogicalPlan = plan match {
-    case Sort(_, _, child) => recursiveRemoveSort(child)
-    case other if canEliminateSort(other) =>
-      other.withNewChildren(other.children.map(recursiveRemoveSort))
+  private def recursiveRemoveSort(
+    plan: LogicalPlan, global: Boolean = true): LogicalPlan = plan match {
+    case Sort(_, false, child) if !global => recursiveRemoveSort(child, global)
+    case Sort(_, _, child) if global => recursiveRemoveSort(child, global)
+    case other if canEliminateSort(other, global) =>
+      other.withNewChildren(other.children.map(recursiveRemoveSort(_, global)))
     case _ => plan
   }

-  private def canEliminateSort(plan: LogicalPlan): Boolean = plan match {
+  private def canEliminateSort(plan: LogicalPlan, global: Boolean): Boolean = plan match {
     case p: Project => p.projectList.forall(_.deterministic)
     case f: Filter => f.condition.deterministic
-    case r: RepartitionByExpression => r.partitionExpressions.forall(_.deterministic)
-    case _: Repartition => true
+    case r: RepartitionByExpression => r.partitionExpressions.forall(_.deterministic) && global
+    case _: Repartition => global
     case _ => false
   }

Test build #130056 has started for PR 30093 at commit 6d08848.

I like the approach of using two simpler rules and removing the special case for the Range operator.
@tanelk  I am not sure if I fully understand your proposed logic behind "remove local child sorts inside a local sort". Say we have this case
Sort('a.asc, false, _)
  Repartition
     Sort('b.asc, false, _)

With the proposed logic, the initial global value will be false, which will lead to the Repartition case to return false, and the recursiveRemoveSort will fail to eliminate the child local sort Sort('b.asc, false, _)
Can you provide an example when your logic can eliminate local child sorts inside a local sort while the current logic cannot?

Test build #130057 has started for PR 30093 at commit 2966802.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34665/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34666/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34665/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34665/
Test PASSed.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34666/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34666/
Test PASSed.

With the proposed logic, the initial global value will be false, which will lead to the Repartition case to return false, and the recursiveRemoveSort will fail to eliminate the child local sort Sort('b.asc, false, _)
Can you provide an example when your logic can eliminate local child sorts inside a local sort while the current logic cannot?

Ah yes, It seems we wouln't have to change the canEliminateSort at all.

Test build #130056 has finished for PR 30093 at commit 6d08848.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130056/
Test PASSed.

Test build #130057 has finished for PR 30093 at commit 2966802.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130057/
Test PASSed.

Test build #130172 has started for PR 30093 at commit bcbd9fa.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34778/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34778/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34778/
Test PASSed.

Test build #130172 has finished for PR 30093 at commit bcbd9fa.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class RemoveRedundantSorts(conf: SQLConf) extends Rule[SparkPlan]

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130172/
Test PASSed.

Test build #130219 has started for PR 30093 at commit 2e5bc2c.

Test build #130219 has finished for PR 30093 at commit 2e5bc2c.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130219/
Test FAILed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34819/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34819/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34819/
Test PASSed.

Test build #130296 has started for PR 30093 at commit 59f9cd4.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34897/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34897/

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34897/
Test PASSed.

Test build #130296 has finished for PR 30093 at commit 59f9cd4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130296/
Test PASSed.

Test build #130335 has started for PR 30093 at commit cdc7dbe.

The current change is out of the PR title and description. Before merging this, can you update the title and description? Thanks.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34937/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34937/

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/34937/
Test FAILed.

Test build #130335 has finished for PR 30093 at commit cdc7dbe.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/130335/
Test PASSed.

thanks, merging to master!

@viirya @maropu what do you think about backporting? Shall we backport without the new rule or with it?

I'm okay to backport it with new rule as it has config.

@allisonwang-db can you help to create the backport PR? we need to change the config "since version" accordingly.

+1 to backport this.

I will update the master branch config version to 2.4.8 once the backport PRs are merged.


Steering Race Condition

A race condition exists with steering, where the steering configuration will not work if it is created using new delivery services that have yet to be snapshotted to propagate down to Traffic Router. This is because the steering watcher tries to locate the delivery service when it sees the new steering configuration, however, it is unable to locate the delivery service because the config has not yet been snapshotted. The issue persists after a snapshot, because the steering configuration remains the same. The only way to fix the issue is the change the weighting or order, or some other steering configuration, which causes a "diff" to appear in the JSON, which triggers a process in Traffic Router to try to reconfigure all steering assignments. By this point the config has been snapshotted and the process does find the subordinate delivery services. Keep in mind that we have steering and client steering, both affected by this.
There are a couple ways to correct this issue, but due to the asynchronous nature of how the steering watcher is implemented, we need to ensure that the current config does not get dropped on the floor when the config is processed, which would cause any in-flight steering requests to fail. Instead, the config should be processed "on the side" and swapped in when complete, similar to how we do things for other configs. Other approaches are valid too; whatever works as long as we can continue to handle steering requests while the config is processed.

@elsloo  - can you put a severity level label on this? trivial, minor, major, critical...

This was resolved via #1843.


支持 security token

Coverage decreased (-0.6%) to 86.784% when pulling 942146f0abca5539f986431d3ad4d23805e5bd48 on sts into e3b26c0e9a7790f6ce67e7aae1092d2c84c2d9c0 on master.


Update monitor-vpn-gateway-reference.md w/ Gateway and Tunnel Flow Co…

…unters
Updated both GW FC and Tunnel FC

@MSFT-FrankLpnsk
These changes need to be made in the private repo, as you did here. I'll close this PR so you can submit this content to the private repo.


[docs] document how to compile/publish docs

Coverage remained the same at 69.419% when pulling 74bcf96ee74766f203a6435dc9e4c5a44d8d2b99 on mistercrunch:docs_contributinhg into 9c6248f3bac6e83f7a4418e499a3f2646a841b3a on apache:master.

LGTM


Possible write/edit in rendered mode?

Is it possible to write text in rendered mode?

Can you explain a bit more? If you want to be able to edit the renderer HTML directly you would need a WYSIWYG (what-you-see-is-what-you-get) editor. They are quite more complex. You can find them online :)

Can you explain a bit more? If you want to be able to edit the renderer HTML directly you would need a WYSIWYG (what-you-see-is-what-you-get) editor. They are quite more complex. You can find them online :)

Ahh thanks, now I understand the scope of the library :)


Unjustified "No space left on device" error

My Environment

ArangoDB Version:        3.11.8
Deployment Mode:       Single Server
Deployment Strategy:   Kubernetes
Configuration:
Infrastructure:               own
Operating System:        Linux Alpine 3.16.9
Total RAM in your machine:        128gb
Disks in use:
Used Package:              Docker - official Docker library

Component, Query & Data
Affected feature:
ArangoDB
Size of your Dataset on disk:
dozens of gb when it's not compressed
Steps to reproduce
Not sure
Problem:
I'm getting a "No storage space left on device" error occasionally but nearly daily while I'm actively using the db (inserting/deleting data). I check and the storage space isn't full.
I also see that some sst and .log (in the journals folder) files are getting really big even 4.6gb
In any case, I increased the storage space and still see the error
It's been a while since we have this same setup but never got this error in the past. Not sure what triggers it
Some of the db logs that are suspicious:
ERROR [fae2c] {rocksdb} RocksDB encountered a background error during a compaction operation: IO error: No space left on device: While appending to file: /var/lib/arangodb3/engine-rocksdb/002971.sst: No space left on device; The database will be put in read-only mode, and subsequent write errors are likely. It is advised to shut down this instance, resolve the error offline and then restart it.
this one is from another day
2024-12-10T10:18:51Z [1] ERROR [a5ba8] {engines} unable to apply revision tree removals for _system/_statisticsRaw: Tried to remove key that is not present. 2024-12-10T10:18:51Z [1] ERROR [fdfa7] {engines} unable to apply revision tree updates for _system/_statisticsRaw: Tried to remove key that is not present. 2024-12-10T10:18:51Z [1] WARNING [33691] {engines} _system/_statisticsRaw: caught exception during revision tree serialization: Tried to remove key that is not present. (exception location: /work/ArangoDB/arangod/RocksDBEngine/RocksDBMetaCollection.cpp:1533). Please report this error to arangodb.com
Expected result:

alright, so to sum up
with tune2fs: the idea is to increase the reserved space that will allow Arango to continue doing basic tasks even if the storage space is depleted? (I understand that currently, once the storage space is depleted, Arango can't even flush/delete older wal files and so it can't recover)
for the WAL-configuration, the idea would be to:

accelerate the flushing of wal files say with --rocksdb.auto-flush-check-interval
accelerate the deletion of unused wal files with --rocksdb.wal-file-timeout and/or --rocksdb.wal-file-timeout-initial
and put a limit to the size of the wal archives with --rocksdb.wal-archive-size-limit

do I get it right?
if I make the storage space "large enough", will this solve the issue?

I meant reducing the reserved space - or at least get to know that this is there.
Your monitoring (prometheus? collectd? zabbix? grafana?) should show you something like a saw-tooth pattern of used disk space.
You can either lengthen the time available for the ramp by adding more storage space, or shorten the ramping time by more frequently run the compaction.
Please note that compaction uses disk & cpu resources and may reduce system resources available to normal operations.


Add Intermediate Artifact page

With this commit I will resolve issue #1 to modify the header and redirect to new intermediate artifact page.
Changes-

Update:
Grouped artifacts by latest version and Passed this to New Artifacts Page
This resolves issue #3
Screenshot:

@adpi2 Please review

How it looks-

@adpi2 Please review

Improved the UI
This is how it looks-

@adpi2 @kannupriyakalra  Please review

this looks nice, good work @ayushkoli772 :)

Thank you @kannupriyakalra :)

How it looks-

Please review. @adpi2 @kannupriyakalra

Changes so far

Changes to artifacts page-

Changes to versions page-

@adpi2 @kannupriyakalra Please review

Changes to versions page-

Minor changes in case there are no artifacts for a version.
Before-

After-

@adpi2 @kannupriyakalra Please review.

@adpi2 I have implemented the suggested changes

Looks good to me!
I think everything is ready for you to open a PR to https://github.com/scaladex/scaladex, right?

Yes! I will make this draft ready for review and then open PR

@adpi2 I should open PR to main branch of scaladex right?

Yes

Now that we have https://github.com/scalacenter/scaladex/pull/1447 could you close this one?


bug:  core dump where i try in ubuntu

Describe the bug
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from whispercpp import Whisper
w = Whisper.from_pretrained("tiny.en")
Illegal instruction (core dumped)

To reproduce
No response
Expected behavior
No response
Environment
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

I try to build with my OS ,looks it also cause core dump in my system
running install_egg_info
Copying src/whispercpp.egg-info to build/bdist.linux-x86_64/wheel/whispercpp-0.0.17.post65+gbc9769c-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/whispercpp-0.0.17.post65+gbc9769c.dist-info/WHEEL
creating '/home/eric/whispercpp/dist/.tmp-g_4zvv7l/whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'whispercpp/about.py'
adding 'whispercpp/init.py'
adding 'whispercpp/init.pyi'
adding 'whispercpp/api.pyi'
adding 'whispercpp/api_cpp2py_export.so'
adding 'whispercpp/audio.pyi'
adding 'whispercpp/audio_cpp2py_export.so'
adding 'whispercpp/py.typed'
adding 'whispercpp/utils.py'
adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/LICENSE'
adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/METADATA'
adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/WHEEL'
adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/top_level.txt'
adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl
eric@eric-Thurley:~/whispercpp$ pip install dist/*.whl
Defaulting to user installation because normal site-packages is not writeable
Processing ./dist/whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl
Installing collected packages: whispercpp
Successfully installed whispercpp-0.0.17.post65+gbc9769c
eric@eric-Thurley:~/whispercpp$ cd
eric@eric-Thurley:~$ python
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from whispercpp import Whisper
w = Whisper.from_pretrained("tiny.en")
Illegal instruction (core dumped)
eric@eric-Thurley:~$

I have the same issue.
I use

Ubuntu 22.04 Server VM
Python 3.10

I install it directly from the repo

pip install git+https://github.com/aarnphm/whispercpp.git -vv

I think maybe something got changed on the main whisper.cpp repo which results in such a problem.

I had the same problem. Whenever I attempted loading a model - I got "Illegal instruction (core dumped)".
Here I found the the issue could be in the CPU and it worked for me.
I got this error on a server with Xeon E5-2687W CPU (manufactured back in 2012)
When I changed it to AMD Ryzen Threadripper PRO 5955WX (2022) - all worked fine.
If that doesn't help you, I also found that it could be a bug with numpy, try downgrading in to 1.19.4


Fix error message spelling error: unnknown => unknown

There are spots in both v1 and v2 marshaling code where unknown is spelled with an extra n. This PR fixes it in v2 on the assumption that v1 error messages should not be changed.
Skipping filing an issue to save time on overhead, since I do not see a CONTRIBUTING that states a firm rule to always file first, hopefully this works for the community.

Yes v1 will be removed soon, thank you for this PR!


International Telephone numbers are not accepted

Subject of the issue
International Telephone numbers are not accepted in the phone field

This discourages NRI's from registering in the portal

Just made changes for the volunteer model for now. Will change rest on furthur discussion

Please merge Missing persons branch https://github.com/IEEEKeralaSection/rescuekerala/pull/847
P placed a TODO to move phone validation regex outside model classes.

@vchacko Will do if changes are confirmed.

@TribeAsteraea One of the challenges with international volunteers is that we do not have a SMS gateway that supports international SMS. It doesn't prevent us from allowing registration and let me check with the team and revert.

Thakns @bobinson , I still recieve SMS to my intnl number when linked to the Indian bank account,any idea what are they using there ?

Gov gateway. (sorry for the late reply)


Ready for production?

Hi thanks for the lib! I wonder whether this is ready for production?

Yep, if you find any issues please post em here.

Thanks! I saw several issues in the issue tracker without reply, so I was worried this lib was deprecated...

No definitely not, I'll take a look at those issue!

Get it :)


Does MemoizationPolicy support two consecutive actions?

Rasa Core version:
0.11.3
Python version:
2.7
Operating system (windows, osx, ...):
ubuntu 16.04
Issue:
Dose MemoizationPolicy can memory two consecutive actions?
like this domain.yml:

affirm_intent

request_special_good
ask_return_reason

when I try this affirm_intent, i see debug information：
There is no memorised next action

yes, it does. I assume you have a conflicting story somewhere, or you're missing some entities in this story. Please ask these kind of questions in our forum in future


Nt/deep link

added associated domain alpha.ecency.com
supporting raw filters deep link
supporting deep link profile filters
added support for in app web browser, linked with communities page for now

@noumantahir new line at the end would be good though src/screens/webBrowser/index.ts

@feruzm

added new line at end of index.ts
fixed issue with indexOf usage


Keep blank lines introduced by "Organize Imports"

"Organize Imports" groups imports by packages "roots", like this:
import ceylon.foo { ... }
<blank line>
import java.xyz { ... }
<blank line>
import org.xyz { ... }
import org.abc { ... } // no blank line here

It would be nice if the formatter kept those blank lines.
Also, I think it would be cool to force a blank line between the imports section and the first declaration (which seems to be a convention, for example in the SDK).

Should be done, both parts. Reopen if not :)


Add generic controlled operations

Either via a controlled gate factory or with a proper wrapper function.

i would consider this done after adding some more tests. you can check out the implementation under core/operation.py/ControlledOperationGate


Ella can sometimes make already-correct results much less correct

RealCartoon 3D V15
Princess Peach is standing next to Tifa Lockhart, they are outside on a summer day, they are wearing bikinis. high quality, best quality, masterpiece
Without Ella:

With ELLA, same seed:

Using Ella in this case turns Princess Peach into a random pink-haired girl instead of the recognizable character.

During ELLA's training, a large number of synthetic captions were used, which typically do not include names or character names. Therefore, if your prompt contains a name, ELLA's performance is very poor. You can try replacing the name with 'a woman' and concatenate the output of CLIP.

@budui Thanks for explanation. And this is what I think there should be tricks to generate the better synthetic captions or mixing short captions and synthetic long captions.

During ELLA's training, a large number of synthetic captions were used, which typically do not include names or character names. Therefore, if your prompt contains a name, ELLA's performance is very poor. You can try replacing the name with 'a woman' and concatenate the output of CLIP.

We want to prevent this issue on our end as well. What did you mean when you said "concatenate the output of CLIP"? Where would the name be introduced again?


plugins/colorschemes: migrate helpers -> lib.nixvim

I see all the colorschemes are like this, gonna just update them all here

gonna just update them all here

Yeah these kinda migrations are fine to be done in bulk. Hopefully less painful than #1674 :crossed_fingers:
There's no rush to get this migration work done though, it's less of a priority than migrating old plugins to mkNeovimPlugin.

gonna just update them all here

Yeah these kinda migrations are fine to be done in bulk. Hopefully less painful than #1674 🤞
There's no rush to get this migration work done though, it's less of a priority than migrating old plugins to mkNeovimPlugin.

Yeah, was just doing some of them out of OCD and they are quicker victories than migrating an entire plugins options to a new way of doing things. :P

Sounds good, wasn't sure about that one. But, it does make it cleaner and still shows ownership of where it's coming from.

@mergifyio queue


🖥 Improved Window System & 🧹 Minor Organization

GLFW to replace LowLevelWindow
This PR removes LowLevelWindow for GLFW for the Windowing system only. GLFW will eventually come to handle all Input and Controllers, more changes must be made between how tightly bound the game is to the framework.
This PR started out as reworking the OpenGL code. Since that was the originally intention RageDisplay_OGL was changed to organize the source code with labels, and glew was replaced with glad. Any commit prefixed with Dead Code had code that wasn't used anywhere on any platform. This PR later became focused on the windowing system, since it was a large piece that could be easily isolated.
Changes Include

Organizing StepMania.{cpp,h}
RageDisplay_OGL organization
glew replaced with glad
LowLevelWindow replaced with GLFWWindowBackend and IWindowBackend

In current state: d3d and opengl are functional and take input. Opengl is capped at 144fps due to vsync reasons (we had a solution to this and I think the code was left out)
Opening the game in opengl and closing it causes the vsync preference to turn itself on mysteriously (with and without the vsync code added). Opengl itself performs surprisingly bad when certain things are happening on screen. More investigation and testing required here, I haven't done much. It seems that changing the texture resolution to the lowest setting in opengl causes the game to run at an extremely low framerate, and moving the mouse around a lot in opengl causes impressive fps dips.
Also still missing the information mentioned in the requested changes above.
Again, needs thorough testing and comparison between master opengl and this pr. d3d seems good

Closing for #1013. This one is doing too much. The changes will still be added in different PRs.


add index configuration for Global Biotic Interactions

Hi @aeiche01 ,
Congratulations on your publication of:
Eichenwald, A. J., Fefferman, N. H., & Reed, J. M. (2024). Potential extinction cascades in a desert ecosystem: Linking food web interactions to community viability. Ecology and Evolution, 14, e10930. https://doi.org/10.1002/ece3.10930
Also, thank you for openly sharing your research and associated data.
In order to make your constructed foodweb of the Mojave Desert more easier to find, please accept this pull request to let GloBI index your food web data.
Please let me know if you have any questions,
-jorrit
https://jhpoelen.nl
https://globalbioticinteractions.org

PS I've attached a GloBI data review report for your dataset. Curious to hear your thoughts.
eigenwald-review-2024-02-20.pdf
eigenwald-review-report-2024-02-20.zip


support driver.Connector.

https://github.com/shogo82148/go-sql-proxy/issues/21

Coverage decreased (-0.4%) to 61.629% when pulling 9222f906a98fc9e012830f3322bc6cf2091c0281 on connector-support into 6c213888676a4728a4b4d13459876dc972793f57 on master.


TileArcGISRest API error

The TileArcGISRest API from OpenLayers does not work corrently with version 8.2.0 of OpenLayers. When I simply switch the version to 7.5.2, the code works fine. However, with version 8.2.0, it throws an error.

the same error with version 8.1.0 and 8.0.0


Circle CI 2 doc

I’m using appr with Circle CI 2.0. If there’s no good reason to document the configuration in CircleCI 1.0i on README, it would be nice to update the doc for developpers like me.

That's a good idea! We currently have some fundamental questions to answer with appr's future regarding the recent iOS changes in the Expo client (see top of README) but would be nice to have this documented.
If you come up with a setup for your project, I'd love to see a PR!

I can provide an example :

.circleci/config.yml

version: 2

jobs:
  test:
    docker:
      - image: circleci/node:9
    steps:
      - checkout
      - restore_cache:
          keys:
            - dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
            - dependencies-{{ arch }}
      - run:
          name: Install dependencies
          command: yarn --prefer-offline --pure-lockfile
      - save_cache:
          key: dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
          paths:
            - node_modules
      - run:
          name: Lint code
          command: yarn run lint
      - run:
          name: Run flow
          command: yarn run flow
      - run:
          name: Run tests
          command: yarn run test

  publish:
    docker:
      - image: circleci/node:9
    steps:
      - checkout
      - restore_cache:
          keys:
            - dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
      - run:
          name: Publish
          command: |
            # Needs: EXP_USERNAME, EXP_PASSWORD, GITHUB_USERNAME, GITHUB_TOKEN
            if [ -n "$CIRCLE_PULL_REQUEST" ]; then
              npx appr
            fi

workflows:
  version: 2

  main-workflow:
    jobs:
      - test
      - publish:
          context: expo
          requires:
            - test

You can use [https://circleci.com/docs/2.0/contexts/] and create a expo context with the four env variables: EXP_USERNAME, EXP_PASSWORD, GITHUB_USERNAME, GITHUB_TOKEN


Add more args to SFT example

The SFT example sft_trainer.py does not support all HFArguments available. This PR adds argparser flags for common HFArguments, so that the example is more usable.
This is a very simple feature change.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Could your run make precommit to fix the style issues?

@lvwerra I've fixed them, tests should pass now?


$env:Path left with the wrong link.exe being found first

This run demonstrates.  Follow the link to the workflow file if you need to reproduce elsewhere.  Maybe you could use this as a unit test case for this action.

FYI, C:\mingw64\… is also taking precedence.

The tip of this branch contains further diagnostics in .github/workflows/test.yml

And despite the red X, the output of this run shows that setting up vsdevenv first fixes the problem.


Unable to load OData adapter from assembly Simple.OData.Client.V3.Adapter

How many more bugs need to reported to solve this?
app config binding redirects enabled or not this error occurs
error source: Microsoft.Threading.Tasks
stack trace:

at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Simple.OData.Client.FluentClientBase`1.d__35.MoveNext()

PAckages.config
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />   <package id="Microsoft.Bcl" version="1.1.9" targetFramework="net452" />   <package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net452" />   <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net452" />   <package id="Microsoft.Data.Edm" version="5.8.1" targetFramework="net452" />   <package id="Microsoft.Data.OData" version="5.8.1" targetFramework="net452" />   <package id="Microsoft.Data.Services.Client" version="5.8.1" targetFramework="net452" />   <package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net452" />   <package id="Microsoft.OData.Core" version="6.0.0" targetFramework="net452" />   <package id="Microsoft.OData.Edm" version="6.0.0" targetFramework="net452" />   <package id="Microsoft.Spatial" version="6.0.0" targetFramework="net452" />   <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net452" />   <package id="SAPDotNetConnector3" version="0.3.0" targetFramework="net452" />   <package id="Simple.OData.Client" version="4.29.0" targetFramework="net452" />   <package id="System.Spatial" version="5.8.1" targetFramework="net452" />

"How many more bugs need to reported to solve this?"
This is not the best way to address issue resolution in open source software. I always appreciate pull requests and thankful to many developers who contributed to the project. From your packages.config I can see that you are using an old version of Simple.OData.Client. Did you try the latest one?


Add more test cases for Tokenizer

I'm going to add the test cases of html5lib-tests. It seems that WHATWG recommends using this suite of unit tests.

https://github.com/html5lib/html5lib-tests/tree/master/tokenizer
https://wiki.whatwg.org/wiki/Parser_tests

I'd like to generate Swift code automatically from html5lib-tests' JSON files if possible.


RESTler Docker fails to run the fuzzer

In RESTler container, I face the issues that are reported https://github.com/microsoft/restler-fuzzer/issues/304#issue-977898141
Here are the steps:

docker run -ti -v /PATH/container:/pwd --workdir /pwd mcr.microsoft.com/restlerfuzzer/restler:v8.0.0
/pwd # dotnet ../RESTler/restler/Restler.dll compile --api_spec openapi.yaml

Starting task Compile...
Task Compile succeeded.
Collecting logs...

apk-add python3, with some additional options that I needed: apk-add curl  and pip install jsbeautifier
/pwd # dotnet ../RESTler/restler/Restler.dll compile config.json

Starting task Compile...

ERROR: Compiler failed. See logs in /pwd/Compile directory for more information.

Task Compile failed.
Collecting logs...
/pwd # cd Compile/
/pwd/Compile # cat StdErr.txt
Unhandled exception. System.ArgumentException: Could not read dictionary: ERROR: Cannot deserialize mutations dictionary.  An exception occurred during deserialization: Newtonsoft.Json.JsonSerializationException: Could not find member 'restler_custom_payload_query' on object of type 'MutationsDictionary'. Path 'restler_custom_payload_query', line 29, position 35.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Microsoft.FSharpLu.Json.Compact.tryDeserializeFile[T](String file)
   at Restler.Workflow.generateGrammarFromSwagger(String grammarOutputDirectoryPath, FSharpOption`1 swaggerDoc, Config config) in D:\a\1\s\src\compiler\Restler.Compiler\Workflow.fs:line 131
   at Restler.Workflow.generateRestlerGrammar(FSharpOption`1 swaggerDoc, Config config) in D:\a\1\s\src\compiler\Restler.Compiler\Workflow.fs:line 247
   at Program.main(String[] argv) in D:\a\1\s\src\compiler\Restler.CompilerExe\Program.fs:line 37

Removed restler_custom_payload_query from dict.json, and it worked!

Starting task Compile...
Task Compile succeeded.
Collecting logs...

dotnet ../RESTler/restler/Restler.dll fuzz --grammar_file Compile/grammar.py --settings restler_user_settings.json --dictionary_file dict.json --no_results_analyzer

Starting task Fuzz...
Using python: 'python3' (Python 3.8.10)

ERROR: Restler engine failed. See logs in /pwd/Fuzz directory for more information.

Task Fuzz failed.
Collecting logs...
/pwd #
/pwd # cd Fuzz/
/pwd/Fuzz # ls
EngineStdErr.txt             EngineStdOut.txt             RestlerResults               restler-20211008-093016.log
/pwd/Fuzz # cat EngineStdOut.txt
Initializing: Garbage collection every 30 seconds.
No checkpoints used at this phase
2021-10-08 21:30:17.879: Generation: 1
Terminating garbage collection. Waiting for max 300 seconds.
Traceback (most recent call last):
  File "/RESTler/engine/engine/core/fuzzer.py", line 42, in run
    self._num_total_sequences = driver.generate_sequences(
  File "/RESTler/engine/engine/core/driver.py", line 695, in generate_sequences
    seq_collection = render(seq_collection, fuzzing_pool, checkers, generation, global_lock)
  File "/RESTler/engine/engine/core/driver.py", line 320, in render_sequential
    valid_renderings = render_one(seq_collection[ith], ith, checkers, generation, global_lock)
  File "/RESTler/engine/engine/core/driver.py", line 207, in render_one
    renderings = current_seq.render(candidate_values_pool, global_lock)
  File "/RESTler/engine/engine/core/sequences.py", line 323, in render
    CUSTOM_LOGGING(self, candidate_values_pool)
  File "/RESTler/engine/utils/logger.py", line 475, in custom_network_logging
    primitive, values, default_val = format_request_block(request.request_id, request_block, candidate_values_pool)
  File "/RESTler/engine/utils/logger.py", line 853, in format_request_block
    values = candidate_values_pool.get_candidate_values(primitive, request_id=request.request_id, tag=current_fuzzable_tag, quoted=quoted)
NameError: name 'request' is not defined

/pwd/Fuzz #

Removed custom_payload_header from dict.json, and it worked!

restler_custom_payload_query and custom_payload_header must be removed from the dict.json to get the fuzz container to work.
Is it possible to add the latest and greatest RESTler engine to the Docker so we do not face those issues and can still use the updated attributes for dict.json? Thanks.

Hello @mbiuki,
The 8.1.0 image is published now.  Please confirm this new image resolves the above error for you.
Thanks,
Marina


myStr = "FirstLine\n\SecondLine\\rThirdLine";

Challenge Escape Sequences in Strings has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

var myStr; // Change this line

myStr = "FirstLine\n\\SecondLine\\\rThirdLine";

FirstLinenewlinebackslashSecondLinebackslashcarriage-returnThirdLine

It made me very confused!
I just can't  understand this, and why not directly show off the result effect of pic?
just like this!

Thanks for submitting this issue. I'm closing as I believe this is a duplicate of #10485. This should be fixed once a PR is made and merged from that thread and then pushed to the live site. In the meantime, please consider asking for help in the Help Chat room


EncryptablePropertySourceConverter should only convert files defined in .include-sources

On startup, I get the following message logged for all of my *.properties:
c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/application.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
c.u.j.EncryptablePropertySourceConverter : Converting PropertySource applicationConfig: [classpath:/application-custom.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
[classpath:/application-custom2.properties] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper

But as I set the following property:
jasypt.encryptor.property.filter.include-sources=application.properties

It would be great if the EncryptablePropertySourceConverter could simply skip the files not mentioned there. Because I already told him with the property that the other files don't contain encrypted values, thus these files could be skipped entirely.

You’re right. I will take a look but I think that all property sources get converted regardless. The filter logic is then applied when properties are looked up, so semantically, it should work as you expect

closing this since the behavior is as expected. One caveat though, the include-sources is based on the property source name, and application.properties is not the property source name of the application.properties file, the actual name is applicationConfig

So your advise is to set jasypt.encryptor.property.filter.include-sources=applicationConfig??

yes, you can either use include-sources=applicationConfig or include-names="some\.property\.prefix\..*"

Just as a sidenote: I never got it working with include-sources even though I'm only having a simple application.properties file, and using jasypt.encryptor.property.filter.include-sources=applicationConfig. The password is never decoded.
Inspite, I could get it working with jasypt.encryptor.property.filter.include-names=spring.datasource..*
Maybe you could have a look again on the include-sources property? This seem not to be working correctly...

thanks for the heads up, I'll take a look

should work as expected: https://github.com/ulisesbocchio/jasypt-spring-boot/blob/master/jasypt-spring-boot/src/test/java/com/ulisesbocchio/jasyptspringboot/filter/DefaultPropertyFilterTest.java


iOS 7 not supported?

Just now tried to integrated peek into my project then was told by pod install that
[!] Unable to satisfy the following requirements:

- `Peek` required by `Podfile`

Specs satisfying the `Peek` dependency were found, but they required a higher minimum deployment target.

You might considering make the system support section in read me more explicit about not supporting iOS 7 :)

Well I figured the statement in the README that says, supported on iOS8+ was clear ;)
I wouldn't generally state all the non-supported versions. Thanks for feedback though ;)


RBGD stream for Azure Kinect

Hello Lisa. Did you get a chance to work on this? Thanks

Sorry I didn't. I started to look into it in March and I think there was an issue with one of the dependencies that was blocking me. I just put time on my calendar for this for early next week. I'll follow up in a week!

@vineet-ixd I'm starting to work on this now and curious about your use case. Are you interested in the full RGBD image? Or are you looking for just the body index RGBD? I think I will try to implement both but the full RGBD is pretty bandwidth intensive, so I'm considering prioritizing the body index as I think it may be easier to send across a network.

I've added the Azure RGBD in release 0.3.7 feed with an example that uses THREE-Kinectron.
Make sure that you use both Kinectron application and client at 0.3.7. Let me know if you have any questions.


Negative week numbers from week 3 to 5 in January 2021

Steps to reproduce

Timex.week_of_month/1
Issue with dates ~D[2021-01-10], ~D[2021-01-17], ~D[2021-01-24], and ~D[2021-01-31].

Description of issue

What are the expected results?
Dates aforementioned are supposed to return week numbers 2, 3, 4, 5 respectively. However, it returns -51, -50, -49, -48. For week one of January 2021, it returns the right week number though.

If you are certain this is a bug in Timex, do you have references I
can use to check the algorithm/logic against? For instance, a well-established
date/time library in another language, a paper, test suite, etc. It is by no
means a requirement, but is immensely helpful in fixing bugs, and provides me
extra data to use when building out the test suite
I'm not sure, sorry!

I'm sure this is a bug in Timex[1]. For every day after 2022-01-04, until 2021-01-31, the result of that Timex.week_of_month will be negative. It also happen at 2022 as well with different starting day.
I think date-fns made a good implementation[2] on this case[3].
getWeekOfMonth(new Date(2021, 1, 10))
> 2

getWeekOfMonth(new Date(2021, 1, 17))
> 3

getWeekOfMonth(new Date(2021, 1, 24))
> 4

[1] https://github.com/bitwalker/timex/blob/master/lib/timex.ex#L1314-L1318
[2] https://github.com/date-fns/date-fns/blob/36f2a94de7f45cd1668085a7a5399ed6bae3fe92/src/getWeekOfMonth/index.js
[3] https://runkit.com/embed/nccmabm3p3qg


Custom Fields, Relationships ...

Hi, first: this plugin is amazing ... besides the very complicated google setup :-)
is there a way to access more than the few fields you provide at the moment? i have an extensive list of Projects and related names connected to my contacts, notes etc and i would love to import this as well when creating a new contact .... maybe just a "dump" of all the info that is attached to a contact?
thanks - arne

thanks for the feedback. any particular fields in contacts you are looking for?

i used "related names" a lot (for projects, referrals, locations, events ...) and notes.
also address and social web links would be great to translate over
as i am now building a more comprehensive database in obsidian i´d like to convert the whole info i have on these contacts over to further enhance these links.
for example: i have used the related name like this:
John Smith
(related name key) Project: (related name value) Project X (Crew: Director)
Dane Jane
Projekt: Project X (Cast: Rolename)
met at: Oscars 2020, Reception
Jane Downs
Project: Project Y (Crew: Producer)
Referred by: John Smith
this was a way of not overusing tags or groups and be able to extend the information stored. also it was universal between google/apple/other apps ... without loosing any of these infos. they are also usable in the phones app and this info is searchable.
but as i am building a CRM inside of Obsidian and a more detailed linkage could be great in this ... also using the dataview to filter through stuff ... its really amazing what this is capable of ...
anyway - if its easy to modify and add these it would be great!
also any way of configuring the way multiple phone numbers/emails are added (in a list for example)?
thanks so much for the fast response!

this is awesome! complete json is now available - thanks


Fix broken link in vi

The documentation contains lot of dead links in the VI language.
I have noticed that the {{< param "githubbranch" >}} was in other portions of the doc, and seems outdated.
I have replaced every occurrence with "master".

/lgtm


Blank Screen with SPA mode and Apollo Module

When in the regular mode, my app works fine. But when switching to mode: 'spa' in the nuxt.config file, the application switches to a blank screen with the loading icon continuously looping. When checking the console, there is an error Error while initializing app TypeError: Cannot read property 'apollo' of undefined which makes me think this is related to the nuxtjs/apollo module. Example can be seen here: http://synonymous-view.surge.sh/
I'm currently updated to RC 11, and a repo of my code can be found at: https://bitbucket.org/abattenburg/nuxtapolloboilerplate. Trying to use SPA to get persistent state, so any thoughts would be much appreciated!

@abattenburg not sure I only checked your code quickly: you are using SPA mode, which is client-side render. But inside of your apollo queries you are using prefetch: true which is for the usage of server side prefetch. I'm not sure if this is possible - seems you mix 2 approaches at the moment. the network interface should also export a function in the version 2 of nuxjs/apollo module. Maybe move this issue/conversation to the nuxtjs/apollo module. I'd also search in your code for .apolllo and see where you make use of it

@dohomi, thanks for helping me confirm it is an issue with Nuxt/Apollo rather then just Nuxt. I upgraded to Nuxt/Apollo V2 and took out all the prefetching, but still couldn't move forward.
There is an issue already on Nuxt/Apollo here that I missed so this seems to be a duplicate. Thanks for the suggestions and taking a look at it!


Syntax highlighting issue when @ appears as first character after line continuation when indexing is present

VS Code version
1.62.3
Extension version
v2021.11.1422169775
OS type
macOS
OS version
11.6
Python distribution
Other
Python version
pyenv (installed with brew) in virtual environment (3.8.10)
Language server
Default
Expected behaviour
I would expect syntax highlighting to be the same irrespective of whether the line is broken before or after the @ operator.
Actual behaviour

Steps to reproduce
Enter the following code into a new python file.
# Define variables so pylance doesn't complain.
long_variable_name = other_long_variable_name = 1

long_variable_name \
    @ other_long_variable_name['some_index']

long_variable_name @ \
    other_long_variable_name['some_index']

Logs
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Copied to the upstream repo that we pull the python grammar from: https://github.com/MagicStack/MagicPython/issues/253


Why guesses.onCompleted()?

Why is this line needed?
https://github.com/evanrmurphy/note-recognition/blob/05350895301e58e0b3f68e69169d93f73074616d/src/index.es6.js#L38
Can't make sense of its role here from the RxJS docs. Tried taking it out and didn't see anything break either...

Resolved by ea34c8b92d62a3855976d4fa36eaa5703d65076c


[Bug]: Reinstalling a custom JS library causes existing code to fail

Is there an existing issue for this?

[X] I have searched the existing issues

Description
When I re-install a custom JS library, any code that references the library stops working until I refresh the app. I do not see any linter error.
Steps To Reproduce

Install a custom JS library
Create a JS object and write a function that references the JS library
Run the function (execution succeeds)
Uninstall the library
Install the library again
Run the function (execution fails)
Refresh the page
Run the function (execution succeeds)

Public Sample App
No response
Issue video log
No response
Version
Cloud

@arunvjn can this be closed?