Find by ID but actually using by CSS

Hi Team,
I am playing around for the first time and trying to port my python script to use it, while the python script does the job, the golang version return an error when I do a
// extract code snippet
if action == "on" {
		elem, err = wd.FindElement(selenium.ByID, `Enable1:IPFilter`)
	} else {
		elem, err = wd.FindElement(selenium.ByID, `Enable0:IPFilter`)
	}
u.CheckErr(err, "")

The suspect thing is, even I search by ID (see above) but the error below is saying it uses "css selector". And it got errors.
I tried to dump screenshot before reaching that code it it look as expected. Manually browser to that page I check the element has ID etc, everything is all right.
The python script equivalent is like
if action == 'on':
    el = ff.find_element_by_id('Enable1:IPFilter')
else:
    el = ff.find_element_by_id('Enable0:IPFilter')

el.click()
time.sleep(3)

which works perfectly.
Is it a bug or I did something wrong? Thanks in advance.
2021/09/06 11:59:40 -> POST http://localhost:4444/session/d6253288-dede-46a3-aad6-63773ea0b78b/element
{"using":"css selector","value":"#Enable0:IPFilter:0"}
2021/09/06 11:59:40 <- 400 Bad Request [[application/json; charset=utf-8]]

{
    "value": {
        "error": "invalid selector",
        "message": "Given css selector expression \"#Enable0:IPFilter:0\" is invalid: InvalidSelectorError: Document.querySelector: '#Enable0:IPFilter:0' is not a valid selector: \"#Enable0:IPFilter:0\"",
        "stacktrace": "WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5\nInvalidSelectorError@chrome://remote/content/shared/webdriver/Errors.jsm:341:5\nfind_@chrome://remote/content/marionette/element.js:333:11\nelement.find/</findElements<@chrome://remote/content/marionette/element.js:287:24\nevalFn@chrome://remote/content/marionette/sync.js:137:7\nPollPromise/<@chrome://remote/content/marionette/sync.js:157:5\nPollPromise@chrome://remote/content/marionette/sync.js:128:10\nelement.find/<@chrome://remote/content/marionette/element.js:285:24\nelement.find@chrome://remote/content/marionette/element.js:284:10\nfindElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:240:20\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:99:31\n"
    }
}
2021/09/06 11:59:40 [ERROR] at  - invalid selector: Given css selector expression "#Enable0:IPFilter:0" is invalid: InvalidSelectorError: Document.querySelector: '#Enable0:IPFilter:0' is not a valid selector: "#Enable0:IPFilter:0"
exit status 1

OK if I change the code into like this it seems to get the correct element however, the element can not be clicked
//They are radio with same name so by name get them into an array
elems, err := wd.FindElements(selenium.ByName, "Enable:IPFilter")
	u.CheckErr(err, "")
	var onEle, offEle selenium.WebElement
	for _, _ele := range elems {
		_text, err := _ele.GetAttribute("id"); //Strange that now it can get the attr id correctly
		u.CheckErr(err, "")
		if _text == "Enable1:IPFilter" {
			onEle = _ele
			if action == "on" {
				time.Sleep(commonSleepDuration)
				onEle.Click()
			}
			continue
		}
		if _text == "Enable0:IPFilter" {
			offEle = _ele
			if action == "off" {
				time.Sleep(commonSleepDuration)
				offEle.Click()
			}
		}
	}

Click return error
2021/09/06 15:22:45 <- 400 Bad Request [[application/json; charset=utf-8]]
{
    "value": {
        "error": "element not interactable",
        "message": "Element <input id=\"Enable1:IPFilter\" name=\"Enable:IPFilter\" type=\"radio\"> could not be scrolled into view",
        "stacktrace": "WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5\nElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.jsm:291:5\nwebdriverClickElement@chrome://remote/content/marionette/interaction.js:156:11\ninteraction.clickElement@chrome://remote/content/marionette/interaction.js:125:11\nclickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:200:24\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:91:31\n"
    }
}

Obviously the screenshot shows they are all visible!
There is no way to scroll the view using the wd .
Times up for me for this evaluation, I think I got to abandon it :( and back to python where all works without any effort.

Update my journey. So the second errors are mine, wrong ID. Basically my code now work now just update the id value correctly.
However the main issues still remain, why it can not get ByID in the first place? Strange is the python script can get the ID - Is there anything different in the python implementation that allow it to work?
I may play a bit more by create a simple page with radios button - the same scenarios and and a test case completed. Stay tuned

OK now I have a test code. The code below when run will create errors
package main

import (
	"net/http"
	"flag"
	"time"
	"io/ioutil"
	"fmt"
	"os"
	u "github.com/sunshine69/golang-tools/utils"
	"github.com/tebeka/selenium"
	"net/http/httptest"
)
var (
	geckoDriverPath string
	port            = 4444
	commonSleepDuration, _ = time.ParseDuration("10s")
	action string
)

func SaveScreenShot(filename string, wd selenium.WebDriver) {
	screen_shot, _ :=  wd.Screenshot()
	ioutil.WriteFile(filename, screen_shot, 0600)
}
func main() {
	testserver := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprintln(w, `<html>
		<head>
		  <title></title>
		</head>
		<body>
		<form name="test">
		<input id="Enable1:IPFilter:0" name="Enable:IPFilter:0" type="radio" checked="checked"/>R1
		<input id="Enable0:IPFilter:0" name="Enable:IPFilter:0" type="radio" /> R2</form>

		<p> </p>
		</body>
		</html>
		`)
	}))
	defer testserver.Close()

	// Start a Selenium WebDriver server instance (if one is not already
	// running).
	flag.StringVar(&action, "a", "", "Action on/off")
	flag.StringVar(&geckoDriverPath, "g", os.Getenv("HOME") +  "/.local/bin/geckodriver", "Path to geckodriver")
	flag.Parse()

	opts := []selenium.ServiceOption {
		// selenium.StartFrameBuffer(),           // Start an X frame buffer for the browser to run in.
		selenium.GeckoDriver(geckoDriverPath), // Specify the path to GeckoDriver in order to use Firefox.
		selenium.Output(os.Stderr),            // Output debug information to STDERR.
	}
	selenium.SetDebug(true)
	service, err := selenium.NewGeckoDriverService(geckoDriverPath, port, opts[0])
	u.CheckErr(err, "NewGeckoDriverService")
	defer service.Stop()

	// Connect to the WebDriver instance running locally.
	caps := selenium.Capabilities{"browserName": "firefox"}
	wd, err := selenium.NewRemote(caps, fmt.Sprintf("http://localhost:%d", port))
	u.CheckErr(err, "")
	defer wd.Quit()
	wd.Get(testserver.URL)
	r1, err := wd.FindElement(selenium.ByID, "Enable0:IPFilter:0")
	u.CheckErr(err, "")
	r1.Click()
	time.Sleep(commonSleepDuration)
}

