Missing attestations

Describe the bug
Ever since moving from geth to reth a few months ago, my validator is occasionally missing attestations, averaging around one a day. I saw this behavior with alpha.8, alpha.10, alpha.12, and alpha.13. I'm running the latest version of prysm for consensus client. I'm using time.nist.gov as NTP server.
I cannot state for sure that this is reth's fault, but I didn't see this behavior with my same setup when running geth. I'm including INFO level logs around the time when I missed an attestation, for slot 8027743, corresponding to block 18833845. Please let me know if there's any other info I can share.
Thanks!
Steps to reproduce
Run a validator with reth + prysm and wait for missed attestations.
Node logs
2023-12-21T09:27:25.242484Z  INFO reth::node::events: Canonical chain committed number=18833343 hash=0x051c252e133ae86f455829cacfbad6bdedaba5518422e0019b32300763c0ea51 elapsed=421.326179ms
2023-12-21T09:27:25.242550Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x051c252e133ae86f455829cacfbad6bdedaba5518422e0019b32300763c0ea51 safe_block_hash=0x97aea22345cedc9e31cfd51b7d3e490e82da0ed8f2a137683afa739dbfb51a46 finalized_block_hash=0xb9b4d10ef06af762a237c2d467e7f6fecc67de002a551b34096f362b26ad519e status=Valid
2023-12-21T09:27:34.345443Z  INFO reth::cli: Status connected_peers=108 freelist=25452 latest_block=18833343
2023-12-21T09:27:37.325558Z  INFO reth::node::events: Block added to canonical chain number=18833344 hash=0xc3cb99cf0713fe96a5f497c80fc9472e2f2d669392a4a35e374bed066e3dd79a
2023-12-21T09:27:38.068749Z  INFO reth::node::events: Canonical chain committed number=18833344 hash=0xc3cb99cf0713fe96a5f497c80fc9472e2f2d669392a4a35e374bed066e3dd79a elapsed=516.024465ms
2023-12-21T09:27:38.068795Z  INFO reth::node::events: Forkchoice updated head_block_hash=0xc3cb99cf0713fe96a5f497c80fc9472e2f2d669392a4a35e374bed066e3dd79a safe_block_hash=0x97aea22345cedc9e31cfd51b7d3e490e82da0ed8f2a137683afa739dbfb51a46 finalized_block_hash=0xb9b4d10ef06af762a237c2d467e7f6fecc67de002a551b34096f362b26ad519e status=Valid
2023-12-21T09:27:38.101226Z  INFO reth::node::events: Pruner finished tip_block_number=18833344 elapsed=32.416934ms stats={SenderRecovery: (HasMoreData, 17500), Receipts: (Finished, 0)}
2023-12-21T09:27:48.801228Z  INFO reth::node::events: Block added to canonical chain number=18833345 hash=0xa00586e8849c4d089d4cbf11ee95790552ed02a73272036d54c10816386f8ee5
2023-12-21T09:27:49.377986Z  INFO reth::node::events: Canonical chain committed number=18833345 hash=0xa00586e8849c4d089d4cbf11ee95790552ed02a73272036d54c10816386f8ee5 elapsed=335.306759ms
2023-12-21T09:27:49.378031Z  INFO reth::node::events: Forkchoice updated head_block_hash=0xa00586e8849c4d089d4cbf11ee95790552ed02a73272036d54c10816386f8ee5 safe_block_hash=0x97aea22345cedc9e31cfd51b7d3e490e82da0ed8f2a137683afa739dbfb51a46 finalized_block_hash=0xb9b4d10ef06af762a237c2d467e7f6fecc67de002a551b34096f362b26ad519e status=Valid
2023-12-21T09:27:59.345801Z  INFO reth::cli: Status connected_peers=108 freelist=25470 latest_block=18833345
2023-12-21T09:28:01.132339Z  INFO reth::node::events: Block added to canonical chain number=18833346 hash=0x3e72d2157be6a501a2370dc16a7410b97a8e45dc1798cb0cd9d026c6f1f7aad0
2023-12-21T09:28:01.818468Z  INFO reth::node::events: Canonical chain committed number=18833346 hash=0x3e72d2157be6a501a2370dc16a7410b97a8e45dc1798cb0cd9d026c6f1f7aad0 elapsed=462.233358ms
2023-12-21T09:28:01.818517Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x3e72d2157be6a501a2370dc16a7410b97a8e45dc1798cb0cd9d026c6f1f7aad0 safe_block_hash=0x97aea22345cedc9e31cfd51b7d3e490e82da0ed8f2a137683afa739dbfb51a46 finalized_block_hash=0xb9b4d10ef06af762a237c2d467e7f6fecc67de002a551b34096f362b26ad519e status=Valid
2023-12-21T09:28:12.328221Z  INFO reth::node::events: Block added to canonical chain number=18833347 hash=0x03975b86bd9ef8385b50f9b590dd4501c71d3aa05994ec52615105a6b775d419
2023-12-21T09:28:13.090463Z  INFO reth::node::events: Canonical chain committed number=18833347 hash=0x03975b86bd9ef8385b50f9b590dd4501c71d3aa05994ec52615105a6b775d419 elapsed=489.449827ms
2023-12-21T09:28:13.090511Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x03975b86bd9ef8385b50f9b590dd4501c71d3aa05994ec52615105a6b775d419 safe_block_hash=0x97aea22345cedc9e31cfd51b7d3e490e82da0ed8f2a137683afa739dbfb51a46 finalized_block_hash=0xb9b4d10ef06af762a237c2d467e7f6fecc67de002a551b34096f362b26ad519e status=Valid
2023-12-21T09:28:24.345364Z  INFO reth::cli: Status connected_peers=108 freelist=25346 latest_block=18833347

Platform(s)
Linux (x86)
What version/commit are you on?
alpha.13
What database version are you on?
1
What type of node are you running?
Full via --full flag
What prune config do you use, if any?
no reth.toml file, running the out-of-the-box precompile as is.
If you've built Reth from source, provide the full command you used
No response
Code of Conduct

[X] I agree to follow the Code of Conduct

to block 18833845.

could you please share the logs for this block?

oh those are the logs I shared, from 18833843 to 47, including the one I missed. or what kind of logs do you need?

hmm the last entry is for 18833347 which is 500 blocks off

omg sorry those 3s and 8s ://
here they go, I see now some back and forth going on there..
2023-12-21T11:08:37.614424Z  INFO reth::node::events: Block added to canonical chain number=18833844 hash=0x6ae891980fd1f715e4119e2f5848648913f96433616d445fef8b5210230faa30 2023-12-21T11:08:38.245599Z  INFO reth::node::events: Canonical chain committed number=18833844 hash=0x6ae891980fd1f715e4119e2f5848648913f96433616d445fef8b5210230faa30 elapsed=396.949737ms 2023-12-21T11:08:38.245650Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x6ae891980fd1f715e4119e2f5848648913f96433616d445fef8b5210230faa30 safe_block_hash=0x8b89e5131d35ff862536e00b2882c16295d1b559a0e15a4dce9ae79a61b400d5 finalized_block_hash=0x3f3eba1e8e80c9d5a1c9bd68ca1a544963d3203302463bafdad37e5d4dc4d4bc status=Valid 2023-12-21T11:08:38.280688Z  INFO reth::node::events: Pruner finished tip_block_number=18833844 elapsed=34.904164ms stats={SenderRecovery: (HasMoreData, 17500), Receipts: (Finished, 0)} 2023-12-21T11:08:49.497233Z  INFO reth::cli: Status connected_peers=114 freelist=26985 latest_block=18833844 2023-12-21T11:08:52.484539Z  INFO reth::node::events: Block added to canonical chain number=18833845 hash=0xb6654136ab96a8706f83374b2b52f30cdf85adf0b2717c433d5ddaff747321e3 2023-12-21T11:08:52.871376Z  INFO reth::node::events: Canonical chain committed number=18833845 hash=0xb6654136ab96a8706f83374b2b52f30cdf85adf0b2717c433d5ddaff747321e3 elapsed=11.743621ms 2023-12-21T11:08:52.871423Z  INFO reth::node::events: Forkchoice updated head_block_hash=0xb6654136ab96a8706f83374b2b52f30cdf85adf0b2717c433d5ddaff747321e3 safe_block_hash=0x8b89e5131d35ff862536e00b2882c16295d1b559a0e15a4dce9ae79a61b400d5 finalized_block_hash=0x3f3eba1e8e80c9d5a1c9bd68ca1a544963d3203302463bafdad37e5d4dc4d4bc status=Valid 2023-12-21T11:09:01.913537Z  INFO reth::node::events: Block added to fork chain number=18833845 hash=0xadf844b79c2cfc5004f9fb39d068bb3ec90772403b9a625413b9f97bbb603e12 2023-12-21T11:09:02.454590Z  INFO blockchain_tree: Unwinding canonical chain blocks: 18833845..=18833845 2023-12-21T11:09:03.631705Z  INFO reth::node::events: Canonical chain committed number=18833845 hash=0xadf844b79c2cfc5004f9fb39d068bb3ec90772403b9a625413b9f97bbb603e12 elapsed=1.177264197s 2023-12-21T11:09:03.631752Z  INFO reth::node::events: Forkchoice updated head_block_hash=0xadf844b79c2cfc5004f9fb39d068bb3ec90772403b9a625413b9f97bbb603e12 safe_block_hash=0x8b89e5131d35ff862536e00b2882c16295d1b559a0e15a4dce9ae79a61b400d5 finalized_block_hash=0x3f3eba1e8e80c9d5a1c9bd68ca1a544963d3203302463bafdad37e5d4dc4d4bc status=Valid 2023-12-21T11:09:13.684360Z  INFO reth::node::events: Block added to canonical chain number=18833846 hash=0x1b84b2239f3efe8ef2c893cd4ff81a388926a066bed3a4b6f6044c0e667f73ce 2023-12-21T11:09:14.496343Z  INFO reth::cli: Status connected_peers=114 freelist=26883 latest_block=18833845 2023-12-21T11:09:14.591046Z  INFO reth::node::events: Canonical chain committed number=18833846 hash=0x1b84b2239f3efe8ef2c893cd4ff81a388926a066bed3a4b6f6044c0e667f73ce elapsed=661.621852ms 2023-12-21T11:09:14.593215Z  INFO reth::node::events: Forkchoice updated head_block_hash=0x1b84b2239f3efe8ef2c893cd4ff81a388926a066bed3a4b6f6044c0e667f73ce safe_block_hash=0x8b89e5131d35ff862536e00b2882c16295d1b559a0e15a4dce9ae79a61b400d5 finalized_block_hash=0xe1929ad111a019df93d6cc026aff3e7e0027bf3be8c609a146c99a8305176f1f status=Valid 2023-12-21T11:09:24.799240Z  INFO reth::node::events: Block added to canonical chain number=18833847 hash=0xcff19e3ea5a59e503592a3607b3e171c8a9c87a0a9fe0f0a55313122ed731987

