Failed to create agent pool with Azure Scale Set

The Azure virtual machine scale set agents guide appears broken.
I've followed the steps twice and I keep getting the same error:

The handler for VM extension type 'Microsoft.VisualStudio.Services.TeamServicesAgentLinux' has reported terminal failure for VM extension 'Microsoft.Azure.DevOps.Pipelines.Agent' with error message: '[ExtensionOperationError] Non-zero exit code: 1, /var/lib/waagent/Microsoft.VisualStudio.Services.TeamServicesAgentLinux-<IP_ADDRESS>/AzureRM.py [stdout] [stderr] Running scope as unit: Microsoft.VisualStudio.Services.TeamServicesAgentLinux_<IP_ADDRESS>_528a8cc3-1e3a-455f-9b8b-a84985423559.scope Failed to execute: No such file or directory '. 'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'

DevOps appears successful at scaling up the VM instances... but the agents never show up:

Found the issue: I was creating the scale set using the Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest image. Using UbuntuLTS made it work.
I suggest documenting this better and making the tool output a better error message.

Found the issue: I was creating the scale set using the Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest image. Using UbuntuLTS made it work.
I suggest documenting this better and making the tool output a better error message.

Same issue on my end when I was using custom image based on Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest

Same issue on my end when I was using custom image based on Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest

@joaomoreno: Could you write the complete offer you are using?

@joaomoreno: Could you write the complete offer you are using?

Hm not sure what the full name is. Just using UbuntuLTS made it work.

Hm not sure what the full name is. Just using UbuntuLTS made it work.

@khauser I was building custom Ubuntu LTS image via this offer.

I encountered this error with Azure DevOps Scale Set Agent.
The handler for VM extension type 'Microsoft.VisualStudio.Services.TeamServicesAgentLinux' has reported terminal failure for VM extension 'Microsoft.Azure.DevOps.Pipelines.Agent' with error message: '[ExtensionOperationError] Non-zero exit code: 1, /var/lib/waagent/Microsoft.VisualStudio.Services.TeamServicesAgentLinux-<IP_ADDRESS>/AzureRM.py [stdout] [stderr] Running scope as unit: Microsoft.VisualStudio.Services.TeamServicesAgentLinux_<IP_ADDRESS>_755a8c88-c937-4541-aec6-34899abc0358.scope Failed to execute: No such file or directory '. 'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'
https://github.com/actions/virtual-environments/blob/main/images/linux/ubuntu2004.json

@khauser I was building custom Ubuntu LTS image via this offer.

I encountered this error with Azure DevOps Scale Set Agent.
The handler for VM extension type 'Microsoft.VisualStudio.Services.TeamServicesAgentLinux' has reported terminal failure for VM extension 'Microsoft.Azure.DevOps.Pipelines.Agent' with error message: '[ExtensionOperationError] Non-zero exit code: 1, /var/lib/waagent/Microsoft.VisualStudio.Services.TeamServicesAgentLinux-<IP_ADDRESS>/AzureRM.py [stdout] [stderr] Running scope as unit: Microsoft.VisualStudio.Services.TeamServicesAgentLinux_<IP_ADDRESS>_755a8c88-c937-4541-aec6-34899abc0358.scope Failed to execute: No such file or directory '. 'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'
https://github.com/actions/virtual-environments/blob/main/images/linux/ubuntu2004.json

@khauser it could be related to the devops agent with python 3 issue. https://github.com/microsoft/azure-pipelines-agent/issues/3156

@khauser it could be related to the devops agent with python 3 issue. https://github.com/microsoft/azure-pipelines-agent/issues/3156

@litan1106 Yeah, you're right. We will try with:
apt-get remove -y python-is-python3
apt-get install -y python-is-python2

@litan1106 Yeah, you're right. We will try with:
apt-get remove -y python-is-python3
apt-get install -y python-is-python2

@khauser yes, but it's not the best when Python 2.7 already end of life.
I hope the Microsoft team updates the Azure Pipeline agent to support python 3. (it's not the best solution to use python 2.7 because it's end of life...)

@khauser yes, but it's not the best when Python 2.7 already end of life.
I hope the Microsoft team updates the Azure Pipeline agent to support python 3. (it's not the best solution to use python 2.7 because it's end of life...)


Clear current search query, filters, and sorts

Before opening an issue:

Search for duplicate or closed issues
Validate and lint any HTML to avoid common problems
Prepare a reduced test case for any bugs
Read the contributing guidelines

When asking general "how to" questions:

Please do not open an issue here
Instead, ask for help on StackOverflow, IRC, or Slack

When reporting a bug, include:

Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
Reduced test cases and potential fixes using JS Bin

When suggesting a feature, include:

As much detail as possible for what we should add and why it's important to Bootstrap
Relevant links to prior art, screenshots, or live demos whenever possible

Unsure if you'll see this, but you've been blocked from this organization.


PhantomJS 2.1.1 not delegating click events from table row to table cell

PhantomJS 2.1.1, Windows 10, binary downloaded from website. Initialized with following built-in webdriver with --webdriver switch on port 8090.

Prepare simple HTML page:

<!DOCTYPE html>

    <title>Test Page</title>

        Test1
        Test2

Pay attention to event binding - click event is attached to each table cell, not table row.
Prepare sample script:

var driver = new RemoteWebDriver(new Uri("http://localhost:8090"), new DesiredCapabilities());
driver.Navigate().GoToUrl(@"file:///C://<path-to-you>/test.html");

driver.FindElementById("clickme").Click();
Assert.AreEqual("Success", driver.FindElementByTagName("h1").Text); // will fail, because h1 is not created

driver.FindElementByCssSelector("#clickme td").Click();
Assert.AreEqual("Success", driver.FindElementByTagName("h1").Text); // will pass

Generally, first try finds table row via id selector element and clicks it, failing with no header being created, even though it should be through event delegation (as it works in ChromeDriver, or Chrome in general). Second try attaches to table cell, therefore event is fired directly on bound element and h1 element is created and visible.

I'm confused by why you think this should work? Events propagate up the DOM structure not down it so an event fired on the row is never going to be seen on the cells

As I mentioned above, the same code works on ChromeDriver, FirefoxDriver and naturally by clicking on the row by hand. I assume, that it is obvious that PhantomJS should work the same way as other drivers.

The reason the other drivers "work" (and manually) is that they ARE actually clicking one of the  elements, not because of event propagation (events propagate up the DOM not down).  You can see this by adjusting the CSS of your example to create spacing between the two td elements and then running it again.  This is happening because the two tds completely overlap the tr in your example.  There's an argument that can be made saying that PhantomJS should just click the point on the screen that would be the middle of the tr (which is what is happening with the other drivers), or that it should warn that it can't actually click the element you're asking it to, and an even bigger argument that if you want it to click the td element you should just click the td.

I agree with you completely about event propagation - thanks for sorting it out. I raised this issue not because of pure curiosity and bug-hunting, but because of real life situation. In my application under test, click event is attached to each table cell, but not to table row. Previously, tests were running smoothly because of usage of ChromeDriver and clicking row was ultimately clicking cell that overlaps it. That works perfectly fine and with all benefits that headless browsers provides, I started with experiments leading to replace ChromeDriver by PhantomJS. After switching to PhantomJS, all of my tests started to fail because of different click handling between drivers. As you said - we may discuss if PhantomJS should handle element clicking identically to other popular drivers (requiring testers to make adjustments to their tests) or do proper way. Either way, my honest opinion is that drivers shouldn't work differently, at least in terms of event-handling.

@yanekk  @twalpole unfortunately calculating the proper coordinates for WebPage::sendEvent is non-trivial.  the easiest way to calculate the coordinates is with element.getBoundingClientRect. element.getBoundingClientRect is relative to the current frame so you need to recursively propagate up nested frames to get the absolute coordinates.  after which ghostdriver would need to validate that the element is clickable at the derived coordinates.

see https://github.com/jesg/ghostdriver/tree/jesg-sendevent-click for a prototype of how this would be done.

I'm still confused as to why when the user needs to click on a  element you would write a test that attempts to click on the
?
At the very least the title of this issue should be changed to something like "PhantomJS doesn't click on overlapping child elements when instructed to click on their parent" so that it correctly identifies what you're claiming is an issue.  However I think this issue should probably actually be closed because PhantomJS doesn't provide a "click" behavior so any "issue" here is either in ghostdriver or the driver you're using, one of which is probably generating fake click events and directing them straight to the element you're instructing it to rather than sending a "real" click event at a location on the page.

@jesg Yep, and then to it would need to calculate the elements intractability - https://www.w3.org/TR/webdriver/#element-interactability - to be webdriver compliant

@twalpole you are right this use case should fail in selenium with an error message saying another element would receive the click event.

I'm still confused as to why when the user needs to click on a  element you would write a test that attempts to click on the ?

that is an anti-pattern.  something must be slightly off with chromedriver.  according the the chromedriver isElementClickable atom it should return an error when clicking on a descendant.
i was planning on using chromedriver's isElementClickable atom or isInteractable atom to determine if i can click on the element.

@jesg Actually the code you linked to actually specifically allows the click if the click location turns out to be a descendant of the element that was to be clicked - https://github.com/SeleniumHQ/selenium/blob/master/javascript/chrome-driver/atoms.js#L251 - with a warning message.  I think that's not technically webdriver compliant, but the webdriver spec is rapidly changing at the moment.


Attempt at a threadlocal storage

Should be as simple as
@batch threadlocal=(localvar=ones(5)) for i in 1:10
    f!(localvar)
end
# and here one will have access to `localvar` array containing all the `localvar`s

I got stuck at figuring out what the current thread id is inside the closure. Help would be welcomed :)
Warning: I barely understand macros and hygiene.
The first commit is an unrelated typo/bug I think I found.
Related to https://github.com/JuliaSIMD/Polyester.jl/issues/53

Thanks for the comments, I will look into your suggestions!
Just to make clear, by "got stuck" I mean "this does not work and I do not know how to do that step". Is there are trivial way to get the equivalent of a thread_id? I have another solution in mind if that does not work.