However if I change the ID to be normal (did try with id="r1" and id="r2" then no error.
Looks like it choked because the value of id is like that. However searching specs, they are perfect valid id.
As of now I don't know where to bug? firefox geckodriver? But python works fine.
So please take a look at the example and see where the bug is coming from.

2021/09/07 10:04:43 -> POST http://localhost:4444/session/cba190f8-5f7b-46d0-b6f8-1496506ae9ca/url
{"url":"http://<IP_ADDRESS>:39379"}
2021/09/07 10:04:43 <- 200 OK [[application/json; charset=utf-8]]
{
    "value": null
}
2021/09/07 10:04:43 -> POST http://localhost:4444/session/cba190f8-5f7b-46d0-b6f8-1496506ae9ca/element
{"using":"css selector","value":"#Enable0:IPFilter:0"}
2021/09/07 10:04:43 <- 400 Bad Request [[application/json; charset=utf-8]]
{
    "value": {
        "error": "invalid selector",
        "message": "Given css selector expression \"#Enable0:IPFilter:0\" is invalid: InvalidSelectorError: Document.querySelector: '#Enable0:IPFilter:0' is not a valid selector: \"#Enable0:IPFilter:0\"",
        "stacktrace": "WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:181:5\nInvalidSelectorError@chrome://remote/content/shared/webdriver/Errors.jsm:341:5\nfind_@chrome://remote/content/marionette/element.js:333:11\nelement.find/</findElements<@chrome://remote/content/marionette/element.js:287:24\nevalFn@chrome://remote/content/marionette/sync.js:137:7\nPollPromise/<@chrome://remote/content/marionette/sync.js:157:5\nPollPromise@chrome://remote/content/marionette/sync.js:128:10\nelement.find/<@chrome://remote/content/marionette/element.js:285:24\nelement.find@chrome://remote/content/marionette/element.js:284:10\nfindElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:240:20\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:99:31\n"
    }
}
2021/09/07 10:04:43 [ERROR] at  - invalid selector: Given css selector expression "#Enable0:IPFilter:0" is invalid: InvalidSelectorError: Document.querySelector: '#Enable0:IPFilter:0' is not a valid selector: "#Enable0:IPFilter:0"
exit status 1

So any colon : in the value od id will choke it.


Convenient way to save and reuse iterable structs?

I am using an iterative solver within another iterative process. It would be nice to preallocate and reuse the iterable structs instead of reallocating at each call. Is this possible/convenient right now? If not, would this be a feature of interest I can work on?

Hey, this was certainly the idea behind iterable structs. What is your particular use case? Does the matrix change? Or the right-hand side? The initial guess? All of that?
At this point we do not expose the iterators in the public api, but you can access and initialize them via
iterable = IterativeSolvers.cg_iterator!(x, A, b)

and later reuse them by resetting appropriate fields; this is now a bit cumbersome:
fill!(iterable.u, 0.0)
fill!(iterable.x, 0.0) # zero initial guess
copy!(iterable.r, my_new_rhs) # residual is just your new right-hand side
iterable.residual = norm(my_new_rhs) # initial residual norm
iterable.reltol = residual * tol # relative residual norm for stopping criterion
iterable.prev_residual = 1.0

It's cumbersome in particular because resetting an iterator is different for each iterative method, and you would have to look into the source to find out how to do it correctly.
Maybe we could make this better with helper functions like update_rhs!(iterable, my_new_rhs) or reset!(iterable). Another way is not to mutate the current iterable, but construct a new iterable from the previous one, and provide a convenient constructor for it.
I'm not completely convinced what is best at this point.


[Help]:  MAI or POT?

Hello everyone，I wonder if pygmtsar could do MAI or POT?

No, but you could create them yourself using PyGMTSAR-aligned data stacks.

No, but you could create them yourself using PyGMTSAR-aligned data stacks.

Thank you for your reply, AlexyPechnikov. As a college student and a beginner in InSAR, I would greatly appreciate any advice or assistance you could provide on learning MAI or POT. My email is<EMAIL_ADDRESS>


corrections to redfish paths needed in redfish/systems/test_systems_inventory.robot

The paths used by the following tests in the redfish/systems/test_systems_inventory.robot suite require modifications:
Get Motherboard Serial And Verify Populated
Verify Motherboard Manufacturer Field Value Populated
Verify Motherboard Partnumber Field Value Populated
The field after /redfish/v1/Chassis/ should probably be determined dynamically using OData or using ${CHASSIS_ID}
As a workaround, I used ${CHASSIS_ID} as show with this git diff:
diff --git a/redfish/systems/test_systems_inventory.robot b/redfish/systems/test_systems_inventory.robot
index 915448c1..8bef2f10 100755
--- a/redfish/systems/test_systems_inventory.robot
+++ b/redfish/systems/test_systems_inventory.robot
@@ -122,7 +122,7 @@ Get Motherboard Serial And Verify Populated
     [Tags]  Get_Motherboard_Serial_And_Verify_Populated

     ${serial_number}=  Redfish.Get Attribute
-    ...  ${REDFISH_CHASSIS_URI}motherboard  SerialNumber
+    ...  ${REDFISH_CHASSIS_URI}${CHASSIS_ID}  SerialNumber
     Valid Value  serial_number
     Rprint Vars  serial_number

@@ -132,7 +132,7 @@ Verify Motherboard Manufacturer Field Value Populated
     [Tags]  Verify_Motherboard_Manufacturer_Field_Value_Populated

     ${motherboard_manufacturer}=  Redfish.Get Attribute
-    ...  ${REDFISH_CHASSIS_URI}motherboard  Manufacturer
+    ...  ${REDFISH_CHASSIS_URI}${CHASSIS_ID}  Manufacturer
     Valid Value  motherboard_manufacturer

@@ -141,7 +141,7 @@ Verify Motherboard Partnumber Field Value Populated
     [Tags]  Verify_Motherboard_Partnumber_Field_Value_Populated

     ${motherboard_part_number}=  Redfish.Get Attribute
-    ...  ${REDFISH_CHASSIS_URI}motherboard  PartNumber
+    ...  ${REDFISH_CHASSIS_URI}${CHASSIS_ID}  PartNumber
     Valid Value  motherboard_part_number

As for motherboard,  the current code looks correct
GET /redfish/v1/Chassis/
{
<EMAIL_ADDRESS>"/redfish/v1/Chassis",
<EMAIL_ADDRESS>"#ChassisCollection.ChassisCollection",
    "Members": [
        {
<EMAIL_ADDRESS>"/redfish/v1/Chassis/chassis"
        },
        {
<EMAIL_ADDRESS>"/redfish/v1/Chassis/motherboard"
        }
    ],
<EMAIL_ADDRESS>2,
    "Name": "Chassis Collection"
}

Fix in review https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/51482


Null Conditional Member Access Invokes Argument Multiple Times

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
Write an expression of the form (<command>)?.a?.b and note that <command> is executed/recomputed multiple times, depending on the number of conditional accesses, whether they were successful (non-null) or if nested objects are involved. I've not be able to figure out the exact pattern/rules behind it.
I noticed this originally when debugging a script that for some reason was calling my API multiple times (creating multiple objects). It turned out to be because I was doing something to similar to (Invoke-RestMethod ...)?.something?.else.
I'm also not sure if this is technically a bug or not. I would assume that it is especially when you compare the behavior to the direct/non-conditional access behavior. I did search the issues, however it is quite difficult given the syntax involved, so apologies if I've missed something.
Expected behavior
All of the below should behave like the non conditional access and only invoke the expressions once
> $(Write-Host "blah"; @{ x=1 })?.x
blah
1

# one time, not eight!
> $(Write-Host "blah"; @{ x=@{ z=2 } }).x.z.y
blah

Actual behavior
Expression is invoked multiple times, depending on the order of conditional access and level of nested objects
> $(Write-Host "blah"; @{ x=1 })?.x
blah
blah
1

> $(Write-Host "blah"; @{ x=1 })?.x?.y
blah
blah
blah
blah

# remove the last conditional and reduce to two times
> $(Write-Host "blah"; @{ x=1 })?.x.y
blah
blah

# now invert it and start with a known absent prop
> $(Write-Host "blah"; @{ x=1 })?.y
blah
blah

# stays the same for further accesses
> $(Write-Host "blah"; @{ x=1 })?.y?.x
blah
blah

# but now nest some objects.... eight times!
> $(Write-Host "blah"; @{ x=@{ z=2 } })?.x?.z?.y
blah
blah
blah
blah
blah
blah
blah
blah

Error details
N/A

Environment data
Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

Good find; I'd say it's definitely a bug: not only is it inefficient to re-evaluate, there's no guarantee that the command /  expression is idempotent, i.e. it can have side effects; for instance:
$q = [System.Collections.Queue] ((Get-Date), (Get-Date -year 1970)); $q.Dequeue()?.Year

Due to use of ?. instead of .,  .Dequeue() is called twice and the second item in the queue is returned.

Yah that's how I noticed it. I was calling a REST method that created new objects and I kept ending up with two instead of the expected one. It took me a long time to debug because it was working fine in postman for example.


pkg-config support

I'd like to have pkg-config support in the rpm packages. Feel free to cherry-pick generation from https://salsa.debian.org/enrico/publicdecompwt

For the time being I added a finely crafted .pc file as a quick-and-dirty solution, for the future I might steal the cmake approach from https://salsa.debian.org/enrico/publicdecompwt, thanks


rollup with rollup-plugin-babel doesn't support sourcemap

I found two case where rollup can't emit sourcemap but rollup works well if disable sourcemap.
https://gist.github.com/tvolodimir/99662933070978cfe8dcda48b2ec5338
How to workaround this problems if I have these two cases in not my own npm package?

with<EMAIL_ADDRESS>can't reproduse


GM uses old style keys add command

Summary of Bug
Post-merging #2251 we broke gm, specifically command gm hermes keys:
$ gm hermes keys
2022-06-02T16:35:20.808814Z TRACE ThreadId(01) deserialized the encoded pub key into a ProtoAny of type '/cosmos.crypto.secp256k1.PubKey'
Success: Added key 'wallet2' (cosmos1vxx437j8y0xqg4mw7fegu6qqza8nep258gclu7) on chain ibc-0
error: Found argument '--name' which wasn't expected, or isn't valid in this context

	If you tried to supply `--name` as a value rather than a flag, use `-- --name`

USAGE:
    hermes keys add --key-file <KEY_FILE> --mnemonic-file <MNEMONIC_FILE> <CHAIN_ID>

Version
4397e4f6394efa2a333cc9dc27c7f982295f1af3
Acceptance Criteria

[ ] gm hermes keys works as intended

For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate milestone (priority) applied
[ ] Appropriate contributors tagged
[ ] Contributor assigned/self-assigned

Ah good catch, sorry for not thinking of that earlier.
@ljoss17 Can you please take a look?

No worries, I didn't think of this case either until I encountered it now.
I have a tentative fix https://github.com/informalsystems/ibc-rs/pull/2263 but we should scrub the repository for .*keys add.* and .*keys restore.* to double-check any lingering references to these CLIs.


OIDC expirations cause incorrect timelines

because of the gappy syncs, and how initial syncs use timeline limit: 1 to pull in valid prev batch tokens, it means timeline_limit: 20 is pulling in the actual latest event then prepend state events then whatever crap was in the timeline before the last poller expired, see picture.

Ideally we would just return the latest event in this scenario, with a correct prev batch token so the client can backfill the data but that means we need to know where the gaps are, so we can then terminate the timeline fetch at the right spot.
The gap flag is a property of the event in the events table, as that table is the timeline ordering.

Strictly not limited to OIDC:

i.e A and B in room X, only A using the proxy, send 20 msgs then sign out, some msgs go by, some state events, then B uses the proxy -> prepend the missed state+ see latest event only, then request timeline_limit: 20 and you'll see the same thing.


Error when using tensor-split

Just a heads up. When using tensor-split I get an error.
  (def ctx (llama/create-context model-path {:n-gpu-layers 30
                                             :main-gpu 0
                                             :tensor-split [1.0]}))

I get an error:
1. Caused by java.lang.IllegalArgumentException
   Can not set com.sun.jna.ptr.FloatByReference field
   com.phronemophobic.llama.raw.structs.llama_context_params.tensor_split
   to [F

UnsafeFieldAccessorImpl.java:  167  jdk.internal.reflect.UnsafeFieldAccessorImpl/throwSetIllegalArgumentException
UnsafeFieldAccessorImpl.java:  171  jdk.internal.reflect.UnsafeFieldAccessorImpl/throwSetIllegalArgumentException
UnsafeObjectFieldAccessorImpl.java:   81  jdk.internal.reflect.UnsafeObjectFieldAccessorImpl/set
                Field.java:  780  java.lang.reflect.Field/set
            Structure.java:  668  com.sun.jna.Structure/setFieldValue
            Structure.java:  662  com.sun.jna.Structure/setFieldValue
            Structure.java:  837  com.sun.jna.Structure/writeField
                      REPL:   49  com.phronemophobic.llama/map->llama-params/fn

Not urgent. I'll take a look at solving this - but thought I would post this here too. Thanks!

Good catch! That bug was introduced when updating the API.

Should be fixed by c3391d5699fbf96fe63b214f1318a521f5cd9221.

Excellent. I've upgraded to the new commit and that fixes that for me. Thanks!


improve agenda options

enable showing events on the next X days, e.g.:
khal agenda --days 7

should show all events in the next 7 days,
khal agenda --days 7 01.08.

should show all events from 1st to 8th of august
--days might not be the best name for that option

As noted in #156 the current name of the agenda command is misleading, since it limits the range of days whose events are shown. I think it should only limit the amount of events shown by default.

We could also abandon all options and instead do this similarly to how git shows logs: Just print all and throw them into a pager. I'm not sure of the performance implications, we should figure out how to do lazy loading.

I like the pager idea (and also something similar in ikhals event list). But I still would like two different behaviours.

event centric: just list all events in order
day centric: kind of like it is now, showing dates as headlines and every event that is scheduled for that day below it, meaning that events that span multiple days are displayed several times. Showing headlines for days without any scheduled events could be optional.

Lazy loading should be pretty easy, I'll get to this once I have merged event_rewrite and got deleting and modifying of single recurrence instances (and THISANDFUTURE) working.

I think instead of calling them modes there should be one flag that determines whether to group events by day, which also implies repeating multi-day events.

@geier I'd like to start working on this soon-ish. Should I wait for #223 or would a PR for this issue cause no conflicts?

This really depends what you want to do. Lazy loading would probably need to be implemented again.

I don't think lazy loading is related to the event class, but rather a property of get_agenda in khal.controllers, no?

I would implement this through a new backend method which does this with
SQL and I rewrote parts of the backend as well
Quoting Markus Unterwaditzer (2015-07-15 13:00:53)

I don't think lazy loading is related to the event class, but rather a property of get_agenda in khal.controllers, no?

Reply to this email directly or view it on GitHub:
https://github.com/geier/khal/issues/93#issuecomment-121581851

but feel free to have go at this if you want to and have the time, as
long as you don't touch anything in the backend you should be good
Quoting Markus Unterwaditzer (2015-07-15 13:00:53)

I don't think lazy loading is related to the event class, but rather a property of get_agenda in khal.controllers, no?

Reply to this email directly or view it on GitHub:
https://github.com/geier/khal/issues/93#issuecomment-121581851

I wonder if we should switch to an ORM for querying the backend more flexibly. The current thing I have is rather slow (as it queries chunk-wise for each day). It streams properly and less is usable while khal is still sending SQL queries for the year 2030, but as soon as I hit G to get to the end of the list, less hangs up and I have to hit ^C which kills khal but not less.
I'm doing this without Click's echo_via_pager because that one requires us to build a string upfront. Perhaps this should be improved as well: echo_via_pager could take arbitrary iterators or files, for example.

What flexibility would you expect could be gained from switching to an ORM?
I do agree that the current way of querying the the database sucks and I intend to improve that. E.g. I want to remove the whole collection construct, which should already reduce the number of queries. While we won't get rid of separate queries for localized and floating events this shouldn't really be exposed to the higher levels.
Currently I'm thinking of something like this:
def get_events_at(self, at=datetime):
   """get all events at datetime"""
    returns list of Events

def get_events_onnself, on=date):
    "get all events that are on date"""

def get_events_from(self, start=datetime, end=None):
    return an iterator that lazily gets new events from the db

I'm not yet sure if the second one is really needed

We wouldn't have to create our own API for querying the backend anymore, and
don't write any SQL.
Flexibility is the wrong word I suppose but I think we'd save a lot of code.
On Tue, Jul 21, 2015 at 06:57:12AM -0700, Christian Geier wrote:

What flexibility would you expect could be gained from switching to an ORM?
I do agree that the current way of querying the the database sucks and I intend to improve that. E.g. I want to remove the whole collection construct, which should already reduce the number of queries. While we won't get rid of separate queries for localized and floating events this shouldn't really be exposed to the higher levels.
Currently I'm thinking of something like this:
def get_events_at(self, at=datetime):
   """get all events at datetime"""
    returns list of Events

def get_events_onnself, on=date):
    "get all events that are on date"""