@shekhirin a few things happening here:
new block 18833844 committed
pruner kicks ins
new block 18833845 arrives https://etherscan.io/block/18833845/f
18833845 block made canonical at 08:52.871423Z
18833845 reorged at 09:02.454590Z
this is 10 secs later.
then only 2s later 18833846 is committed
the pruner was only active for elapsed=34.904164ms

i second this, second time it happens and would hate to resync again. let me know what i can do to help investigate this.

Update:
18833790 is missing from my db, and a few others. This is the earliest bad block, i went ahead and unwinded reth up until 10-15 blocks before that. It resync'd, and im still missing these blocks.

@0xSheller can you share some more logs? is this still happening on latest alpha?

I also tried to run some of my validators with reth, and this resulted in about 10% of missed attestations. Now they are using geth again, but I have the Lighthouse validator broadcast the attestations to both Lighthouse beacon nodes (one paired with geth, the other one with reth). The one paired with reth very often shows errors like this one:
Feb 08 11:03:14.073 INFO New block received                      root: 0x7a02c9b1b0b2ed4b81598e0b7daf25f08f9e100998aeeccc2642e716cab5dd20, slot: 8380514
Feb 08 11:03:15.011 ERRO Failure verifying attestation for gossip, attestation_slot: 8380514, committee_index: 18, request_index: 0, error: UnknownHeadBlock { beacon_block_root: 0x7a02c9b1b0b2ed4b81598e0b7daf25f08f9e100998aeeccc2642e716cab5dd20 }
Feb 08 11:03:15.011 WARN Error processing HTTP API request       method: POST, path: /eth/v1/beacon/pool/attestations, status: 400 Bad Request, elapsed: 201.38µs
Feb 08 11:03:17.001 INFO Synced                                  slot: 8380514, block: 0x7a02…dd20, epoch: 261891, finalized_epoch: 261889, finalized_root: 0xc3e8…c883, exec_hash: 0xec70…7f37 (verified), peers: 88, service: slot_notifier

The reth logs around that time are these:
2024-02-08T11:03:01.590251Z  INFO reth::cli: Status connected_peers=27 freelist=3881244 latest_block=19183023
2024-02-08T11:03:03.098119Z  INFO reth::commands::node::events: Block added to canonical chain number=19183024 hash=0x5c1c93c0f6fd38f9747c5c67ab8da2645987a1819c7e9644d30d2a97f68942b4
2024-02-08T11:03:04.076707Z  INFO reth::commands::node::events: Canonical chain committed number=19183024 hash=0x5c1c93c0f6fd38f9747c5c67ab8da2645987a1819c7e9644d30d2a97f68942b4 elapsed=800.533038ms
2024-02-08T11:03:04.076875Z  INFO reth::commands::node::events: Forkchoice updated head_block_hash=0x5c1c93c0f6fd38f9747c5c67ab8da2645987a1819c7e9644d30d2a97f68942b4 safe_block_hash=0x092025f5a1ad1a70c20475b66f53376326b1a3b46d1bbe2f1be8551e4e220c8c finalized_block_hash=0xac312a4347315115c1b08d3c7d9902aa48b632168660b1482e83f10308ba86d2 status=Valid
2024-02-08T11:03:15.392145Z  INFO reth::commands::node::events: Block added to canonical chain number=19183025 hash=0xec701b957855adc8f3b1a9bbdeff59d4df126f773e2fb4ca0f26bcb882ac7f37
2024-02-08T11:03:16.343410Z  INFO reth::commands::node::events: Canonical chain committed number=19183025 hash=0xec701b957855adc8f3b1a9bbdeff59d4df126f773e2fb4ca0f26bcb882ac7f37 elapsed=768.077938ms
2024-02-08T11:03:16.343442Z  INFO reth::commands::node::events: Forkchoice updated head_block_hash=0xec701b957855adc8f3b1a9bbdeff59d4df126f773e2fb4ca0f26bcb882ac7f37 safe_block_hash=0x092025f5a1ad1a70c20475b66f53376326b1a3b46d1bbe2f1be8551e4e220c8c finalized_block_hash=0xac312a4347315115c1b08d3c7d9902aa48b632168660b1482e83f10308ba86d2 status=Valid
2024-02-08T11:03:25.808589Z  INFO reth::commands::node::events: Block added to canonical chain number=19183026 hash=0x6499492cdc774fc26ba5eed7d6869b0cfb849b1959d21c15b0362611bf729ecb
2024-02-08T11:03:26.565436Z  INFO reth::commands::node::events: Canonical chain committed number=19183026 hash=0x6499492cdc774fc26ba5eed7d6869b0cfb849b1959d21c15b0362611bf729ecb elapsed=581.473161ms

This happens with both alpha.16 and alpha.17. I haven't tried any older releases.
I the official docker image, with these options:
  node \
  --metrics <IP_ADDRESS>:9001 \
  --http --http.addr <IP_ADDRESS> --http.api eth,web3,net --http.corsdomain "*" \
  --ws --ws.api eth,web3,net --ws.origins "*" --ws.addr <IP_ADDRESS> \
  --authrpc.jwtsecret /var/lib/jwtsecret/jwt.hex \
  --authrpc.addr <IP_ADDRESS> \
  --full

likely has to do with starvation due to blocking loops https://github.com/paradigmxyz/reth/issues/6541

I also have misses and outdated blocks. This is on v2 engine. --engine.legacy will crash Reth.
Nov 29 16:26:26  systemd-grandine[35500]: [2024-11-29T16:26:26.010+00:00] [INFO] [validator::validator] ProposeFourth tick in slot 10506130
Nov 29 16:26:26 systemd-grandine[35500]: [2024-11-29T16:26:26.366+00:00] [INFO] [fork_choice_store::store] imported 0/0 blobs for beacon block: 0xe3d3ac07619515435890594ac7904f193da0330071485ff69543c663aedca825, slot: 10506130
Nov 29 16:26:36 systemd-grandine[35500]: [2024-11-29T16:26:36.689+00:00] [INFO] [p2p::network] [Peers: 101/100] received beacon block as gossip (slot: 10506131, root: 0xd20204a85577b4c9c694ba8eda7b54bdd327a2e3297a0feb66b76121cb3bd477, peer_id: 16Uiu2HAmGwCgL8hn5x8cpjWofmbYba5MFebC6YzJAzWA2u2YwLhw)
Nov 29 16:26:38 systemd-grandine[35500]: [2024-11-29T16:26:38.364+00:00] [INFO] [fork_choice_store::store] imported 0/0 blobs for beacon block: 0xd20204a85577b4c9c694ba8eda7b54bdd327a2e3297a0feb66b76121cb3bd477, slot: 10506131
Nov 29 16:26:45 systemd-grandine[35500]: [2024-11-29T16:26:45.506+00:00] [INFO] [validator::validator] started work on execution payload with id Deneb(0x8546ccd1423f11d6) for head 0xe3d3ac07619515435890594ac7904f193da0330071485ff69543c663aedca825 at slot 10506131
Nov 29 16:26:45 systemd-grandine[35500]: [2024-11-29T16:26:45.514+00:00] [INFO] [validator::validator] Attest tick in slot 10506130
Nov 29 16:26:45 systemd-grandine[35500]: [2024-11-29T16:26:45.514+00:00] [WARN] [validator::validator] validator cannot participate in attestation because chain head has not been fully verified by an execution engine
Nov 29 16:26:45 systemd-grandine[35500]: [2024-11-29T16:26:45.514+00:00] [WARN] [validator::validator] validator cannot participate in sync committees because chain head has not been fully verified by an execution engine

Nov 29 16:54:48 systemd-grandine[35500]: [2024-11-29T16:54:48.432+00:00] [INFO] [fork_choice_control::mutator] new finalized checkpoint (epoch: 328319, root: 0x75ba62cffe655be667c05e836ca96196e86713d4e26fc44a9895f345458ad431, head slot: 10506271, head root: 0x2f50bf35a795706e9ff7de462a1b5e37e9e203687b33afafae4bcc47f01fd9d9)
Nov 29 16:54:48  systemd-grandine[35500]: [2024-11-29T16:54:48.432+00:00] [INFO] [validator::validator] Propose tick in slot 10506272
Nov 29 16:54:48 systemd-grandine[35500]: [2024-11-29T16:54:48.433+00:00] [WARN] [validator::validator] validators {} voted for non-canonical block 0x89c819f78293d2c3b7f515c3539483d2a23dce42babe22988d5faa9f9b980c10 at slot 10506208 (expected to vote for block 0x75ba62cffe655be667c05e836ca96196e86713d4e26fc44a9895f345458ad431)
Nov 29 16:54:48 systemd-grandine[35500]: [2024-11-29T16:54:48.433+00:00] [WARN] [validator::validator] validators {} voted for outdated head 0x39a593368933525e61c947afe066e03c3fe38badc0b076320950c8bad55c36f9 (by 1 slots) at slot 10506238 (expected to vote for block 0xc50654fd92c0ea9945971487233a66c8f558eb8837cf85c04079063808e33290)
Nov 29 16:54:48 systemd-grandine[35500]: [2024-11-29T16:54:48.433+00:00] [WARN] [validator::validator] validators {} voted for outdated head 0xc50654fd92c0ea9945971487233a66c8f558eb8837cf85c04079063808e33290 (by 1 slots) at slot 10506239 (expected to vote for block 0x3beb9f524667a201820c01be6b714b11710913cc42d65630ffc7e6b86fedea77)

@totoCZ this isn't much to go on, not sure how to analyze these grandine logs. Do you mind expanding why you suspect this is an EL / reth performance issue?

"validator cannot participate in sync committees because chain head has not been fully verified by an execution engine"
I don't know, reth doesn't log any errors but it misses maybe 10 times a day and this is logged.
I'll keep monitoring, for now I don't have anything better. It's a fresh setup.
Is this

Using --engine.legacy is recommended for stakers / payload builders, as the previous architecture has been tested in production for a longer period of time.
still accurate?

So I should switch to legacy engine for validators? Or do you think it's now better tested?

Do you mind giving:

reth version
SSD model, or if unknown / on cloud, the instance type?

I would also recommend updating, as we do generally make performance better on each release. Those numbers for "Block added to canonical chain" are not good, but not terrible either


