v2.4.0 grub error out of memory

After install from kairos-standard-opensuse-leap-amd64-generic-v2.4.0-k3sv1.26.6+k3s1.iso on  /dev/mmcblk1 on a x86_64 (latte panda 3 d) I get immediately the following grub error:

same for kairos-standard-opensuse-tumbleweed-amd64-generic-v2.4.0-k3sv1.26.6+k3s1.iso

umm, this could be related to the gfx set by grub, you may need to set it to lower manually as we now set the gfxterm teminal to auto and it would try to get the highest mode available.
Maybe you can check with different gfxmode values?

https://www.gnu.org/software/grub/manual/grub/html_node/gfxmode.html

seem like elementary also hit this at one point, which seems to confirm that this is a gfx issue, setting a really high gfx setting but the framebuffer is not big enough to display that: https://github.com/elementary/installer/issues/542

trying to change gfxmode from auto to 640x480, but it is wired:

adding in the grub.cfg in the first partition, as last line set gfxmode=640x480-> doesn't help
changing in the grub.cfg in the grub2 dir of COS_STATE  from auto to 640x480-> doesn't help either, but produces an interesting picture:

It indeed changes something but actually where to do the change? or is it needed multiple times?

@Itxaka any news on this, any chance to be fixed in 2.4.1?

@Ognian unfortunately no. As this requires a change to grub default values, we needed to push 2.4.1 to fix some issues before getting to work into this as it requires extensive testing to find a good default.

Tested with 2.4.1 same issue!
Noticed the following:

Tested with 2.4.1 same issue! Noticed the following:

Wait, so this means you are able to boot by manually setting the gfxmode rigth? But then on reboot it ignores it unless you set it manually?
Seems like we need to look for a safe default for the resolution

I'll describe the process from the beginning:

I'm downloading kairos-standard-opensuse-leap-amd64-generic-v2.4.1-k3sv1.26.6+k3s1.iso and burning it to an usb stick
Im inserting the stick and booting from it (latte panda delta 3 -> x86_64 with build in eMMC). Stick is booting and I'm getting the qr code.
I'm using the webui (ip:8080) to install on the build in eMMC (/dev/mmcblk1), pasting my cloud_config and checking reboot
When it restarts, I remove the usb stick so it tries to boot from the eMMC (sd card). Here the out of memory error of grub appears

the grub.cfg on the USB stick is much shorter than the one written by the installer on the eMMC (= sd card). the grub configuration on the usb stick always works the one on the sd card never.
I tried to modify the one on the sd card by inserting set gfxmode=640x480 at different places, it changes the behavior BUT none of the attempts lead to booting kairos...

Also faced out of memory (OOM) issues when trying to install on old Acer Aspire1 laptop (4G ram & mmc). Bisected to loopback command that cases OOM. Suggestions on SO are to copy kernel & initrc from image to disk. Don't have progress as I am still learning grub...

Also faced out of memory (OOM) issues when trying to install on old Acer Aspire1 laptop (4G ram & mmc). Bisected to loopback command that cases OOM. Suggestions on SO are to copy kernel & initrc from image to disk. Don't have progress as I am still learning grub...

Enabling debugging with set debug=all let me pass through loopback - different error (not OOM). In debug I noticed that tpm module is used, so I turned off TPM in BIOS and kairos started successfully. Although I am unblocked, it is not clear what was the root cause. If it was indeed the lack of memory and TPM use just crossed a bar, then reducing memory foot print makes sense: use text mode by default, test with large images etc

I'll describe the process from the beginning:
1. I'm downloading `kairos-standard-opensuse-leap-amd64-generic-v2.4.1-k3sv1.26.6+k3s1.iso` and burning it to an usb stick

2. Im inserting the stick and booting from it (latte panda delta 3 -> x86_64 with build in eMMC). Stick is booting and I'm getting the qr code.

3. I'm using the webui (ip:8080) to install on the build in eMMC (/dev/mmcblk1), pasting my cloud_config and checking reboot

4. When it restarts, I remove the usb stick so it tries to boot from the eMMC (sd card). Here the out of memory error of grub appears

the grub.cfg on the USB stick is much shorter than the one written by the installer on the eMMC (= sd card). the grub configuration on the usb stick always works the one on the sd card never.
I tried to modify the one on the sd card by inserting set gfxmode=640x480 at different places, it changes the behavior BUT none of the attempts lead to booting kairos...

yep, this makes sense. Our grub.cfg for livecd does not have the gfxmode set, so it makes sense that on livecd/usb/live mode you do not hit this, its only once you restart from the installed system, then you hit this issue as we set the set gfxmode=auto
Let me test this somehow. Maybe I can make virtualbox reproduce it by setting the video card to a very low amount of ram or something similar....

Also faced out of memory (OOM) issues when trying to install on old Acer Aspire1 laptop (4G ram & mmc). Bisected to loopback command that cases OOM. Suggestions on SO are to copy kernel & initrc from image to disk. Don't have progress as I am still learning grub...

Enabling debugging with set debug=all let me pass through loopback - different error (not OOM). In debug I noticed that tpm module is used, so I turned off TPM in BIOS and kairos started successfully. Although I am unblocked, it is not clear what was the root cause. If it was indeed the lack of memory and TPM use just crossed a bar, then reducing memory foot print makes sense: use text mode by default, test with large images etc

very weird, 4Gb of ram should be more than enough for everything to load with no issues, after all the kernel and initrd cant be more than 200Mb in any of the flavors....
Wondering if its due to the modules or the gfx stuff in your case as well....

So I disabled TPM from BIOS (Thanks @AndreyNikiforov !)
I did a clean install of 2.4.1 from USB.
On first boot of the internal eMMC:

pressed a key, booting continuous

The above errors don't look scary to see...
After this it looks like it works...

Some comments found going trougth teh grub bugtracker:
Finally I found a comment regarding the screen size and GRUB. Apparently the 4k graphics size eats half the available 200MB RAM from GRUBs allotment. Thus any initrd.img larger than 100MB won't load.

Looks like TPM module is indeed involved! https://github.com/rhboot/grub2/pull/102
So https://github.com/rhboot/grub2/commit/635f85b016839b9aaecdecee69a2ee98edb3e0ab was supposed to allow initrds to be allocated over 4GB. However, initrds are also being verified by the verifiers framework, or rather the tpm "verifier" measures them this way.

This causes the verifiers framework to read the entire file into memory first using standard memory allocation to verify it and then release it again before our allocator gets a chance to load the size and allocate it. This is um bad.

So it makes sense that disabling tpm makes it work as it doesnt try to fully load the initrd into memory for measure.
So it seems to be a mix of several things:

gfxterm set to auto (This exhausts memory if output is a 4k stream)
tpm trying to load initrd fully into memory
grub not able to see and map the full memory needed

HAve to think about this and check further in upstream grubs to see if this has been fixed somewhere but good catch folks.
Thanks @Ognian for reporting this and @AndreyNikiforov for the hint with the TPM. This would have been a nigthmare to track down otherwise!

our kernel on core images is around 13Mb
our initrd on core images is around 92/96Mb
It kind of makes sense that we go over that mentioned 100Mb by setting the gfx mode to auto if it choses a very high resolution....

By moving to compressing the initramfs with zstd it would gain us 4 extra Mb, which is not much, but its good enough to breathe I guess
@Ognian does this happen with a non-k3s build? If it also happens, are you able to build a custom image with the --zstd flag on initrd creation to see if it alleviates the issue?
The patch is as follows, its just 1 line:
diff --git a/Earthfile b/Earthfile
index b22b8c8..61eb545 100644
--- a/Earthfile
+++ b/Earthfile
@@ -441,7 +441,7 @@ base-image:
       IF [ -e "/usr/bin/dracut" ]
           # Regenerate initrd if necessary
           RUN --no-cache kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}"
-          RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd
+          RUN --no-cache kernel=$(ls /lib/modules | head -n1) && dracut --zstd -f "/boot/initrd${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd
       END
     END

And then simply run earthly +iso --FLAVOR=opensuse-leap --VARIANT=standard --K3S_VERSION=v1.26.6 to generate an iso under build

umm booting from master in 4k doesnt result in the issue being reproduced, even with tpm. Im wondering if its a tpm implementation issue rather than a grub one. We dont ship the tpm module with grub as a module so not sure if its integrated into grub directly.
I think we need to rework the grub.cfg to not load the gfxterm for now unless its needed as its giving us a lot of headaches.

We dropped gfxterm here: https://github.com/kairos-io/packages/pull/473 . Please give it a try if the problem still occurs feel free to re-open.

I'm running into the same problem using kairos-standard-ubuntu-22-lts-amd64-generic-v2.4.1-k3sv1.27.3+k3s1.iso. I also built from master, thinking that would pull in the changes from https://github.com/kairos-io/packages/pull/473 (and I think it did because I my grub.cfg is now missing all the gfx stuff), but have the same result. I didn't have success disabling TPM either.

Just as another data point, I'm testing on a Microsoft Surface Pro 7+ and getting this on the latest ubuntu-20.04-v2.4.2 and still am seeing grub OOM. If there's anything I can help, test I'd be happy to!

Up to now it seems that to reproduce this issue one needs:

gfxmode set to auto
a 4k monitor (to make the above use a high resolution). Maybe 2k will also trigger it, not sure
a TPM chip on the machine
uefi booting

and we still miss something because @Itxaka tried the above combination and couldn't reproduce. His test was on qemu with virtual monitors though so maybe that's the reason (but grub thought the resolution was 4k)

Up to now it seems that to reproduce this issue one needs:

gfxmode set to auto
a 4k monitor (to make the above use a high resolution). Maybe 2k will also trigger it, not sure
a TPM chip on the machine
uefi booting

I've looked for a way to disable TPM on the Surface Pro, but I don't think that is an available setting in its boot menu. What's the best way to test setting the gfxmode to a lower resolution in Kairos?

I would try this (warning: not tested):

Boot into livecd and when you see the grub menu, hit c to get to the grub console
As per the grub docs, run videoinfo to find supported resolutions
Set gfxmode to the desired resolution in the Kairos config, as per the kairos docs: https://kairos.io/docs/reference/configuration/#grub-options

Hopefully that should set the gfxmode on the installed system's grub. You can ofcourse check, after installation by editing the grub menu again and looking for that option.

I know you said to use the live CD but I rebooted a node and tried running videoinfo in the GRUB prompt, it said the command was not found. I tried different combinations of set gfxmode= and set gfxpayload= in the custom one-time GRUB options and none of them prevented the error. It also seemed like none of them changed the video. For what it's worth, here's my config