Thanks for the comments, I will look into your suggestions!
Just to make clear, by "got stuck" I mean "this does not work and I do not know how to do that step". Is there are trivial way to get the equivalent of a thread_id? I have another solution in mind if that does not work.

Threads.threadid() is fine.

If I understand correctly, only one closure is being created, not one closure per thread. So I was thinking of adding some threadid() based indexing in order to access the correct thread-local storage location. This is now done and I will clean it up and upload it here shortly.
However, to follow through your suggestions, I should avoid that indexing (at least while inside of the loop). I am a bit at a loss how to do that. I assume it would require edits to batch.jl, not just closure.jl, which I hoped to avoid.
I will be able to ask some more coherent questions in a couple of days after I cleanup the current version of this PR.

@chriselrod , could you point out where the local thread pointers are defined/created/modified? I think this is the main piece of missing knowledge for me right now.
I see there is BatchClosure which is used to create some cfunc = batch_closure(...), but I do not understand why. Polyester could have just used f! everywhere, without creating these BatchClosures everywhere, but there is some (performance?) reason not to? So there is something seemingly quite important that I am missing here.

I suspect another way to ask my question is: Why is ThreadingUtilities.launch as complicated looking as it is?
I think I currently lack the knowledge of implementing a thread-local storage that does not use threadid load/unload at each call to the closure. I will go ahead and implement/document/test that simple less-performant version of thread-local storage so there is a spring board from which some constructive criticism (or simply a new implementation by a more competent author) can be provided. Feel free waiting for that update before answering all my previous questions.

Here is the current version, pretty much at the limit of my current knowledge of Polyester:
@macroexpand @batch minbatch=1 threadlocal=rand(10:99) for i in 0:9
    println((i,Threads.threadid(),threadlocal))
    threadlocal += 1
end