Small updates to installation.md

Requirements
Mark the following tasks as done:

[x] Documentation was adjusted

Description of the Change

small language clarifications
PHP markup on code sample

Thanks 👍


Unexpected Dataset aggregation behavior when weighting

What happened?
When aggregating a dataset over specified dimensions I don't expect variables which don't have those dimensions to be aggregated.
What did you expect to happen?
When a weighting is applied to the aggregation, variables which do not have the aggregation dimensions are nevertheless aggregated. Presumably because the weights get broadcast across those variables. Perhaps this is the intended behavior but it seems surprising to me and should at least be documented I think.
Minimal Complete Verifiable Example
import xarray as xr
import numpy as np

var1 = np.ones((2, 2, 3))

var2 = np.ones((3))

lon = np.arange(4).reshape(2, 2)
lat = np.arange(4).reshape(2, 2)

ds = xr.Dataset(
    {
        "temperature": (["x", "y", "time"], var1),
        "precipitation": (["time"], var2),
    },
    coords={
        "lon": (["x", "y"], lon),
        "lat": (["x", "y"], lat),
        "time": np.arange(3),
    },
)

print(ds.sum(['x', 'y']))
# Precipitation (with no x or y dimension) is not summed over, leading to values [1. 1. 1.]

print(ds.weighted(xr.ones_like(ds['temperature'])).sum(['x', 'y']))
# Precipitation is now summed over, leading to values [4. 4. 4.]

MVCE confirmation

[X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
[X] Complete example — the example is self-contained, including all data and the text of any traceback.
[X] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
[X] New issue — a search of GitHub Issues suggests this is not a duplicate.
[X] Recent environment — the issue occurs with the latest version of xarray and its dependencies.

Relevant log output
No response
Anything else we need to know?
 Related: #6952 and 7027


openresolv is missing sed in its wrapper

Describe the bug
openresolv is missing sed in PATH
I just tried to run that command on unstable
nix build .#openresolv
➜ result/bin/resolvconf -R
/nix/store/r0iw20jzng26chwk29pzpmpyrqmdmq2g-openresolv-3.12.0/sbin/.resolvconf-wrapped: line 765: sed: command not found

Expected behavior
according to the help, I was expecting the command:
-R Show the system service restart command
Additional context
was trying to refresh some DNS entry in the cache
Notify maintainers

Metadata
nixos-unstable as of today

Are you going to remake that PR?

yes I put it there https://github.com/NixOS/nixpkgs/pull/243691

closing since the tradeoff was not worth it see linked PR


False warning of dead_null_aware_expression when using map pattern

When using this code:
foo.dart
final map <String,dynamic>{}

bar.dart
if (map case {'language': String? language}) {
  language ??= 'en';
}

a dead_null_aware_expression is reported.

Thanks for the report! Can you post a full repro, perhaps as a dartpad link?

https://dartpad.dev/?id=a2a5897e1125a9dd930716186f9423f8

@jtdLab
Your example in the dartpad does not match the code you posted in the issue. Your code in DartPad are:
void main() {
  if (someMap() case {'language': String? language}) {
    language ??= 'en';
  }
}

Map<String, String> someMap() {
  return {};
}

Since the signature of someMap() are that it returns Map<String, String> it makes sense you get the error since the value would never be possible to be null since the values of this map can't be null.
If you instead change your someMap() to the one from your initial example:
Map<String, dynamic> someMap() {
  return {};
}

Or:
Map<String, String?> someMap() {
  return {};
}

The error goes away since now it is actually possible for the returned map value to be null.


HexGrid rendering

Hex is a basic dataclass for supporting hexagonal grid coordinates. I overrode __hash__() and __eq__() in order to use Hex objects as keys in the dict that contains all of the tiles.
HexOrientation is a helper class for all the numeric constants necessary to render a Hex object onto the screen. Most notably, the angles for a flat-topped orientation of the hexagons' vertices, and the transformation matrix hex_to_pixel. It still needs the inverse matrix for conversion between screen coordinates and hex coordinates however. I'll open a new issue for that. See #7
HexGrid stores a dictionary _tiles that takes Hex instances as keys and a list of pyglet.shapes.Polygon as values. I'll open a new issue for use of custom sprites.
Very very special thanks to the lovely Amit Patel and all of his 20+ years of research regarding hexagonal grids!

Doesn't completely implement an isometric grid to the game, although a major milestone was met to be able to render a hexagonal grid.


Adjust gCNV case mode to perform calls per family

Is your feature request related to a problem? Please describe.
At the moment, gCNV uses per-sample calls in case mode. Families are then joined with merge_cohort_vcfs which has issues because reference calls are not marked as such consistently.
Describe the solution you'd like
The gCNV docs that "It is possible to analyze multiple samples simultaneously in a case mode command. Provide each sample with -I.".
We should do this and thus perform the case mode analysis per family. However, it is unclear how much this will help as gCNV docs also say "PostprocessGermlineCNVCalls consolidates the scattered GermlineCNVCaller results, performs segmentation and calls copy number states. The tool generates per-interval and per-segment sample calls in VCF format and runs on a single sample at a time."
Describe alternatives you've considered
N/A
Additional context

Github Issue says family calling can be improved: broadinstitute/gatk#6167

Note: since <IP_ADDRESS>, gCNV has a pipeline for joint gCNV exome joint calling.


Silent error in getKey within useSWRInfinite

Bug report
Description / Observed Behavior
useSWRInfinite hides errors within getKey (at least on the first page load). The error in getKey seems to cause the fetcher not to run. Because the error is hidden, it's difficult to debug.
Expected Behavior
I expect it to raise or display the error
Repro Steps / Code Example
import useSWRInfinite from "swr/infinite";

useSWRInfinite(
  () => {
    throw new Error();
  },
  () => fetch("http://example.com")
);

Additional Context
<EMAIL_ADDRESS>

This I a feature name "Conditional Fetching", not a bug https://swr.vercel.app/docs/conditional-fetching. And why do you want to throw an error in getKey?

This isn't about conditional fetching; it's about hiding an error. I don't want to raise an error in the getKey function; this was a minimal example for reproduction. When there is an error in the getKey function, it's hidden which makes it difficult to debug. I'd like to either raise that error or log it.


Youtube wont scrobble,

Tried to Scrobble and it didn't work, then I went to reauth but when I press the button nothing happens.

How to debug extensions.

Plus, please provide detailed information (e.g. logs, current version of the extension, browser you use), that were mentioned in the issue template.

Same happens with me. I have reauthenticated several times. After a fresh reauthenticate (should it show something when I click on the reauthenticate buttton? Because it doesn't):
controller.js:83 Tab 590: state update: only currentTime has changed
controller.js:47 Tab 590: received empty state - resetting
inject.js:33 -- loaded for the first time, injecting the scripts
inject.js:55 	injecting vendor/jquery-2.1.0.min.js
inject.js:55 	injecting vendor/underscore-min.js
inject.js:55 	injecting core/content/reactor.js
inject.js:55 	injecting core/content/filter.js
inject.js:55 	injecting core/content/connector.js
inject.js:55 	injecting connectors/v2/youtube.js
inject.js:55 	injecting core/content/starter.js
controller.js:389 Tab 590: created controller for connector: {"label":"YouTube","matches":["*://www.youtube.com/*"],"js":["connectors/v2/youtube.js"],"version":2}
controller.js:100 Tab 590: new track state: {"track":"Rolling in the Deep","artist":"Adele","album":null,"uniqueID":"rYEDA3JcQqw","duration":234,"currentTime":0,"isPlaying":true,"trackArt":null}
controller.js:108 Tab 590: new song detected: {"parsed":{"artist":"Adele","track":"Rolling in the Deep","album":null,"uniqueID":"rYEDA3JcQqw","duration":234,"currentTime":null,"isPlaying":true,"trackArt":false},"processed":{"artist":"Adele","track":"Rolling in the Deep","album":null,"duration":234},"metadata":{"userloved":false,"startTimestamp":1489488751,"connector":{"label":"YouTube","matches":["*://www.youtube.com/*"],"js":["connectors/v2/youtube.js"],"version":2}},"flags":{"isProcessed":false,"isScrobbled":false,"isCorrectedByUser":false,"isLastfmValid":null,"isMarkedAsPlaying":false}}
jquery-2.1.0.min.js:4 GET https://ws.audioscrobbler.com/2.0/?method=auth.getsession&api_key=d9bb1870d…1peEd4H5Xgqb5B8lpvgIF&api_sig=2f2c140917354dc2df313ddaebd60646&format=json 403 (Forbidden)
send @ jquery-2.1.0.min.js:4
ajax @ jquery-2.1.0.min.js:4
o.(anonymous function) @ jquery-2.1.0.min.js:4
getJSON @ jquery-2.1.0.min.js:4
tradeTokenForSession @ lastfm.js:165
(anonymous) @ lastfm.js:121
(anonymous) @ chromeStorage.js:26
target.(anonymous function) @ extensions::SafeBuiltins:19
safeCallbackApply @ extensions::sendRequest:21
handleResponse @ extensions::sendRequest:74
lastfm.js:175 auth.getSession failed: {"error":14,"message":"Unauthorized Token - This token has not been authorized"}
(anonymous) @ lastfm.js:175
j @ jquery-2.1.0.min.js:2
fireWith @ jquery-2.1.0.min.js:2
x @ jquery-2.1.0.min.js:4
(anonymous) @ jquery-2.1.0.min.js:4
lastfm.js:123 Failed to trade token for session - the token is probably not authorized
(anonymous) @ lastfm.js:123
(anonymous) @ lastfm.js:176
j @ jquery-2.1.0.min.js:2
fireWith @ jquery-2.1.0.min.js:2
x @ jquery-2.1.0.min.js:4
(anonymous) @ jquery-2.1.0.min.js:4
controller.js:83 Tab 590: state update: only currentTime has changed
L.FM response to https://ws.audioscrobbler.com/2.0/?method=track.getinfo&autocorrect=1&usern…e&track=Rolling%20in%20the%20Deep&api_key=d9bb1870d3269646f740544d9def2c95 : success
<?xml version="1.0" encoding="UTF-8"?><lfm status="ok"><track><name>Rolling in the Deep</name>
<mbid>1a13c710-4b7e-4701-8968-cd61f2e58110</mbid>
<url>https://www.last.fm/music/Adele/_/Rolling+in+the+Deep</url>
<duration>228000</duration>
<streamable fulltrack="0">0</streamable>
<listeners>1173567</listeners>
<playcount>12457213</playcount>
<artist><name>Adele</name>
<mbid>cc2c9c3c-b7bc-4b8b-84d8-4fbd8779e493</mbid>
<url>https://www.last.fm/music/Adele</url>
</artist>
<album position="1"><artist>Adele</artist>
<title>21</title>
<mbid>c45e0e0e-48c9-4441-aac3-2f2b34202d3c</mbid>
<url>https://www.last.fm/music/Adele/21</url>
<image size="small">https://lastfm-img2.akamaized.net/i/u/34s/c894af1e6a735b9bbb2a0312c7719f40.png</image>
<image size="medium">https://lastfm-img2.akamaized.net/i/u/64s/c894af1e6a735b9bbb2a0312c7719f40.png</image>
<image size="large">https://lastfm-img2.akamaized.net/i/u/174s/c894af1e6a735b9bbb2a0312c7719f40.png</image>
<image size="extralarge">https://lastfm-img2.akamaized.net/i/u/300x300/c894af1e6a735b9bbb2a0312c7719f40.png</image>
</album>
<userloved>0</userloved>
<toptags><tag><name>soul</name>
<url>https://www.last.fm/tag/soul</url>
</tag>
<tag><name>Adele</name>
<url>https://www.last.fm/tag/Adele</url>
</tag>
<tag><name>female vocalists</name>
<url>https://www.last.fm/tag/female+vocalists</url>
</tag>
<tag><name>pop</name>
<url>https://www.last.fm/tag/pop</url>
</tag>
<tag><name>british</name>
<url>https://www.last.fm/tag/british</url>
</tag>
</toptags>
<wiki><published>01 Dec 2010, 18:04</published>
"Rolling in the Deep" is a first single recorded by British singer Adele for her second studio album, 21 (2011). The song was written by Adele and Paul Epworth. Read more on Last.fm.
<content>"Rolling in the Deep" is a first single recorded by British singer Adele for her second studio album, 21 (2011). The song was written by Adele and Paul Epworth. Read more on Last.fm. User-contributed text is available under the Creative Commons By-SA License; additional terms may apply.</content>
</wiki>
</track>
</lfm>
musicbrainz-coverartarchive.js:16 Found album artwork via LastFM
controller.js:172 Tab 590: song finished processing  {"parsed":{"artist":"Adele","track":"Rolling in the Deep","album":null,"uniqueID":"rYEDA3JcQqw","duration":234,"currentTime":1,"isPlaying":true,"trackArt":null},"processed":{"artist":"Adele","track":"Rolling in the Deep","album":null,"duration":228},"metadata":{"userloved":false,"startTimestamp":1489488751,"connector":{"label":"YouTube","matches":["*://www.youtube.com/*"],"js":["connectors/v2/youtube.js"],"version":2},"artistUrl":"https://www.last.fm/music/Adele","trackUrl":"https://www.last.fm/music/Adele/_/Rolling+in+the+Deep","albumUrl":"https://www.last.fm/music/Adele/21","artistThumbUrl":"https://lastfm-img2.akamaized.net/i/u/300x300/c894af1e6a735b9bbb2a0312c7719f40.png"},"flags":{"isProcessed":true,"isScrobbled":false,"isCorrectedByUser":false,"isLastfmValid":true,"isMarkedAsPlaying":false}}
controller.js:227 Tab 590: the song will be scrobbled after 116 more seconds of playback
controller.js:263 Tab 590: song isn't set as now playing

At least in my case it is obviously a problem with authentication, but I don't know how to solve it or why is a problem. I am correctly logged in in last.fm.

When I try to authenticate using the options page of the plugin, I get this on the javascript console:
chrome.storage.local.LastFM = {
  "sessionID": null,
  "sessionName": null,
  "token": "xxxxx$RANDOMLETTERS"
}
lastfm.js:99 getToken response: <?xml version="1.0" encoding="utf-8"?>
<lfm status="ok">
  <token>xxxx$RANDOMLETTERS</token>
</lfm>

icons/icon128.png:1 GET chrome-extension://hhinaapppaileiechjoiifaancjggfjm/options/icons/icon128.png net::ERR_FILE_NOT_FOUND
options.html:1 Unchecked runtime.lastError while running notifications.create: Unable to download all specified images.
    at Object.createNotification [as callback] (chrome-extension://hhinaapppaileiechjoiifaancjggfjm/core/background/notifications.js:97:27)

@Delawen oops, that's bad. I reproduced this. fixing right now.

@Delawen I uploaded a patch update (v1.62.1) to Chrome Web Store, could you please update and confirm it works now?
@Kolsig could you also update the extension and tell me it's ok now?

Perfect on my side :)

@Delawen nice, thanks for reporting!

I am correctly logged in in last.fm.

I'd also say it's not enough to be just logged in to Last.fm. Last.fm should grant access to the account to the extension. That's why the extension shows the notification.

I still have a problems with scrobbling from Youtube.
Chrome v.57.0.2987.98, Windows 10 Home, Last.fm Scrobbler v.1.62.1

@anton0kurilov can't reproduce the issue using your description in your comment. The screenshot looks odd.

@alexesprit
Tab 743: created controller for connector: {"label":"YouTube","matches":["*://www.youtube.com/*"],"js":["connectors/v2/youtube.js"],"version":2}
controller.js:53 Tab 743: state from connector doesn't contain enough information about the playing track: {"track":null,"artist":null,"album":null,"uniqueID":null,"duration":null,"currentTime":null,"isPlaying":true,"trackArt":null}

@anton0kurilov the log doesn't look ok, but I still cannot reproduce the problem. Have you any additional information (e.g. installed extensions that could prevent scrobbling, steps to reproduce etc)?

@alexesprit I managed to catch a bug. If enabled Material Design on YouTube (this), the extension has not scrobbling.

@anton0kurilov I already added support for Material design, can't understand why it doesn't work. I'll look into that again.

@anton0kurilov I enabled Material design using the instruction you provided, but it still works (but I needed to refresh tab one time, looks like Youtube issue).

@alexesprit It works! Is it possible to correct this error?

@anton0kurilov I made an attempt to fix connector, works fine for me for both players in all modes. Could you please check the extension from this zip: https://github.com/alexesprit/web-scrobbler/archive/youtube.zip? If it's ok, I'll roll out a new patch release to web store.

@alexesprit can't speak for anton, but this definitely solved it for me. thank you!

It is not working for me either, then I went to reauth but when I press the button nothing happens.
extension version:  1.62.2
When I try to reauthenticate using the options page of the plugin, I get this on the javascript console:
chrome.storage.local.LastFM = {
"sessionID": null,
"sessionName": null,
"token": null
}
lastfm.js:99 getToken response:

xxxxxhS2TTurmgOk_SqP0f5yJUlEcpRD

It is not working for me either, then I went to reauth but when I press the button nothing happens.

Are you using MacOS?

Yes...I am using Macbook Pro 2016 version.

The auth notification isn't shown if Chrome in fullscreen mode. Quit this mode before pressing reauth button.


dependecy: uuid 1

 UUID 1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.003%) to 84.876%

Totals

Change from base Build<PHONE_NUMBER>:
0.003%

Covered Lines:
33110

Relevant Lines:
39010

💛  - Coveralls


Add indentation to pretty-print LWRPs with inline resources

Pretty print LWRPs.  This implements the printing proposal at https://github.com/opscode/chef-rfc/blob/jk/in_parallel/rfc1-in_parallel.md#output-formatting-groups :
Nested resources currently print something like this:
Recipe: @recipe_files::/Users/jkeiser/oc/code/opscode/chef-rfc/blah.rb
  * compound_resource[a] action create  * file[/Users/jkeiser/x.txt] action create (up to date)
  * file[/Users/jkeiser/y.txt] action create (up to date)
 (up to date)

With this proposal, a resource_group or other compound resource would print like this:
Recipe: @recipe_files::/Users/jkeiser/oc/code/opscode/chef-rfc/blah.rb
 * compound_resource[a] action create
   * file[/Users/jkeiser/x.txt] action create (up to date)
   * file[/Users/jkeiser/y.txt] action create (up to date)
    (up to date)

Hrm, yeah, I'd like to.  I'll need to update it, likely :)

