H100+TDX：The runtime measurements are not matching with the golden measurements at the following indexes

I previously encountered issue  #58 , but it was properly resolved by refreshing the GPU firmware and upgrading the VBIOS version. When I attempted to authenticate the GPU by running python3 -m verifier.cc_admin --allow_hold_cert， the following issue occurred.
Number of GPUs available : 1
-----------------------------------
Fetching GPU 0 information from GPU driver.
Using the Nonce generated by Local GPU Verifier
VERIFYING GPU : 0
        Driver version fetched : 550.90.07
        VBIOS version fetched : <IP_ADDRESS>.1c
        Validating GPU certificate chains.
                The firmware ID in the device certificate chain is matching with the one in the attestation report.
                GPU attestation report certificate chain validation successful.
                        The certificate chain revocation status verification successful.
        Authenticating attestation report
                The nonce in the SPDM GET MEASUREMENT request message is matching with the generated nonce.
                Driver version fetched from the attestation report : 550.90.07
                VBIOS version fetched from the attestation report : <IP_ADDRESS>.1c
                Attestation report signature verification successful.
                Attestation report verification successful.
        Authenticating the RIMs.
                Authenticating Driver RIM
                        Fetching the driver RIM from the RIM service.
                        RIM Schema validation passed.
                        driver RIM certificate chain verification successful.
                        The certificate chain revocation status verification successful.
                        driver RIM signature verification successful.
                        Driver RIM verification successful
                Authenticating VBIOS RIM.
                        Fetching the VBIOS RIM from the RIM service.
                        RIM Schema validation passed.
                        vbios RIM certificate chain verification successful.
                        The certificate chain revocation status verification successful.
                        vbios RIM signature verification successful.
                        VBIOS RIM verification successful
        Comparing measurements (runtime vs golden)
                        The runtime measurements are not matching with the
                        golden measurements at the following indexes(starting from 0) :
                        [
                        1,
                        2,
                        3,
                        9,
                        21,
                        22,
                        31,
                        34
                        ]
        GPU Ready state is already NOT READY
The verification of GPU 0 resulted in failure.
        GPU Attestation failed

when I ran nvidia-smi conf-compute -srs 1 to make gpu cc ready， I got follow meassage:
Failed to set Conf. Compute GPUs Ready State: Invalid Argument
I allso checked nvidia-persistenced.service.  When I ran systemctl status nvidia-persistenced.service command, I received the following message.
nvidia-persistenced.service - NVIDIA Persistence Daemon
     Loaded: loaded (/lib/systemd/system/nvidia-persistenced.service; static)
     Active: active (running) since Fri 2024-07-05 15:51:58 UTC; 16h ago
    Process: 876 ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced --uvm-persistence-mode --verbose (code=exited, status=0/SUCCESS)
   Main PID: 880 (nvidia-persiste)
      Tasks: 1 (limit: 37233)
     Memory: 36.8M
        CPU: 6.167s
     CGroup: /system.slice/nvidia-persistenced.service
             └─880 /usr/bin/nvidia-persistenced --user nvidia-persistenced --uvm-persistence-mode --verbose

Jul 05 15:51:51 ubuntu systemd[1]: Starting NVIDIA Persistence Daemon...
Jul 05 15:51:51 ubuntu nvidia-persistenced[880]: Verbose syslog connection opened
Jul 05 15:51:51 ubuntu nvidia-persistenced[880]: Now running with user ID 113 and group ID 121
Jul 05 15:51:51 ubuntu nvidia-persistenced[880]: Started (880)
Jul 05 15:51:51 ubuntu nvidia-persistenced[880]: device 0000:00:01.0 - registered
Jul 05 15:51:58 ubuntu nvidia-persistenced[880]: device 0000:00:01.0 - Failed to enable UVM Persistence mode: 0x40
Jul 05 15:51:58 ubuntu nvidia-persistenced[880]: device 0000:00:01.0 - persistence mode enabled.
Jul 05 15:51:58 ubuntu nvidia-persistenced[880]: device 0000:00:01.0 - NUMA memory onlined.