def get_events_from(self, start=datetime, end=None):
    return an iterator that lazily gets new events from the db

I'm not yet sure if the second one is really needed

Reply to this email directly or view it on GitHub:
https://github.com/geier/khal/issues/93#issuecomment-123315289

@untitaker what do expect to see when hitting G? (especially once lazily expansion of recurrence rules is implemented).

Less scrolls to the bottom when hitting G. I don't think implementing our own pager is worth it.
On 21 July 2015 17:48:08 CEST, Christian Geier<EMAIL_ADDRESS>wrote:

@untitaker what do expect to see when hitting G? (especially
once lazily expansion of recurrence rules is implemented).

Reply to this email directly or view it on GitHub:
https://github.com/geier/khal/issues/93#issuecomment-123380611

--
Sent from my phone. Please excuse my brevity.

if there is no ORM that supports icalendar's RRULE and floating and localized events I'm against using one, because it will not make the insertion process any easier (which IMO is the hard part) but adds complexity to the technology stack (ok this might be me, because I don't use any ORM anywhere but do know some SQL).

Less scrolls to the bottom when hitting G. I don't think implementing our own pager is worth it.

But what is the bottom of an infinite list? I think we should somehow limit how far agenda shows events into the future.

I assumed that it should stop at the last even in the db but that's costly.
On 21 July 2015 17:52:10 CEST, Christian Geier<EMAIL_ADDRESS>wrote:

Less scrolls to the bottom when hitting G. I don't think implementing
our own pager is worth it.

But what is the bottom of an infinite list? I think we should somehow
limit how far agenda shows events into the future.

Reply to this email directly or view it on GitHub:
https://github.com/geier/khal/issues/93#issuecomment-123381998

--
Sent from my phone. Please excuse my brevity.

closed, see #273


Log pod manifest on completion

For debugging purposes it would be good to log the pod's manifest. This should be optional and use a feature flag (see https://github.com/argoproj/argo/pull/2219/files#diff-47785e33eca44160010dfabf539712c0)
See #2321

@sarabala1979 did you want to do this one?


问题：object of type 'NoneType' has no len()

ComfyUI Error Report
Error Details

Node Type: JoyCaption2_simple
Exception Type: TypeError
Exception Message: object of type 'NoneType' has no len()

Stack Trace
  File "G:\ComfyUI-aki-v1.4\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "G:\ComfyUI-aki-v1.4\execution.py", line 228, in get_output_data
    output = merge_result_data(results, obj)

  File "G:\ComfyUI-aki-v1.4\execution.py", line 175, in merge_result_data
    output_is_list = [False] * len(results[0])

System Information

ComfyUI Version: v0.2.3
Arguments: main.py --windows-standalone-build
OS: nt
Python Version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Embedded Python: false
PyTorch Version: 2.4.1+cu124

Devices

Name: cuda:0 NVIDIA GeForce RTX 3080 : cudaMallocAsync

Type: cuda
VRAM Total:<PHONE_NUMBER>0
VRAM Free:<PHONE_NUMBER>
Torch VRAM Total:<PHONE_NUMBER>
Torch VRAM Free:<PHONE_NUMBER>

This issue is most likely due to the version of peft
try to update to the required 0.12.0
for comfyui windows version under python_embeded folder
./python.exe -m pip install peft==0.12.0

I had the same error took me 2 days to figure it out for a simple stupid switch
ERROR SOLVED
J2C node:
JoyCaption2_simple
object of type 'NoneType' has no len()
You don't have enough vram, you must use nf4 model loader AND in J2C node change dtype in nf4

Hey @TTPlanetPig – first of all THX a lot for this great custom node :) ! I am currently testing different vision models against each other. Joy Caption is really strong!
I had the same error object of type ‘NoneType’ has no len()
I found the instructions for installing the JoyCaption lora (is it really a “lora”?) somewhat misleading.
If you visit the URL https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two, you get to a hugging face space / app and not to the overview of the stored data. This would then be the link https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two/tree/main.
And then I was confused by the subfolder “cgrkzexw-599808” inside of the folder structure on the HF page, because you had written that the corresponding data in ComfyUI should be copied to a subfolder “cgrkzexw-599808” (...\models\Joy_caption\cgrkzexw-599808). At first I didn't know if I could ignore the data on the first level and only need the data in the “cgrkzexw-599808” folder.
However, this only seemed to be important for the manual download option. In the end, I was able to download the complete dataset with the command git clone https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two C:\test.
Cheers

I have had this issue before, and after checking to make sure all the models are in the correct place, I realized that it wasn't loading the LLM model into memory. Because of how I set my clip and vae into specific cpu/gpu, some how it couldn't load the unsloth model into cuda:0... once i disabled the clip and vae forcing, it worked fine.

I have had this issue before, and after checking to make sure all the models are in the correct place, I realized that it wasn't loading the LLM model into memory. Because of how I set my clip and vae into specific cpu/gpu, some how it couldn't load the unsloth model into cuda:0... once i disabled the clip and vae forcing, it worked fine.

same issues! how to disabled the clip and vae?

unbelievable, no matter what i try - it still gives me the same error that was mentioned above. Linux, python 3.12

same problem

“pip uninstall bitsandbytes” and “pip install bitsandbytes”  fix the prmblem

ComfyUI Error Report
Error Details

Node ID: 3
Node Type: JoyCaption2_simple
Exception Type: TypeError
Exception Message: object of type 'NoneType' has no len()

Stack Trace
  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 228, in get_output_data
    output = merge_result_data(results, obj)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 175, in merge_result_data
    output_is_list = [False] * len(results[0])

System Information

ComfyUI Version: v0.3.4-5-gb4526d3
Arguments: ComfyUI\main.py --windows-standalone-build
OS: nt
Python Version: 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Embedded Python: true
PyTorch Version: 2.4.0+cu118

Devices

ComfyUI Error Report
Error Details

Node ID: 3
Node Type: JoyCaption2_simple
Exception Type: TypeError
Exception Message: object of type 'NoneType' has no len()

Stack Trace
  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 228, in get_output_data
    output = merge_result_data(results, obj)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 175, in merge_result_data
    output_is_list = [False] * len(results[0])

System Information

ComfyUI Version: v0.3.4-5-gb4526d3
Arguments: ComfyUI\main.py --windows-standalone-build
OS: nt
Python Version: 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Embedded Python: true
PyTorch Version: 2.4.0+cu118

Devices

缺模型Joy_caption/cgrkzexw-599808/text_model ，去Joy_caption下载

“pip uninstall bitsandbytes” and “pip install bitsandbytes” fix the prmblem

nope. in my case it does not help in any way

ComfyUI Error Report
Error Details

Node ID: 58
Node Type: JoyCaption2_simple
Exception Type: TypeError
Exception Message: object of type 'NoneType' has no len()

Stack Trace
  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 228, in get_output_data
    output = merge_result_data(results, obj)

  File "C:\ComfyUI_MAI\ComfyUI\execution.py", line 175, in merge_result_data
    output_is_list = [False] * len(results[0])

System Information

ComfyUI Version: v0.3.5-8-gbf2650a
Arguments: ComfyUI\main.py --windows-standalone-build
OS: nt
Python Version: 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Embedded Python: true
PyTorch Version: 2.4.0+cu118

Devices

im still having this issue..is there a good solution? keeps giving: JoyCaption2_simple
object of type 'NoneType' has no len()

im still having this issue..is there a good solution? keeps giving: JoyCaption2_simple我仍然遇到这个问题..有没有好的解决方案？持续给予： JoyCaption2_simple object of type 'NoneType' has no len()'NoneType' 类型的对象没有 len（）

You may need Joy_caption/cgrkzexw-599808/text_model ，search Joy_caption for download.

Start to load existing VLM
Loading in bfloat16
Loading CLIP
Error loading models: Couldn't build proto file into descriptor pool: duplicate file name sentencepiece_model.proto
Error loading model: cannot access local variable 'clip_processor' where it is not associated with a value
!!! Exception during processing !!! object of type 'NoneType' has no len()
上面的错误我尝试降级 protobuf 版本后可以运行了：pip install protobuf==3.20.0
不太建议这么做，因为我的另一个插件因为降版本爆炸了（