The RFC has moved to https://github.com/chef/chef-rfc/blob/master/rfc044-in_parallel.md#output-formatting-groups

closing due to inactivity.


Ignore macros with problematic argument specifications in listNewcommands

For example, xparse allows specifying more than 1 characters as argument delimiters, such as in r{ab}c, but it simply ignores such macros. Trying to use a macro with such an argspec generates an error saying that there is no known macro with that name.
Currently, the argspec parser also accepts such argspecs, but for additional safety, we may implement some validator in unified-latex-utils-argspec which may be used in listNewcommands.

I think this is more an error in xparse. Has it been reported?


common-grpc:tests rm .only

Fixes #2474
That was easy

Changes Unknown when pulling 4f5d283d003e065945adda95361d0106aec6a369 on stephenplusplus:spp--2474 into ** on GoogleCloudPlatform:master**.

We're back!


Added additional CI run to catch any changes which introduce warnings in blazert.

Status
READY
Description
I added a CI config which has warnings_as_errors enabled in order to catch any warnings which are introduced in the blazert code itself. Examples are not included yet, because they do not build without warnings at the moment mostly due to dependencies which need to be compiled as well but have many warnings.
Type of Change

[ ] bug fix
[x] new features
[ ] documentation
[ ] other

Checklist

[ ] I have run the provided clang-format
[x] I have reviewed my code and commented if necessary
[ ] I have added the appropriate documentation
[ ] I have added tests to my new code
[x] All tests pass locally

This cannot be merged until the new blaze-lib version is available since there are still warnings in the blaze code relevant to us.


Set docker-compose version to latest

Is there any way to achieve setting docker-compose version to latest stable? Just like the docker installation defaults to latest stable version.

Unfortunately the download URLs for docker-compose don't have a latest URL that will always get the latest. But you can configure the version being downloaded by setting compose_version and I also try and keep this project up to date with the latest version. If you're using the latest version of this plugin, whenever you update the plugin it will auto-update docker-compose inside your vagrant instance (unless you override and lock the compose_version to something specific).

@leighmcculloch It's possible to determine the latest docker-compose version. The URL https://github.com/docker/compose/releases/latest will always redirect to the latest version, so the Location-Header contains the needed informationen.
I'm not an ruby developer, but i think it's possible to replace this line
https://github.com/leighmcculloch/vagrant-docker-compose/blob/482f103bbcb27c69a6fce6ca7b94e2b03c24fa45/lib/vagrant-docker-compose/cap/linux/docker_compose_install.rb#L8
with something like this
version = config.compose_version
if version == 'latest'
    version = Net::HTTP.get_response(URI('https://github.com/docker/compose/releases/latest'))['Location'].split('/').last
