text:
tapgarden: batch restart fixes

Should fix https://github.com/lightninglabs/taproot-assets/issues/940.
Likely caused by changes in https://github.com/lightninglabs/taproot-assets/pull/866.

I ran this pull request as part of litd. I might need some help verifying that I really did run this code, though.
First I checked out this branch on the litd repo:
git checkout 0-19-staging
I'm on commit 980ee938aa1e7a45633216aff8775ca8d05c12aa
Then I modified the go.mod file. I changed the /taproot-assets line to github.com/lightninglabs/taproot-assets 3159ec9448670552a2c39ae94d7a1d6b5c3178e2
Then I ran go mod tidy. The go.mod file now read:
github.com/lightninglabs/taproot-assets v0.3.3-0.20240610035446-3159ec944867
Then I compiled litd with make install
I then ran litd with litd
Unfortunately, litd crashed:
2024-06-10 09:35:18.120 [DBG] GRPC: [core] [Channel #143 SubChannel #144] Subchannel created
2024-06-10 09:35:18.120 [DBG] GRPC: [core] [Channel #143] Channel Connectivity change to CONNECTING
2024-06-10 09:35:18.121 [INF] RPCS: Trader server is now active
2024-06-10 09:35:18.122 [DBG] STAT: Setting the pool sub-server as running
2024-06-10 09:35:18.122 [INF] SSVR: Opening sqlite3 database at: /home/ubuntu/.tapd/data/testnet/tapd.db
2024-06-10 09:35:18.130 [DBG] GRPC: [core] [Channel #143 SubChannel #144] Subchannel Connectivity change to CONNECTING
2024-06-10 09:35:18.131 [DBG] GRPC: [core] [Channel #143 SubChannel #144] Subchannel picks a new address "test.pool.lightning.finance:12010" to connect
2024-06-10 09:35:18.131 [DBG] GRPC: [core] [pick-first-lb 0xc003ea52c0] Received SubConn state update: 0xc003ea53e0, {ConnectivityState:CONNECTING ConnectionError:<nil>}
2024-06-10 09:35:18.131 [DBG] RPCS: [/lnrpc.Lightning/SubscribeChannelEvents] requested
2024-06-10 09:35:18.131 [DBG] RPCS: [/lnrpc.Lightning/ChannelAcceptor] requested
2024-06-10 09:35:18.160 [INF] TADB: Applying migrations from version=18
2024-06-10 09:35:18.173 [INF] SSVR: Configuring testnet.universe.lightning.finance:10029 as initial Universe federation server
2024-06-10 09:35:18.174 [INF] SRVR: Version: 0.3.2-alpha commit=v0.3.3-0.20240610035446-3159ec944867, build=production, logging=default, debuglevel=info
2024-06-10 09:35:18.175 [INF] SRVR: Active network: testnet3
2024-06-10 09:35:18.175 [INF] RPCS: Validating RPC requests based on macaroon at: /home/ubuntu/.tapd/data/testnet/admin.macaroon
2024-06-10 09:35:18.186 [INF] GRDN: Starting ChainPlanter
2024-06-10 09:35:18.194 [INF] GRDN: Retrieved 2 non-finalized batches from DB
2024-06-10 09:35:18.194 [INF] GRDN: Launching ChainCaretaker(024613161ec23c8140dc613e2d2b01d806c523a562db206b435afc9e7fdd7ff090)
2024-06-10 09:35:18.198 [INF] GRDN: Starting asset custodian
2024-06-10 09:35:18.200 [INF] GRDN: Starting re-org watcher
2024-06-10 09:35:18.198 [INF] GRDN: BatchCaretaker(024613161ec23c8140dc613e2d2b01d806c523a562db206b435afc9e7fdd7ff090), advancing from state=BatchStateFrozen to state=BatchStateBroadcast
2024-06-10 09:35:18.199 [INF] GRDN: Gardener for ChainPlanter now active!
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1a7ac14]

goroutine 3411 [running]:
github.com/lightninglabs/taproot-assets/tapgarden.(*BatchCaretaker).stateStep(0xc0002d5340, 0x60?)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240610035446-3159ec944867/tapgarden/caretaker.go:577 +0xb4
github.com/lightninglabs/taproot-assets/tapgarden.(*BatchCaretaker).advanceStateUntil(0xc0002d5340, 0x1, 0x3)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240610035446-3159ec944867/tapgarden/caretaker.go:292 +0x210
github.com/lightninglabs/taproot-assets/tapgarden.(*BatchCaretaker).assetCultivator(0xc0002d5340)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240610035446-3159ec944867/tapgarden/caretaker.go:351 +0x23e
created by github.com/lightninglabs/taproot-assets/tapgarden.(*BatchCaretaker).Start.func1 in goroutine 1
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240610035446-3159ec944867/tapgarden/caretaker.go:155 +0x67
	```

@Roasbeef will review
it's uncertain if this PR genuinely fixes #940 but it is known that #941 is a genuine fix

So the issue seems to be that you have a batch on disk that is in state BatchStateFrozen, with an empty GenesisPacket.
This could happen if you crashed while minting with v0.3.3, as there the batch was frozen before funding and sealing.
This could also happen on main if you crashed while finalizing the batch, as we write the batch to disk as Frozen before funding and sealing are started and succeed.
On restart, if the batch has state Frozen, later code in the caretaker assumes that it has a GenesisPacket.
The open question IMO is what to do with a batch in state Frozen that still needs changes (like funding and sealing). My intent for this PR is to have that handled before the caretaker starts so that we don't need a bunch of extra checks in the caretaker.

Awesome, I'm running this patch, so far no issues!

But running tapcli --tlscertpath ~/.lit/tls.cert --rpcserver=localhost:8443 --network=testnet assets mint batches still results in a crash:
[tapcli] unable to list batches: rpc error: code = Unavailable desc = error reading from server: EOF
2024-06-12 03:26:26.579 [INF] LITD: Handling gRPC request: /mintrpc.Mint/ListBatches
2024-06-12 03:26:26.583 [DBG] RPCS: [/mintrpc.Mint/ListBatches] requested
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x47b9fa]

goroutine 27193 [running]:
github.com/btcsuite/btcd/btcec/v2/schnorr.SerializePubKey(...)
	github.com/btcsuite/btcd/btcec/v2@v2.3.3/schnorr/pubkey.go:47
github.com/lightninglabs/taproot-assets/taprpc.MarshalScriptKey({0x0?, 0x0?})
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/taprpc/marshal.go:111 +0x4f
github.com/lightninglabs/taproot-assets.marshalSeedling(0xc00191ea00)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:4010 +0x37e
github.com/lightninglabs/taproot-assets/fn.MapErr[...]({0xc006750740?, 0x2, 0xc003713350}, 0x352f2e0?)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/fn/func.go:71 +0x5f
github.com/lightninglabs/taproot-assets.marshalSeedlings(0xc0090f2630)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:4063 +0x14b
github.com/lightninglabs/taproot-assets.marshalMintingBatch(0xc00191e980, 0x0)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:3947 +0x45d
github.com/lightninglabs/taproot-assets.marshalVerboseBatch({0x37c35b0, 0xc0025b9620}, 0xc006750620, 0x0, 0x0)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:3859 +0x38
github.com/lightninglabs/taproot-assets.(*rpcServer).ListBatches.func1(0x5?)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:860 +0x2b
github.com/lightninglabs/taproot-assets/fn.MapErr[...]({0xc00abb9470?, 0x5, 0x0}, 0xc003713600?)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/fn/func.go:71 +0x5f
github.com/lightninglabs/taproot-assets.(*rpcServer).ListBatches(0xc000683810, {0x37c35b0, 0xc0025b9620}, 0xc002b75c00)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/rpcserver.go:856 +0x3c5
github.com/lightninglabs/taproot-assets/taprpc/mintrpc._Mint_ListBatches_Handler.func1({0x37c35b0?, 0xc0025b9620?}, {0x2226ea0?, 0xc002b75c00?})
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/taprpc/mintrpc/mint_grpc.pb.go:335 +0xcb
github.com/lightningnetwork/lnd/rpcperms.(*InterceptorChain).CreateServerOpts.(*InterceptorChain).middlewareUnaryServerInterceptor.func7({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00}, 0xc004703400, 0xc0048012c0)
	github.com/lightningnetwork/lnd@v0.18.0-beta.rc3.0.20240607141010-393d6829ca7d/rpcperms/interceptor.go:832 +0x111
google.golang.org/grpc.getChainUnaryHandler.func1({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00})
	google.golang.org/grpc@v1.59.0/server.go:1163 +0xb2
github.com/lightningnetwork/lnd/rpcperms.(*InterceptorChain).CreateServerOpts.(*InterceptorChain).MacaroonUnaryServerInterceptor.func5({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00}, 0xc004703400?, 0xc002b86980)
	github.com/lightningnetwork/lnd@v0.18.0-beta.rc3.0.20240607141010-393d6829ca7d/rpcperms/interceptor.go:689 +0x7d
google.golang.org/grpc.getChainUnaryHandler.func1({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00})
	google.golang.org/grpc@v1.59.0/server.go:1163 +0xb2
github.com/lightningnetwork/lnd/rpcperms.(*InterceptorChain).CreateServerOpts.(*InterceptorChain).rpcStateUnaryServerInterceptor.func3({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00}, 0xc004703400, 0xc002b86880)
	github.com/lightningnetwork/lnd@v0.18.0-beta.rc3.0.20240607141010-393d6829ca7d/rpcperms/interceptor.go:781 +0xfc
google.golang.org/grpc.getChainUnaryHandler.func1({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00})
	google.golang.org/grpc@v1.59.0/server.go:1163 +0xb2
github.com/lightningnetwork/lnd/rpcperms.(*InterceptorChain).CreateServerOpts.errorLogUnaryServerInterceptor.func1({0x37c35b0?, 0xc0025b9620?}, {0x2226ea0?, 0xc002b75c00?}, 0xc004703400, 0xc0048012c0?)
	github.com/lightningnetwork/lnd@v0.18.0-beta.rc3.0.20240607141010-393d6829ca7d/rpcperms/interceptor.go:605 +0x52
google.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1({0x37c35b0, 0xc0025b9620}, {0x2226ea0, 0xc002b75c00}, 0xc004703400, 0x78?)
	google.golang.org/grpc@v1.59.0/server.go:1154 +0x85
github.com/lightninglabs/taproot-assets/taprpc/mintrpc._Mint_ListBatches_Handler({0x238fb80, 0xc000876330}, {0x37c35b0, 0xc0025b9620}, 0xc002ac9700, 0xc000873160)
	github.com/lightninglabs/taproot-assets@v0.3.3-0.20240612001918-76ec8ac232e1/taprpc/mintrpc/mint_grpc.pb.go:337 +0x143
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003d2f00, {0x37c35b0, 0xc0025b9530}, {0x37d4ba0, 0xc0008cb520}, 0xc002d790e0, 0xc0008b5b00, 0x4ba3858, 0x0)
	google.golang.org/grpc@v1.59.0/server.go:1343 +0xdd1
google.golang.org/grpc.(*Server).handleStream(0xc0003d2f00, {0x37d4ba0, 0xc0008cb520}, 0xc002d790e0)
	google.golang.org/grpc@v1.59.0/server.go:1737 +0xc47
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/grpc@v1.59.0/server.go:986 +0x86
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 75
	google.golang.org/grpc@v1.59.0/server.go:997 +0x136

But running tapcli --tlscertpath ~/.lit/tls.cert --rpcserver=localhost:8443 --network=testnet assets mint batches still results in a crash: [tapcli] unable to list batches: rpc error: code = Unavailable desc = error reading from server: EOF

I updated this branch, can you try it out again? I think marhsalling for batches made before #866, was broken by #866. Should be fixed now.
I had added some assumptions in the marshalling code that all seedlings would have a script key set, which wouldn't be true for batches already stored in the DB before that PR.
Also added an extra check at the beginning of the caretaker so we exit gracefully in case on restart resume issues.

Yes I'm able to run tapcli assets mint batches without any issues on commit 3b3b4864778889cc1542062402e19cac1f66b44b
thank you!

authors: Liongrass dstadulis jharveyb

repo: lightninglabs/taproot-assets


text:
Minimum HTLC from API works strange. Is it bug?

When i create channels through API i use min_htlc_msat in openChannelSync
But when the channel was created i see this parameter at other side of channel
For example this channel was created from LND-41 with min_htlc_msat as 1:
https://1ml.com/channel/624841463022616576
But i see Min HTLC as 1 at other side BITCOIN-KIT [lnd/mainnet]
But the BITCOIN-KIT [lnd/mainnet] has default min htlc as 1000 and there is lnd too. And vice versa
And same info i see in lnd-41 side:
l getchaninfo 624841463022616576
{
    "channel_id": "624841463022616576",
    "chan_point": "8a6c0bf3afa6f710ad2f6635774c9416cda5ff29c2530c8f288cf4eacc1f0edb:0",
    "last_update": 1553263266,
    "node1_pub": "0283ca0b7eca022bcf8f32aa418e5ff2bd375806faba40409cdc8e48c2b32ef725",
    "node2_pub": "03dab87ff8635982815c4567eb58af48f9944d11c56beb12b91e1049aaea06e187",
    "capacity": "4000000",
    "node1_policy": {
        "time_lock_delta": 144,
        "min_htlc": "1",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "1",
        "disabled": false,
        "max_htlc_msat": "3960000000"
    },
    "node2_policy": {
        "time_lock_delta": 144,
        "min_htlc": "1000",
        "fee_base_msat": "500",
        "fee_rate_milli_msat": "500",
        "disabled": false,
        "max_htlc_msat": "3960000000"
    }
}

Is it bug?

No, it's how the protocol works. You convey the min amount that you'll accept. In order for you to accept a routed HTLC it comes across the other link.

source: gharchive/issue

authors: LNBIG-COM Roasbeef

repo: lightningnetwork/lnd

license: MIT

license_type: permissive

license_source: github-api


text:
No record of push amounts in channel opening historical data

Background
The current available tools like Thunderhub, Ride the Lightning, Balance of Satoshis, etc are lacking historical reporting data for push amounts involved in channel openings. If this info is not manually recorded, it is lost, or left to be implied. I believe this is because LND is not relaying this info for accounting tools.
These programs above all have reporting history tools which can provide downloaded spreadsheet-formatted data for channel opening/closing, routing fees earned, chain fees spent, among other things. This is exceptionally helpful for those operating lightning businesses or those who wish to keep clean accounting records. However, in going through node history, I've noticed there is not a record of push amounts in channel openings.
For example, if someone has opened a channel for 10M satoshis, and pushes half upon opening- the channel recipient would have 5M added to their local balance. This data is not tracked as far as I can tell, as channel opening records are not tagged with any push amount data in the history.
Your environment
-LND 15.1
-linux
-bitcoind
Steps to reproduce
Open a channel with an initial push amount. Neither the channel opener nor channel recipient will have record of the amount pushed through the channel in historical data. If this was done through an invoice immediately after or a keysend, but not during channel opening, there would be a record.
Expected behaviour
One would expect the push amounts involved in channel opening to be reflected in internal data of the nodes, similar to a keysend. Of course, other nodes on the network would not be privy to this information, but this should be stored locally.
Actual behaviour
No data recorded for push amounts in channel openings.

Similar to https://github.com/lightningnetwork/lnd/issues/4490

Closing this, since its a duplicate of https://github.com/lightningnetwork/lnd/issues/4490

authors: BTCBap alexbosworth saubyk


text:
[WIP] channeldb+routing+switch: move payment tracking from rpcserver to router+switch

This change moves responsibility for creating payments in the database
from the rpcserver and the original sender of the payment to the router
and the switch.
Previously, anytime the original sender was no longer available (e.g.
because lnd restarted or the client closed the stream) the payment would
not be saved in the database, and the preimage would not be available.
Now, the payment is originally created in the router before any payment
attempts are created, but is saved without a preimage. When a payment is
attempted, the payment in the database is updated with the route being attempted.
When the payment is finally complete and a preimage is available, the payment
is updated in the database with the preimage by the switch, which is guaranteed
to be alive when the payment completes.
Making this change required creating a new index for the payments by their
hash so that they can be retrieved and updated without knowing the order
in which they were inserted.
Specific changes include:

Add an index for payments by payment hash
Require a payment hash when adding a payment
Add UpdatePaymentRoute function to the DB
Add UpdatePaymentPreimage function to the DB
Create payments in the Router, add Preimages in the Switch

This is in response to the first two items listed in https://github.com/lightningnetwork/lnd/issues/2183 and should fix https://github.com/lightningnetwork/lnd/issues/2032 (although I haven't tested it).
This PR is work in progress and does not contain any updates to test cases. I'm posting it now for early feedback about the direction this PR is taking prior to going any further.

Superseded by #2761 and co. Thanks for getting the ball rolling on this change!

source: gharchive/pull-request

authors: Roasbeef treygriffith


text:
V0 14 3 branch rc1

## Change Description
Description of change / link to associated issue.
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing

[x] Your PR passes all CI checks.
[x] Tests covering the positive and negative (error paths) are included.
[x] Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

[x] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
[x] Commits follow the Ideal Git Commit Structure.
[x] Any new logging statements use an appropriate subsystem and logging level.
[x]  There is a change description in the release notes, or [skip ci] in the commit message for small changes.

📝 Please see our  Contribution Guidelines for further guidance.

@MissShadowwuu88 , I'm going to close this PR as I dont see any diffs not in the current code base or handled by a separate PR. Please read our Contribution Guidelines :)


text:
displaying JSON-data not inline

tableToJson.js works correctly and it was very useful for my project! but i want to display JSON-data in other way.
Now it works this way (inline):
[{"Title":"nikita","Sku":"245245245","Price ($)":"455"},{"Title":"anna","Sku":"2345","Price ($)":"678"}]
How I would like it to work:
[
    {
       "Title":"nikita",
       "Sku":"245245245",
       "Price ($)":"455"
    },{
       "Title":"anna",
       "Sku":"2345",
       "Price ($)":"678"
    }
]

how to change the code for correct output?

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28228165-displaying-json-data-not-inline?utm_campaign=plugin&utm_content=tracker%2F228299&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F228299&utm_medium=issues&utm_source=github).

This has to do with converting the object to a string using JSON.stringify. To make it 'pretty print' you would call it like this:
var table = $('#example-table').tableToJSON();
var str = JSON.stringify(table, null, 2); // spacing level = 2
console.log(str);
alert(str)

Yes, it works correctly!

license: mit

license_source: bigquery


text:
switch 控件如何取值？

请问： switch 控件如何取值？
界面如下，如何取到里面的id 或者是value值呢？

数据统计

                                                                                <input class="weui-switch-cp__input" id="0002" type="checkbox" checked="checked">

管理员

                                                                                <input class="weui-switch-cp__input" id="0003" type="checkbox" checked="checked">

用户画像

                                                                                <input class="weui-switch-cp__input" id="0000" type="checkbox" checked="checked">

海报插画

                                                                                <input class="weui-switch-cp__input" id="0001" type="checkbox" checked="checked">

functionCode = '';
$(".weui-switch-cp__input").each(function(){
if($(this).prop('checked')){
functionCode = functionCode + $(this).val() + ",";
}
});
if(functionCode.length > 0){
functionCode = functionCode.substr(0, functionCode.length - 1);
}
obj.functionCode = functionCode;


text:
Set timeline

Hello,
How can i set timeline like 1m, 12h, 1d, 1w etc.

Add data from different periods to the chart.

authors: liihuu nazrulcse

repo: liihuu/klineweb


text:
about backward function

hi, thanks for your work hocam
why backward function of SortVertices in cuda_ext.py does not have any calculations?
In this case, how gradients of the iou loss is calculated and backpropagation works?
Thank you

@orkunozturk Thank you for the question!
The function SortVertices return the INDICES of sorted vertices of the overlapping polygon of two rectangles in anti-clockwise order. Since the return value is discrete (integer number) but not continuous (float number), this function is not differentiable and thus has no backward pass. (functions which return indices are typically non-differentiable, like torch.argmax )
However, the calculation of IoU is still differentiable. The basic idea is to use shoelace formula to calculate the area of a convex polygon (the overlapping area of two rectangles). Given the unsorted coordinates of the polygon vertices and the sorted indices of the vertices, one can use the torch.gather to get the sorted vertices. Then, one can calculate the polygon area by applying the shoelace formula.

The process can be illustrated with this figure. The operations are orange. The tensors are blue. Note the sort operation is not differentiable, but the gradient from area to unsorted indices are guaranteed. Because gather is differentiable by definition and shoelace formula is basically some multiplication and addition.

Thanks for the great answer!
The reason why i asked this question is in the paper it says (4.2.2 Backward) "Especially, there exist some custom operations (intersection of two edges and sorting the vertexes etc.) whose derivative functions have not been implemented in the existing deep learning frameworks" (I know you are not one of the authors of the paper and this is an unofficial implementation). For this reason i thought there should be an implementation for the backward function.
But there is one point that i don't understand. Standard iou loss also has non-differentaible ops like max and its implementations only using pytorch python code and there is no extra custom autograd/ cuda cpp code (like g-iou). Can't we just resort to sort method of pytorch to sort vertices and not implement custom autograd functions and/or cuda.
In addition, i came accross this python pytorch code for the rotated iou calculation. Do you think can it be used for loss calculation?

@orkunozturk
The paper was written in about 2018/2019. The torch.gather function might not exist at that time. So I think the authors might have implemented something similar by themselves.
There are two different types of max ops. The one type returns the max VALUE, and the other type return the INDEX (in this case, it's usually called argmax). The first type is differentiable, because the return value is continuous. The g-iou code uses the first type.
The built-in sorting function of Pytorch sorts the elements of a tensor just by value. But for shoelace formula, one needs to sort some points by their coordinates in anti-clockwise. Thus, the built-in function torch.sort doesn't solve the problem. Generally speaking, one key component of a sorting algo is the definition of compare. In the case of sorting points in anti-clockwise, one has to define the spatial relationship of points and how to compare them according to the coordinates. Usually, a sorting algo (like std::sort in C++ or sort in normal Python) allows users to define their own compare function. But the pytorch.sort doesn't provide this opportunity. So, instead of defining the costume data structure and compare function and then using template libraries (like what people always do with std::sort), I have to implement the sorting algo from scratch.
I think the code works as well. Pytorch uses dynamic graph and thus allows user to use normal Python flow control with Pytorch-Ops. The advantage of this implementation its readability and simplicity. But its speed is probably lower than my implementation (just my assumption, have never tested it ...)  because of the bad performance of Python. By the way, I chose to use CUDA just because I wanted to learn it 😆

authors: lilanxiao orkunozturk


text:
Increase tomcat's session timeout

Currently, the session timeout is set to 1 minute (by default from Tomcat). We should increase this value for debugging purposes.

I checked the web.xml file inside docker container for powerauth-server and the default timeout is 30 minutes in web.xml:
  <!-- You can set the default session timeout (in minutes) for all newly   -->
  <!-- created sessions by modifying the value below.                       -->

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

In case 30 minutes is not long enough, what timeout do you suggest?

We can close this issue - for some reason, the session used to be terminated after 1 minute before, but this is no longer the case...

authors: hvge petrdvorak romanstrobl

repo: lime-company/powerauth-docker


text:
Stricter validation

There are many attributes in the API, that would benefit from stricter validation. E.g. country codes all across the API and many things in RunnerMetaData, age and year entries. That boils down to validating membership of an enum instead of having a str or setting a strict range for numerical values.
Now, while it would be possible to implement the stricter validation with the current msgspec version, it's unfortunately not possible to configure a different error behaviour, in case some data decoding fails the validation. Already in our small selection of sample data, we have cases, when e.g. country codes are populated with garbage data. Parsing such structures would lead to the parser randomly throwing exceptions, instead of replacing the invalid values with sane default values.
There is not that much, that could be done from our side, except living with "only typechecks" instead of proper sanity checks of the data or implement some "second pass" validation. Both options aren't ideal.
An issue at msgspec is pending, maybe we can rediscuss this and find a good solution.

To document some examples:

Missing RunnerMetaData.weight is (occasionally) marked as -99, should be translated to None. Better: A positive value should be enforced
Missing RunnerMetaData.stall_draw is (occasionally) marked as 99, should be translated to None. Better: range 1-50 should be enforced
Missing RunnerMetaData.sire_year_born etc. are marked as 0, should be translated to None. Better: range 1950-current year should be enforced
RunnerMetaData.cloth_number should be enforced 1-50
RunnerMetaData.age should be enforced 1-30

msgspec now features a new __post_init__ hook. This might be used for further validation of the data discussed above.
https://github.com/jcrist/msgspec/pull/470

Something like that for RunnerMetaData is what I'd imagine. Unfortunately this doesn't work with frozen objects. Looks like we still need to wait for better validation options in msgspec
    def __post_init__(self):
        if self.weight_value is not None and self.weight_value <= 0:
            self.weight = None
        if self.stall_draw is not None and self.stall_draw > 50:
            self.stall_draw = None
        if self.sire_year_born is not None and self.sire_year_born < 1980:
            self.sire_year_born = None
        if self.dam_year_born is not None and self.dam_year_born < 1980:
            self.dam_year_born = None
        if self.damsire_year_born is not None and  self.damsire_year_born < 1960:
            self.damsire_year_born = None
        if self.cloth_number is not None and not 0 < self.cloth_number < 50:
            self.cloth_number = None
        if self.age is not None and not 1 < self.age < 30:
            self.age = None

E           AttributeError: immutable type: 'RunnerMetaData'

I wonder if we need that to be frozen? I like your validation - maybe we could remove it for this class only and define our own __hash__ ?

https://github.com/limx0/betfair_parser/pull/48
Tests passing and mypy happy - thoughts?

I'd leave it for consistency. There are still some discussions at msgspec going on for better validation, see https://github.com/jcrist/msgspec/issues/483 . We waited long enough, I guess we can wait for a proper solution :p


text:
Test failure: PublisherBasedStreamMessageVerification

Gradle suite > Gradle test > com.linecorp.armeria.common.stream.PublisherBasedStreamMessageVerification > required_spec317_mustSupportAPendingElementCountUpToLongMaxValue FAILED
    java.lang.AssertionError: Could not subscribe org.reactivestreams.tck.TestEnvironment$ManualSubscriberWithSubscriptionSupport@64d21b4e to Publisher com.linecorp.armeria.common.stream.PublisherBasedStreamMessage@5ec36f5f within 3000 ms
        at org.testng.Assert.fail(Assert.java:99)
        at org.reactivestreams.tck.TestEnvironment.flop(TestEnvironment.java:229)
        at org.reactivestreams.tck.TestEnvironment$Promise.expectCompletion(TestEnvironment.java:1017)
        at org.reactivestreams.tck.TestEnvironment.subscribe(TestEnvironment.java:305)
        at org.reactivestreams.tck.TestEnvironment.newManualSubscriber(TestEnvironment.java:321)
        at org.reactivestreams.tck.TestEnvironment.newManualSubscriber(TestEnvironment.java:316)
        at org.reactivestreams.tck.PublisherVerification$28.run(PublisherVerification.java:1040)
        at org.reactivestreams.tck.PublisherVerification.activePublisherTest(PublisherVerification.java:1142)
        at org.reactivestreams.tck.PublisherVerification.required_spec317_mustSupportAPendingElementCountUpToLongMaxValue(PublisherVerification.java:1037)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(Unknown Source)
        at org.testng.TestRunner.privateRun(TestRunner.java:794)
        at org.testng.TestRunner.run(TestRunner.java:596)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
        at org.testng.SuiteRunner.run(SuiteRunner.java:276)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
        at org.testng.TestNG.runSuites(TestNG.java:1063)
        at org.testng.TestNG.run(TestNG.java:1031)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:141)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:90)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
        at com.sun.proxy.$Proxy2.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Unknown Source)

Gradle suite > Gradle test > com.linecorp.armeria.common.stream.PublisherBasedStreamMessageVerification > required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue FAILED
    java.lang.OutOfMemoryError: Java heap space

Gradle suite > Gradle test > com.linecorp.armeria.common.stream.PublisherBasedStreamMessageVerification > required_abortMustNotifySubscriber FAILED
    java.lang.AssertionError: Expected onError(com.linecorp.armeria.common.stream.AbortedStreamException) within 5000 ms
        at org.testng.Assert.fail(Assert.java:87)
        at org.reactivestreams.tck.TestEnvironment.flopAndFail(TestEnvironment.java:292)
        at org.reactivestreams.tck.TestEnvironment$Receptacle.expectError(TestEnvironment.java:1126)
        at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.expectError(TestEnvironment.java:630)
        at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.expectError(TestEnvironment.java:625)
        at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.expectError(TestEnvironment.java:613)
        at org.reactivestreams.tck.TestEnvironment$ManualSubscriber.expectError(TestEnvironment.java:609)
        at com.linecorp.armeria.common.stream.StreamMessageVerification.required_abortMustNotifySubscriber(StreamMessageVerification.java:217)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at org.testng.TestRunner.privateRun(TestRunner.java:794)
        at org.testng.TestRunner.run(TestRunner.java:596)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
        at org.testng.SuiteRunner.run(SuiteRunner.java:276)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
        at org.testng.TestNG.runSuites(TestNG.java:1063)
        at org.testng.TestNG.run(TestNG.java:1031)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:141)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:90)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
        at com.sun.proxy.$Proxy5.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:834)

        Caused by:
        java.lang.AssertionError: Expected onError(com.linecorp.armeria.common.stream.AbortedStreamException) within 5000 ms
            at org.testng.Assert.fail(Assert.java:99)
            at org.reactivestreams.tck.TestEnvironment.flopAndFail(TestEnvironment.java:289)
            ... 59 more

repo: line/armeria


text:
Double report any non-OK status with CANCELLED with gRPC Coroutines stub

From the slack thread:

Hey, we use java-grpc-prometheus package for prometheus metrics on our gRPC clients. This package provides gRPC interceptors for both client and server. We noticed that the amount of CANCELLED errors always seems to increase with other errors. After some investigating, I found that a gRPC coroutine stub built with Armeria will double report any non-OK status with CANCELLED (two calls to onClose for the ClientCallListener). This doesn't seem to be happening for a native grpc-kotlin coroutine stub. Any idea why this could be and how we could stop the second CANCELLED error?

https://line-armeria.slack.com/archives/C1NGPBUH2/p1630104838018400

ClientCalls calls clientCall.cancel() after a call is exceptionally completed.
A guard seems to be required to prevent the double close
https://github.com/grpc/grpc-kotlin/blob/b7d06483bf597cd4a10e3ed2ef52b21ca95c80ad/stub/src/main/java/io/grpc/kotlin/ClientCalls.kt#L318-L327


text:
Upgrade dependencies for 0.62.0

Note: I wasn't sure how CLA works for https://github.com/line/centraldogma/pull/865, so I just also included armeria upgrades in this PR.

Armeria 1.24.3 → 1.25.1
Guava 32.0.1-jre → 32.1.2-jre
Hibernate Validator 8.0.0.Final → 8.0.1.Final
Micrometer 1.11.1 → 1.11.3
Spring Boot 3 3.1.0 → 3.1.2

I wasn't sure how CLA works for https://github.com/line/centraldogma/pull/865

We may add the github-actions bot as a whitelist. Let's ask Seoyeon later when she comes back from vacation.

repo: line/centraldogma


text:
Add error handling in newHashKey

Description
When calling the function newHashKey() if an error occurs while filling the new key with random data from the defined random source, the created hash key will be zeroed, which means, the content of the slice will be all 0's.
I think it's better to handle errors properly.
Also I added libs/std packages to avoid lower coverage, which codecov ignores.

Separating certain functions into a package for the purpose of passing coverage seems to me to be out of line with module design and doesn't seem to be a good idea. And I'm also concerned about the project-local implicit rules that arise.

What was the key point of the problems
What options were available
What were the considerations
Then, why did you decide this was the best approach?

After thinking about the following, I am implementing it now.

Problem: Error handling of crand.Read in newHashKey provides insufficient coverage, but it is difficult to write tests for it.
Options:

Ignore coverage → The convention of merging after all green is broken
Wrap crand.Read as a private function → A wrapper just for testing the standard package is born
Wrap crand.Read as public function in libs → Allows aggregation of packages that wrap functions for which test is essentially unnecessary

The current option is selected because the layer where the error occurs is not at the application level but is connected to the test ignore.
I would like to hear your opinion if there are better options for this.

@Mdaiki0730
Looking for other code that uses crand.Read(), There is a function CRandBytes() in crypto/random.go that could be used for this purpose. It may work the same as the current newHashKey(), so how about using this instead of creating a specific package?
https://github.com/line/ostracon/blob/main/crypto/random.go#L9-L22

I think very good@@
Thank you for finding this function!

I created another PR because we found a completely different solution than the this PR.
New One: https://github.com/line/ostracon/pull/509

repo: line/ostracon


text:
Failed to parse the certificate

I've built the stellite_quic_server_bin without any errors. But after that, the server doesn't want to start with the following error :

./stellite_quic_server_bin --quic_port=443 --worker_count=48 --proxy_pass=http://127.0.0.1:80 --keyfile=../../../test_tools/res/example.com.cert.key --certfile=../../../test_tools/res/example.com.cert.pem --logging --log_dir=/var/log/stellite --file_logging
[0224/093027:INFO:stellite_quic_server_bin.cc(113)] quic server(443) start
[0224/093027:ERROR:quic_proxy_server.cc(49)] Failed to parse the certificate

I've tested with several different certificate and the same errors occurs.
And is it possible to build stellite with openssl instead of nss ?

@bojin certificate file must use pkcs8. it can convert using openssl command-line tool.

closing for now :)

authors: bojin freakhill snibug

repo: line/stellite


text:
estimatedReviewTime and files length check do not seem to be working

Describe the bug
estimatedReviewTime and files length check do not seem to be working
We have a few automations that rely on the estimatedReviewTime and files length checks to set some labels and the required number of reviewers.
Our last few reviews created today have not been labeled as expected or had the expected number of required approvals set. They are all being labeled as 1 minute reviews that only require 1 approval. This has occurred on 3 PRs in a row
This is incorrect based on the number of files + I'd expected the estimatedReviewTime to be higher for these PRs
To Reproduce
Steps to reproduce the behavior:

The .cm automation file

gitstream.cm
# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  estimated_time_to_review:
    if:
      - true
    run:
      - action: add-label@v1
        args:
          label: "~{{ calc.etr }} min review"
          color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}
  needs_one_review:
    if:
      - {{ not has.sensitive_files }}
      - {{ is.quick_review }}
      - {{ approvals.zero }}
    run:
      - action: add-label@v1
        args:
          label: ⏳ Waiting for 1 reviewer
          color: '#73067C'
      - action: add-reviewers@v1
        args:
          reviewers: [Popmenu/mobile-app-devs]
          unless_reviewers_set: true
  needs_two_reviews:
    if:
      - {{ is.long_review or has.sensitive_files }}
      - {{ approvals.ltTwo }}
    run:
      - action: add-label@v1
        args:
          label: {{ '⏳ Waiting for 2 reviewers' if (approvals.zero) else '⏳ Waiting for 1 reviewer' }}
          color: '#73067C'
      - action: add-reviewers@v1
        args:
          reviewers: [Popmenu/mobile-app-devs]
          unless_reviewers_set: true
  deleted:
    if:
      - {{ has.deleted_files }}
    run:
      - action: add-label@v1
        args:
          label: 🗑 Deleted files
          color: '#DF9C04'
  missing_sc_ticket:
    if:
      - {{ not sc_ticket.comment }}
    run:
      - action: add-label@v1
        args:
          label: 🎫 Missing SC Ticket
          color: '#FBCA02'
  unresolved_threads:
    if:
      - {{ pr.status == 'open' }}
      - {{ pr.unresolved_threads > 0 }}
    run:
      - action: add-label@v1
        args:
          label: 🚨 Unresolved thread(s)
          color: '#EC560D'
  sensitive_file_change_review:
    if:
      - {{ has.sensitive_files }}
    run:
      - action: set-required-approvals@v1
        args:
          approvals: 2
  two_reviews:
    if:
      - {{ is.long_review or has.sensitive_files }}
    run:
      - action: set-required-approvals@v1
        args:
          approvals: 2
  do_not_merge:
    if:
      - {{ has.do_not_merge_label }}
    run:
      - action: request-changes@v1
        args:
          comment: |
            Merging is blocked while "Do Not Merge" label is added
  ready_to_merge_one_approval_pr:
    if:
      - {{ not has.sensitive_files }}
      - {{ is.quick_review }}
      - {{ not has.do_not_merge_label }}
      - {{ approvals.gtZero }}
    run:
      - action: add-label@v1
        args:
          label: ✌ Ready to merge
          color: '#219944'
  ready_to_merge_two_approval_pr:
    if:
      - {{ is.long_review or has.sensitive_files }}
      - {{ not has.do_not_merge_label }}
      - {{ approvals.gtOne }}
    run:
      - action: add-label@v1
        args:
          label: ✌ Ready to merge
          color: '#219944'

calc:
  etr: {{ branch | estimatedReviewTime }}
has:
  deleted_files: {{ source.diff.files | map(attr='new_file') | match(term='/dev/null') | some }}
  sensitive_files: {{ files | match(list=sensitive) | some }}
  do_not_merge_label: {{ pr.labels | match(term='Do not merge') | some }}
is:
  safe_change: {{ (source.diff.files | isFormattingChange) or (files | allDocs) or (files | allTests) or (files | allImages) }}
  quick_review: {{ files | length <= 7 and calc.etr <= 5 }}
  long_review: {{ files | length > 7 or calc.etr > 5 }}
approvals:
  zero: {{ pr.approvals | length == 0 }}
  gtZero: {{ pr.approvals | length > 0 }}
  gtOne: {{ pr.approvals | length > 1 }}
  ltTwo: {{ pr.approvals | length < 2 }}
sc_ticket:
  comment: {{ pr.comments | match(attr='content', term='Shortcut Story') | some }}
sensitive:
  - App.tsx
  - AppRoot.tsx
config:
  ignore_files:
    - 'yarn.lock'
    - 'ios/*.lock'
    - 'android/*.lock'
    - 'src/graphql/schema.json'
    - 'src/__generated__/types.ts'
    - 'src/i18n/messages/*.json'
    - '__tests__/**/*.snap'

The PR URL (as it contains the repo and PR identifiers)
PR URL - from screenshots
PR URL 2
PR URL 3

Describe your PR relevant content

Add relevant commit SHA

Expected behavior

Even accounting for the ignore_files that are set in gitstream.cm

I expect 2 approvals to be required before merging is allowed since the files length should be greater than 7
I expect the estimated time to review to be greater than 1 minute since these PRs are pretty big
Screenshots

Additional context
We have not changed our gitstream.cm config recently and last week this was working fine and as expected

Hi, we have a knowen issue that the estimated review time takes into account the package-lock files, I expect it to be fixed in day or two - do you think that might be the issue?

Hi @vim-zz, hmm maybe but if that were the case, wouldn't the estimate possibly be too long rather than too short? Also, how would that affect our files length check?

Hi, I have the same problem. All PRs are getting 1 min review label no matter how many files are changed.

@bartkuzio, do you have any ignore_files set in your gitstream.cm?
I did and just removed them as a test (bc another repo here didn't ignore any files and it showed PRs with non 1 min PR review estimates). Now my PR is labeled as a "~10 min review" and requires 2 approvals, which is expected
@vim-zz @PavelLinearB just fyi, it might be related to having ignored_files set? 🤔

@EladKohavi please look

@bartkuzio @matthewparavati we added some logs to better identify the issue, can you provide the following to the support email (support at linearb.io) or directly in Slack to me:

Identify a new MR or PR that the estimation seems wrong
share the MR or PR link
share the GitHub Action or GitLab job log
share a screenshot with the estomation label
if possible share a screenshot with the changed file (filename and file extension) and the amout of lined changes

@vim-zz just to confirm, it needs to be a new PR and not 1 we've pushed changes to since you requested this info?

It's better to have a new PR so we are sure you get the latest and starts fresh
tl;dr yes :)

@vim-zz just sent an email over. Should have all the requested info except for the number of changes lines in each file

@matthewparavati we fixed an issue there, please see if the issue was resolved on your side

@vim-zz the issue does not seemed resolved here. A new PR opened today is still being marked as ~1 minute review and only requiring 1 approval. I sent some more info via email

@bartkuzio, do you have ignore_files set in your gitstream.cm?
I did and just removed them as a test (bc another repo here didn't ignore any files and it showed PRs with non 1 min PR review estimates). Now my PR is labeled as a "~10 min review" and requires 2 approvals, which is expected

Yes, I did. I removed it now and it fixed the issue. So it's a good workaround for now.
Btw, for me also explain_code_experts action was broken and it also fixes it, so both problems seem to have the same root cause.

The issue has been resolved. There was a regression in the ignore_files support for glob patterns, and another regression in the default exclusion of lock files during review time estimations calc.

Awesome, thanks @vim-zz! I do see it working now! 🥳

authors: bartkuzio matthewparavati vim-zz

repo: linear-b/gitstream


text:
Add nsmenu title

This is an initial fix for #1835.
It uses ::alloc().initWithTitle(...) to initialize NSMenu items with a correct title.
However, it is not clear to me yet what the behaviour would be for the Menu that is exposed from the druid crate.
Right now I'm calling Menu("") but I suppose that's wrong. My guess would be that the public druid API would also expose a title property? But then it would affect all platforms. Open to suggestions here :)

I think that initing with an empty string and then modifying it afterwards to the correct title should be okay?

Updated it accordingly to use an empty string and added set_title which only works on macOS and is a NOP on the other platforms

Okay so I'm looking at this again, and I want to double-check my understanding:

druid-shell's Menu::new method is only called for root menus; that means the root application menu, as well as root popup menus.
all other items (such as the file menu) are created with the add_item and add_dropdown, which do correctly set titles

And in both the case of. the root menu and of a context menu, the title is (I believe) unused?
Ultimately I'm wondering if we need to bother with the whole set_title addition. My main concern with #1835 isn't with the title not being set, it's with a missing init call that may be performing other important work. If we can just init with an empty string and leave it at that, I'd be happy for the simplification..

@cmyr I agree. I've removed the set_title implementations. Just using an empty string should be enough.

authors: cmyr terhechte

repo: linebender/druid


text:
String column: Filter independently for missing values and text input

closes #237
prerequisites:

[x] branch is up-to-date with the branch to be merged with, i.e. develop
[x] build is successful
[x] code is cleaned up and formatted
[ ] tested with Firefox 52, Firefox 57+, Chrome 64+, MS Edge 16+

Summary
note: API change, the StringColumn.setFilter method has a changed API. The existing dumps are backward compatible.

for computing this number a statistics of all rows would be needed. In case of a numerical or categorical the stats is given but there is none for strings

Ok, thanks for the explanation. Then we keep it as it is.

authors: sgratzl thinkh

repo: lineupjs/lineupjs


text:
Some question about pre-processing my own datasets.

On this page
in generate_transform_files/hello_smpl_pose.py line48 https://github.com/lingjie0206/Neural_Actor_Preprocessing/blob/e48dd8824b88c95191c483f7316d3cfb170b0a64/generate_transform_files/hello_smpl_pose.py#L48
https://github.com/lingjie0206/Neural_Actor_Preprocessing/blob/e48dd8824b88c95191c483f7316d3cfb170b0a64/generate_transform_files/hello_smpl_pose.py#L8
in smpl_webuser.serialization.py , load_model only return the one variable (result),
but there use three variable to catch the return value of load_model.
I know the m is the info about smpl model , and dd means some info from smpl_webuser.serialization.py ,
but only A i don't konw what is it means.
Could you please explain this variable for me? Thanks a lout!!

It's the transformation of joints. You may refer to the original SMPL code.


text:
demo例子是否可以添加一个传入自定义组件的详细代码？

感谢老哥封装的表单组件，demo例子里面能否添加一个自定义组件的例子?

type 传入 'custom'，然后component传入自定义组件就行～

authors: XSnowHoly lingxiao-Zhu

repo: lingxiao-Zhu/react-easy-antd-form


text:
Remove enableSecondPrecision

The enableSecondPrecision flag is no longer needed since we automatically determine whether or not we want that precision.
So, there is no benefit for the user. While this is a major breaking change, I am still inclined to say it is fine to do in v2.

Hi, can i work on this issue.

Hey @kunalshokeen051  - thanks for offering your help. Sure thing!
If you have any questions, feel free to let us know.
By the way @falvarez1  - do you see any reason against removing the flag and releasing it in v2?

No problems. After adding the automatic detection the only reason for keeping it is backwards compatibility. We just need to document as a breaking change.

Yeah, that said, @kunalshokeen051 feel free to make the changes.
You might want to add an entry about the migration to the docs. Basically telling folks that they don't need that entry as it is automatically inferred.

Given that there was no response for 2 weeks I will unassign the ticket so anyone who wants to help, can do so.

Done on v3

repo: linkdotnet/NCronJob


text:
when test failed

HI,there.
I like this library.
But I have a question.
My XCUItest often fail because of some reason.
For example if test run 3 times, test fails once.
Then,when test failed,remaining test don't run.
If possible,I would like test to run.
Even if one of tests failed.
Is it possible?
My config is here.
{
   "xctestrun-path": "build/Build/Products/xxxxxxxxxxxx.xctestrun",
   "num-sims": 1,
   "failure-tolerance": 15,
   "only-retry-failed": true,
   "headless": true,
   "reuse-simulator": true,
   "output-dir": "./output/",
   "screenshots-directory": "./screen/"
}

There has been quite some updates on Bluepill, is this still a problem for you @shiratsu ?

authors: oliverhu shiratsu

repo: linkedin/bluepill


text:
Merge linkedin:master

Merging in linkedin:master.
We are making NW/gobblin an almost-clone of LI/gobblin in order to continually pull the latest updates from upstream. In order to do so, we are moving all NW-specific code to gobblin-modules.
Please refer to this for seeing our diff vs LinkedIn (specifically the files changed): https://github.com/linkedin/gobblin/compare/master...NerdWallet:merge_linkedin?expand=1
We're going to have a few files different from master - these are needed to incorporate our modules repo in the build.

Accidental PR. Please disregard.

repo: linkedin/gobblin


text:
Hourly Compaction

How this works:

There is a FolderState associated with each input folder. Possible values are YES, NO, PENDING, COMPLETE. Initially the status of all input folders is NO.
When compaction starts, it submits data completeness verification requests in a thread pool, one request per input folder, in the order of their priorities (high priority = 3.0, normal = 2.0, low = 1.0). After data completeness verification for a folder starts, the folder status changes to PENDING.
Meanwhile, a job submitter submits compaction MR jobs for the input folders to another thread pool. The compaction MR job of an input folder is only submitted if the folder status is PENDING or YES, and there is not already a compaction MR job running for this input folder. If the status is NO, there's no point to run the compaction MR job since we don't know if the data is complete or not. If the status is COMPLETE, it means compaction for this input folder has finished (which may have either succeeded or failed), and the job submitter will no longer submit MR jobs for this input folder. If there's already a compaction MR job running for this input folder, the job submitter will not submit it again until the current run finishes.
If, when a compaction finishes, the status of the input folder is still PENDING, it will not publish the data and will discard the work it has done.
Once the data completeness verification for a folder finishes:
if the data is complete, the status of the folder is changed to YES, and the thread which is running the compaction job for this folder (if exists) is notified, which will proceed to publish the data.
if the data is incomplete, the status of the folder is changed to NO, and the thread which is running the compaction job for this folder will be asked to terminate asap without publishing the data. Another data completeness verification for this folder will be submitted again with priority reduced by 1/3.
Once the compaction MR job for a folder finishes, if the job successfully published the data, or failed for reasons other than data incompleteness, the status of the input folder will be changed to COMPLETE, and the job submitter will no longer submit jobs for this input folder. Otherwise, the job submitter will attempt to re-submit the compaction MR job for this input folder with priority reduced by 1/3 (it will not re-submit the job until the input folder status is changed to PENDING or YES, as mentioned before).

@liyinan926 @chavdar Could you please review?

@chavdar @liyinan926 updated (cbc38b6).
---Summary---
Big changes:

Added gobblin.compaction.Dataset class. This is a temporary solution; after Gobblin dataset is merged, I'll put it into the class hierarchy.
In addition to verifying data completeness using DataCompletenessVerifier (via Kafka audit), the MRCompactorJobRunner also performs a self-verification: when compaction of a dataset completes, if it finds new files that were added to the input folder after compaction started, it will discard the compacted data and re-do the compaction.
The compaction MR job of a dataset is no longer required to start after the data completeness verification of the dataset starts. Now it submits compaction MR jobs to one thread pool, and the completeness verification jobs to another thread pool, with no particular order between them.
MRCompactor no longer manages the thread pool for data completeness verification. That thread pool is now managed by DataCompletenessVerifier.
DataCompletenessVerifier no longer holds a reference to MRCompactor. Instead, it returns a ListenableFuture<Results> object, which MRCompactor can use to add callbacks and modify its states. This also means that data verification is no longer performed in the order of dataset priorities, since ExecutorService.submit() doesn't support prioritization through a priority queue (compaction MR jobs are stilled ordered by dataset priorities).
Added a SimulatedDataCompletenessVerifier class which randomly makes decisions.

Small changes:

Now it is possible to verify the completeness of multiple datasets together by using DataCompletenessVerifier.verify(Iterable<Dataset>). This enables multiple datasets to share a single SQL query against Kafka audit.
Now it is possible to specify which datasets need completeness verification by using a whitelist and a blacklist.
Now one can specify the timeout for verifying data completeness, e.g. 30min. If after 30 minutes from the time the compaction starts, there are still some datasets whose completeness are not verified, those datasets will be given up, and their running verification jobs (if exists) will be killed. For these datasets, it is configurable whether to not compact them, or compact them anyway without completeness guarantee.
Addressed other comments in the review.

@liyinan926 updated 7edb31a

@chavdar updated a5a11a7

@chavdar updated 980251b

LGTM


text:
Self service ui

create dashboard-header.js, refactor file structure of views, form clear function, make exploreDimension and filter optional on the submit, test refactored error msg and hideSuccessError functionality, adding metric_function to anomaly-function/create params, modal for anomaly-function/delete

LGTM

authors: MarthaWB puneetjaiswal

repo: linkedin/pinot


text:
New Star-Tree Execution Part

Determine whether Star-Tree can be used in aggregation / groupBy plan node
Implemented transform, projection, docIdSet, filter plan nodes for new Star-Tree
Modified CountAggregationFunction to support pre-aggregated count
In ImmutableSegmentImpl, convert old Star-Tree into new format

Codecov Report

Merging #3029 into master will decrease coverage by 0.01%.
The diff coverage is 75.42%.

@@            Coverage Diff            @@
##           master   #3029      +/-   ##
=========================================
- Coverage   69.92%   69.9%   -0.02%
=========================================
  Files         924     931       +7
  Lines       43512   43697     +185
  Branches     5937    5972      +35
=========================================
+ Hits        30427   30548     +121
- Misses      11047   11099      +52
- Partials     2038    2050      +12

Impacted Files
Coverage Δ

...kedin/pinot/common/utils/request/RequestUtils.java
94.87% <ø> (+7.8%)
:arrow_up:

.../core/indexsegment/mutable/MutableSegmentImpl.java
67.35% <ø> (+0.49%)
:arrow_up:

.../query/aggregation/DefaultAggregationExecutor.java
100% <ø> (ø)
:arrow_up:

...core/startree/operator/StarTreeFilterOperator.java
95.12% <100%> (ø)

...pinot/core/operator/query/AggregationOperator.java
95% <100%> (+0.88%)
:arrow_up:

...din/pinot/core/operator/blocks/TransformBlock.java
69.23% <100%> (+2.56%)
:arrow_up:

...ry/aggregation/groupby/DefaultGroupByExecutor.java
100% <100%> (ø)
:arrow_up:

...aggregation/function/AggregationFunctionUtils.java
89.74% <100%> (+0.85%)
:arrow_up:

...ore/operator/query/AggregationGroupByOperator.java
95.65% <100%> (+0.65%)
:arrow_up:

...ore/startree/v2/AggregationFunctionColumnPair.java
78.26% <100%> (+0.98%)
:arrow_up:

... and 43 more

Continue to review full report at Codecov.

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

authors: Jackie-Jiang codecov-io


text:
[server] Fork hotfix feature branch off Venice release 0.4.52

Fork hotfix release branch off 0.4.52 + include VarHandle optimization.

JVM deoptimization causing latency spike.
Cutting a hotfix release Including float array deoptimization using VarHandle from fast-avro version 0.2.150 to help with the latency issues.
How was this PR tested?

CI build
Does this PR introduce any user-facing changes?

[x] No. You can skip the rest of this section.
[ ] Yes. Make sure to explain your proposed changes and call out the behavior change.

It is weird that a build.gradle file change could trigger a unit test coverage failure..

It is weird that a build.gradle file change could trigger a unit test coverage failure..

I've tried to pull this PR locally and turned out VeniceClientCompatibilityTest failed (likely due to the Avro version change?) so the JUnit reports were not generated and resulted in coverage failure, which is the red herring.

Can you update the PR title to just have why we need the hotfix. We don't need to call out that this is a hotfix feature branch in the commit

It is weird that a build.gradle file change could trigger a unit test coverage failure..

I've tried to pull this PR locally and turned out VeniceClientCompatibilityTest failed (likely due to the Avro version change?) so the JUnit reports were not generated and resulted in coverage failure, which is the red herring.
However, I couldn't find this from the log. Maybe that's the side-effect of --continue flag? @majisourav99 Can you please try to run the tests locally and fix them?

I tried the test locally, it passes fine.

authors: adamxchen gaojieliu majisourav99 nisargthakkar

repo: linkedin/venice


text:
fix: [UIE-8194] dbaas maintenance pending updates state should display when any pending updates are available

Description 📝
For DBaaS maintenance feature, the pending updates state should display when there are any pending updates available for a DB cluster. It should also disable the option to upgrade the version while those updates are still pending.
Changes  🔄
List any change(s) relevant to the reviewer.

Fix check for pending updates so it will check for any available pending updates instead of only ones with a defined deadline or planned_for property.
Update disabling behavior for the Upgrade Version button in the DBaaS settings maintenance field so that it will disable when there are pending updates
When there are pending updates to disable Upgrade Version. Have a "?" icon to the right of the temporarily disabled Upgrade Version button with tip text:
"Upgrades are disabled while maintenance updates are in progress."

Target release date 🗓
1/14/25
Preview 📷

Before
After

How to test 🧪
Prerequisites

Managed Databases
dbaasV2 feature flag set for GA
Default DB created e.g. postgresql 13

Reproduction steps

Having a pending update available where deadline and the planned_for property are both null
In settings, see that both the Maintenance updates does not show review state
In settings, see that Upgrade Version button is enabled even with pending updates.

Verification steps

Verify that Maintenance field in DBaaS settings displays pending updates display pending update review state when pending updates are available.
Verify that Upgrade Version is disabled even if there are available version updates.
Verify that ? icon appears next to disabled Upgrade Version button when there are pending updates available

 Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿  Providing accessibility support

[x] I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

[x] All unit tests are passing
[x] TypeScript compilation succeeded without errors
[x] Code passes all linting rules

Thanks for the contribution @smans-akamai - code looks good
Could we maybe use a server handler (or updating the factory if already handled) to mock a pending update to easily verify the change for now and future proofing? I was unable to verify the change since there's no pending update for the DB instances I am creating.

@abailly-akamai The pending update is already mocked in the ServerHandler. Pending updates are included in the DB factory by default. This was done when the feature was originally implemented.
https://github.com/linode/manager/blob/develop/packages/manager/src/mocks/serverHandlers.ts#L269
https://github.com/linode/manager/blob/develop/packages/manager/src/factories/databases.ts#L224

@smans-akamai that worked - It just won't do that with every cluster ID so I did not see it with the one I tried
for reference, /databases/mysql/19/settings while mocking with legacy server handlers will work 👍

authors: abailly-akamai smans-akamai

repo: linode/manager


text:
[for release] Most Recent Backup fixes

Description
This PR addresses two issues:

“Most Recent Backup” values were not appearing in the CSV file downloadable from Linodes Landing.
The “Last Backup” column was not being sorted properly on Linodes Landing.

To fix:

Use nested key for the CSV header (backups.last_successful)
Use nested key for sortable table head label (backups:last_succesful)

I also removed a prop called mostRecentBackup from LinodeCard that was confusing and wasn’t being used anyway.
Note to Reviewers
Please check Linodes Landing. Last backups should appear in the downloadable CSV file and the "Last Backup" column should be sortable. Check group by tag, multiple browsers, etc.

Looks good, only potential issue I see is that if your backup status is 'scheduled' that will still appear blank in the CSV.

Thanks @WilkinsKa1. This was not a regression, so I merged as-is.
Since the column is currently labeled "Most Recent Backup" I'd argue it's appropriate to leave it blank for scheduled backups (the column in the UI is "Last Backup", so not as strict).
It is confusing though... maybe the column in the CSV should also be called "Last Backup" to match the UI.

@WilkinsKa1 just created a ticket to address this: M3-3759.


text:
fix: Timezone Form Styles

Description 📝

The timezone form on /profile/display had some unintended styling 🎨
Caused by https://github.com/linode/manager/pull/9341

Major Changes 🔄

Removes red background 🔴
Fixes incorrect marginTop 🔝

Preview 📷

Before
After

How to test 🧪

Test the timezone form on /profile/display

Is anyone else seeing this as well?
Screen.Recording.2023-08-21.at.2.52.38.PM.mov

That's really interesting... for me the popup with all the timezones has been appearing above the Timezone select, not below:

Theres also a weird gap for me as well @hana-linode

authors: TylerWJ bnussman-akamai coliu-akamai


text:
Update lasers.launch.py

Corrected name of parameter for ydlidar.

@mergify backport humble foxy

thanks @madgrizzle

authors: grassjelly madgrizzle


text:
Add Serenity's Build directory to libjs-test262-runner's include path

If a LibJS header tries to include <AK/Debug.h>, libjs-test262-runner
will currently fail to compile.
In file included from /home/flynn/workspace/serenity/Userland/Libraries/LibRegex/Regex.h:10,
                 from /home/flynn/workspace/serenity/Userland/Libraries/LibJS/AST.h:22,
                 from /home/flynn/workspace/serenity/Userland/Libraries/LibJS/Interpreter.h:14,
                 from ../src/main.cpp:19:
/home/flynn/workspace/serenity/Userland/Libraries/LibRegex/RegexDebug.h:11:10: fatal error: AK/Debug.h: No such file or directory
   11 | #include <AK/Debug.h>
      |          ^~~~~~~~~~~~
compilation terminated.

Conflicts, as expected :)
Can you check if this is still an issue with the new architecture, and if so, update the PR? Thanks!

Not needed anymore! :)


text:
kvm_watcher:增加Grafana的json模板

添加可视化Grafana的json配置文件。#552

在docs/Visualization_conf.md这个文档里面说明下，可以用这个配置模板。

在docs/Visualization_conf.md这个文档里面说明下，可以用这个配置模板。

好

repo: linuxkerneltravel/lmp


text:
SeekBar did not disable when playing rtsp stream video

hello. That it the best library I found. When i play streaming rtsp link, I saw seekbar is enabling. When swipe seekbar it cause crash app.
Now i want to disable seekBar, can you provide my the way to do it?
Many thanks.

crash app what log

sorry i forgot set config in AndroidManifest. Now it working

authors: fukemy lipangit

repo: lipangit/JiaoZiVideoPlayer


text:
5.5 部分机型播放m3u8无法播放

目前看到的有4.3 4.4.2 4.4.4   手机 红米1s vivoX3play OPPO R7S 酷派y90 目前测试的是5,.0下会出现这样的问题

应该是安卓系统的锅

我这里也是，红米4.4系统无法播放，5.0正常，hls流

authors: daobao jyh149129 lipangit

repo: lipangit/JieCaoVideoPlayer


text:
Log Warnings due to FileSystemNotFoundException

In our current project we got a nasty warning.
23 Nov 2020 12:44:56,665 [main] WARN  liquibase.resource (JavaLogger.java:23) - Cannot create filesystem for url jar:file:/opt/consent-core/consent-core-exec.jar!/BOOT-INF/lib/accessors-smart-1.2.jar!/: null
java.nio.file.FileSystemNotFoundException
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(Unknown Source)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(Unknown Source)
	at java.base/java.nio.file.Path.of(Unknown Source)
	at java.base/java.nio.file.Paths.get(Unknown Source)
	at liquibase.resource.ClassLoaderResourceAccessor.loadRootPaths(ClassLoaderResourceAccessor.java:63)
	at liquibase.resource.ClassLoaderResourceAccessor.init(ClassLoaderResourceAccessor.java:47)
	at liquibase.resource.ClassLoaderResourceAccessor.openStreams(ClassLoaderResourceAccessor.java:94)
	at liquibase.resource.CompositeResourceAccessor.openStreams(CompositeResourceAccessor.java:33)
	at liquibase.parser.core.xml.LiquibaseEntityResolver.resolveEntity(LiquibaseEntityResolver.java:40)
	at java.xml/com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper.resolveEntity(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:91)
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15)
	at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:586)
	at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:365)
	at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:320)
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:23)
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:337)
	at liquibase.Liquibase.lambda$update$1(Liquibase.java:229)
	at liquibase.Scope.lambda$child$0(Scope.java:160)
	at liquibase.Scope.child(Scope.java:169)
	at liquibase.Scope.child(Scope.java:159)
	at liquibase.Scope.child(Scope.java:138)
	at liquibase.Liquibase.runInScope(Liquibase.java:2277)
	at liquibase.Liquibase.update(Liquibase.java:215)
	at liquibase.Liquibase.update(Liquibase.java:201)
	at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:322)
	at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:270)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at de.governikus.autent.consent.core.ConsentCore.main(ConsentCore.java:40)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)

It seems to be same as in this ticket:
https://github.com/liquibase/liquibase/issues/1276
I updated to liquibase 4.2.0 and the warning is still there:
Here is my setup:
OS: centos 7
JDK: Oracle JDK 11.0.6
package de.governikus.autent.consent.db.config;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Locale;
import java.util.Properties;

import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.annotation.Order;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import de.governikus.autent.consent.constants.Profiles;
import liquibase.integration.spring.SpringLiquibase;
import lombok.extern.slf4j.Slf4j;

@Order(2)
@Slf4j
@Configuration
@EnableJpaRepositories(basePackages = {DatabaseConfig.PACKAGE_TO_SCAN})
@EnableTransactionManagement
public class DatabaseConfig
{

  protected static final String PACKAGE_TO_SCAN = "de.governikus.autent.consent.db";

  @Value("${database.url:jdbc:hsqldb:mem:consent-core}")
  private String databaseUrl;

  @Value("${database.user:sa}")
  private String databaseUsername;

  @Value("${database.password:}")
  private String databasePassword;

  @Profile(Profiles.NOT_DEVELOPMENT)
  @Bean(name = "datasource")
  public DataSource datasourceMsSqlServer()
  {
    return getMsSqlDataSource();
  }

  @Profile(Profiles.DEVELOPMENT)
  @Bean("datasource")
  public DataSource datasource()
  {
    return resolveDataSourceFromConfiguration();
  }

  @Profile(Profiles.DEVELOPMENT)
  @Bean(name = "liquibase")
  public SpringLiquibase liquibase(DataSource dataSource)
  {
    SpringLiquibase liquibase = new SpringLiquibase();
    liquibase.setDataSource(dataSource);
    liquibase.setChangeLog("classpath:/de/governikus/autent/consent/db/liquibase/db-setup.xml");
    return liquibase;
  }

  @Bean(name = "dbProperties")
  protected Properties additionalProperties(DataSource dataSource)
  {
    Properties properties = new Properties();
    SupportedDataSources.Vendor vendor = SupportedDataSources.getVendor(dataSource);
    setDialect(vendor, properties);
    return properties;
  }

  private void setDialect(SupportedDataSources.Vendor vendor, Properties properties)
  {
    if (SupportedDataSources.Vendor.HSQL.equals(vendor))
    {
      log.info("Using HSQL database.");
      properties.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
      properties.setProperty("hibernate.format_sql", "false");
      properties.setProperty("hibernate.show_sql", "false");
    }
    if (SupportedDataSources.Vendor.SQLSERVER.equals(vendor))
    {
      log.info("Using Microsoft SQL Server database.");
      properties.setProperty("hibernate.dialect", "org.hibernate.dialect.SQLServer2012Dialect");
    }
  }

  private DataSource resolveDataSourceFromConfiguration()
  {
    if (StringUtils.contains(databaseUrl, "jdbc:sqlserver"))
    {
      return getMsSqlDataSource();
    }
    else if (StringUtils.contains(databaseUrl, "jdbc:hsqldb"))
    {
      log.warn("CAUTION: using development hsqldb database of type: {}",
               databaseUrl.replaceFirst("jdbc:hsqldb:(.*?):.*", "$1"));
      DriverManagerDataSource dataSource = new DriverManagerDataSource();
      dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
      dataSource.setUrl(databaseUrl);
      dataSource.setUsername(databaseUsername);
      dataSource.setPassword(databasePassword);
      return dataSource;
    }
    else
    {
      throw new IllegalStateException("unsupported database used. Only Microsoft SQL Server and HSQL are supported. "
                                      + "Connection url is: " + databaseUrl);
    }
  }

  private DriverManagerDataSource getMsSqlDataSource()
  {
    if (StringUtils.contains(databaseUrl, "jdbc:sqlserver"))
    {
      log.info("connecting to SQL server: {}", databaseUrl);
      DriverManagerDataSource dataSource = new DriverManagerDataSource();
      dataSource.setDriverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
      dataSource.setUrl(databaseUrl);
      dataSource.setUsername(databaseUsername);
      dataSource.setPassword(databasePassword);
      return dataSource;
    }
    else
    {
      throw new IllegalStateException("tried to resolve a microsoft sql server database connection with a connection "
                                      + "string that is not a valid sql server url: " + databaseUrl);
    }
  }

  @Bean
  protected EntityManagerFactory entityManagerFactory(DataSource dataSource, Properties dbProperties)
  {
    LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
    em.setDataSource(dataSource);
    em.setPackagesToScan(PACKAGE_TO_SCAN);
    JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    em.setJpaVendorAdapter(vendorAdapter);
    em.setJpaProperties(dbProperties);

    em.afterPropertiesSet();
    return em.getObject();
  }

  @Bean
  protected PlatformTransactionManager transactionManager(DataSource dataSource, Properties dbProperties)
  {
    return new JpaTransactionManager(entityManagerFactory(dataSource, dbProperties));
  }

  @Bean
  public PersistenceExceptionTranslationPostProcessor exceptionTranslation()
  {
    return new PersistenceExceptionTranslationPostProcessor();
  }

  public static class SupportedDataSources
  {

    public static Vendor getVendor(DataSource dataSource)
    {
      SupportedDataSources dsv = new SupportedDataSources();
      try (Connection connection = dataSource.getConnection())
      {
        return dsv.getVendor(connection);
      }
      catch (SQLException e)
      {
        throw new IllegalStateException("Error fetching connection", e);
      }
    }

    public Vendor getVendor(Connection connection)
    {
      String vendorName;
      vendorName = getVendorName(connection);
      String upper = vendorName.toUpperCase(Locale.ENGLISH).replaceAll("\\s", "");
      if (upper.contains(Vendor.SQLSERVER.toString()))
      {
        return Vendor.SQLSERVER;
      }
      if (upper.contains(Vendor.HSQL.toString()))
      {
        return Vendor.HSQL;
      }
      throw new IllegalStateException("Vendor not supported " + vendorName);
    }

    private String getVendorName(Connection connection)
    {
      try
      {
        return connection.getMetaData().getDatabaseProductName();
      }
      catch (SQLException e)
      {
        throw new IllegalStateException("could not get vendor of jdbc connection", e);
      }
    }

    public enum Vendor
    {
      SQLSERVER, HSQL
    }
  }
}

┆Issue is synchronized with this Jira Bug by Unito

Additional info:
We are running our setup within a docker container with base image centos:7

Hi @Captain-P-Goldfish Thanks for writing up this issue.  We will add it to the list of issues that we are processing.  Does the liquibase update command work and this is a warning in standard out that you would like suppressed or put into a log file?

the liquibase update works without problem. Our problem is simply that the log file is being filled with thousands of lines of these warnings

We had the same behavior with liquibase 4.0.0, but it seems to be solved with version 4.2.2.

We had the same behavior with liquibase 4.0.0, but it seems to be solved with version 4.2.2.

repo: liquibase/liquibase


text:
fix #1106: added symbols and Tests

name: Pull Request
about: SqlParser bug in parsing UTF-8 valid symbols
title: 'SqlParser bug in parsing UTF-8 valid symbols- issue 1106'
labels: Status:Discovery
assignees: ''

Environment
Liquibase Version: 3.10.2, 4.1.1
Liquibase Integration & Version: none
Liquibase Extension(s) & Version: none
Database Vendor & Version: Oracle 19
Operating System Type & Version: window10
Pull Request Type

[ x] Bug fix (non-breaking change which fixes an issue.)
[ ] Enhancement/New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description
This PR fixes issue #1106
Steps To Reproduce
Create a Sql formatted changeset with an insert statement like
insert into table (column) values ('warm temp. 32°')
Actual Behavior
An error is thrown: Exception in thread "main" liquibase.util.grammar.TokenMgrError: Lexical error at line 146302, column 163. Encountered: "\u00b0"
Expected/Desired Behavior
No error
Fast Track PR Acceptance Checklist:

[ x] Build is successful and all new and existing tests pass
[ x] Added Unit Test(s)
[ ] Added Integration Test(s)
[ ] Documentation Updated

Need Help?
Come chat with us on our discord channel
┆Issue is synchronized with this Jira Story by Unito
┆Fix Versions: Community 4.x

Hi @matteoturra Great to hear from you again.  Thanks for creating this fix.
A member of the Liquibase team will take a look at your contribution and may suggest:

Changes based on guidelines for PR submission
Additional tests (unit and/or integration)
Provide other feedback, like requesting changes.

The PR will be prioritized according to our internal development and testing capacity.
We’ll let you know when it’s ready to move to the next step or if any changes are needed.

I marked it as "NoManualTesting" since the unit test cover parsing the newly found unicode chars.

authors: matteoturra molivasdat nvoxland


text:
Firebird does not support afterColumn - fix tests on master

Impact

[X] Bug fix (non-breaking change which fixes expected existing functionality)
[ ] Enhancement/New feature (adds functionality without impacting existing logic)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

I merged some community PR's today and seems some of them had conflicting tests. This is the second fix I'm doing, let's see if this is enough.


text:
如果服务挂了，还能把数字显示出来的降级方案？

RT

目前用的是通过 cache-control:max-age=31536000 让已经显示过的图标作为 200 from cache 缓存。

authors: dingxianye lishengzxc

repo: lishengzxc/duing


text:
Set random seed of hyperparameter optimization

Is your feature request related to a problem? Please describe.
For reproducibility, CovsirPhy needs to set random seed of hyperparameter optimization.
Describe the solution you'd like
Add argument seed to covsirphy.ChangeFinder.run() and covsirphy.Estimator.run(), and set the seed to Optuna package.
Describe alternatives you've considered
Repeat optimization until the results will be constant.

Study.__init__ method of optuna/study.py and TPESampler.__init__ method of optuna/samplers/_tpe/sampler.py in GitHub: Optuna indicate that sampler of optimization is optuna.samplers.TPESampler(seed=None).

FAQ of Optuna confirmed that is is necessary to set n_jobs=1 in covsirphy.Estimator.run().
I will clarify this point in the docstring of this method.

As mentioned in #62 , the number of CPUs was fixed to 1.
Estimator.run() will change default value from seed=None to seed=0 in the next version.

This will be fixed in #63


text:
[lit-starter-ts] Doc site footer issue

The documentation site that is generated contains the wrong link and text to this project's github repository. Update the footer to:

    Made with
    lit-element-starter-ts

`;

See docs-src/_includes/footer.11ty.cjs.

We'll address this as part of https://github.com/lit/lit/issues/2890.

authors: houghtonap sorvell

repo: lit/lit


text:
Sent 1 LTC to Blockcard - It disappeared from by blockcard balance

Describe the bug
5 days ago, I sent 1 LTC to my blockcard.  It appeared in the balance shortly afterwards, but then disappeared.
To Reproduce
Send 1 LTC from Litewallet to Blockcard using QR code
Expected behavior
Transactions should not diappear
Screenshots

Desktop (please complete the following information):
IOS 14.3
Windows 10
Smartphone (please complete the following information):
Iphone 11
PC
Additional context

@jeff169 This should behave like any Litecoin transaction in Litewallet. Since v3.4.0 added live balance in the Card, will you you retest ?

repo: litecoin-foundation/loafwallet-ios


text:
Issue with service:init command

When running the service:init command the service cannot start either in dev or deployment because the package-lock.json is not generated and the docker image reject it.
2 solutions:

Execute the npm i after create the service (like that we have the latest version)
Add the package-lock in the template (need to update it for each versions)

outdated issue, command init has been deleted in https://github.com/liteflow-labs/liteflow-js/pull/261

repo: liteflow-labs/liteflow-js


text:
Enhancement(CI): Add non-required CI for Python pre-releases

Summary
I think it would be nice to add in a separate file ci-dev.yml or something that allows Python pre-releases to run against our codebase.
This helps us in making sure there are no regressions or weird behavior we need to handle, and helps the greater Python core devs with having more data that shows there are no regressions on their end.
This would never be added to required checks or reported anywhere since most of the time it would probably fail, but just something we can check in the background.
Basic Example
No response
Drawbacks and Impact
No response
Unresolved questions
No response

Funding

If you would like to see an issue prioritized, make a pledge towards it!
We receive the pledge once the issue is completed & verified

Im not sure that this is really feasible atm (or maybe ever) because there are always a few dependencies that wait until a stable release before adding support so we are always going to lag behind somewhat

repo: litestar-org/litestar


text:
Bug: SSE not showing up in browser if not explicitly ending AsyncGenerator content with newline

Description
I am using Litestar on the backend, HTMX + Jinja2 for templating.
I have following code:

@get(path="/progress", sync_to_thread=False)
def handle_updates() -> ServerSentEvent:
    """This route pushes finish/progress events to the client."""

    async def result_notifier() -> AsyncGenerator[str, None]:
        # keep state per client, re-render template fragment
        ctx = {
            "progress": None,
            "tasks": (tasks := TASKS),
        }
        for i in itertools.count(1):
            html = f'
{i}
\n'   # this \n missing was the problem!!!
            yield html
            await asyncio.sleep(1)

    return ServerSentEvent(result_notifier())

and following event receiver in HTMX:

also tried curling:
curl http://localhost:8000/progress
data:
1

data:
2

...

curl http://localhost:8000/progress
data:
1

data:
2

data:
3

data:
4

...

My issue is that i didn't explicitly end events with '\n' so browser was forever buffering them and not showing in event stream console (neither Safari nor Chrome). As I've learned, SSE should explicitly end in '\n\n' to prevent buffering behavior! Is this expected behaviour? It wasn't obvious for me at all and I suggest this to be in the docs.
URL to code causing the issue
No response
MCVE
No response
Steps to reproduce
No response
Screenshots
No response
Logs
server logs do not contain errors, client side behavior is odd.

Litestar Version
latest
Platform

[ ] Linux
[X] Mac
[ ] Windows
[ ] Other (Please specify in the description above)

[!NOTE]
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh Litestar dashboard

If you would like to see an issue prioritized, make a pledge towards it!
We receive the pledge once the issue is completed & verified
This, along with engagement in the community, helps us know which features are a priority to our users.

I think we could document this better in https://docs.litestar.dev/latest/usage/responses.html#server-sent-event-responses and also include a link to the living standard for it (https://html.spec.whatwg.org/multipage/server-sent-events.html)

I think we should consider this a bug. It's very unintuitive and can be easily fixed by appending the newline if it's not already there :shrug:

Now that I think about this, it might be better if simply were to add a parameter that could configure this. Something like disable_client_buffering?

@euri10 Iiuc your PR #2888 would fix this one as well, right?

@euri10 Iiuc your PR #2888 would fix this one as well, right?

yes i think so :)

authors: JacobCoffee euri10 macabrus provinzkraut