In addition, when I ran nvidia-persistenced,  the following issue occured:.
nvidia-persistenced failed to initialize. Check syslog for more details
I checked the kernel message, the wrong is
[   14.687406] nvidia-uvm: Loaded the UVM driver, major device number 234.
[   15.071292] audit: type=1400 audit(1720194710.286:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=775 comm="apparmor_parser"
[   15.071520] audit: type=1400 audit(1720194710.286:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=780 comm="apparmor_parser"
[   15.071524] audit: type=1400 audit(1720194710.286:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=780 comm="apparmor_parser"
[   15.071528] audit: type=1400 audit(1720194710.286:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=780 comm="apparmor_parser"
[   15.071600] audit: type=1400 audit(1720194710.286:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=776 comm="apparmor_parser"
[   15.071622] audit: type=1400 audit(1720194710.286:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=776 comm="apparmor_parser"
[   15.090168] audit: type=1400 audit(1720194710.302:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=782 comm="apparmor_parser"
[   15.090174] audit: type=1400 audit(1720194710.302:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=782 comm="apparmor_parser"
[   15.127555] audit: type=1400 audit(1720194710.342:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="ubuntu_pro_apt_news" pid=778 comm="apparmor_parser"
[   15.128211] audit: type=1400 audit(1720194710.342:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="tcpdump" pid=781 comm="apparmor_parser"
[   17.664421] openvswitch: Open vSwitch switching datapath
[   20.239803] loop3: detected capacity change from 0 to 8
[   22.667424] NVRM: nvAssertFailed: Assertion failed: 0 @ g_kern_gmmu_nvoc.h:1967
[   22.667433] NVRM: nvAssertFailed: Assertion failed: 0 @ g_kern_gmmu_nvoc.h:1967
[   23.268539] NVRM: calculatePCIELinkRateMBps: Unknown PCIe speed
[   23.268545] NVRM: getPCIELinkRateMBps: getPCIELinkRateMBps:1778: Generic Error: Invalid state [NV_ERR_INVALID_STATE]

The related information I can think of is as follows.

Linux version 6.2.0-mvp10v1+8-generic
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt vfio-pci.disable_idle_d3=1"
I use libvirt to manage virtual machines instead of qemu.

The script I use to bind vfio is as follows.
set -x
rmmod nvidia_drm
rmmod nvidia_modeset
rmmod nvidia_uvm
rmmod nvidia
lspci -d 10de: -k
echo 0000:99:00.0 > /sys/bus/pci/drivers/nvidia/unbind
echo vfio-pci > /sys/bus/pci/devices/0000\:99\:00.0/driver_override
echo 0000:99:00.0 > /sys/bus/pci/drivers/vfio-pci/bind
echo > /sys/bus/pci/devices/0000\:99\:00.0/driver_override
echo 1048576 > /sys/module/vfio_iommu_type1/parameters/dma_entry_limit
lspci -d 10de: -k

This is an old issue perhaps due to bugs in their implementation. See also #28.

The failure to boot was caused by not correctly adding OVMF to the virtual machine's XML file.

@hedj17 Hi, Could you please tell me the specific solution? I have the same problem.

The failure to boot was caused by not correctly adding OVMF to the virtual machine's XML file.启动失败的原因是未将 OVMF 正确添加到虚拟机的 XML 文件中。
@hedj17 Hi, Could you please tell me the specific solution? How to correctly add OVMF to the virtual machine's XML file? I have the same problem.

you can add
    <type arch='x86_64' machine='q35'>hvm</type>
    <loader>/usr/share/qemu/OVMF.fd</loader>
    <boot dev='hd'/>
  </os>```


[Tests] Assert Manager methods implemented once

Add test for robustness against forgetful developers migrating Python methods to C++ then leaving the old Python implementation around, masking the new C++ implementation.
I.e. ensure the Manager Python class hierarchy only has a single implementation of each method.

did we want to add these to ManagerInterface too -

Ah yes, good point, will add.

did we want to add these to ManagerInterface too -

Ah yes, good point, will add.

Refactored in bbf88560 then added tests to ManagerInterface in 09147850


Using with I2C drivers that take ownership?

Thank you for a great crate!
Many drivers for i2c devices take ownership of the i2c instance. Do you have an example of using such drivers? It would seem that switching channels is not possible after the i2c instance is moved into the driver.
My exact use case is taking subsequent measurements from a number of these sensors: https://crates.io/crates/vl53l0x

I also tried to use it with shared-bus, but how am I still able to call select_channels on just the handle?

@Kintaro I am not sure I understand the problem. Is your question referred to the split() method?

Ok it took some work but I implemented splitting. I think it turned out quite nice:
// Talking to two slaves with the same address connected to different ports
// (Whether they share an address or not does not matter)
let i2c_switch = TCA9548A::new(dev, address);
let mut parts = i2c_switch.split();
let slave_address = 0x20;
let data_for_slave = [0xAB, 0xCD];
// Write some data to the slave using normal I2C interface
parts.i2c0.write(slave_address, &data_for_slave).unwrap();
// Read some data from a slave connected to channel 1
let mut read_data = [0; 2];
parts.i2c1.read(slave_address, &mut read_data).unwrap();

I have released this in version 0.2.0. Closing.
cc: @marikka @Kintaro


Explain CLI and Importer update

Importing more inventory types.
Added CLI

Adding cla: yes label, as the PR author is a googler at the time of this PR was created.


Added a useful Python link from Scaler Topics

Added a useful link on applications of Python that will definitely help your learners.
What does this PR do?
Add resource(s) | Remove resource(s) | Add info | Improve repo
For resources
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[ ] Read our contributing guidelines.
[ ] Search for duplicates.
[ ] Include author(s) and platform where appropriate.
[ ] Put lists in alphabetical order, correct spacing.
[ ] Add needed indications (PDF, access notes, under construction).
[ ] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Sorry but this resource is part of other that was already merged in #6843
https://github.com/EbookFoundation/free-programming-books/blob/5fc20d162c8ca601866909a7b79f81b52457798f/books/free-programming-books-langs.md?plain=1#L1935


Check for NaNs from Holt-Winters and do not return them

The Holt-Winters forecast method can become unstable given either bad data or bad parameters and it can produce NaNs. This prevents the NaNs from being returned to the client and causing errors.
Also multiple initial guesses are tried instead of only a single guess.
Fixes #6758

[x] Rebased/mergable
[x] Tests pass

@jsternberg Care to take a look?

Just some comments about magic numbers. Otherwise, it looks good.

@jsternberg Thanks, updated.

👍 on green.


EMMG<->MUX over UDP

Hello everyone, is there any option to connect tsemmg to mux over UDP port. I tried -u port option but no success,
Appreciate any feedback.
Tks
Nik

Hi @nikpakar
You never connect to the MUX using UDP, you always connect using TCP. All the control layer is always exchanged on the TCP session. The option --udp specifies that the data_provision messages (eg. EMM's) are sent using UDP. This is the way the protocol is defined.

Thanks Legard,
Im working on a test lab with a new production MUX from a different vendor and they only have a setting udpPort for emmChannel. Hence why i was wondering. Will double check with them.
Thanks again.


[SPARK-14294] native support alter table ... rename to ...

What changes were proposed in this pull request?
This PR addresses one of the tokens defined in SPARK-14129 (TOK_ALTERTABLE_RENAME):
Supports native execution of ALTER TABLE .. RENAME TO ... command
Syntax:
ALTER TABLE table_name RENAME TO new_table_name;
How was this patch tested?
New tests were added to DDLSuite.scala and SQLQuerySuite.scala, as well as updated DDLCommandSuite.scala.

Can one of the admins verify this patch?

ok to test

Test build #2716 has started for PR 12086 at commit 46c7e81.

Test build #2716 has finished for PR 12086 at commit 46c7e81.

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

@bomeng could you add the SQL tag to the PR title. This makes it easier for others to scan the PR queue.
Overall this looks pretty solid. Could you rebase/merge to the latest master (the ANTLR 3 parser has been removed today)?

@bomeng I happen to be working on the broader issue SPARK-14129. Would you mind if I take over this patch and build mine on top of your changes here?

Not a problem. @andrewor14 Hope this solution help. Thanks.

@hvanhovell I've updated the codes based on your comments. I will let @andrewor14 take over my codes for his task. Thanks.

Thanks @bomeng, I will post the PR shortly.

Detected duplicate issue.
@bomeng Please close this PR because the parent issue is a duplicate.


Which python command are you using for CIFAR and STL10 experiments?

Hi Philip,
Thanks for your great work. Could you please share your python command for CIFAR and STL10 experiments? The size parameters of AMDIM-large for CIFAR seem to have two different versions in Table 2 caption and body text. Which one are you using for the results reported in the paper?
Thank you very much for your help.
Kind regards,
Nancy

Hi Nancy,
The correct configuration should be the one in the table 2.(b), so: --ndf 256  --n_rkhs=2048,  --n_depth=10.
The other configuration mentioned in the body is a mistake on our side, thanks for catching it.
Closing this issue as I think it answers your question, but if not let us know.

Thanks for your reply. And what about the other hyperparameters (such as batch size, learning rate) for STL10 experiment, are they same as the hyperparameter for ImageNet?

For CIFAR/STL10, you should be able to reproduce the results by using a batch size of 480 (or more if your setup permits it) and use the defaults for all the other hyperparameters (including LR).

Do you enable amp for CIFAR/STL10 training?

Amp shouldn't influence the final result, but you should definitly enable it if you have a V100/P100 or other recent GPUs that support FP16.

Dear Philip and William,
Thanks for the great work. Did experiments which achieved SOTA on CIFAR 10/100 also use FastAutoAugmentation, or just standard augmentation as provided in this repository?
Thank you so much!
Martin


Update my fork with the latest changes from central repo

This is to resolve conflicts in advance.f90

test not successful, required to push changes into central repo


Nintendo switch

will/can you add support for the nintendo switch version of undertale using layeredfs, though it is game maker studio 2 you can still open and edit the game.win and theoretically use this with the nintendo switch with this tool and with new developments this could just work as a homebrew app for the nintendo switch that is all automated like the pc version

If you do want to support GMS2 you'll probably find this useful: https://github.com/krzys-h/UndertaleModTool/wiki/Changes-in-Game-Maker:-Studio-2


Distance() should be lazy interpolated.

There's a number of systemic issues with regard to Distance() as an overt class that must be interpreted at the initialization. Rect("0%","0%", "100%", "100%") for example is valid but cannot be understood without a context to explicitly define what the comparison length might be. The same applies, though less so to, real world distances when a PPI value isn't set. Also, there might be issues with scaling the SVG based on some of those criteria. This means if a matrix were told to translate(2em, 2em) it would have to know the current font size etc.
The current best solution would to add a render(ppi, width, height, font, etc) to contextualize the shapes. Unless these were already established through other means or required no context. Or allows the same elements to render through different contexts.

Distance was deprecated circa 0.6.0 in favor of Length() which lazy interpretes.
While it's seemingly passing the tests there's still a number of problems.

Insufficient test coverage.

Crashes:

from svg.elements import *
p = Point("20%", '40%')
p

Points should either disallow fancy lengths or have a render() function to turn their length values into discrete values.

Color was heavily fleshed out, and replaced with a non-int version that can change value. Added hsl functions and let you set red, blue, green, alpha, opacity, hsl, hue, saturation, lightness.

The Length values are called with Value() within the relevant shapes. Without this sometimes they were crashing. These crashes should be corrected organically as well.

Version 0.6.0 was used in the bCNC project. So the version here was bumped due to a few other minor but breaking changes.

Must flesh out the .render() commands to ensure they are correctly used by SVG.elements().

Reify() still must be called on Path objects loaded as part of elements. This should be corrected rather than hybridized. Either make path like the other shapes or don't. But, it's a bit in limbo currently.


MacOS catalina support

Hi,
The new MacOS cataline upgrade won't support 32 bit apps. It is possible to the script install a 64 bit version?

body{font-family:Helvetica,Arial;font-size:13px}I don’t know a way to install 64bits version on macOs. ¿Do you know it?
Diego Ulloa. {<EMAIL_ADDRESS>}Programador - Desarrollador.--www.diegoulloa.cl El 8 de octubre de 2019 a las 13:46:22, bttd<EMAIL_ADDRESS>escribió:
Hi,
The new MacOS cataline upgrade won't support 32 bit apps. It is
possible to the script install a 64 bit version?
—
You are receiving this because you are subscribed to this
thread.
Reply to this email directly,
view it on GitHub, or
mute the thread.

body{font-family:Helvetica,Arial;font-size:13px}I’ll try to do something with that. Do you help me to test then?Regards.
Diego Ulloa. {<EMAIL_ADDRESS>}Programador - Desarrollador.--www.diegoulloa.cl El 10 de octubre de 2019 a las 05:40:33, bttd<EMAIL_ADDRESS>escribió:
Hi,
I can compile on Catalina the 64 bit version:
https://drive.google.com/file/d/1KkjmzvuEeYQ6A3-Ut26X2Lu0psZ4NMJj/view?usp=sharing
You need to install older SDKs and Compile it with the included
script, with x86_64 arg.
I can't find the way on ioquake github. The launcher doesn't
have instruction since ioquake wiki won't work, and I don't can
compile it.
—
You are receiving this because you commented.
Reply to this email directly,
view it on GitHub, or
unsubscribe.

Hi,
Yes I can test it. The app what I linked from my google drive, works, if I just replace the ioqake-1.36.app, later I can test it on older Mojave macOS.

body{font-family:Helvetica,Arial;font-size:13px}Perfect. It’s works definitely but I need achieve the same with ioquake3fe-1.36 file.I can see problems with CPMA too, I’ll try with the latest version released.Please tell me what happend with Mojave.Thank you.
Diego Ulloa. {<EMAIL_ADDRESS>}Programador - Desarrollador.--www.diegoulloa.cl El 10 de octubre de 2019 a las 16:57:39, bttd<EMAIL_ADDRESS>escribió:
Hi,
Yes I can test it. The app what I linked from my google drive,
works, if I just replace the ioqake-1.36.app, later I can test it
on older Mojave macOS.
—
You are receiving this because you commented.
Reply to this email directly,
view it on GitHub, or
unsubscribe.

body{font-family:Helvetica,Arial;font-size:13px}Hey bro! Can you test the following dev branch pls?https://github.com/diegoulloao/ioquake3-mac-install/tree/devIt’s in process. Now I need to convert ioquake3fe-1.36 file to 64 bits.Any idea?Thanks.
Diego Ulloa. {<EMAIL_ADDRESS>}Programador - Desarrollador.--www.diegoulloa.cl El 10 de octubre de 2019 a las 17:01:15, Diego Ulloa<EMAIL_ADDRESS>escribió:
Perfect.
It’s works definitely but I need achieve the same
with ioquake3fe-1.36 file.
I can see
problems with CPMA too, I’ll try with the latest version
released.
Please
tell me what happend with Mojave.
Thank
you.
Diego Ulloa. {<EMAIL_ADDRESS>}
Programador -
Desarrollador.
www.diegoulloa.cl
El 10 de octubre de 2019 a las 16:57:39, bttd
<EMAIL_ADDRESS>escribió:
Hi,
Yes I can test it. The app what I linked from my google
drive, works, if I just replace the ioqake-1.36.app, later I can
test it on older Mojave macOS.
—
You are receiving this because you commented.
Reply to this email directly,
view it on GitHub, or
unsubscribe.

Hey bro! Can you test the following dev branch pls?
(need to remove old directories, ioquake3 in Applications and Quake3 in ~/Library/Application Support/Quake3)
https://github.com/diegoulloao/ioquake3-mac-install/tree/dev
It’s in process. Now I need to convert ioquake3fe-1.36 file to 64 bits.
Any idea?
Thanks.

Dev branch works for me except launcher. I try to find a way to compile it on x86_64.
Another problem. Most of the time I try this game on an external monitor.
I think this is a known problem, so I'm trying to find the solution.
Later I try to test it on Mojave too.

Okay bro.
I try game with external 27" Thunderbolt Display and this works fine.

I'm improving some things of external dependencies and files management, improving the script too.
Thanks a lot for all the support man. Let's do this!
Waiting for news ;)

@all-contributors please add @bttd for 64-bits executables compiling and test

@bttd let's continue in this thread pls: https://github.com/diegoulloao/ioquake3-mac-install/issues/3

Another problem. Most of the time I try this game on an external monitor.
I think this is a known problem, so I'm trying to find the solution.

Problem solved !

@all-contributors please add @rcgordon for bug and code

Master v3 is here!
https://github.com/diegoulloao/ioquake3-mac-install
Thank you for all!
@bttd


feat: lazy hydration strategies for async components

Async components can now control when they are hydrated by providing a hydration strategy.

Vue provides a number of built-in hydration strategies. These built-in strategies need to be individually imported so they can be tree-shaken if not used.

The design is intentionally low-level for flexibility. Compiler syntax sugar can potentially be built on top of this in the future either in core or in higher level solutions (e.g. Nuxt).

Why is it coupled to async components? Mostly because async components are already natural boundaries for async operations inside a render tree. Async sub trees require special handling in regards of reactivity tracking and suspense resolution. By coupling async hydration to async components we can support the feature without introducing extra complexities when it interacts with those other areas of concerns.
The result of this coupling is that one can't have a component that is eagerly loaded but lazily hydrated - which seems illogical to begin with.

Hydrate on Idle
Hydrates via requestIdleCallback:
import { defineAsyncComponent, hydrateOnIdle } from 'vue'

const AsyncComp = defineAsyncComponent({
  loader: () => import('./Comp.vue'),
  hydrate: hydrateOnIdle()
})

Hydrate on Visible
Hydrate when element(s) become visible via IntersectionObserver.
import { defineAsyncComponent, hydrateOnVisible } from 'vue'

const AsyncComp = defineAsyncComponent({
  loader: () => import('./Comp.vue'),
  hydrate: hydrateOnVisible()
})

Can optionally pass in a rootMargin value for the observer:
// if string, must be valid value for the `rootMargin` option for IntersectionObserver
hydrateOnVisible('100px')

// can also be a number - px will be auto-appended
hydrateOnVisible(100)

Hydrate on Media Query
Hydrates when the specified media query matches.
import { defineAsyncComponent, hydrateOnMediaQuery } from 'vue'

const AsyncComp = defineAsyncComponent({
  loader: () => import('./Comp.vue'),
  hydrate: hydrateOnMediaQuery('(max-width:500px)')
})

Hydrate on Interaction
Hydrates when specified event(s) are triggered on the component element(s). The event that triggered the hydration will also be replayed once hydration is complete.
import { defineAsyncComponent, hydrateOnInteraction } from 'vue'

const AsyncComp = defineAsyncComponent({
  loader: () => import('./Comp.vue'),
  hydrate: hydrateOnInteraction('click')
})

Can also be a list of multiple event types:
hydrateOnInteraction(['wheel', 'mouseover'])

Custom Strategy
import { defineAsyncComponent, hydrateOnInteraction } from 'vue'

const AsyncComp = defineAsyncComponent({
  loader: () => import('./Comp.vue'),
  hydrate: (hydrate, forEachElement) => {
    // forEachElement is a helper to iterate through all the root elememts
    // in the component's non-hydrated DOM, since the root can be a fragment
    // instead of a single element
    forEachElement(el => {
      // ...
    })
    // call `hydrate` when ready
    hydrate()
  }
})

https://github.com/freddy38510/vue3-lazy-hydration :pray:

@skirtles-code

Should strategies be provided with a way to do tear down logic? e.g. If an async component is removed before it is hydrated, the strategy may need to remove listeners on document, or watchers on a store.

Good point, I should also add a test case for a non-hydrated tree to be removed before ever being hydrated.

Can Vue methods like watch/ref be used inside custom hydration strategies?

I'm working on adding condition-based delayed hydration (a "hydrate when" scenario) for general purpose use, which I would need to watch for changes in the hydration strategy to then call hydrate. I have this code to demonstrate:
// componentLoader is the dynamic import, attrs.hydrate is for the component to render
defineComponent({
    inheritAttrs: false,
    setup (_, { attrs }) {
      if (import.meta.server) {
        return () => h(defineAsyncComponent(componentLoader), attrs)
      }
      const shouldHydrate = ref(!!(attrs.hydrate ?? true))
      if (shouldHydrate.value) {
        return () => h(defineAsyncComponent(componentLoader), attrs)
      }

      const strategy: HydrationStrategy = (hydrate) => {
        const unwatch = watch(shouldHydrate, () => hydrate(), { once: true })
        return () => unwatch()
      }
      return () => h(defineAsyncComponent({loader: componentLoader, hydrate: strategy})
    },
  })

@GalacticHypernova
I think this usage is fine

Alright thank you!


feat: Deploy Vercel app using github actions (Vercel CLI) instead

See benefits:
https://github.com/amondnet/vercel-action/issues/103
https://github.com/amondnet/vercel-action/discussions/126

Done


fixing academy icon

updated to the new ledger academy icon

![Screenshot 2020-07-23 at 13 36 31](https://user-images.githubusercontent.com/23069507/88282279-87710a00-cce9-11ea-9883-a754f8521718.png
kindly change the wording


Ukraine locale

unable to use properly library with users from Ukraine, 'cos by Google standards Ukraine is shortened to uk (when we are extracting country from Locale)  and NOT ua

orly?
public static Country getCountryByLocale(Locale locale) {
String countryIsoCode = locale.getISO3Country().substring(0, 2).toLowerCase();
return getCountryByISO(countryIsoCode);
}
and when I have uk_UA from getDefaultLocale I see null and nullpointers after


Update unverified Sender Feature.md

There was a question from an end user, and I needed to clarify that it was ultimately based on DMARC = pass or compauth = pass from spoof intelligence. Not just SPF and DKIM.

@nenonix @JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@MSFTTracyP - PR has been copy edited and is ready for final review.
Thank you.


How to use concurrent-queue with tokio and lambda?

Dear, I want to use Concurrent-Queue in my module,
#[cfg(test)]
mod test
{
	use std::borrow::Borrow;
	use std::fmt::Display;
	use std::sync::Arc;
	use std::sync::atomic::{AtomicBool, Ordering};
	use std::thread::sleep;
	use std::time::Duration;
	use concurrent_queue::ConcurrentQueue;
	use tokio::runtime::Runtime;

	pub fn runConcurrentBy<T,ActProd, ActCons>( threads:i32, actProd:ActProd, actCons:ActCons ) -> (Arc<AtomicBool>,Runtime)
	where ActProd: Fn( &ConcurrentQueue<T> ),
		ActCons: Fn( &T ) + Send + Sync + 'static,
		T: Display + Send + 'static
	{
		let mut q = ConcurrentQueue::unbounded();

		let rtm = Runtime::new().unwrap();
		//
		let end = AtomicBool::new(false);

		let stopAll = Arc::new(end);

		let queue = Arc::new(q);

		for _ in 0..threads
		{
			let stop = stopAll.clone();
			let q = queue.clone();

			rtm.spawn(async move
			{
				while !stop.load( Ordering::Relaxed )
				{
					if let Ok( val ) = q.pop()
					{
						actCons( &val );
						//println!( "item: {}", val );
					}
				}
			});
		}

		actProd( &queue );

		(stopAll,rtm)
	}

	#[tokio::test]
	async fn test_concurrentQueue()
	{
		let data = vec![ 1,2,3,4,5,6,7,8,9,10,11 ];

		let (stop,rtm) = runConcurrentBy( 10,
		|q|
		{
			for val in &data
			{
				q.push(val.to_owned()).unwrap();
			}
		},
		|v|
		{
			println!( "item: {}", v );
		}
		);

		sleep( Duration::from_secs_f64(3.0) );

		stop.swap( true, Ordering::Relaxed );
		rtm.shutdown_background();
	}
}

But always get error like..
17 |       pub fn runConcurrentBy<T,ActProd, ActCons>( threads:i32, actProd:ActProd, actCons:ActCons ) -> (Arc<AtomicBool>,Runtime)
   |                                                                                ------- move occurs because `actCons` has type `ActCons`, which does not implement the `Copy` trait
...
38 | /             {
39 | |                 while !stop.load( Ordering::Relaxed )
40 | |                 {
41 | |                     if let Ok( val ) = q.pop()
42 | |                     {
43 | |                         actCons( &val );
   | |                         ------- use occurs due to use in generator
...  |
46 | |                 }
47 | |             });
   | |_____________^ value moved here, in previous iteration of loop
   |
help: consider borrowing `actCons`
   |
38 |             &{
   |             +

Please teach me hot to fix this, thank you very much

You are moving actCons into the context when you call rtm.spawn. Instead of moving actCons into the context, you should move a reference to it instead. You need to change it from this:
rtm.spawn(async move
{
	while !stop.load( Ordering::Relaxed )
	{
		if let Ok( val ) = q.pop()
		{
			actCons( &val );
			//println!( "item: {}", val );
		}
	}
});

to this:
rtm.spawn({
    // new: move the reference instead of the real value
    let actCons = &actCons;
    async move
    {
	while !stop.load( Ordering::Relaxed )
	{
		if let Ok( val ) = q.pop()
		{
			actCons( &val );
			//println!( "item: {}", val );
		}
	}
}
});

As an aside, busy waiting on a ConcurrentQueue is generally a bad idea. Instead, you should use async-channel (which is built on top of concurrent-queue) or, since you're already using tokio, use an mpsc channel.

@notgull
I really appreciate your guidance, After some fix it's worked, Thank You very much 💯
Fixed code..
	use std::borrow::Borrow;
	use std::fmt::Display;
	use std::sync::Arc;
	use std::sync::atomic::{AtomicBool, Ordering};
	use std::thread::sleep;
	use std::time::Duration;
	use concurrent_queue::ConcurrentQueue;
	use tokio::runtime::Runtime;

	pub fn runConcurrentBy<T,ActProd, ActCons>( threads:i32, actProd:ActProd, actCons:ActCons ) -> (Arc<AtomicBool>,Runtime)
	where ActProd: Fn( &ConcurrentQueue<T> ),
		ActCons: Fn( &T ) + Send + Sync + 'static,
		T: Display + Send + 'static
	{
		let mut q = ConcurrentQueue::unbounded();

		let rtm = Runtime::new().unwrap();
		//
		let end = AtomicBool::new(false);

		let stopAll = Arc::new(end);

		let queue = Arc::new(q);

		let actCons = Arc::new( actCons );

		for _ in 0..threads
		{
			let stop = stopAll.clone();
			let q = queue.clone();
			let actCons = actCons.clone();

			rtm.spawn(async move
			{
				while !stop.load( Ordering::Relaxed )
				{
					if let Ok( val ) = q.pop()
					{
						actCons( &val );
						//println!( "item: {}", val );
					}
				}
			});
		}

		actProd( &queue );

		(stopAll,rtm)
	}

	#[tokio::test]
	async fn test_concurrentQueue()
	{
		let data = vec![ 1,2,3,4,5,6,7,8,9,10,11 ];

		let (stop,rtm) = runConcurrentBy( 10,
		|q|
		{
			for val in &data
			{
				q.push(val.to_owned()).unwrap();
			}
		},
		|v|
		{
			println!( "item: {}", v );
		}
		);

		sleep( Duration::from_secs_f64(3.0) );

		stop.swap( true, Ordering::Relaxed );
		rtm.shutdown_background();
	}

h :)
I have tried async-channel as you said,
But I can't find a good example to handle the data I want,
In fact, I will shrink the image in the thread,
It will take a while, so I did it this way,
If you have better suggestions, I hope you can give me some pointers, thank you :)

If you have better suggestions, I hope you can give me some pointers, thank you :)

Without really knowing your use case, here's a naive rewrite of your runConcurrentBy function, taking full advantage of async/await syntax and async-channel.
use async_channel::Sender;

pub fn runConcurrentBy<T, ActProd, ActCons>(
    threads: i32,
    actProd: ActProd,
    actCons: ActCons,
) -> Runtime
where
    ActProd: Fn(&Sender<T>),
    ActCons: Fn(&T) + Send + Sync + 'static,
    T: Display + Send + 'static,
{
    let (sender, receiver) = async_channel::<T>::unbounded();

    let rtm = Runtime::new().unwrap();
    let actCons = Arc::new(actCons);

    for _ in 0..threads {
        let q = receiver.clone();
        let actCons = actCons.clone();

        rtm.spawn(async move {
            while let Ok(val) = q.pop().await {
                actCons(&val);
            }
        });
    }

    actProd(&queue);

    rtm
}

If you want to be able to stop your concurrent tasks on demand, the usual option is to have a second channel that you send a signal down that causes the tasks to exit. See this example for this strategy in practice. Alternatively, you could just drop the Sender once you're one with it in actProd.


What's likely to be the problem?

http://www.reddit.com/r/redditdev/comments/2vl71m/redditphpsdk_help/
I'm unsure if it's the API wrapper, or if I didn't create a new app on my Reddit account properly, or what.

OAuth functionality has been restored, so the endpoints should work with the new edit. This required an SSL version bump.


Ultimate TicTacToe Game

Develop a Javascript Ultimate TicTacToe app.
Description 📜
Ultimate Tic-Tac-Toe is a variant of the classic Tic-Tac-Toe game. It is played on a larger 9x9 grid which consists of nine 3x3 grids. The objective of the game is to win each 3x3 grid, and ultimately, the entire game by winning the most 3x3 grids.
In this game, players take turns placing their symbol (either X or O) in a vacant square of the 3x3 grid. However, the twist is that the square where a player places their symbol determines the 3x3 grid where their opponent must play on their next turn. If a player wins a 3x3 grid, they gain control of that grid, and their symbol is displayed in the corresponding square of the larger 9x9 grid. The game continues until one player wins three 3x3 grids in a row, or until all the squares have been filled, resulting in a draw.
Ultimate Tic-Tac-Toe is a more complex version of Tic-Tac-Toe that requires strategic thinking and planning ahead. It also introduces an element of control over the opponent's moves, as the placement of a player's symbol determines the next playable grid for their opponent. Overall, Ultimate Tic-Tac-Toe is an engaging and challenging game that provides a new twist on a classic game.
Requirements 🛠

Implement a 9x9 grid with nine 3x3 grids, allowing players to place symbols (X or O) in clickable cells and applying game rules, including control over opponent's moves.

Create a user-friendly interface displaying game state, outcomes, and the option to start a new game.

Ensure code scalability, modularity, and responsiveness for different devices and screen sizes.

Bonuses ✨

Add a single-player mode with a bot.

Screenshots:

Any number of people can work on a single issue 👨💻👨💻
This issue is open to all.🌍

Project location 👉🏻 UltimateTicTacToeGame/PBJI/
👨🏻💻 Happy Coding 👩🏻💻

@thinkswell I request you to assign this issue.

working on it

I am interested to take up this issue. Please assign this issue to me.

Please assign this issue to me


Random test failure

I saw this earlier.  When I re-ran npm test, it didn't recur.
HeadlessChrome 0.0.0 (Mac OS X 10.12.6) Preload and MetaData functionality generates a timeEnd on init and updates this after a beforesave event WITH a preload binding FAILED
	Expected 2000 to equal 1000.
	    at /var/folders/7m/mc4v802x6z1br52hl8c_0q8w0000gn/T/566e348d9f7ed8b28c91279330db24f4.browserify:47108:68

Yes, that happens to me too. Good to put this issue here. That test needs to be fixed.

Haven't seen this one recently! I think some of the test isolation updates fixed this.


Error: Provider produced inconsistent result after apply

Description
Hello Team,
Recently I started getting this strange error when trying to deploy my product as part of my team's CI pipeline:
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ module.sdcore.module.self-signed-certificates.juju_application.self-signed-certificates,
│ provider "provider[\"registry.terraform.io/juju/juju\"]" produced an
│ unexpected new value: .charm[0].channel: was cty.StringVal("beta"), but now
│ cty.StringVal("latest/beta").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

I'm not sure where does it get the latest/beta reference from, because we're not using it anywhere in our Terraform files.
My Juju version is 3.4.2.
Last working run was using Juju 3.4.0. The version of the Terraform Juju Provider hasn't changed.
BR,
Bartek
Urgency
Annoying bug in our test suite
Terraform Juju Provider version
0.11.0
Terraform version
Terraform v1.7.5-dev installed with Snap
Terraform Configuration(s)
resource "juju_model" "sdcore" {
  name = "sdcore"
}

module "sdcore-router" {
  source = "git::https://github.com/canonical/sdcore-router-k8s-operator//terraform"

  model_name = juju_model.sdcore.name
  depends_on = [juju_model.sdcore]
}

module "sdcore" {
  source = "git::https://github.com/canonical/terraform-juju-sdcore-k8s//modules/sdcore-k8s"

  model_name = juju_model.sdcore.name
  create_model = false
  deploy_cos = true

  depends_on = [module.sdcore-router]
}

module "gnbsim" {
  source = "git::https://github.com/canonical/sdcore-gnbsim-k8s-operator//terraform"

  model_name = juju_model.sdcore.name
  depends_on = [module.sdcore-router]
}

resource "juju_integration" "gnbsim-amf" {
  model = juju_model.sdcore.name

  application {
    name     = module.gnbsim.app_name
    endpoint = module.gnbsim.fiveg_n2_endpoint
  }

  application {
    name     = module.sdcore.amf_app_name
    endpoint = module.sdcore.fiveg_n2_endpoint
  }
}

resource "juju_integration" "gnbsim-nms" {
  model = juju_model.sdcore.name

  application {
    name     = module.gnbsim.app_name
    endpoint = module.gnbsim.fiveg_gnb_identity_endpoint
  }

  application {
    name     = module.sdcore.nms_app_name
    endpoint = module.sdcore.fiveg_gnb_identity_endpoint
  }
}

Reproduce / Test
terraform init
terraform apply

Debug/Panic Output
No response
Notes & References
No response

Hey @Gmerold, we are planning to add a validator to the channel field that checks that this value consists of a track and a risk to go out in version 12. This class of bugs is caused by the fact that juju resolves the default track itself when it is missing and this then creates an inconsistency when comparing the plan with the state.
Since terraform plans should give reproducible deployments it makes sense that we should ask user to provide the track too.

Yeah, I thought that would be the reason.
Thanks for your comment @Aflynn50. I'm looking forward to version 12 of the provider!


fail to build extract_scannet_scene.cpp

after I run the command make install for building preprocessing, I met the error:
preprocessing/io_colmap/src/colmap_reader.cpp:84:117: error: no matching function for call to ‘rotate(glm::mat4, float, glm::vec3)’    const glm::mat4 rot_cam2cam = glm::rotate(glm::mat4(1.0f), glm::radians(180.0f), glm::vec3(1.0f, 0.0f, 0.0f));                                                                                ^ In file included from /usr/include/glm/gtc/quaternion.hpp:434:0,                  from dense_depth_priors_nerf-master/preprocessing/io_colmap/src/colmap_reader.cpp:6: /usr/include/glm/gtc/quaternion.inl:560:33: note: candidate: template<class T, glm::qualifier Q> glm::tquat<T, Q> glm::rotate(const glm::tquat<T, Q>&, const T&, const glm::vec<3, T, Q>&)   GLM_FUNC_QUALIFIER tquat<T, Q> rotate(tquat<T, Q> const& q, T const& angle, vec<3, T, Q> const& v)                                  ^~~~~~
I install glm by sudo apt install libglm-dev. Finally glm-0.9.9~a2-2 is installed. But it seems that it is not suitable for this program.  Could you tell me how you install the glm or how you build the environment of preprocessing?

Hello,
Could you please explain how you resolved this issue?
I'm facing the same error.
Thanks!

I build GLM library from source code instead of apt install libglm-dev.


DigitalOcean dynamic inventory provision playbook uses invalid droplet size

In file dynamic-inventory/digitalocean/provision.yml, the size is no longer accessible.
Suggest replacing
size: 1gb

with
s-1vcpu-1gb

Thanks for filing this issue; I'll get it tested and updated soon!

Thanks for filing this issue; I'll get it tested and updated soon!


Enha: Remove hat, unicorn, and necklace from inventory

What would you like to see changed in one sentence?
Remove hat, unicorn, and necklace from inventory
Elaborate on your suggestion above as needed.
After a discussion with the two PIs on 24th October, it was decided to remove the personal items (hat, necklace, unicorn (in case of group change) from the inventory. However, the goggles will still be displayed there.

Which aspect(s) of the project is this enhancement affecting?
game-gameplay
Code of Conduct

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

@fortwoone since I'm already working on #246 , I'll reassign it to me.


Recovering sender of a legacy (type 0) transaction fails

Version
development ethers version:
ethers v0.17.0 (https://github.com/gakonst/ethers-rs?rev=afdab2a555c10d55a32c5991282b4353a4a81256#afdab2a5)
Description
Seems like the code to recover the sender of a transaction doesn't work if it's a legacy transaction.
Let's use https://etherscan.io/tx/0x280cde7cdefe4b188750e76c888f13bd05ce9a4d7767730feefe8a0e50ca6fc4 as an example, we can access the raw RLP in Etherscan: https://etherscan.io/getRawTx?tx=0x280cde7cdefe4b188750e76c888f13bd05ce9a4d7767730feefe8a0e50ca6fc4
Here is a test to reproduce:
#[test]
fn test_rlp_decoding() {
    use ethers::types::*;

    let raw_tx = "0xf9015482078b8505d21dba0083022ef1947a250d5630b4cf539739df2c5dacb4c659f2488d880c46549a521b13d8b8e47ff36ab50000000000000000000000000000000000000000000066ab5a608bd00a23f2fe000000000000000000000000000000000000000000000000000000000000008000000000000000000000000048c04ed5691981c42154c6167398f95e8f38a7ff00000000000000000000000000000000000000000000000000000000632ceac70000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006c6ee5e31d828de241282b9606c8e98ea48526e225a0c9077369501641a92ef7399ff81c21639ed4fd8fc69cb793cfa1dbfab342e10aa0615facb2f1bcf3274a354cfe384a38d0cc008a11c2dd23a69111bc6930ba27a8";
    let mut decoded_tx = ethers::utils::rlp::decode::<Transaction>(
        &raw_tx.parse::<Bytes>().expect("unable to parse raw tx"),
    )
    .expect("unable to decode raw tx");
    decoded_tx.recover_from_mut().unwrap();
    decoded_tx.hash = decoded_tx.hash();
    dbg!(&decoded_tx);
    assert_eq!(
        decoded_tx.from,
        H160(
            b"\xa1\x2e\x14\x62\xd0\xce\xd5\x72\xf3\x96\xf5\x8b\x6e\x2d\x03\x89\x4c\xd7\xc8\xa4"
                .clone()
        )
    );
    assert_eq!(decoded_tx.value, U256::from(884487398604084184u64));
}

The test fails, but the from address that I check for is the sender of the transaction (Etherscan confirms), so it means that ethers is incorrectly recovering the sender.

Thanks!

Actually can we reopen?
I can confirm the from address that you recover changed after the fixes above, but if you run the test above it's still an incorrect sender that's recovered.

oh right, the issue is still in the default decode impl,
only fixed decode_signed for LegacyTransaction...


Qt6: toggle of layer visibility broken: can click to hide, but can't re-show

🐛 Bug
If you toggle a layer to invisible using the GUI visibility icon (the eye) in the layer list, the layer is properly hidden and the icon switches to the crossed-out eye (dimmed). This is all correct.
However, clicking again doesn't set it back to visible though.
To Reproduce
Steps to reproduce the behavior:

install Qt6 backend, like pyside6
install napari
open/make any layer.
Toggle visibility to hide the layer
try to re-show the layer

Expected behavior
Clicking the icon should toggle visibility off and then back on.
Environment
napari: 0.5.0a1
Platform: macOS-13.1-arm64-arm-64bit
System: MacOS 13.1
Python: 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:26:40) [Clang 14.0.6 ]
Qt: 6.4.2
PySide6:
NumPy: 1.24.1
SciPy: 1.10.0
Dask: 2023.1.1
VisPy: 0.12.1
magicgui: 0.6.1
superqt: unknown
in-n-out: 0.1.6
app-model: 0.1.1
npe2: 0.6.2
OpenGL:

GL version: 2.1 Metal - 83
MAX_TEXTURE_SIZE: 16384

Screens:

screen 1: resolution 1680x1050, scale 2.0

Settings path:

/Users/piotrsobolewski/Library/Application Support/napari/nap-test_7c76622a0687875ccda8795c7fa273700326cf80/settings.yaml

Additional context
I also checked with pyside6 & pyqt6 in python 3.10—same behavior.
I think this bug may be related to the open PR https://github.com/napari/napari/pull/5541
Will investigate.

I can reproduce this.
For anyone in need of a workaround, right-click -> "Toggle visibility" does still seem to work.

Update: I was able to adress this here https://github.com/napari/napari/pull/5541 The visibility toggle is essentially a checkbox so the same issue was responsible for this. Ironically the test was correct, so we didn't pick up this bug in CI. The PR is approved and should be merged shortly.


Failing ledger.add() Tests

Seven test cases to add ledger entries currently fail and are excluded in the test suite. See:
https://github.com/macxred/cashctrl_ledger/blob/ccb4397/cashctrl_ledger/tests/test_ledger.py#L26-L56

ids 1, 10 and 23: Transaction with CHF currency is correctly sanitized, but when reading - CHF is converted to foreign currency amount and recalculated to USD.
id 3, 9, 18, 22:  API call failed with message total debit (...) and total credit (...) must be equal.

Problem with id=9
The test ledger entry with id=9 is also ill defined in pyledger:
https://github.com/macxred/pyledger/blob/daa67dddc/pyledger/tests/base_test.py#L56-L58
The amount on the second line needs to be multiplied with -1.
id,       date, account, contra, currency,      amount, report_amount, tax_code, description, document
 9, 2024-07-01,    1010,       ,      EUR,     1500.00,              ,         , Sale at mixed VAT rate, /invoices/invoice_002.pdf
 9,           ,    4000,       ,      EUR,    -1000.00,              ,  OUT_STD, Sale at mixed VAT rate, /invoices/invoice_002.pdf
 9,           ,        ,   4000,      EUR,      500.00,              ,  OUT_RED, Sale at mixed VAT rate, /invoices/invoice_002.pdf

Instead of:
id,       date, account, contra, currency,      amount, report_amount, tax_code, description, document
 9, 2024-07-01,    1010,       ,      EUR,     1500.00,              ,         , Sale at mixed VAT rate, /invoices/invoice_002.pdf
 9,           ,    4000,       ,      EUR,     1000.00,              ,  OUT_STD, Sale at mixed VAT rate, /invoices/invoice_002.pdf
 9,           ,        ,   4000,      EUR,      500.00,              ,  OUT_RED, Sale at mixed VAT rate, /invoices/invoice_002.pdf

Fixed the problem for test ledger transaction with id=3.
See green check mark in github action: https://github.com/macxred/cashctrl_ledger/actions/runs/12262462859
Necessary changes:

https://github.com/macxred/pyledger/commit/ff9f4b5f53
https://github.com/macxred/cashctrl_ledger/commit/32581b8d2

Test with test ledger transaction with id=23 requires sanitisation before being added to CashCtrl.

See sketch in https://github.com/macxred/cashctrl_ledger/commit/82610a2.
The test now fails, since we have split transaction 23 into multiple transactions.
We could change the validation procedure: rather than asking for identical transaction, we could ask for identical account balance as a Memory ledger instance.

Test with test ledger transaction with ids=18 and 22 highlights a problem in sanitize_ledger. Thos ledger entries are altered when passed to sanitize ledger. See report_amount in below example.
from cashctrl_ledger import ExtendedCashCtrlLedger
from pyledger.tests import BaseTestLedger

ACCOUNTS = BaseTestLedger.ACCOUNTS.copy()
# Set the default root node, as CashCtrl does not allow the creation of root nodes
ACCOUNTS.loc[:, "group"] = "/Assets"
# TODO: Remove when Assets will be implemented
ACCOUNTS.loc[ACCOUNTS["currency"] == "JPY", "currency"] = "USD"

TAX_CODES = BaseTestLedger.TAX_CODES.copy()
# Assign a default account to TAX_CODES where account is missing,
# CashCtrl does not support tax codes without accounts assigned
default_account = TAX_CODES.query("id == 'IN_STD'")["account"].values[0]
TAX_CODES.loc[TAX_CODES["account"].isna(), "account"] = default_account

# self = engine = CashCtrlLedger()
self = engine = ExtendedCashCtrlLedger(transitory_account=9999)
engine.restore(settings=BaseTestLedger.SETTINGS, accounts=ACCOUNTS, tax_codes=TAX_CODES, price_history=BaseTestLedger.PRICES)
# Hack: when updating reporting currency transitory account currency should be updated
engine.transitory_account = 9999
api = engine._client
ledger = BaseTestLedger.LEDGER_ENTRIES.query("id == '18'")
ledger

##     id       date  account  contra currency  amount  report_amount tax_code                         description document
## 30  18 2024-09-10     1020    <NA>      JPY     0.0           5.55     <NA>  Manual Foreign currency adjustment     <NA>
## 31  18 2024-09-10     <NA>    8050      USD    5.55           <NA>     <NA>  Manual Foreign currency adjustment     <NA>

engine.sanitize_ledger(ledger)

##     id       date  account  contra currency  amount  report_amount tax_code                         description document
## 30  18 2024-09-10     1020    <NA>      JPY     0.0            0.0     <NA>  Manual Foreign currency adjustment     <NA>
## 31  18 2024-09-10     8050    <NA>      USD   -5.55           <NA>     <NA>  Manual Foreign currency adjustment     <NA>

ledger

##     id       date  account  contra currency  amount  report_amount tax_code                         description document
## 30  18 2024-09-10     1020    <NA>      JPY     0.0            0.0     <NA>  Manual Foreign currency adjustment     <NA>
## 31  18 2024-09-10     8050    <NA>      USD   -5.55           <NA>     <NA>  Manual Foreign currency adjustment     <NA>

Test with test ledger transaction with ids=1 and 10 use JPY, which is not properly defined.
from cashctrl_ledger import ExtendedCashCtrlLedger
from pyledger.tests import BaseTestLedger

ACCOUNTS = BaseTestLedger.ACCOUNTS.copy()
# Set the default root node, as CashCtrl does not allow the creation of root nodes
ACCOUNTS.loc[:, "group"] = "/Assets"
# TODO: Remove when Assets will be implemented
ACCOUNTS.loc[ACCOUNTS["currency"] == "JPY", "currency"] = "USD"

TAX_CODES = BaseTestLedger.TAX_CODES.copy()
# Assign a default account to TAX_CODES where account is missing,
# CashCtrl does not support tax codes without accounts assigned
default_account = TAX_CODES.query("id == 'IN_STD'")["account"].values[0]
TAX_CODES.loc[TAX_CODES["account"].isna(), "account"] = default_account

# self = engine = CashCtrlLedger()
self = engine = ExtendedCashCtrlLedger(transitory_account=9999)
engine.restore(settings=BaseTestLedger.SETTINGS, accounts=ACCOUNTS, tax_codes=TAX_CODES, price_history=BaseTestLedger.PRICES)
# Hack: when updating reporting currency transitory account currency should be updated
engine.transitory_account = 9999
api = engine._client
ledger = BaseTestLedger.LEDGER_ENTRIES.query("id == '1'")
engine.ledger.add(ledger)

Traceback:
  File "<stdin>", line 1, in <module>
  File "/Users/lukas/macx/cashctrl_ledger/cashctrl_ledger/ledger_entity.py", line 52, in add
    return self._add(data)
           ^^^^^^^^^^^^^^^
  File "/Users/lukas/macx/cashctrl_ledger/cashctrl_ledger/extended_ledger.py", line 103, in _ledger_add
    return super()._ledger_add(incoming)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukas/macx/cashctrl_ledger/cashctrl_ledger/ledger.py", line 443, in _ledger_add
    payload = self._map_ledger_entry(entry)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukas/macx/cashctrl_ledger/cashctrl_ledger/ledger.py", line 803, in _map_ledger_entry
    "currencyId": self._client.currency_to_id(currency),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukas/macx/cashctrl_api/cashctrl_api/cashed_client.py", line 447, in currency_to_id
    raise ValueError(f"No id found for currency: {name}")
ValueError: No id found for currency: JPY

CashCtrlLedger.sanitize() does not invoke parent method

Implemented in macxred/cashctrl_ledger#98

Implemented in macxred/cashctrl_ledger#98


Add runtime value interface to m3cluster

cc @cw9 @jeromefroe @martin-mao
This PR adds the runtime value interface to m3cluster, which provides the ability to watch / unwatch updates and process the updates using the configurable unmarshalling function and processing function.

Coverage increased (+0.2%) to 89.71% when pulling 8b0f3f1a01e3ca14a42da66631c0afdb719c4442 on xichen-runtime-value into a387578dabe9439fbbd673cef9136ddac43c1992 on master.

Coverage increased (+0.2%) to 89.707% when pulling 5a2e504d7e9f03a7824f187724e306fb352cc07d on xichen-runtime-value into a387578dabe9439fbbd673cef9136ddac43c1992 on master.

Coverage increased (+0.3%) to 89.834% when pulling 108f45419241f43f9de0dbe1f166178b0fc3a9d0 on xichen-runtime-value into a387578dabe9439fbbd673cef9136ddac43c1992 on master.


Speculative fix for unresponsive pty host

This pushes the polling for Windows terminal shutdowns into TerminalProcess
itself so it's not possible to shutdown a Windows terminal immediately.
Part of #117956
This seems like it will cover the following cases:

Kill command
Quick access kill

I've seen reports that this happens when debugging stops which I didn't think uses those though.

Forgot this wasn't merged, I expect this to be harmless but may help reduce unresponsiveness


After install, can't get menubar icon to respond to clicks

I'm sure I'm just incompetent at working with electron apps like this and am missing something obvious. But when I start with npm run start the app launches into my menu bar, nice, but clicking on it doesn't do anything. I am just completely missing where I can do step 5 of the instructions Once the program is running, click on the menu choice "IP Settings" and input your light's IP address.
Realize the dev is probably busy, so will try to keep hunting for how I can diagnose what I'm doing wrong, but really don't know anything about electron apps and how to debug.

Thanks @paul-brenner .  You definitely found a bug and I'm scratching my head wondering how this app ever worked.  My guess is that during development my code saved the IP address of my light which allowed the app to work.  On a new install, like yours, without that IP address cached the menu wouldn't display.  Please reclone the repository and try again.


Feature/setup as shell

resolves #120
This has a couple of changes from Alex's work:

supports more cmd-line arguments, including long arguments
detaches docker-compose gracefully
generates a vrt.json file

It also has a downside, it cannot be re-run once the db directory exists. The vrt.json generation code doesn't work then. Any ideas on how to fix this?
Tested on macOS.
Will test on ubuntu tomorrow.
Do you have access to WSL?

It also has a downside, it cannot be re-run once the db directory exists. The vrt.json generation code doesn't work then. Any ideas on how to fix this?

for me it's fine if script works only once and then just calls docker-compose up in case all files are there
config file will be posible to copy from frontend on next release

Changed target branch to release-4.7.0 in order to gather all changes for regression testing before release

Tested now on:

Ubuntu 18.04.5

works as expected!


Ignore Doxygen Long Lines

There is a special command in Doxygen that allow documentation to be copied from another function but the full declaration must be put on one line. This result in an error in cpplint but to solve the error // NOLINT must be put on the line, which means that Doxygen fails to pick up the overload. This ignores any single line Doxygen documentation copy commands:
/// @copydoc SomeOverloadFunction(const int lots, const int of, const int lengthy, const int parameters)

See https://github.com/tkruse/cpplint/tree/doxygen


voicemail

maybe put this down the road or on horizen. thinking that I may be asked this at some point either by port city/south coastal or new england. could be nice if for some reason it cycles through and no helpline volunteer picks up it gos to a voicemail, that would then notify the helpline volunteer chair either by txt, email or both. with a link to were the voicemail file resides. maybe a super basic web interface.

this is do-able

cool if i do get asked ill tell them that, the south coastal area directed PR to go ahead with new phoneline, just set up a twilio for them and as they have no website, and port citys website is squarespace i will be sitting their yap on the crna.org

this is implemented in yap 2.0, latest unstable.  It does not include notifications however.  That will be a separate set of changes.

you can listen to the recordings from within the twilio console as well
https://www.twilio.com/console/voice/recordings/recording-logs

cool this worked!! I did get a Schema validation warning 'Element 'Record' must have no character or element information item [children]' on line 11

ok, i'm sort of opposed to implementing emailing in this right now.  i'm going to set up an SMS notification to the helpline chair route.

and i know what the issue is with the warning

pushed a fix

yea as far as instant notification an sms is probably more ideal for now anyway

notifications implemented, you will see a new option in the service body configuration for a primary contact number

Tested this with notifications and working fine as well


How to make preview route invisible in Production

I have a kitchen-sink route for developing/testing out common components in our application. I'm not sure how to make the route invisible on production server. I want the kitchen-sink to be visible only on development and staging.
Please, your help is appreciated

Something like this?
const routes = module.exports = require('next-routes')()

routes
.add('about')
.add('blog', '/blog/:slug')

if(process.env.NODE_ENV !== 'production') {
  routes.add('secret')
}


[occm] Set --use-service-account-credentials=false

What this PR does / why we need it:
The above option seems to be causing CCM to create clients using ServiceAccount from the kube-system namespace, so requires users to either run in kube-system namespace, or manage 2 ServiceAccounts, one in kube-system and other in regular CCM namespace. See [1].
This commit changes this setting.
/hold
[1] https://github.com/kubernetes/cloud-provider/blob/c3862938334ba18226098015193374fda40ab7a9/options/options.go#L230-L237
Which issue this PR fixes(if applicable):
fixes #2560
Special notes for reviewers:

Release note:
OCCM is by default no longer run with `--use-service-account-credentials=true`, meaning that it will use the ServiceAccount specified in the DaemonSet. This means that you can stop managing the additional ServiceAccount in the `kube-system` namespace.

I still have to validate that this is the culprit, but there's a high chance it is. We've copied AWS manifest, blindly copying this option, but AWS manifest seems to override it in a patch: https://github.com/kubernetes/cloud-provider-aws/blob/234a39835a0ef28eea15424f83e9cb96be37d386/examples/existing-cluster/overlays/superset-role/aws-cloud-controller-manager-daemonset-patch.yaml#L16

/hold cancel
I just validated that this makes sense for OpenShift.

/approve

/hold cancel
Okay, this might be the way to go upstream here.

/lgtm

/retest

/test pull-cloud-provider-openstack-check


Add more unlock methods

I have a Doorman v2n ("Doorman Classic"), and just migrated from Verisure to the Yale module and this integration.
I have tested operatiing the lock using various methods - tags, code, manual unlock, mobile app etc.
It seems like both using a tag and doing a manual unlock is reported in HA as operator method = mobile
I guess that is because of this final "else":
        else:
            attributes[ATTR_OPERATION_METHOD] = OPERATION_METHOD_MOBILE_DEVICE

https://github.com/home-assistant/core/blob/6752af8f27516be52600c1782f160d724760e869/homeassistant/components/august/sensor.py#L224-L225
And it seems like the other methods are not reported by yalexs:
https://github.com/bdraco/yalexs/blob/4ea45b2fc6af504f0a086c1e9a889eb2f30c56d3/yalexs/activity.py#L423-L436
However, they seem to be defined:
https://github.com/bdraco/yalexs/blob/4ea45b2fc6af504f0a086c1e9a889eb2f30c56d3/yalexs/activity.py#L59-L78
The thumbnails i see for both manual unlock:

and tag:

seems to represent the correct unlock method, so I think the lock is actually reporting the right method.

We likely have many of the in the list but they may not be mapped (correctly?) to a lock or unlock operation.
I don't have a doorman (they are not sold in the US market) so support has been the effort of other contributors opening PR as well as what little information I've been able to glean from logs and diagnostics

If you can add test fixtures for the pubnub messages and activity api from your testing results, I can help you get a PR merged

closed via https://github.com/bdraco/yalexs/pull/87


{Storage} Change api version range for storage account kind

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

@Juliehzl  Do you run the existing recorded tests against azure live before the release?

add to S166.

@Juliehzl Do you run the existing recorded tests against azure live before the release?

I have test for the target profile in public Azure Cloud as you can see in files. But it is hard for me to test on Azure Stack because we don't have Azure Stack account now.


Remove check for unicode_normalize to be required

This check is no longer needed, because the relevant functionality has been moved to C code in string.c. This check blocks the removal of enc/prelude from the list of files used in the prelude.
(see https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58559 and https://travis-ci.org/ruby/ruby/builds/228602567)

This is just a side comment, but to me, it looks as if tests like this should not be needed, because they test implementation internals rather than actual functionality.

I somewhat agree it's an implementation detail, but there is a compatibility risk.
Will
ruby -e 'require "unicode_normalize"'

work after the removal of lib/unicode_normalize.rb?
I believe that's the role of provided features, to avoid this potential compatibility breakage.

On a side note, I wonder about https://github.com/ruby/ruby/commit/5fee67c9bade0337b5c2c88a7fa1c1068b477803.
There must be a way to have the documentation properly included from a Ruby file, what is the problem?
FWIW moving it to C means every not-in-C Ruby implementation will have to re-implement it.

ruby -e 'require "unicode_normalize"'
will not work after removal, but it's not necessary before. What would have been the point of it, because the prelude does it already. (I could understand if somebody did "require 'lib/unicode_normalize/normalize.rb' to preload the tables.)
As for documentation, see https://bugs.ruby-lang.org/issues/11078 for details about what works and what doesn't work.
As for moving it to C, other implementations can still use the Ruby version, which is easier and shorter.

@duerst This is a 2.5 change, yes?

@headius Yes.
@duerst OK, I just wanted to make sure this is fine to break.
FWIW since http://ruby-doc.org/stdlib-2.4.1/ lists unicode_normalize as a stdlib then people might have added such a require statement.

As for moving it to C, other implementations can still use the Ruby version, which is easier and shorter.

But therefore have to maintain it and any change in C might need to be reflected in the Ruby verson.
Hopefully this is quite minimal for such an API, but still this seems the wrong fix to me. It's just my opinion though.

Closed in favor of #434.

@eregon: I created a new pull request at https://github.com/ruby/spec/pull/434, to make this version-dependent.
http://ruby-doc.org/stdlib-2.4.1/ indeed lists unicode_normalize as a stdlib, but that's actually wrong. I think the problem with the documentation was fixed in https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58329.
The files are just under lib/ because there was no better way to put them. @headius: As for which files are required at what point in time, and where they are placed, that's totally an implementation issue. I decided that for MRI, I wanted to do lazy loading for the tables (unicode_normalize/tables.rb), to reduce the memory footprint, but other implementations may decide differently. Also, there's absolutely no need to change the implementation of what was in lib/unicode_normalize.rb for other implementations. I just did it to improve the documentation, but would be happy to move back if the documentation tools catch up with such cases.

See https://github.com/ruby/spec/pull/435 for a new pull request that passes CI (contrary to https://github.com/ruby/spec/pull/434, sorry).


Update introduction.md

removed type casting and it works. Originally, being new to flutter, I was unsure if I needed a string in `TextField
uploaded a repo for confirmation @ https://github.com/brnt-toast/flet_counter

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Why are you doing addition in minus_click and subtraction in add_click functions?


Improvements on saving/loading options

It would be nice if we add a button to 'use current values for new games' like the real time mode:

Also I think it would be more organised to save/load data not by index but rather by dictionary keys. We should also have a class for backward compatibility to load from old saves.

The fact that there is a lot of repeated code around is not helping the cause. Encapsulation can reduce a lot of such redundancies.

Yes, I would love this, and it's something users have asked for many times over the years.
@kvakvs recently split the mod options in to separate files for the various tabs as part of multiple massive code clean-ups, so he probably knows most about the current system if you need infos on that.
I guess the big chore will be making it backwards compatible (ie. load old versions of settings, and there are several old versions of settings).
If we adopt something similar to what Real Time does, it has a central method that deals with config version compatibility so it's really clear what changes from version to version.

@aubergine10

@kvakvs recently split the mod options in to separate files for the various tabs as part of multiple massive code clean-ups, so he probably knows most about the current system if you need infos on that.

is there any issue regarding this. I didn't manage to find any. I'd like to @kvakvs code.

Yes, the code that is already in master branch is the latest which includes the huge cleanup that kvakvs did some months ago.
I was meaning that if you have any questions on any of the config stuff, kvakvs is probably best person to ask as he had to pick through a lot of that stuff during the code cleanup.

@aubergine10 lets move the discussion #1267 to here:

Example: Go look at GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup vs. Options.scanForKnownIncompatibleModsEnabled and how they both interact.

that sounds unreasonable. Is this a bug?

Maybe we should move them to options csv file for consistency.
First I'd need to know why it's done that way currently.

Providing support for alternate translation is no big deal. I can give the option for user to enter the translated label or provide translation delegate. but first we need to see if we really need it.

Notable example is the GlobalConfig.Instance.Main.DisplaySpeedLimitsMph option which has locale Translation.SpeedLimits.Get("Checkbox:Display speed limits mph").

@krzychu124 @kvakvs @DaEgi01 Do you think we should put all option translations under options.csv or do you think some options should be under speed limit csv?

@aubergine10 some stuff about the CheckboxOption that you might be already aware of but I say it anyway just in case:

you can add your own events to run after the default event. eg: Handler = UpdateDedicatedTurningLanePolicyHandler,

you can also remove drop the default handler AFTER instantiation if you want (but I don't think if there is any use case.)

this is TRANSITIONAL code. ultimately I want to drop the Options class and use the SerializableUIOptionBase as single source of truth. I want to use xml both for in game stuff and global stuff. (basically what this issue says we should do)

As for global VS in game. some options are global only. In future if we change in game options from main menu it should be used as basis for new game.

@krzychu124 @kvakvs @DaEgi01 Do you think we should put all option translations under options.csv or do you think some options should be under speed limit csv?

The speed limits option was used in both Options tab, and in Speed limits UI. This might be not true anymore. But the hassle of moving string with all translations... doing that via CSV editor instead of Crowdin...
If its still used in both places the only solution that would fix your concern, would be duplicating string in both files. If its now only used in options, then you can safely move it, no problem.

IMO, all translations relating to options should be in Options.csv - but we can sort that out as subsequent task.
I'm currently working on porting all the options to the new UI format (eg. CheckboxOption) and will send that in as subsequent PR after #1267.
For persistency, there's 3 tangible situations:

None (eg. debug options which could be set in-game via a UI)
Global-only (eg. Language setting)
Global and Savegame (most settings)

(A fourth would be Savegame-only but I can't see any situation where that would be required)
Tagging: #1268 , #1262 , #1240 , #813 , #689 , #659 , #363 , #281 , #190 , #69 , #62

So, I've been chipping away at a mock of how things might look if we approched settings the same way as Real Time mod, and I don't think that's going to work for us:

Many of our settings need to invoke code when changed; the attribute-driven UI approach isn't particularly good for that

I know we can use a naming convention to automagically invoke change handlers, but that's still icky imo

We have vastly more settings - not just those shown on options tab, but also all the little microadjustment settings in global config, and the debug settings too
We could potentially end up with 3 settings screens:

Mod options
Advanced stuff - a UI for micro settings in global config
Debug - eg. setting debug switches via in-game UI without need to fiddle with config xml

We have some settings that don't persist (debug stuff), some that should always be global (eg. language), some that should be game/global depending on where user changes them

My suggestion would be an attribute that specifies persistence type (no attribute = no persistance), for example:
[OptionPersistance(Persist.GlobalAndSavegame)]
public bool someSetting { get; set; }

If UI updates that option via in-game pause menu, the change only gets stored in save game on next save / autosave. If they change it via main menu, it would immediately persist to global config.
If the setting were Persist.GlobalOnly then whenever it changes (via UI)  it should immediately persist to global config, regardless of whether user is in-game or not.
Persistance would generally be triggered by UI which handles the change. The UI should be separate, eg. each tab in mod options has it's own file using the new UI stuff such as CheckboxOption.
Does that match more or less what you were thinking?

I don't think our code should look like real-time mod. just that we should have the functionality to set options for new game.

Yup, like I said in previous comment, I don't think the Real Time approach will work for us.


Future of metrics 4.0 and metric tags

What is the planned future for metrics 4.0. Looking at the history it looks like 4.0 was developing in the master branch https://github.com/dropwizard/metrics/tree/master It looks like the default branch was recently switched to a new 4.0-development branch that branches from the latest 3.X release.
My question here is what is the plan moving forward for metrics and are there any target release dates for a 4.0 release. Is the original work that was done in the master branch now dead and the plan is to move forward with 4.0-development?
Assuming that is true since it's the default branch, what is the plan for tag support? The new MetricName was added to master which allowed metrics to have tags which I think is the number one feature currently missing from metrics. More and more data sources support tags (opentsdb, influx, prometheus, etc) and the tag support enables many features in these data sources. I would really hate for tag support not exist in the metrics lib as it would significantly limit the flexibility of capturing metrics. So I'm hoping that there is plan to add tag support back into the 4.X release and if there isn't one, how can we work to get them back in.

Thank you for the question and your persistence in adding support for tags!
My plan was to release Metrics 4.0 as a cleaned up, Java 8, mostly API compatible version of Metrics 3.2. After that I wanted to proceed with breaking changes like support of tags. I actually very like the idea to add the native support of tags, because I see too how many modern time-series databases are shifting in this direction (and we have questions like #1165). I believe it's a major feature of the new generation of the  Metrics library and I will review/accept merge requests to add it.
I am afraid the master branch (with support for tags) is actually dead. It has a mix of bug fixes, improvements, new features, breaking changes and so on. It was the reason I started 4.0-development: to make the transition from 3.2 to 4.0 more clear for users and developers (at least the project's SCM history looks clean).
Regarding the release plan, I released only 2 alphas for 4.0 to the Maven Central (sorry, even without release notes). I think the best strategy would be to release Metrics 4.0 (I can do that more or less with the current state of the 4.0 branch), continue backward-compatible work there (for example the work on #1161), and then create a branch for Metrics 5.0 (tag support). I will then continue making  maintenance releases for the 3.2 and 4.0 branches. I think the strategy of small releases in different branches is better than making one big release with a lot of changes.
I've recently been busy with other things, but I will try to get more time to govern this project. So, the next action from my side would be to release 4.0 to the Maven Central and we can focus on adding support for tags for Metrics 5.0. Does this sound good for you?

Thanks for the explanation @arteam and at a high level I think this makes sense. Curious on your thoughts around timelines. Sounds like metrics 4.0 is almost ready to release within the next few weeks, at which point we can start building out 5.0. What's the idea on timelines for getting a 5.0 release. Is it going to be a long running branch where you plan on adding many breaking features or do you plan on following the strategy of making many small releases on the 5.0 branch as well?
Also more than happy to help get tag support into an official release of metrics, I think it will be a huge benefit for many users and help open up newer use cases for users.

Hi
What about the pull request that was submitted to master about collectd could that be included in the 4.0 branch as well?

I will accept a pull request to the 4.0-branch to include a collectd since it was already merged and I can't find a separately maintained alternative.

Created a pull request (#1231) for the metrics-collectd module, which was originally added by @dernasherbrezon.

Hey guys this looks great and things are merged! Any estimates when 5.0.0 will be available on maven?

Ah nevermind, I see the package has moved to: https://mvnrepository.com/artifact/io.dropwizard.metrics5/metrics-core

Glad to see 5.0 in maven repo. Any example code highlighting usage of tags in metric name?


[$2000] Android - Chat - back-to-back bold words don't always render as bold

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue found when executing PR https://github.com/Expensify/App/pull/15501
Action Performed:
Precondition:
Use the following sequence of b characters for completing each test:
*b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b**b*

Paste the b characters into the composer and remove any surrounding backticks and spaces.
Confirm that the comment counter displays as 15012, and that the length is exceeded.
Remove one b sequence from the comment. The comment should now be sendable.
Send the comment and confirm that the delivered message consists only of b characters formatted in bold.

Expected Result:
All 100% of b characters formatted in bold
Actual Result:
50% of b characters formatted in bold
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/222810485-03eec8cf-4f6f-4f70-a442-fca0a3882b18.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0199575fa523903823
Upwork Job ID:<PHONE_NUMBER>825824768
Last Price Increase: 2023-03-19

@sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

@sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

Will test tomorrow

I can reproduce the behavior.
On web the text appears 100% bolded, on android it's about 50% bolded

Triggered auto assignment to @puneetlath (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Is this specific to "b" characters only? Or does it apply for any character?
And does it only happen if you are at the limit. Or does it happen with any number of back-to-back bolded characters?

Also, is this an android-only issue?

Yes, this is Andriod app issue Only

I tested it with *h**h**h*, *a**b**c**d**e**f**g**h**i**j**k**l**m**n**o**p**q**r**s**t**u**v**w**x**y**z*, *Sonia* *Sonia* *Sonia* and all produced the same behavior. I cannot track down how many iterations of the bolded letter/string cause the bolding to fluctuate. In the screenshot bellow you can see that in the first message (54 words) the bolding falls off after 11 words. But testing with 12 words doesn't affect the bolding, nor does 18 or 24. In a message of 78 words the bolding falls off after 35 words.
I also tested with a paragraph of lorem ipsum. When I bold the entire paragraph as one (not each individual character/word) then the entire paragraph is correctly bolded.

Still waiting for proposals.

Just FYI, I'll be OOO Mar 17-25

A very interesting issue. At first, I assumed that this is a typical subtle UI react bug, and a few hours later I end up building React Native from source...

Hi @cubuspl42 yes feel free to share your findings. There hasn't been an accepted proposal yet. If we end up using your proposal (or part of it) we will pay you a partial bounty.

Hi @cubuspl42 yes feel free to share your findings. There hasn't been an accepted proposal yet. If we end up using your proposal (or part of it) we will pay you a partial bounty.

Thank you for clarification. I thought that removing "Help wanted" and calling Callstack means that the issue is closed for proposals

Until there is an accepted proposal from anyone, your work can be rewarded. We assign callstack often to older issues which do not get many proposals quickly which often means they require more investigation. Sorry for confusion.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Bold words inconsistency in chat message styles
What is the root cause of that problem?
For Android it seems that while rendering the html, it considers different styles which means for some elements it takes tagsStyles, and for rest it takes baseStyle.
https://github.com/Expensify/App/blob/bb8dff159a7424000ff981e8301d5e63d2aa5064/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js#L67-L68
I am able to reproduce the same kind of issue for android in expo snack here
https://snack.expo.dev/@pujan92/render-html-snippet?platform=android
What changes do you think we should make in order to solve the problem?
As the inconsistency seems to be occurring in the library react-native-render-html, I have raised the issue here.
https://github.com/meliorence/react-native-render-html/issues/626

@Pujan92 The issue is not in react-native-render-html, I've been there

It's possible that there's some workaround there, though, but I haven't yet given up on finding the root 😃

Yes @cubuspl42, got the reply for the raised issue and seems it persists with React Native here.
https://github.com/meliorence/react-native-render-html/issues/587

@puneetlath Actually, is any solution related with a PR to React Native an acceptable solution? As always, we'd have to wait till the next release to consume it (as switching to a fork might be to complicated in the case of React Native itself).
I've managed to build React Native (although the docs are outdated, I had to figure it out) and find the classes responsible for text presentation.
The bug itself is very intriguing, as the bolded/non-bolded parts seem to form a symmetric pattern at some point, which is a hint that a bug might be of arithmetic nature.
But I'd need some more time, especially that I'm having trouble with my computer (I'll be switching to a new one in a day or two).

@puneetlath I can confirm that issue happened on RN side.
Tested on simple example
return <Text>{b.map((a, index) => <Text style={{color: 'red'}} key={index}>{a}</Text>)}</Text>;

Same issue already been raised in RN repo: https://github.com/facebook/react-native/issues/33418

I also confirm that

Ah cool thanks. Can you make a proposal for how we can fix it in react native?

Ah cool thanks. Can you make a proposal for how we can fix it in react native?

I can and I will, but currently I'm working (being assigned) on another issue. Not anything super big, though. This one is next in line for investigation. And, quite naturally, finding and fixing a root cause inside a framework like React Native requires a bit more work than things "closer to the surface".
Currently, I wouldn't be able to fill properly the section "What changes do you think we should make in order to solve the problem?", as I have only a trail: virtual & non-virtual text nodes construction in ReactAndroid from multiple Text components. But that's a trail, not a set of changes (yet!).

@puneetlath someone is already started a thread and fixes for similar issues https://github.com/react-native-community/discussions-and-proposals/issues/495#issuecomment-1363027413 - one note to keep in mind, that it's not about only bold text, it's about all possible styling which can be applied from markdown to android Text component. And also to make it's working (if someone will provide a proper solution) - it will be needed to fork rn-render-html and change RN to expensify fork

@puneetlath I've located the root cause of the issue. In the very, very beginning of my investigation, I had an ituition that it's an 8-bit overflow, as that's what came out from experimenting with finding the shortest string that caused the bug to occur. It felt connected with number 255.
It actually is an 8-bit overflow.
Tommorow I'll start thinking of possible fixes. This code just doesn't work for more than 85 children text nodes per parent, as it's using three prioretized spans per node, and the limit of priority values of Spannable is 255.

Ah wow, nice find!

I got some feedback on a solution idea from the React Native engineer, but a very early one. In general, the situation looks quite promising. The React Native team is thinking forward; the solution would have to be applied to both legacy Paper renderer and the new Fabric renderer. But that's doable. I'm not sure yet about the possibility to have a fix back-ported to the 0.71 branch, but that doesn't sound unrealistic (yet).
Summing up, the wheel keeps turning and soon we'll know more facts.
In the context of this issue, this will help make an informed decision on whether to:

wait for the upstream
fork
or workaround

I'm still hoping that the first option can be made realistic.

or workaround
Never this!

wait for the upstream
fork
Is it being actively worked on? If not, can we go ahead and submit an upstream PR?

@puneetlath The upstream PR is already there, but it should be considered a draft. I'm not planning on doing much there before the reviewer comes back from vacation. This is the most inner part of React Native's text handling module, so it really needs a solid review.
When they come back, we'll figure out how to port this to Fabric and how this can be backported. And everything else.
Actually, we can even add a "HOLD" tag to this issue, if you find this appropriate.

Ok cool. Let me see if I can help get some reviews.

@puneetlath @cubuspl42 @sonialiap @thesahindia this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Decide whether any proposals currently meet our guidelines and can be approved as-is today
If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

Current assignee @thesahindia is eligible for the Internal assigner, not assigning anyone new.

Current assignees @puneetlath and @sonialiap are eligible for the External assigner, not assigning anyone new.

Current assignee @thesahindia is eligible for the External assigner, not assigning anyone new.

@puneetlath, @cubuspl42, @sonialiap, @thesahindia Eep! 4 days overdue now. Issues have feelings too...

As per their status on the GitHub profile, the upstream PR reviewer is still on vacation. But, intuitively, he should be back in the near future so we'll be ready to take the next steps in the upstream.

Sounds good, thanks for the update.

Our guy is back, I bumped the upstream thread.

@puneetlath Are we fine with the changes appearing on 0.72.x, or whatever comes from applying the solution only on top of react-native main branch? I've seen some issues put on hold on 0.72, so I guess we'll be rebasing the fork on 0.72?
To be honest, I'm not really sure what we're forking on.

@puneetlath, @cubuspl42, @sonialiap, @thesahindia Still overdue 6 days?! Let's take care of this!

@puneetlath, @cubuspl42, @sonialiap, @thesahindia 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@puneetlath, @cubuspl42, @sonialiap, @thesahindia 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

I'm waiting for a round of review after rebasing the solution on main and applying the first set of suggestions. As the bug lies in the very core of RN Android text rendering, we're extra careful not to break the framework in corner cases.
I just bumped the PR tagging the reviewer.

Thanks for the update @cubuspl42

@cubuspl42 any luck with the review?

@puneetlath The review is taking longer than I hoped. No word from Facebook's side since my last bump. I bumped the thread again, but I suggest switching to plan B.

Let's give the reviewer time to reply until the end of the week
If he doesn't reply, I'll implement the idea I mentioned here anyway. It should minimize the chance of any undesired observable behavior changes to close to zero, while still fixing the discussed bug
Then...

...I submit that to the upstream PR
...but at the same time we can start an internal PR on our fork

What do you think? This way we could unblock our issue, leaving the long-term upstream review asynchronous.

Looks like he's engaging, so let's wait a bit more before opening the PR on our fork.

@puneetlath
I decided to provide an alternative approach, which is much simpler (while less general), more backward-compatible in corner cases, but most importantly still fixes the Expensify issue we're discussing.
A more general solution could be a potential next step that the React Native team can consider.
I hope that this will speed up the process.

@puneetlath

https://github.com/facebook/react-native/pull/36656 is merged
For the purpose of a final test, I applied the commit in its final merged form (a105c45ace02eeb71fea1e012e8e6a9c555a1916) on top of v0.71.2-alpha.3:

https://github.com/Expensify/App/assets/2590174/623b022d-58a4-48c5-991f-4e3b8daf16b8
What should be the next step? Should we wait for this change to be eventually picked up organically, or should I create a PR to our fork with a cherry-pick?

Nice!! Great job getting that merged upstream!
Do you know how RN releases work? When could we expect it in a release?

@puneetlath The React Native team is focused on releasing 0.72 now, and I don't think this change has any chance of being included, as it reached a Golden Release Candidate stage. So my guess would be 0.72.1.

I filed a "pick request".
According to this comment in a similar thread, a realistic timeline might be 0.72.rc6 if rc6 will be needed, or 0.72.1 otherwise.

Nice! Let's go ahead and get you paid out @cubuspl42

@cubuspl42 I've sent you a contract. @sonialiap can you please pay it out once @cubuspl42 accepts?
@thesahindia I didn't send you one since I don't think you were involved. Please let us know if I'm mistaken in that.
Really great job with this one!

Also @sonialiap let's keep this open until we've confirmed that it has been incorporated in RN upstream.

@sonialiap I've gone ahead and paid this. So we just need to keep it open to track that the upstream PR gets incorporated. I'll just leave it assigned to me for that.

We're still waiting for the upstream fix to be incorporated.

The fix should land in React Native 0.73


Make front-end responsive

Website must be responsive and adapt to various screen sizes.

Added flexbox to elements


Add pre-commit to CI

          Probably easiest with this: https://github.com/pre-commit/action

Then the GitHub action will do the same thing as what runs locally, but catches pushes from a client without pre-commit configured and those that pushed with --no-verify.  It'll run slower since it'll check all files, I think.  Maybe some extra configuration to compare against main and find a subset to run against.  But if it's fast enough that extra legwork may not be warranted.
Originally posted by @afuller-TT in https://github.com/tenstorrent/tt-umd/pull/192#discussion_r1810964098

If someone wants to do it on UMD, should be able to just copy/paste these lines from Metal: https://github.com/tenstorrent/tt-metal/blob/main/.github/workflows/all-static-checks.yaml#L11-L35
I've had that running for a little while now and seems good.

Closed as completed in #203


Update INSTALL.md

I lost myself in the internet abyss because of this imprecision. It might be helpful for the new noob trying to install that great tweak. :)

Thanks! :+1:


Can download file on button click?

Hi! Is this feature provided? I can not understand how to do it.

I think that I need to use the link() method and refer to the controller that will generate the file and give it to the user.

Yeah I do this with link. Just append an ID into the route ->link(“download/$this->id”)


Use only Nix?

I wonder, wouldn't it be more efficient to install Nix (as root) and then install the necessary packages for stage1 and 2 using Nix? Then there wouldn't be a need to download the ISO or to have squashfs.
The packages that make the ISO can simply be installed from the nixos channel, right?

On Fri, Mar 18, 2016 at 05:37:17AM -0700, Wout Mertens wrote:

I wonder, wouldn't it be more efficient to install Nix (as root) and then install the necessary packages for stage1 and 2 using Nix? Then there wouldn't be a need to download the ISO or to have squashfs.
The packages that make the ISO can simply be installed from the nixos channel, right?

I think a good deal of this could be changed to Nix, but certainly Nix
would end up using bash literals as well. With that said, I'm not very
good at Nix, so this ended up being in bash to be most portable.
If you'd like to cook up an Nix version, we can definitely talk about
bringing it in; I don't see why it wouldn't work.

@elitak made a sort of nixos-in-place with just Nix, see https://github.com/NixOS/nixpkgs/issues/2079#issuecomment-197597028 and the ensuing discussion.
Basically, you can build nixos-install while running on the host OS and then run it.

Note: I'm giving something like this a shot again, and so far I came up with
nix-build '<nixpkgs/nixos>' -A config.system.build.nixos-generate-config -I nixos-config=/nix/store/75yffgx3600s8cwdmmzz9803k88ppxmv-nixpkgs-20.09pre221814.10100a97c89/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix

to get nixos-generate-config from a regular nix install. nixos-install is the same.
So this just needs the nixos-in-place.nix configuration and a wrapper to call everything.
It would probably be better to move the installer scripts to a regular package though, that's easier than the above, and then it'd be something like nix-shell -p nixos-in-place to get everything in one go, no iso download needed.