end
comm.sudo("curl -L https://github.com/docker/compose/releases/download/#{version}/docker-compose-`uname -s`-`uname -m` > #{config.executable_install_path}")

The default value for the compose_version config should then be changed to latest.
I would create a pull-request, but i have no idea how to test/debug a vagrant plugin.

@prilka Thanks for the suggestion! That's a great idea.

One downside to doing this is it will make using the package unpredictable. If you have a specific version of the plugin installed, over time the version of docker-compose changes, which makes a development environment unpredictable.
I'm guessing not a lot of people are pinning vagrant plugin versions though, so this is probably mute, and latest is more likely to help than hinder folks.
I'm working on adding latest using the above idea.

One downside to doing this is it will make using the package unpredictable. If you have a specific version of the plugin installed, over time the version of docker-compose changes, which makes a development environment unpredictable.

That's true, but it's the same behavior as which most package-managers (e.g. pip install docker-compose). Developers who prefer a predictable version can set the desired version in their config via compose_version.

I'm working on adding latest using the above idea.

nice, thank you 👍

I think the approach I'll take is to use the GitHub API, with something akin to the following:
curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.name'

Right now this returns 1.24.1.
The downside to using the GitHub API is that rate limiting will set in if someone, or the NAT they are behind, is hitting the API a lot.
Using the 301/302 redirect on the URL won't have the rate limit.

The rate limit is really annoying for agencies with a shared ip. The solution with the redirect parsing works well and stable. I use it in some provisioning-scripts for quite a while.

That's a good point. 👍


Lab1 fib first submission

Fixes #609
Review of colleague's PR #196
Changes proposed in this PR:

Implement Lab1 Fibonacci numbers
Test Lab1

The go-course is now closed. Thank you very much for participating.


Auto hide widget children

Problem
Widgets overlap on laptop's display when there are too many widgets open/active

Possible solutions

Only display icons when too many widgets in bar
Auto expand widgets to display children on hover?

I don't think I can fix this issue on my end.
That said, with the latest settings additions, actions can be taken in order to reduce the size taken by the process widget and data widget can be moved to specific screen in order to prevent clutter on your main screen.
If you don't work on external monitor I'm afraid the only solution is to choose wisely what you want to see.


Add generic felix config option

This requires a corresponding libcalico-go change to be merged.

LGTM; please can you make sure they get some automated ST at some point?

Yup - this was on my radar.   Automated STs are coming.  I will add once we get the STs PR merged - it's been blocked by a calico node fix that is taking it's time to materialize.  I'll raise an issue so I don't lose track of it.

Issue #1330 raised


Use middleware on every route in a router

Hi :wave:!
Is there any way to apply a middleware to every route of a router?
This would be the same as calling Router.use without a path in koa-router.
const Router = require('koa-router')
const router = new Router({ prefix: '/users' })

// both GET /users and GET /users/:user will call the secure middleware
router.use(secure)

router.get('/', async (ctx) => {
  ctx.response.body = await User.getAll()
})

router.get('/:user', async (ctx) => {
  ctx.response.body = await User.get(ctx.params.user)
})

Thanks.

Hey, sorry for the delay! :bowtie:
Yes, instead of handler function you can pass as many as you want. Or array of functions.


Verify no duplicate datasource in supervisors

Describe the bug
Currently, supervisor could be created with the duplicated datasource in existing.
Expected behavior
The previous supervisor should be stopped and replaced with new one.
Datasource can run with only one supervisor.

merged.


iOs Chrome & FB browser upload

Resumable was breaking uploading on iOs's Chrome and FB browsers (all other browsers tested worked).
We fixed it by setting maxFiles: 1 after reading:
https://github.com/23/resumable.js/issues/336 (may be the same issue?)
and
https://productforums.google.com/forum/#!topic/chrome/WIfnax6DYyI
You may want to have something in the Readme noting this or change the default maxFiles setting to 1?

Alternative is to force maxFiles in those browsers -- did you guys end up do some magic testing to handle this case?


BIRCH with Normalize

Customer ID is not a valid features since its an complete unique feature.

you have specified n_cluster to be 3 , but there is only 1 cluster in output.
try to tune the model accordingly to get desired result


Mismatched network calling approve on ERC721

I'm trying to call approve on a ERC721 token contract. The entire app is running on the Gnosis Chiado testnet, but the call returns with this error:

User rejected. Calling [eth_sendTransaction] ERROR:  Mismatched networks. Please switch OneKey Wallet current network to chainId=1

Code snippet I'm using:
import { getContract, prepareContractCall, sendTransaction } from 'thirdweb';

const nftContract = getContract({
  client: accountStore.client,
  chain: accountStore.chain,
  address: process.env.NFT_CONTRACT as string,
});

const transaction = prepareContractCall({
  contract: nftContract,
  method:
    'function approve(address _approved, uint256 _tokenId) external payable',
  params: [marketplaceContract.address, BigInt(props.tokenId)],
});

assert(accountStore.account !== undefined);

console.log('transaction :>> ', transaction);
console.log('accountStore.account :>> ', accountStore.account);

sendTransaction({
  transaction: transaction,
  account: accountStore.account,
})
  .then(({ transactionHash }) =>
    $q.dialog({
      title: 'Transaction successful',
      message: `Hash: ${transactionHash}`,
    })
  )
  .catch((error) =>
    $q.dialog({
      title: 'Transaction failed',
      message: `Error: ${error}`,
    })
  );

According to console logs, nftContract.chain definitely has value 10200... I wonder what it's trying to do on Ethereum Mainnet, any ideas?

I asked ChatGPT how to use the built-in smart wallet on Gnosis chain rather the seemingly default OneKey on ERC20.
Using Thirdweb's built-in SmartWallet on the Gnosis chain involves leveraging Thirdweb's SDK to manage wallet creation, transactions, and interactions with smart contracts. Here’s a step-by-step guide to set up and use Thirdweb’s SmartWallet on the Gnosis chain:

Install Thirdweb SDK:
Ensure you have the Thirdweb SDK installed in your project. If not, install it using npm or yarn:
npm install @thirdweb-dev/sdk

or
yarn add @thirdweb-dev/sdk

Configure Thirdweb SDK:
Initialize the Thirdweb SDK with the Gnosis chain configuration.
import { ThirdwebSDK } from '@thirdweb-dev/sdk';

const gnosisChainId = 100; // Chain ID for Gnosis Mainnet
const gnosisRpcUrl = 'https://rpc.gnosischain.com'; // RPC URL for Gnosis Chain

const sdk = new ThirdwebSDK({
  chainId: gnosisChainId,
  rpcUrl: gnosisRpcUrl,
});

Create and Use a SmartWallet:
Create and interact with the SmartWallet. The following example demonstrates how to create a SmartWallet, connect to it, and call the approve function on an ERC721 contract.
import { ThirdwebSDK, SmartWallet } from '@thirdweb-dev/sdk';

const gnosisChainId = 100; // Chain ID for Gnosis Mainnet
const gnosisRpcUrl = 'https://rpc.gnosischain.com'; // RPC URL for Gnosis Chain

const sdk = new ThirdwebSDK({
  chainId: gnosisChainId,
  rpcUrl: gnosisRpcUrl,
});

async function setupSmartWallet() {
  // Assuming you have the user's wallet address
  const userAddress = '0xYourUserAddress';

  // Create or connect to a SmartWallet for the user
  const smartWallet = await sdk.wallet.createSmartWallet({
    ownerAddress: userAddress,
  });

  // Now you can use the SmartWallet to interact with your contracts
  const nftContractAddress = process.env.NFT_CONTRACT; // Your NFT contract address

  // Prepare the approve transaction
  const approveTx = await smartWallet.prepareTransaction({
    to: nftContractAddress,
    data: sdk.contracts.erc721.encode('approve', [
      marketplaceContract.address, // Address to approve
      BigInt(props.tokenId),       // Token ID
    ]),
  });

  // Send the transaction
  const txReceipt = await smartWallet.sendTransaction(approveTx);

  console.log('Transaction successful:', txReceipt.transactionHash);
}

setupSmartWallet().catch((error) => {
  console.error('Transaction failed:', error);
});

Handling User Interaction:
Ensure you handle user interaction correctly in your DApp. This may involve prompting the user to connect their wallet, switching networks, or signing transactions.

Complete Example:
Below is a complete example of how to initialize Thirdweb SDK, create a SmartWallet, and call the approve method on an ERC721 contract using the Gnosis chain.
import { ThirdwebSDK, SmartWallet } from '@thirdweb-dev/sdk';
import { marketplaceContract } from './contracts'; // Import your marketplace contract

const gnosisChainId = 100; // Chain ID for Gnosis Mainnet
const gnosisRpcUrl = 'https://rpc.gnosischain.com'; // RPC URL for Gnosis Chain

const sdk = new ThirdwebSDK({
  chainId: gnosisChainId,
  rpcUrl: gnosisRpcUrl,
});

async function setupSmartWallet() {
  try {
    // Assuming you have the user's wallet address
    const userAddress = '0xYourUserAddress';

    // Create or connect to a SmartWallet for the user
    const smartWallet = await sdk.wallet.createSmartWallet({
      ownerAddress: userAddress,
    });

    // Now you can use the SmartWallet to interact with your contracts
    const nftContractAddress = process.env.NFT_CONTRACT; // Your NFT contract address

    // Prepare the approve transaction
    const approveTx = await smartWallet.prepareTransaction({
      to: nftContractAddress,
      data: sdk.contracts.erc721.encode('approve', [
        marketplaceContract.address, // Address to approve
        BigInt(props.tokenId),       // Token ID
      ]),
    });

    // Send the transaction
    const txReceipt = await smartWallet.sendTransaction(approveTx);

    console.log('Transaction successful:', txReceipt.transactionHash);

    // Optionally, show a success dialog to the user
    $q.dialog({
      title: 'Transaction successful',
      message: `Hash: ${txReceipt.transactionHash}`,
    });
  } catch (error) {
    console.error('Transaction failed:', error);

    // Optionally, show an error dialog to the user
    $q.dialog({
      title: 'Transaction failed',
      message: `Error: ${error.message}`,
    });
  }
}

setupSmartWallet();

Notes:

Ensure the user's wallet is correctly connected to your DApp.
Handle network switching within the wallet if needed.
Manage user interactions smoothly to provide a good user experience.
Adjust the code to fit your specific application logic and environment setup.

By following these steps, you can utilize Thirdweb's SmartWallet on the Gnosis chain and perform actions like approving ERC721 tokens.

