Use Kmp algorithm to optimize ByteBufUtil.indexOf() method

Motivation:
ByteBufUtil.indexOf can be inefficient for substring search on
ByteBuf, in terms of algorithm complexity (O(needle.readableBytes * haystack.readableBytes)),consider using the Knuth Morris Pratt  algorithm to optimize the ByteBufUtil.indexOf() method
Modification:
Use Knuth Morris Pratt  algorithm to optimize ByteBufUtil.indexOf() method
Result:
The performance of the ByteBufUtil.indexOf() method is higher than the original implementation

Benchmark results (original implementation  of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score     Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  1440.368 ±  41.740  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5   183.511 ±   2.488  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5    42.856 ±   2.517  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5    54.728 ±   0.997  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5     1.116 ±   0.032  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5   272.040 ±   8.408  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5    44.044 ±   1.936  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5    37.634 ±   0.741  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5    37.623 ±   2.192  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5     0.766 ±   0.052  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  1758.146 ± 657.852  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5   234.797 ±  27.832  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5    49.016 ±  10.052  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5    78.379 ±   8.351  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5     1.123 ±   0.851  ops/ms

 PSYoungGen      total 76288K, used 48075K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
  eden space 65536K, 66% used [0x000000076ab00000,0x000000076d5a8fa8,0x000000076eb00000)
  from space 10752K, 40% used [0x000000076eb00000,0x000000076ef49c98,0x000000076f580000)
  to   space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
 ParOldGen       total 175104K, used 16K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
  object space 175104K, 0% used [0x00000006c0000000,0x00000006c0004000,0x00000006cab00000)
 Metaspace       used 11909K, capacity 12215K, committed 12544K, reserved 1060864K
  class space    used 1380K, capacity 1469K, committed 1536K, reserved 1048576K

Benchmark results (implementation optimized using Kmp algorithm  of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score    Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  2792.422 ± 81.033  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5   300.021 ±  5.835  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5   352.242 ± 23.597  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5   170.998 ±  1.970  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5    73.004 ±  5.348  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5  1061.188 ± 14.019  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5   148.445 ±  3.018  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5   135.135 ±  8.789  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5    75.578 ±  2.820  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5    41.323 ±  0.144  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  1880.160 ± 76.520  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5   204.214 ±  8.540  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5   213.783 ±  9.104  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5   131.881 ±  9.242  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5    60.850 ±  3.391  ops/ms

Heap
 PSYoungGen      total 76288K, used 48091K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
  eden space 65536K, 66% used [0x000000076ab00000,0x000000076d5a7e68,0x000000076eb00000)
  from space 10752K, 41% used [0x000000076eb00000,0x000000076ef4ef18,0x000000076f580000)
  to   space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
 ParOldGen       total 175104K, used 16K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
  object space 175104K, 0% used [0x00000006c0000000,0x00000006c0004000,0x00000006cab00000)
 Metaspace       used 11911K, capacity 12215K, committed 12544K, reserved 1060864K
  class space    used 1379K, capacity 1469K, committed 1536K, reserved 1048576K

Although the improvement of directByteBuf is not large, significant performance improvements have been seen in both headByteBuf and compositeByteBuf, so this optimization is effective

Thanks for the or!
The kmp algorithm is already available in Netty by using some specific byte processor and the stealth allocation of the index using kmp is not welcome IMO, given that the version using byte processor allow to cache the jump table.
I would suggest instead, to use the new SWAR index of (byte) to speed up this index of while leaving the allocation behaviour as it is.

@franz1981, Thanks for your suggestion,I have seen https://github.com/netty/netty/pull/9955 and its implementation, but I think it is still necessary to implement it on ByteBufUtil.indexOf(). Here are the reasons:

When using KmpSearchProcessorFactory, you need to create KmpSearchProcessorFactory through AbstractSearchProcessorFactory.newKmpSearchProcessorFactory() first, and users need to call the ByteBuf.getBytes() method to pass in a byte array, which is a bit complicated for users
The user needs to understand each string matching algorithm and implementation in order to create the corresponding SearchProcessor, but this is not a good choice for the user (just a personal opinion), and use ByteBufUtil.indexOf() for comparison is much simpler
Caching the next table can improve performance. However, in actual use, the probability of multiple comparisons of the same needle is not certain (just a personal opinion). In fact, the number of times the user actually compares the same byteBuf multiple times Not necessarily as much as we think
These are just my personal opinions, can you explain the optimization points further, thanks

Reading your comments I see that the existing searching API is not simple enough for users and I would rather suggest to improve it: indexOf method should obey the https://en.m.wikipedia.org/wiki/Principle_of_least_astonishment and, although is personal, I don't think allocation (O(n)) while searching to be the expected behaviour here, but as said, maybe it's just me and other users are perfectly fine with it.
Regarding the optimization of the index of byte (SWAR), it's not performing a linear search byte by byte hence could be used to start the needle search  just to fail fast.

@franz1981, thanks for your suggestion, @chrisvest, Do you think this does not meet the Principle of least astonishment? If it is, I will revert these codes, thanks

Using firstIndexOf (SWAR) might fall flat if the first byte turns out to be very common in the inputs.
I don't think it's a huge problem that indexOf allocates. At least, I think most usages of it are limited in how many times they call it. On the other hand, we also have people with very high throughputs, who wish to keep allocations to a minimum because of the non-local effects on response time and stability.
The Two-Way string matching algorithm has similar performance characteristics to KMP and BM, but does not require any table allocation. Perhaps that will be a better choice for our indexOf method?
https://en.wikipedia.org/wiki/Two-way_string-matching_algorithm
http://www-igm.univ-mlv.fr/~mac/Articles-PDF/CP-1991-jacm.pdf

@chrisvest as one of such performance critical allocation break users I can say that's an sensible answer :)
Thanks for sharing https://en.wikipedia.org/wiki/Two-way_string-matching_algorithm I didn't know about it, it's even used in glibc!

Use the two way algorithm to optimize the ByteBufUtil.indexOf() method
Benchmark results (original implementation of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score     Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  1199.046 ± 255.956  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5   156.356 ±  85.901  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5    35.895 ±  27.980  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5    52.720 ±  15.137  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5     1.083 ±   0.319  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5   214.643 ± 285.077  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5    34.849 ±  40.074  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5    22.774 ±  24.180  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5    37.773 ±   5.441  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5     0.680 ±   0.032  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  1918.517 ± 173.048  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5   250.167 ±  21.105  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5    52.147 ±   4.849  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5    81.570 ±  12.366  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5     1.231 ±   0.815  ops/ms

Heap
 PSYoungGen      total 76288K, used 48247K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
  eden space 65536K, 66% used [0x000000076ab00000,0x000000076d5c3ed8,0x000000076eb00000)
  from space 10752K, 41% used [0x000000076eb00000,0x000000076ef5a008,0x000000076f580000)
  to   space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
 ParOldGen       total 175104K, used 16K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
  object space 175104K, 0% used [0x00000006c0000000,0x00000006c0004000,0x00000006cab00000)
 Metaspace       used 11895K, capacity 12215K, committed 12544K, reserved 1060864K
  class space    used 1379K, capacity 1469K, committed 1536K, reserved 1048576K

Benchmark results (implementation optimized using two way algorithm of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score     Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  2973.669 ± 222.865  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5  2998.931 ± 338.832  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5   230.671 ±   6.105  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5   346.158 ±   9.007  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5   167.851 ±  11.456  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5  2417.317 ± 108.826  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5  1981.902 ± 110.820  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5   165.867 ±   3.762  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5   152.748 ±  11.547  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5    99.890 ±   6.332  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  2323.481 ±  90.986  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5  2295.211 ±  36.655  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5   146.229 ±   3.107  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5   197.068 ±  11.054  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5   152.759 ±  31.891  ops/ms

Heap
 PSYoungGen      total 76288K, used 48702K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
  eden space 65536K, 67% used [0x000000076ab00000,0x000000076d65daa8,0x000000076eb00000)
  from space 10752K, 39% used [0x000000076eb00000,0x000000076ef32008,0x000000076f580000)
  to   space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
 ParOldGen       total 175104K, used 16K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
  object space 175104K, 0% used [0x00000006c0000000,0x00000006c0004000,0x00000006cab00000)
 Metaspace       used 11903K, capacity 12215K, committed 12544K, reserved 1060864K
  class space    used 1378K, capacity 1469K, committed 1536K, reserved 1048576K

We can see a great improvement in performance, so this optimization is effective

Happy about it well done!
Just few things I am curious about:

what happened if the needle is larger of the haystack?
why the predictable case is slower then the unpredictable one?

For this last question I am going to review the results and the bench: please print the results with turbo boost disabled, fixed proc frequency and using "perfnorm" profiler

@franz1981, When needle.readableBytes()> haystack.readableBytes(), it will directly return -1, thanks for the suggestion

And what about
"when the remaining needle to match is larger then the available haystack?"
This can happen if the first N matches on haystack are negative and there are just M < needle::readable bytes left. It should fail fast but I am not sure the original algorithm account for it

According to my understanding of this algorithm, there is no optimization operation that supports this situation

Looks like Two Way is doing even better than KMP? That's awesome!

@skyguard1

According to my understanding of this algorithm, there is no optimization operation that supports this situation

Yep, I know, but failing fast although won't impact bit O analysis still impact real use cases, especially with "large" needles: I suggest to try modify the algorithm to do it. I've done something similar for the kmp variation we use on https://github.com/franz1981/activemq-artemis/blob/388809a583267de4e0599a4e1e2c76317029eb45/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/algo/KMPNeedle.java#L78 and it proved to be effective in many real use cases.

Looks like Two Way is doing even better than KMP? That's awesome!

That's why I've suggested to look at the perfnorm data: just to look at the branch mispredict and cache friendliness of both (thanks to the reduced allocation and that we just look at 2 different locations, although in different parts, the cache is better used): I believe that if we stress the bench with the right data the perf should confirm the known algorithm complexities.

A perfnorm  profiler  benchmarking was performed using another linux machine (the previous one was benchmarking on a mac),and the performance is quite different from the previous results
Benchmark results (original implementation using perfnorm  profiler of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score    Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  1379.846 ± 12.699  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5  1377.882 ± 38.710  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5   117.111 ±  1.185  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5   152.722 ±  2.715  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5    97.151 ±  0.374  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5   695.742 ±  8.265  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5  1015.208 ±  5.850  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5    65.776 ±  1.209  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5    76.343 ±  1.915  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5    53.451 ±  1.036  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  1163.367 ±  4.682  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5  1161.318 ± 12.828  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5    84.898 ±  1.604  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5    96.589 ±  2.226  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5    86.055 ±  0.972  ops/m

Benchmark results (two way algorithm implementation using perfnorm  profiler of ByteBufUtil.indexOf):
Benchmark                (bufferType)        (input)   Mode  Cnt     Score    Error   Units
SearchBenchmark.indexOf          HEAP    RANDOM_256B  thrpt    5  1383.818 ±  1.111  ops/ms
SearchBenchmark.indexOf          HEAP     RANDOM_2KB  thrpt    5  1383.408 ±  3.494  ops/ms
SearchBenchmark.indexOf          HEAP    PREDICTABLE  thrpt    5   117.058 ±  1.205  ops/ms
SearchBenchmark.indexOf          HEAP  UNPREDICTABLE  thrpt    5   152.435 ±  5.110  ops/ms
SearchBenchmark.indexOf          HEAP     WORST_CASE  thrpt    5    96.976 ±  1.390  ops/ms
SearchBenchmark.indexOf     COMPOSITE    RANDOM_256B  thrpt    5  1245.356 ± 10.715  ops/ms
SearchBenchmark.indexOf     COMPOSITE     RANDOM_2KB  thrpt    5  1009.645 ± 22.645  ops/ms
SearchBenchmark.indexOf     COMPOSITE    PREDICTABLE  thrpt    5    66.048 ±  0.347  ops/ms
SearchBenchmark.indexOf     COMPOSITE  UNPREDICTABLE  thrpt    5    39.037 ±  0.646  ops/ms
SearchBenchmark.indexOf     COMPOSITE     WORST_CASE  thrpt    5    53.392 ±  0.710  ops/ms
SearchBenchmark.indexOf        DIRECT    RANDOM_256B  thrpt    5  1165.479 ±  7.321  ops/ms
SearchBenchmark.indexOf        DIRECT     RANDOM_2KB  thrpt    5  1163.232 ±  7.383  ops/ms
SearchBenchmark.indexOf        DIRECT    PREDICTABLE  thrpt    5    85.377 ±  0.288  ops/ms
SearchBenchmark.indexOf        DIRECT  UNPREDICTABLE  thrpt    5    96.593 ±  0.735  ops/ms
SearchBenchmark.indexOf        DIRECT     WORST_CASE  thrpt    5    86.399 ±  0.938  ops/ms

It seems that the performance of the algorithm under perfnorm profiler is completely different

@skyguard1 I expect -perf perfnorm to produce many numbers for each benchmarks related cache misses, cpy cycles, mispredictions...where it is?

Using firstIndexOf (SWAR) might fall flat if the first byte turns out to be very common in the inputs.

In my experience this is correct - e.g. these are the average search times for text drawn from different distributions (markov generated English and German with transition probabilities inferred from bibles in each language, uniformly random text) for a search implementation which uses SWAR to find the start of the needle before commencing a search using the shift-or algorithm. The distribution of the data has a much larger effect than even the length of the needle (termlength).

Sorry, I re-run the benchmark, and the performance of the two way is indeed improved can be seen in the result, but I only have the linux virtual machine, and linux perf does not support the detection of cpu cache and other information

@skyguard1 numbers look pretty weird...but it's a bare metal machine or is a virtual env eg AWS?

It runs on our own cloud platform. I also have a virtual machine on bare metal machine, but perf does not support reading cpu cache information., sorry but I currently don't have a physical machine's linux

So @skyguard1 so in this case better to not trust any of these numbers...
The change is ok per se, considering that it's better then the original implementation so I am already happy with that; I just want to check how it behave on real machines.
I will try to run it on some physical hw by the next week, before going on vacation.

@franz1981, great!I am looking forward to seeing the results!thanks for your suggestion

@skyguard1 One more thing I just noticed: the indexOf is meant to operate on the readable bytes, but it doesn't take the readerIndex into account. There are also no tests with non-zero readerIndex.

@skyguard1 One more thing I just noticed: the indexOf is meant to operate on the readable bytes, but it doesn't take the readerIndex into account. There are also no tests with non-zero readerIndex.

The case where the readerIndex of needle and haystack is not 0 has been considered

@normanmaurer PTAL, please see if there is anything that needs to be modified here, thanks

A small thing: The two ints returned from maxSuf could be returned as one packed long value, to guarantee no allocation takes place.

@chrisvest ,I've done it, thanks

@chrisvest, thanks!

@normanmaurer, thanks

@trustin, thanks

Once the build has passed I will merge this one

@skyguard1 Thanks!

@chrisvest It is my pleasure

@skyguard1 I think there's a bug in the new implementation. As far as I understand, it returns index relative to reader index instead of absolute index, like before. I see that @chrisvest actually suggested that it might be an issue.


Fix sudo apt-get update failing

Description
Workaround for this problem: https://github.com/orgs/community/discussions/120966
Notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
I have not referenced individuals, products or companies in any commits, directly or indirectly.
I have not added data or restricted code in any commits, directly or indirectly.

I guess we don't need this anymore since the issue has been resolved? 🥳

It can help us in future


Update image guidance after Style Council

We agreed to update the images guidance at the last Style Council meeting.
I'm going to put this through separately from other Style Council meeting updates, as I want to check it with @davidhunter08 before publishing.

Images issue in backlog

PR: https://github.com/nhsuk/nhsuk-service-manual/pull/1243

PR: #1243

PR has been merged


feat(sdk): enable open telemetry by default.

Codecov Report
Patch coverage: 79.16% and project coverage change: +0.06 :tada:

Comparison is base (7557cd7) 90.10% compared to head (365adb9) 90.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #381      +/-   ##
==========================================
+ Coverage   90.10%   90.17%   +0.06%
==========================================
  Files          74       74
  Lines        2608     2646      +38
==========================================
+ Hits         2350     2386      +36
- Misses        181      182       +1
- Partials       77       78       +1

Impacted Files
Coverage Δ

cmd/wallet-sdk-gomobile/wrapper/error.go
84.61% <71.42%> (-4.86%)
:arrow_down:

cmd/wallet-sdk-gomobile/openid4ci/interaction.go
80.00% <77.77%> (+6.38%)
:arrow_up:

cmd/wallet-sdk-gomobile/openid4vp/interaction.go
77.94% <78.94%> (+2.01%)
:arrow_up:

cmd/wallet-sdk-gomobile/openid4ci/opts.go
100.00% <100.00%> (ø)

cmd/wallet-sdk-gomobile/openid4vp/opts.go
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Can we update the doc to add new TraceID field to error handling https://github.com/trustbloc/wallet-sdk/blob/main/cmd/wallet-sdk-gomobile/docs/usage.md#error-handling section?


Let control back handler

Is your feature request related to a problem?
Currently, back handling is encapsulated inside the library and only changes the sheet expanding state. This makes it impossible to create stateful sheets in which the back handler could be part of navigation between states.

Same problem
#60


[BUG]

Describe the issue
A clear and concise description of what the issue is.
hud not using custom backround after hud editor
Steps to reproduce
Steps to reproduce the issue:
clicked browse i saw the background i picked
Screenshots
If applicable, add screenshots of the editor settings used.

Desktop (please complete the following information):

OS: Win 11
App Version: 3.2
Selected HUD: Peach Hud

i even added all the other stuff like title_team_halloween_widescreen as the image but it keeps going back to this one

It looks like PeachHUD has an extra ImagePanel on the main menu that covers up the default background (resource/ui/mainmenuoverride.res > MountainPanel > Mountain). I'm not sure what the editor could do about this

oh thank you


sky-walking collector can't work properly, while using elasticsearch 5.4.0

Please answer these questions before submitting your issue.
What version of sky-walking are you using?
3.0.1-2017
What version of your OS?
Ubuntu 16.04
What version of your JRE?
1.8.0_121
What did you do?
If possible, provide a way for reproducing the error. e.g. demo application, component version.
The tracing data can't store to elasticsearch storage, the error info as follow:
[2017-05-23T16:28:23,403][DEBUG][o.e.a.b.TransportShardBulkAction] [node-2] [segment_idx][0] failed to execute bulk item (index) BulkShardRequest [[segment_idx][0]] containing [1968] requests
org.elasticsearch.index.mapper.MapperParsingException: failed to parse
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@3760f7a6; line: 1, column: 357]

@rzs840707 The double quotation in sql statement seems to trigger this bug.
@pengys5 Please provide patch to fix this serialization bug. Send a pr to master and also to hotfix/3.0.2. We will release 3.0.2 to fix this in these days.

Fixed by #207

Fixed by #207


Rotation breaks on iOS if using createFrameOnBootstrap

Environment

CLI: 5.1.0
Cross-platform modules: None
iOS Runtime: 5.1.0
Plugin(s): None
NativeScript-Angular: 7.1.0
Angular: 7.1.0

Describe the bug
Rotation breaks if you use createFrameOnBootstrap on iOS. It allows a single rotation, then it stops rotating.
To Reproduce
tns create an Angular hello world app.
main.ts: platformNativeScriptDynamic({ createFrameOnBootstrap: true }).bootstrapModule(AppModule);
app.component.ts:
<StackLayout>
  <router-outlet></router-outlet>
</StackLayout>

Rotate a few times.
Expected behavior
Many rotations
Sample project
https://github.com/larssn/createFrameOnBootstrap_Bug
EDIT
I should mention that this was on an older iPad with IOS version 12.1.1 (Newest atm).

Additional note: The keyboard is glitchy as well, when in landscape, it comes from the side, like it was in portrait mode.

Do you still need more info?

Any pointers to where we'd look in order to fix this ourselves?

@larssn sorry for the delay in my answer - I've missed your reply somehow.
I have retested the case, and indeed it seems like this is a bug with createFrameOnBootstrap, the touter-outlet and the keyboard layout on rotation. Steps to reproduce - use the app provided here by @larssn
As a temporary workaround, you could remove the createFrameOnBootstrap and  replace the router-outlet with page-router-outlet as done in this test Playground

@NickIliev Well at the time we couldn't use <page-router-outlet> because of primarily this bug: https://github.com/NativeScript/nativescript-angular/issues/1052
In the mean time, however, we've moved away from NativeScript - too many issues with the Angular implementation. My week was mostly spent looking for solutions to weird problems, instead of actually being productive. No regrets though; the core technology is really cool. We wish you luck.


Unable to load Node-API Library (libquery_engine-linux-arm64-openssl-1.1.x.so.node), Library may be corrupt

Bug description
Trying to deploy my app on AWS after resolving issue mentioned in issue 15574
I faced with error which says library may be corrupted, It seems no other one have faced the issue, since neither on github prisma issues I found one similar nor on other communities.
Here is the error
Error: Unable to load Node-API Library from /app/libquery_engine-linux-arm64-openssl-1.1.x.so.node, Library may be corrupt

my development platform OS is windows,
I am using docker for creating the application image (Alpine Linux)
How to reproduce

Setup nestjs application with prisma
Setup prisma client provider and output file in schema.prisma file
Setup database source in schema.prisma file
Select proper binary target
Set PRISMA_QUERY_ENGINE_LIBRARY env variable pointing location of library engine
Set PRISMA_CLI_BINARY_TARGETS
Generate Prisma client
Create docker image
push and deploy docker image to AWS
And you will get the error

Expected behavior
No response
Prisma information

generator client {
  provider = "prisma-client-js"
  output   = "client"
}

datasource db {
  provider = "mysql"
  url      = env("PRISMA_DB_URL")
}

// ... rest of my models

Environment & setup
Setup Details

OS: Amazon Linux 2
Database: Aurora MySQL
Node.js version: 16.16.0
CPE OS Name: cpe:2.3:o:amazon:amazon_linux:2
Kernel: Linux 4.14.281-212.5.02.amzn2.aarch64
Architecture: arm64
Openssl:  OpenSSL 1.1.1q  5 Jul 2022

# Environment Variables for deployment on AWS
PRISMA_DB_URL=mysql://username:password@host:port/database
ENV PRISMA_QUERY_ENGINE_LIBRARY=/app/prisma/engines/libquery_engine-linux-arm64-openssl-1.1.x.so.node
ENV PRISMA_CLI_BINARY_TARGETS=linux-arm64-openssl-1.1.x

Prisma Version
# On development PC
prisma                  : 4.3.1
@prisma/client          : 4.3.1
Current platform        : windows
Query Engine (Node-API) : libquery-engine c875e43600dfe042452e0b868f7a48b817b9640b (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli c875e43600dfe042452e0b868f7a48b817b9640b (at<EMAIL_ADDRESS>Introspection Engine    : introspection-core c875e43600dfe042452e0b868f7a48b817b9640b (at<EMAIL_ADDRESS>Format Binary           : prisma-fmt c875e43600dfe042452e0b868f7a48b817b9640b (at<EMAIL_ADDRESS>Format Wasm             : @prisma/prisma-fmt-wasm 4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b
Default Engines Hash    : c875e43600dfe042452e0b868f7a48b817b9640b
Studio                  : 0.473.0

Do you have the same problem if you skip steps 4-6?

Yes I do

query engine libraries are downloaded into the client directory where I mentioned as client provider in schema.prisma, while building my project and creating docker file of it I am removing it into root directory where Prisma is looking for it
And this error is raises

Can you put a reproducible example of this on GitHub in a repository? From the code path that outputs "Library may be corrupt", it being corrupt is actually the only thing that could cause this - so somehow that happens in your setup (or we have a bug). A reproduction would allow us to investigate.

I am trying to do that, but If I am gonna explain what exactly happens
Its like on my local machine which I run windows on it, I know that by deploying the project on AWS I am going to need linux-arm64-openssl-1.1.x query engine library, so before running command for generating Prisma client, I set needed libraries in binaryTargets of prisma.schema, by running the command along side with Prisma client files, mentioned query libraries are also gets downloaded (I have set output dir for my Prisma client)
I need basically 3 libs, (for windows, alpine linux, and amazon linux 2 which is arm64)
by building my project I replace the lib files into another directory to have some organization and environment variables decide where to look for library file
This approach works well on my local machine (windows) and also after image is built (alpine linux) but not on AWS

Hi
After extensive investigation for solving this issue, I found some more explanatory errors that can help for solving it,
Testing lots of ways I could provide Prisma with its right binary target file and getting the same error almost all the time. (Including defaults)
I tried this,
(1) I installed docker on a new instance (x86_64) and run my project image on it. It worked well.
Conflict Time:
I need to run the project on the instance which I have already configure and my rest of application is running on.
I installed docker on a new instance (arm64) and run my project image. The result was the same
Unable to load Node-API Library (libquery_engine-linux-arm64-openssl-1.1.x.so.node), Library may be corrupt
Inside image container I tried to install Prisma and generating the client again by this time I got this.

I got this looking for libc

I am opening new issue

@jukbot Can you open a new issue please as well? Happy to dive into this to hopefully figure out what is going on here. (Make sure to please use the bug issue template and fill in all teh things it is asking for. Thanks.)

@jukbot Did you solve the other problem, i just got the same error.


MSID: 99281 Version: 1 DOI: 10.1101/2<IP_ADDRESS>6031

MSID: 99281
Version: 1
Preprint DOI: https://doi.org/10.1101/2<IP_ADDRESS>6031
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=99281
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>6031

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/99281v1
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2<IP_ADDRESS>6031
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/99281/v1/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

error: [journal-ref-article-title] This journal reference (id c2) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c7) has no article-title element.
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c4) has a publication-type='other'. Is that correct?
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c5) has a publication-type='other'. Is that correct?
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c10) has a publication-type='other'. Is that correct?
warn: [article-email-corresp-author-count-equivalence] The number of corresponding authors (2: Nicolas Biais; Sean F Brady) is not equal to the number of distinct email addresses (1: sbrady@rockefeller.edu). Is this correct?

We have now received a provisional author response for this manuscript.

The response has now been posted.

That was quick, thanks @ameenanaji!
We'll need to wait at least a couple of hours for it to surface here on EPP, and then we can check.

Looks like the authors have deliberately only included one email for two corresponding authors. everything except that above is fixed

Hi @ameenanaji, I'm looking at the author response now and notice that it just ends with a copy of Reviewer #3s comments:

Is there a response to this that is missing? And should the paragraphs Reviewer #3 (Public Review): ... selective disadvantage which was untried in this study. be formatted as a quote? Or should it be removed if they are simply copying it and not responding? As it stands I think it's a little confusing.

Hi @fred-atherden I will ask the authors if there was supposed to be a response to reviewer 3 and get back to you ASAP!

OK thanks!

Good morning @fred-atherden , the authors have sent back an updated version of the provisional author response with a response to reviewer 3- should I just ask ed office to add this and let you know when this has been done?

Yes please - thanks @ameenanaji!

Hi @fred-atherden this has now been added

Thanks!


Add a new lint pipeline for Python and Terraform

Fixes | Closes | Resolves #
#1005

Please remove anything marked as optional that you don't need to fill in. Choose one of the keywords preceding to refer to the issue this PR solves, followed by the issue number (e.g Fixes # 666). If there is no issue, remove the line. Remove this note after reading.

Changes:

Create a new lint.yaml for Python and Terraform linting
Formats all the Terraform format
Adds support for Python 3.10
Adds an if: condition to ensure that the workflow only runs for quansight/qhub

Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds a feature)
[ ] Breaking change (fix or feature that would cause existing features to not work as expected)
[x] Documentation Update
[x] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] Other (please describe):

Testing
Requires testing

[x] Yes
[ ] No

In case you checked yes, did you write tests?

[ ] Yes
[x] No

Further comments (optional)
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered and more.

Hi, @HarshCasper @iameskild have you tested the Py3.10 deployment? last time there was a problem with the google API client (it seems they now support it ) but its worth checking

@iameskild @HarshCasper what are your thoughts on closing this and re-opening once the Nebari migration is completed?

Wonderful, I will close this then. The mention above should be considered when merging 1282 to be sure we pick the changes presented here as well.


Exemplify the many ways of specifying the server

The format for the server address is not clearly specified in the
documentation, and this has led to users having problems such as
issue #150.

thanks, ✨ 🍰 ✨


make it so that the agent accept stop command

this will be particularly useful on when one deletes a server from the UI


ASP.NET 5 Identity with one table and 4 columns

I creating an ASP.NET MVC 6 application which uses Identity with Entity Framework on SQL Server. By default, it creates 5 tables in the database
AspNetRoles
AspNetClaims
AspNetLogins
AspNetRoles
AspNetUsers
But I want only 1 table in the database instead of these 5 with 4 columns integer Identity Column, UserName, Email and Password (Hashed). How do I implement or create a custom user store?

This issue was moved to aspnet/Identity#723


extra non-phones in phones for several words

A handful of words have extra non-phone content in their pronunciations, e.g. [(k, v) for k, v in pr.pronunciations if '#' in v] evaluates to...
[("d'artagnan", 'D AH0 R T AE1 NG Y AH0 N # foreign french'),
 ('danglar', 'D AH0 NG L AA1 R # foreign french'),
 ('danglars', 'D AH0 NG L AA1 R Z # foreign french'),
 ('gdp', 'G IY1 D IY1 P IY1 # abbrev'),
 ('hiv', 'EY1 CH AY1 V IY1 # abbrev'),
 ('porthos', 'P AO0 R T AO1 S # foreign french'),
 ('spieth', 'S P IY1 TH # name'),
 ('spieth', 'S P AY1 AH0 TH # old')]

This should obviously not be the case! There may be other instances like this—I haven't had time to check. I imagine it's a problem with the upstream module providing the pronunciations.

I see @davidlday has fixed cmudict in https://github.com/prosegrinder/python-cmudict/pull/14, released in the latest cmudict 0.4.3. Now, calling cmudict.entries() returns the data without comments. 👍
However, the problem remains in Pronouncing because it's loading the data file directly and doesn't post-process out the comments.
Here's a quick hack to fix Pronouncing:
diff --git a/pronouncing/__init__.py b/pronouncing/__init__.py
index b5f8d0e..20ceddb 100755
--- a/pronouncing/__init__.py
+++ b/pronouncing/__init__.py
@@ -47,15 +47,14 @@ def init_cmu(filehandle=None):
     """
     global pronunciations, lookup, rhyme_lookup
     if pronunciations is None:
-        if filehandle is None:
-            filehandle = cmudict.dict_stream()
-        pronunciations = parse_cmu(filehandle)
-        filehandle.close()
+        pronunciations = cmudict.entries()
         lookup = collections.defaultdict(list)
         for word, phones in pronunciations:
+            phones = " ".join(phones)
             lookup[word].append(phones)
         rhyme_lookup = collections.defaultdict(list)
         for word, phones in pronunciations:
+            phones = " ".join(phones)
             rp = rhyming_part(phones)
             if rp is not None:
                 rhyme_lookup[rp].append(word)

A couple of issues with this quick hack.

It changes the API of init_cmu. Or rather, it ignores the filehandle parameter completely. Perhaps that's fine if the file duties are delegated to cmudict. (See also parse_cmu which takes a file handle.)

Different returns means extra processing, possibly a performance hit:

cmudict.entries() returns a (str, list) tuple (eg. 'bout ['B', 'AW1', 'T'])
parse_cmu() returns a (str, str) tuple (eg. 'bout B AW1 T)

Hmm, I think I'd prefer a solution that retains the ability to load custom cmudict-formatted data directly—I have used this feature a handful of times in my own projects.

Please see PR #53 to strip comments and retain the API.


Add Univercity

Please add the domain of Kyungmin University

@LJS1204-1 lib/domains/kyungmin: this request has an incorrect file path format, please ensure that you are familiar with     this repository rules located at the bottom of this page and change     your request accordingly. If you don't know how to change request, close it and open a new one.     If you are not able to make the pull request according the instructions, please send us an email to<EMAIL_ADDRESS>Please mention this request URL in the message.

@LJS1204-1 Please provide us with a proof, which shows that the school recognizes the domain kyungmin.kr you are submitting as an official email domain for the students.
You can provide us with any of the following:

A copy of instruction (a hard-copy or electronic one) given to you by the school that tells you to use an email address in this email domain
An URL of a page at the official school website that says that students use this email domain
A reference to a recognized journal where an article was published by someone from the school, with explicit affiliation to the school, and e-mail address from the email domain
A WHOIS data that link the email domain to the school somehow
A copy of official letter from the school representative saying that the school provides e-mail addresses in this domain to the students
Anything else that can prove this fact in similar way, i.e. can be verified independently.

@LJS1204-1 You might miss my previous comment. Please react.

@LJS1204-1 I am sorry, this request remains unanswered for a while. I have to close it without merging. Please reopen and comment if you have an update regarding the aforementioned issue. Thank you for your understanding!


Aggregated histogram

See https://github.com/Caleydo/taggle/issues/314
Histograms with single bins will be shown as moasic plot with labels.

Looks good! I suggest to use the font size as in the other row-based visualizations (e.g. bar renderer). Same for the aggregated string vis.

Btw, what is the number before the group label?

Btw, what is the number before the group label?

This the category for this attribute. It's contained like this in the dataset.

Yes its part of the name:

I personally would suggest to make the font size bigger than that in the row based. Because there is enough space and it is easier to read.

re font size: is there enough space? because in the screenshot the labels are cut. as we have additional vertical space left, we could add a line break instead of reducing the font size.
re number in label: ah, yes. I think we added it to the label because it is an ordered categorical attribute (1 < 2 < 3 < 4)


Search Servlet Add Search by Id

Description
This PR focuses on adding a case to the SearchServlet when there is a gbookId parameter. When there is a gbookId parameter, it will retrieve a List of size 1 containing the volume with that id.
This means the two separate cases are

gbookId
searchTerm and maxResults (optional)

If neither of these are passed, it will return a SC_BAD_REQUEST.
Breakdown

Separate doGet to search for 2 cases mentioned above
Abstract convertResponseToVolumeData into two methods so there is a way to parse the singular book retrieved from the Google Books individual volume call
Tests

Add 3 new tests for the individual response and new error codes
Separate artificial JSON response into 3 separate strings to be able to used for the individual book test
Minor method to allow for a doGet with improper parameters

Main Difficulties
Deciding how much of the code in the doGet to keep "global" and what to maintain only in certain if suites. For example, I decided to keep the formatted URL as a "shared" variable since its value was needed and would be modified depending on the value of the parameters.
Returning a list of the VolumeData object(s) no matter whether there is a single VolumeData object or many, I took inspiration from @steven-solar in his abstract get in the Utility class.
Linked Issue
#63

LGTM - Do you know if there's a way to search for multiple gbookId's at once? I was just taking a look at Mauro's PR, specifically, the part where we fetch data for all the books on your book list by gbookId.

@VivekShankar There is currently no way we know of to search for multiple gbookIds in the same query. It would be really nice if there was one!


Data received error

App crashes when I launch this function, why?
bt.setOnDataReceivedListener(new OnDataReceivedListener() {
public void onDataReceived(byte[] data, String message) {
//Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
byte[] readBuf = (byte[]) data;
int valore_a_16 = ((readBuf[1] & 0xFF) << 8) | (readBuf[0] & 0xFF);
int valore_a_16_2 = ((readBuf[3] & 0xFF) << 8) | (readBuf[2] & 0xFF);
int valore_a_16_3 = ((readBuf[5] & 0xFF) << 8) | (readBuf[4] & 0xFF);
int valore_a_16_4 = ((readBuf[7] & 0xFF) << 8) | (readBuf[6] & 0xFF);
a++;
String str = String.valueOf(valore_a_16);
        Log.d("byte", message);
        text.setText(message);
  }

});

Using Android-BluetoothSPPLibrary, that's the biggest mistake we made.  ;-)


How to handle one-liners

Hi, I was wondering if there are options to unroll one-liners and inject logpoints/snapshots.
Example
doSomething()
  .then(console.log)
  .catch((err) => reportError(err))

Is there a way to snapshot / log that .catch?

I just found this article https://umaar.com/dev-tips/129-inline-breakpoints/ mentioning this feature in chrome. This would be soooo neat to have.

I agree! Currently this feature is blocked because the Stackdriver Debugger API does not have support for breakpoints at a specific column. Our agent, and V8, do internally support column numbers, but the Debugger service ignores the column number at the moment.
We have had an internal bug against the Debugger service open to add this support. Let me figure out if there is a public issue tracker for the service. It would be great if you can open an external bug there too.

@kilianc would you mind opening an issue here: https://issuetracker.google.com/issues/new?component=187252&template=0

Done

This is being tracked on https://b.corp.google.com/issues/111263008 now. Closing the issue here.


Feature Request: subscribe functions to state subtree modifications

I'm sure this has been requested before but I could not find it in the issues, but I would like to be able to subscribe functions only to a part of the subtree in the state that they care about and have them called when that portion of the subtree is modified.  If that's not doable because of greater architectural concerns, right now in my project I'm using a function that wraps my subscriber that handles this for me, could something like this be added to the project?  I'm willing to contribute the code myself, but I'm not sure how this community functions yet.

Yep, this has been suggested numerous times before.  Please see http://redux.js.org/docs/faq/StoreSetup.html#store-setup-subscriptions for reasoning, links to earlier discussions, and links to addons that support this functionality on top of Redux itself.

Thank you!


Security Issue

Admin commands which are only supposed to be allowed for certain individuals are currently executable by all admins.

Closed with https://github.com/Chr1s70ph/ETIT-Master/commit/fa8d328f1e4a6cd447939425e3e3b3328cca7b53


small addition to check for currentPage and redirect if not detected

Hackathon Git Labs Project PR 🎉🎉
👉 Please remove the below and replace with your own values, leaving the headers where they are. 👈
PR contains:

no default page set during pagination, so a small detection method set on currentPage and if nothing detected it defaults to page 1 on appending to the current url

if(!currentPage) {
    window.location.href = '?page=1';
}

Hacktoberfest 2022:

[X] Does this PR follow the intermediate.md guide and submitted as part of Hacktoberfest 2022?

Breaking changes

resolves broken render of community section (will eventually be superseded in further PR from @manni8436 with styling of pagination and clamp function to the Pagination Function)

Screenshots

before fix:

after fix home url now redirects with query string of page set to 1:

Hey @auxfuse, I'm ready to send over the PR clamp fix for this.


⚠ Carbubu has degraded performance

In 0a80fd3, Carbubu (https://carbubu.fr) experienced degraded performance:

HTTP code: 200
Response time: 3258 ms

Resolved: Carbubu performance has improved in 09e31e0.


Support coverage reporting in Azure DevOps

Azure DevOps supports code coverage metrics (see Code coverage metrics and branch policy for pull requests). It would be great if Cake.Recipe would automatically send coverage data while running under Azure DevOps. See Surface test results in the Tests tab for possible integration points.
To use the API the required functionality to upload coverage data can be added to Cake.AzureDevOps.

@pascalberger I would be happy to see this getting added.  Is this something that I can assign to you?

Yes, I can look at it (but some other issues which I need to tackle first)

@pascalberger i am starting to think about getting ready to ship 2.0.0, and as such, I am going to move this one from the milestone.  If you get to it before the release, then I would be happy to bring this in.


update blunderbuss assignee file

There's a lot of obvious improvements to be made to this file. I made some of them.
FYI I'm adding to the reviewer list: @krousey @janetkuo @caesarxuchao @nikhiljindal @wojtek-t @bprashanth -- If the auto-assigner gives you something and you're not sure it's a good idea, please route it to someone etc.
@dchen1107 @davidopp @thockin -- you all might want to take a look and try to similarly spread the review load for your areas...

LGTM


RouterLink to support child components

Description
Can we add child components support to RouterLink ? Now we can only use simple text property to set children of RouterLink, e.g.
<RouterLink ...>
    <i class="ion-edit"></i> { "Edit Article" }
</RouterLink >

a senario:  https://github.com/jetli/rust-yew-realworld-example-app/blob/a99af18ec64ef74d6c3ac97419fc7de47eaa892d/crates/conduit-wasm/src/components/article/article_actions.rs#L79 , similar to button bellow.

Yes. This wasn't really practical until very recently with the removal of the type parameter from Html in the Yew crate.
Now that that is gone, its very simple to just replace the text: String field with a children: Children one.

As part of this change. I think RouterLink should be renamed to RouterAnchor in order to not have similar naming to ComponentLink and AgentLink which have behaviors very different from RouterLink.


Update Post “dva-c01-studying-sqs”

Automatically generated by Netlify CMS

👷 Deploy Preview for dazzling-dieffenbachia-448a02 processing.

Name
Link

🔨 Latest commit
115b5af6ffcf7bf1d3cfd3d1e5acdcfb0919d64e

🔍 Latest deploy log
https://app.netlify.com/sites/dazzling-dieffenbachia-448a02/deploys/62cf4a0bc6f88a000a0450ff


Fix Metal3 Basic auth issue

This PR fixes and issue with the Metal3 Basic auth, where on each upgrade the basic auth secret will re-encode the previous username and password which will cause changes in the secret data
closes https://github.com/suse-edge/charts/issues/76

Could we have the move of the standard 0.4.1 -> 0.4.2 artefacts in one commit and the actual fix in another, as it is hard to detect the new changes here?

Could we have the move of the standard 0.4.1 -> 0.4.2 artefacts in one commit and the actual fix in another, as it is hard to detect the new changes here?

The new changes are in the packages directory


Week 2 assignment

Week_2 assignment completed

You haven't completed the portion of the Assignment related to handling Pandas DataFrames.
Complete it and commit the changes,it will get reflected in the PR
Rest all seems fine.


bug: Invalid path when trying to use ContractAddress::zero()

Bug Report
Cairo version: bceacc24
Consider this contract:
#[contract]
mod YUNoZero {

    use starknet::ContractAddress;
    use starknet::ContractAddressZeroable;
    use zeroable::Zeroable;

    #[view]
    fn zero_addy() -> ContractAddress {
        ContractAddress::zero()
        // Zeroable::zero() // this works
    }
}

Compiling it gives the following error:
error: Plugin diagnostic: Invalid path.
 --> nozero.cairo:11:26
        ContractAddress::zero()
                         ^**^

Error: Compilation failed.

I would expect this to work though. What am I missing?
Using Zeroable::zero() instead of ContractAddress::zero() works, it compiles just fine.

Type::func() is not something currently supported. Note the zero is a function declared on a trait, and defined in a (named) impl, so you can access it either through Trait::zero() or Impl::zero().


Event Listener for URL Changes?

Hi,
thank you very much for this repo. It works very good, but my router doesn't work, when i manual change the URL in the URL Bar. I get a 404 Not Found Error...
My  App.svelte looks like this:
import createRouter from '@spaceavocado/svelte-router';
import {ROUTER_MODE} from '@spaceavocado/svelte-router';
import RouterView from '@spaceavocado/svelte-router/component/view';

import Home from './pages/Home.svelte'
import Technic from './pages/Technic.svelte'

createRouter({
    routes: [
      {
        path: '/',
        name: 'Home',
        component: Home
      },
      {
        path: '/solutions/technic',
        name: 'Technic',
        component: Technic
      },
    ],
    mode: 'HISTORY',
    hashType: 'PUSH',
  })

How can i solve the problem?

@UIX-Design Hello there. This is not related to the router itself. It depends on your local server configuration. When you enter the URL directly into your browser, the localhost server (node, Apache, etc.) must serve the index.html which is not a default behavior of server - it tried to open a index file in the given directory. I.e. you have to setup rewrite rules to serve the index.html

@davidhorak OK thank you for your detailed answer. Later, when I build my Svelte app and deploy to a server, I try to use the following rewrite rules:
<ifModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) /index.html [QSA,L]
</ifModule>

Is there a way to fix the problem in the dev environment, so if I'm running npm run dev?

@UIX-Design  That should work for apache. For the dev, it depends how you run the local server. What does the "dev" script do/runs?

@davidhorak the dev script run the following commands:
"dev": "run-p build:auto serve:dev"
Another question: The activeClass will not be applied on my <RouterLink /> i not define a custom activeClass...
I define the .active class inside a component in the style section. I also get an error from Visual Studio Code, because the VS think i don't use the class.
How can i solve this?

@UIX-Design Assuming that "serve:dev" is webpack dev server than - https://stackoverflow.com/questions/31945763/how-to-tell-webpack-dev-server-to-serve-index-html-for-any-route

@davidhorak thanks for sharing the link, but how can i edit or expand the webpack.config.js? I am a newcomer of Svelte... And please take a look at my updated comment to my activeClass Issue... Thanks for your help

@UIX-Design Respectfully, this is not related to Svelte, nor this router repository, rather the webpack basics, please explore the https://webpack.js.org/guides/getting-started/ to see how to setup the webpack config.

@UIX-Design Regarding the activeClass, also not sure if this is related to the router, but rather to your app structure.

@davidhorak  When i open my dropdown and click on a link:

After i close and open the dropdown again...

The active link does not retain the activeClass even though the page has not been left...

I think i have a solution for my activeClass Issue... It is possible to get the current route, inside a component?

@UIX-Design yes, https://github.com/spaceavocado/svelte-router#auto-passed-route-prop

@davidhorak thank you very much. One last question: It is possible to use the Link Events like on:completed={handleOnCompleted} on the router layer, maybe inside the createRouter function? Because i want to pass a prop to my header comp, there is located in the App.svelte - the same place for my route config.

@UIX-Design you can you these router level event handlers: https://github.com/spaceavocado/svelte-router#onnavigationchanged https://github.com/spaceavocado/svelte-router#onerror or https://github.com/spaceavocado/svelte-router#onbeforenavigation


home page and links page look to similar at the top

When selecting either the home page or links page it is hard to see their difference so users might think that they are still on the same page, which could cause issues

Design bug fixed


[WIP] Create ExplorerNode class to hide parsing details of x_node string.

@martinpovolny Please take a look, when you have some time.

Should object_id be numeric?  I know on some screen they use compressed ids, so I would expect it to spit out the uncompressed number.  Perhaps an accessor for both?

I think that once we get darga stuff in, it will be the best time to merge this and start refactoring the code that is doing this operations.
@mzazrivec : you have been fixing a bug related to parsing active node today. Can you take a look too?

@chessbyte I'm excited to see this happen. :100:   I was going to give this a shot, but I couldn't figure out what x_node was or what it was supposed to look like.


DataStateChange event attached to a jsonmodel binding is being fired by an odatamodel read call

OpenUI5 version: 1.38.5
Browser/version (+device/version):
Mac OS X 10.11.5 Chrome version 52.0.2743.116 (64-bit)
Any other tested browsers/devices(OK/FAIL):
not tested
URL (minimal example if possible):
http://jsbin.com/jiwecehifa/1/edit?html,console,output
Steps to reproduce the problem:

run the code
click on the Launch Dialog button

What is the expected result?

Only the "success" alert should be triggered after the OData read call is done
The "test" allert that is attached to the binding of a standalone jsonModel property binding shoulhd not be triggered
What happens instead?
Both alerts are triggered, even though the jsonmodel has not nothing in common wih the odatamodel

Any other information? (attach screenshot if possible)
I believe the issue could be in the setMessage method of the Model.js base class, there is a or || comparison if the message is null, if it this is set to && in overried method for the jsonmodel the issue does not happen.
Current:
	Model.prototype.setMessages = function(mMessages) {
		//jQuery.sap.assert(!jQuery.isEmptyObject(mMessages), this + ": mMessages passed as emptyObject( {} ). Use null instead!");

		this.mMessages = mMessages || {};
		if (mMessages !== null || !jQuery.sap.equal(this.mMessages, mMessages)) {
			this.checkMessages();
		}
	};

Changed:
	Model.prototype.setMessages = function(mMessages) {
		//jQuery.sap.assert(!jQuery.isEmptyObject(mMessages), this + ": mMessages passed as emptyObject( {} ). Use null instead!");

		this.mMessages = mMessages || {};
		if (mMessages !== null && !jQuery.sap.equal(this.mMessages, mMessages)) {
			this.checkMessages();
		}
	};

Hi, thanks for the thorough analysis!
However...:
If mMessages is given (non-nullish), then this will be assigned to this.mMessages.
In the "if" condition the first part will be true, but due to the assignment (and resulting equality) the second one will be false, so checkMessages() will not be executed with your proposed code.
This sounds wrong to me.
But the behavior still looks buggy. I wonder what the "if" is supposed to do:

If mMessages is not null, the first part is true and we do checkMessages.
If mMessages is given as null, this.mMessages becomes {} and then the equality check always returns false, so the second condition is true and we also do checkMessages().

Huh?
So we ALWAYS checkMessages()!
Something's definitely wrong. I opened internal ticket<PHONE_NUMBER> to analyze this further.
Thanks for reporting!
Andreas


securitypolicy: add security policy enforcer registration and defaults

Add enforcer registration logic and support for default enforcer.
The host can request which security policy enforcer to use with
supplied policy, if none supplied, GCS code tries to make a "guess"
as to which enforcer should be used: "allow all" or "default".
Default enforcer is set to StandardSecurityPolicyEnforcer unless
GCS is built with "rego" tag present. In that case, the default
enforcer will be set to RegoEnforcer.
New annotation has been added that allows callers to pick which
enforcer to use, e.g.
{
    ...
    "annotations": {
        "io.microsoft.virtualmachine.lcow.enforcer": "rego"
    },
    ...
}

Signed-off-by: Maksim An<EMAIL_ADDRESS>

@SeanTAllen @KenGordon @matajoh FYI

This might create a lot of merge conflicts with the coming rego engine PR, can we do this PR after that one? I think the merge conflicts for this PR will be easier to fix and less likely to result in a large round of debugging.

Somebody reported that the mingw issue was resolved for them on 1.19... I'm going to trial this


File uploads fail randomly

Some file uploads fail silently on client side (the upload bar appears to complete, nothing on console either). The uploaded file just doesn't appear on the folder. On server side I see
POST /!/upload?vId=0&to=/(...)&rename=0 [200] [1ms] Upload started
POST /!/upload?vId=0&to=/(...)&rename=0 [200] [83ms] Upload cancelled
POST /!/upload?vId=0&to=/(...)&rename=0 [200] [89ms] Received 1 files
[ERROR] ENOENT: no such file or directory, rename '/(...)/.droppy/files/(name).droppy-upload' -> '/(...)/.droppy/files/(name)'

Where for the same file if successful the log only says
POST /!/upload?vId=0&to=/(...)&rename=0 [200] [0ms] Upload started
POST /!/upload?vId=0&to=/(...)&rename=0 [200] [196ms] Received 1 files

The Droppy is proxied through Caddy, default settings, nothing special. I recently migrated from Nginx to Caddy but I think I saw this problem before that as well.

It looks like it's getting "Upload cancelled" so need to work out why that's happening. But non the less, it should at least report back with the true status

The problem probably started when I replaced Nginx with Caddy. Something is different with the proxying, it would seem.

Actually getting that error after cancelling uploading for directory to server

This is one problem that stops me from using Droppy (for me seems to fail pretty fast and not so much info about)

I'm not entirely sure but it seems to finish the upload and then fails silently. Mostly working with small files so it is hard to tell. Also if uploading multiple files in one operation, some might transfer and others not but transfer bars appear for all.

This is one problem that stops me from using Droppy (for me seems to fail pretty fast and not so much info about)

This problem was a showstopper for us. Since it and a few other issues didn't get fixed, we set to recreate all of "Droppy" from scratch. It reads Droppy config file and can accept the existing login/password your users had, so it should be an easy replacement.
It's not quite there yet - something I expect to take a few more days as development is progressing quickly - but anyone willing to give it a try are encouraged to test https://storagetest.zi.fi/ (dev site, may be offline) vs. https://drop.zi.fi/ (the same folder running on Droppy). Also let me know if you have interest on joining the development.
Notable features include:

Fixing all known open Droppy issues!
WebSocket file transfers for extra speed (parallel connections to increase throughput)
Keyboard navigation (arrow keys, shift to select, space to toggle selections, enter to view/download etc)
Instead of copy&paste semantics for file ops, just select any items you need, navigate to target folder, and click a button to copy/move/delete/download all selected items
Download to folder (new FileSystem API, don't need to ZIP to download directory trees)
Like Droppy realtime directory updates by watching, full file list kept on client for quick searches and browsing without latency

I've now replaced our four Droppy instances in production with Cista.
Demo https://drop.zi.fi/#/
Sources https://git.zi.fi/Vasanko/cista-storage

I've now replaced our four Droppy instances in production with Cista.

Hey Leo awesome work! the repo is down sadly, but as a quit note the whole point of forking this archived project into its own thing was for the community to contribute back fixing & saving Droppy (its been mostly me and a few others) but our time is very limited :)
Please feel free to submit your fixes to https://github.com/droppyjs/droppy/pulls (unless you are just plugging a rebuild with an import command haha) notably there has been work behind the scenes to bring it up to ESM while maintaining the same database structure that you can contribute to as well if you'd like!


Does This Example work with Visual Studio Community 2019?

]

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

ID: a25bf940-8977-fec4-461b-542a9f550fc8
Version Independent ID: 5492c641-af15-64b8-beaa-ddf511be73e6
Content: Tutorial: Get started with Razor Pages in ASP.NET Core
Content Source: aspnetcore/tutorials/razor-pages/razor-pages-start.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Yes


Implementing basic functions

Pull Request Description
The language specification suggests to add five basic functions into the standard library. identity, flip, const, curry & uncurry.
Important Notes
The new functions are being added into existing Function.enso file. That may not be the best place, but it is not clear from the design spec how they are supposed to be imported. I can move them wherever needed.
There is a documentation provided for each of the functions, but I am not sure how to verify it is correct. Do we generate the documentation for stdlib somehow?
Checklist
Please include the following checklist in your PR:

[ x ] The documentation has been updated if necessary.
All code has been tested:

[ x ] Unit tests have been written where possible.

Thanks for the review @jdunkerley, I followed your advice and modified the test 3b99fc4 as suggested. Then I tried:
enso$ git merge --squash 5fca901
enso$ sbt buildEngineDistribution
enso$ ./built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/bin/enso --run test/Tests/src/Data/Function_Spec.enso
identity:
    - identity on number
    - identity on text
    - identity on boolean
flip:
    - flip on number
    - flip on text
const:
    - const on number
curry:
    - curry on number list
uncurry:
    - uncurry on number list

That means, once @hubertp merges his changes, the PR here shall be also mergable as it is right now.


[INLONG-9427][Dashboard] Data access supports viewing operation logs

Prepare a Pull Request
(Change the title refer to the following example)

Title Example: [INLONG-XYZ][Component] Title of the pull request

(The following XYZ should be replaced by the actual GitHub Issue number)

Fixes https://github.com/apache/inlong/issues/9427

Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve?
Modifications
Describe the modifications you've done.
Verifying this change

It is recommended to format the detail log.
Maybe you can use stringify.


Rework Semantic Token modifiers

This reworks the semantic highlighting feature to properly utilize modifiers into a feature that matches their name.
Rather than specifying separate face mappings for tokens and modifiers, where the latter overwrite the former, they are consolidated into a single configuration structure.
This allows to map the same token to different faces based on the presence of modifiers.
This does include a breaking change within the configuration file.

I must've missed that GitHub picked the first commit's message as PR title.
Updated to match the actual content.

I agree that the error message for an invalid config file will be annoying to users, and I'm sure it'd be possible to rework the config parsing in a way that the old format would still be accepted. I'd just have to dig into serde.
On the other hand - although this might sound a bit like "I want users to use my feature" - the hard change could also be beneficial, as it would get people to know about this, and possibly other new features.
I know from my own experience that, especially with plug-update, additions can simply drift by unnoticed. I only noticed all the inlay hints and semantic tokens features when I happened to be browsing the README some time ago.
But the error message of "expected a sequence, not a map" isn't great for that kind of thing. Maybe serde has an option to customize error messages for certain fields.

Yeah I think the breakage is fine if we provide obvious steps to fix the config in the error message and CHANGELOG.md.
We get this error
Error {
  inner: ErrorInner {
    kind: Custom,
    line: Some(216),
    col: 0,
    at: Some(4955),
    message: "invalid type: map, expected a sequence",
    key: ["semantic_tokens"]
  }
}

so we could add an extra line to the error if we get this exact message and key
Failed to parse config file: invalid type: map, expected a sequence for key `semantic_tokens` at line 217 column 1
See https://github.com/kak-lsp/kak-lsp#semantic-tokens for the new configuration syntax for semantic tokens.

Rebased to drop the first two commits that were already cherry-picked into master.

Thanks for the updates - looks great!

Merged as a3c9589..40a3c9b, thanks!


Tree["nodeRenderer"] has hidden requirement to forward ref to underlying TreeNode

Describe the bug (current behavior)
If Tree["nodeRenderer"] renders some component that wraps TreeNode there is an error logged in a console: Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef().
Also in virtualized small Tree spacing between nodes are off.
There is no mention that component rendered in Tree["nodeRenderer"] should forwardRef to the wrapped TreeNode component.
Expected Behavior
It should be documented that ref will be passed to the component rendered by Tree["nodeRenderer"] and if wrapper component is rendered it should forwarf ref to TreeNode.
Link to minimal repro
https://stackblitz.com/edit/github-c2ek3e?file=src%2FApp.tsx
Steps To Reproduce

Open sandbox.
Observe error in console
Observe too big spaces between tree nodes
Replacing TreeNodeRenderer with FixedTreeNodeRenderer on line 114 resolves these issues

Package Version

[x] I'm using the latest version of iTwinUI.

Anything else?
No response

This has been documented in the Tree JSDoc and documentation which is soon to be published 😄


When tasks are created on a concurrent queue, incorrect completionHandlers can get called.

Due to this bug: http://openradar.appspot.com/radar?id=5871104061079552  in NSURLSessionTask, creating tasks on a concurrent queue can cause incorrect completionHandlers to get called.
When a duplicate taskIdentifier is returned by the task, the previous completionHandler gets cleared out and replaced with the new one. If the data for the first request comes back before the second request's data, the first response is then called against the second completionHandler.
I'm not sure what AFNetworking should do here — it could enforce creating tasks on a serial queue or it could just advise people to do so.  We could also add a test to assert that the taskIdentifier is not a duplicate?

@matt, we know that bug fixed in iOS 8+, should we support creation_queue in iOS 8+ versions?
May be we should separate this logic depending on iOS version?
For example: 1. if iOS == 7.x: create synchronously task on serial creation_queue (additional logic for fixing this bug)
2. if iOS  >  7.x: create task (no need in additional logic, here is this bug fixed)

We could potentially go down that route. If you wanted to work up a PR on the 3.0.0 branch, I'd be happy to review it!

@kcharwood, it's a good idea, i'll try to deliver this fix on this weekend!


Register first version

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/78382
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 8f6b14d8900e8a580199c431f7bef68876f59948
git push origin v0.1.0

@JuliaRegistrator register

Registration pull request updated: JuliaRegistries/General/78382
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" a38340ee96c0f40998aeeec4fcad21f99f6cec0f
git push origin v0.1.0


[BUG]: Turso/libsql:: Drizzle-Kit:: Migrate:: LibsqlError preventing migration

Report hasn't been filed before.

[X] I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?
v0.36.4
What version of drizzle-kit are you using?
v0.28.1
Other packages
No response
Describe the Bug
Getting an 404 error when trying to migrate schema changes on a starter database
#1 Create drizzle config
import dotenv from 'dotenv';
dotenv.config();
export default {
schema: "./src/lib/script/turso-schema",
out: "./src/lib/script/turso-schema-migrations",
dialect: "turso",
dbCredentials: {
url: process.env.TURSO_DATABASE_URL,
authToken: process.env.TURSO_AUTH_TOKEN,
},
}
#2 Create sample turso-schema-user.js
export const org = sqliteTable("org",
{
id: integer({ mode: 'number' }).primaryKey(),
type: text({ enum: ["Company", "Freelancer", "Other"] }).notNull(),
name: text("name").notNull(),
createdAt: integer({ mode: 'timestamp_ms' }).notNull(),
updatedAt: integer({ mode: 'timestamp_ms' }).notNull(),
})
export const orgRelations = relations(org, ({ many }) => ({
user: many(user),
}));
export const user = sqliteTable("user",
{
id: integer({ mode: 'number' }).primaryKey(),
firstName: text("firstName").notNull(),
lastName: text("lastName").notNull(),
createdAt: integer({ mode: 'timestamp_ms' }).notNull(),
updatedAt: integer({ mode: 'timestamp_ms' }).notNull(),
});
export const userRelations = relations(user, ({ one }) => ({
author: one(org, {
fields: [user.id],
references: [org.id],
}),
}));

drizzle-kit migrate

No config path provided, using default 'drizzle.config.js'
Reading config file '/Users/[USER_NAME]/Sites/localhost/[APP_NAME]/drizzle.config.js'
[⣷] applying migrations...LibsqlError: SERVER_ERROR: Server returned HTTP status 404
at mapHranaError (file:////Users/[USER_NAME]/Sites/localhost/[APP_NAME]/node_modules/@libsql/client/lib-esm/hrana.js:268:16)
at file:////Users/[USER_NAME]/Sites/localhost/[APP_NAME]//node_modules/@libsql/client/lib-esm/http.js:76:23
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at migrate (/Users/[USER_NAME]/Sites/localhost/[APP_NAME]/node_modules/src/libsql/migrator.ts:20:2) {
code: 'SERVER_ERROR',
rawCode: undefined,
[cause]: HttpServerError: Server returned HTTP status 404
at errorFromResponse (file:///Users/[USER_NAME]/Sites/localhost/[APP_NAME]/node_modules/@libsql/hrana-client/lib-esm/http/stream.js:362:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 404
}
}

I tried dumping the drizzle-kit application support ( macOS ), but then that causes a promise issue on cert.

npx drizzle-kit check
No config path provided, using default 'drizzle.config.js'
Reading config file '/Users/[USER_NAME]/Sites/localhost/[APP_NAME]/drizzle.config.js'
Everything's fine 🐶🔥
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: ENOENT: no such file or directory, open '/Users/[USER_NAME]/Library/Application Support/drizzle-studio/localhost-key.pem'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/[USER_NAME]/Library/Application Support/drizzle-studio/localhost-key.pem'
}
Secondarily: How do i address the No config path provided, using default 'drizzle.config.js', also?

please format your code better. https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks


Dev package

Similar to https://github.com/conda-forge/cyclus-feedstock/issues/85, we should maintain a cycamore dev package that uses cyclus dev as its source.  This package should be aligned with the main branches in both repos.

Closing this issue, dev branch exists at https://github.com/conda-forge/cycamore-feedstock/tree/dev


Improvements for dynamoose/dynamoose#1594

Some improvements for your pr https://github.com/dynamoose/dynamoose/pull/1594

LGTM


Automate dependency upgrades

Is your feature request related to a problem? Please describe.
Akri comprises 4 members and each member comprises a list of crate dependencies. It is moderately important that Akri be kept current with its dependencies but it already drifts quite considerably (e.g. kube uses 0.23.0 published 30-Dec-2019 current is 0.46.0 published 02-Jan-2021).
Outdated dependencies potentially:

include security vulnerabilities
are feature poorer
accrue technical debt.

Additionally, it is important to prune no-longer-needed dependencies in order to reduce:

code-size
attack surface
complexity in managing dependencies.

Members:
members = [
    "shared",
    "controller",
    "agent",
    "samples/brokers/udev-video-broker"
]

Agent's Cargo.toml:
[dependencies]
async-stream = "0.2"
async-trait = "0.1.0"
blake2 = "0.8.0"
chrono = "0.4.10"
cfg-if = "0.1"
env_logger = "0.6.1"
failure = "0.1.5"
futures = { version = "0.3.1", package = "futures" }
futures-core = "0.3"
futures-util = "0.3"
futures-old = { version = "0.1", package = "futures" }
hyper = "0.11"
kube = { version = "0.23.0", features = ["openapi"] }
k8s-openapi = { version = "0.6.0", features = ["v1_16"] }
log = "0.4"
mime = "0.3"
mockall = "0.6.0"
pest = "2.0"
pest_derive = "2.0"
prost = "0.6"
rand = "0.7"
regex = "1"
serde = "1.0.104"
serde_json = "1.0.45"
serde_yaml = "0.8.11"
serde_derive = "1.0.104"
akri-shared = { path = "../shared" }
sxd-document = "0.3.0"
sxd-xpath = "0.4.0"
tempfile = "3.1.0"
tokio = { version = "0.2", features = ["full"] }
tokio-core = "0.1"
tokio-test = "0.3.0"
tonic = "0.1"
tower = "0.3"
udev = "0.4"
uuid = { version = "0.8.1", features = ["v4"] }
xml-rs = "0.8.0"
yaserde = "0.3.13"
yaserde_derive = "0.3.13"
zeroconf = "0.6.2"

[build-dependencies]
tonic-build = "0.1.1"

Is your feature request related to a way you would like Akri extended? Please describe.
N/A
Describe the solution you'd like
The Akri project may wish to consider a(n automated) build process in which dependencies are:

pruned as appropriate; only include those that are explicit, current dependencies
upgraded to the latest (major+minor) versions to see "Will it build?" and remedial actions indicated when it doesn't

Describe alternatives you've considered
N/A
Additional context
E.g. see https://github.com/deislabs/akri/issues/180#issuecomment-754220329

Folks, I've spent some time looking at this and here's my thought process.
Starting with "why we need to upgrade dependencies". It seems the P0 problem is security vulnerabilities. For that, I propose adding a new GitHub action to catch packages imposing security risks through
Next, for patch, minor and major updates. this is taken care by using cargo update which uses semVer common compatibility versioning to lock versions to existing dependencies. For that I'll add another GitHub actions that automatically run with each build, It will run cargo update and fails if an update was found. (later we can expand this to attempt a build and if build was successful, it can automatically open a pull request if changes were detected. If build failed, it fails the action notifying that a dependency was added without properly specifying the versioning semantics).
Finally non-compatible updates will still require manual intervention and can be taken care of each release manually if needed.
Let me know your thoughts..

Folks, I've spent some time looking at this and here's my thought process.
Starting with "why we need to upgrade dependencies". It seems the P0 problem is security vulnerabilities. For that, I propose adding a new GitHub action to catch packages imposing security risks through
Next, for patch, minor and major updates. this is taken care by using cargo update which uses semVer common compatibility versioning to lock versions to existing dependencies. For that I'll add another GitHub actions that automatically run with each build, It will run cargo update and fails if an update was found. (later we can expand this to attempt a build and if build was successful, it can automatically open a pull request if changes were detected. If build failed, it fails the action notifying that a dependency was added without properly specifying the versioning semantics).
Finally non-compatible updates will still require manual intervention and can be taken care of each release manually if needed.
Let me know your thoughts..

Thanks for taking the time to consider this!
Yes, to your P0 ... additionally, we may wish to consider leveraging a vuln checker on the container images that are produced as these often identify CVEs and could possibly create GitHub issues automatically.
It may be a P1 rather than P0 but (avoiding) incurring technical debt is "up there" with the drift too.
I assumed (probably incorrectly) that cargo update did not update on possibly breaking changes (e.g. v0 --> `v1) (link)
Are you familiar with dependabot? It may help.

Thanks for taking the time to consider this!
Yes, to your P0 ... additionally, we may wish to consider leveraging a vuln checker on the container images that are produced as these often identify CVEs and could possibly create GitHub issues automatically.
It may be a P1 rather than P0 but (avoiding) incurring technical debt is "up there" with the drift too.
I assumed (probably incorrectly) that cargo update did not update on possibly breaking changes (e.g. v0 --> `v1) (link)
Are you familiar with dependabot? It may help.

Dependabot is enabled for Akri (the current GitHub integrated version), but doesn't detect the current security vulnerabilities. I'm guessing because it relies on GitHub Advisory Database and not the RustSec Advisory Database?
A vuln checker on container images is a good idea. I'll open a separate issue to track that.

Dependabot is enabled for Akri (the current GitHub integrated version), but doesn't detect the current security vulnerabilities. I'm guessing because it relies on GitHub Advisory Database and not the RustSec Advisory Database?
A vuln checker on container images is a good idea. I'll open a separate issue to track that.


ARCH: Figure out how to handle sprite sheets

Is there a nice way to handle the sprite animation for multiple/all sprite sheets?

Yeah, use bevy_trickfilm. See https://github.com/PraxTube/magus-parvus for an example implementation.


Fix an issue with loading of user modules

fix an issue with loading of user modules contains comment at last string (for example typescripts compilled code with map info)

This changeset is hard to understand. Please open an issue first detailing what the problem is. For details, refers to https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md.

FYI, I pulled the useful change out of this and committed it as a4cb01b2011fe528919fe2bb47d6ef2448790ced.

Thanks, @alexey89777!

(Amended that commit message to include a reference to this issue #12868.)


Error when loading world

Multiverse fails to load world, if a player is in the world already then they can use the world, however if you try to enter the world with /warp or /mvtp then you cannot access it.
The world uses a custom generator, this has never happened before.
Server log: https://pastebin.com/A44EyzH2

You should probably update to the latest release.

Closing ticket due to lack of information (and no response in a reasonable time). Please open a new ticket with more valid information if this issue is still occurring in the latest versions.


perf(projects): avoid layout shift by styling non-JS

Current dependencies on/for this PR:

main

PR #210   👈

This stack of pull requests is managed by Graphite.


Write factories that will generate the correct orchestration backend

This will be covered by previous steps in #705 and #707


Invalid argument: NodeDef mentions attr 'identical_element_shapes' not in Op

I'm getting an exception after git clone & docker-compose up with ubuntu 20.04:
tensorflow/core/framework/op_segment.cc:53] Create kernel failed: Invalid argument: NodeDef mentions attr 'identical_element_shapes' not in Op
Full log:
Starting vehicle_counting ... done
Attaching to vehicle_counting
vehicle_counting    | 2020-07-15 20:39:04.215792: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
vehicle_counting    | 2020-07-15 20:39:04.550453: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
vehicle_counting    | 2020-07-15 20:39:04.550695: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
vehicle_counting    | name: GeForce RTX 2070 major: 7 minor: 5 memoryClockRate(GHz): 1.71
vehicle_counting    | pciBusID: 0000:01:00.0
vehicle_counting    | totalMemory: 7.79GiB freeMemory: 7.39GiB
vehicle_counting    | 2020-07-15 20:39:04.550711: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce RTX 2070, pci bus id: 0000:01:00.0, compute capability: 7.5)
vehicle_counting    | 2020-07-15 20:39:05.218946: E tensorflow/core/framework/op_segment.cc:53] Create kernel failed: Invalid argument: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=<unknown>; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
vehicle_counting    | 2020-07-15 20:39:05.218985: E tensorflow/core/common_runtime/executor.cc:643] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=<unknown>; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
vehicle_counting    | 	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice)]]
vehicle_counting    | Traceback (most recent call last):
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1323, in _do_call
vehicle_counting    |     return fn(*args)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
vehicle_counting    |     status, run_metadata)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
vehicle_counting    |     c_api.TF_GetCode(self.status.status))
vehicle_counting    | tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=<unknown>; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
vehicle_counting    | 	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice)]]
vehicle_counting    |
vehicle_counting    | During handling of the above exception, another exception occurred:
vehicle_counting    |
vehicle_counting    | Traceback (most recent call last):
vehicle_counting    |   File "vehicle_detection_main.py", line 243, in <module>
vehicle_counting    |     object_detection_function()
vehicle_counting    |   File "vehicle_detection_main.py", line 129, in object_detection_function
vehicle_counting    |     feed_dict={image_tensor: image_np_expanded})
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 889, in run
vehicle_counting    |     run_metadata_ptr)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1120, in _run
vehicle_counting    |     feed_dict_tensor, options, run_metadata)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1317, in _do_run
vehicle_counting    |     options, run_metadata)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1336, in _do_call
vehicle_counting    |     raise type(e)(node_def, op, message)
vehicle_counting    | tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=<unknown>; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
vehicle_counting    | 	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice)]]
vehicle_counting    |
vehicle_counting    | Caused by op 'Preprocessor/map/TensorArray', defined at:
vehicle_counting    |   File "vehicle_detection_main.py", line 73, in <module>
vehicle_counting    |     tf.import_graph_def(od_graph_def, name='')
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def
vehicle_counting    |     op_def=op_def)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
vehicle_counting    |     op_def=op_def)
vehicle_counting    |   File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
vehicle_counting    |     self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access
vehicle_counting    |
vehicle_counting    | InvalidArgumentError (see above for traceback): NodeDef mentions attr 'identical_element_shapes' not in Op<name=TensorArrayV3; signature=size:int32 -> handle:resource, flow:float; attr=dtype:type; attr=element_shape:shape,default=<unknown>; attr=dynamic_size:bool,default=false; attr=clear_after_read:bool,default=true; attr=tensor_array_name:string,default=""; is_stateful=true>; NodeDef: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
vehicle_counting    | 	 [[Node: Preprocessor/map/TensorArray = TensorArrayV3[clear_after_read=true, dtype=DT_FLOAT, dynamic_size=false, element_shape=<unknown>, identical_element_shapes=true, tensor_array_name="", _device="/job:localhost/replica:0/task:0/device:GPU:0"](Preprocessor/map/TensorArrayUnstack/strided_slice)]]
vehicle_counting    |
vehicle_counting exited with code 1

Any ideas what I'm doing wrong?
Thank you in advance.

It is related with your TensorFlow version. Please check this.

It is related with your TensorFlow version. Please check this.


Union with array

Not for review
Demonstration for  #580

This change is

Close, because open new PR #611