Support for lists and tuples

Discussion from #50:

Lonami
[lists] are tricky because they're no longer a "simple value" which is held in a single variable.
While for x in [a, b, c]: could be special-cased to run the loop body with x going through all of a, b, c, things get more difficult if you were to support to assign the list to a variable, which can then be moved around, passed as parameters, iterated over, etc. Because the type would have to be tracked to properly work on that variable (e.g. in x = y, the assignment would be very different for lists and simple values).
Unless… perhaps "list" variables point to their length, and when used as a list, they "just" work. Imagine
x = [1, 2, 3]
for y in x:
  print(y)

Could generate (pseudo)
x = 3
x__list0 = 1
x__list1 = 2
x__list2 = 3
set loopcounter 0
:loop
jmp loopcounter == 3 to :exitloop
set y x__list{loopcounter}
print y
printflush
jmp :loop
:exitloop

Yeah that's some nice food for thought.
(Now as for what would happen if you had x = 3; for y in x, well, it would do the same, but it would pick out null every time, kinda "undefined behaviour".)

Indieberrie
Have you thought about using heap to allocate arrays?
Allocating arrays on the stack (or using infinite registers) is only good when the array size is known at compile time.
As I see, whole idea of python arrays (I use array and list interchangably) is that they are all runtime resizable which means implementing them on stack is a bad idea

Lonami
The heap (memory cells) can only store numbers (so, no strings, or @variables):
set result "hello"
write result cell1 0
read result cell1 0
print result
printflush message1

This prints 1. Removing the read does print "hello".
It's true, as you point out, infinite variables would not work with dynamic array sizes (since there's no way to refer to a dynamic variable name in mlog).
However, tuples are immutable, so the fixed size makes more sense. Maybe lists could only support numbers (implemented via Mem), and tuples would support anything (implemented via infinite registers). But what memory cell would be used for the list?
foo = [1, 2, 3] @ cell1

could be made work. Ah, so many ideas!

Huh, I learn something new. I didn't know that thing with squary brackets is tuple (not a list) and it's immutable. Thought it was list initialization. I don't know python, I just use it from time to time. I really ought to sit down for a day and learn it properly
Well neither "real" computers saves string into memory. They save number representation. There is a reason why following works in c:
char c1='a',c2='b';
char c3=c1+c2;
printf("%d%c",c3,c3);

Strings are just character arrays, which are actually number arrays. When doing stuff in "lower level" languages than python, like c/cpp, strings are saved in dynamic arrays and have wrapper class to allow certain methods to be done on them.
So this would mean that under the hood strings would have to be saved separately in memory (as separate array) and any class that has string property or array having string elements would actually have a pointer to that string array data structure (either whole object or just address and length). When you think about it, that is how it works in C, that's why strings are just a pointer to char

Huh, I learn something new. I didn't know that thing with squary brackets is tuple (not a list) and it's immutable

Sorry I didn't make it clear. That was an example with a list.
my_list = [1, 2, 3]
my_list.append(4)
my_list[3] = 5
my_list.pop()  # 5

my_tuple = (1, 2, 3)  # (parenthesis optional)
# my_tuple[2] = 4  # error! tuples are immutable
# my_tuple.append(4)  # error! tuples do not have .append or .pop

Well neither "real" computers saves string into memory. They save number representation. There is a reason why following works in c:

Yeah, I'm aware. However, unlike C (and most languages), mlog does not really have support to access a string's bytes, or characters, or unicode points. So, not even pyndustric could possibly "compile" storing strings to memory. If mlog had an op to "get character" or something, sure, but unfortunately it doesn't. Even the + operator on two strings results in 2! (I assume they are treated as truthy values, or 1, so the result is 2).

So this would mean that under the hood strings would have to be saved separately in memory (as separate array) and any class that has string property or array having string elements would actually have a pointer to that string array data structure (either whole object or just address and length).

This is simply not possible with the instructions mlog provides in the 6.0 release, and I don't remember anything in the 7.0 which would enable this either.

At least that was how would I implement it. I had idea to make C compiler (since I already talk way to much "low" level instead of python) using LLVM, but it's too much work for some game I play once every 2 years

No need for a C compiler, just a new LLVM backend would be enough, and we'd get all benefits from having an already-existing optimizing compiler. But this is not the issue here (I wouldn't worry that much about hyper-optimizing mlog programs).

How about
a = "Hey"
print(a)