Works with Metamask instead of OneKey.

Works with Metamask instead of OneKey.

Actually... Works with Metamask on desktop, but again wants to switch to ethereum mainnet with Metamask on mobile.

@szekelyisz can you try calling await wallet.switchChain(your_chain) before doing the approval?


MinMax extension

I needed a way to determine the largest or smallest of two numbers, which this extension provides.
The words min and max are already used in the base version of Numi, so I used nmin and nmax, but open to suggestions.

Thank you @jjshammas, looking good


Hide bars when no value exists - null (hide whitespace and prevent NaN on tooltip) [BUG]

Expected Behavior

When no data is present for a datapoint no space should display on the page. Also NaN should not be displayed in the tooltip when hovering over that space.

Current Behavior

Currently empty whitespace is shown and NaN is displayed in the tooltip when hovering directly over the bar spot where it should be.  NaN is more visible when displaying a bar and line chart together.

Possible Solution

The old version of chartjs suggested to do the following - which doesn't seem to work:
barStrokeWidth:0,
or
barShowStroke : false

Steps to Reproduce (for bugs)

See the first three datapoints have null values.  There is whitespace taken up for these.

1.http://codepen.io/mpCodePen/pen/dNJamN
2.
3.
4.
Context

Environment

Chart.js version:
Browser name and version:
Link to your project:

Thanks for reporting this @mpGitHub. I believe this is a duplicate of #2092 so I'm closing in favour of the older issue.

Do you have any resolution for this? @mpGitHub


RegistrationTest failures

About half of my integration test runs fail in RegistrationTest. The failures occur in various places, but always in either helper.assertClientRegisterered() or helper.assertClientNotRegisterered() lines. I have already tried bumping LIFETIME up to 10 as well as used LIFETIME instead of the hardcoded 1's in helper.waitForRegistration(1), but the tests are still failing sometimes, although less often than before, so I suppose maybe it's not just about the length of timeout but something else.
I have a gut feeling that most of the failures occur in RegistrationTest.register_observe_deregister_observe(RegistrationTest.java:231), but that's not the only place.

I rarely faced the same issue on my laptop.
This seems to happen more frequently on our hudson

It seems that this is not the case : hudson build still failed time to time ...

If you faced this you can use one of this solution :

generally just relaunch the tests is enough.
you can skip the leshan-integration-tests module :
mvn -pl '!leshan-integration-tests' clean install   (works with maven 3.2.1 or later)
even more radical skip all tests :
mvn clean install -DskipTests

I didn't face this issue for a long time now, neither on jenkins nor on my machine, so I close it.


Problem with audio playback in Android Auto

I am not sure where the problem is. But I think it is a problem with my application which I built on the media3 library. I tried other applications such as Musicolet which uses an older version of the Media library, and everything is fine there. I also used Media Controller Tester to test my application. The application is correctly detected as an application with the Auto supported implementation. It passes all tests correctly, the media library is also correctly detected. Now let's move on to Android Auto. For testing I use Android Auto - Desktop Head Unit. Connection via USB. My application is correctly detected there, the media is also displayed. Unfortunately, during playback there is no sound from the computer speakers or from the phone speakers. The progress bar moves forward but without sound. Sometimes it happens that the sound is there for a moment and then disappears. When the sound disappears, the console displays the message:
[I]: Audio stream close, buffered = 53248
, and when the sound is played, the message:
[W]: Audio start: Audio stream already playing.
Here I also tried the Musicolet application and the problem does not occur, the sound plays without interruptions. Is there something I need to additionally implement in my application so that the streaming does not close?

Ok. The problem was caused by the lack of focus settings in the player. After adding AudioAttributes everything is fine.


Problem With The Configs

This mod is amazing! top tier animations, the only lacking ones are the mining ones. When you disable animations, they break and don't even use the vanilla ones anymore, please fix!

Mining with swords is broken too
Some items that arent pickaxes, axes, or shovels have broken animations. the body roates, but the arms dont move.


Improve artist matching and combining

Match individual artists and not full artist credit arrays
Match release and track artists in merge algorithm
Combine identifiers of all matched artists

This should solve multiple problems with consistent display of artists as linked entities and MBID resolving.

I recently had the problem, where an artist on MusicBrainz had a wrong Deezer link and harmony kept giving me the wrong artist. I only realized this after a few added releases, because MusicBrainz only shows the Artist Credit and not the artist name without opening the Artist Credit editing menu.
To prevent situations like this, I think harmony should warn if streaming platform artist links are attached to different (maybe even multiple) artists.

These shortcomings are also the reason why not all available artist links are seeded to the MB artist, as reported in #71.


custom_documentation_parameters broken for iOS doc generation

Surprise, surprise, this is a shell quoting issue. Even a simple test that has nothing to do with source-service flags fails the doc build:
[x] Error: Unknown option '--emit-digest --include-extended-types'

I.e. currently our custom_documentation_parameters parameter is broken in general for iOS doc builds. This has nothing to do with the source-service flags.
It works ok for single items but since we already inject --emit-digest any additional parameters coming from .spi.yml will break doc generation on iOS.
Originally posted by @finestructure in https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/2794#issuecomment-1864405471

Upon further investigation I'm not so sure it's about quoting after all. The complete set of parameters is correctly parsed out and passed to the docc call and I even manually injected a set with double quotes. Both times I get
CompileDocumentation (in target 'SemanticVersion' from project 'SemanticVersion')
[x] Error: Unknown option '--source-service github --source-service-base-url https://github.com/swiftpackageindex/semanticversion/tree/main --checkout-path /Users/sas/Projects/SPI/spi-builder'
Usage: docc convert [<options>] <source-bundle-path>
  See 'docc convert --help' for more information.
Command CompileDocumentation failed with a nonzero exit code

Something in this call to docc is messed up but I can't figured out what. If I run the exact same command in a new checkout it works fine. Both calls are using the same Xcode version. Maybe they are picking up different docc versions? Seems unlikely but don't have a better explanation. Not sure how to verify that.

Will be fixed by https://gitlab.com/finestructure/swiftpackageindex-builder/-/merge_requests/243

This has been deployed.


[Question] Using a thread worker written in TypeScript

I'm using Typescript and a worker thread using a lot of modules.
I guess I should take the release route even for development to produce a correct javascript file to be used by this library. Am I wrong?

I'll be on the same page soon when I switch to TS. If you figure this out it'd be great if someone could add it to the readme :)

Have you done it with Javascript with multiple files or only one file containing all the business logic? Are you using native modules?
I've managed to give it a javascript file but it is failing with a red screen telling me that

'DeviceInfo native module is not installed'

DeviceInfo.js: 17:10

This file is here:
./node_modules/react-native/Libraries/Utilities/DeviceInfo.js

I'm using native modules and multiple JS files on iOS but I have not tried Android. The readme has instructions for setting up native modules with Android which requires an additional step. It sounds like you may need to do that.

I've seen that and used it already. The problem is that DeviceInfo is a React Native module !

No idea then. I know there's a community version of DeviceInfo as it's one
of the modules they are working on breaking out from the core. Maybe you
need to include it anyways?
On Wed, Mar 13, 2019 at 1:57 PM Olivier MATROT<EMAIL_ADDRESS>wrote:

I've seen that and used it already. The problem is that DeviceInfo is a
React Native module !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joltup/react-native-threads/issues/67#issuecomment-472537081,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjh8sIt23fArOooO9kDLqFxlUucnXwTks5vWTwDgaJpZM4btmiy
.

--
Chris Roth
cjroth.com http://www.cjroth.com

It is a packager problem, there is a request to the 'thread.js' file to bundle it.
It seems to me that my file is somehow invalid for the bundler which may not be able to require the modules correctly...
How do you import your dependencies at the top of your .js thread file?

Oops I missed your last comment. Yeah, I just import everything at the top of my js thread file. Importing works just the same as it does in the main RN JS thread though. It's basically a parallel universe.
Were you able to get TS working with the thread? I'm starting to look into moving over to it now.

Did you guys find a way to solve this?

is it possible to run a string encoded js bundle instead of a file name?
that way one could transpile TS and generate a big chungus JS bundle to run in the worker


Move DataflowRunnerHarness class underneath org.apache.beam namespace

com/google/cloud/dataflow/worker/DataflowRunnerHarness.class should appear underneath the org.apache.beam.runners.dataflow.worker namespace.
Imported from Jira BEAM-6137. Original Jira may contain additional context.
Reported by: lcwik.