@santhoshdaivajna sent me on Slack that they are seeing the same issue on Intel NUC with  8 cpu/32G mem/>500G disk . We may be able to get access to a NUC to debug.

maybe it's just the GRUB version causing issues here?  @Ognian is that new to 2.4? we could cross check the GRUB versions to see if that's causing it

we think that the tumbleweed grub efi binary is the responsible of this and have reverted the change to use the leap one on https://github.com/kairos-io/packages/pull/553

@Itxaka Thanks for looking into this! Will this also help the ubuntu flavors, or is this specific to opensuse?

Should be for all, as we use the same grub artifacts for all of them

Unfortunately, the Surface Pro 7+ doesn't allow TPM disable 😕 Is my next option switch dracut to host only=yes maybe? @Ognian are you running the grub2-install inside the the new container there? Thanks!
…
On Sat, Dec 2, 2023, 11:26 AM Ognian @.> wrote: Yes this was new with maybe it's just the GRUB version causing issues here? @Ognian https://github.com/Ognian is that new to 2.4? we could cross check the GRUB versions to see if that's causing it yes, this was newly introduced with 2.4. I just tested with 2.4.1 and upgraded to 2.4.2 and the result is with 2.4.2 as it was with 2.4.1 and 2.4.0: with TPM -> out of memory error; without TPM -> boots OK The last version I tested where it worked was v2.2.1 The version I have now is: KAIROS_PRETTY_NAME="kairos-standard-opensuse-leap-15.5 v2.4.2-k3sv1.28.2+k3s1" and sudo grub2-install --version grub2-install (GRUB2) 2.06 Hope this helps. Ognian — Reply to this email directly, view it on GitHub <#1842 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFOOWNDV4DB34L3HTYKIH3YHNQDHAVCNFSM6AAAAAA5BXH3WOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGIYDQNZSGA . You are receiving this because you commented.Message ID: @.>

Yes

Just tested @alexander-bauer 's workaround of rmmod tpm on ubuntu-20.04 and it does indeed allow my system to boot, so seems to be related to TPM for me as well.

@alexander-bauer I found an option that is a bit more robust to remove the tpm module from the grub.cfg.
Create a Dockerfile:
Pick your favorite Kairos image (e.g., ubuntu:20.04).
FROM quay.io/kairos/ubuntu:20.04-standard-amd64-generic-v2.4.2-k3sv1.28.2-k3s1

RUN sed -i '/insmod regexp/a rmmod tpm' /etc/cos/grub.cfg

Build the image:
docker build -t tpm2workaround -f Dockerfile .

Deploy with auroraboot:
For example, generate an ISO:
docker run --rm -ti \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(pwd)/config.yaml:/config.yaml \
  -v $(pwd)/build:/tmp/auroraboot \
  quay.io/kairos/auroraboot \
  --set "container_image=docker://tpm2workaround" \
  --set "disable_http_server=true" \
  --set "disable_netboot=true" \
  --set "state_dir=/tmp/auroraboot" \
  --cloud-config /config.yaml

@Itxaka or @mudler might know of an easier way to override this using one of cloud-init stages, I tried after-install-chroot and before-install, but neither of those seemed to work.
Hope that helps until we get a more permanent fix!

Here I can reproduce it as well with rc3 and VirtualBox (ubuntu image)

Here I can reproduce it as well with rc3 and VirtualBox (ubuntu image: kairos-ubuntu-22.04-standard-amd64-generic-v2.4.3-rc3-k3sv1.28.2+k3s1.iso)

seems it was just me - recreating the VM with more RAM did the trick

Could also try the rc3 that we released yesterday to see if it fixes it, as we reverted the grub.efi to a different one which used to work!

I tested with quay.io/kairos/ubuntu:20.04-standard-amd64-generic-v2.4.3-rc3-k3s1.28.2-1, and that worked for the Surface Pro 7+! Many thanks @Itxaka!


[opencv3] build failure

Operating system
x64-linux
Compiler
No response
Steps to reproduce the behavior
`vcpkg install opencv3`

Failure logs
issue_body.md
Additional context
No response

../src/glib-2-7cc53588e0.clean/meson.build:2330:0: ERROR: <PythonExternalProgram 'python' -> ['/usr/bin/python3']> is not a valid python or it is missing distutils

You need install python3 and may also need python3-distutils.

../src/glib-2-7cc53588e0.clean/meson.build:2330:0: ERROR: <PythonExternalProgram 'python' -> ['/usr/bin/python3']> is not a valid python or it is missing distutils

You need install python3 and may also need python3-distutils.

I have installed package python3-distutils. And this the new error log file.
issue_body.md

ERROR: Dependency "xrandr" not found, tried pkgconfig and cmake

Try run sudo apt install libxrandr-dev. :)

Thank you for your help and quick response. The question is solved now. I installed several additional packages to support the opencv3 installation in the same way after installing that package based on your reply. In my case, for a new ubuntu20.04 system, the following packages needs to be installed before installing opencv3 using Vcpkg:
sudo apt-get install python3-distutils
sudo apt install libxrandr-dev
sudo apt-get install -y libxi-dev
sudo apt install libxcursor-dev
sudo apt-get install -y libxdamage-dev
sudo apt-get install -y libxinerama-dev


deserialize_with callback doesn't get called on Option values, fails with an error "missing field"

I reproduced the issue here: https://github.com/vjancik/serde_bug/blob/main/src/main.rs
The output is:
Error: Error { inner: ErrorInner { kind: Custom, line: Some(0), col: 0, at: Some(0), message: "missing field `optional`", key: [] } }

and line:24 never executes...
Am I using the API wrong?
But there doesn't seem to be any other possible definition of the callback function.

By default, serde accepts a missing field if the type of the field is Option<_>. If you add a with or deserialize_with attribute serde will fail with the "missing field" error message, as you noticed. This is on purpose. You can change what happens on missing fields with the default attribute, either applied to the field in question or the whole struct.

By default, serde accepts a missing field if the type of the field is Option<_>. If you add a with or deserialize_with attribute serde will fail with the "missing field" error message, as you noticed. This is on purpose. You can change what happens on missing fields with the default attribute, either applied to the field in question or the whole struct.

Thank you, I missed that.
So then the correct implementation for the deserialize_with on an Option<T> would be not to call deserialize_option(...) but deserialize_<T> for the corresponding "present" data type?

Thank you, I missed that.
So then the correct implementation for the deserialize_with on an Option<T> would be not to call deserialize_option(...) but deserialize_<T> for the corresponding "present" data type?

@vjancik Either behavior can be the correct. It really depends on what you want to achieve.

@vjancik Either behavior can be the correct. It really depends on what you want to achieve.


Use Ubuntu Condensed font everywhere

Even though the previous font (Opensans Hebrew Condensed) was easy on
the eyes, it lacks most if the latin-ext glyphs, resulting some of the
locales simply unreadable.
I've tried EncodeSans, which looks like Ubuntu and has much more styles
(thin, condensed, compressed, narrow etc.), it is still wider than
Ubuntu and makes the words collapse each other for small screen estates.

We'll test that

Sure, let me know if I can help.

Works very good pal. Good choice for the font, it also have simplified chinese

Next beta with 3 new languages supported !

Awesome, glad to hear that!


[Feacture Request] An option to only enable display when there are available canvas (ios)

as the title says, it may be useful for those has duel monitors!
Whenever there is a monitor connected before starts, the VM enables another display, as I think it is impossible to do it dynamically.

Isn’t this already done? If you have two displays configured in the VM settings, and an external display attached, it should start up with both?

Will, I mean “enable”. It costs(performance) a lot to maintain a display (especially windows which doesn’t  have 3d accl). It will kept disable when no external display is attached


BOT-T9N-WiFi&RC9Plus thermostat

I would like to request Home Assistant tuya local full support for this RF and Wifis thermostat.

Could I request support for this particular device (BOT-T9N)?


How should I write this Registry address, can I write an example and put it on it?

For registry you should use something like docker://
For example: docker://gcr.io/something/imagem:tag
Em dom., 9 de abr. de 2023 11:00,<PHONE_NUMBER> @.***>
escreveu:

[image: image]
https://user-images.githubusercontent.com/46311200/230780160-c4532f05-8623-49fc-a598-c770e501043e.png
[image: image]
https://user-images.githubusercontent.com/46311200/230780245-cca61942-b9b6-4813-bb56-bc502a0983b2.png
—
Reply to this email directly, view it on GitHub
https://github.com/kubevirt-manager/kubevirt-manager/issues/33, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJZYKCARC2V6VAJBDBA4JX3XALFIDANCNFSM6AAAAAAWYFCXDI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Can you add a server that can use Nodeport to bind the virtual machine?

You mean on the Load Balancer screen?
Em seg., 10 de abr. de 2023 03:40,<PHONE_NUMBER> @.***>
escreveu:

Can you add a server that can use Nodeport to bind the virtual machine?
—
Reply to this email directly, view it on GitHub
https://github.com/kubevirt-manager/kubevirt-manager/issues/33#issuecomment-1501507459,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJZYKCHKPZY3ULYBOUM2I2DXAO2PFANCNFSM6AAAAAAWYFCXDI
.
You are receiving this because you commented.Message ID:
@.***>