results into (I have marked the new stuff with #NEW)
quote
    #= Polyester/src/closure.jl:327 =#
    if (CPUSummary.num_threads)() == 1
        #= Polyester/src/closure.jl:328 =#
        threadlocal = rand(10:99) #NEW
        #= Polyester/src/closure.jl:329 =#
        let
            #= Polyester/src/closure.jl:330 =#
            for i = 0:9
                #= scratch.jl:6 =#
                println((i, Threads.threadid(), threadlocal))
                #= scratch.jl:7 =#
                threadlocal += 1
            end
        end
        #= Polyester/src/closure.jl:332 =#
        threadlocal = [threadlocal] #NEW
    else
        #= Polyester/src/closure.jl:334 =#
        threadlocal = Vector(undef, 0) #NEW
        #= Polyester/src/closure.jl:335 =#
        let
            #= Polyester/src/closure.jl:336 =#
            begin
                #= Polyester/src/closure.jl:265 =#
                (var"##inner##loop##", var"#258###LOOP##", var"##split##recombined##") = (Polyester.splitloop)(static(0):static(9))
                #= Polyester/src/closure.jl:267 =#
                var"#259###ITER_LENG##" = (ArrayInterface.static_length)(var"#258###LOOP##")
                #= Polyester/src/closure.jl:268 =#
                var"#260###LOOP_STEP##" = (ArrayInterface.static_step)(var"#258###LOOP##")
                #= Polyester/src/closure.jl:269 =#
                var"#261###LOOPOFFSET##" = (ArrayInterface.static_first)(var"#258###LOOP##")
                begin
                    #= Polyester/src/closure.jl:296 =#
                    Polyester.resize!(threadlocal, Polyester.max(1, Polyester.min(var"#259###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)())))) #NEW
                    #= Polyester/src/closure.jl:297 =#
                    for var"#262#i" = Polyester.eachindex(threadlocal) #NEW
                        #= Polyester/src/closure.jl:298 =#
                        threadlocal[var"#262#i"] = rand(10:99)
                    end
                end
                begin
                    #= Polyester/src/closure.jl:306 =#
                    var"##closure##" = let
                            #= Polyester/src/closure.jl:307 =#
                            ((var"##LOOPOFFSET##", var"##LOOP_STEP##", var"##inner##loop##", var"##split##recombined##"), var"##SUBSTART##"::Int, var"##SUBSTOP##"::Int)->begin
                                    $(Expr(:meta, :inline))
                                    #= Polyester/src/closure.jl:307 =#
                                    #= Polyester/src/closure.jl:308 =#
                                    var"##LOOPSTART##" = (var"##SUBSTART##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= Polyester/src/closure.jl:309 =#
                                    var"##LOOP_STOP##" = (var"##SUBSTOP##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= Polyester/src/closure.jl:310 =#
                                    var"##threadlocal#295" = threadlocal[Threads.threadid()] #NEW
                                    #= Polyester/src/closure.jl:311 =#
                                    begin
                                        $(Expr(:inbounds, true))
                                        local var"#268#val" = begin
                                                    #= Polyester/src/closure.jl:312 =#
                                                    begin
                                                        #= Polyester/src/closure.jl:227 =#
                                                        for var"##outer##" = var"##LOOPSTART##":var"##LOOP_STEP##":var"##LOOP_STOP##", var"##inner##" = var"##inner##loop##"
                                                            #= Polyester/src/closure.jl:228 =#
                                                            var"##i#296" = (Polyester.combine)(var"##split##recombined##", var"##inner##", var"##outer##")
                                                            #= Polyester/src/closure.jl:229 =#
                                                            begin
                                                                #= scratch.jl:6 =#
                                                                println((var"##i#296", Threads.threadid(), var"##threadlocal#295"))
                                                                #= scratch.jl:7 =#
                                                                var"##threadlocal#295" += 1
                                                            end
                                                        end
                                                    end
                                                end
                                        $(Expr(:inbounds, :pop))
                                        var"#268#val"
                                    end
                                    #= Polyester/src/closure.jl:314 =#
                                    threadlocal[Threads.threadid()] = var"##threadlocal#295" #NEW - this is bad as threadid is not always contiguous!
                                    #= Polyester/src/closure.jl:315 =#
                                    nothing
                                end
                        end
                end
                (Polyester.batch)(var"##closure##", (var"#259###ITER_LENG##", Polyester.min(var"#259###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)()))), var"#261###LOOPOFFSET##", var"#260###LOOP_STEP##", var"##inner##loop##", var"##split##recombined##")
            end
        end
    end
end

Initial documentation done and tests pass on my local machine.

You could add the option to specify type, so that people can make it type stable.

I will add the option to specify type.
Yes, when threadlocal is not specified no extra code is injected into the closure (because of all the threadlocal==:() ? :() : ... checks).
I am currently still lost on the "modifying batch" side of things. The purpose of the batch closure is unclear to me. I will try to experiment a bit, but if you have some forum thread or PR thread or something discussing how this work, this would be helpful.

A particularly big point of confusion for me is why is this line present: https://github.com/JuliaSIMD/Polyester.jl/blob/master/src/batch.jl#L81 Naively, it looks to me like it just repeats everything that was already done in the loop preceeding it (the one that seems to launch threads).

repeats everything that was already done in the loop preceeding it (the one that seems to launch threads).

When you run on 5 threads, it'll start 4 threads in the loop, run the 5th chunk, and then wait on the other 4 threads to finish. The goal is for this to be a bit easier on the scheduler and reduce wait time.

@chriselrod , the thread indexing should now be fixed (I modified batch.jl roughly following your directions). Type information can now be specified as well. There are one or two places where I am fuzzy and uncertain of what I have written (I will report those inline). Documentation and tests are provided (but maybe not in the style you would prefer, let me know). Here is another macro expand:
quote
    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:327 =#
    if (CPUSummary.num_threads)() == 1
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:328 =#
        threadlocal = rand(10:99)
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:329 =#
        let
            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:330 =#
            for i = 0:9
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:6 =#
                println((i, Threads.threadid(), threadlocal))
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:7 =#
                threadlocal += 1
            end
        end
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:332 =#
        threadlocal = Any[threadlocal]
    else
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:334 =#
        threadlocal = Vector{Any}(undef, 0)
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:335 =#
        let
            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:336 =#
            begin
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:265 =#
                (var"##inner##loop##", var"#851###LOOP##", var"##split##recombined##") = (Polyester.splitloop)(static(0):static(9))
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:267 =#
                var"#852###ITER_LENG##" = (ArrayInterface.static_length)(var"#851###LOOP##")
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:268 =#
                var"#853###LOOP_STEP##" = (ArrayInterface.static_step)(var"#851###LOOP##")
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:269 =#
                var"#854###LOOPOFFSET##" = (ArrayInterface.static_first)(var"#851###LOOP##")
                begin
                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:296 =#
                    Polyester.resize!(threadlocal, Polyester.max(1, Polyester.min(var"#852###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)()))))
                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:297 =#
                    for var"#855#i" = Polyester.eachindex(threadlocal)
                        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:298 =#
                        threadlocal[var"#855#i"] = rand(10:99)
                    end
                end
                begin
                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:306 =#
                    var"##closure##" = let
                            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:307 =#
                            ((var"##LOOPOFFSET##", var"##LOOP_STEP##", var"##inner##loop##", var"##split##recombined##"), var"##SUBSTART##"::Int, var"##SUBSTOP##"::Int, var"##THREAD##"::Int)->begin
                                    $(Expr(:meta, :inline))
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:307 =#
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:308 =#
                                    var"##LOOPSTART##" = (var"##SUBSTART##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:309 =#
                                    var"##LOOP_STOP##" = (var"##SUBSTOP##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:310 =#
                                    var"##threadlocal#335" = threadlocal[var"##THREAD##"]
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:311 =#
                                    begin
                                        $(Expr(:inbounds, true))
                                        local var"#861#val" = begin
                                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:312 =#
                                                    begin
                                                        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:227 =#
                                                        for var"##outer##" = var"##LOOPSTART##":var"##LOOP_STEP##":var"##LOOP_STOP##", var"##inner##" = var"##inner##loop##"
                                                            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:228 =#
                                                            var"##i#336" = (Polyester.combine)(var"##split##recombined##", var"##inner##", var"##outer##")
                                                            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:229 =#
                                                            begin
                                                                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:6 =#
                                                                println((var"##i#336", Threads.threadid(), var"##threadlocal#335"))
                                                                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:7 =#
                                                                var"##threadlocal#335" += 1
                                                            end
                                                        end
                                                    end
                                                end
                                        $(Expr(:inbounds, :pop))
                                        var"#861#val"
                                    end
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:314 =#
                                    threadlocal[var"##THREAD##"] = var"##threadlocal#335"
                                    #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:315 =#
                                    nothing
                                end
                        end
                end
                (Polyester.batch)(var"##closure##", (var"#852###ITER_LENG##", Polyester.min(var"#852###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)()))), var"#854###LOOPOFFSET##", var"#853###LOOP_STEP##", var"##inner##loop##", var"##split##recombined##")
            end
        end
    end
end

        threadlocal = rand(10:99)
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:329 =#
        let
            #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:330 =#
            for i = 0:9
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:6 =#
                println((i, Threads.threadid(), threadlocal))
                #= /home/stefan/Documents/ScratchSpace/Polyester_dev/scratch.jl:7 =#
                threadlocal += 1
            end
        end
        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:332 =#
        threadlocal = Any[threadlocal]

Here, I'd let inference decide the type unless the user actually specified something other than Any.
       for var"#855#i" = Polyester.eachindex(threadlocal)
                        #= /home/stefan/Documents/ScratchSpace/Polyester_dev/Polyester/src/closure.jl:298 =#
                        threadlocal[var"#855#i"] = rand(10:99)
                    end

Would it be reasonable to move this inside the closure, i.e to replace
                                    var"##threadlocal#335" = threadlocal[var"##THREAD##"]

with
                                    var"##threadlocal#335" = rand(10:99)

?
The concern would be over whether something has to get captured in the closure to make this happen.

@chriselrod the simpler version of your suggestion is now done. The thread index is not stored/loaded anymore. The thread-local variable is initialized inside of the thread. An undef vector is still used (and things are loaded into it at the end of each thread).
Seems to be working fine (reviewing it would be helpful). There seems to be some allocation related problem if we run single-threaded julia though. E.g.:
using Polyester
function alloctest()
  @batch minbatch=500 threadlocal=Float16(1.0)::Float16 for i in 0:1000
      threadlocal += Float16(1.0)
  end
  threadlocal
end
alloctest()
@allocated alloctest()

would give the following results:

julia -t4: 216
julia -t1: 16080 (I do not understand why this is happening)

Here is the macroexpand:
@macroexpand @batch minbatch=1 threadlocal=1::Int for i in 0:9
    println((i,Threads.threadid(),threadlocal))
    threadlocal += 1
end

quote
    #= Polyester/src/closure.jl:330 =#
    if (CPUSummary.num_threads)() == 1
        #= Polyester/src/closure.jl:331 =#
        threadlocal = 1
        #= Polyester/src/closure.jl:332 =#
        let
            #= Polyester/src/closure.jl:333 =#
            for i = 0:9
                #= scratch.jl:7 =#
                println((i, Threads.threadid(), threadlocal))
                #= scratch.jl:8 =#
                threadlocal += 1
            end
        end
        #= Polyester/src/closure.jl:335 =#
        threadlocal = Int[threadlocal]
    else
        #= Polyester/src/closure.jl:337 =#
        threadlocal = Vector{Int}(undef, 0)
        #= Polyester/src/closure.jl:338 =#
        let
            #= Polyester/src/closure.jl:339 =#
            begin
                #= Polyester/src/closure.jl:265 =#
                (var"##inner##loop##", var"#314###LOOP##", var"##split##recombined##") = (Polyester.splitloop)(static(0):static(9))
                #= Polyester/src/closure.jl:267 =#
                var"#315###ITER_LENG##" = (ArrayInterface.static_length)(var"#314###LOOP##")
                #= Polyester/src/closure.jl:268 =#
                var"#316###LOOP_STEP##" = (ArrayInterface.static_step)(var"#314###LOOP##")
                #= Polyester/src/closure.jl:269 =#
                var"#317###LOOPOFFSET##" = (ArrayInterface.static_first)(var"#314###LOOP##")
                Polyester.resize!(threadlocal, Polyester.max(1, Polyester.min(var"#315###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)()))))
                begin
                    #= Polyester/src/closure.jl:306 =#
                    var"##closure##" = let
                            #= Polyester/src/closure.jl:307 =#
                            ((var"##LOOPOFFSET##", var"##LOOP_STEP##", var"##inner##loop##", var"##split##recombined##"), var"##SUBSTART##"::Int, var"##SUBSTOP##"::Int, var"##THREAD##"::Int)->begin
                                    $(Expr(:meta, :inline))
                                    #= Polyester/src/closure.jl:307 =#
                                    #= Polyester/src/closure.jl:308 =#
                                    var"##LOOPSTART##" = (var"##SUBSTART##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= Polyester/src/closure.jl:309 =#
                                    var"##LOOP_STOP##" = (var"##SUBSTOP##" * var"##LOOP_STEP##" + var"##LOOPOFFSET##") - var"##LOOP_STEP##"
                                    #= Polyester/src/closure.jl:310 =#
                                    var"##threadlocal#304" = 1::Int
                                    #= Polyester/src/closure.jl:311 =#
                                    begin
                                        $(Expr(:inbounds, true))
                                        local var"#322#val" = begin
                                                    #= Polyester/src/closure.jl:312 =#
                                                    begin
                                                        #= Polyester/src/closure.jl:227 =#
                                                        for var"##outer##" = var"##LOOPSTART##":var"##LOOP_STEP##":var"##LOOP_STOP##", var"##inner##" = var"##inner##loop##"
                                                            #= Polyester/src/closure.jl:228 =#
                                                            var"##i#305" = (Polyester.combine)(var"##split##recombined##", var"##inner##", var"##outer##")
                                                            #= Polyester/src/closure.jl:229 =#
                                                            begin
                                                                #= scratch.jl:7 =#
                                                                println((var"##i#305", Threads.threadid(), var"##threadlocal#304"))
                                                                #= scratch.jl:8 =#
                                                                var"##threadlocal#304" += 1
                                                            end
                                                        end
                                                    end
                                                end
                                        $(Expr(:inbounds, :pop))
                                        var"#322#val"
                                    end
                                    #= Polyester/src/closure.jl:314 =#
                                    threadlocal[var"##THREAD##"] = var"##threadlocal#304"
                                    #= Polyester/src/closure.jl:315 =#
                                    nothing
                                end
                        end
                end
                (Polyester.batch)(var"##closure##", (var"#315###ITER_LENG##", Polyester.min(var"#315###ITER_LENG##", (min)((CPUSummary.num_threads)(), (CPUSummary.num_cores)()))), var"#317###LOOPOFFSET##", var"#316###LOOP_STEP##", var"##inner##loop##", var"##split##recombined##", threadlocal = true)
            end
        end
    end
end

    if (CPUSummary.num_threads)() == 1
        #= Polyester/src/closure.jl:331 =#
        threadlocal = 1
        #= Polyester/src/closure.jl:332 =#
        let
            #= Polyester/src/closure.jl:333 =#
            for i = 0:9
                #= scratch.jl:7 =#
                println((i, Threads.threadid(), threadlocal))
                #= scratch.jl:8 =#
                threadlocal += 1
            end
        end
        #= Polyester/src/closure.jl:335 =#
        threadlocal = Int[threadlocal]

Notice the type instability?

I will need a bit more help with this.
Initially, I thought that it would not matter, because this is an assignment operation so it is a brand new threadlocal which should not have anything to do with the old one -- just happens to share the same name. It seems I was wrong about that and I have more to learn about how inference works in Julia.
But then, this did not work either:
if (CPUSummary.num_threads)() == 1
  my_variable = let
    threadlocal = initialization
    the_body
    threadlocal
  end
  [threadlocal]
else
...

I thought that the scoping provided by let should fix the type instability, but it did not. Am I wrong about this? Maybe there was some other issue, I will have to play with it a bit more.

Here is a version which has the same allocation issues, but in which I do not see the type instability
quote
    #= Polyester/src/closure.jl:330 =#
    if (CPUSummary.num_threads)() == 1
        #= Polyester/src/closure.jl:331 =#
        threadlocal = 1
        #= Polyester/src/closure.jl:332 =#
        let
            #= Polyester/src/closure.jl:333 =#
            for i = 0:9
                #= scratch.jl:7 =#
                println((i, Threads.threadid(), threadlocal))
                #= scratch.jl:8 =#
                threadlocal += 1
            end
        end
        #= Polyester/src/closure.jl:335 =#
        threadlocal = Int[threadlocal]
    else
...
end

Here is a version with the same allocation problems in which I do not see the type instability
quote
    #= Polyester/src/closure.jl:330 =#
    if (CPUSummary.num_threads)() == 1
        #= Polyester/src/closure.jl:331 =#
        var"#326#my_var" = let
                #= Polyester/src/closure.jl:332 =#
                threadlocal = 1
                #= Polyester/src/closure.jl:333 =#
                for i = 0:9
                    #= scratch.jl:7 =#
                    println((i, Threads.threadid(), threadlocal))
                    #= scratch.jl:8 =#
                    threadlocal += 1
                end
            end
        #= Polyester/src/closure.jl:335 =#
        [var"#326#my_var"]
    else
...
end

I will need a bit more help with this.
Initially, I thought that it would not matter, because this is an assignment operation so it is a brand new threadlocal which should not have anything to do with the old one -- just happens to share the same name. It seems I was wrong about that and I have more to learn about how inference works in Julia.
But then, this did not work either:
if (CPUSummary.num_threads)() == 1
  my_variable = let
    threadlocal = initialization
    the_body
    threadlocal
  end
  [my_variable]
else
...

I thought that the scoping provided by let should fix the type instability, but it did not. Am I wrong about this? Maybe there was some other issue, I will have to play with it a bit more.

I didn't run the code, and just guessed at the first potentially problematic thing I saw.
Perfo
julia> using CPUSummary

julia> foo() = begin
           if CPUSummary.num_threads() == 1
           var"#326#my_var" = let
                   #= Polyester/src/closure.jl:332 =#
                   threadlocal = 1
                   #= Polyester/src/closure.jl:333 =#
                   for i = 0:9
                       #= scratch.jl:7 =#
                    #   println((i, Threads.threadid(), threadlocal))
                       #= scratch.jl:8 =#
                       threadlocal += 1
                   end
                   threadlocal
               end
           #= Polyester/src/closure.jl:335 =#
           [var"#326#my_var"]; else; end
       end
foo (generic function with 1 method)

julia> foo()
1-element Vector{Int64}:
 11

julia> @benchmark foo()
BenchmarkTools.Trial: 10000 samples with 996 evaluations.
 Range (min … max):  23.661 ns …  1.325 μs  ┊ GC (min … max): 0.00% … 97.08%
 Time  (median):     25.507 ns              ┊ GC (median):    0.00%
 Time  (mean ± σ):   27.988 ns ± 35.749 ns  ┊ GC (mean ± σ):  4.70% ±  3.63%

     ▇█▇▃     ▁  ▁▁▁                              ▁  ▂▁       ▂
  ▄▁▇█████▇▇▇████████▇▇▆▇▆▆▅▃▃▄▁▃▁▁▁▁▁▁▁▃▃▁▁▁▁▁▁▁▆██▇██▇▇▆▇▆▆ █
  23.7 ns      Histogram: log(frequency) by time      46.3 ns <

 Memory estimate: 64 bytes, allocs estimate: 1.

Performance seems fine.

I added a commit that performs the change that I mentioned, the same one you had just tested. But with or without that commit, the overall behavior of a single thread @batch seems bad allocation-wise.
julia> function alloctest()
         @batch minbatch=500 threadlocal=1::Int for i in 0:1000
             threadlocal += 1
         end
         threadlocal
       end
alloctest (generic function with 1 method)

julia> @benchmark alloctest()
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  21.327 μs …  1.147 ms  ┊ GC (min … max): 0.00% … 97.92%
 Time  (median):     24.856 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   25.319 μs ± 11.681 μs  ┊ GC (mean ± σ):  0.44% ±  0.98%

      ▁▁█
  ▂▄▆▇███▃▁▁▁▁▂▂▃▄▃▄▅▆▅▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
  21.3 μs         Histogram: frequency by time        35.1 μs <

 Memory estimate: 7.75 KiB, allocs estimate: 493.

There is an unrelated typo-bug in the last commit. I will experiment with this and try to fix it later in the week.

Chris Elrod, I think I fixed the single-thread spurious allocations. The second to last commit (the force pushed one) has everything working except for the annoying single-thread allocations. The last commit removes these single-thread allocations. I do not really understand why the fix from the last commit is necessary (I thought julia would figure this out on its own thanks to the separate lexical scopes -- your insight would be appreciated).
Things that are not done in this PR and which I would prefer to be considered out of scope for this PR are:

restructuring the localstorage so that it is returned from the thread closure instead of stored in an array
providing "folding" functionality like @batch threadlocalfold=+ so that all thread-local results are automatically summed up

Tests, including allocation tests are provided. Documentation is provided as well. Are there any "finishing touches" changes you would like?


"Error occurred. Message:'The specified location-constraint is not valid' when writing an object"

#2 "Error creating a build bucket has been fixed."
However I am still getting the issue.

Hello @herpdederp
I couldn't repro this with a fresh clone of the project.
Can you run the batch file clean.bat in the build folder to make sure that there isn't an old DeployTool binary being used. If it still doesn't work, can you blow away the project, clone it again, then build it from the beginning (using build.bat)?
Thank you,
Al Murray :)

Hello @herpdederp
I am going to close this issue. Please reopen if you have further issues.
Thank you,
Al Murray :)


Add force not to cache and fix jar instance of workflow instance not showing

Codecov Report

Merging #2507 into dev will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                dev    #2507   +/-   ##
=========================================
  Coverage     35.91%   35.91%
  Complexity     2402     2402
=========================================
  Files           424      424
  Lines         19559    19559
  Branches       2385     2385
=========================================
  Hits           7025     7025
  Misses        11910    11910
  Partials        624      624

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 9e506a9...9e506a9. Read the comment docs.


Issue #134 - Implement merge operator

PR implements Merge operator requested in #134
Additionally fixes racing condition in FlatMap operator (see changes in flatmap.go )

Pull Request Test Coverage Report for Build 288

29 of 31 (93.55%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.07%) to 96.1%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

observablecreate.go
12
14
85.71%

Totals

Change from base Build 267:
-0.07%

Covered Lines:
1577

Relevant Lines:
1641

💛  - Coveralls

@teivah is it a good time to send PRs for v2 branch? would be happy to work on next operator is PRs are welcome.

Hey @alexmt, I'm back on the project. I merged an ongoing work on the v2. Could you please fix the resulting conflicts? Thanks.

Rebased! @teivah, please take another look

Hey @alexmt, sorry for the latency.
I am not sure about the operator compliance. Actually, ordering is important and for me we should pass the following test: (sorry for the ugly sleep but that gives us a rough idea of the problem)
func TestMergeFromChannels(t *testing.T) {
	const sleep = 30 * time.Millisecond

	ch1 := make(chan interface{}, 10)
	ch2 := make(chan interface{}, 10)
	obs := Merge(FromChannel(ch1), FromChannel(ch2))

	ch1 <- 20
	time.Sleep(sleep)
	ch1 <- 40
	time.Sleep(sleep)
	ch1 <- 60
	time.Sleep(sleep)
	ch2 <- 1
	time.Sleep(sleep)
	ch1 <- 80
	time.Sleep(sleep)
	ch1 <- 100
	time.Sleep(sleep)
	ch2 <- 1
	time.Sleep(sleep)

	close(ch1)
	close(ch2)

	AssertThatObservable(t, obs, HasItems(20, 40, 60, 1, 80, 100, 1))
}

Duplicate of https://github.com/ReactiveX/RxGo/pull/177


Remove geojson helpers in favor of cligj

Once https://github.com/mapbox/cligj/pull/9 is merged

@perrygeo it is merged and cligj 0.4 is on pypi.


Pipeline pre-processing fails for pipelines with custom components

Describe the issue
GUI message:
Error pre-processing pipeline untitled9 for engine Argo at /var/folders/h8/l3qh8v192rv_vvggc6wyphzc0000gn/T/tmp5r2us_zu/untitled9.tar.gz

Log file:
[I 2021-07-08 14:39:00.694 ServerApp] kfp 'untitled9' - submitting pipeline
[I 2021-07-08 14:39:00.701 ServerApp] kfp 'untitled9' - processing pipeline dependencies to: http://cloning1.fyre.ibm.com:31467 bucket: ptitzler-test folder: untitled9-0708143857
[E 2021-07-08 14:39:00.762 ServerApp] There was an error while constructing component Download File.
[E 2021-07-08 14:39:00.763 ServerApp] Uncaught exception POST /elyra/pipeline/schedule?1625780337186 (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/elyra/pipeline/schedule?1625780337186', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor_kfp.py", line 534, in _cc_pipeline
        notebook_ops[operation.id] = factory_function(**operation.component_params)
    TypeError: Download File() got an unexpected keyword argument 'label'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor_kfp.py", line 188, in process
        kfp_argo_compiler.Compiler().compile(pipeline_function, pipeline_path)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 975, in compile
        package_path=package_path)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 1029, in _create_and_write_workflow
        pipeline_conf)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/kfp/compiler/compiler.py", line 861, in _create_workflow
        pipeline_func(*args_list, **kwargs_dict)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor_kfp.py", line 184, in <lambda>
        cos_directory=cos_directory)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor_kfp.py", line 538, in _cc_pipeline
        raise RuntimeError(f"There was an error while constructing component {operation.name}.")
    RuntimeError: There was an error while constructing component Download File.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/handlers.py", line 93, in post
        response = await PipelineProcessorManager.instance().process(pipeline)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor.py", line 111, in process
        res = await asyncio.get_event_loop().run_in_executor(None, processor.process, pipeline)
      File "/opt/anaconda3/envs/master/lib/python3.7/concurrent/futures/thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/opt/anaconda3/envs/master/lib/python3.7/site-packages/elyra/pipeline/processor_kfp.py", line 193, in process
        format(pipeline_name, engine, pipeline_path), str(ex)) from ex
    RuntimeError: ('Error pre-processing pipeline untitled9 for engine Argo at /var/folders/h8/l3qh8v192rv_vvggc6wyphzc0000gn/T/tmp5r2us_zu/untitled9.tar.gz', 'There was an error while constructing component Download File.')

To Reproduce
Steps to reproduce the behavior:

Create KFP pipeline
Add and configure custom component.
Try to run the pipeline.
See error

getting an error creating a new pipeline, standby


Feature request

Would it be possible to add primeRadioButton to the components?

Added first implementation in Version 1.1.4. . Some more styling is needed in json attributes. Example:
https://formkit-primevue.netlify.app/demo/radioButton

It looks like that the version on npmjs does not have the latest changes:
https://www.npmjs.com/package/@sfxcode/formkit-primevue?activeTab=code

Thank you!


(Fix) Read only owners on xDai and Volta

Closes #1685 by:

Avoid updating the store when the result of the batch transaction is not defined
This error appears only on xDai or Volta, couldn't find a way to reproduce this on Mainnet or Rinkeby

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

seems to be working fine:
https://www.loom.com/share/11c224840f7c4a0fa44ea1d740fcdb08

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Travis automatic deployment:
https://pr1847--safereact.review.gnosisdev.com/rinkeby/app

Looks good to me
Didn't suffer the "only read" mode after being around those environments for some time


[WIP] Extract API calls in Alazar class + some async work

This PR follows discussions with @astafan8, and extracts all C-level calls to the Alazar SDK into its own class to make it easier for that class to manage the use of background threads. To do so, this PR includes a metatype that converts a list of ctypes signatures into sync and async methods that both ensure that all calls to the Alazar SDK are executed in the same ThreadPoolExecutor. Refactoring in this way allows for the acquire method to be simplified, as ownership of threads and some memory management can be extracted. For example, work is in progress on this PR to allow for buffer allocation and posting to be done concurrently by using asyncio.gather to join after all buffers have been successfully posted. Similarly, extracting and unifying the sync/async APIs in this way allowed for making find_boards_async(), which may help speed up init scripts for stations which depend on Alazar initialization.
Still TODO:

[ ] Docstrings and comments are still pretty sparse.
[ ] More logic needs extracted from acquire to make it easier to reuse buffers across acquire calls.
[ ] Testing
[ ] The DLL wrapper is still somewhat coupled to the Alazar usage, but could be generalized to provide thread-safe async wrappers for common C APIs.
[ ] The ctypes return values of metatype-time generated methods are saved as type annotations, but argument types are not due to complications with mypy's semantics for *args.
[ ] Other methods like get_idn are still blocking, reducing parallelization of init scripts

I'm going to continue working on this PR. (the field-vector related stuff does not belong to this PR, and will be removed from it)

I removed field-vector-related changes from this PR. Also resolved merge conflict which came due to changes in mercury IPS driver.
What's left in this PR is:

Alazar API refactoring
attempt to make ALazar driver async
attempt to make mercury IPS driver async ( + test )
async utils

All the async things will be done later in other PRs. The Alazar API refactoring will be continued, but yet in a different PR.

UPDATE: what's left in this PR:

attempt to make ALazar driver async
attempt to make mercury IPS driver async ( + test )
async utils

All of these will be done later in other PRs.
This PR is left open for reference and history reasons.


[🐛 BUG]: Failed to call goridge in the swoole coroutine

No duplicates 🥲.

[X] I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?
Since swoole has been used in our project, we did not directly use the main roadrunner program. Recently, we found your subproject goridge, and tried to call golang methods in swoole coroutines.
However, the issue submission function is not enabled in the goridge project, so issues are submitted here
My test code is as follows:
 \Co\run(function () {
        go(function () {
                $rpc = new Goridge\RPC\RPC(
                    Goridge\Relay::create('tcp://<IP_ADDRESS>:6001')
                );
                echo $rpc->call("App.Hi", "Antony");
        });

            go(function () {
                $rpc = new Goridge\RPC\RPC(
                    Goridge\Relay::create('tcp://<IP_ADDRESS>:6001')
                );
                echo $rpc->call("App.Hi", "Antony");
            });

            sleep(10);
        });

Both requests are sent to golang, and the result is that the first call is typed correctly, and the second call reports an error:
Hello, Antony!
PHP Fatal error:  Uncaught Spiral\Goridge\RPC\Exception\RPCException:  Invalid RPC frame, sequence mismatch in /var/www/vendor/spiral/goridge/src/RPC/RPC.php:89
I'm using php7.4, spiral/goridge:3.2.0
Relevant log output
No response

Hey @shellphy 👋
Yes, all related to the roadrunner-server issues are stored in 1 place - in the main RR project.
I'm not familiar with Swoole, but it looks like that it tries to send both request via the same RPC connection. I'm not sure what is \Co and what is go in that case.
All RPC connections (not exactly Goridge) should be consecutive, and I'm not sure, these go statements are not using the same connection.

It's not the same connection. I tried to print out the rpc object:
\Co\run(function () {
            go(function () {
                $rpc = new Goridge\RPC\RPC(
                    Goridge\Relay::create('tcp://<IP_ADDRESS>:6001')
                );
                var_dump($rpc);
                echo $rpc->call("App.Hi", "Antony");
            });

            go(function () {
                $rpc = new Goridge\RPC\RPC(
                    Goridge\Relay::create('tcp://<IP_ADDRESS>:6001')
                );
                var_dump($rpc);
                echo $rpc->call("App.Hi", "Antony");
            });

            sleep(10);
        });

response:
object(Spiral\Goridge\RPC\RPC)#27 (3) {
["relay":"Spiral\Goridge\RPC\RPC":private]=>
object(Spiral\Goridge\SocketRelay)#28 (4) {
["address":"Spiral\Goridge\SocketRelay":private]=>
string(9) "<IP_ADDRESS>"
["port":"Spiral\Goridge\SocketRelay":private]=>
int(6001)
["type":"Spiral\Goridge\SocketRelay":private]=>
int(0)
["socket":"Spiral\Goridge\SocketRelay":private]=>
NULL
}
["codec":"Spiral\Goridge\RPC\RPC":private]=>
object(Spiral\Goridge\RPC\Codec\JsonCodec)#29 (0) {
}
["service":"Spiral\Goridge\RPC\RPC":private]=>
NULL
}
object(Spiral\Goridge\RPC\RPC)#33 (3) {
["relay":"Spiral\Goridge\RPC\RPC":private]=>
object(Spiral\Goridge\SocketRelay)#34 (4) {
["address":"Spiral\Goridge\SocketRelay":private]=>
string(9) "<IP_ADDRESS>"
["port":"Spiral\Goridge\SocketRelay":private]=>
int(6001)
["type":"Spiral\Goridge\SocketRelay":private]=>
int(0)
["socket":"Spiral\Goridge\SocketRelay":private]=>
NULL
}
["codec":"Spiral\Goridge\RPC\RPC":private]=>
object(Spiral\Goridge\RPC\Codec\JsonCodec)#35 (0) {
}
["service":"Spiral\Goridge\RPC\RPC":private]=>
NULL
}
Hello, Antony!
PHP Fatal error:  Uncaught Spiral\Goridge\RPC\Exception\RPCException: Invalid RPC frame, sequence mismatch in /var/www/vendor/spiral/goridge/src/RPC/RPC.php:89

It would be nice if you'd try the following:

Create two separate PHP files with the Goridge code (rpc) inside.
Execute them at the same time.
I just want to check, if that is something Swooly related.

I just debugging, in the vendor/spiral/goridge/SRC/RPC/RPC. PHP 88 lines of print log:
var_dump($frame);
var_dump(self::$seq);
The results are as follows:
object(Spiral\Goridge\Frame)#36 (5) {
["payload"]=>
string(24) "App.Hi"Hello, Antony! \n""
["options"]=>
array(2) {
[0]=>
int(1)
[1]=>
int(6)
}
["flags"]=>
int(8)
["byte10"]=>
int(0)
["byte11"]=>
int(0)
}
int(1)
Hello, Antony!
object(Spiral\Goridge\Frame)#26 (5) {
["payload"]=>
string(24) "App.Hi"Hello, Antony! \n""
["options"]=>
array(2) {
[0]=>
int(1)
[1]=>
int(6)
}
["flags"]=>
int(8)
["byte10"]=>
int(0)
["byte11"]=>
int(0)
}
int(2)
So I think the problem is that the $seq variable is static

Nice, thanks 👍

You may try to send a fix 😉

I think it's possible to modify the handling here a little bit to make it compatible with swoole coroutines. It is better to put a patch on spiral/goridge:3.2.0 because our php environment is 7.4, thank you

Yeah, sure, you may send a patch for review and link to this issue.

Yeah, sure, you may send a patch for review and link to this issue.

I have just submitted a request, and I feel that there is no problem in the preliminary test. All testcases have passed, and there is no problem in the test in swoole

Thank you @shellphy 👍
I see that in CI all tests are red. I guess, you need to install a Swoole extension in the CI test env.

Fixed by: https://github.com/roadrunner-php/goridge/pull/30, thanks @shellphy 👍


Concurrent operations on handles via UID / revision

Description

Found some race conditions that exist when using ReleaseByHandle. This code does a few things:

Correctly returns UID on resources backed by CRDs.
Updates ReleaseByHandle to take revision and UID information.

I originally raised this PR to address a scenario I found while working on the IPAM handle GC controller using finalizers (this approach was abandoned, but the race condition still exists in the API). In my hacking, I encountered a race condition where:

CNI plugin goes to allocate an IP address, creates a handle
CNI plugin attempts to write the block, but gets a CAS error
CNI plugin deletes handle in preparation for a retry.
CNI plugin retries the above steps 1-3, successfully allocates the IP. Handle gets a new UID.

In this scenario, the IPAM handle would enter finalizing state in step 3 above, kube-controllers would see that finalizing handle, and call ReleaseByHandle. This would race with the retry attempt, thus releasing the IP after the CNI plugin successfully allocates it on the second attempt. TL;DR - ReleaseByHandle releases IPs that might have been allocated after the calling code decided it was safe to release the IPs.
Despite ultimately taking a different approach on the IPAM GC controller, I think this PR is probably still useful. Here is another related PR that showcases an existing race condition with handles which results in us accidentally releasing an IP address that is still in use: https://github.com/projectcalico/kube-controllers/pull/489
The changes in this PR prevent the race condition by allowing users of the API to provide revision and UID information on the ReleaseByHandle API.
Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

The Calico team is reorganizing our code and repository structure in order to make development easier, and as such all of the code in this repository is now located at https://github.com/projectcalico/calico. We appreciate your PR and your patience as we work to improve our developer experience, and welcome you to re-open your changes against the new location. Please reach out if you have any questions!


Update README.md

What
Improve README.md
Why
Improvements made:

Enhanced headings and subheadings for clarity.
Clarified the purpose and usage of the library.
Provided clear scenarios for different user needs.
Organized and formatted the content for better readability.
Added direct links to important resources.
Corrected the formatting of URLs.
Improved the description of the NPM package.
Encouraged contributions and provided a clear link to the contributing guide.
Fixed formatting issues and improved wording for consistency.

Unfortunately there is an issue with our build system that is blocking completing PRs from forks.
This PR has been included in #3716.
Closing this PR.


HIVE-27942: Missing aux jar errors during LLAP launch

What changes were proposed in this pull request?
LLAP was failing to launch daemons due to incorrect class references not being packed anymore
https://issues.apache.org/jira/browse/HIVE-27942
Why are the changes needed?
Updated class references in default aux classes for pool and dbcp to correct class names
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
No
How was this patch tested?
NA

LGTM +1, Initially qtest was unstable on retrigger Tests passes.
Thanks @shubhluck for the contribution.

Ping @ayushtkn If no future comment, we can merge this change. :)

Thanx @zhangbutao for following up, feel free to merge


Betterdiscord plugin not compiling

Opened discord (app) and the Xenolib plugin was needed to use one of my plugins, and then Xenolib  "fails to compile" and i've tried various different things to fix it, and it's not working. Sometimes it loads up and turns on, but when paired with the Zerespluginlibrary (also needed for the plugin) it again disables itself and stops working. Any permanent fix for this?

https://github.com/BetterDiscord/BetterDiscord/issues/1404#issuecomment-1258808958

eu tbm estou tendo

XenoLib.plugin so xeno himself is broken at the momment if i undertand the commed is this right ? @fowlis

What? XenoLib is unsupported anyway. It is an unofficial plugin (not on the BetterDiscord site, no matter how hard you look)
This GitHub repo is for BetterDiscord itself. Not plugins. Not themes. Just BetterDiscord.
Any issues with plugins should go to their respective repos.

XenoLib.plugin so xeno himself is broken at the momment if i undertand the commed is this right ? @fowlis

What? XenoLib is unsupported anyway. It is an unofficial plugin (not on the BetterDiscord site, no matter how hard you look) This GitHub repo is for BetterDiscord itself. Not plugins. Not themes. Just BetterDiscord. Any issues with plugins should go to their respective repos.

that doesnt answer my question.

that doesnt answer my question.

I couldn't understand your question, so I gave an answer broad enough to hopefully answer whatever it was you were asking.
Hence: "What?"

sad life

Please see https://github.com/BetterDiscord/BetterDiscord/issues/1404#issuecomment-1258808958


[1.18.2] Ticking Entity crash when blocking arrows on server

Hello, I'm not sure if it's specifically because of this mod, but I know that the error goes away when I remove it. The crash seems to happen sporadically, as I'm not really able to consistently replicate it. The only common factor I can tell when the crash occurs is that I'm blocking an arrow shot by a skeleton.
From what I can parse in the crashlog, it seems to be an issue with Better Paragliders' stamina-on-block calculation, but trying to make sense of that mass of text makes my head hurt, haha.
For reference, the crash occurred with:

A Mana and Artifice Bound Shield with the Earth Spike spell attached to it
A Shield Expansion Iron Shield
A vanilla Minecraft shield, without Shield Expansion installed

Latest Crash Log
Mod List

Should be fixed with the latest change (V0.5.0)


Parallelize the IO for files

Maybe we can use this:
https://docs.rs/async-std/0.99.11/async_std/io/index.html
Rather than having unzip_archive, we can collect the ZipFiles in 2 different Vecs, directories and files, create the directories (maybe also async) and then write the files, again async.
Note: I am not sure if it shows all directories when you list them as I see you use create_dir_all, but maybe it's because we cannot be sure if the directory already exists, because of the ordering of files inside
This is just an idea, I want to hear your thoughts. I will try though it and probably open a WIP PR.

As far I know, only a ZipFile can exist in parallel. That means, it works with iterators when you use FnOnce and for lops, but you can't store them and you can't have parallel iterators like rayon.
You can check here: https://github.com/mvdnes/zip-rs/issues/14
The last comment before mine and the pull requests are interesting. Still, no movement in that regard by the library. :(

Indeed, you are right. It will prove to be a bit too much work right now.
Let's leave it for now and after that we can even make a fork and go async there as well. Might be just using async_std initially, might be doing more, but not now.


The In App SFTP connector Upload file content action has invalid File content parameter in the new designer

Describe the Bug with repro steps

In the new designer, add the "In App" SFTP action 'Upload file content'
Click on "Add a new parameters" and select "File content"
The "File content" parameter should be an empty text field to specify the content, but there is a dropdown, with the option to select a flag "SupportsLargeContent". If we click it and run, the file that gets created is a file with the word "true". Right now, user has to select "enter custom value" to add the desired file content.

This issue does not occur in the previous designer
What type of Logic App Is this happening in?
Standard (Portal)
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {
      "Upload_file_content": {
        "type": "ServiceProvider",
        "inputs": {
          "parameters": {
            "filePath": "/",
            "overWriteFileIfExists": true,
            "content": "true"
          },
          "serviceProviderConfiguration": {
            "connectionName": "Sftp",
            "operationId": "uploadFileContent",
            "serviceProviderId": "/serviceProviders/Sftp"
          }
        },
        "runAfter": {}
      }
    },
    "contentVersion": "<IP_ADDRESS>",
    "outputs": {},
    "triggers": {
      "When_a_HTTP_request_is_received": {
        "type": "Request",
        "kind": "Http"
      }
    }
  },
  "connectionReferences": {
    "Sftp": {
      "connection": {
        "id": "/serviceProviders/Sftp/connections/Sftp"
      },
      "connectionName": "sample-connection",
      "api": {
        "id": "/serviceProviders/Sftp"
      }
    }
  },
  "parameters": {}
}

Screenshots or Videos
In New Designer -

In Old/Fallback Designer (expected) -

Browser
Edge
Additional context
No response
AB#24595100

Expect this to be in production in 2 weeks


Jekyll-Assets: Missing assets when building site

We're struggling to overcome a strange behavior with Jekyll-Assets when exporting all assets correctly on build command. The configuration is set to use cachebusting with "file system" cache type. When building we get all images and fonts correctly. But on one of the scss files it seems that fonts and images are exported randomly (sometimes yes, other times no). When files are not exported the path written in css is correct, containing the hash for the cachebust. While trying to debug with deleting .assets-cache and _site folder I've notice the random gets even much more frequent.
Dev environment (Docker Container):
version: '3'
services:
  jekyll:
    build: .
    command: jekyll build --watch --incremental
    volumes:
      - .:/usr/src/app
  nginx:
    image: nginx:stable-alpine
    volumes:
      - ./_site:/usr/share/nginx/html
    ports:
      - 8080:80
    depends_on:
      - jekyll

Dev environment(Dockerfile):
FROM ruby:2.4.1-stretch
RUN apt-get update -qq && \
    apt-get install -y build-essential
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ADD Gemfile /usr/src/app
ADD Gemfile.lock /usr/src/app
RUN gem install bundle && \
    bundle && \
    bundle install

Jekyll configuration (Gemfile):
gem "jekyll", "3.5.1"
group :jekyll_plugins do
  # gem "html-proofer"
  #gem "jekyll-redirect-from"
  gem "jekyll-assets"
  gem "coffee-script"
  gem "uglifier"
  gem "sass"
  gem "therubyracer"
  gem "less"
  gem "jekyll-feed"
  gem "jekyll-paginate-v2"
  gem "jekyll-last-modified-at"
  gem "jekyll-sitemap"
  gem "jekyll-minifier"
end

Project configuration (_config.yml):
[...]
assets:
  digest: true
  compress:
    css:  true
    js:   uglifier
  autoprefixer:
    browsers:
      - "> 1%"
      - "last 3 versions"
      - "IE > 9"
  prefix: "/assets"
  sources:
    - _assets/
    - _assets/js
    - _assets/css
    - _assets/javascript
    - _assets/stylesheets
    - _assets/img
    - _assets/fonts
[...]

(cross post from https://stackoverflow.com/questions/46467798/jekyll-assets-missing-assets-when-building-site)

Closing this out. I figured it out. It was a path issue.

@vpetersson  Can you mention what the issue was and how you fixed it?


Scrolling via mouse wheel does not work when hovering over child controls

When using a normal ScrollContainer, scrolling works (horizontal) when using mousewheel when hovering over any area of the ScrollContainer. However, when using a SmoothScrollContainer, this doesn't seem to be the case.

This is probably due to the mouse filter setting of the child controls being stop instead of pass. If you can't figure it out yourself, please provide a minimal reproduction project.

I will close this issue due to inactivity. If the issue persists, please leave a comment and I will reopen the issue.


[CI Problem] CI node out of memory

Examples :

https://ci.tlcpack.ai/blue/organizations/jenkins/docker-images-ci%2Fdaily-docker-image-rebuild/detail/daily-docker-image-rebuild/143/pipeline
https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/ci-docker-staging/175/pipeline/

This started with a timeout on https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/ci-docker-staging/173/pipeline.
It seems like the CI jobs starts with past images (maybe others are aware of this). Should we clean them ?
Possible resolutions for both TVM's Jenkins file and daily-docker-image-rebuild Jenkins file:

Doing the cleanup_docker_image("ci_cpu") before the build is started
Do a full prune and pull the docker images from the hub

Any other ideas to proceed are also welcome!
cc : @leandron @tqchen @areusch @u99127

I temporarily disabled this machine on Jenkins, due to storage issues, FYI.
https://ci.tlcpack.ai/computer/octo.aws.c<IP_ADDRESS>.246/

Thanks! @leandron

from Noah:

docker prune script on static nodes (which I have running as a cron job) doesn't pass the 'volumes' flag
manually fixed 5 nodes which were full (think 246 was one of them)
permanent fix requires a rolling update of the fleet to bring in a new AMI. no time for this right now.

let's leave this bug open til we do the rolling update.

Cleaning up old tickets that are solved, so I'm closing this one.


View recompilation for assemblies loaded through AssemblyLoadContext does not work

Describe the bug
After figuring out that view recompilation only works without debugging now i tried to get it working on RCL views - should this be working or is this not supported yet?
To Reproduce
Steps to reproduce the behavior:

Create a mvc netcore3.0 app
Create a RCL
Load RCL into mvc app, register the parts
start without debugging
change views/home/index.cshtml - that should work
change a view within a RCL - that does not seem to work.

Reproduction

checkout https://github.com/taori/Sandbox/tree/netcore3-recompilefails
Debug ComposableWebApplication
Change Home/Index.cshtml in main project
Reload
And then i get the error.
MyFeature/Page1 should also work if changing content.

Screenshots

Expected behavior
I would expect RCL views to update as well, not just views which are in the main application

@pranavkm thoughts?

@taori Seems like you are loading the class libraries at runtime. I'm not sure Razor runtime compilation will work in that scenario. The error you are seeing has to do with the reference not being part of the dependency model (*.deps.json" file) and I'm not sure there's a way around it.
@pranavkm can confirm.

@javiercn Hm. Would that not make config.AdditionalReferencePaths kind of obsolete though? That property looks like exactly what i am looking for. Let's see what @pranavkm has to say about this. It would be a shame if this did not work since that would completely break extensibility for what i am trying to do.
The weird thing here is also how i change a view in the main application and the error which appears is another plugin, where i made no changes.

Ok, I missed something the first time I looked. You need to app the runtime assemblies to the list of application parts, which is what MVC considers when it looks for views, etc.

Nevermind, I saw that it's behind AddPlugins. That said, I'm not confident in the logic you are using there to configure the parts. You should use ProvideApplicationPartFactoryAttribute and RelatedAssembliesAttribute to intantiate the parts for an assembly and find related parts respectively.

Nevermind, I saw that it's behind AddPlugins. That said, I'm not confident in the logic you are using there to configure the parts. You should use ProvideApplicationPartFactoryAttribute and RelatedAssembliesAttribute to intantiate the parts for an assembly and find related parts respectively.

Yep. you found it. That was the suggested way in 2.x and the assemblies loaded so i figured that way is ok. I suppose you are talking about that attribute? Doesn't look like it is in netcore3.0 anymore or are the docs just not up to date? I have not seen any documentation about this attribute but i'll see if someone on github is using this attribute.

I'm glad I was able to help.
The attribute is in 3.0,
Closing this as there's no action for us to take here.

@javiercn but that didn't help? The docs suggest to use adding assembly parts like this and the application is breaking when i edit unrelated cshtml files. I have no idea why both tickets are closed now, since the problem still exists.

@taori My bad, I thought you meant that you fixed the issue with my suggestion. I’ll leave this open so that we can investigate.

It's fine that one ticket was closed since they sort of duplicate each other. Unfortunately the other ticket was closed because this one was closed. :smile: You can sort out which one may be closed, i suggested the other one should be closed because the title was inaccurate - viewcompilation does work, better than before, but for some odd reason editing files in a plugin scenario breaks the application, which is a rather severe issue.
I am currently forking pranavk's plugin app, to verify that this isn't related to how the parts are added, because in https://github.com/pranavkm/PluginApp there are neither references, nor ProvideApplicationPartFactoryAttribute used, which renders his project very similar to what i am trying to do (except he used another netcore app, since RCL wasn't around at the time i suppose)

@javiercn is there a guide to add your own sample to the sources of release/3.0 so i can debug this myself? I'm getting duplicate references warning and i am guessing you have some sort of cheat sheet to debug samples using the mvc sources?

@taori Not really. If you want to debug against the sources, I think it's better if you disable "just my code" and enable sourcelink. That's what we do even on the team when we debug repros.

@javiercn That's good to know. I wasn't sure if decompiling into sources and setting a breakpoint works with source link, since in that case you can't enter the call chain without it. Thanks for letting me know.

Closing this issue since we're already using the linked issue to discuss this further.


Can't create conda environment with python=3.8.13

I am getting the following message when I use conda create -n dervet-venv python=3.8.13:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - python=3.8.13

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

My guess is that your conda version is too old and does not have python 3.8.13
To determine the conda version that you have, run this command:
conda -V
The latest conda version is 4.13.0
To update conda (in your base environment), run:
conda update -n base -c defaults conda
After updating conda, the conda create  -n dervet-venv python=3.8.13 command should work.

I previously had conda 4.10.0 and after running conda update -n base -c defaults conda, I got conda 4.10.1, which is giving me the same error as before while trying to create an environment using python 3.8.13. I have tried ruuning conda install conda=4.13.0 to get the latest version of conda but I get the following error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - conda=4.13.0

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Try to install python=3.8 in your base environment first. Then update conda, and create the new environment.
Helpful commands for further investigation:
conda info
conda config --show-sources

I figured I had issues with my conda config file. I have fixed the issue and everything works fine now. Thanks for your help.


Use the term "guild" rather than "server" for consistency with the API

Again, please provide a description when creating an issue / pull request.
Discord uses the term "server", not guild.
If you search through the discord.py API here, you'll notice "guild" isn't mentioned once.
Are you sure you're in the right place?

Discord.py definitely uses Guild, both in source and docs

That is the documentation for discord.py rewrite, which we don't use
We're using the original discord.py, moving to the rewrite may happen in the future (particularly after the UI-rewrite)

Why would consistency with the API matter on the front end though? The official Discord UI uses "Server", while the API is what uses "Guild". Perhaps I'm misunderstanding the suggestion/issue, but if not, then front end should use front end terminology (it just seems reasonable!).

Either way. Should we be using the rewrite, it may make sense to use their terminology, but it is confusing in its own right.
A better question is why the rewrite chose to use 'guild' and not 'server', being that that's what Discord uses.

The Discord API uses the term Guild as well, so that's probably where it all stems from (presumably a legacy thing?). It's still not used on the front end, however, which is where the overwhelming majority of users live. To me it makes very little sense to mix back- and front-end terminology (though, to be fair, using inconsistent terminology to begin with also makes very little sense).

Why were all of these closed?

rewrite is in progress, check pull requests


Serialize and deserialize OAuth2AuthorizedClient with JSON.

The serialVersionUID in OAuth2AuthorizedClient will change between spring-security minor versions. To make serialize and deserialize compatible with different spring-security versions, use JSON to serialize and deserialize.

Hi, @yiliuTo , please review this PR. 🙏


PN532 class using hardware SPI

How can you open the hardware spi (spidev) what is the format for the spi parameter passed?
From the Source code:
def init(self, cs, sclk=None, mosi=None, miso=None, gpio=None,
spi=None):
"""Create an instance of the PN532 class using either software SPI (if
the sclk, mosi, and miso pins are specified)

or hardware SPI if a
spi parameter is passed.

The cs pin must be a digital GPIO pin.
Optionally specify a GPIO controller to override the default that uses
the board's GPIO pins.
""

In the code ... it seams incomplete ... if you set the spi=spi (or anything other than None) it then never sets up Adafruit_GPIO.SPI?
    # Setup SPI provider.
    if spi is not None:
        logger.debug('Using hardware SPI.')
        # Handle using hardware SPI.
        self._spi = spi
        self._spi.set_clock_hz(1000000)
    else:
        logger.debug('Using software SPI')
        # Handle using software SPI.  Note that the CS/SS pin is not used
        # as it will be manually controlled by this library for better
        # timing.
        self._spi = SPI.BitBang(self._gpio, sclk, mosi, miso)

I think I understand ... Do I have to setup the SPI (Adafruit_GPIO.SPI) in my code then call ...
pn532 = PN532.PN532(spi=PN532.SPI)
pn532.begin()

Yep you have the right idea about using hardware SPI, here's an example from a different chip but you can see the difference between using software bit banged SPI and hardware SPI is passing in a spi paramter that's constructed from the port & device: https://github.com/adafruit/Adafruit_Python_MCP3008/blob/master/examples/simpletest.py#L12-L22
For hardware SPI the CS pin will depend on the hardware.  For the Raspberry Pi for example SPI port 0 and device 0 is going to use GPIO pin CE0 / GPIO8, and SPI port 0 device1 will use CE1 / GPIO7.  These devices correspond to the /dev/spidev*.* devices, like /dev/spidev0.0 for port 0, device 0 and /dev/spidev0.1 for port 0, device 1.  The CS pin is needed with SPI because it tells the chip that it's about to receive a command from the SPI bus (so in theory multiple devices can share the bus as long as they have unique CS pins).  Sending and receiving data with the library through those /dev/spidev devices will automatically take care of toggling the CS pin when appropriate.
If you're running into trouble with the code posted above can you clarify what hardware you're using and how it's wired to the device?  Check that the hardware CS line for port 0 and device 0 is what you have connected to the PN532's CS line.  Also make sure you've adjusted the jumpers on the PN532 to enable SPI, see the picture of them here: https://learn.adafruit.com/raspberry-pi-nfc-minecraft-blocks/hardware-wiring

Here is the code I have ...
import Adafruit_GPIO.SPI as SPI
import Adafruit_PN532 as PN532

# Configuration for Raspberry Pi hardware SPI:
#CS         = 8
CS         = 24
SPI_PORT   = 0
SPI_DEVICE = 0

# Create an instance of the PN532 class.
pn532 = PN532.PN532(cs=CS, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE))

# Call begin to initialize communication with the PN532.  Must be done before
# any other calls to the PN532!
pn532.begin()

and here is what gets returned ...
Traceback (most recent call last):
  File "readmifare.py", line 55, in <module>
    pn532.begin()
  File "build/bdist.linux-armv6l/egg/Adafruit_PN532/PN532.py", line 336, in begin
  File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/GPIO.py", line 64, in set_low
  File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/GPIO.py", line 194, in output
IOError: [Errno 22] Invalid argument

Please don't close issues ... when they are not closed!

Hello sfranzyshen:
I am in the same situation as you:
IOError: [Errno 22] Invalid argument
Any solution...?

i have this problem too


(Optionally?) re-export hyper's header! macro

I've found myself needing to define a custom header for a CSRF token. I was hoping this code would work, but got an error that the macro was undefined:
#[macro_use]
extern crate reqwest;

header! { (XCsrfToken, "X-CSRFToken") => [String] }

Unless I'm missing something, getting this to work will require adding hyper to Cargo.toml as well as an extern crate declaration. That feels heavyweight for this case.
I'm wondering if this would need to be optional to avoid macro name collisions for projects that separately depend on hyper; in that case, would a feature work?

I think there was an issue from earlier where this was discussed... Ah yes found it:
https://github.com/seanmonstar/reqwest/issues/11#issuecomment-275290957

Would it be ok to close this as a duplicate of the issue I linked above?

Yea, closing as dupe of #11


Support Ruby 2.7's pattern matching syntax for Layout/SpaceAroundKeyword

This PR supports Ruby 2.7's pattern matching syntax for Layout/SpaceAroundKeyword.
The following is a technical note.
There are the following differences between case ... when and case ... in.
So there is a TODO test for this patch's test and I confirmed this syntax below:
https://bugs.ruby-lang.org/issues/17925
An answer will determine whether to enable or discard the commented out test in the future.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Thanks!


Integer value does not work for parameters

The quick reference says:
{_.version:03} = 024 (integer)
Which I presume is meant to indicate that you can get an integer value of a parameter by using :<digits>
This seems to work OK for version, but not other units
ie here, I want the value to read 123

The Python formatter is quite complex and "03" actually means to zero-pad the value up to 3 places, while ".0f" means to format a float to have zero decimal places.
Try with this example from the README.
{width:.0f} | 6 (No decimal places)
I read through the README and realized that the v{_.version:03} (pad) and {d1:03.0f} (pad and no decimals) examples are a bit unclear on what is happening.

That works, thanks!


Hidden Desktop control

Can someone fork that rat and add a hidden desktop control. I dont think the owner will update it anymore. In my head that could be done if it auto creates a second desktop (thats a windows option) and then make a remote control of that desktop, while he sees his own (the first one). That would be really useful.

Useful for what? There is no useful purpose of that feature, while it will encourage to commit a crimes.

Useful for what? There is no useful purpose of that feature, while it will encourage to commit a crimes.

It can be useful for doing work/updates and fixes while not disturbing someone doing work on that station. A tool is neither good nor bad, it's the intention of the user. People need to stop thinking like a woke person and trying to control others, that's the real crime. Of course this is just my take on things so I'm neither right or wrong.

I don't really think that's how you do the updates. If you are an administrator of given infra, you won't update stuff while someone is currently working.
Also for 'work' you should have separate account, or use CAL licenses for RDP. I thought you've figured it out by now?

I don't really think that's how you do the updates. If you are an administrator of given infra, you won't update stuff while someone is currently working. Also for 'work' you should have separate account, or use CAL licenses for RDP. I thought you've figured it out by now?

 Can you add this feature?

just use one version older and you will get same rat but no message box


docs: showcase user Pulsar

Motivation
Adding Pulsar to users page.
Have you read the Contributing Guidelines on pull requests?
Yes !
Screenshot

Hi @yangshun, PTAL Thanks !

In apache/pulsar#4163, it was mentioned that we can use the SVG file. Let's use it instead? It's 1.8kb vs the 100kb that this PNG is.
@yangshun
I converted it to png to have the 512x512 size, now i converted it to svg again.
i've also updated the above screenshot PTAL Thanks !

In apache/pulsar#4163, it was mentioned that we can use the SVG file. Let's use it instead? It's 1.8kb vs the 100kb that this PNG is.
@yangshun
I converted it to png to have the 512x512 size, now i converted it to svg again.
i've also updated the above screenshot PTAL Thanks !

Also, we probably don't want to mention #1080 in the PR summary or else the entire issue will be closed when this PR merges.

Agreed, Changed that as well Thanks !


intercept ping traffic

Hi,
I'm new to TUN/TAP but I have been programming in Go for a while.
I couldn't find great tutorials online for general TUN/TAP information and not many examples here, but what I am trying to do is intercept PING messages (in and out) and control the response of them (increase the latency artificially) as an academic exercise in learning about virtual network interfaces.
Would anyone be able to provide an example of receiving a ping message and responding to it with an artificial delay?
My goal is to understand using TUN/TAP at both the layer 3 (ICMP) interception and then at layer 7 HTTP (i.e making a GET request to http://example.com over the TUN/TAP)
I have looked around but I'm on a mac and the general internet information is very linux specific. Water seems like the way to go about this, but i struggled to find much in the way of examples. A very basic example doing the above would really give me a head start.
Thanks!

@amlwwalker I'm in the same position as you, but having trouble on forwarding the packet after interception. Any progress?


how to build oci image locally using make command

from make help command I see below options for building oci image
[shared] Build
$(oci_push_targets)           > Build and push OCI image.
If the tag already exists, this target will overwrite it.
If an identical image was already built before, we will add a new tag to it, but we will not sign it again.
Expected pushed images:
- :v1.2.3, @sha256:0000001
- :v1.2.3.sig, :sha256-0000001.sig
$(oci_maybe_push_targets)     > Run 'make oci-push-...' if tag does not already exist in registry.
$(oci_load_targets)           > Build OCI image for the local architecture and load
it into the $(kind_cluster_name) kind cluster.
$(oci_build_targets)          > Build the OCI image.
But when I try below option I'm observing below error, can someone please help here
manchala@sharath-am:~/GCRdev/istio-csr$ make $(oci_build_targets)
oci_build_targets: command not found
Usage: make [target1] [target2] ...

The command is make oci-build-manager, the help target is currently not able to determine what the oci_build_targets value is.


Add new meta scope to identify jsx start tag

From https://github.com/Microsoft/vscode/issues/36175
Code
For code such as

We'd like a new meta scope that specially marks the contents of the start tag itself (the parts between < and >). This is required to make sure we use the proper comment syntax in the editor

Actually, I believe it may make more sense to add a new scope to identify when we are in an attribute list instead of trying to identify when we are in an start tag


Use lower bound when a version range with lower and upper bound is specified

Following the discussion in #2954, it was decided that it makes sense for SBT to use the lower bound
in case multiple version candidates are found. This was implemented in #2959 and sbt/librarymanagement#80.
The current implementation picks the lower bound of a version range if there is no specified upper bound (e.g., [2.4,)). However, it does not seem to pick the lower bound if there is a specified upper bound (e.g., [2.4,3.0)), which should probably also be the case.
Further, some test cases also look like the version range is converted to its upper bound, which I'm not sure is correct but could be.
Tested with SBT 1.1.0
Use case
Assuming you have a library that depends on Akka 2.4. So when using the library in another project, the Akka dependency should be transitively resolved. Since all 2.x versions following Akka 2.4 will be binary-compatible, it would be nice to define the dependency as "com.typesafe.akka" %% "akka-actor" % "[2.4,3.0)" (so SBT does not issue dependency incompatibility warnings). However, this will keep downloading the latest version (even if a compatible version is locally cached) and, more importantly, it will also download RC versions (which is usually not what you want).

Do you have a repro project that we can use for testing?

There is currently no public repo, but if you just use this as an build.sbt file:
scalaVersion := "2.12.4"
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "[2.4,3.0)"

Doing an sbt compile,  SBT 1.1 will check online and download the latest version (in this case Akka Actors 2.5.11).
One thing that might be related (not sure):
Using something like:
scalaVersion := "2.12.4"
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-stream" % "2.4.20",
  "com.typesafe.akka" %% "akka-actor" % "[2.4,3.0)")

Akka Stream 2.4.20 depends on Akka Actors 2.4.20 (which is supported by the version range), but SBT resolves Akka Actors 2.5.11 (not sure if this is intended). In that specific case, it's easy to fix, but if you have a project, which explicitly depends on "2.4.20" and depends on library, which transitively depends on "[2.4,3.0)", SBT could resolve the 2.4.20 dependency satisfying all constraints (but it seems it resolves to 2.5.11 issuing eviction warnings).


[help] Vim-plug canot be loaded

I get this when set up the vim plugin :
line   15:
E117: Unknown function: plugin#begin
line   16:
E492: Not an editor command: Plug 'vim-airline/vim-airline'
line   17:
E117: Unknown function: plugin#end
Press ENTER or type command to continue

And the result for :scriptname is this:
  1: /usr/share/vim/vimrc
  2: ~/.vimrc
  3: /usr/share/vim/vim82/filetype.vim
  4: /usr/share/vim/vim82/ftplugin.vim
  5: /usr/share/vim/vim82/indent.vim
  6: /usr/share/vim/vim82/syntax/syntax.vim
  7: /usr/share/vim/vim82/syntax/synload.vim
  8: /usr/share/vim/vim82/syntax/syncolor.vim
  9: /usr/share/vim/vim82/plugin/getscriptPlugin.vim
 10: /usr/share/vim/vim82/plugin/gzip.vim
 11: /usr/share/vim/vim82/plugin/logiPat.vim
 12: /usr/share/vim/vim82/plugin/manpager.vim
 13: /usr/share/vim/vim82/plugin/matchparen.vim
 14: /usr/share/vim/vim82/plugin/netrwPlugin.vim
 15: /usr/share/vim/vim82/plugin/rrhelper.vim
 16: /usr/share/vim/vim82/plugin/spellfile.vim
 17: /usr/share/vim/vim82/plugin/tarPlugin.vim
 18: /usr/share/vim/vim82/plugin/tohtml.vim
 19: /usr/share/vim/vim82/plugin/vimballPlugin.vim
 20: /usr/share/vim/vim82/plugin/zipPlugin.vim

It seems that the vim-plugin is not loaded at all.  I apply chmod 777 to both .vim and .vim/autoload folder. Do we have any suggestions to manually load the plugin?
Thanks!

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 12 2022 04:26:50)

Type:

[ ] Bug
[ ] Enhancement
[ ] Feature Request
[X] Question

OS:

[ ] All/Other
[ ] Linux
[X] OS X
[ ] Windows

Vim:

[X] Terminal Vim
[ ] GVim
[ ] Neovim

had the same problem but later found the solution. check this out

Did you follow this instruction to install vim-plug?

Did you follow this instruction to install vim-plug?

Yes. But it has a little bug with vim 8+ and I found a possible solution

it has a little bug

There is no bug. If you put plug.vim file in the right autoload directory, Vim will automatically load it when you run plug#begin, and that's the whole point of autoload. No manual sourcing is required.

I use vim on windows 10 and vim 9’.0 and I usually receive and error of function plug#begin not defined or something similar to that. And it caused some plugins not to function properly. I had to tweak my plug.vim to fix this.
Sent from my iPhone

On 27 Aug 2022, at 02:57, Junegunn Choi @.***> wrote:

it has a little bug
There is no bug. If you put plug.vim file in the right autoload directory, Vim will automatically load it when you run plug#begin, and that's the whole point of autoload. No manual sourcing is required.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.

I needed to set
set runtimepath+=~/.vim
in my vimrc before plug#begin because the autoload folder was not loaded

@azak-azkaran thanks, this worked for me.