compiles to (I'm going to mix some higher langauge here)
# a = "Hey"
set a 0
write 3 cell2 0 # cell1 is already stack
write 72 cell2 1
write 101 cell2 2
write 121 cell2 3

# print(a)
for n in range(1,cell2[a]+1):
    print(cell2[a+n])
# I'm not writting assembly for that

I looked and haven't seen any instruction that takes in a string besides print, so it seems there is no need to concatinate (for now, correct me if I missed something)
Only thing besides print that takes string is jumps, so doing conditions on this string metal implementation could look like:
a = "aa"
b = "bb"
if a == b:
    print("equals")

# a = "aa"
    set a 0
    write 2 cell2 0
    write 97 cell2 1
    write 97 cell2 2

# b ="bb"
    set b 3
    write 2 cell2 3
    write 98 cell2 4
    write 98 cell2 5

#if a==b: ##again, I'm not writing assembly for this
    #equal length?
    if cell[a]==cell2[b]:
        for n in range(1,cell2[a]+1):
            if cell2[a+n] != cell2[b+n]:
                jump _notequals

_equals:
print("equals")
_notequals:

Now, that was demonstration of simple arrays. Having array of strings would be simple array holding pointers to arrays of characters.
That was regarding static arrays. Doing dynamic ones would require something like malloc and free (which is not impossible, but costly). On top of those, something equivalent of  could be built (or anything that cpp uses as data structure to hold characters in string class)
So then it would be requiered to make some simple "standard library" and this is already low level enough for python and too much reinventing the wheel regarding library that writing LLVM backend makes sense

where print(number) here would go through massive switch case

With 95 printable characters, assuming the switch consists of set _tmp = "a"; jmp _ret for each letter, the switch would need at least 190 instructions, excluding any other call overhead and matching the variables. Which would need to be embedded into every single program which uses strings and prints. This is just not feasible.
Any string operation also becomes ridiculously expensive. Storing strings in memory is just not feasible (I would not even be willing to merge such a feature - it's too much).
Anyway we are deviating from the main topic of implementing lists and tuples, but essentially lists cannot be dynamically stored anywhere in a reasonable way so I won't be willing to merge such a thing for strings.

Ok, we throw out supporting strings that arent literals in registers. We are left with implementing stack (static) arrays that hold regular numbers (which is really useful and not that hard)
For dynamic ones, I have to think about it. Again, not impossible, but requires memory managment

There is a problem implementing tuples (roughly "statically sized arrays") when variables are dynamically typed with no way of knowing a variable's type at runtime or compile time. Essentially, a 1-tuple is different from a 2-tuple, which is different from a 3-tuple, etc. So if you had:
tup = ("hello", "bye")
for elem in tup:
    print(tup)

When compiling for elem in tup:, how would the compiler know to generate an access for tup__0 and tup__1? It can't unless it tracked the type of the variable, which is not always possible. Why can't the compiler track the type?:
if random() > 0.5:
    tup = (1, 2, 3, 4)
else:
    tup = ("hello", "bye")

for elem in tup:
    print(tup)

Here it will either be a 2-tuple or a 4-tuple at runtime, but if tuples were to be implemented using infinite variables (to support strings, which can't go in memory cells), then knowing their length simply becomes impossible.
Perhaps we have to give up on implementing tuples.

For dynamically sized lists, memory cells can indeed be used. But remember that a memory cell can be as small as 64 numbers in capacity. For this code:
if random() > 0.5:
    arr = [1, 2, 3, 4]
else:
    arr = [101, 102]

for elem in arr:
    print(elem)

When compiling the loop, the only information we have again is just "user is trying to iterate over arr".
Assuming the compiler stored "a pointer" in the arr variable, it could then access the length at cell[pointer], and the rest of elements starting at cell[pointer + 1]. But how do we know which cell? Perhaps when assigning a list the compiler actually creates set arr pointer; set arr__cell cell1, so when generating the loop it assumes it can check arr__cell for the cell's name (and it would silently fail if it turned out arr was not an array).
(All of this applies to number-only tuples too. Perhaps that's what should be implemented, just tuples backed by memory.)
Dynamically sized lists would mean the compiler also needs to write some sort of memory allocator, which means reserving some memory for the allocator itself, and would also need to embed routines to create and free allocations (at a minimum; a resize / move routine could also be added for more efficiency). If a list grows large enough that it doesn't even fit in a single memory cell, well, that's a fun problem: you would probably need to handle a dynamically sized amount of memory cells for compiling lists in the general case.

I think allocators and dynamic lists are completely overkill for this project. Logic processors in Mindustry have a limited amount of instructions. Embedding so much code, even if it were only embedded when the features are used, feels like far too much.
I would rather investigate how to improve the ergonomics of using memory cells.
I think supporting things such as:
start = 10
end = 20
for elem in Mem.cell1[start:end]:
    print(elem)

Mem.cell1[5:10] = Mem.cell1[25:30]
Mem.cell1[40:45] = [1, 2, 3, 4, 5]

...would mostly mitigate the need for having actual lists.
Non-growable lists (or tuples) can probably be implemented with the approach I described (compiler generates a pair of pointer + cell per declared list variable), but the fact it could silently fail with this approach (e.g. iterating over some variable when it's not actually a list) is not very nice.
If only iteration over Mem is allowed, then the compiler can properly fail when iterating anything else (meaning there is less room for error). I feel like this is the correct approach to go. You "only" lose the ability to name lists something more concrete, but realistically I don't expect programs to have so many lists where this becomes a problem.

Ergonomics improvements are great idea!
I looked and I'm surprised that largest cell can hold 512 addresses (I thought I saw some k somewhere. like 16 k). Now I'm sad that the system has such a limitiations with maximum 1500 instructions per second and to have reasonable memory you have to stack memory cells to the moon and back.
I still think that some simple memory managment system for even those 512 addresses wouldn't be too hard. something of the likes:
#cell2 holds a list of free regions on the heap
list_of_free_regions = cell2
#cell3 holds the heap

def alloc(size):
    for x in list_of_free_regions:
        if size < x.begin-x.end:
            temp=x.begin
            x.begin += size
            return temp

def free(begin,end):
    for x in list_of_free_regions:
        if begin = x.end + 1:
            x.end = end
        elif end = x.begin - 1:
            x.begin = begin
        else:
            list_of_free_regions.push({begin:begin, end:end})
        # there is the case where freed memory is in between 2 other free blocks
        # but this is just proof of concept

I think there may be a way to keep the list of free regions and the heap in the same cell, but that's problem for another time

Sorry it took a while to get back, I was super busy!
I thought about implementing tuples. We agree on a lot of stuff, but here are my caviats:

When compiling for elem in tup:, how would the compiler know to generate an access for tup__0 and tup__1? It can't unless it tracked the type of the variable, which is not always possible. Why can't the compiler track the type?:

Accessing tuple elements (if they are stored in infinite registers (as they probably should, sorry about my static-stack blip, having stuff beyond numbers in tuples is useful)) should be done via switch case (I don't see any ohter way because of register naming) so that compiler shouldn't generate access points when it encounters for loop, but from information about tuple assignment. I guess it would be reasonable to have some sort of lookahead and see what is the maximum length of tuple to generate switch case acording to that. (each tuple would have its own switch case) For loop would obviously iterate over actual number of elements. Also, compiler could (if told to, for example by flag) instert out-of-bound checks
In regards to what if later on programmer assigns a number to variable that was holding a tuple and then tries to iterate: let him shoot himself in the foot.
As I understand it is not job of a python interpreter to prevent people from doing that. Letting them know when that happens/could happen is nice and there might be few ways to go about it (print runtime error to message block or compiler gives you warning if you try to use same variable name for tuple and anything else)
So I guess tuple being represented as pointer_to_switch and length would be reasonable
Another thing would be to make elements mutable (there is no reason not to, it would just add more instructions to compiled program). The only requirement for tuples is to have size limited at compile time. (hence why my static-stack blip)

I checked largest memory cell and was super dissapointed when I figured out it was 512 adresses. I thought I've seen some K somewhere. Such harsh limitations...
You might be right that dynamic lists are overkill but philosophy of "pay only for what you use" is not alowing me to let go.

Perhaps we have to give up on implementing tuples.

I think tuples are a must and if we decide to give up on something heap idea is that!
Here are some ideas:
It makes sense to hold only numbers there.
Programmer knows how much heap he will give to processor (by how much he built ingame) so passing options to compiler as: [ {cell_number , cell_size} ]
would allow compiler to mash all the cells into one heap. (eg. if you give 4 cells each of 512 size you would have 2k heap. Cell number is so that compiler knows which cells are accessable)
All arrays (and objects, which don't work either) are on that one heap. Allocating more than there is on a heap should lead to runtime error. This would go around having "dynamically sized amount of cells". This way would require virtual/physical address translation to know which cell to access (it's maybe ~20 instructions more)
Memory allocator is a must tho! Having alloc and free isn't that big of a problem. Easiest algorithm would be to have a list of elements holding free sections of heap, and it would get choped up anytime there is alloc, and added to it anytime there is free.[^bignote]

Ergonomic improvements for accessing cells is great idea.
Implementation of for loop should somehow account for all of the possibile things it can iterate over (There is a lot about this to discuss, so maybe later when we see about previous stuff)
[^bignote]: code example:
```pyhton
# cell2 holds a list of free regions on the heap
# Treat list_of_free_regions as the only array on cell2
list_of_free_regions = cell2
def alloc(size):
    for x in list_of_free_regions:
        if size < x.begin-x.end:
            temp=x.begin
            x.begin += size
            return temp

def free(begin,end):
    for x in list_of_free_regions:
        if begin = x.end + 1:
            x.end = end
        elif end = x.begin - 1:
            x.begin = begin
        else:
            list_of_free_regions.push({begin:begin, end:end})
        # there is the case where freed memory is in between 2 other free blocks
        # but this is just proof of concept
        # I also might be forgeting something else
```

Not sure how to best answer to your comment.
Tuples actually compiling to a switch seems reasonable, since we also want the following to compile:
index = 2
tup = ('a', 'b', 'c', 'd')
elem_c = tup[index]

And indeed the only way to do that at runtime within Mindustry's processor is some sort of switch or jump table. This worries me though:
n = 2
backup = None
for i in range(n):
    tup = ('a', 'b', i)
    if backup is None:
        backup = tup

print(backup[2])  # should print 0, but tup[2] is 1

The loop will run its body twice. On the first iteration, a tuple ('a', 'b', 0) is created. The compiler would have to create a jump table somewhere in the code for this. Because backup is None, it will be assigned tup. On the second iteration, at the same point as before, a tuple ('a', 'b', 1) is created. Where does this live? Does it overwrite the old jump table? If it does and backup still points to it, the print at the end will print 1 and not 0! Is another jump table created when doing backup = tup? How does the compiler know tup is a tuple though? Types are not being tracked (and is not always possible, see preivous comments). Is it just illegal to move tuples?
Regarding mutability of tuples, yeah, we can do that. It's not something normally allowed in Python but it can be done. pyndustric would be repurposing "tuples for fixed size, lists for dynamic", both mutable.

Programmer knows how much heap he will give to processor (by how much he built ingame) so passing options to compiler as: [ {cell_number , cell_size} ]
would allow compiler to mash all the cells into one heap. (eg. if you give 4 cells each of 512 size you would have 2k heap. Cell number is so that compiler knows which cells are accessable)

Not sure about this. I think the code should specify which cell to use, not a compiler option. But I can see your idea being "easier" on the programmer and harder on the compiler developer.

Can we just make tuples immovable and anytime someone tries to assign them, we actually provide reference?

We cannot know the type of variables, so we cannot force them to be "immovable" (if by that you mean another_tuple = tuple_variable).

I mean that when someone tries to copy it (another_tuple = tuple_variable) instead of another_tuple holding a copy of tuple_variable , it holds a reference of tuple_variable, so any change to any of those 2 will change only one tuple that exists in memory. (kinda what javascript does)

It's your second idea:

If it does and backup still points to it, the print at the end will print 1 and not 0!

I mean that when someone tries to copy it (another_tuple = tuple_variable) instead of another_tuple holding a copy of tuple_variable , it holds a reference of tuple_variable, so any change to any of those 2 will change only one tuple that exists in memory. (kinda what javascript does)

Assuming tuple_variable contains the pc address to the tuple information in the variable, another_tuple = tuple_variable can remain being a simple set (as it is with any other values) so in essence it would work the same, yeah. As in:
tup_a = ('a', 'b')
tup_b = tup_a
for x in tup_b:
  print(x)

compiling to (kind of):
; tuple definition begin
set __res 2 ; tuple len
jmp __back
set __res "a" ; first elem
jmp __back
set __res "b" ; second elem
jmp __back
; tuple definition end
set tup_a 0 ; 0 is the addr of tuple definition
set tup_b tup_a ; addr is copied
; loops over a variable assume the variable is a tuple. first we would obtain the len of the tuple
call tup_b ; pretend call sets up __back then jmp like a function call
set __loop __res
call tup_b[2 + __loop * 2] ; access tuple element by index
print __res
set __loop + 1
cont __loop ; jmp to loop

Seems like we have a plan, next would be implementing it and adding tests.

Note that:
nested_tulpe ( ("a", "b"), (1, 2), ("c", "d") )

should probably compile fine and result in 4 compiled jump tables (three for the inner ones, then one for the outer one).

Maybe:
tup = ("a", "b")
a, b = tup

could also work (well, that would be another feature of tuples).

I'm glat that that's sorted out.
What should we do about figuring out type we are trying to iterate over?

We do not care about that. Whenever the compiler sees for VAR in ITERABLE (where both VAR and ITERABLE are variable names the user created), we assume ITERABLE points to the pc address of the tuple definition with (len, items...). The tuple's elements can be anything, it doesn't matter.

Yes, it's simple if we only do tuples, but what about Env.links() and what if we also decide to implement heap arrays?

Env.links() and others are special-cased "system calls". You can tell them apart because they have the form Namespace.name, as opposed to just a name the user can create. Those work in their own way and do not need to follow the rules of tuples.
The compiler can simply forbid links = Env.links() and only allow for x in Env.links() to work.

Hmmm, an idea that comes to my mind to prevent problems with tuples and dynamic arrays is for memory managment system to bake in at compile time forbidden addresses (pointers) that are used by tuples and to use other addresses. When we jump to iterate, first we check if we are having "tuple address" or something else, and if it's something else, we pass it to memory managment system

This would add an extra check every time such an operation occurs, with an overhead of 2 instructions (compare and jump) at a minimum. We shouldn't get too fancy. The 1000 instruction limits isn't a high number.

I'll need to think about this

I would first implement tuples and then worry about dynamic arrays (dynamic arrays could be similar to tuples. Imagine they compile to the same switch table, but instead of jumping back, they jump elsewhere to determine the real address or similar: this would eliminate the check from every access and push the overhead to dynamic ones only).


Linux client gets stuck at certain blocks

From the bugs we talked about in Bitcointalk:
Linux client 0.3.2 gets stuck at certain blocks when downloading the blockchain. If redownloading, it gets stuck too.
The last block where I encountered the problem and can confirm it was block 311792.
I got stuck recently at 422195, but must confirm if it's because of the same problem.
Windows QT client does not have the problem, even when using Wine.

422195 was definitively the same problem. Up to the actual value, there were two more blocks where the client gets stuck.

I don't know whether this is related ...
https://github.com/gjhiggins/Slimcoin/commit/ccdf9659f952d1fdb8407174e89c43abca49d8f8#diff-fa018f4d28b5116a35b36b72fc9f4e51R19
AFAIC, I the code was never released per se, merely made available for trial. I had a go at putting the sources on more a stable footing, in a more accessible context but it was very much speculative effort and (as far as I understood it) prompted little interest (not entirely surprising to me).

Unfortunately I don't have the technical knowledge to give you a qualified answer. Do you mean that your commit could be the reason for the client getting stuck, or that it can be the solution? The error is appearing also in all old 0.3 versions.
BTW, your work is much appreciated, if we manage to get other people on board it can be a good starting point.

This is currently affecting me as well.


[FIX] cache key resolver for getTSConfig

In the weird case you'd have such a directory structure:
src/
  ...
other-src/
  tsconfig.json
tsconfig.json

and jest.globals would be the same for both directories, the second call to getTSConfig will return the same as the other one, because rootDir is ignored in the cache key resolver for getTSConfig.
I've also added the reset of memoized cache for that function before each test, as it could land to weird results in some cases (passing but shouldn't or even the opposite because of cached data between tests)

@huafu thanks for the PR :)


Warnings in npm install for nodejs package

When installing the latest NPM package @pulumi/gcp I'm seeing some deprecation warnings from the read-package-json package that we reference here: https://github.com/pulumi/pulumi-gcp/blob/21aedd2f69e170ce6765145dcdb5e5a52b93ff7a/provider/resources.go#L2739
npm warn deprecated<EMAIL_ADDRESS>This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated<EMAIL_ADDRESS>This package is no longer supported. Please use @npmcli/package-json instead.
npm warn deprecated<EMAIL_ADDRESS>Glob versions prior to v9 are no longer supported

Hey @pierskarsenbarg, thanks for reporting. Can you help me understand the impact here? The deprecated warnings are not great but can be silenced, right?
This is, unfortunately, somewhat tricky to fix. I had a go but the module is used in our custom typescript overlay and we'd need to backfill a lot of tests here to change that.

It's more "the warnings aren't great" than anything else and to get them on the radar.
Not sure what the inflight one does but "leaks memory" doesn't sound very good


Rework VNC sessions to support showing other windows and dialogs

What does the pull request do?
I started wanting to find a way to support using TopLevel.StorageProvider.OpenFilePickerAsync which wouldn't work since naturally there is no IStorageProvider for VNC so I decided to use the Avalonia.Dialogs.ManagedFileDialogExtensions stuff.
This pull request overhalls how VNC sessions work so that other windows can be shown/used.
I'm not sure if this request is outside the scope since the Pausing contributions thing, if so feel free to ignore/close for now.
What is the current behavior?
Currently showing another window does nothing as the HeadlessVncFramebufferSource is hard coded to the main window.
What is the updated/expected behavior with this PR?
Other windows can be shown and interacted with over VNC and when closing the child window/dialog it reverts to the previous window.
How was the solution implemented (if it's not obvious)?
A HeadlessVncConnectionManager is responsible for handling VNC sessions and switching which Window the HeadlessVncFramebufferSource uses to get the current frame. The HeadlessVncConnectionManager also handles shutdown on the last VNC client disconnection
The HeadlessVncFramebufferSource will now fix the frame size to the size of the MainWindow ClientSize, this is because when switching windows it would trigger the frame buffer to be recreated at a different size as part of Capture(), during testing it would almost always cause the VNC client to no longer get new frames shown so now it's configurable via bool resizeBufferIfContentSizeChanges.
To support using the ManagedSystemDialogs an IMountedVolumeInfoProvider needs to be registered so an extra extension method has been added to each platform so the VNC stuff can use the managed dialogs.
Side note: during testing I found WindowsMountedVolumeInfoListener would cause the connection to hang and running the poll in a background thread fixed it so I've included that here too (can do a separate request if preferred)

You can test this PR using the following package version. 11.0.999-cibuild0035994-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

re-requesting @kekekeks 's review. But IMO concept wise it looks good.

I strongly believe we should make ManagedFileDialog work without any windowing available. At least as a popup.

Windowing support in VNC sessions is another topic though. I am not knowledgeable enough about VNC to speak about this part.


Add calc prazo method to correios client

In order to get delivery time estimation from Correios web services, I'm opening this pull request to add CalcPrazo operation[1].
I had to change the freight SoapClient instantiation adding NoCache because the tests were not passing[2]. According what I saw, suds lib uses schema cache and calling two different operations from suds Client (wsdl) makes it do not find proper data schema.
[1] - http://ws.correios.com.br/calculador/CalcPrecoPrazo.asmx?op=CalcPrazo
[2] - https://travis-ci.org/olist/correios/jobs/257902922

LGTM

:+1:


ci-e2e: Set up node local DNS in conformance-e2e

This PR introduces node local DNS with LRP in conformance-e2e following the LRP document.
https://docs.cilium.io/en/stable/network/kubernetes/local-redirect-policy/#node-local-dns-cache

/test

/test

/test

/test

/test

/test

/test

/test

/test

@learnitall local-redirect-policy-with-node-dns test checks if the node local DNS with LRP using the manifests in examples/kubernetes-local-redirect is working as expected. (described here) So CI should fail If someone changes the manifests in the examples/kubernetes-local-redirect and break it.

Ack, ok that makes sense @ysksuzuki. Thank you for clarifying. I brought it up mainly because it feels like a bit of a "code smell" to have stuff for CI in examples, but that's probably a larger repo structure question that can be dug into at a later time.


Calculate vnodes on daprd instead of the placement service

Description
(Note: Please refer to the issue for the reason behind this PR)
This PR removes the vnodes and their sorted set from the placement table that's disseminated from the placement service to the dapr sidecars, and instead, it calculates them on the dapr sidecars.
It accounts for mismatch of versions in daprd/placement services (older daprd version with placement on 1.13+ and vice versa). In the next Dapr version we should be able to remove these checks and clean up the code.
A few notes that might help during the review:

replicationFactor is an argument received on placement service startup, whose default value is 100.
We pass the replication factor as part of the placement table message to daprd, so we can calculate the vnodes there
We attach the api level of the daprd as metadata to the stream connection. The placement service will look at this data and decide if it needs to send the vnodes based on it (needed for daprd sidecars on older versions). This way we're not relying on the minimum API level of the cluster, but serve data based on what the particular sidecar needs.
We still need to keep the vnodes in state on the placement side because of backwards compatibility.

Issue reference
https://github.com/dapr/dapr/issues/7360
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[X] Code compiles correctly
[X] Created/updated tests
[x] Unit tests passing
[x] End-to-end tests passing

N/A

[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

I added caching for the virtual hosts. I'll be adding a few more tests today and also I'll fix the Test_Integration/placement/apilevel/noMax/run test that seems I've broken.


How to remove Google map api key form AndroidManifest.xml

Summary
Our PenTesting team asked to remove Google map api key form AndroidManifest.xml file after they extract the apk from jadx - https://github.com/skylot/jadx tool, because they can see our map api key after extract the apk form that tool. We looked into removing the maps API key from the source code and the package that we use to integrate google maps require the key to be located in AndroidManifest.xml.
We tried storing the key in gradle.properties file and pass it to manifest file via a variable as mentioned by Google however when the app is getting built, the key is getting added back into the manifest file.
Do you have a way that you suggest to keep the key out of the source code when it's required to be within manifest file for the maps features to work? We Have already  restrict our Google map api key in Google Cloud Console.
Reproducible sample code
<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="${GOOGLE_MAPS_API_KEY}"/>
      <meta-data

Steps to reproduce
We tried storing the key in gradle.properties file and pass it to manifest file via a variable as mentioned by Google however when the app is getting built, the key is getting added back into the manifest file.
Expected result
When the app is getting built, the key is getting added back into the manifest file.
Actual result
Need to remove or hide api key form AndroidManifest.xml.
React Native Maps Version
^1.3.2
What platforms are you seeing the problem on?
Android
React Native Version
0.69.7
What version of Expo are you using?
Not using Expo
Device(s)
Samsung Galaxy S20+ 5G
Additional information
Our PenTesting team asked to remove Google map api key form AndroidManifest.xml file after they extract the apk from jadx - https://github.com/skylot/jadx tool, because they can see our map api key after extract the apk form that tool. We looked into removing the maps API key from the source code and the package that we use to integrate google maps require the key to be located in AndroidManifest.xml.
We tried storing the key in gradle.properties file and pass it to manifest file via a variable as mentioned by Google however when the app is getting built, the key is getting added back into the manifest file.
Do you have a way that you suggest to keep the key out of the source code when it's required to be within manifest file for the maps features to work? We Have already  restrict our Google map api key in Google Cloud Console.

if anyone have this issues this will help https://stackoverflow.com/questions/76990128/remove-google-map-api-key-form-androidmanifest-xml-when-using-react-native-maps/76990177#76990177


macOS terminal defaults to kitty.app

It seems like the terminal installation detection is broken on macOS, so it will always set the first one in the list, which is kitty.app.
For now this can be fixed going to Settings -> Terminal -> Set the terminal emulator you want to use, but ideally that should be set up correctly automatically.

This is now fixed in 9.4.1


Improve for anki clozes

I have some cards that include more complex clozes. E.g.
id:<PHONE_NUMBER>359
enabled: true
cloze: true
---
## What Are the Essential Mechanism of a Programming Language to instruct computers and express computational ideas about functions & data?

To instruct the computer and express computational ideas we need a language with *means to combine simple ideas to form more complex ideas*. Every powerful language has three such mechanisms:
	- {{c1::**primitive expressions and statements**}}, which represent the simplest building blocks that the language provides,
	- {{c1::**means of combination**}}, by which compound elements are built from simpler ones, and
	- {{c2::**means of abstraction**}}, by which compound elements can be named and manipulated as units.

Currently the anki code block is by default a basic card when no == or ~~ is included, cards using the native anki cloze syntax from above do not render the clozes in anki.
I suggest changing the behavior that if in the header cloze: true then independent of if i included a cloze the card in anki is of type cloze instead of basic.
Alternatives are:

that we would also check for the anki native {{c{number}:: syntax.  That is more effort. The advantage is that we prevent creating cloze cards that don't have a cloze in anki. Anki doesn't display such cards

That's a good idea! This is something I would definitely be up for implementing in a future release.


Calling memcpy with invalid pointer

Hi,
In c autogenerated code (with BasicCodec), in case that read binary fails (and change the m_status to failure), the auto generated calls memcpy with length 0 and valid dst pointer, but with unknown src pointer (no one defined $info.dataTemp). According c spec this may lead to undefined behavior.
https://github.com/EmbeddedRPC/erpc/blob/21a396ed9ad3cfd5597ac75bb905d68f0d4eb7ad/erpcgen/src/templates/c_coders.template#L35-L56
Optional solutions will to have version of erpc_malloc that gets codec and returns NULL if the status is not OK (that skips the memcpy), or not do the malloc + memcpy at all if status is not success

Hi @amgross , do you think this will fix it for you? https://github.com/EmbeddedRPC/erpc/pull/72

Likely not. I will look on it if it is an issue. Thank you for your feedback.

Thank you

Hi @amgross , i agree with you. I will propose solution soon.

Hi @amgross , just to be sure i did this change #253 . But based on talk here: https://stackoverflow.com/questions/3751797/can-i-call-memcpy-and-memmove-with-number-of-bytes-set-to-zero
it looks like length 0 should be ok.
Do you agree with changes or you would like to improve that?

Hi @Hadatko , I disagree that 'NULL should be valid ptr value'.
You can see first answer at https://stackoverflow.com/questions/5243012/is-it-guaranteed-to-be-safe-to-perform-memcpy0-0-0 that claims that 'results in undefined behavior, because null pointers are considered "invalid values."'.
Same you can see in one of the comments in the question you referred,  https://stackoverflow.com/questions/3751797/can-i-call-memcpy-and-memmove-with-number-of-bytes-set-to-zero#comment34300578_3751937, claiming that 'You're correct that you can't pass null pointers'

However you can probably put there the m_cursor.get(). It will return valid pointer (that won't be used)

I did it based on: Answers. In general, the only valid pointer values are NULL, and pointers to the beginning, inside, and right after, an existing object. Also note that NULL does not necessarily have to be represented as a bit-pattern with zero:s. On some architectures, -1 is a legal pointer value.
But if function is telling that it is not handled then i will rather id it lenght condition.

@amgross What about to use memmove: https://www.tutorialspoint.com/c_standard_library/c_function_memmove.htm


Add support for the zh-CN locale

I would like to help with Zh-CN locale.
If necessary, give me a email.

I'm certainly happy for more locales to be added. Most of the app is localizable, so it's just a matter of translating those strings, I would think. There is a problem in that the logic for parsing the input strings, where you type, for example, "5 minutes 30 seconds" is quite complicated (and the code is a mess). That code would be difficult to localize properly (though perhaps localizing a subset is a possibility?).

I believe it won't be an issue.
Simply change corresponding code as the locales change.
As you say,

localizing a subset is a possibility


Remove ~search user.

This account was created for this report: https://hackerone.com/reports/128121
Link to search page: https://gratipay.com/search
Link to search user: https://gratipay.com/search/

Done. In the future I would rename them instead of remove.
gratipay::MAROON=> select username from participants where username='search';
┌──────────┐
│ username │
├──────────┤
│ search   │
└──────────┘
(1 row)

gratipay::MAROON=> delete from participants where username='search';
ERROR:  update or delete on table "participants" violates foreign key constraint "elsewhere_participant_fkey" on table "elsewhere"
DETAIL:  Key (username)=(search) is still referenced from table "elsewhere".
gratipay::MAROON=> delete from elsewhere where participant ='search';
DELETE 1
gratipay::MAROON=> delete from participants where username='search';
ERROR:  update or delete on table "participants" violates foreign key constraint "statements_participant_fkey" on table "statements"
DETAIL:  Key (id)=(479322) is still referenced from table "statements".
gratipay::MAROON=> select id, username from participants where username='search';                             ┌────────┬──────────┐
│   id   │ username │
├────────┼──────────┤
│ 479322 │ search   │
└────────┴──────────┘
(1 row)

gratipay::MAROON=> delete from statements where
content       lang          participant   search_conf   search_vector
gratipay::MAROON=> delete from statements where participant =479322;
DELETE 1
gratipay::MAROON=> delete from participants where username='search';
DELETE 1
gratipay::MAROON=>


VSCode extension doesn't work with non-html files on filesystem

UnoCSS version
0.57.6
Describe the bug
Hi all,
VS-Code autocomplete does not work unless file-association is set to 'html'.
There have been a few similar reports, (#2974, Discord#unocss) and the issue still persists, so I just wanted to reopen this.
Thanks,
Flemming
Reproduction
Install extension v0.57.6 from vs code marketplace.
Set up to use filesystem (I think it needs the pipeline  section as well) with the following config-elements:
  cli: {
    entry: {
      patterns: ['./*.hbs', './partials/**/*.hbs'],
      outFile: 'assets/generated/uno.css',
    },
  },
  content: {
    pipeline: {
      include: ['./*.hbs', './partials/**/*.hbs'],
    },
    filesystem: ['./*.hbs', './partials/**/*.hbs']
  },

System Info
VS code:
Version: 1.84.2
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:50:47.800Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 6.5.6-200.fc38.x86_64

Validations

[X] Read the Contributing Guidelines.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Can also validate that this patch works:
diff --git a/packages/vscode/src/autocomplete.ts b/packages/vscode/src/autocomplete.ts
index 5f704f47..abbe2dac 100644
--- a/packages/vscode/src/autocomplete.ts
+++ b/packages/vscode/src/autocomplete.ts
@@ -32,6 +32,7 @@ const defaultLanguageIds = [
   'stylus',
   'astro',
   'rust',
+  'handlebars'
 ]
 const delimiters = ['-', ':', ' ', '"', '\'']

But I assume it should be a dynamic solution.
For those that want it working in the meantime, clone unocss, add language-id, pnpm build it, and Ctrl+Sift+p "Developer: Install Extension from Location..."

Seems the problem is the rollupFilter called from here:
https://github.com/unocss/unocss/blob/6aa1578976c902b315dd500a533a088456de67d8/packages/vscode/src/autocomplete.ts#L116-L117
This sets up a filter:
https://github.com/unocss/unocss/blob/6aa1578976c902b315dd500a533a088456de67d8/packages/shared-integration/src/context.ts#L42-L47
Which fails for the config.content.pipeline-minmatch, in my case ['./*.hbs', './partials/**/*.hbs'].

I think I might have found the root of the problem:
Basically the cwd of the vs-code extension is wherever you start vs-code, be it flatpak or a container.
So if I start vs-code from the root of my project, both syntax-hl and code-completion kicks in.

I still got the issue.
I hasn't been able to enable UnoCSS for *.ts but it works as soon as change file name to *.tsx


wgo doesn't shutdown when using templ --cmd

I'm trying to use templ to restart on templ file changes with the additional --cmd flag to run wgo in order to watch go files:

templ generate --watch --proxy="http://localhost:8000" --cmd="wgo run main.go"

However, when templ restarts, the wgo cmd seems to not shutdown correctly, producing the error: listen tcp :8000: bind: address already in use as opposed to the same example using simply go:

Using go run main.go a new executable is generated:

Using wgo run main.go seems to keep the previous executable despite the wgo process being dead:

OS: WSL2 Ubuntu 22.04
I don't know if this behaviour is intended or not. Let me know if you need more info!

Do you have some sample code I could try with? As well as which files to change to trigger the error, etc

I suspect I know the reason -- templ is using SIGKILL to kill its child processes, which doesn't give them a chance to clean up and causes to wgo die immediately, leaving its own children behind. But I need to replicate the problem first and then test if changing from SIGKILL to SIGTERM works.
Ordinarily this won't be a problem, because templ sets a new process group ID for its descendants and kills them by their process group ID. But wgo pulls the same trick and also assigns its descendants a new process group ID. This means that wgo and wgo's descendants share different process group IDs, and templ killing its children by process group ID means only wgo gets killed, not wgo's descendants (they don't have the same process group ID). The correct way would be to kill wgo with SIGTERM so that wgo can intercept the SIGTERM and kill its own children (SIGKILL is too aggressive and can't be intercepted).

Do you have some sample code I could try with? As well as which files to change to trigger the error, etc

main.go
package main

import (
	"log"
	"net/http"
)

func main() {
	log.Print("Listening on port 8080")
	log.Fatal(http.ListenAndServe(":8080", nil))
}

file.templ
package main

templ test(name1 string) {

{ name1 }

}

command: templ generate --watch --cmd "wgo run main.go"
Steps to reproduce:

Create main.go and file.templ files.
Run the command above
Make a change to the file.templ file e.g., change the variable name

The correct way would be to kill wgo with SIGTERM so that wgo can intercept the SIGTERM and kill its own children (SIGKILL is too aggressive and can't be intercepted).

Hmm, interesting. So what is your suspicion for the correct behaviour when using the go command instead?

Hmm, interesting. So what is your suspicion for the correct behaviour when using the go command instead?

Because the go command doesn't allocate a new process group ID for its children (so its children inherit the go command's process group ID). Killing that process group ID kills everything cleanly. In contrast, wgo does allocate a new process group ID for its children by nature of it being a supervisor process i.e. it has to be able to kill other process groups without being killed itself, so it possesses a separate process group ID from its children. Killing wgo's process group ID will not kill its children.
Here is an example program that spawns a child process.
main.go
package main

import (
    "os/exec"
    "log"
)

func main() {
    cmd := exec.Command("/bin/sh", "-c", "sleep 3600")
    log.Println("sleeping...")
    err := cmd.Run()
    if err != nil {
        log.Fatal(err)
    }
}

go run with SIGKILL (clean exit):
$ go run main.go
2024/04/16 19:50:39 sleeping...
# Press CTRL+Z to put the process into the background.

# Press CTRL+Z to put the process into the background.

# Press CTRL+Z to put the process into the background.

Thank you for the explanation!
So I supposed the way forward is to make a PR on the temple repo?

Yup, you can do that

You're using 2 different tools to do the same thing. Don't use --watch on templ generate to run wgo, use wgo to run templ generate
https://templ.guide/commands-and-tools/hot-reload#alternative-1-wgo

You're using 2 different tools to do the same thing. Don't use --watch on templ generate to run wgo, use wgo to run templ generate
https://templ.guide/commands-and-tools/hot-reload#alternative-1-wgo

That doesn't do the same thing though. Correct me if I'm wrong but I believe that way templ generate would run every time a go file changed, and not only a templ file. And it doesn't have the proxy benefit nor the txt fast recompilation benefit of the templ --watch command.
This working setup allows me to get all the benefits above:

templ generate --watch --proxy="http://localhost:8000"& wgo run .

Closed due to https://github.com/a-h/templ/pull/687 being merged!


[tool_crash] FileSystemException: Cannot create link, OS Error: Incorrect function., errno =

Hi @ErDeepChand,  please check if this issue looks similar to yours https://github.com/flutter/flutter/issues/66224.
When opening an issue, please try to provide all or some of the information requested in the issue template.

Issue Template
If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
- https://flutter.dev/
- https://api.flutter.dev/
- https://stackoverflow.com/questions/tagged/flutter?sort=frequent

If you have found a bug or if our documentation doesn't have an answer
to what you're looking for, then fill our the template below. Please read
our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports

Steps to Reproduce

Please tell us exactly how to reproduce the problem you are running into.

Please attach a small application (ideally just one main.dart file) that
reproduces the problem. You could use https://gist.github.com/ for this.

If the problem is with your application's rendering, then please attach
a screenshot and explain what the problem is.

1. ...
2. ...
3. ...

Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows)
Which target OS version, for Web, browser, is the test system running?
Does the problem occur on emulator/simulator as well as on physical devices?

Target Platform:
Target OS version/browser:
Devices:

Run your application with `flutter run --verbose` and attach all the
log output below between the lines with the backticks. If there is an
exception, please see if the error message includes enough information
to explain how to solve the issue.

Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.

Finally, paste the output of running `flutter doctor -v` here.

Closing this issue, since no information has been provided. In case you have any further info for us please update the issue description with the requested details in the issue template and leave a comment on this issue and we will reopen it right away.
Thank you.


Increase maximum columns and rows.

On large displays it is possible to set cols >= 1000. That value doesn't fit allocated char arrays and app crashes.
columns and rows now 5 char buffers and also added limits to max 9999.

I didn't think that could happen. Thank you for the fix!

And this PR is the signal to create a new release, with tag v3.0.2.


Player moving diagonally

Need to debug the character movement

So true bestie!


Removed trival warnings

Removed some warnings from the files

@jdduke , thanks for pointing this out, i updated the code as per the review comments, kindly check and approve.
Regards
Amit

@jdduke , i have updated the code as per comments, kindly check and update.
Regards
Amit

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC) then dues to the implicit conversion with the unsigned int, negative values were becoming positive and hence the test case was passing, not sure this was intentional or oversight, anyway i changed the code as per your suggestion and added the small error check code to ensure sanity.
if (node_index < 0) {
return kTfLiteOk;
}
Hope this is ok, Kindly check and approve.
Regards
Amit

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC) then dues to the implicit conversion with the unsigned int, negative values were becoming positive and hence the test case was passing, not sure this was intentional or oversight, anyway i changed the code as per your suggestion and added the small error check code to ensure sanity.
if (node_index < 0) {
return kTfLiteOk;
}
Hope this is ok, Kindly check and approve.
Regards
Amit

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC)

Interesting, can we expand the test to catch this? Can you tell if this would happen for a legit model/interpreter use-case?

@jdduke this happens when the graph is empty , the TC which is triggering this condition is (ArenaPlannerTest, EmptyGraph)  , which ultimately calls CalculateAllocations which subtracts one from the active node hence causing the problem.
Regards
Amit

@jdduke this happens when the graph is empty , the TC which is triggering this condition is (ArenaPlannerTest, EmptyGraph) , which ultimately calls CalculateAllocations which subtracts one from the active node hence causing the problem.

Can you add a (unit) test for this case?

@jdduke , thanks for the review i have added one case to cover this scenario, kindly check and approve.
Regards
Amit

@jdduke , sorry for the miss,i have updated the code with the comments, explaining why this TC is added and what problem previously was seen. Hope this is ok.
Regards
Amit

@jdduke , yes you are right, sorry for the miss, i have updated the code as per your suggestion.
Kindly check.
Regards
Amit

@jdduke , thanks for approving the PR, can you please help to get this merged.
Regards
Amit

@rthadur is working to land this.

@rthadur is working to land this.

@rthadur any update as to when this can be merged.
Regards
Amit

@rthadur , can you please help to get this merged.
Regards
Amit

Its failing because of internal error .  Here is the error:
[==========] Running 14 tests from 1 test suite. [----------] Global test environment set-up. [----------] 14 tests from ArenaPlannerTest [ RUN      ] ArenaPlannerTest.EmptyGraph [       OK ] ArenaPlannerTest.EmptyGraph (3 ms) [ RUN      ] ArenaPlannerTest.DeallocationOfInputTensor Unhandled exception:     @     0x7feea2d26ce2  GoogleTerminateHandler()     @     0x7feea2814266  __cxxabiv1::__terminate()     @     0x7feea2814293  std::terminate()     @     0x7feea28143cf  __cxa_throw     @     0x7feea2758f60  std::__g::__throw_out_of_range_fmt()     @     0x7feea2e33599  tflite::ArenaPlanner::PlanAllocations()     @     0x7feea47cab82  tflite::(anonymous namespace)::ArenaPlannerTest::SetGraph()     @     0x7feea47cba8d  tflite::(anonymous namespace)::ArenaPlannerTest_DeallocationOfInputTensor_Test::TestBody()     @     0x7feea35f960a  testing::Test::Run()     @     0x7feea35fa973  testing::TestInfo::Run()     @     0x7feea35fb50b  testing::TestSuite::Run()     @     0x7feea360ba77  testing::internal::UnitTestImpl::RunAllTests()     @     0x7feea360b446  testing::UnitTest::Run()     @     0x7feea47c9701  main     @     0x7feea23aabbd  __libc_start_main     @     0x55574cb9e4c9  ../sysdeps/x86_64/start.S:108 _start terminate called after throwing an instance of 'std::__g::out_of_range'

@rthadur , i have fixed the problem.
@jdduke , i know this is old PR, can you please re approve.
Regards
Amit

Changes are merged internally , waiting for auto merge to happen.


How to update k3s version ?

Hi
I see you are using the CLI in the .sh to install K3s? Isn't there a TF provider to do this ? What about the RKE provider maybe, and how to you upgrade the version of K3s now via Terraform if this is running a shell install.
curl -sfL https://get.k3s.io
``

Hi @mikekuzak,
This repository is not really intended for production usage, but more as an illustration of how it can be done.
I didn't know there is an RKE provider, but I will definitely have a look at it.


[release-v0.44.x] Fix v1beta1 pipelineref bundle conversion to resolver

This commit fixes the bundle conversion for PipelineRef which should be converting to the bundle Resolver with a Pipeline kind. It also adds the conversion integration tests for the bundle logics to prevent such error. It extracts the setup for bundle and makes it into a helper function.

Changes
This is a cherry-pick of https://github.com/tektoncd/pipeline/pull/6791
This commit fixes the bundle conversion for PipelineRef which should be converting to the bundle Resolver with a Pipeline kind. It also adds the conversion integration tests for the bundle logics to prevent such error. It extracts the setup for bundle and makes it into a helper function.
/kind bug

Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[n/a] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[x] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
[n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
bug fix: bundle resolver type param value for pipelineRef conversion

/retest
/approve
/lgtm

/retest

    conversion_test.go:1290: -want, +got:   &v1.TaskRun{
          }
    conversion_test.go:1298: -want, +got:   &v1beta1.TaskRun{
          }

This is a weird error on the alpha e2e tests..

/retest
One last re-test to see if it's a flaky or not 🤔

/retest
One last re-test to see if it's a flaky or not 🤔

This happened because the cmpopts.ignoreFields for release note annotations could only work if there is an annotations: {} apparent in the yaml. It didn't fail for me at local previously though 🤔  which had been weird.

/lgtm

curious why there are two commits here? it looks like this PR is just meant to be a cherry-pick of the first commit; curious why the changes in the second commit are needed?

sorry was in the middle of squashing them. didn't manage to push the squash PR yet since last Friday I was stuck with some weird failure with deploying the v0.44.x branch (all fixed now though).
And the changes made in 2nd commit happened because we didn't have provenance for feature flags in place at that time.


Paper details page should list the authors

Scenario
Given a paper with an author
When a user visits the paper's show page
Then it should show the author's full name
Error

Expected to find text "alan turing" in "title: computing machinery and intelligence\nvenue: mind 49: 433-460\nyear: 1950\nedit this paper | back to papers\ndestroy this paper"

39 exercise tests have passed. There are 44 in total. You will solve multiple at once towards the end.

Sorry, it's not working for me yet:
Scenario
Given a paper with an author
When a user visits the paper's show page
Then it should show the author's full name
Error

Expected to find text "alan turing" in "authors: #author:0x00007f203d0c6d68\ntitle: computing machinery and intelligence\nvenue: mind 49: 433-460\nyear: 1950\nedit this paper | back to papers\ndestroy this paper"

If you have problems solving this task, please don't hesitate to contact the teaching team!


[WIP] Fix unable to filter object correctly in case the object value field of type int64

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:

NONE

/todo skip

Keep up your great work!
/lgtm

Cool🚀
/approve


Get AllyUser using social access_token

My case:
The client is mobile app (android, ios) using facebook sdk and firebase sdk to login and get access_token from facebook and google then post to adonis server to verify login
Can add support adonis-ally to get ally user by using existing access_token?
const socialToken = request.input('social_token')
const facebook = ally.driver('facebook')

const allyUser = await facebook.getUserByToken(socialToken)

const user = await User.findOrCreate({ social_id: allyUser.id, social_type: 'facebook' })
const token= await auth.loginVia(user)
response.json({
  token,
  user: user.toJSON()
})

I believe Ally main job is build the Login with <service> flow and not to validate accessTokens obtained from somewhere else.
So ideally, you can build a simple auth layer, which makes an API call to Facebook or whatever service and then find if the token is still valid.

Yes the main job of Ally is Login with service.
When used adonis v3 I do the both of things:

install Ally to login on the website
built the auth layer as you said and the code has many lines similar Ally
so if you think the validate token function is out of scope I'll make 3rd package :)

So my concern is not mainly whether we can abstract this in a different function or not. I will do that for sure.
But the main concern is, validating an access Token, obtained from somewhere else may require more checks to make sure it's validated.
One thing can be a way to define some fields to be returned of a user for a given token.
See fields section https://developers.facebook.com/docs/graph-api/reference/user
In short
Moving it away from Ally can give you more flexibility
Changes
I will make changes, where you can pass the access token and get the user, but again if you need more flexibility, then ally is not the right choice for that

Yes I know, if I need more infomation from facebook as friends list, posts... or something like that. I will need to use facebook sdk
I'm happy with simple validate token if Ally has it. Thank you

@duyluonglc Any updates on this?

Wait for @thetulage update the code or you can try my forked repo :)

Dude, why is this not merged yet?? That's the most useful feature of Ally and you are not merging his PR?
I'm gonna have to fork @duyluonglc 's repo, cause that's all I need from Ally.
BTW, mobile API logins use AccessToken only. The native app requests the accessToken using the native SDK, and then passes that accessToken to the BE to validate the real user. No redirects. Simple.

Dude, PR's are not merged when you want them. I have to look into all the edge cases and that needs time. Please fork his repo and use that

I know, sorry for being aggressive, it's just that I needed this functionality on ally 😬
But I'll manage with the fork. Do you need anything from us? Maybe we can help with including this feature? Let me know

+1 also need this feature...
If possible, when solved please someone respond here also: https://forum.adonisjs.com/t/adonis-ally-and-ios-facebook-login/736
Thank you guys!

Yes, acknowledged in the forum. I will add it

when can we expect this feature?

Yeah, same question all the time. 😀

Closing in favor of the PR.


add support for version selection

Add support for user selected PyApp version when packaging using the -pv or --pyapp-version argument. If not provided, defaults to latest version.
Update docs

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.93%. Comparing base (e99b172) to head (1ed0e9a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   98.90%   98.93%   +0.02%
==========================================
  Files          19       19
  Lines        1189     1221      +32
==========================================
+ Hits         1176     1208      +32
  Misses         13       13

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


TypeError: num2date() got an unexpected keyword argument 'only_use_python_datetimes'

While running the example code from https://pvlib-python.readthedocs.io/en/stable/forecasts.html
I got TypeError: num2date() got an unexpected keyword argument 'only_use_python_datetimes'.
In reference to previous bugs (https://github.com/pvlib/pvlib-python/blob/709daa6f8feddb50ae50b1da13f5f720d8ebb78f/pvlib/forecast.py#L409), where the reason could be for python version 3.5 or less, I confirmed my python version was 3.7.3 and still having this TypeError issue.

Does updating to a newer version of cftime fix the issue?  See https://groups.google.com/g/pvlib-python/c/d4NDtQwj_L8/m/H1Lvt4XHBAAJ


Problem about rendering markdown tables inside HTML tags

The problem David J mentions that markdown tables do not render in HAI artifact is caused by a renderer failure on markdown tables inside html tags. Here is an image to the source code that causes the failure:
 And here is an image to the showdownJS official demo website to show the origin of the problem:

However, the markdown table does get rendered after html tags are removed. As shown in this picture:

ShowdownJS by default does not support markdown inside html tags unless the creator of markdown specifies a html attribute markdown=1 inside a html tag e.g. <sometag markdown="1"></sometag>. However, the solution is impossible in our use cases. We might need to look into other markdown renderers; even though that means redoing all XSS tests on another renderer.
I've tested markdown-it and it works perfectly with markdown tables inside html tags (XSS tests not done yet).

However, I think a discussion might still be needed in case if there is some other edge cases that markdown-it might fail.... what do you think? @lauratinnel @dpemmerich @carboxylman

markdown-it seems good to me!  I don't know any other use cases beyond these we've encountered.

This is the proof of concept for markdown-it: https://stackblitz.com/edit/nuxt-starter-eqm5kg?file=pages%2Findex.vue,nuxt.config.js,package.json. It solves the problems we encounter

I merged #176, and tested that it works for this particular artifact -- so closing this issue.


⚠ Carbubu has degraded performance

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

HTTP code: 200
Response time: 8416 ms

Resolved: Carbubu performance has improved in 222cb67.


Status Screen still not properly managing activity status.  Often showing idle machines over running machines.

clarity note :  by "over" we mean "instead of" or "as higher priority"


Save as SVG and HTML

Create the possibility of users to download the mindmap as HTML and SVG.

PR #16 adds support for HTML download ("Download interactive HTML").


HTML5 validation error placement Error

I am unable to place the HTML5 validation message on exact position on my select tag

"required" validation message is not coming at right position.

Duplicate of #514.


Firmaciv encountered an error during the sided_setup phase

Keep getting a crash by that name. Here's the crash report:
crash-2024-03-04_22.27.25-fml.txt
The crash is infrequent (probably around 1/4 - 1/3 of the times I launch Minecraft) so it can usually be fixed by closing and relaunching it.

I'll look into this, I haven't seen it... can you help me out by doing a binary search test with that modlist? It might be a conflict with one of those mods.

I’ll try, though the crash happens inconsistently enough that I don’t know how reliable a negative will be.
I also have a bunch of other stuff I’m supposed to be doing this week but I’ll do what I can

Okay, I'll keep this in the issue tracker and get to it when I can.

Thanks!
Also, I'm pretty sure it's the 1.20 Musket Mod. I got an error that seems to be the exact same, except that the mod name and some numbers (memory addresses?) are different. Here's that log file if you're interested (though I'll put this on their issue tracker too).
crash1.txt

Nevermind, that's the 1.18 version of the mod. The 1.20 version appears to be closed-source.


PowerShellGet 2.1.4: Credential Providers | Authentication is STILL BROKEN

I don't know why PowerShell/PowerShellGetv2#133 was closed when this is still so COMPLETELY BROKEN
We cannot work with repositories that require credentials unless we ...
... pass credentials
... with every,
... single
... call.
That's not how any of this is supposed to work.
For example, following the docs for the Azure Artifacts CredProvider, and the blog post from earlier this month we should be able to install the credential provider:
iwr https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1 -out ~\Downloads\installcredprovider.ps1
~\Downloads\installcredprovider.ps1 -AddNetfx

Set something like this:
$ENV:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = @'
{
   "endpointCredentials": [{
      "endpoint":"https://poshcode.pkgs.visualstudio.com/_packaging/PowerShell/nuget/v2",
      "username":"Jaykul",
      "password":"thisshouldbeareaallylongpattokenstringyougetfromtheweb"
   }]}
'@

Register the feed:
Register-PSRepository -Name Test -Source https://poshcode.pkgs.visualstudio.com/_packaging/PowerShell/nuget/v2

And get a list of modules:
Find-Module * -Repository Test

But what actually happens is that with no error I get no results.
But if I try it with nuget:
nuget sources add -Name Test -Source https://poshcode.pkgs.visualstudio.com/_packaging/PowerShell/nuget/v2

nuget list -source Test

It works fine, and I get a list of modules...
YOU'RE DOING IT WRONG
The problem is that PowerShellGet isn't looking up the credentials against the feed address.
Instead, it's looking up (or rather, relying on nuget to) the credentials against the final url with all the parameters in it. So we can make the Find-Module command work if we change the stored endpoint to this:
$ENV:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = @'
{
   "endpointCredentials": [{
      "endpoint":"https://poshcode.pkgs.visualstudio.com/_packaging/PowerShell/nuget/v2/FindPackagesById()?id='*'&$skip={0}&$top={1}",
      "username":"Jaykul",
      "password":"thisshouldbeareaallylongpattokenstringyougetfromtheweb"
   }]}
'@

And then re-run:
Find-Module * -Repository Test

But this is because I've hard-coded the token to a particular search.
Of course the result is that when we don't use the environment variable (i.e. Remove-Item ENV:VSS_NUGET_EXTERNAL_FEED_ENDPOINTS) and do a Find-Module we get a "devicelogin" from the credential provider, but the credentials are cached for that specific URL, so if we Find-Module for any other specific module, or try anything else (like Install-Module), they will fail to find the cached credentials, and require going through the "devicelogin" again...
The worst part is that each time we go through the device login, you're creating a new PAT token that you'll never re-use...
Please, fix it again.

Seem to have hit this today. I can't find anyway to enable command line auth. I've created a PAT and whatever route I do, Environment variable, credential in PSreposirtory, credential in ALL module calls, I get prompted for the devicelogin flow.
I swear this was working yesterday, so wondering what has changed.

If you get this warning, don't even bother signing in.

Fwiw, we've resolved our publishing problems by using the PSPublishHelper module to package it, and then pushing the package with the nuget client.

Seeing the same behavior Unknown option: -V as @molinch, also on Linux (Ubuntu 18.04)

Powershell 7.0.3
PowershellGet <IP_ADDRESS>
PackageManagement 1.4.7
.Net Core 3.1 (dotnet 3.1.401)

Repeatable when spinning up a linux container with VSS_NUGET_EXTERNAL_FEED_ENDPOINTS env set and the wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash credential provider installed following instructions from @SydneyhSmith 's post last year.
Credentials must be provided for every command (Register... Install-Module...) and the Unknown option: -V is "thrown" although appears non-blocking as modules are installed.

When trying PowershellGet 3.0 beta8, I also had to provided a Credential for Install-PSResource. In addition, there are case-sensitivity issues on Linux as of the beta8 prerelease.
https://github.com/PowerShell/PowerShellGet/issues/218


Transfer context between preprocess and postprocess

I need to transfer some infos from preprocess to postprocess.
For example if I pass an image to preprocess and I vectorize it and then I do a prediction at that image but at postprocess I need to create another image with same size but painting it base on prediction. For this I need some inputs like image size, shape, etc from preprocessing part.
Other example is that maybe in preprocess I pass a 3D image and in postprocess maybe I want to return a 2D image and for this I need again some infos from preprocess.
How I can pass now infos between preprocess and postprocess?
I  think this is not possible now but looking in code here: https://github.com/kubeflow/kfserving/blob/master/python/kfserving/kfserving/handlers/http.py#L48 I can see this
request = model.preprocess(body) request = self.validate(request) response = model.predict(request) response = model.postprocess(response)
so there we can have one variable for transporting data from preprocess to postprocess something like this:
transport, request = model.preprocess(body) request = self.validate(request) response = model.predict(request) response = model.postprocess(transport, response)
Any better idea how we can safe transport things from preprocess to postprocess?

Interesting case. I think you should already extends KFModel(say ExtendedModel) to have your own preprocess and postprocess right? Do you mind to have member variables in your ExtendedModel? So that you can set the value of the member variable in your preprocess function and use it directly in your postprocess function.

I found a way to pass additional informations between preprocess and postprocess. Starting from this example :https://github.com/kubeflow/kfserving/blob/master/docs/samples/transformer/image_transformer/image_transformer/image_transformer.py#L41 I added in that class also predict method and ovverride original one like this:
def predict(self, request: Dict) -> Dict:
    response = super().predict(request)
    additional_info = request['additional_info']
    response['additional_info'] = additional_info
    return response

As you can see there the idea was to intercept predict response and add on it also my additional infos passed from preprocess. Like this we don't need to do any change on kfserving :)

This didn't work for me. super().predict(request) is not executing GRPC prediction.
Basically, I want to send some data passed to preprocess function to postprocess along with the predictions. Can someone help?


Fix wrong callback call in requestCredential

The function callback does not exist in the function requestCredential in the file apple_client.js. I think that callback has to be credentialRequestCompleteCallback.
This results in a thrown error (ReferenceError: Can't find variable: callback). The consequence is that my UI is not working as expected when a user clicks on "Login with Apple" and cancels the appearing native popup.
Replication

You have to use this package (correctly configured with functioning login button) in a Meteor project with Cordova.
Install the Cordova App on an actual Apple device.
Use the Apple login button.
Press "Cancel" on the appearing native popup.
An error regarding the non existing callback is thrown.

Just to visualize the "native popup" and the cancel button.

Yes I'm seeing this also - can we get it patched please?

It does happen only when canceling right? I will release a new version. Thanks for this!

Yes, only then @renanccastro, I hope the Apple reviewers dont try it 😆
Thanks for making it happen

@renanccastro when do you expect this to hit atmosphere?

It's published @georgiosd

Thank you, happy holidays!
On Wed, Dec 23, 2020 at 10:37 PM, Renan Castro <<EMAIL_ADDRESS>> wrote:

It's published @ georgiosd ( https://github.com/georgiosd )
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (
https://github.com/quavedev/apple-oauth/pull/9#issuecomment-750464363 ) ,
or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AAMYG5QB3Q7N6QIMMPIUUMLSWJIJFANCNFSM4UVIITLA
).


Beam State lost after changing theme with a provider

I could just be doing this wrong, but I can't get it to keep what page it is on when the theme is changed when using Beamer. I tried using Navigator 1.0 in case it was Riverpod, but it worked with that.
repo
Intended behavior: Switching dark mode should stay on the same page.
Actual: It goes back to the home page.

@getBoolean Try extracting your BeamerRouterDelegate into a final variable in MyApp

Thanks! One small change I had to make was this to fix the button's state not changing
darkModeEnabled = useProvider(appThemeStateNotifier);
instead of context.read

Wait nvm using useProvider makes it lose its beam state

And provider is also rebuilding the entire app (to change the theme) so this common issue arises: https://github.com/slovnicki/beamer/issues/193


How to reduce height of the iframe.

I have multiple iframes that I'm rendering on a page, the iframe-resizer works as expected the only issue is the height calculated for the iframes are way bigger than the contents in the iframes, any idea on how I can reduce that height I already tried all the options for heightCalculationMethod but none of them seems to work, any help will be much appreciated thanks.

Thanks to this comment I was able to fix the problem.


Missing link in README.md

https://github.com/spring-projects/spring-graphql/blob/main/samples/webmvc-http/README.md
The linked sample code for "Querydsl DataFetcher's making JPA queries" has attracted myx interest - but it is missing :(
https://github.com/spring-projects/spring-graphql/blob/main/samples/webmvc-http/src/main/java/io/spring/sample/graphql/repository/ArtifactRepositoryDataWiring.java

In M2, the registration of Querydsl repositories is automated, see #93. After those changes it is no longer necessary to wire them explicitly. The README should point to ArtifactRepositories in the same directory instead.

Also link to "Datafetcher's" in  "Spring HATEOAS DataFetcher's that call spring.io REST API." has wrong link (404)

Thanks @hump, this is following the introduction of annotated controllers. Also fixed.


:sparkles: add navigation and fix styling in details page

Fixes some UI issues. Basically completes the web build. Awaiting backend connections. @leehonel @charleskirash , waiting for your API.

I'll setup ngrok and avail the link to you @kibuikaCodes

Fantastic. But wait first, Winfred and I are working on the app.
On Sat, 30 Oct 2021, 19:48 leon Okeda, @.***> wrote:

I'll setup ngrok and avail the link to you @kibuikaCodes
https://github.com/kibuikaCodes
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tuk-scit/scit-fe-web-alerting-module/pull/12#issuecomment-955462605,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHQMLPIEM3NHASXNUZ3G2TDUJQOUNANCNFSM5HBDDMFQ
.

Approve this PR @leehonel @winniekagz @charleskirash @MitchelleChepkemoi
@winniekagz I have added the method to push the selected details to local storage. check out my code. Everything should be pretty straightforward. Please do not convert the components to class components.


Allow users to change the push-to-talk button

Please consider adding a configuration feature to allow a user to change the push-to-talk button to something else. Most users use the right mouse and the controller trigger for lots of other things.

Yes, actually, I can let users choose any button for that, will integrate this into the next version.
There will be two configurations, one for Desktop and one for VR.
On the first version, I didn't realize people user their desktop often and didn't include support for the keyboard.
Also, it would be interesting to map other functionnalities to the keyboard buttons.


style not loading in production

Style isnt loading in production with the default config.

Closing until more details are provided.


refactor(utils): use build-md for markdown formatting

I've published a library called build-md for dynamically rendering Markdown documents :rocket:
I refactored our Markdown rendering logic to use this library. The advantage is our logic now focuses on document semantics, and is no longer concerned with Markdown formatting rules (like where to add separator lines and what to indent). The library's Markdown output is better formatted (fewer Markdown lint violations) - HTML is only used when necessary (context-sensitive rendering), there are no extra or missing separator lines, and the table columns are automatically aligned (as if by Prettier).

The reason I want this to be a standalone library is because it's applicable to other projects as well like @code-pushup/eslint-config (migrated in https://github.com/code-pushup/eslint-config/commit/8ac87936b8d004a66d3e88166a5ebd19c69c9240) or zod2md (migration planned).

Can we move the lib into our org?

Can we maybe move the lib into our org?

I built this library in my free time, and it has applications beyong Code PushUp (e.g. zod2md), so I want to keep it under my account.


Controller framework options

This adds two new config properties to API controllers
serialisationBeforeValidation
The first is serialisationBeforeValidation and runs the serialization layer before validation - it is global for a controller.
usage
// core/server/api/v2/admin/things.js
module.exports = {
  docName: 'thing',
  serialisationBeforeValidation: true,
  add: {
    data: ['someProperty'],
    validations: {data: {someProperty: {required: true}}},
    query({data}) {
      doSummin(data.someProperty);
    }
  }
};

But data in the POST request looks like
{
  "things": [{
    "someProperty": "awesome",
    "anotherProperty": "wicked-cool"
  }]
}

So we can write a serializer...
// core/server/api/v2/utils/serializers/input/things.js
module.exports = {
  add(apiConfig, frame) {
    frame.data = frame.data.things[0];
  }
};

To me this makes a lot more sense, as serialization moves data into a "common" format, which makes it a lot easier to validations. For example, if we were to move to a json-data structure like
{
  "data": [{
    "type": "thing",
    "id": 1,
    "attributes": {
      "someProperty": "awesome",
      "anotherProperty": "wicked-cool"
    }
  }]
}

Then we could just write a different serializer (which could probably be shared between most resources, seeing as we use a common format for most things (everything). And all validations that we've written can stay the same.
It is worth noting that none of the global validators will work currently because they receive pre-serialized input.
disableGlobalValidator
Currently if we add any form of validation - we will automatically lose out on the global validation defined in ghost, for example:
module.exports = {
  docName: 'whatever',
  add: {
    data: ['slug'],
    validation: {slug: {required: true}}}
};

This will add the validation of making sure there is a slug property - however it will no longer check if that slug is a slug as defined by ghost.
This addition would change functionality by making that validation run by default.
However it adds the new property if you want the current behaviour (which most of the time you don't)
module.exports = {
  docName: 'whatever',
  add: {
    data: ['slug'],
    validation: {slug: {required: true, disableGlobalValidator: true}}}
};

This now makes it very explicit that we do not want to validate the slug property as if it is a slug.

As discussed with @kirrg001 - She has some changes that alleviate the problems fixed by serialisationBeforeValidation - Will remove that commit :+1:

@kirrg001 I've updated with a test that fails without these changes


Fixed Window type to prevent new permission

Codecov Report

Merging #7 into develop will decrease coverage by 0.78%.
The diff coverage is 0%.

@@              Coverage Diff              @@
##             develop       #7      +/-   ##
=============================================
- Coverage      44.61%   43.83%   -0.79%
  Complexity        54       54
=============================================
  Files              9        9
  Lines            446      454       +8
  Branches          42       42
=============================================
  Hits             199      199
- Misses           247      255       +8

Impacted Files
Coverage Δ
Complexity Δ

.../kaufland/com/snackbarlibrary/SnackbarManager.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...in/java/kaufland/com/snackbarlibrary/Snackbar.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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