Add Service to the configuration and use nodeport to associate virtual machines for easy management
发自我的iPhone
------------------ Original ------------------
From: Marcelo Feitoza Parisi @.>
Date: Mon,Apr 10,2023 7:26 PM
To: kubevirt-manager/kubevirt-manager @.>
Cc:<PHONE_NUMBER> @.>, Author @.>
Subject: Re: [kubevirt-manager/kubevirt-manager] How should I write thisRegistry address, can I write an example and put it on it? (Issue #33)
You mean on the Load Balancer screen?
Em seg., 10 de abr. de 2023 03:40,<PHONE_NUMBER> @.***>
escreveu:
> Can you add a server that can use Nodeport to bind the virtual machine?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/kubevirt-manager/kubevirt-manager/issues/33#issuecomment-1501507459>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJZYKCHKPZY3ULYBOUM2I2DXAO2PFANCNFSM6AAAAAAWYFCXDI>
> .
> You are receiving this because you commented.Message ID:
> @.***>
>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Adding a NodePort is a feature request, and as I'm working on this alone, this may take some time. Would you please open a different issue for that, so that I can mark it as a feature request?
Thanks!


BDD PrintMinterm

Hi,
How could I display the content of a BDD?

Hi there,
you should be able to see the contents of the BDD by calling:
manager.Display(dd)
with the decision diagram manager object and the BDD you want to print. Of course, the result will be hard to understand since the nodes are numbered by allocation order.


执行 pnpm install  报错 ERR_PNPM_INVALID_OVERRIDE_SELECTOR

ERR_PNPM_INVALID_OVERRIDE_SELECTOR  Cannot parse the "//" selector in the overrides

Me too

回退版本到6.23.6可以解决这个问题，貌似是Pnpm的bug,Pnpm issue

That's not a pnpm bug, but "bug" inside package.json, which contains key-value as comment:
https://github.com/anncwb/vue-vben-admin/blob/b0a0cbcd6a67ed290dfd84c4e46af55ccf90132d/package.json#L150
So, there're two options:

downgrade pnpm to 6.23.6 (npm install -g<EMAIL_ADDRESS>open PR which removes this invalid string inside package.json

resolutions object inside package.json is used by Yarn:
https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days


The link to the C# 6 spec should point to the ECMA spec

The C# 6 standard has been approved and published by ECMA. That link should be updated.
As part of this doc set, we're now publishing the working draft for C# 7. That can be updated as well.

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

ID: e548e000-8190-b1bb-51fd-7e7b2d5bcb45
Version Independent ID: 19f59267-c4c1-eb0e-7e48-45ffd6e2d9d1
Content: C# Compiler Options - language feature rules
Content Source: docs/csharp/language-reference/compiler-options/language.md
Product: dotnet-csharp
Technology: csharp-language-reference
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Associated WorkItem - 30714


Search widget

Hi guys,
I tried the search widget but, even following the examples, I could not make it work.
If I type something it shows me nothing.
If you want to check, it is in http://www.fabrizziosoares.me
Thanks for all

Please use https://discourse.gohugo.io/ for questions/troubleshooting. Also see  Hugo Documentation.


Commander Context Guild is null

Describe the bug
When accessing the guild from the context of a command from Commander, it returns null
To Reproduce
final bot = Nyxx([Token], GatewayIntents.allUnprivileged);
var c = Commander(bot, prefix: '%');

var cGroup = CommandGroup(name: 'commandGroup', aliases: ['q']);

cGroup.registerSubCommand('subCommand', (context, message) => {
        context.sendMessage(MessageBuilder.content('Some Text : ${context.guild.id.toString()}')),  // <- Fails due to guild == null;
});

Expected behavior
I should be able to access the guild information
Desktop (please complete the following information):

OS: macOS 11.4 (20F71)
OS: Ubuntu 16.04.7 LTS (gcloud)
Dart version: 2.14.0-48.0.dev
Nyxx version
nyxx: ^2.0.0-rc.10
nyxx_commander: ^2.0.0-rc.10
nyxx_interactions: ^2.0.0-rc.13

Additional context
The bot has Administrator permissions.
This was working on older versions of Nyxx
I can access other properties of context, such as message just fine

Thanks, looking into now. Will try repro :)

Ok this is the designed behaviour see:
https://github.com/l7ssha/nyxx/blob/dev/nyxx_commander/lib/src/CommandContext.dart#L15
https://github.com/l7ssha/nyxx/blob/dev/nyxx_commander/lib/src/Commander.dart#L119
The guild on the context is nullable and in the commander it tries to get the guild from cache only if not found returning null which means the guild must not be in your cache. If you get the message and do:
final bot = Nyxx([Token], GatewayIntents.allUnprivileged);
var c = Commander(bot, prefix: '%');

var cGroup = CommandGroup(name: 'commandGroup', aliases: ['q']);

cGroup.registerSubCommand('subCommand', (context, message) => {
        final guild = await context.message.guild.getOrDownload()
        context.sendMessage(MessageBuilder.content('Some Text : ${guild.id.toString()}')),
});

That should work for you.

Ok this is the designed behaviour see:
https://github.com/l7ssha/nyxx/blob/dev/nyxx_commander/lib/src/CommandContext.dart#L15
https://github.com/l7ssha/nyxx/blob/dev/nyxx_commander/lib/src/Commander.dart#L119
The guild on the context is nullable and in the commander it tries to get the guild from cache only if not found returning null which means the guild must not be in your cache. If you get the message and do:
final bot = Nyxx([Token], GatewayIntents.allUnprivileged);
var c = Commander(bot, prefix: '%');

var cGroup = CommandGroup(name: 'commandGroup', aliases: ['q']);

cGroup.registerSubCommand('subCommand', (context, message) => {
        final guild = await context.message.guild.getOrDownload()
        context.sendMessage(MessageBuilder.content('Some Text : ${guild.id.toString()}')),
});

That should work for you.

"The getter 'guild' isn't defined for the type 'Message'.
Try importing the library that defines 'guild', correcting the name to the name of an existing getter, or defining a getter or field named 'guild'."
I can't directly do context.guild.getOrDownload() either.
Checking the Message class there's no field for guild, but there is for GuildMessage which I'm assuming is the class that's supposed to be used there? In which case context.message isn't returning the correct class?

You need to check if the .message is a guild message if it is cast it to a GuildMessage

Is it intended for messages sent by webhooks to be registered as a DM?
_CastError (type 'DMMessage' is not a subtype of type 'GuildMessage' in type cast)
All my issues seem to really come down to this. The same message sent by a user works just fine.

Is it intended for messages sent by webhooks to be registered as a DM?
its just like that because guild id wasnt sent with message payload. Naming maybe is a little unfortunate in that case, but it comes down to that message doesn't have any guild info, besides that it was sent in guild

Is this an issue from Discord's side then? The guild info should be included with the registered webhook from their end, not with the request. A simple JSON like
{"content": "%springbok"} should work?

guild_id in message in optional (https://discord.com/developers/docs/resources/channel#message-object-message-structure) so nothing we can do really.

The guild info should be included with the registered webhook from their end, not with the request. A simple JSON like
{"content": "%springbok"} should work?

I dont really understand about what are you talking there. Seems like out of scope of this issue

Is this an issue from Discord's side then? The guild info should be included with the registered webhook from their end, not with the request. A simple JSON like
{"content": "%springbok"} should work?

This dosen't make any sense, Unless you have a docs link to explain what you are trying to explain?

Closing for off topic, but here's a docs page to what I'm trying to explain.
The webhook in Discord is already registered to a guild and a channel, what I don't understand is why this info is no longer readable by the library (it used to be)


Release next version to Rubygems

Just a checklist so that I don't forget anything

[x] make sure change log is up to date with all user impacting changes
[x] determine if this should be a patch or minor release
[x] bump version file
[x] tag release
[x] get a sanity check from @waldyr
[x] push to rubygems
[x] notify all related issues / PRs and close were appropriate

I think #226 and #200 warrant a minor bump. Also there were quite a few changes made before I came on board which are not linked to any pull request in the change log, so this reinforces the need. I'm guessing they were not major or they would have ended up on the 2.0.0 branch.

@waldyr are you able to sanity check everything for me when you get a chance?
I updated the version files, changelog and tagged the last commit.

Everything listed was addressed. Nice work @gerrywastaken 👍

Released 1.7.0 to Rubygems so I'm closing this.
If you commenting to alert of an issue caused by this release, please tag me in your comment to make sure I get notified.


ParseError: Required keyword: 'this' missing for <class 'sqlglot.expressions.EQ'>

What happens?
Hi,
I am trying to run the spark example: https://moj-analytical-services.github.io/splink/demos/examples/spark/deduplicate_1k_synthetic.html and the error I am getting is: ParseError: Required keyword: 'this' missing for <class 'sqlglot.expressions.EQ'>. Line 1, Col: 65.
l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1
Any ideas on what is going wrong and what I can do about it? Thank you!!
Sincerely,
tom
To Reproduce
%pip install pyspark pyspark==3.4.1
#%pip install pyspark
%pip install --upgrade --force-reinstall pyarrow
%pip install pyodbc
%pip install duckdb
%pip install splink
%pip install usaddress
%pip install nbformat
import pyodbc
import os
import pandas as pd
import re
import usaddress
import time
from pyspark.sql import SparkSession
import pyspark.sql.functions as pyfuncs
from pyspark.sql.types import *
from pyspark.sql import Window
from splink.spark.jar_location import similarity_jar_location
path = similarity_jar_location()
print('create spark sesh')
spark = SparkSession
.builder
.appName("tomssplinktest")
.config("spark.master", "spark://ddlas01.hosted.lac.com:7077")
.config("spark.executor.memory", "45g")
.config("spark.driver.memory", "10g")
.config('spark.executor.cores', '1')
.config('spark.cores.max', '8')
.config('spark.executor.instances', '1')
.config('spark.jars', path)
.config('spark.sql.parquet.int96RebaseModeInWrite', "CORRECTED")
.getOrCreate()
print("created spark sesh!")
Disable warnings for pyspark - you don't need to include this
import warnings
spark.sparkContext.setLogLevel("ERROR")
warnings.simplefilter("ignore", UserWarning)
from splink.datasets import splink_datasets
pandas_df = splink_datasets.fake_1000
df = spark.createDataFrame(pandas_df)
import splink.spark.comparison_library as cl
import splink.spark.comparison_template_library as ctl
from splink.spark.blocking_rule_library import block_on
settings = {
"link_type": "dedupe_only",
"comparisons": [
ctl.name_comparison("first_name"),
ctl.name_comparison("surname"),
ctl.date_comparison("dob", cast_strings_to_date=True),
cl.exact_match("city", term_frequency_adjustments=True),
ctl.email_comparison("email", include_username_fuzzy_level=False),
],
"blocking_rules_to_generate_predictions": [
block_on("first_name"),
"l.surname = r.surname",  # alternatively, you can write BRs in their SQL form
],
"retain_matching_columns": True,
"retain_intermediate_calculation_columns": True,
"em_convergence": 0.01
}
from splink.spark.linker import SparkLinker
linker = SparkLinker(df, settings, spark=spark)
deterministic_rules = [
"l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1",
"l.surname = r.surname and levenshtein(r.dob, l.dob) <= 1",
"l.first_name = r.first_name and levenshtein(r.surname, l.surname) <= 2",
"l.email = r.email"
]
linker.estimate_probability_two_random_records_match(deterministic_rules, recall=0.6)
OS:
linux
Splink version:
most recent pypi version
Have you tried this on the latest master branch?

[X] I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

[X] I agree

This seems to be an error originating from sqlglot somehow.
Would you be able to post the version of sqlglot you have installed (and other package versions)? And the full error stacktrace?

 Bad dates
e.g. 1999-13-54 will not trigger an exception but will
classed as comparison level = "ELSE". Ensure date strings
are cleaned to remove bad dates
Unable to load custom Spark SQL functions such as jaro_winkler from the jar that's provided with Splink.
You need to ensure the Splink jar is registered.
See https://moj-analytical-services.github.io/splink/demos/example_simple_pyspark.html for an example.
You will not be able to use these functions in your linkage.
You can find the location of the jar by calling the following function:
from splink.spark.jar_location import similarity_jar_location
Full error:
Can not load class uk.gov.moj.dash.linkage.JaroSimilarity, please make sure it is on the classpath.

ParseError                                Traceback (most recent call last)
Cell In[25], line 38
30 linker = SparkLinker(df_spark, settings, spark=spark)
31 deterministic_rules = [
32     "l.First_Name = r.First_Name and levenshtein(r.DOB, l.DOB) <= 1",
33     "l.Last_Name = r.Last_Name and levenshtein(r.DOB, l.DOB) <= 1",
34     "l.First_Name = r.First_Name and levenshtein(r.Last_Name, l.Last_Name) <= 2",
35     "l.email = r.email"
36 ]
---> 38 linker.estimate_probability_two_random_records_match(deterministic_rules, recall=0.6)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/linker.py:3695, in Linker.estimate_probability_two_random_records_match(self, deterministic_matching_rules, recall)
3692 if isinstance(deterministic_matching_rules, str):
3693     deterministic_matching_rules = [deterministic_matching_rules]
-> 3695 records = cumulative_comparisons_generated_by_blocking_rules(
3696     self,
3697     deterministic_matching_rules,
3698 )
3700 summary_record = records[-1]
3701 num_observed_matches = summary_record["cumulative_rows"]
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/analyse_blocking.py:86, in cumulative_comparisons_generated_by_blocking_rules(linker, blocking_rules, output_chart, return_dataframe)
83     cartesian = calculate_cartesian(row_count_df, settings_obj._link_type)
85 # Calculate the total number of rows generated by each blocking rule
---> 86 sql_infos = block_using_rules_sqls(linker)
87 for sql_info in sql_infos:
88     linker._enqueue_sql(sql_info["sql"], sql_info["output_table_name"])
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/blocking.py:542, in block_using_rules_sqls(linker)
539 br_sqls = []
541 for br in blocking_rules:
--> 542     sql = br.create_blocked_pairs_sql(linker, where_condition, probability)
543     br_sqls.append(sql)
545 sql = " UNION ALL ".join(br_sqls)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/blocking.py:112, in BlockingRule.create_blocked_pairs_sql(self, linker, where_condition, probability)
111 def create_blocked_pairs_sql(self, linker: Linker, where_condition, probability):
--> 112     columns_to_select = linker._settings_obj._columns_to_select_for_blocking
113     sql_select_expr = ", ".join(columns_to_select)
115     sql = f"""
116         select
117         {sql_select_expr}
(...)
125         {self.exclude_pairs_generated_by_all_preceding_rules_sql(linker)}
126         """
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/settings.py:222, in Settings._columns_to_select_for_blocking(self)
219 cols = []
221 for uid_col in self._unique_id_input_columns:
--> 222     cols.append(uid_col.l_name_as_l)
223     cols.append(uid_col.r_name_as_r)
225 for cc in self.comparisons:
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/input_column.py:256, in InputColumn.l_name_as_l(self)
254 @property
255 def l_name_as_l(self) -> str:
--> 256     alias = self.unquote().name_l
257     return replace(self.col_builder, table="l", alias=alias).sql
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/input_column.py:219, in InputColumn.unquote(self)
218 def unquote(self) -> InputColumn:
--> 219     self_copy = deepcopy(self)
220     b = replace(self_copy.col_builder, quoted=False)
221     self_copy.col_builder = b
File ~/miniforge3/envs/tomenv/lib/python3.11/copy.py:172, in deepcopy(x, memo, _nil)
170                 y = x
171             else:
--> 172                 y = _reconstruct(x, memo, *rv)
174 # If is its own copy, don't memoize.
175 if y is not x:
File ~/miniforge3/envs/tomenv/lib/python3.11/copy.py:271, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
269 if state is not None:
270     if deep:
--> 271         state = deepcopy(state, memo)
272     if hasattr(y, 'setstate'):
273         y.setstate(state)
File ~/miniforge3/envs/tomenv/lib/python3.11/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146     y = copier(x, memo)
147 else:
148     if issubclass(cls, type):
File ~/miniforge3/envs/tomenv/lib/python3.11/copy.py:231, in _deepcopy_dict(x, memo, deepcopy)
229 memo[id(x)] = y
230 for key, value in x.items():
--> 231     y[deepcopy(key, memo)] = deepcopy(value, memo)
232 return y
File ~/miniforge3/envs/tomenv/lib/python3.11/copy.py:153, in deepcopy(x, memo, _nil)
151 copier = getattr(x, "deepcopy", None)
152 if copier is not None:
--> 153     y = copier(memo)
154 else:
155     reductor = dispatch_table.get(cls)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/settings.py:87, in Settings.deepcopy(self, memo)
83 def deepcopy(self, memo) -> Settings:
84     """When we do EM training, we need a copy of the Settings which is independent
85     of the original e.g. modifying the copy will not affect the original.
86     This method implements ensures the Settings can be deepcopied."""
---> 87     cc = Settings(self.as_dict())
88     return cc
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/settings.py:80, in Settings.init(self, settings_dict)
76 self._warn_if_no_null_level_in_comparisons()
78 self._additional_cols_to_retain = self._get_raw_additional_cols_to_retain
79 self._additional_columns_to_retain_list = (
---> 80     self._get_additional_columns_to_retain()
81 )
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/settings.py:129, in Settings._get_additional_columns_to_retain(self)
126 used_by_brs = []
127 for br in self._blocking_rules_to_generate_predictions:
128     used_by_brs.extend(
--> 129         get_columns_used_from_sql(br.blocking_rule_sql, br.sql_dialect)
130     )
132 used_by_brs = [InputColumn(c) for c in used_by_brs]
134 used_by_brs = [c.unquote().name for c in used_by_brs]
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/splink/parse_sql.py:12, in get_columns_used_from_sql(sql, dialect, retain_table_prefix)
10 def get_columns_used_from_sql(sql, dialect=None, retain_table_prefix=False):
11     column_names = set()
---> 12     syntax_tree = sqlglot.parse_one(sql, read=dialect)
14     for subtree in syntax_tree.find_all(exp.Column):
15         # check if any parents are lambdas
16         parent = subtree.parent
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/init.py:125, in parse_one(sql, read, dialect, into, **opts)
123     result = dialect.parse_into(into, sql, **opts)
124 else:
--> 125     result = dialect.parse(sql, **opts)
127 for expression in result:
128     if not expression:
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/dialects/dialect.py:311, in Dialect.parse(self, sql, **opts)
310 def parse(self, sql: str, **opts) -> t.List[t.Optional[exp.Expression]]:
--> 311     return self.parser(**opts).parse(self.tokenize(sql), sql)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:986, in Parser.parse(self, raw_tokens, sql)
972 def parse(
973     self, raw_tokens: t.List[Token], sql: t.Optional[str] = None
974 ) -> t.List[t.Optional[exp.Expression]]:
975     """
976     Parses a list of tokens and returns a list of syntax trees, one tree
977     per parsed SQL statement.
(...)
984         The list of the produced syntax trees.
985     """
--> 986     return self._parse(
987         parse_method=self.class._parse_statement, raw_tokens=raw_tokens, sql=sql
988     )
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:1052, in Parser._parse(self, parse_method, raw_tokens, sql)
1049 self._tokens = tokens
1050 self._advance()
-> 1052 expressions.append(parse_method(self))
1054 if self._index < len(self._tokens):
1055     self.raise_error("Invalid expression / Unexpected token")
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:1241, in Parser._parse_statement(self)
1238 if self._match_set(Tokenizer.COMMANDS):
1239     return self._parse_command()
-> 1241 expression = self._parse_expression()
1242 expression = self._parse_set_operations(expression) if expression else self._parse_select()
1243 return self._parse_query_modifiers(expression)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:3175, in Parser._parse_expression(self)
3174 def _parse_expression(self) -> t.Optional[exp.Expression]:
-> 3175     return self._parse_alias(self._parse_conjunction())
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:3178, in Parser._parse_conjunction(self)
3177 def _parse_conjunction(self) -> t.Optional[exp.Expression]:
-> 3178     return self._parse_tokens(self._parse_equality, self.CONJUNCTION)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:4840, in Parser._parse_tokens(self, parse_method, expressions)
4837 def _parse_tokens(
4838     self, parse_method: t.Callable, expressions: t.Dict
4839 ) -> t.Optional[exp.Expression]:
-> 4840     this = parse_method()
4842     while self._match_set(expressions):
4843         this = self.expression(
4844             expressions[self._prev.token_type],
4845             this=this,
4846             comments=self._prev_comments,
4847             expression=parse_method(),
4848         )
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:3181, in Parser._parse_equality(self)
3180 def _parse_equality(self) -> t.Optional[exp.Expression]:
-> 3181     return self._parse_tokens(self._parse_comparison, self.EQUALITY)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:4843, in Parser._parse_tokens(self, parse_method, expressions)
4840 this = parse_method()
4842 while self._match_set(expressions):
-> 4843     this = self.expression(
4844         expressions[self._prev.token_type],
4845         this=this,
4846         comments=self._prev_comments,
4847         expression=parse_method(),
4848     )
4850 return this
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:1116, in Parser.expression(self, exp_class, comments, **kwargs)
1114 instance = exp_class(**kwargs)
1115 instance.add_comments(comments) if comments else self._add_comments(instance)
-> 1116 return self.validate_expression(instance)
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:1136, in Parser.validate_expression(self, expression, args)
1134 if self.error_level != ErrorLevel.IGNORE:
1135     for error_message in expression.error_messages(args):
-> 1136         self.raise_error(error_message)
1138 return expression
File ~/miniforge3/envs/tomenv/lib/python3.11/site-packages/sqlglot/parser.py:1096, in Parser.raise_error(self, message, token)
1084 error = ParseError.new(
1085     f"{message}. Line {token.line}, Col: {token.col}.\n"
1086     f"  {start_context}\033[4m{highlight}\033[0m{end_context}",
(...)
1092     end_context=end_context,
1093 )
1095 if self.error_level == ErrorLevel.IMMEDIATE:
-> 1096     raise error
1098 self.errors.append(error)
ParseError: Required keyword: 'this' missing for <class 'sqlglot.expressions.EQ'>. Line 1, Col: 65.
l.First_Name = r.First_Name and levenshtein(r.DOB, l.DOB) <= 1
Thank you!!
tom

I've run this with the deterministic rules list and the same version of sqlglot, and I don't get the errror
What happens if you run:
import sqlglot
sqlglot.parse_one("l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1")

What do you get if you run:
import sqlglot
sqlglot.__version__

?

Hi, From this query: import sqlglot
sqlglot.parse_one("l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1")
I get:  (AND this:
(EQ this:
(COLUMN this:
(IDENTIFIER this: first_name, quoted: False), table:
(IDENTIFIER this: l, quoted: False)), expression:
(COLUMN this:
(IDENTIFIER this: first_name, quoted: False), table:
(IDENTIFIER this: r, quoted: False))), expression:
(LTE this:
(LEVENSHTEIN this:
(COLUMN this:
(IDENTIFIER this: dob, quoted: False), table:
(IDENTIFIER this: r, quoted: False)), expression:
(COLUMN this:
(IDENTIFIER this: dob, quoted: False), table:
(IDENTIFIER this: l, quoted: False))), expression:
(LITERAL this: 1, is_string: False)))
From the second query: import sqlglot
sqlglot.version
I get: '18.17.0'
Thank you!!

hmm - something strange seems to be going on, because splink seems to be generating an error when it attempts to run sqlglot.parse_one("l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1"), but when you run the same statement in isolation, it doesn't error.
I have run your suggested script on my side under the same splink/sqlglot versions without error.
You're absolutely certain that in the environment you're running splink, it's definitely sqlglot==18.17.0 and it isn't somehow using an alternative environment for your Splink work?
For instance, immediately after you get the error, you're able to run sqlglot.parse_one("l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1") successfully?

I am... I ran the  import sqlglot sqlglot.version code in the same jupyterlab notebook..

Hi,
I get the results that I expected: Probability two random records match is estimated to be  0.00389.
This means that amongst all possible pairwise record comparisons, one in 257.25 are expected to match.  With 499,500 total possible comparisons, we expect a total of around 1,941.67 matching pairs
The DuckDB version works really well!! Unfortunately, we have 94 million records to process so that wont do it.. Thats why I have been trying to get the spark version going.. Thank you!!
Sincerely,
tom

Struggling a bit with what to suggest, sorry!  You could try upgrading to latest sqlglot I guess., or maybe downgrade splink to an earlier version, say 3.9.5?

Hi, I tried both upgrading down grading both Splink and sqlglot.. Same error..

Hi - I don't know if this helps, but I got exactly this error (same version of sqlglot) when I copy & pasted this example from the github.io page. This page has the deterministic rules written with "<= 1" at the end of the instead of "<=1", which causes a parse error. The demo file in the repo (docs/demos/examples/spark/deduplicate_1k_synthetic.ipynb) has the correct text for the rules.

Hi - I don't know if this helps, but I got exactly this error (same version of sqlglot) when I copy & pasted this example from the github.io page. This page has the deterministic rules written with "<= 1" at the end of the instead of "<=1", which causes a parse error. The demo file in the repo (docs/demos/examples/spark/deduplicate_1k_synthetic.ipynb) has the correct text for the rules.

Thanks so much for this @mattjbishop! I think this looks like it is probably the issue - @theimanph if I look at the source text of your comment I see that the code block has exactly these character entity refs:
deterministic_rules = [
    "l.first_name = r.first_name and levenshtein(r.dob, l.dob) <= 1",
    "l.surname = r.surname and levenshtein(r.dob, l.dob) <= 1",
    "l.first_name = r.first_name and levenshtein(r.surname, l.surname) <= 2",
    "l.email = r.email"
]

I think because the code was not contained in a codeblock github renders '<' as '<' automatically, so we never spotted the problem with the code as it appears fine when rendered on github

Hi,
Thank you!! I am trying to run that version of the code and am now running into this error: ImportError: cannot import name 'block_on' from 'splink.spark.blocking_rule_library' (/home/c265616/miniforge3/envs/tomenv2/lib/python3.9/site-packages/splink/spark/blocking_rule_library.py) .. Any ideas? Thank you!!
Sincerely,
tom

Not sure - possibly you don't have the latest version of splink.  feel free to ask a question in the discussion forum.  Closing this issue

Hi Robin,
Thank you!!
Sincerely,
tom


Don't draw section if amount is zero

Unifies behavior with compose variant

Resolves https://github.com/futuredapp/donut/issues/92


Test New LLMs (Llama2, CodeLlama, etc.) on Chat-UI?

Hi @curlydoodle,
Notice you forked chat-ui. if you're trying to test other LLMs (codellama, wizardcoder, etc.) with it, I just wrote a 1-click proxy to translate openai calls to huggingface, anthropic, togetherai, etc. api calls.
code
$ pip install litellm

$ litellm --model huggingface/bigcode/starcoder

#INFO:     Uvicorn running on http://<IP_ADDRESS>:8000

>> openai.api_base = "http://<IP_ADDRESS>:8000"

Here's the PR on adding openai to chat-ui: https://github.com/huggingface/chat-ui/pull/452
I'd love to know if this solves a problem for you

I will check it out thanks


Changes all sensible occurrences of the just commands to have them run using ov

Fixes
Fixes #4482 by @dhruvkb
Description
I've changed all occurrences of the just commands so that they have the ./ov at the beginning  - I didn't update changelogs, proposals and scripts
Checklist

[x] My pull request has a descriptive title (not a vague title likeUpdate index.md).
[x] My pull request targets the default branch of the repository (main) or a parent feature branch.
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[x] I added or updated tests for the changes I made (if applicable).
[x] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no visible errors.
[x] I ran the DAG documentation generator (just catalog/generate-docs for catalog
PRs) or the media properties generator (just catalog/generate-docs media-props
for the catalog or just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

It seems like we may also need to change references that are in code blocks (in addition to the inline preformatted code sections)!

It seems like we may also need to change references that are in code blocks (in addition to the inline preformatted code sections)!

I've updated the code blocks. In the end I had to go through them manually but it should now be all of them


Bot repeat muting options

So it just came to mind that it would be great if you could add a command (that can be locked to a single role), that would be able to turn off the looping of the server mutes. Like you type in the command into discord and after that the bot only mutes people once and ignores it until further inputs. If the bot messes up once we just get stuck with no ability to speak currently.
For that part a force unmute would be great too. Not the current one but one that actually makes it stop muting people until a new input comes in (new round etc.)

this should be fixed with the newest release (2.0.5). going to close this ticket. if you get these issues again please open a new one! thanks!


Can't pass a library context to PEM_read_X509()

I'm making the following sequence of API calls to OpenSSL:
ctx = SSL_CTX_new_ex(non_fips_libctx, NULL, TLS_method());
SSL_CTX_use_PrivateKey_file(ctx,<keyfile>,SSL_FILETYPE_PEM);
SSL_CTX_use_certificate_file(ctx,<certfile>,SSL_FILETYPE_PEM);
SSL_CTX_check_private_key(ctx);
fp = fopen(<certfile>, "r");
mycert = PEM_read_X509(fp, NULL, 0, NULL);
pkey = X509_get_pubkey(mycert);

OpenSSL throws the following error on the call to X509_get_pubkey():
00079FF8647F0000:error:03000072:digital envelope routines:(unknown function):decode error:crypto/x509/x_pubkey.c:444:

This is possibly because the call to PEM_read_X509() does not take a library context as an argument. My applications sets up two non-default library contexts, one for FIPS (loading the fips and base providers), and one for non-FIPS (loads the default provider). No providers are loaded into the default library context.
Details from Matt Caswell:
"The public key is actually decoded as part of the PEM_read_X509(). But,
the PEM_read_X509() call does not take a libctx parameter. Subsequently,
it attempts to decode the embedded X509 public key and will use the
default libctx - which has no providers and so the decode of the key
fails. Therefore when you subsequently try to obtain the public key with
X509_get_pubkey() you get a NULL return."
See more information about this problem here:
<EMAIL_ADDRESS>and here:
<EMAIL_ADDRESS>I'm using the following OpenSSL version:
OpenSSL 3.0.0 7 sep 2021 (Library: OpenSSL 3.0.0 7 sep 2021)

You would have to use a OSSL_STORE to load the cert to be able to pass libctx. Now this is a serious deficiency but I'd call it a missing feature rather than a bug.

Hmm, one more idea - untested - have you tried to pass an empty X509 object via the second parameter that would be created with X509_new_ex() within the libctx?

I'm not 100% sure what you mean, but what I think you meant, and what I changed my code to, was this:
X509 *empty_X509; mycert = PEM_read_X509(fp, &empty_X509, 0, NULL);
I'm assuming you meant the X509_new_ex() happened internally within OpenSSL and you did not want me to call that function myself?
Trying to do the above led to a segfault within OpenSSL, the backtrace from gdb:
`
#0  pthread_rwlock_wrlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:39
#1  0x00007fc8d77405f9 in CRYPTO_THREAD_write_lock () from /lib64/libcrypto.so.3
#2  0x00007fc8d7731c85 in CRYPTO_free_ex_data () from /lib64/libcrypto.so.3
#3  0x00007fc8d77eff87 in x509_cb () from /lib64/libcrypto.so.3
#4  0x00007fc8d75ff28b in asn1_item_embed_d2i () from /lib64/libcrypto.so.3
#5  0x00007fc8d75ff6d2 in ASN1_item_d2i_ex () from /lib64/libcrypto.so.3
#6  0x00007fc8d7758739 in PEM_ASN1_read_bio () from /lib64/libcrypto.so.3
#7  0x00007fc8d7756b44 in PEM_ASN1_read () from /lib64/libcrypto.so.3
#8  0x00007fc8d72207b9 in api_sslattach (pAttachPkt=0x7ffe2e7a5c50, proc_pkt=0x7fc8c86fd820, ipv6_and_ssl_info=0x7fc8c82c8e90,
dhtbl_x=4) at NiopSSL.cpp:2223
#9  0x00007fc8d71c8425 in api_attach (pAttachPkt=0x7ffe2e7a5c50, ipv6_addr_info=0x7fc8c82c8e90, dhtbl_x=4)
at NiopWinSock.cpp:16493
#10 0x00007fc8d7206293 in NiopWinSock (ControlInfo=0x7ffe2e7a5c50, size=7052, pMsgpkt=0x7fc8c82c8e90, dhtbl_x=4)
at NiopWinSock.cpp:783
#11 0x00007fc8d71751d3 in ProcessNoqEntries (tl=0x7fc8c611b798, dhtbl_x=4) at NiopNiqNoq.cpp:4303
#12 0x00007fc8d717e850 in NiopNiqNoq (spawn_parameter=0x7fc8c4517700) at NiopNiqNoq.cpp:1687
#13 0x00007fc8d8f1a7e6 in start_thread (arg=) at pthread_create.c:301
#14 0x00007fc8d7e2f91d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
`

X509 *empty_X509 = X509_new_ex(non_fips_libctx, NULL); mycert = PEM_read_X509(fp, &empty_X509, 0, NULL);

Ah, sorry, that makes more sense. Also, good news, I tried it and it worked!
Do you consider this a workaround for this issue? Seems like the subsequent API calls (X509_get_pubkey()) work as expected.
Thanks.

Yeah, I think this makes the issue moot. Perhaps documenting it somewhere would be nice, the question is where.

OK, I'll use this in my code moving forward. As far as documentation, I'll leave those decisions to those more familiar than I am.
Also, this is my first issue raised on the OpenSSL github, should I close the issue, or do one of the committers need to do it?

Is #16965 still an issue after doing this?

the question is where.

Presumably somewhere on this page:
https://www.openssl.org/docs/man3.0/man3/PEM_read_bio_X509.html

Also, this is my first issue raised on the OpenSSL github, should I close the issue, or do one of the committers need to do it?

I think we should keep it open until the documentation issue is resolved.

Without making any other changes, I still get the same error on SSL_CTX_build_cert_chain() with the same backtrace.
However, is there an X509_STORE_new_ex() function that I should be using? I create my trusted with with X509_STORE_new() right now.

No...but there is an X509_STORE_CTX_new_ex() if you create your own X509_STORE_CTX anywhere.

OK, thanks. I don't create my own X509_STORE_CTX. I guess #16965 should stay open?

I guess #16965 should stay open

Yes, at least for now.


Invalid XML Model File handling

When an XML Model File is incomplete, there is not necessarily a relevant error message produced for the user.
For instance:
If a message partitioning scheme is not specified for a message, the code is generated but will not compile, due to undefined variable message_<message_name>_count.
Is the model file validated at all or is it up to the end user to ensure the model is valid?
If not, should the default of <gpu:partitioningNone></gpu:partitioningNone> be implied?

More user friendly to provide an intentional compiler error if it's known
to not work.
Presumably where the partitioning select is carried out, just need to add a
check for no partitioning type specified that places an #error to inform
the user of their mistake.
On Wed, Sep 28, 2016 at 10:08 AM, Peter Heywood<EMAIL_ADDRESS>wrote:

When an XML Model File is incomplete, there is not necessarily a relevant
error message produced for the user.
For instance:
If a message partitioning scheme is not specified for a message, the code
is generated but will not compile, due to undefined variable
message_<message_name>_count.
Is the model file validated at all or is it up to the end user to ensure
the model is valid?
If not, should the default of gpu:partitioningNone</gpu:
partitioningNone> be implied?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/FLAMEGPU/FLAMEGPU/issues/25, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAtTCq8od19zpk5ZwfO3s1oE9c42tLhHks5qui6TgaJpZM4KIlQj
.

This is something for version 2 as adding the necessary error handling within the XSLT would be ugly. The expectation for current FLAME GPU is that your model file must validate against the schema to produce a sensible model. Failure to validate should create a build warning or error in the errors dialogue. This doesn't necessarily prevent the rest of the compilation chain though.


Docs: update rusoto.github.io to point to up-to-date versions

We used to publish documentation to rusoto.github.io. This hasn't been updated in a while and only the main landing page refers people to the current docs on docs.rs. This leads to people reading outdated docs and they don't know it. See https://github.com/rusoto/rusoto/issues/1746#issuecomment-645622280 for one example and the "traffic" tab of this repo's github insights page shows we're still seeing traffic from it.
Instead of dealing with autogenerating the docs again for the old version of Rusoto, a script could go through all HTML pages in the gh-pages branch on this repo and insert words about "this version of docs are deprecated, see Rusoto on docs.rs" or something similar.
Example page: https://rusoto.github.io/rusoto/rusoto_dynamodb/ .
Also the root page is an outdated version of https://rusoto.org : https://rusoto.github.io/ . That can be left alone as it refers users to https://rusoto.org .

Another example of someone being led astray due to those docs: https://github.com/rusoto/rusoto/issues/1830 .
We could also turn off the github pages feature for this repo to remove the docs and hope people find their way to docs.rs instead. Worse user experience but IMO better than seeing outdated docs.


Create dynamic databases

Hello ,
I want to create dynamic databases , till now i tried following in my model:
DB::getConnection()->statement('CREATE DATABASE :schema', array('schema' => $dbname))
getting following error :
call_user_func_array() expects parameter 1 to be a valid callback, class 'MongoDB\Database' does not have a method 'getConnection'

There's no such thing as "database" in MongoDB. Documents are the closest thing to databases and collections are the closest to tables.

There is such a thing as a database in Mongo. Databases contain collections, and collections contain documents.
This particular package can only connect to one at a time though as far as I can tell.
What exactly is the use case for creating databases dynamically though?

i also hava same question?i want to create a datebase by code


Automated cherry pick of #4634: huawei image delete bugfix

Cherry pick of #4634 on release/3.0.
#4634: huawei image delete bugfix

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/3.0@987495c). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             release/3.0   #4642   +/-   ##
=============================================
  Coverage               ?   6.79%
=============================================
  Files                  ?     524
  Lines                  ?   89593
  Branches               ?       0
=============================================
  Hits                   ?    6092
  Misses                 ?   82996
  Partials               ?     505

Flag
Coverage Δ

#aFlag
6.79% <ø> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 987495c...ac1d08d. Read the comment docs.

/lgtm

/approve


Added basic compiling ability capable of throwing 'CompilationError'.

@aero31aero , take a look, please.


Add tag app release action

Fixes

Fixes #976 by @sarayourfriend
Description

This is a preemptive attempt at part of the solution described in the issue discussion. ~This is drafted until the conversation in the linked issue is resolved.~
Outstanding questions from the conversation:

@dhruvkb suggested we do away with git tags. I can see the rationale here in that the tag is repo-wide but with this flow would only pertain to a single part of the app. If we append the application name to the tag, that would at least help disambiguate which application the tag is referencing. Does that solve the issue from your perspective, @dhruvkb? I like the tags because they're human-readable (something I think you brought to my attention as being useful vs a SHA). Because of that it's easier to at-a-glance confirm whether the tag makes sense for what you want to deploy (i.e., is the date in the tag now-ish UTC if I'm deploying the app right after running the tagging workflow?).
Should the workflow automatically run the deployment action afterwards? Obviously this is only possible for the API and frontend at the moment as ingestion server is still locked in Terraform deployment world for the foreseeable future.

Alternatively to the second option, should the deployment workflows dispatch this workflow instead, and then automatically handle the rest of the deployment based on the output? That'd be a nice way to "tidy" it up. We'd still need to keep this a separate workflow so that it can be dispatched manually for the ingestion server.
Testing Instructions

Not sure if it can be tested on push given it relies on inputs and also would add new tags to the docker registry.
Checklist

[x] My pull request has a descriptive title (not a vague title like
Update index.md).
[x] My pull request targets the default branch of the repository (main) or
a parent feature branch.
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[N/A] I added or updated tests for the changes I made (if applicable).
[x] I added or updated documentation (if applicable).
[N/A] I tried running the project locally and verified that there are no visible
errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

I also would prefer to keep git tags. I would prefer to have the tags prepended by the app name rather than appended, that way when viewing the tags in an alphabetically sorted list, it's easy to see when the tags were made for an individual service.

Agreed, will do this in the next commits.

I think either having this run as part of the deployment workflows or having this kick off the deployment workflow makes a lot of sense. Would this be called as part of the staging deployment workflow, and then the tag would be used manually for production? That would make the most sense to me, given we usually want to deploy to staging prior to prod.

It hadn't occurred to me to create the tag during staging: but then what's the point of the changelogs? I think this process is only useful if we're going to have any delay between staging and production release, which right now I think we should without doing live integration testing.
The way I envisioned this being used was:

Staging deploys like normal, to a SHA
Once we're happy with the set of changes for an app in staging, we copy the SHA for the current deployment and then run this workflow

The only modification I could imagine is to make the production deployment workflows call this new one to generate the tag from the supplied SHA and then also immediately deploy it. That way we wouldn't have to copy the SHA and then also copy the resulting tag out from this new workflow: one less change to accidentally copy the wrong thing somehow.

I've implemented the changes from this conversation: https://github.com/WordPress/openverse/pull/987#discussion_r1147015594
Thanks heaps @AetherUnbound for the review. You caught some nasty issues with my first attempt here.

@AetherUnbound This workflow would also make the "bump" script in the infrastructure config no longer work for the ingestion server, at least not with its current implementation. We'll need to add some tag-prefix filtering there as well to search for the latest ingestion server specific version from the repo rather than the way it works now.

I've removed the changelog files I was using for testing. If you want to see how the whole thing will look on the documentation site, checkout https://github.com/WordPress/openverse/pull/987/commits/905bcbf24fb9bce357ec72c205297d8999509a26 and then run the site locally (just documentation/live).

Thankfully the testing revealed a number of configuration issues. Everything up until the release-drafter works. However, release-drafter requires the configuration file to live on main. As this PR hasn't yet been merged, that's not the case.
Therefore, in the interest of being able to test this, I think we should add the release-drafter-api.yml in this PR to the main branch in a separate PR. We only need to add one to be able to finish testing.
I'm hoping that the release-drafter part will "just work" but I'm convinced that something about the configuration is ever so slightly off still and will need tweaking.
I'll open the PR to add the api configuration to main for this PR to be able to use it to finish testing.

Further testing is blocked until https://github.com/WordPress/openverse/pull/1011 is merged

Alright! This is fully working now.
Here's a screenshot of the generated release (I deleted the release as it wasn't a genuine one):

Here's the closed PR that added the changelogs for that fake release: https://github.com/WordPress/openverse/pull/1016
Notice that the changelog only includes API changes, nothing else :tada:
You can see the release tags added to the openverse-api and openverse-api_nginx images here: https://github.com/wordpress/openverse/pkgs/container/openverse-api and https://github.com/wordpress/openverse/pkgs/container/openverse-api_nginx
I've deleted the git tags from the repository, but here's the list before I deleted them:

In short: the new action does what it's supposed to do!

Create a git tag for the specified SHA (and only if the SHA corresponds to a published docker image)
Add the release tag to the docker image
Publish a release (this is an ongoing thing we'll need to allow release drafter to pull only the changes since the last release... it relies explicitly on the GitHub releases, not tags!)
Open a PR with the changelogs added to the documentation site

After I remove the testing code, it'll also deploy the production API or frontend with the new docker image tag.


Smarter autoscaling with multiple agents per instance

We are using aws ci stack with multiple agents per instance. It looks like the buildkite scheduler picks (seemingly) random agents from the pool of instances when picking containers for builds. This seems to result in the auto-scaler having more capacity than needed because even if we are only using 20 agents, they are spread out across all 10 instances, each instance having 2 agents being used.
Preferably the scheduler would pick agents from the instances that are already being used so that the other instances can scale down and save $$.

That seems like it could backfire, wouldn't that lead to higher latency in most situations, as you'd be assigning builds to agents on the same host and it would slow down?
The scheduler will pick the agent that last ran a similar build, to optimize cache, but aside from this will pick a random host.

Auto-scaling should happen based on scheduled jobs, so theoretically if there is an oversupply of agents, it should correct itsself regardless of whether there are agents running jobs on the machines that get shut down.


drivers: espi: kconfig: Remove unused ESPI_VWIRE_CHANNEL symbol

Added in commit a7e44ebf44 ("drivers: espi: Add Kconfig for eSPI
driver"), then never used.
Found with a script.

@ulfalizer Please don't touch the eSPI switches.


Custom Glint environment

https://github.com/typed-ember/glint/blob/5b5a29452942f924aaeee60ac7f56fdc954c59a2/packages/environment-ember-loose/-private/dsl/integration-declarations.d.ts

We need to migrate to content-tag https://github.com/typed-ember/glint/pull/655


QuarkReport: data validation added and other minor improvements

Issues like #1548 are difficult to debug as they are cause by the data returned by Quark.
I added data validation regarding the returned confidence value. In case this value is not as expected the whole record is printed, which allows a better understanding what went wrong in Quark.

@jpstotz thanks!


If I render 100's of views inside Pager view will it perform normal in ios?

Do we have ios offscreen limit?
I'm trying to make a records display screen where one can see a list of records for a specific day. The day changes when the user swipes left or right on the screen and the records change.
When there are 100's of views if userr swiped right many times. Will it make any issue on ios? As android has an offscreen limit.  How does it affect the ios?

Thank you!

I also had same question. I have possibly about 100k pages (page doesn't contain more than text)  that I want to display but its not necessarily going to render all.

One way I can imagene is to have 3 or 5 default pages, and depending on onPageSelected try rotating the 3rd page back to first page


about training code

hello，very good job, could you please share the training code and data

The mediapipe models were created by Google.
They do not provide training code or training data.
This is not available ... thus the challenge ...

Okay, thank you for your reply


mark the GDS Way docs as INTERNAL instead of ALPHA

We discussed this in the Forum today, and decided that we were just going to remove the badge entirely. Points raised were:

Adding an INTERNAL badge has caused problems in the past with the GOV.UK Dev Docs when people in other departments thought we were accidentally publishing something that should be private. We then got chased a number of times by IA about this.
The content in the GDS Way is already useful and relevant. There may be gaps in information, but people should already be using it. An alpha or beta label is not relevant.
We already have a note on the first page saying that this how GDS does things, and that it's only published for anyone else who might be interested in seeing how we do things. It's not guidance for other departments.


Feature/mol 783 public internal comments in refund manager

Added an option to add internal comments to a refund.

The stan failures were from files not touched by this commit

ok no worries, ill do it afterwards
but it would still be good to fix :)

I've put in the requested changes and added a little extra.


Use ms to format eta

This pull request adds the ms package and uses it to format the eta. Previously the eta was displayed in seconds. This pr would display the eta in ms, seconds, minutes, etc...

ok, the "only" relevant change is the eta value in eta.js is formatted by the ms package
but i've a few questions/issues..

What's the benefit compared to the existing eta_formatted placeholder ?
Changing the type of eta value will break the eta_formatted functionality
This changeset is not backward compatible

Comparision
cli-progress time format implementation
https://github.com/npkgz/cli-progress/blob/master/lib/format-time.js
ms time format implementation
https://github.com/vercel/ms/blob/master/index.js#L113

My bad, i didnt realize there were those options. Sorry for wasting your time


Change boxcutter to box-cutter image

Hi, why the change?

Ahh I see they yanked box-cutter/ubuntu1610

Was following the tutorial, couldn't do the vagrant up command.
I.e. it seems to have moved from
https://app.vagrantup.com/boxcutter/boxes/ubuntu1610
to
https://app.vagrantup.com/box-cutter/boxes/ubuntu1610

@smartinov did you have any trouble with this alternate image?

Managed to do the course with the image, so think it's the same, they just re-named the thing!

On Oct 16, 2017, at 7:17 AM, Wes Higbee<EMAIL_ADDRESS>wrote:
@smartinov https://github.com/smartinov did you have any trouble with this alternate image?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/g0t4/docker-swarm-mode-getting-started/pull/1#issuecomment-336782925, or mute the thread https://github.com/notifications/unsubscribe-auth/AHPnaEWPDZ2zR-_Ur20UDDItHzSS_u3aks5ssubwgaJpZM4PtYve.

Thanks for the update.

On Mon, Oct 16, 2017 at 3:03 AM, Stefan Martinov<EMAIL_ADDRESS>wrote:
Managed to do the course with the image, so think it's the same, they just
re-named the thing!

On Oct 16, 2017, at 7:17 AM, Wes Higbee<EMAIL_ADDRESS>wrote:
@smartinov https://github.com/smartinov did you have any trouble with
this alternate image?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/g0t4/docker-swarm-mode-getting-started/pull/1#issuecomment-336782925>,
or mute the thread <
https://github.com/notifications/unsubscribe-auth/AHPnaEWPDZ2zR-_Ur20UDDItHzSS_u3aks5ssubwgaJpZM4PtYve
.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/g0t4/docker-swarm-mode-getting-started/pull/1#issuecomment-336797727,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAK_3eMi5j7kwGy1CQXV45F3VHdTO_Nrks5ssv-tgaJpZM4PtYve
.


Need some help React canvas-gauges for Animation

Need some help React canvas-gauges for Animation duration. I have used animationDuration attribute but still the animation speed is very high.
could some one help how to change default value for animation Duration.
thanks in advance.

Try setting animatedValue property to true.

I have the same problem, it seems that the react library is neglected :S

I have the same problem


fix: Accept MAX_BACKUPS env variable

Currently MAX_BACKUP is always set to 3

Yes! I was trying to figure out what was going on with that variable.
@yloeffler, could this get merged in please?


How can you use URLSession in a background refresh task

I am writing a weather application which should provide some complications and after watching the WWDC video the slide at 20:51 states that you cannot use URLSession in a Background App Refresh task. If I understand your code, this is exactly what you do though and I would like to know if you had any problems with this?
AFAIK, the documented way to do this is schedule a url session background task to download the json, then decode it and store it (in your case in user defaults) and in the extension delegate's handle(:) schedule the next background task and reload the complications.

@trevorturk Hey ;) Could you comment here - did you have any problems with this kind of inline downloads lately, or does it still work for you? Or do you only use background url sessions now?

So, big caveat that we (https://helloweather.com) still occasional complaints about our Complication not refreshing reliably, but it seems fine to me, and to the vast majority of our users. We use the pattern from this demo app. We're currently doing a rewrite and moving into async/await, but basically it's the same thing (no background tasks.) Perhaps we're doing it wrong and that's the problem with our reliability, but it seems mostly fine?

Thank you for the detailed answer! I'll try to use url background tasks just to be safe. Something else I noticed is that the handle(_:) function is only called when the app is not running in the foreground, right? So the scheduling of the next refresh and complication refresh should actually be also done in the url session's task completion. It's weird that Apple's samples only reschedule background refreshes in the handle(_:) function if it's not called in every situation.
Anyways, congrats that you have a watch app in the store, it's an incredibly annoying development environment (for me at least :D)

OMG yeah, Apple Watch development can be demoralizing sometimes, and even if things work fairly well, IRL use can cause unexpected issues that are difficult to debug. See https://twitter.com/trevorturk/status/1480566496539594763?s=20&t=B27pqZflEBxLF8-kd7lTdQ for a couple things you might consider handling, especially the weird lat/lon issue.

Ah interesting so you use startUpdatingLocation until you get a valid location instead of the one-off requestLocation? I've just been hitting requestLocation and used the last coordinate of the first locationManager(_:didUpdateLocations:) function :)

Now that I watched the Platform State of the Union I'm even more confused since the Complations are now driven by WidgetKit so the entire way the timeline is created is via the timeline provider APIs. I have a 1on1 scheduled with an Apple Engineer today and will ask how this fits with the entire "the watch has to do everything with background tasks" approach since our iOS widgets simply fetch location/data in the timeline provider functions

That would be great to hear. Please let us know.
I use the function that keeps returning locations since the single one has errors too frequently. I stop updating when I have a location and also unset the delegate to avoid getting locations multiple times. It's a weird pattern but seems to be the norm.

@fruitcoder ask them what's the deal with those URL sessions, if it is OK to use non-background URL session requests since it seems to work and doesn't throw an error like they said in the talk

I use the same code for Widgets and Complications currently. (Sounds like we'll switch to Widgetkit for everything now, but currently they're different systems.)

You mean the same view code right? But the way the supported complications/families are declared will also move to WidgetKit. It's interesting that they reduce the families to just 4, I thought they would just add 3 for the Lock Screen widgets

No, I use the same location+weather fetching code between all platforms now, not just the UI.

So the standard data tasks are more like a grey area and with the new widget kit it's gotten even "blurrier" (that's how they put it). The getTimelineEntries function is extremely budgeted so if your code to fetch the current location + reverse geocoding already takes some time (depending on device state) it can happen that your data task runs out of time. But as long as it works it's ok (no premature optimization).
I also asked about whether we also need the NSWidgetWantsLocation for the watchOS Widget Extension (we do) and whether it's enough to have the When In Use permission instead of the Always permission (not 100% sure but he said we should still have to request Always).

Thanks for the update. Another thing about the budget and time/power is that I'm using kCLLocationAccuracyHundredMeters -- since weather data APIs really can't get more than that much fidelity anyway. I was told a while back by a watchOS engineer that this setting means the GPS usually doesn't need to fire up (I guess it triangulates using wifi or something?) and I've had good luck with that.

Just watching this session Efficiency awaits: Background tasks in SwiftUI and it seems super relevant here. I'm going to consider switching over to this method. I'm not 100% clear on it, but seems like you can use the URLSessionConfiguration.background without too much fuss? We'll see how it operates IRL, but this looks promising!

Oh wow didn't have that session on my list. It really looks like it answers some of the conceptual questions I had 🙏


Add Heartbeat to websocket connection between Frontend and SignallingServer

Component your feature request relates to

[* ] Signalling server
[ *] Frontend library
[ ] Frontend UI library
[ ] Matchmaker
[ ] SFU
[ ] This repo

Problem your feature solves? Please describe.
The Frontend Library is not triggering disconnection event when I for instance turn off the wifi of my laptop (which is running the frontend).
Same issue on the Signalling Server. Those kind of "disconnection" wouldn't trigger an event that could be handle by the signalling server .
I know that this repo is not supposed to be necessarily "production ready" but this issue could almost be considered a "bug" as the signalling server will never recover (ie it will never be availalble for a new user) when this type of disconnection with the frontend happen.
Describe the solution you'd like
It seems like a hearbeat check (regular ping messages) both from frontend and from the signalling server, would be able to detect those disconnections:
https://github.com/websockets/ws?tab=readme-ov-file#how-to-detect-and-close-broken-connections
Additional context
Add any other context or screenshots about the feature request here.

This is a good idea.
I think this is a reasonable suggestion to include in our 5.5 release for the signaling server.

This would also fix my problem with cloudfare terminating inactive ws connections after 90s. +1


Photo not being sent

I have been trying send photo through my bot but the photo never make it to the user and the program just stops there at the sendPhoto() function.
import telepot
bot = 0

def handle(msg):

    content_type, chat_type, chat_id = telepot.glance(msg)
    bot.sendMessage(chat_id, 'Hello')
    bot.sendPhoto(chat_id, open('l.jpg', 'rb'))

    print('sent')

def main():
    global bot
    bot = telepot.Bot('BOT-TOKEN')
    bot.message_loop(handle)

    while True:
        pass

main()

Also no error messages are displayed.

Hello,
i would replace pass in while loop with sleep, i think it uses a huge amount of cpu right now. you can also send a second parameter to message_loop and remove the while loop completely.
bot.message_loop(handle, run_forever=True)

your code for sending the photo seems alright though. are you sure that image l.jpg exists and is in the same folder as your .py file ?
perhaps you can wrap the sendPhoto method in a try block to see if there is any error.
import telepot
bot = 0

def handle(msg):
    content_type, chat_type, chat_id = telepot.glance(msg)
    bot.sendMessage(chat_id, 'Hello')
    try:
        bot.sendPhoto(chat_id, open('l.jpg', 'rb'))
    except Exception as ex:
        print(ex)

    print('sent')

def main():
    global bot
    bot = telepot.Bot('BOT-TOKEN')
    bot.message_loop(handle, run_forever=True)

main()

i tested the above code now with telepot 8.1 and python 3.5.1 and it sent the photo.

Ok so i tested your code but still got the same results.
And yes l.jpg does exist in the same dir as the .py.
Anyway the thing is that i just tested my code with a much smaller photo (125 bytes) , to my surprise I did receive the photo but after 2-3 minutes.
So i guess after all the problem is not in the code.
But I still have all those photos to send :P so any help will be appreciated.
Thanks. :)

to me that seems more of a network problem, what are you running the bot on ?
have you tried getting a VPS or switching your provider if you have one?
may be unrelated but try changing your token, for some strange reason telegram sometimes refuses to accept files from some tokens , also see #68 if using another token sent photos without problems.

I encourage you to try sending photos in the Python interpreter (with a real token, of course):
>>> import telepot
>>> bot = telepot.Bot('11111111:AAAAAAAAAAAAAAAAAAAAAAA')
>>> bot.sendPhoto(99999999, open('1.jpg', 'rb'))

Experiment with various file sizes, and note the time needed. I just send a file of 2.2M, and it took 30 seconds or so. Depends on the network of course.
According to my experience, as the file reaches a certain size (I forgot how large), it hangs there forever (or an HTTP timeout after a long time. I forgot which.) It seemed the sending was not successful. But after a few minutes, the recipient received the photo nonetheless.
At first, I suspect the problem was with the HTTP library, so I tried the same experiment with CURL. No different. I reported the problem to BotSupport. They acknowledged it, but never really fixed it for me. Last time I checked, it was at least 6 months ago, so I don't know how up-to-date my experience is. That's the whole story, all I can say.


icon font problem in ratchet.min.css

Hello , I download the files from http://cnratchet.com , and i find a bug in ratchet.min.css , but it works if use ratchet.css. The images show the bug.

for some reason my computer has this file downloaded and now everytime i download this and run it it shows the picture on the wbesite

can i work on this issue

?


Build and test wheel for each Python version in manylinux container

Travis was taking the easy route of just building wheels using Python 3.7 and to my surprise not everyone uses Python 3.7! This PR asks travis to kindly build and test with all/both supported Python versions available from the manylinux docker container calling the build-dist.sh script.
Closes #230

Good point re speeding up the task, in this case we only build with the docker containers when releasing so I don't think it is necessary right now.


Missing setup section

In the Microsoft 365 admin center, select Setup, and then view the Files and content section.

not seeing this section on the setup sections (nothing after Device Management)

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

ID: 215aae2b-deef-07f9-03cf-009006b8cabb
Version Independent ID: bb7fd949-ff1a-dc43-d454-3fa2c4d938db
Content: Set up SharePoint Syntex
Content Source: microsoft-365/contentunderstanding/set-up-content-understanding.md
Product: microsoft-365-enterprise
GitHub Login: @MikePlumleyMSFT
Microsoft Alias: mikeplum

@msbemba

@ShawnBaer Thank you for your feedback. This sounds like a bug on the tenant. I'd recommend you contact Microsoft support via the need help section so that a tech support engineer can work with you to fix this issue as it should be available if there is at least one SharePoint Syntex license in the tenant.
Hope this helps!
Thanks
Sri

@msbemba Thank you very much for the contribution and sharing this explanation. @ShawnBaer Hope this comment is helpful for you. Considering the nature of the issue, as advised, please open a service ticket in your tenant and follow with them for the resolution. We proceed to close it as here we are limited to documentation fixes and improvements only.
We will be very happy if you can share the outcome or resolution with us if you see documentation update is required. We will certainly update this documentation with that valuable information. Thanks again, for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


feat: add ability to exclude dimensions per-metric

This PR is for internal comments. The "real" PR is over here: https://github.com/cloudposse/prometheus-to-cloudwatch/pull/28

Merged upstream!


Fix markup

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

@gjrfytn Thank you! #sign-off


[Acceptance Test] Device Details Page

Description and Goal of Test
Have the ability to view all the information of a given device.
Acceptance Criteria
Can view all the given information for the following:

[ ] General device information
[ ] CPU information
[ ] Memory information
[ ] Network information
[ ] Disk information
[ ] Information for each process

If any portion is not fulfilled or if more information is requested on any section, please let us know.


🐛 Bug: Invalid repository URL

Bug Description
@Man07har/Portfolio_Website is not a valid GitHub repository
Expected Behavior
URL should be valid when clicked on
Actual Behavior
Repository may have been deleted or its name may have been changed
Record

[X] I agree to follow this project's Code of Conduct
[x] I want to work on fixing this bug

Hello @tanducmai! Congratulations on creating your first issue! 🎉 We appreciate your contribution and want to assure you that we're on it. We'll do our best to resolve the issue promptly. If you have any additional information or details to share about the issue, please let us know. We're here to help! Thanks again for taking the time to report this issue. We value your feedback and look forward to working together to address it. Best regards, Your Project TeamWe will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

Hello! he has removed his repo.
The issue is all yours

any progress?


Unit / Integration tests

First of all, thank you for providing this NuGet package @koenvzeijl and @sleeuwen (and thanks for the swift merges of my PRs 😉). We have been able to integrate it into our development process where it replaced LibSassBuilder. Its advantage is not only that it is using Dart Sass, it also seems to do the compilation quite a bit faster. Comparing the compilation times on our build machines reveals that AspNetCore.SassCompiler only uses around 20 percent of the time that LibSassBuilder previously used.
While digging through the source code I noticed that there are currently no unit or integration tests and wondered if you thought about adding some, for example to make sure that future Dart Sass versions do still adhere to the same console output that the regular expression expects. Maybe one of you is already working on it? If not, I might be able to contribute some tests.

Hi @adiessl , thank you for all the PRs you created and help make the library better. It's awesome to hear you were able to improve the compilation time so much compared to LibSassBuilder .
After the last few issues we had with the new releases I also talked with @koenvzeijl that we will need to improve our tests situation to hopefully catch these bugs in the future.
Currently, we reuse the samples to function like some sort of integration tests. During CI we build the samples which in turn compiles the scss, and we validate if the .css files are generated. This doesn't  always work correctlyas the samples don't use the nuget package itself and there was an issue that only occurred with the nuget.
The problem why we haven't created any real unit tests yet is that the main functionality that should be tested are the tasks in msbuild and I don't know how we could unit test that. It might be possible to run the msbuild process in a unit test, but I don't know how to do that and haven't had the time to dig into that. Or maybe we can directly call the CompileSass build task methods and unit test it that way.

I would say that testing the MSBuild task would probably only be a final integration test. That could maybe be achieved by deleting all .css files of a test project, then running dotnet build and verifying if the .css files have been generated again.
In order to be able to write unit tests it might be best to extract some code from CompileSass.cs into separate classes and then test these individually – maybe have one class to parse and get the SassCompilerOptions and one class that receives these options and does the actual compilation. Then the execute method of the MSBuild task would basically consist of two lines of code and would not really need a unit test.


support multiple namespaced federation with helm

checking CRDs to see if it exists by group api in helm chart
helm installation script to support multiple namespaced federation

After this merged, #628, #629, #630 should be merged. Then
Fixes #557

rebase done and CI passed. @marun

@xunpan This looks ok to me, though I'm no helm expert.
What do you think of removing federated type configs/federated type crds from the helm chart once kubefed2 federate extends support to federating namespaces?  cc: @irfanurrehman
@gyliu513 Can you please review?

I have talked this @xunpan offline for this PR, and it looks good to me.
@marun @xunpan if we want to remove federated type configs/federated type crds from the helm chart, we may want to resume https://github.com/kubernetes-sigs/federation-v2/pull/482 by enabling some pre/post script in helm chart to manage the federated crds.
/lgtm

Thank you!
/approve