Start to load existing VLM Loading in bfloat16 Loading CLIP Error loading models: Couldn't build proto file into descriptor pool: duplicate file name sentencepiece_model.proto Error loading model: cannot access local variable 'clip_processor' where it is not associated with a value !!! Exception during processing !!! object of type 'NoneType' has no len()
The above error I tried to downgrade protobuf and it works: pip install protobuf==3.20.0 I don't recommend this because my other plugin exploded because of the downgrade（

I have : protobuf                                3.20.3 ... moving to 3.20.0 would help for the 'NoneType' has no len() error?


Provide example to set PATH for Syntastic checkers

The FAQ mentions that your preferred checker might not be running because it's not in Vim's path, but it doesn't give an example command to set that path.
It would be convenient if an example was there.

Changing Vim's PATH is dependent on user's environment, and it can range from trivial to pretty esoteric (f.i. when you're running Vim from a menu in a desktop environment). :smile: There is no way to describe all that in the FAQ without muddying waters even further.
On the other hand, syntastic is a development tool, and relies on people having a good understanding of what they're doing.  In particular, the brute force way to deal with irregular paths is to set syntastic_<filetype>_<checker>_exec, which is described in the manual.

The following worked for me:
:let $PATH = system('yarn bin')[:-2] . ':' . $PATH

Syntastic will use checkers (e.g. eslint) installed in node_modules before ones installed on the system. If you want it the other way around (system before node_modules), use :let $PATH .= ':' . system('yarn bin')[:-2]
The $PATH environment variable is global. I'm not sure if there's a local solution, or a way to set it just for Syntastic calls?
yarn bin will find the project bin folder. It works in project subdirectories. npm bin should work too.
I don't know my Vimscript, I think it doesn't do string interpolation? e.g. ':$PATH'
I tried backtick-expansion, e.g. `yarn bin`. It didn't work in this context :disappointed:
[:-2] is necessary because yarn bin (like most commands) outputs a trailing newline. [:-1] wasn't enough, presumably because the output ends in \r\n?

Is there a better way?

Is there a better way?

Yes, depending on what problem you're actually trying to solve.


Unable to Get Far Ray hit point when select gesture used

To reproduce
Create a script with the reference of MRTK Ray Interactor
Subscribe to Select Enter Event with a method
The Select enter event will trigger the subscribed method with SelectEnterEventArgs argument
The argument doen't having the hit point to perfom some basic actions like instantiating the object on the hit point.
On MRTK2. It can be done using IMixedRealityPointerHandler's OnPointerClicked method and this event will be triggered on both hands. I couldn't find any documentation for subscribing to these kind of events in MRTK3.

ISSUE MIGRATION
Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/10967

Original comment by:
 Zee2

Hi @ragavendranbala!
SelectEnterEventArgs has the interactorObject property, which is the interactor that initiated the selection. Then you can query .GetAttachTransform(interactable) from that interactor object, which will represent the point of interaction on the specified interactable (regardless of whether it is a ray, a touch, a grab, or any other form of interaction.)
<EMAIL_ADDRESS><EMAIL_ADDRESS>


Babel breaks automatic jsonrpc parsing

Currently, the babel parameters transform is enabled through the ES2015 preset.  This does the following:
> fn = function (a=0) {}
[Function: fn]
> fn.toString()
'function () {\n  var a = arguments[0] === undefined ? 0 : arguments[0];\n}'

This breaks the optional argument parsing that we do.  We can disable the babel transform (or babel entirely), but that means it will be impossible to support:

IE (any version)
Safari < 10 (9.1 is still supported by Apple)
PhantomJS (any version)
Node < 6 (without --harmony)

It does look like PhantomJS support for ES6 is coming, but it hasn't landed yet.  I know decided not to support older browsers, but this would make that decision permanent and unavoidable, so I wanted to make the consequences clear before disabling babel on my own.

This is unfortunate,  but for now I think it is acceptable to drop support for these browser.  I am wondering if you have any thoughts on a way to track information like this.  It would be nice to have a list of browsers,  python versions (other things?) that we know we can't support and references to issues.  Maybe a wiki page? For now lets leave the issue open,  we may want to start marking issues like this with 'wontfix'  or 'low priority' or something?

After thinking about it a bit, I think we do have a path forward using a custom babel transform to support older browsers.  It's a little ugly, but it would amount to forking es2015-parameters and modifying the default.js transpilation to include some sort of sentinel indicating the optional parameters present in the original function.
I'm in the process of building out the javascript testing in which we can test against Chrome and Firefox in CircleCI.  The rpcjson function parsing is a good candidate for unit testing.

Great.  For now i think we can leave off forking es2015-paramaters and just test the function as is.

@jbeezley Is this still an open issue?

The title is still a true statement, but we have stopped transpiling, so I think we can close.


prevent coercer from throwing unnecessary exceptions

I was benchmarking my app, and the number 2 item on the list, for the # of objects created, was from this line: https://github.com/solnic/virtus/blob/master/lib/virtus/attribute/coercer.rb#L33
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
    464008  (43.2%)      256008  (23.8%)     Time.parse
    175000  (16.3%)      175000  (16.3%)     Coercible::Coercer::Object#raise_unsupported_coercion

this patch removes this from the top 20 object-creation offenders, courtesy of the stackprof output.
It is a similar story for CPU profiling:
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
       152  (24.8%)          99  (16.2%)     Time.parse
       443  (72.3%)          90  (14.7%)     Virtus::Attribute::Coercer#call
        68  (11.1%)          68  (11.1%)     Coercible::Coercer#[]
        29   (4.7%)          29   (4.7%)     Coercible::Coercer::Object#raise_unsupported_coercion

after this patch, the Coercible::Coercer::Object#raise_unsupported_coercion no longer shows up, for a rough savings of 4.7%, but then the number of calls to Virtus::Attribute::Coercer#call and Coercible::Coercer#[] is also slashed.
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
       151  (26.7%)         103  (18.2%)     Time.parse
        36   (6.4%)          36   (6.4%)     Coercible::Coercer#[]
       222  (39.2%)          27   (4.8%)     Virtus::Attribute::Coercer#call
       240  (42.4%)          25   (4.4%)     Virtus::AttributeSet#each

For my specific code, I also noticed a 22% performance improvement from this one change (granted, the app I'm using this in is in a tight loop, but still... wow!)
The usual caveat of microbenchmarks applies, plus I'm using stackprof, which does sampling, so every result is slightly different.  But I think you'll agree this is a simple change with a lot of upside.  I wish all performance patches were this 'easy'

I originally changed this in lib/virtus/attribute/coercer.rb but that failed as I forgot about the boolean edge-case.  I moved it to check just for strings.  This is still quite good for my edge case, but it may not be as applicable a performance boost for everyone.  Let me know if you want me to put it back into lib/virtus/attribute/coercer.rb and revisit the tests


CDN issue

When you add Lucide via the official CDN there is a warning within DevTools that the "source map could not loaded".
Prerequisites

Version: latest
Are you running from source/main: import from CDN
Operating system: Windows 10
Bits: 64 bits

Step to reproduce

Add <script src="https://unpkg.com/lucide@latest"></script> before the closing </body> tag in a HTML page.
Check the browser's console log.

Actual behavior
You can see the icons but there is a warning message.
Any message or error
DevTools failed to load source map: Could not load content for https://unpkg.com/lucide.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Resources

https://codepen.io/simkog/pen/WNKGZro

This is not really something we at Lucide can do much about, I'm afraid.
Since https://unpkg.com/lucide@latest redirects to<EMAIL_ADDRESS>the current sourceMappingURL should in theory work just fine, since the source maps are there; unfortunately neither Chrome nor Firefox seems to respect this redirect when querying the JS maps.
We could replace references to https://unpkg.com/lucide@latest with<EMAIL_ADDRESS>in our documentation, although since https://unpkg.com/lucide@latest is the recommended production CDN URL, this does not seem necessary, since source maps are typically not used in production.
TLDR: I suggest that you use<EMAIL_ADDRESS>or<EMAIL_ADDRESS>instead of https://unpkg.com/lucide@latest.


[Concurrency] Fix the missing builtin guards for DiscardingTaskGroup

The PR https://github.com/apple/swift/pull/70537/ adjusted the way we create tasks for the discarding group by using a new builtin -- this builtin must be protected with a   #if $BuiltinCreateAsyncDiscardingTaskInGroup as otherwise we can get issues like module 'Builtin' has no member named 'createAsyncDiscardingTaskInGroup' when an old compiler without this builtin is used.
FYI @kateinoigakukun @MaxDesiatov

@swift-ci please smoke test

Luckily it got caught in testing before it causes more trouble 😅
My bad that I missed it during review, thanks for the fix @kateinoigakukun !


Upgrade Xinha to the latest

This upgrades the Xinha HTML editor to the latest (1.5.1). http://trac.xinha.org/wiki/ReleaseNotes#Xinha1.5.1
The directory where there are the Xinha files are replaced by the latest Xinha distribution (other than the contrib directory, which contains some unnecessary files like something.php). The path in EntryEditor.jsp is updated to use the new version.
I've quickly checked on some Roller deployments and it seems to be working fine.

A good thing of the new version is that now it works on iOS Safari.

Looks good to me. Kind of amazing how many files Xinha has!


Error in tailwind.scss (using TailwindCSS v3 with Nuxt 2)

Same issue, have you fond a way to solve it?


Revocation interval to and from should match as a best practices

The Problem
In our testing we noticed that your non-revocation interval in a proof request is sending the following dates:
"to":<PHONE_NUMBER>,
"from": 0

While this is technically correct there are some subtlety to these dates as described here. It is recommended as a best practice to use matching to and from. The framework we are using, AFJ, is somewhat strict on this usage and is causing issues.
Requested Change
What are your thoughts on updating the logic to have a matching to and from fields?
Existing:
"to":<PHONE_NUMBER>,
"from": 0

Proposed:
"to":<PHONE_NUMBER>,
"from":<PHONE_NUMBER>

The only issue with the above change would be the compatibility with existing wallets: the last time I tested things they (eSatus, Lissi, Trinsic) were not correctly handling the non-revocation interval with matching timestamps and I had to set them as they are now for the proof-requests to be successfully validated.

I think, but am not certain, that testing has been done.  But for sure, when we put this on Dev and Test we need to verify, and if it doesn't work, we'll figure out how to let folks know what works and what doesn't.  We need to make the change regardless, so it is just a matter of figuring out the impact and letting people know.

@swcurran was the behaviour verified and confirmed with all (most?) available wallets?
Do we want to update the code in the current implementation or wait for the first 2.0 release to get this change?

We have to be certain that BC Wallet works, and it would be nice to test esatus and LISSI at least, perhaps Trinsic as well.
Updating this as soon as possible after that would be good.  Testing it with a local vc-authn-oidc instance is probably the easiest way to handle this.
If you let me know the results — perhaps add comment here — I’ll find a way to get a public place where we can track features of wallets vs. AIPs and features like this.

This is resolved by https://github.com/bcgov/vc-authn-oidc/pull/233
It is ONLY implemented in the 2.0 version of vc-authn, we will not be updating the current version as it has reached end-of-life.


feat: add error reporting for electron child-process-gone

Closes https://github.com/getsentry/sentry-electron/issues/335
I'm not sure how to create a test for this, so any help is appreciated.
For electron versions older than 11 I'm reporting errors just for gpu-process-crashed.

Calling this._sendNativeCrashes(options, event) will only send events to Sentry if a minidump file is subsequently found.
The child-process-gone event is triggered for the following processes:
Utility, Zygote, Sandbox helper, GPU, Pepper Plugin, Pepper Plugin Broker, Unknown
And you only attempt to send for:
abnormal-exit, crashed, oom, launch-failed, integrity-failure
I know for sure that GPU+Crashed with Crashpad will result in a minidump but I'm not sure which others will actually result in a minidump.


Allow client to provide the OpenAIClient and APIM example

Motivation and Context

Why is this change required? Demonstrates how to use SK together with Azure API Management
What problem does it solve? Allows a custom OpenAIClient to be created by client code and thereby have full access to OpenAIClientOptions
What scenario does it contribute to? Support for customer who want to protect their Azure OpenAI API keys
If it fixes an open issue, please link to the issue here.

Description
Allowing the OpenAIClient to be created by the client gives them full access to the OpenAIClientOptions.
Consider the case where a developer is using APIM to protect their API keys and starts to see a problem.
If you run the associated sample with a bad subscription key the trace in will include the following:
      Headers:
      ErrorSource: authorization
      ErrorReason: SubscriptionKeyInvalid
      ErrorMessage: Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.
      ErrorSection: backend
      ErrorStatusCode: 401

Without the Diagnostics seeting in OpenAIClientOptions the trace in will include the following:
      Headers:
      ErrorSource: REDACTED
      ErrorReason: REDACTED
      ErrorMessage: REDACTED
      ErrorSection: REDACTED
      ErrorStatusCode: REDACTED

Contribution Checklist

[x] The code builds clean without any errors or warnings
[x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
[x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
[x] All unit tests pass, and I have added new tests where possible
[x] I didn't break anyone :smile:

From PR https://github.com/microsoft/semantic-kernel/pull/1520
@shawncal
I see why you've done this, but it's breaking my brain.... We're passing in an OpenAIClient (from Azure SDK?) to an AzureOpenAIClientBase, which is also a ClientBase, but not an OpenAIClientBase, or the other OpenAIClientBase.
We really should take a closer look here and clean this up.
For this PR: Personally, I'd rather not expose the actual Azure SDK classes in our public API surface. If we were to pass through configuration or specific properties instead of OpenAIClient objects to meet the APIM needs, what would those be?
@shawncal The OpenAIClient uses a class called OpenAIClientOptions so we would have to create out own abstraction for this which also feels wrong.
Why is not exposing Azure SDK classes in the public API important?

@markwallace-microsoft Thank you for this PR and APIM example!
Regarding OpenAIClient injection - I'm not sure about that.
For APIM, it's still should be possible to use it as it is right now. In AzureOpenAIClientBase there is constructor which accepts TokenCredential credential and string endpoint, so in theory it should be possible to pass APIM endpoint and access token in current implementation.
As for full access to OpenAIClientOptions - we should think whether it provides some benefits. I checked its properties:

Transport - wrapper around HttpClient and we already use it.
Diagnostics - this one for troubleshooting which we don't have at the moment.
Retry and RetryPolicy - for retry strategies, but I believe we already have a possibility to configure retry strategy through Kernel instance, or it can be done on HttpClient level as well.

So, it looks like only Diagnostics property is missing, but again, in case of invalid subscription key, our current implementation should throw appropriate exception with error/status code and exception message. For better observability we can also configure OpenAIClient on our side with default Diagnostics values to provide more transparency for troubleshooting. We can also expose List<string> in Azure/OpenAI client constructors as optional parameter for LoggedHeaderNames property, but it will be abstract enough.
As per current implementation, we use plain .NET types to initialize Azure/OpenAI clients, like string endpoint, string key, HttpClient, ILogger etc. In case if we decide to replace Azure SDK with something else - it should not be a problem. But if we add Azure SDK as dependency in constructor, it will be harder to decouple it later.

The benefit here is the ability to inject this dependency with the configuration the client needs. There is an example in the PR description which shows where this is useful.
I don't think we should try to allow a new way to configure the OpenAIClientOptions as we'd need to keep in sync with changes to the Azure OpenAI SDK.


Add query_id to adapter response

Overview

Add query_id and compiled_query to adapter response
Pending rowcount if possible.
resolve https://github.com/starburstdata/dbt-trino/issues/210
Checklist

[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[] README.md updated and added information about my change
[x] I have run changie new to create a changelog entry

Added here for discussion and review.

@aezomz: Please don't merge in the master branch but rebase your branch on the latest changes from master.

I tested with dbt-tests-adapter==1.5.0b1 as it include my PR in dbt-core. https://github.com/dbt-labs/dbt-core/pull/6645
Looks good. Might want to wait for the formal release before merging.

In the current state is the query_id included in the logging?
Can you post an example logline?

We have added these properties in current master. I have added you as a co-author. Thanks!


Allow directly pasting an image from clipboard using base64 encoded data URL in a step comment

Currently, markdown in step comment support referencing images such as data url image. It would be useful if you could directly paste an image from clipboard (e.g. a screenshot in clipboard) to a step comment using data url, e.g.
![image](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAbUlEQVQoU2P8////fwYyAOOI03iulWFWRQ0Dg+ZShqCJUQwiDC8YjuZnMzBUrWWwFkcNQaTAQShSPx7MsO5xCUNariIxGo8zbHHbx6Cyq5pBg4GB4cZkRoZDmxkYeLOeM0QGSGBE2MiLDhLSLACwkFDayWtuoQAAAABJRU5ErkJggg==)

Thanks for creating this issue, @kwafok! How often would you typically expect to paste an image from the clipboard?

Thanks for your reply.
I would expect to paste an image from the clipboard 1~10 time per day. It depends on how many updated React components per day.
I have used this VsCode Extension on a React App Project since a few days ago. When I have updated the UI of a React component, I want to paste the screenshot from the clipboard to update old screenshot in step comment. It would be great if this extension can paste screenshot directly. The screenshot in a step comment help other developers and myself to know how that React component look like quickly.
Currently, I use some JavaScript to convert screenshot from clipboard to base64 data url. Also, if the generated data url is too long, I will scale down the screenshot using Microsoft Paint and then convert it to data url again.

That makes sense. Thank you for sharing those steps. That workflow seems to be challenging, especially since you're having to compress/scale using MS Paint.
Is the codebase for the React app intended to be kind of a template where people add code to the different steps, or is it more like a tutorial where people would create a new codebase to copy?

No. The codebase for the React app is not a template or tutorial.
It is just a normal React App that have many components.
Actually, I mainly want to relate a React component to a screenshot image but code comment only allow text: // some text
I only find this extension allow showing an image above a component definition. If we can put image in step comment, we can describe our code more clearly in some cases.

Thank you for sharing this. That's really helpful for us to understand. We will look into how we might be able to make this happen.


Don't allow automatic night mode when dark theme is selected

Changes

Fix  #1005
Minor fixes for changelog.md

Thanks for this @btzr-io, will reach out on Discord regarding tip :)


Week 0 Review Ticket

Leave comments for grading down below!

Tech Talk Notes taken here owo
Test prep plans (not taking test)
Pages contain data structures stuff

Total: 3/3
Hi, it's me.
Tech Talk Notes (1.5/1.5): These look like notes. They seem detailed. Good enough for me.
Code (1.5/1.5): Looks cool. Runs fine. What else can I say? I'm not going to make fun of Allen's code quality.

Caleb Kim Grading:
Score: 3.75 / 5
Not original code
No sub-menus in Github Pages


Modipulate freezes at end of mod

If the mod does not loop -- i.e., no "jump to pattern" command exists anywhere -- and Modipulate reaches the end of the song, the audio glitches (stutters) and the game becomes unresponsive.

Update: issuing a position jump command does not fix the problem.

Now songs will always loop.  I've opened ticket #30 for an end of song callback so that games can trigger a new event at the end of the mod.


Inventory cleaner

Short Description:
Fixes:

Inventory cleaner all users need this :)

My reaction when I see the PR: Yay someone made an itemcleaner 😄 !!
My reaction when I click on Files changed: 😞
👍 good idea 😄


The calculated dimensions should take into account image spacing

For a volume the "dimensions" in 3D Slicer represent voxel count while in AMBF they represent simulator units (which we should consider as SI). Therefore we should take into account the Slicer "spacing" field and multiply it by the "dimensions" to get dimensions in mm and convert the to m before writing to ADF.

Great catch! :+1: Looking at the commit history, this used to work, but appears to have fallen out in a previous edit.
I think it boils down to a naming disagreement: In AMBF the "dimension" term is in meters, in Slicer it refers to the array dimension (i.e. number of voxels in each dimension).
We need to do ambf_dimensions = (slicer_spacing .* slicer_dimensions).
I'll assign this to me, but it should be a pretty easy fix if someone needs it before I can get to it.

Hi Henry, just tested this and the new dimensions seem to be correct now. Thanks


Dynamic shadows

I am trying to implement a technique I have seen used in ARkit for UE4 in order to achieve dynamic shadows. With this technique you create an unlit material using the passthrough camera and you appy this material to a plane underneath your camera. Then you enable Cast Modulated Shadows on your scene's Directional Light.
My problem is that I haven't been able to setup this material in a way that works as it should.
Example 1 (attached). The passthrough material is not aligned and its scaled differently than blank the space, the real world

Example 2 (attached). With this material setup the alignmed of the shadow plane and the real work is somewhat better, but the shadowing plane does not match in terms of brightness with the real world.

Since shadows play a very important role in creating believable experiences, It would be great if you could share a working method to achieve good, dynamic shadows with AR Core.
My tests are taking place on a Xiaomi Pocophone F1

It is probably too complicated if you have no experience with programming. Can you start with using that GoogleARCorePassthroughCamera first and see if you see any issues? If you find the camera texture is not in sync, an easier way to fix it is to change the GoogleARCorePassthrough material to also use that node instead.

It is probably too complicated if you have no experience with programming. Can you start with using that GoogleARCorePassthroughCamera first and see if you see any issues? If you find the camera texture is not in sync, an easier way to fix it is to change the GoogleARCorePassthrough material to also use that node instead.

Hi, you can see in this image what I had to do to get the passthrough camera to somewhat work in the binary release of UE4: https://i.imgur.com/7TCMFMa.png
The resulting effect can be seen in this video: https://www.youtube.com/watch?v=CwJFGYMb0mY
There's a noticeable switch when that passthrough material starts getting drawn. I tried adjusting the scale values to account for aspect ratio and adjusting the gamma (0.45045 rather than 0.22) but to no avail. Also once you see the incorrect aspect ratio it's hard to unsee it.
The result in this GitHub build works a lot better - if a bit trickier to setup and seemingly more expensive - creating a dynamic instance of the PP material and applying it as a blendable to the possessed camera and updating it on tick: https://i.imgur.com/6r41qUP.png https://i.imgur.com/PIQ26GI.png
From what I've seen of ARKit tutorials, it's setup is similar to how we incorrectly assumed the "GoogleARCoreCameraPassthrough" node worked. Is there any plans to make this process simpler or is there a reason I'm overlooking that justifies the method you shared with us?
Again, thank you very much for all the help!

Oh and in regards to the Mobile HDR issue in the current built, I was trying to apply gamma correction like I had before and wasn't able to reach a result, until I added in this node network: https://i.imgur.com/h8njAjJ.png   -  at which point seemed to flip a switch that made my gamma correction start working as desired - even after deleting all the levels nodes and connecting the texture sample output straight to the power node. See the result here: https://i.imgur.com/BzARPlf.jpg
The left of this image is what the camera texture looked like (with gamma adjustment) before that "switch" that happened: https://i.imgur.com/lBpxZiv.jpg

My first example is in the binary release of UE4 4.20 so there's no way for me to get the camera texture UVs - as per our previous discussion. Correct me if I'm wrong here.
Passing the UVs into the GoogleARCoreCameraPassthrough does work however the corrections you mentioned do not produce ideal results. On the left of this image is the output run though the power node with an exponent of 2 and the right is the output run through the sqrt node: https://i.imgur.com/MtNhlLF.jpg
I'm aware that passthrough materials don't need to be done in a post process but the effect I'm producing does require it to be done in the post process - as I don't know how to write custom shaders at an engine level and thus tell shader fragments only to render when the stencil buffer is at a value of 1. The "magic door" effect is commonly produced in Unity but due to the limitations I just mentioned, the only workaround I've thought up is to use the stencil buffer as a mask in a passthrough camera overlay.

You can still calculate the correct uv using the node GetPassthroughCameraImageUV and pass in the result uv in the material to modify the screen space uv to sample the GoogleARCoreCameraPassthrough node correctly.
As for the gamma issue, what is the texture looks like if you don't do any modification after sampling the GoogleARCoreCameraPassthrough node? If it looks correct, you don't need to do anything there.

You can still calculate the correct uv using the node GetPassthroughCameraImageUV and pass in the result uv in the material to modify the screen space uv to sample the GoogleARCoreCameraPassthrough node correctly.
As for the gamma issue, what is the texture looks like if you don't do any modification after sampling the GoogleARCoreCameraPassthrough node? If it looks correct, you don't need to do anything there.

Ah yes of course - sorry it's 1:45am for me so I'm running on empty!
Without the 0.22 correction the output looks like this: https://i.imgur.com/6FP4zHT.jpg
Though this only happens with "Mobile HDR" enabled - which has to be enabled for this post process material to work. When I had "Mobile HDR" disabled, the post process material would simply not get applied to the camera.

thanks for your help guys , been going on with this for days now , but i still can find the "get camera texture node" working with 4.21 with and the latest sdk (using arcore's helloAR template)

Hi there,
Just wanted to let you know that I have update to the new release and the  issue in color space when using gles3 or gles2 still remains...

Are you using gles3 or gles2? There is a issue in color space when using gles3, which will be fixed in our next release. You workaround should be fine for now.
…
On Wed, Jan 30, 2019 at 9:01 AM Tassos @.***> wrote: Your solution worked perfectly. My only issue is that there is a brightness difference... [image: screenshot_2019-01-30-18-22-48-621_com yourcompany a1] https://user-images.githubusercontent.com/2564349/51998357-2a641180-24c1-11e9-9ab5-b0673d8dfcf9.png I have mobile hdr enabled. If i disable it, the color difference is not present, but neither are the shadows. I've ended up adding a SQRT node in my material, just after the Texture Sample, and it seems to correct the problem, but I am not sure if this is the correct approach. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#49 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ASYXB3ubfVRLafK9WBmuzeDLQBLQ0ORLks5vIc_SgaJpZM4aZGHS .

Hi romfeo,
Can you attach a screen shot explain the problem you are seeing in the new release?

Hi romfeo,
Can you attach a screen shot explain the problem you are seeing in the new release?

Hello again,
Do you notice the color difference on the carpet? The darker part is where I have applied the material you have shared in this thread as a reply to my initial question

Many many thanks to "bopangzz" for the solution and the many in-depth answers!
You made my day!
Luckily enough I don't have the coloring/gamma issues mentioned here by "romfeo". I've used the custom built version (4.20 with AR Core 1.6) generated by you guys .
The 4.21 version with AR Core 1.7 didn't work for me. On both testing phones the screen stayed black after launching the app.

Hi romfeo,
Can you attach a screen shot explain the problem you are seeing in the new release?

Hello again,
Do you notice the color difference on the carpet? The darker part is where I have applied the material you have shared in this thread as a reply to my initial question

Hi romfeo,
Can you attach a screen shot explain the problem you are seeing in the new release?

Hello again,
Do you notice the color difference on the carpet? The darker part is where I have applied the material you have shared in this thread as a reply to my initial question

Hi romfeo,
I did the test again and I can't reproduce the issue you are having. Can you try use the ARCoreOcclusionMaterial shipped with Unreal ARCore 1.7 release, you should be able to find that material under GoogleARCore Content in the content browser. If you don't see the folder, make sure you enable "Show Engine Content" and "Show Plugin Content" int the view options.

Many many thanks to "bopangzz" for the solution and the many in-depth answers!
You made my day!
Luckily enough I don't have the coloring/gamma issues mentioned here by "romfeo". I've used the custom built version (4.20 with AR Core 1.6) generated by you guys .
The 4.21 version with AR Core 1.7 didn't work for me. On both testing phones the screen stayed black after launching the app.

Can you create a new issue for the black screen issue you saw when using 1.7 release? Can you please attach an Android logcat when the issue happens. Thank you!

After I've looked in the included occlusion material in the new version of the plugin, I've realized that I was missing the 127grey texture from my material. I was using a different texture. Everything works great now!
Thanks for everything

Many many thanks to "bopangzz" for the solution and the many in-depth answers!
You made my day!
Luckily enough I don't have the coloring/gamma issues mentioned here by "romfeo". I've used the custom built version (4.20 with AR Core 1.6) generated by you guys .
The 4.21 version with AR Core 1.7 didn't work for me. On both testing phones the screen stayed black after launching the app.

Can you create a new issue for the black screen issue you saw when using 1.7 release? Can you please attach an Android logcat when the issue happens. Thank you!

Sure, I'll do that next week.
But I have another question which came up today.
The solution works perfectly fine on Android. But on the iPad Pro (iOS 12.1.1) the texture didn't get updated and stayed green (in my case the default texture). Do you have any clue why that could be the case? Is there a specific reason why this wouldn't work on iOS?

That texture node only work on Android. On iOS with ARKit you will need to use the node provided by ARKit. You can check how the passthrough camera material in ARKit plug uses the node to render the background image. It should be in the content folder in your ARKit Plugin.

That texture node only work on Android. On iOS with ARKit you will need to use the node provided by ARKit. You can check how the passthrough camera material in ARKit plug uses the node to render the background image. It should be in the content folder in your ARKit Plugin.

Okay, many thanks than I will try that.
To bad until that point everything was cross-platform compatible.

That texture node only work on Android. On iOS with ARKit you will need to use the node provided by ARKit. You can check how the passthrough camera material in ARKit plug uses the node to render the background image. It should be in the content folder in your ARKit Plugin.

You're the best!
That worked as well. In my case to get the right gamma correction, I had to plug in the "YUV_to_sRGBCustom" node directly, without using the other two. I've tested this with an iPad Pro 12.9''. I wasn't able to test this with an iPhone so far.

Quick question: Is it possible to use this setup for AR Core with a Post Process Material as well? I wanted to use this for a terrain mesh, but there it stopped working.

Quick question: Is it possible to use this setup for AR Core with a Post Process Material as well? I wanted to use this for a terrain mesh, but there it stopped working.

You mean sampling the camera texture in a Post process material? You should be able to do that kind of things. What issues you are getting?

Quick question: Is it possible to use this setup for AR Core with a Post Process Material as well? I wanted to use this for a terrain mesh, but there it stopped working.

You mean sampling the camera texture in a Post process material? You should be able to do that kind of things. What issues you are getting?

Hi,
never mind the issues, I was just dumb. I was using the same Material Parameter Collection for two different Actors which didn't work. But I changed the setup to Vector Parameter Values which are getting instanced.
And yes exactly. I did that with the ARKit solution, but there I had no issues with the "passthrough" node (only gamma correction, which I was able to fix). See attached image for AR Kit material.

Good Day, Im On UE4 4.22.2 and I tried all of the thees solutions mentioned in this post but they are not working for Android, When applying material and function to update the material , the shadow plane under object just looks with different aspect ratio, or feels out of place and you can clearly see where that shadow plane is.
Can anyone provide a straight forward example for this? also Included material in Engine Content is not like one in Screenshot.
Aivis

I think it can help you:
https://answers.unrealengine.com/questions/988932/render-in-main-pass-ar-android.html


set time range of cloudwatch dashboard to multiple weeks

What is this?
The monitoring dashboard displays a time range of 4 weeks. Previously it was displaying the default range of 3 hours.
Why is this important?
SPA is operating over days and weeks. This is not aligned with the default settings use by CloudWatch. Therefore, new users can be confused when looking at the monitoring cockpit for the first time. Seasoned admins of SPA always start monitoring activities by changing the time range of the dashboard, which is a friction point in the interface.
How to implement it?
SPA should set a relative start of the time range for all widgets while building the dashboard.
Reference:

https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_cloudwatch/Dashboard.html

Activities:

[x] change cdk/cockpit_construct.py
[x] deploy in production
[x] validate the default range displayed by the cockpit

so happy to not change the default range manually on every access of the dashboard cockpit :-)


Pig regex doesn't work with CBT

A user is using pig, and setting a regex in HBaseStorage:
        if (configuredOptions_.hasOption("regex")) {
            regex_ = Utils.slashisize(configuredOptions_.getOptionValue("regex"));
            addFilter(new RowFilter(CompareOp.EQUAL, new RegexStringComparator(regex_)));
        }

Hex values (\x01, \x02...) don't seem to work in this situation.

Is it possible that this is against the emulator?
On Fri, Jun 9, 2017, 6:26 PM Solomon Duskis<EMAIL_ADDRESS>wrote:

A user is using pig, and setting a regex in HBaseStorage
https://github.com/apache/pig/blob/trunk/src/org/apache/pig/backend/hadoop/hbase/HBaseStorage.java#L469
:
    if (configuredOptions_.hasOption("regex")) {
        regex_ = Utils.slashisize(configuredOptions_.getOptionValue("regex"));
        addFilter(new RowFilter(CompareOp.EQUAL, new RegexStringComparator(regex_)));
    }

Hex values (\x01, \x02...) don't seem to work in this situation.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/cloud-bigtable-client/issues/1401,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACTr-Xsh2DJZFyyxEz00C7GYthIqm7wks5sCcaegaJpZM4N15Nn
.


Difficult to read Chronograf Auth0 configuration requirements

The horizontally-scrollable text box here makes it difficult to use this information due to scrolling and difficulty in parsing length horizontal text:

URL for relevant page?
https://docs.influxdata.com/chronograf/v1.4/administration/managing-security/#creating-an-auth0-application
What products and version are you using?
Chronograf 1.4.4.x

Fixing by reformatting content.


feat: add secure view share role

Adds a new share role "Secure view". This role only allows viewing resources, no downloading, editing or deleting.
I'm not 100% sure how the exact permissions will end up looking once this role has been refined (see https://github.com/owncloud/ocis/issues/8855), but it's a placeholder to get started.

@JammingBen Thanks for your first contribution to reva 🎉
Although, i wonder why we need that in reva. IMHO we need that in the ocis graph package.
@kobergj @rhafer why reva?


Write actual docs

Currently, this project has essentially no documentation outside of the readme and (maybe?) some jsdoc comments. Ideally we have docs with examples. I will obviously push for using pyro for this but in theory given that it would just be markdown we could really use anything.

Working on this - When I picked it up it was a bit confusing to know what I could and couldn't do so it would be pretty helpful.
My goal will be JSR symbol compliance - https://jsr.io/@deno/gfm/score.

Not sure if someone can assign me to it cc (@lucacasonato ?)


Incorrect handling of @RequestHeader annotation's value attribute

Summary:
the "value" attribute of the RequestHeader annotation for Controller method parameter is not correctly handled.
Steps to reproduce:
Follow the "tutorial" from the reference documentation (https://repo.spring.io/milestone/org/springframework/experimental/spring-graalvm-native-docs/0.8.5/spring-graalvm-native-docs-0.8.5.zip!/reference/index.html#getting-started-buildpacks).
Add the following methods to the GreetingController class.
	@GetMapping("/name")
	public Greeting name(@RequestHeader(name="Header-Name") String headerName) {
		return new Greeting(counter.incrementAndGet(), "Received header with name = " + headerName);
	}
	@GetMapping("/value")
	public Greeting value(@RequestHeader(value="Header-Name") String headerName) {
		return new Greeting(counter.incrementAndGet(), "Received header with value = " + headerName);
	}
	@GetMapping("/default")
	public Greeting defaultValue(@RequestHeader("Header-Name") String headerName) {
		return new Greeting(counter.incrementAndGet(), "Received header with default = " + headerName);
	}

Build the native image and run it.
Test the image with the following:
    curl -H "Header-Name:123" localhost:8080/name
    curl -H "Header-Name:456" localhost:8080/value
    curl -H "Header-Name:789" localhost:8080/default

Expected:
Same result as would be obtained from the JAR, when run using ./gradlew bootRun:
{"id":1,"content":"Received header with name = 123"}
{"id":2,"content":"Received header with value = 456"}
{"id":3,"content":"Received header with default = 789"}

Actual:
Only the method using the name attribute works the same:
{"id":1,"content":"Received header with name = 123"}
{"timestamp":"2021-03-02T10:31:55.751+00:00","status":400,"error":"Bad Request","message":"","path":"/value"}
{"timestamp":"2021-03-02T10:31:59.462+00:00","status":400,"error":"Bad Request","message":"","path":"/default"}

Log on server side:
2021-03-02 10:31:55.748  WARN 1 --- [nio-8080-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MissingRequestHeaderException: Missing request header 'headerName' for method parameter of type String]
2021-03-02 10:31:59.461  WARN 1 --- [nio-8080-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.bind.MissingRequestHeaderException: Missing request header 'headerName' for method parameter of type String]

Note 1 : the "expected" header is now headerName (the method parameter name, instead of the value of the "value" attribute)
Note 2 : if changing the command to:
    curl -H "headerName:456" localhost:8080/value

then the result is the expected:
{"id":2,"content":"Received header with value = 456"}

meaning the header based routing is done correctly, it is only the header name "extraction" that fails.

I added those endpoints to the webmvc-tomcat sample in 0.8.5 and it failed as described. I then added them to the webmvc-tomcat sample in 0.9.1 and it worked. So I believe this is fixed. I think due to commit https://github.com/spring-projects-experimental/spring-native/commit/5062901aa5cd07595b1f09f139d274afcce10af5 that added reflective access for RequestHeader.class

Cool! Do we have an ETA for 9.1 already ?
Also: I think Optional<Whatever> as a return parameter for an endpoint has some problems. Do you want me to open another issue?

9.1 is imminent.
I'm surprised about that Optional<Whatever> - please open another issue, yep. Specific example of Whatever might be useful so I use the same POJO structure for it as you are having trouble with.


Couple of best practices for Dockerfile

Minor tweaks to follow Dockerfile best practices a bit closer.

Pin version of the python image to prevent failures due to unanticipated changes
Only one layer for the installation of packages (gettext)
Apt cache cleaned up to reduce the image size

lgtm! Thanks!


Add a Symfony client factory

Q
A

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
no

Related tickets

Documentation

License
MIT

This PR is blocked by #372. It will allow you to configure Symfony clients like:
httplug:
    clients:
        default:
            factory: 'httplug.factory.symfony'
            http_methods_client: true
            config:
                timeout: 4  # Symfony config
            plugins:
                - 'httplug.plugin.logger'

We want to integrate with HTTPlug ecosystem, plugins, cache, bundle support etc.

I've rebased the PR and the tests are green

Looks good.
Please merge and tag a new release please :)


Use the new AgentMajorVersion parameter in the e2e tests

What does this PR do?
Use the new AgentMajorVersion parameter in the e2e tests
Motivation
https://github.com/DataDog/test-infra-definitions/pull/1192
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes

Relates to https://github.com/DataDog/test-infra-definitions/pull/1192
https://datadoghq.atlassian.net/browse/ADXT-680

/merge


[Feature] mock function promise support

Hello Team Jest,
Thanks for working so hard on this wonderful test runner. I just recently gave jest another spin after trying it when it first came out, and I love all the progress you all have made.
I have a simple feature request.
One thing I am missing from mocha/sinon is nicer mocks for functions that return promises.
I specifically used to use http://npmrepo.com/sinon-as-promised for easy promise mocking.
I'd love to see mock functions to have .mockResolveValue(val) and .mockRejectValue(err) versus .mockReturnValue(Promise.resolve(val)) and .mockReturnValue(Promise.reject(err))
Thoughts?

Hi @tjmehta, happy to review PR if you're interested in implementing that :)

Sure I would love to implement this. Seems simple enough.

Closing this in favour of PR

I'll keep this open for now, we may want to discuss this a bit more.

Oh, ok, thought we'd do it in a PR

Sorry, just haven't thought about this myself much yet but I'm thinking this issue may go beyond the PR a bit. We'll see :)


on_block(b) and (store) progress

Context
This commit adds a condition to guarantee that in state_transition(state,block),  state.slot < block.slot.
It is related to the spec update v0.11.3.
It is supposed to fix a problem "process without progress".
It is unclear to me what it actually fixes.
Progress with state_transition
As far as I understand, the fix guarantees that, for a sequence of state_transitions, the slot number progresses. In other words it prevents executions like (I write s - b -> s' for s' = state_transition(s,b))
s0 - b0 -> s1 - b1 -> s2 ...
with b0.slot == b1.slot == b2.slot.
This seems to assume that progress is made by executing state_transition successively, and each time using the previously computed state.
Progress with on_block
However this does not seem to align with how state_transition is used in the Beacon chain.
As far as I can tell, state_transition is only called in on_block(b) with b a block.
In on_block(b), the pre_state that b claims to attach to is computed.
And later state_transition(pre_state,b) is called.
So if I am correct, nothing prevents me from calling on_block(b) many times with the same block.
This will trigger a computation with state_transition to compute the successor state of pre_state with b ,  state_transition(pre_state,b).
Now assume the store is S, and b has already been added to the store (it is in S.blocks).
There seems to be a possibility of an infinite sequence of on_block(b) without the store being modified (because b is already in):
S - on_block(b) -> S - on_block(b) -> S .....
Security vulnerability
An exploit may be a DoS attack by sending the same block b many many times.
How the issues can be mitigated
First the change in the  commit that adds a condition to guarantee that in state_transition(state,block),  state.slot < block.slot may be pushed upwards to on_block by requesting that pre_state.slot < b.slot in the pre-conditions of this function. This avoids the needs for all the asserts on the slot number that are below on_block (a formal proof can be established using our Dafny specification of the eth2,0 specs).
Second, to avoid the possibility of processing the same block again and again in on_block without progress on the store, we may require that the block b (or its hash) is not already in the store's keys, and add the pre-condition
on_block(b)
   requires hash_tree_root(b) !in S

to on_block(b).
How the issues was uncovered
Issue was uncovered while specifying and proving some invariants on the Dafny specification of the Eth2.0 specs.

state_transition is also called by compute_new_state_root which specifies how a validator should compute state_root. So, it also should be updated, if pre_state.slot < b.slot moved to on_blocks.

As for preventing DoS attacks, I think it's better done on the implementation level.
There are three kind of outcomes of on_block (and on_attestation): valid, invalid or 'early'. The latter happens when a block arrived before its slot (e.g. because of clock disparities) or before its parent (can be missed for some reason, but can arrive later via a different route or requested).
So, hash_tree_root(b) !in store.blocks check would prevent DoS-attacks with blocks recognized as valid or invalid, however, it's a more tricky with 'early' blocks. E.g. one can send lots of blocks with some random parent_root. However, they cannot be always immediately classified as valid/invalid, since a block, referenced by the parent_root may arrive in future.
Thus, an implementer should maintain a buffer of blocks (and attestations), awaiting some other event to happen (a particular slot or a block with a particular root to arrive).
It also would be dangerous to mark 'early' blocks/attestation as invalid and be persistent in doing so (i.e. remember their status in some store), as message reordering is possible, and 'early' blocks/attestations which later become valid are quite possible.
So, handling of duplicate blocks (and attestations) is somewhat non-trivial in practice and may differ from implementation to implementation (e.g. 'early' blocks/attestation queues can have different sizes or a policy to choose a block/attestation to drop when such a queue becomes to big can differ).
Therefore, I believe adding DoS preventing checks would just complicate the specs and perhaps may restrict implementers in how they implement DoS counter-measures. However, it would be definitely useful to clarify such risks and aspects of block/attestation processing in a 'recommendation' section (like p2p-interface.md uses MAY to suggest a reasonable behavior).
In theory, it would be great to specify exactly how to handle various kinds of blocks and attestations in various circumstances, however, I expect it's extremely difficult to do and hardly ever possible to test/verify.

There is also one more tricky case. The fork choice allows a situation, when a block's root is in store.blocks, but it's not in store.block_states, e.g. if a block has an invalid signature.
This is an inconsistent state of Store (I don't believe it's dangerous, though I think an attestation with target.root referencing such invalid block may be accepted by fork choice in some cases).
In practice, implementers are likely to implement on_block as a transaction, with 'Store' changes rolled back, if a block is invalid. So, the inconsistency won't be possible, in such case.
This is another reason I do not believe the problem is really dangerous (though I've opened an issue about that).
However, such transactional semantic of on_block conflicts with the hash_tree_root(block) in store.blocks check, if the block under consideration is invalid, as store updates should be rolled back.

@franck44:
It is supposed to fix a problem "process without progress".
It is unclear to me what it actually fixes.

Prior to v0.11.3, a malicious proposer for slot X could make two blocks b1 and b2, with b2.parent_root as the root of b1 and b2.state_root as the state root of state_transition(pre_state_slot_X, b1). This can cause a chain split between clients if they handle this situation in different ways. For example, one client may not detect this situation and apply both blocks in its chain, while another client may detect that the slot number is replayed and reject b2.  These two clients will now differ in their chain heads, leading to a chain split in the network.
v0.11.3 explicitly disallows this situation by forcing all clients to reject the second block with the same slot, preventing it from being applied in the same chain.

@franck44:
So if I am correct, nothing prevents me from calling on_block(b) many times with the same block.

As far as the beacon chain fork choice is concerned, that is perfectly fine behavior. The purpose of the specification is to define the behavior of clients, and not exactly to provide an optimized version of a well-engineered client. This is in the interest of maintaining the simplicity of the specification.
Specifically in this case, since on_block(b) is an idempotent operation, an optimized client can choose to not re-run on_block(b). Note that this still maintains the exact same behavior (w.r.t. the state and store) as the specification!

Prior to v0.11.3, a malicious proposer for slot X could make two blocks b1 and b2, with

b2.parent_root as the root of b1 and b2.state_root as the state root of state_transition(pre_state_slot_X, b1). This can cause a chain split between clients if they handle this situation in different ways. For example, one client may not detect this situation and apply both blocks in its chain, while another client may detect that the slot number is replayed and reject b2. These two clients will now differ in their chain heads, leading to a chain split in the network.
v0.11.3 explicitly disallows this situation by forcing all clients to reject the second block with the same slot, preventing it from being applied in the same chain.

Ok thanks @adiasg.
This is an example of a scenario that is classified as bad, and the v0.11.3 is supposed to fix this particular problem.
It would be nice to have a more logical specification of the properties the beacon chain should satisfy.
The result of this fix is that the scenario you exemplified (with b1 ad b2) is not possible any more.
But what property (or invariant) should be maintain?
Is it that the beacon chain is always ... a chain [of blocks]? And if yes, we may try to formulate a logical statement that captures this property.

Specifically in this case, since on_block(b) is an idempotent operation, an optimized client can choose to not re-run on_block(b). Note that this still maintains the exact same behavior (w.r.t. the state and store) as the specification!

This seems a bit optimistic to me to delegate choices to clients: it is not obvious that playing the same block will result in the store not being modified. So clients should not rely on this, and probably not have infer that at all.
The fact that it maintains the same behaviours is also not trivial at all (at least for me).
The specs are sometimes soft and would probably benefit from more rigour and formal treatment.

@adiasg

Prior to v0.11.3, a malicious proposer for slot X could make two blocks b1 and b2, with b2.parent_root as the root of b1 and b2.state_root as the state root of state_transition(pre_state_slot_X, b1). This can cause a chain split between clients if they handle this situation in different ways. For example, one client may not detect this situation and apply both blocks in its chain, while another client may detect that the slot number is replayed and reject b2. These two clients will now differ in their chain heads, leading to a chain split in the network.

v0.11.3 explicitly disallows this situation by forcing all clients to reject the second block with the same slot, preventing it from being applied in the same chain.

If I understand well, a desirable property of the chain is that, the slot numbers of the ancestors of any block, should form a total strict order (no two blocks with the same slot number).
Our work on a formal specification of the Eth2.0 specs may provide some insight into this problem. We have formally proved this property here.
This goes beyond the informal argument that such a situation may not occur after the fix of v0.11.3, as it provides a formal, logical, machine-checkable proof of a well-specified property (invariant).

@franck44 Thanks for the Dafny proof!
Formal verification of the spec is definitely important, and Runtime Verification has been helping us with this. In fact, the bug that v0.11.3 fixes was found through their verification efforts! The Coq and K models that have been produced will be made public when they are ready to be shared.
While it is desirable to have each and every modification to the spec to be incorporated and verified through a formal model, this introduces a large overhead on the spec writers. For this reason, the spec repository will usually be upstream from the formal models.

Thanks @adiasg.
Note that our proof does not only resolve the problem and scenario uncovered in the testing work by RV, but provide a more comprehensive statement (invariant) of what should hold, and a formal proof that it holds.

While it is desirable to have each and every modification to the spec to be incorporated and verified through a formal model, this introduces a large overhead on the spec writers. For this reason, the spec repository will usually be upstream from the formal models.

The purpose of our work is to discharge the spec writers of the hard part of the verification, which is figuring out the invariants, and building the proofs.
We (as formal methods people) write the proofs, there is no need for the spec writers to write them.


ToDo app as example of usage?

Examples on others technologies: https://todomvc.com/

We can do it a bit later when all main features will be stable.

Just to clarify: I don't suggest submitting example to todomvc.com, I suggest making example in https://github.com/rohiievych/metacomponents/tree/main/app


Insert image from grid view

Sorry for my english.
In latest version of lfm, if i insert image from grid view, when i click on image it opened in full size.
In older versions after click image pasting in text. Now i can not paste image in text from grid view. I must swicth to list view and click on name of image.
How will i paste image from grid view in latest version?
Laravel 5.4
Package version: latest

@3s777 Same Problem here!

Please check #434. Will fix this in next release.

Thanks, it's work for me.


[stable/docker-registry]: Add support for a predefined NodePort, and predefined PVC

Allow to specify a specific node port to use for the registry, as well as allow for
using a pre-created volume+volumeclaim.

/ok-to-test

Sounds handy. +1

/lgtm


Container / Cobbler Updates

These three commits go together to get the latest Cobbler 'release28' commit working. I'm submitting them as a single pull request but do not plan on squashing.

Hoa has reported that this commit breaks some RHEL 7.x post-deploy network configuration. I'll close this pull request until I figure out what's causing the problem.


Question about EmbeddingTargetZ Coordination Type

(A bit related to #1501 on adding "Try a demo!" for all Coordination types)
I saw the demo for embeddingTargetX and embeddingTargetY and it was very helpful!
I have some 3D points (X, Y, and Z) and have 3 scatterplots (X vs. Y, X vs. Z, and Y vs. Z). I was able to coordinate panning using embeddingTargetX, etc. However, I have a hard time coordinating the panning for X vs. Y and Y vs. Z. - i.e. if I move X vs. Y vertically to change Y, then the Y vs. Z plot should move horizontally.
I was wondering I could use embeddingTargetZ to achieve this? If not, what is the use-case for this coordination type?

Gotcha - I figured that may be the case... I guess this means it is not possible to coordinate XvsY, XvsZ, and YvsZ plots, right? :(

That is correct. The closest you could get would be to coordinate all but one pair of dimensions:
{
  "name": "Example",
  "description": "",
  "version": "1.0.15",
  "initStrategy": "auto",
  "datasets": [
    {
      "uid": "example",
      "name": "Example dataset",
      "files": [
        {
          "fileType": "anndata.zarr",
          "url": "https://s3.amazonaws.com/vitessce-data/0.0.33/main/codeluppi-2018-via-zarr/codeluppi_2018_nature_methods.cells.h5ad.zarr",
          "options": {
            "obsEmbedding": [
              {
                "path": "obsm/X_pca",
                "embeddingType": "PCA XY",
                "dims": [
                  0,
                  1
                ]
              },
              {
                "path": "obsm/X_pca",
                "embeddingType": "PCA YZ",
                "dims": [
                  1,
                  2
                ]
              },
              {
                "path": "obsm/X_pca",
                "embeddingType": "PCA XZ",
                "dims": [
                  0,
                  2
                ]
              }
            ]
          }
        }
      ]
    }
  ],
  "coordinationSpace": {
    "embeddingZoom": {
      "PCA": 0
    },
    "embeddingType": {
      "PCA_XY": "PCA XY",
      "PCA_XZ": "PCA XZ",
      "PCA_YZ": "PCA YZ"
    },
    "embeddingTargetX": {
      "X": 0,
      "Y": 0
    },
    "embeddingTargetY": {
      "Y": 0,
      "Z": 0
    }
  },
  "layout": [
    {
      "component": "scatterplot",
      "coordinationScopes": {
        "embeddingType": "PCA_XY",
        "embeddingZoom": "PCA",
        "embeddingTargetX": "X",
        "embeddingTargetY": "Y"
      },
      "x": 0,
      "y": 0,
      "w": 4,
      "h": 6
    },
    {
      "component": "scatterplot",
      "coordinationScopes": {
        "embeddingType": "PCA_XZ",
        "embeddingZoom": "PCA",
        "embeddingTargetX": "X",
        "embeddingTargetY": "Z"
      },
      "x": 4,
      "y": 0,
      "w": 4,
      "h": 6
    },
    {
      "component": "scatterplot",
      "coordinationScopes": {
        "embeddingType": "PCA_YZ",
        "embeddingZoom": "PCA",
        "embeddingTargetX": "Y",
        "embeddingTargetY": "Z"
      },
      "x": 8,
      "y": 0,
      "w": 4,
      "h": 6
    }
  ]
}

The above will not load for XZ or YZ because this PCA array only has 2 columns, but if it had 3 or more, then "dims": [0, 2] and "dims": [1, 2] would load.

The issue is the data-Y-axis being on two different plot-axes

Thanks! Funny, I had the exact same notebook sketch and circled the "Y" axis with a question mark.
Please feel free to close the issue. :)