obsolete, JRH has been teardown (#24515)


[deps] Pinned django-filter to 21.1

Coverage remained the same at 98.662% when pulling 86cd9f82b7cfb1a51f5c524918adc0b9bf799342 on fix-django-filter-version into afa8f7bfa7a4532aab7c1c4fa4d76e55eea635c7 on master.


performance issue - apply with pd.Series vs tuple

https://groups.google.com/forum/#!topic/pydata/8Xr7SBmCvbs
Below is 2 versions of applyshift function (if you comment out some places), in one case it returns tuple and in the other case pandas Series.
Then this function is applied to a large pandas dataframe along each row (axis=1).
Why is the running time slower about 10 times with pd.Series???
def applyshift(col1,col2,col3,col4):
    if abs(col1-0)<0.01:
        #return pd.Series(dict(zip(('col2','col3','col4'),
        return (
                   0,0,col4)#)))
    if abs(col1-1)<0.01:
        #return pd.Series(dict(zip(('col2','col3','col4'),
        return (
                    col2,0,col4)#)))

%%time
df2=df1.apply(lambda row: applyshift(
        row['col1'],row['col2'],row['col3'],row['col4']), axis=1)

@denfromufa pls supply a copy pastable example
not really sure why you would ever do this and not just use a vectorized version.

I'm not surprised -- it is much more expensive to create a pandas series than a builtin Python tuple. The Series does a lot more, and has many parts written in Python instead of C. There isn't much we could do about this.

@jreback, can vectorization operate on if-else blocks? or do I have to refactor using .where() method like here?
http://stackoverflow.com/questions/13596419/how-to-combine-two-columns-with-an-if-else-in-python-pandas
http://stackoverflow.com/questions/28896769/vectorize-conditional-assignment-in-pandas-dataframe

yes, you should be using vectorized assignments

refactoring into np.where looks very ugly and so I ended up using tuples instead of pd.Series() and then converting to dataframe later:
pd.DataFrame(df2.values.tolist())
Note that .apply() suggested on SO is horribly slow compared to this method above:
http://stackoverflow.com/questions/29550414/how-to-split-column-of-tuples-in-pandas-dataframe/33763855#33763855


matchPatterns are not working in action: Block rule

Bug Report

General Information

Environment description - GKE
Kernel version - Linux mysql-58cdf6ccf-zp6wm 5.10.109+ #1 SMP Tue May 24 09:08:48 UTC 2022 x86_64 GNU/Linux
Orchestration system version in use

kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2", GitCommit:"f66044f4361b9f1f96f0053dd46cb7dce5e990a8", GitTreeState:"archive", BuildDate:"2022-06-18T07:33:51Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.10-gke.600", GitCommit:"2c921d7b040ed9c5a3a1f9407fb109b74d72d0a4", GitTreeState:"clean", BuildDate:"2022-06-02T09:20:24Z", GoVersion:"go1.16.15b7", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.24) and server (1.22) exceeds the supported minor version skew of +/-1

Link to relevant artifacts
Deployments:-
kubectl apply -f https://raw.githubusercontent.com/kubearmor/KubeArmor/main/examples/wordpress-mysql/wordpress-mysql-deployment.yaml
Policy:-

apiVersion: security.kubearmor.com/v1
kind: KubeArmorPolicy
metadata:
  name: ksp-mysql-block-chmod-777-mal
  namespace: wordpress-mysql
spec:
  severity: 5
  selector:
    matchLabels:
      app: mysql
  process:
    matchPatterns:
    - pattern: /*/chmod 777 mal
  action: Block

Target containers/pods
MySQL
To Reproduce

Instruction

Deploy this deployment kubectl apply -f https://raw.githubusercontent.com/kubearmor/KubeArmor/main/examples/wordpress-mysql/wordpress-mysql-deployment.yaml
Apply the policy mentioned above and try to run that chmod 777 mal command inside the mysql pod.

Expected behavior
Expected behaviour is Permission Denied
But it is not working and If I change that to action: Audit it's working fine and generating logs as shown below.
Policy:-
apiVersion: security.kubearmor.com/v1
kind: KubeArmorPolicy
metadata:
  name: ksp-mysql-audit-chmod-777-mal
  namespace: wordpress-mysql
spec:
  severity: 5
  selector:
    matchLabels:
      app: mysql
  process:
    matchPatterns:
    - pattern: /*/chmod 777 mal
  action: Audit

Logs:-
== Alert / 2022-07-29 10:38:15.729771 ==
ClusterName: default
HostName: gke-cys-july-28-default-pool-1981dfbd-gr33
NamespaceName: wordpress-mysql
PodName: mysql-58cdf6ccf-7b9km
Labels: app=mysql
ContainerName: mysql
ContainerID: 7a5622a391a4faeb9fcc4c1f8d598421b6834944e30e8f3b57d1164156902107
ContainerImage: docker.io/library/mysql:5.6@sha256:20575ecebe6216036d25dab5903808211f1e9ba63dc7825ac20cb975e34cfcae
Type: MatchedPolicy
PolicyName: ksp-mysql-block-sleep-5
Severity: 5
Source: /bin/bash
Resource: /bin/chmod 777 mal
Operation: Process
Action: Audit
Data: syscall=SYS_EXECVE
Enforcer: eBPF Monitor
Result: Passed
HostPID: 704536
HostPPID: 703656
PID: 605
PPID: 594
ParentProcessName: /bin/bash
ProcessName: /bin/chmod

A description of what you expected to happen.
It should block the chmod command from the execution.
Screenshots
I have tested for matchPattern with action: Block , but It’s not working and even not generating the log.

In case of action: Audit, It works fine and generating logs.

Kindly look into this.
If applicable, add screenshots to help explain your problem.
cc: @nyrahul

Hey @yasin-cs-ko-ak,
We only support patterns for the corresponding process/file paths/dirs.
For example:
matchPatterns:
   - pattern: /*/chmod 777 mal

Is an invalid policy because it contains arguments for the process as well, which shouldn't be part of the policy.

// @achrefbensaad
Can this handled in the controller? Such constructs shouldn't be accepted by KubeArmor.

That argument is accepted by kubearmor and it's working and generating logs
but only with audit rule.
Is it possible block that argument from executing?
On Wed, 3 Aug 2022, 2:58 pm Barun Acharya, @.***> wrote:

// @achrefbensaad https://github.com/achrefbensaad
Can this handled in the controller? Such constructs shouldn't be accepted
by KubeArmor.
—
Reply to this email directly, view it on GitHub
https://github.com/kubearmor/KubeArmor/issues/793#issuecomment-1203707694,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV566E2DG6SMOUUAKAFLKS3VXI3SNANCNFSM55NQL5FA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hey @yasin-cs-ko-ak,
From my understanding it's working with Audit just due to some partial matching with the Resource.
Yes, KubeArmor is accepting the arguements but it shouldn't be accepting them. The way our enforcement system works doesn't enforce based on what arguments are passed just the source and resource of the execution.
We will be fixing this behaviour in the sense that we won't be accepting such policies after the fix.
It's not possible yet to support policies such as these.
Hope this clarifies things! Thanks :)

Now I understand it. Thanks for the clarification :) I'll let you know if I
have any questions.
On Wed, 3 Aug 2022, 3:17 pm Barun Acharya, @.***> wrote:

Hey @yasin-cs-ko-ak https://github.com/yasin-cs-ko-ak,
From my understanding it's working with Audit just due to some partial
matching with the Resource.
Yes, KubeArmor is accepting the arguements but it shouldn't be accepting
them. The way our enforcement system works doesn't enforce based on what
arguments are passed just the source and resource of the execution.
We will be fixing this behaviour in the sense that we won't be accepting
such policies after the fix.
It's not possible yet to support policies such as these.
Hope this clarifies things! Thanks :)
—
Reply to this email directly, view it on GitHub
https://github.com/kubearmor/KubeArmor/issues/793#issuecomment-1203727476,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV566E4URUVQJGVLYK75F43VXI52ZANCNFSM55NQL5FA
.
You are receiving this because you were mentioned.Message ID:
@.***>

// @achrefbensaad
Can this handled in the controller? Such constructs shouldn't be accepted by KubeArmor.

@daemon1024  That can be handled via validating webhooks.

Great, @achrefbensaad Could you handle this as part of #794. Thanks!

@daemon1024 Let's handle it in a seperate PR, as #794 is stricktly for merging the controllers. In addition we need to inventory all the needed checks to properly build the validation logic.


Problem with cl3 dragging in stcm-editor.

I wanted to create a new NeptuniaVII character texture cl3 instead, so I dragged it to stcm-editor. However, dragging did not even work. So, I tried to execute the command directly through cmd, but this time cl3 file access was denied or error message was displayed. I do not really know what the problem is. Please let me know how to fix it.

You'll have to rename stcm-editor to cl3-tool to use file dragging.
About cmd: could you please post the exact command you tried to run and any output of the program?

It's good to do what you told me. Thank you!  It is a cl3 file created by using the strtool once.


[question] Logging to File, Syslog or Email

Hi,
I would like to start using this framework instead of log4sh and I want to kindly ask you if there is any example or if somebody can guide me on how to log to a file, syslog or send the logs thru email?
Thank you.

Based on my codereading, I think what you have to do is just to redirect stderr to file you want.
so,
$ ./your-script.sh 2>log-file.txt

Because all log methods(defined in lib/util/logs.sh) seems to cat all messages to stderr
my test success(test.sh is example code at README.md, Using Basic Logging, Colors and Powerline Emoji):
<X_X>:bash-oo-framework$ ./test.sh
I'm blue...
[DEBUG] [test.sh:19] Play me some Jazz, will ya? 🎷
Something bad happened.
This will be printed to STDERR, no matter what.
0is0[feature/japanese-docs]
<X_X>:bash-oo-framework$ ./test.sh 2>log.txt
I'm blue...
0is0[feature/japanese-docs]
<X_X>:bash-oo-framework$ cat log.txt
[DEBUG] [test.sh:19] Play me some Jazz, will ya? 🎷
Something bad happened.
This will be printed to STDERR, no matter what.

++ I'm not a member of maintainer, not good at this framework, so this might be wrong.
Please remember this is just my opinion...
I'm happy if this helps you.

@Cj-bc Thank you for your help, but I am trying to avoid that way.
Based on documentation, I've already find a way, but, if there is any better example of how to log to file, syslog or email, please let me know.
#!/usr/bin/env bash
source "$( cd "${BASH_SOURCE[0]%/*}" && pwd )/lib/oo-bootstrap.sh"

import util/log

namespace myApp
myLoggingDelegate() {
    echo "$(date +'%F %T %Z') [${subject}]: $*"
    echo "$(date +'%F %T %Z') [${subject}]: $*" >> test.log
}
Log::RegisterLogger MYLOGGER myLoggingDelegate
Log::AddOutput myApp MYLOGGER

subject="WARNING" Log "Something"

@nicutor oh, I see.
I think the way you showed(declaring Logger) is only the way to do that.
If I find any solution, I'll let you know.

@nicutor's answer is correct. In the current version logging is a bit over-engineered. I'd like to simplify it in the next version that we're brainstorming in #45, feel free to join.


docusaurus build failed

Hi,
i'm using  "@docusaurus/core": "^2.0.0-beta.21", "@docusaurus/preset-classic": "^2.0.0-beta.21"
when i added redocusaurus 1.1.2 and tried to build the docs i got this error:

this is the configuration:
 [       'redocusaurus',       {         debug: true,         specs: [           {             spec: 'https://redocly.github.io/redoc/openapi.yaml',             route: '/api/',           },         ],       }     ],

@guylev008 Did this get fixed by the recent release (v1.2.0) or was due to some other reason?


Android StudioAndroid Studio Electric Eel | 2022.1.1 Support

lombok-plugin.zip

Related Links

The plugin you provided had some problems in code completion. This worked for me:
lombok-electric eel.zip

The plugin you provided had some problems in code completion. This worked for me:
lombok-electric eel.zip

I have no problems during use, you can try to reinstall Android Studio

The plugin you provided had some problems in code completion. This worked for me:
lombok-electric eel.zip

Thank you for your reply and the plugin provided


Define a weak user messaging parser. This should be redefined in main.c

Call user messging parser before module messaging parser
Reserve message codes 70 to 99 for user messages

😍😍Sent via the Samsung Galaxy S8, an AT&T 4G LTE smartphone
-------- Original message --------From: Najibkassab<EMAIL_ADDRESS>Date: 3/29/20  1:28 PM  (GMT+02:00) To: HexabitzPlatform/BOS<EMAIL_ADDRESS>Cc: HexabitzGit<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [HexabitzPlatform/BOS] Define a weak user messaging parser. This should be redefined in main.c (#64)
@Najibkassab commented on this pull request.
DONE
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/HexabitzPlatform/BOS/pull/64#pullrequestreview-383395157",
"url": "https://github.com/HexabitzPlatform/BOS/pull/64#pullrequestreview-383395157",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]


Monorepo / workspaces imports attempt to reference rootDir / outDir literally instead of package path reference

Bug Report

🔎 Search Terms

Monorepo workspaces
import from distribution instead of source
auto-import from package not source
import from source incorrectly
🕗 Version & Regression Information

This is the behavior in every version I tried, from 4.1.* to 4.4.3

💻 Code
When trying to resolve a packages exports the paths do not resolve as a normal packages would, except for the case of the index, where it instead tries to use either the outDir or the rootDir.
I have created a minimum reproduction of the issue here: https://github.com/Codex-/monorepo-issue
Does not work:
// These imports should resolve the generated package structure:
import { name as catName } from "@monorepo-issue/dep-a/cat/cat";
import { name as dogName } from "@monorepo-issue/dep-a/dog/dog";
import { isEvil } from "@monorepo-issue/dep-a/eggman/eggman";

Works when referenced via the outDir:
// Importing from generated lib works:
import { name as catName } from "@monorepo-issue/dep-a/lib/cat/cat";
import { name as dogName } from "@monorepo-issue/dep-a/lib/dog/dog";
import { isEvil } from "@monorepo-issue/dep-a/lib/eggman/eggman";

Works when referenced via the rootDir:
// Importing from src works:
import { name as catName } from "@monorepo-issue/dep-a/src/cat/cat";
import { name as dogName } from "@monorepo-issue/dep-a/src/dog/dog";
import { isEvil } from "@monorepo-issue/dep-a/src/eggman/eggman";

🙁 Actual behavior

When importing from these monorepo/workspaces packages the path should be that of the package import path, opposed to the source:

(Should not have src but instead the package path of @monorepo-issue/dep-a/eggman/eggman)
🙂 Expected behavior

I would expect that as this is imported to main as a package, it would behave like a package and the imports to be valid without requiring the full path including the package root and either the outDir or rootDir.
I'm hoping this is a simple repository configuration issue, from the way workspaces and package references are described I would expect this to work as described above though.

TypeScript does not support subpath exports yet, which would be the modern way of configuring your package.
Currently, you wan work around this issue by adding a typesVersions to your package.json. Something like this worked for me:
{
  "main": "./dist/lib.js",
  "exports": {
    ".": "./dist/lib.js",
    "./*": "./dist/*.js"
  },
  "types": "./dist/lib.d.ts",
  "typesVersions": {
    "*": {
      "obj/lib.d.ts": ["./dist/lib.d.ts"],
      "*": ["./dist/*"]
    }
  }
}

Hmmm seems weird, workspace packages do not act like real packages?

AFAIK, this has nothing to do with monorepos. It's just that, if the package is meant to be consumed by importing its sub modules, additional configuration for both NodeJS and TypeScript is required.
package.json always allowed you to define the library entry point with main, but importing other files would be relative to the package's root.
Node 12 added support for this exports key, which allows you to map the exports to other locations (and add the file extension so it works with ES modules. This way you can have @monorepo-issue/package/stuff map to {package-root}/outDir/stuff.js instead of {package-root}/stuff. Without this, you would have to import it with @monorepo-issue/package/outDir/stuff.js.
However, TypeScript is not aware of the mapping done by exports, which means it will still respect the main field and try to look for a type definition next to it, but for sub imports, it will look for them starting at the root of the package. But it's possible to work around this by defining a typesVersions property that reproduces the exports property.

The salient point here is we have no idea what directory you plan to npm publish in your dependency—the root, or your outDir? TypeScript can only see the relationship of the files as they are on disk. As @ilogico points out, export maps would be one way of solving this in the future (TypeScript 4.5 will support them under --moduleResolution node12), since both TypeScript and Node understand them the same way. The intended workflow for workspaces like this right now is to use path mappings in your tsconfig.json like
// packages/main/tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "dep-a/*": ["../dep-a/src/*"]
    }
}

The paths referencing dep-a/src or dep-a/lib will still resolve, which is not desirable, but auto-imports will deprioritize these in favor of the path-mapped version. See https://github.com/microsoft/TypeScript/pull/40253 and its linked issues for more details.

The intended workflow for workspaces like this right now is to use path mappings in your tsconfig.json like

// packages/main/tsconfig.json

{

  "compilerOptions": {

    "paths": {

      "dep-a/*": ["../dep-a/src/*"]

    }

}

Doesn't https://github.com/microsoft/TypeScript/issues/45964#issuecomment-923974698 solve this more cleanly by allowing the package to specify how consumers should resolve these paths? This seems to solve the problem in lieu of TS 4.5, but I'm hesitant to go full bore with this without understanding where the edge cases may be. Is this primarily because auto-imports won't behave as expected?

Yeah have gone with #45964 (comment) until a more concrete solution / answer arises. Both current solutions don't feel great.

Doesn't [export maps] solve this more cleanly by allowing the package to specify how consumers should resolve these paths? This [tsconfig path mapping] seems to solve the problem in lieu of TS 4.5, but I'm hesitant to go full bore with this without understanding where the edge cases may be. Is this primarily because auto-imports won't behave as expected?

I think export maps are probably going to be a better long-term solution for most Node projects, but it’s kind of a big “it depends,” especially for the short term when export maps are pretty nascent. When you use path mapping in this case, it feels very kludgy that you can still resolve the relative paths that won’t actually work at runtime. The node12+ module resolution stuff is really nice because the package.json-level config specifies exactly what should happen at runtime, and TypeScript can just follow that. But if you’re not actually writing for node, what then? Path mapping is a more versatile tool, and that has both upsides and downsides. It’s not always the right tool for the job, and it’s not perfect even when it is the right tool for the job. There are so many different JS runtimes and bundlers and ways of organizing projects that TypeScript will never have a tailored solution for each one.


[ALLUXIO-3148] PrometheusMetricsServlet

https://alluxio.atlassian.net/browse/ALLUXIO-3148
This pull request adds a new Metrics servlet that formats the codahale metrics as prometheus metrics.
This contribution is entirely my own, done on my personal time and machine although it will be very useful during my office hours should it be merged.
Thanks for your attention!

I added a second commit to start the PrometheusMetricsServlet just like the MetricsServlet is started.
I was not sure what would be the best way to turn off this new feature just looking at the MetricsServlet.
Hence I assumed everyone wants this new endpoint.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19089/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19090/
Test PASSed.

@calvinjia  do we have license requirement?

@hmalphettes Thanks for the contribution! Could you verify these new dependencies have licenses compatible with Apache 2.0? I think they are all Apache 2.0, but would like to double check.

Sure - everything in prometheus is ASL-2.0.
We are adding directly or indirectly the following dependencies:
https://github.com/prometheus/client_java/blob/master/simpleclient/pom.xml
https://github.com/prometheus/client_java/blob/master/simpleclient_common/pom.xml
https://github.com/prometheus/client_java/blob/master/simpleclient_dropwizard/pom.xml
https://github.com/prometheus/client_java/blob/master/simpleclient_servlet/pom.xml
And then io.dropwizard.metrics/metrics-core/3.1.2 which is maintained by Coda Hale and is also ASL-2.0: https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core/3.1.2
We are ignoring the servlet dependency as it is not distributed from here.

@hmalphettes Thanks for verifying!

Great! Let's contribute a grafana dashboard eventually.
Thanks to all!


[feat]: Allow user to specify date format

Prerequisites

[X] I have searched for existing issues that already suggest this feature, without success.

Describe the Feature Request
Allow users to customise the date format. Currently it's M/d/yy
Example in Backup page

Describe the Use Case
Most countries outside of the US use other date formats (e.g. DMY or YMD) so seeing MDY is confusing.
Describe Preferred Solution
Maybe having 3 different options in the settings for MDY, DMY, and YMD.
The Angular DatePipe can be used with different formats.
Describe Alternatives
No response
Anything else?
Related to #1502

The is partially addressed in <IP_ADDRESS> by changing the display format to Jul 25, 2022, 8:53:05 AM for greater clarity. I will leave this ticket open for eventual greater customization of display format.


Not working with firefox

I installed on my firefox 66.0.3 (64-bit) on windows 10. but it does not work.
I just add if at https://addons.mozilla.org/en-US/firefox/addon/tiff-viewer/, did not show any problem. but when I download a tif, it sill prompt so save or open with other apps?
Any other steps need to do before it can show tif file?


create keywords for items in contentful to highlight in search

I've done so for BID https://app.contentful.com/spaces/uo17ejk9rkwj/entries/82243
so that it shows up in search https://www.gbif.org/search?q=bid
But other items that needs highlighting should also have keywords

@MortenHofft this is a content issue…? If so, let's assign it to @dnoesgaard and me.
And it results in surfacing that item (¿or items?) above all other search results, right?
Just added 'strategic plan' to the current strategic plan, waiting to see whether the change I expect takes effect...

sorry, see the editorial label now...duh

I've started a somewhat systematic review of keywords that we might need to add. I've noticed, however, that phrases don't work. For example, I added "what is gbif" to this article (Contentful item, but searching for the phrase doesn't work.
Maybe this is intentional or maybe I'm doing something wrong? @MortenHofft ?

it is 1 keyword (similar to the one we had in Drupal)
https://www.gbif.org/search?q=gbif, what is gbif, global biodiversity information facility, background, history


services(nim): fix function call

Please describe the changes in your PR. If it is addressing an issue, please reference that as well.
function calling with NIM (examples/foundational/14j-function-calling-nim.py) gives the error:
2024-12-16 22:51:02.205 | ERROR    | pipecat.pipeline.task:_handle_upstream_frame:64 - Error running app: ErrorFrame#0(error: Error code: 400 - {'type': 'about:blank', 'status': 400, 'title': 'Bad Request', 'detail': "[{'type': 'string_too_short', 'loc': ('body', 'messages', 5, 'content'), 'msg': 'String should have at least 1 character', 'input': '', 'ctx': {'min_length': 1}}]"}, fatal: False)

I tracked it down to this line.
there may be a more elegant way to solve this, but this PR does the trick for me.

@vipyne rather than change NimLLMService due to a Grok requirement, let's update the GrokLLMService. I've made that change here: https://github.com/pipecat-ai/pipecat/pull/877.
In that PR, I made the example changes you've recommended here. Though, I'm still seeing that the NimLLMService is very unreliable. TTFB is very long and often it just doesn't return a completion. Are you seeing the same thing.

closed in favor of #877