WIP: appveyor

Inspired by the neovim-ruby script

Almost there:
python -m nose
72
.............................E.......................
73
======================================================================
74
ERROR: test_vim.test_command
75
----------------------------------------------------------------------
76
Traceback (most recent call last):
77
  File "C:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
78
    self.test(*self.arg)
79
  File "C:\projects\python-client\test\test_vim.py", line 26, in test_command
80
    os.unlink(fname)
81
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\tmpaq48lhk5'
82

https://github.com/neovim/python-client/commit/a2e1169952fb8c0c8a618a69f04a686ad37e3cc4 was supposed to fix that. Maybe try a local @with_setup function.

Is the problem maybe Neovim having the file open? (https://github.com/neovim/python-client/commit/a2e1169952fb8c0c8a618a69f04a686ad37e3cc4#diff-a5d6c1e0ffb8d50d5794662b1a7cabeaR18)
/cc @brcolow

sure, let's try :bwipeout then.

Would be good to disable the Appveyor check in the Github settings to not get an X because of the missing config in other PRs.
Might also be a AppVeyor setting though IIRC.

(or get this PR in, of course.. :))

Sorry been busy with other stuff. Just made the second attempt of asyncio on windows, let's see if appveyor likes it...

Github actions runs Windows, though tests are failing on Windows currently.


fix(compiler/runtime-dom): firefox do not support regexp flag s

Fix #7267
Related to #6808 #3917
Playground

I prefer to use \s\S instead of (.|\n) since some cases have already used it.
https://github.com/vuejs/core/blob/fe77e2bddaa5930ad37a43fe8e6254ddb0f9c2d7/packages/compiler-core/src/transforms/vFor.ts#L311

Thanks

May I ask when this PR will be merged? This compatibility issue may have a significant impact on the business.

I have the same issue, plz merge this PR!

UP for merge! Please pay attention to this PR

For whom may concern, the issue patched in v3.3.4
see https://github.com/vuejs/core/commit/91f1c62e6384a8b09f90e7e43b8d347901e529a0

I confirm, issue is fixed in v3.3.4. Tested on Safari on iOS < 12 and firefox < 72

@stondbringa @TNGD-YQ
thanks.

Can this change be merged into version 3.2.x. The current version and accompanying tools (such as vite) no longer support Windows 7 (Node <13). Not very friendly to developers who cannot upgrade their systems (such as work computers).


add string.count method

string->count(substring) returns the number of times substring appears in string (an int).
e.g.
'abc'->count('a') is 1 ('a' appears once in 'abc')
'xxxx'->count('xx') is 2 (we don't count overlapping occurrences of substring)

added in v0.3.4


[loc] Adding language - Sinhala (si) to transifex VS Code project

We expect at least three language contributors sign up and product team sign off before adding new language.
Please vote by adding your transifex account name here.
Criteria link: https://github.com/Microsoft/Localization/wiki/How-to-request-a-new-UI-language-for-VS-Code-project

I can participate Sinhala(si) language localization effort in transifex. Transfix user name is : Lilanga

I can participate Sinhala(si) language localization effort in transifex. Transfix user name is : Lasithds


Fix visual bug in search panel

This PR removes a random margin and the background fill from the search panel input. This change fixes a visual issue when the search panel is placed to the left or the right panels.
Before:

After removing margin:

After removing background:

Codecov Report

Merging #1708 (a232aca) into master (c06a74e) will increase coverage by 0.01%.
The diff coverage is 0.00%.

:exclamation: Current head a232aca differs from pull request most recent head a163619.  Learn more


[Unity][BYOC] Improve expressiveness of the pattern check function in FuseOpsByPattern

This PR change the interface of the check function in FuseOpsByPattern, in order to make it possible to broader types of check during fusion. In particular,

The old check function signature is bool(const Map<DFPattern, Expr>& match_result, const Expr& matched_expr), which isn't very useful because:

The Map<DFPattern, Expr> match_result is hard to consume. To retrieve the wanted expr from this map, one has to either keep track of the DFPattern that matches the expr, or to iterate through the map values and filter by expr type.
The matched_expr provides little help because one cannot traverse to other expressions from matched_expr, without the help from things like var2val.

The new signature is bool(const PatternCheckFunctionInput&). A dedicated type PatternCheckFunctionInput is created for passing information to the check function. This prevents old check functions from being broken when new input needs to be supplied to the check function. Currently PatternCheckFunctionInput has

  /*!
   * \brief A map which contains all expressions matched by the sub patterns in
   * FuseOpsPatternNode::annotation_patterns.
   */
  Map<String, Expr> annotated_expr;

  /*!
   * \brief A map mapping variable definitions to a set of uses.
   */
  Map<Var, Array<Var>> var_usages;

  /*!
   * \brief Map from value to its bound variable.
   */
  Map<Expr, Var> value_to_bound_var;

This PR also changes the signature of FuseOpsByPattern, while keeping it backward compatible.

This PR also improves the check function of cutlass conv2d residual block pattern, as a follow up of #14252, as well as an example on the power of the new check function.
cc @vinx13 @masahi

Need to resolve the conflict.


Do not generate additional annotations for regulated processes

If a model exists in the repository that includes an annotation to a 'regulation of X process', the GPAD file contains the explicit annotation, but the GPAD generation software also creates an annotation to 'acts_upstream_of_or_within X'. We should not output this second annotation. We also do not need to output the 'regulates' annotation extension on the primary annotation as this is inherent in the GO term.
Example:
in MGI:MGI:2148811
This primary statement/annotation:
MGI | MGI:2148811 | acts_upstream_of_or_within | GO:0030511 | PMID:17537792 | ECO:0000315 | MGI:MGI:3715213 |   | 20070808 | MGI | positively_regulates(GO:0007179) | noctua-model-id=gomodel:MGI_MGI_2148811|contributor=http://orcid.org/0000-0001-7476-6306|model-state=production
does not need to have the AE -positively_regulates(GO:0007179)
and should not generate this annotation:
MGI | MGI:2148811 | acts_upstream_of_or_within | GO:0007179 | PMID:17537792 | ECO:0000315 | MGI:MGI:3715213 |   | 20070808 | MGI | occurs_in(EMAPA:17373) | noctua-model-id=gomodel:MGI_MGI_2148811|contributor=http://orcid.org/0000-0001-7476-6306|model-state=production

Discussed with @ukemi. It is a challenge in the current architecture to make use of this logical definition information during GPAD export. One option is to simply suppress 'regulates' in annotation extensions. This doesn't solve the separate acts_upstream_of_or_within annotation.

One possibility is a gaferencer-like post-processing which infers that one annotation expression is subsumed by another, to reduce redundancy.

@balhoff I've been looking at this a bit more, and although I don't think it solves the GPAD output issue but it might help. I think there is an issue with a property chain nonetheless. If x acts upstream or within (y regulates z), then shouldn't x act upstream of z? Any way that this would help us in solving the 'redundant GPAD line? If x acts upstream or within (y regulates z), then filter annotations to x acts upstream of z with the same supporting evidence.

Speaking with @vanaukenk this morning, we think this would be a reasonable strategy from here.

Correct the property chains so that all of the annotations are as precise as they can be. Some of these (2 and 3) are based on curation practice.
acts_upstream_of_or_within-o-regulates-> acts_upstream_of
acts_upstream_of_or_within-o-positively_regulates-> acts_upstream_of_positive_effect
acts_upstream_of_or_within-o-negatively_regulates-> acts_upstream_of_negative effect

Once these are corrected, the additional annotations that are generated would be more precise and would be ok to add to the file. If Users wanted to explicitly filter out upstream genes for an analysis, they could do so using the GP to term relations.

After discussion on the MOD imports call, we agreed to be more conservative in the property chains:
Correct the property chains so that all of the annotations are as precise as they can be. Some of these (2 and 3) are based on curation practice.

acts_upstream_of_or_within-o-regulates-> acts_upstream_of
acts_upstream_of_or_within-o-positively_regulates-> acts_upstream_of
acts_upstream_of_or_within-o-negatively_regulates-> acts_upstream_of

This one also looks like it worked. Here is the inputs and outputs. I think we can merge it into production as well. Note the GOREL is lost. This is expected and acceptable as is the additional annotation with the 'acts upstream of' qualifier..
Input:
MGI:MGI:2148811 |   | RO:0002264 | GO:0030511 | MGI:MGI:3714574|PMID:17537792 | ECO:0000315 | MGI:MGI:3715213 |   | 2007-08-08 | MGI | GOREL:0001004(EMAPA:17373) | creation-date=2007-08-08|modification-date=2007-08-08|comment=anatomy metanephros ; EMAP:3841|comment=regulates_o_has_participant(MGI:107430)|comment=target Gdnf ; MGI:107430|contributor-id=https://orcid.org/0000-0001-7476-6306
Output:
MGI | MGI:2148811 | acts_upstream_of_or_within | GO:0030511 | PMID:17537792 | ECO:0000315 | MGI:MGI:3715213 |   | 20070808 | MGI | positively_regulates(GO:0007179) | contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_2148811|model-state=production
MGI | MGI:2148811 | acts_upstream_of | GO:0007179 | PMID:17537792 | ECO:0000315 | MGI:MGI:3715213 |   | 20070808 | MGI | occurs_in(EMAPA:17373) | contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_2148811|model-state=production

Double-checked the above example in the new GPAD file. Still looks good and ready to deploy.

Discussed on managers call. We want to prioritize filtering out redundant acts-upstream-of. We can discuss the technical aspects on the Thu software call, cc @kltm

Discussed in the software call; decided to start by implementing in Minerva. A simple map from regulation terms to what they regulate should suffice.

@balhoff @ukemi
Let's discuss the current status of this on today's MODs imports call.

From 2021-09-28 call:
Explore whether we can exclude 'acts upstream of' process X annotations based on instance id when there is an inferred annotation based on the 'acts upstream of or within' o 'regulates' -> 'acts upstream of'

Checking the latest diffs, this still doesn't seem to be working.
Here is an annotation that is input from MGI in the first round of loading Noctua:
MGI:MGI:99460		RO:0002264	GO:0045596	MGI:MGI:3529381|PMID:15064243	ECO:0000315			2005-03-22	MGI	BFO:0000066(EMAPA:16728),GOREL:0001010(CL:0000031)	creation-date=2005-03-22|modification-date=2005-03-22|comment=anatomy TS19\ lung; EMAP:3857|comment=cell type neuroblast ; CL:0000031|comment=evidence antisense oligonucleotides|contributor-id=https://orcid.org/0000-0001-7476-6306
The import looks good in Noctua. Here is what is in the first output file directly resulting from the input:
MGI	MGI:99460	acts_upstream_of_or_within	GO:0045596	PMID:15064243	ECO:0000315			20050322	MGI	occurs_in(EMAPA:16728),negatively_regulates(GO:0014016)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
but I also see this INFERRED:
MGI	MGI:99460	acts_upstream_of	GO:0014016	PMID:15064243	ECO:0000315			20050322	MGI	results_in_acquisition_of_features_of(CL:0000031)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
This one seems to be generated from the primary above. This is confirmed when I look at the second round of imports. At this point MGI imports both of these annotations:
MGI	MGI:99460	acts_upstream_of_or_within	GO:0045596	PMID:15064243	ECO:0000315			20050322	MGI	occurs_in(EMAPA:16728),negatively_regulates(GO:0014016)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
INFERRED
MGI	MGI:99460	acts_upstream_of	GO:0014016	PMID:15064243	ECO:0000315			20050322	MGI	results_in_acquisition_of_features_of(CL:0000031)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
To really make this messy, when this is run through the process again, we generate yet another inferred duplicate annotation:
MGI	MGI:99460	acts_upstream_of_or_within	GO:0045596	PMID:15064243	ECO:0000315			20050322	MGI	occurs_in(EMAPA:16728),negatively_regulates(GO:0014016)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
AND INFERRED
MGI	MGI:99460	acts_upstream_of	GO:0014016	PMID:15064243	ECO:0000315			20050322	MGI	results_in_acquisition_of_features_of(CL:0000031)	contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
AND INFERRED
MGI	MGI:99460	acts_upstream_of	GO:0014016	PMID:15064243	ECO:0000315			20050322	MGI		contributor=https://orcid.org/0000-0001-7476-6306|noctua-model-id=gomodel:MGI_MGI_99460|model-state=production|creation-date=2005-03-22
Fortunately when this goes live, we will only turn the crank once for the MGI data, and we wiill only get the first undesirable annotation, still not good. But for loads that we do from other resources, we will generate additional duplicate inferred annotations based on regulation terms from each load. This would be really bad.

@balhoff just went over this with me in fine detail and I think we are ok. The original inferred annotation in fact has different information than the original annotation and is valid. The second inferred annotation is a result of the original annotation, minus the chain relation, being reasoned again and that is what is showing up on @sierra-moxon 's report. So this all looks good!

PS. @balhoff , thanks for going through this!


Display program json export on screen with copy option

In addition to allowing admin to download a file containing the program export json, we want to display the json on screen and allow them to copy it from there.
Part of #7087

It would be cool if the JSON displayed had syntax highlighting.

Oooo that would be cool. I'll add that as an issue to work on once the big pieces are done.


Array and GType fixes

See commit messages
Aims to solve #6

https://github.com/jwijenbergh/puregotk/blob/2edc8f9fc840ffc4909049e687d1d74bfb429d50/v4/gobject/gvalue.go#L29 this is now the definition for the value struct

Thanks for the effort, appreciate it. Looks like we're moving in the right direction, however funcs/methods that accept a GType argument have the argument type defined as []interface{} which makes them uncallable (see e.g. func gdk.NewContentProviderTyped(TypeVar []interface{}, varArgs ...interface{}) *gdk.ContentProvider {}

Thanks for the effort, appreciate it. Looks like we're moving in the right direction, however funcs/methods that accept a GType argument have the argument type defined as []interface{} which makes them uncallable (see e.g. func gdk.NewContentProviderTyped(TypeVar []interface{}, varArgs ...interface{}) *gdk.ContentProvider {}

Thanks for checking. Hmmm, are you looking in the right branch? Or is there something else I am missing? The type of the first argument is correct https://github.com/jwijenbergh/puregotk/blob/f95d2a673fd2868427c5d13dc935a6e4c3bf73b7/v4/gdk/gdkcontentprovider.go#L85

Apologies - had a workspace SNAFU, looking better with the correct branch.
Should the gobject.Type*Val definitions in more.go now be of type types.GType for clarity (and perhaps named e.g. GTypeString for same)?
I think full support probably requires wrapper generation for the glib:get-type property in the gir - I see that it's unmarshalled in the gen structures, but doesn't look like it's processed. This would be required to support e.g. pixbuf drag-and-drop.

Apologies - had a workspace SNAFU, looking better with the correct branch.
Should the gobject.Type*Val definitions in more.go now be of type types.GType for clarity (and perhaps named e.g. GTypeString for same)?
I think full support probably requires wrapper generation for the glib:get-type property in the gir - I see that it's unmarshalled in the gen structures, but doesn't look like it's processed. This would be required to support e.g. pixbuf drag-and-drop.

Ah got it, thanks. Would you have a minimal example in c that implements this pixbuf drag and drop :sweat_smile:

The example for the DragSource side can be found here:
https://docs.gtk.org/gtk4/class.DragSource.html
There they reference GDK_TYPE_PIXBUF, which is defined by calling gdk_pixbuf_get_type().
This seems to be a common pattern for non-core types, but since these defines are again not exposed via gir, I think the most sensible way to gain access to the correct values is through the gir prop glib:get-type (e.g. GdkPixbuf specifies glib:get-type="gdk_pixbuf_get_type", which will net us the same result by wrapping that C func to return the corresponding GType).

The example for the DragSource side can be found here:
https://docs.gtk.org/gtk4/class.DragSource.html
There they reference GDK_TYPE_PIXBUF, which is defined by calling gdk_pixbuf_get_type().
This seems to be a common pattern for non-core types, but since these defines are again not exposed via gir, I think the most sensible way to gain access to the correct values is through the gir prop glib:get-type (e.g. GdkPixbuf specifies glib:get-type="gdk_pixbuf_get_type", which will net us the same result by wrapping that C func to return the corresponding GType).

Thanks for the breakdown! Can you check the latest commit? You can now do something like:
package main

import (
	"os"

	"github.com/jwijenbergh/puregotk/v4/gdk"
	"github.com/jwijenbergh/puregotk/v4/gio"
	"github.com/jwijenbergh/puregotk/v4/gtk"
)

func main() {
	app := gtk.NewApplication("com.github.jwijenbergh.puregotk.gtk4.hello", gio.GApplicationFlagsNoneValue)
	// cleanup, no finalizers are used in this library
	defer app.Unref()
	// functions with callback arguments take function pointers
	// this is for internal re-use of callbacks
	actcb := func(_ gio.Application) {
		activate(app)
	}
	app.ConnectActivate(&actcb)

	if code := app.Run(len(os.Args), os.Args); code > 0 {
		os.Exit(code)
	}
}

func activate(app *gtk.Application) {
	window := gtk.NewApplicationWindow(app)
	window.SetTitle("purego")
	label := gtk.NewLabel("Hello, World!")
	window.SetChild(&label.Widget)
	// cleanup, no finalizers are used in this library
	label.Unref()
	window.SetDefaultSize(500, 500)

	dragS := gtk.NewDragSource()
	dragPrep := func(_ gtk.DragSource, x float64, y float64) gdk.ContentProvider {
		file := gio.FileNewForPath("/tmp/foo")
		return *gdk.NewContentProviderTyped(gio.FileGLibType(), file.GoPointer())
	}
	dragS.ConnectPrepare(&dragPrep)

	dragBeg := func(_ gtk.DragSource, _ uintptr) {
		paintable := gtk.NewWidgetPaintable(&window.Widget)
		dragS.SetIcon(paintable, 0, 0)
		paintable.Unref()
	}
	dragS.ConnectDragBegin(&dragBeg)

	var control gtk.EventController
	dragS.Cast(&control)
	window.AddController(&control)
	window.Present()
}

That's looking pretty good, I was able to extend the above example and trigger the drop signal:
package main

import (
	"fmt"
	"os"

	"github.com/jwijenbergh/puregotk/v4/gdk"
	"github.com/jwijenbergh/puregotk/v4/gio"
	"github.com/jwijenbergh/puregotk/v4/gobject"
	"github.com/jwijenbergh/puregotk/v4/gobject/types"
	"github.com/jwijenbergh/puregotk/v4/gtk"
)

func main() {
	app := gtk.NewApplication("com.github.jwijenbergh.puregotk.gtk4.hello", gio.GApplicationFlagsNoneValue)
	// cleanup, no finalizers are used in this library
	defer app.Unref()
	// functions with callback arguments take function pointers
	// this is for internal re-use of callbacks
	actcb := func(_ gio.Application) {
		activate(app)
	}
	app.ConnectActivate(&actcb)

	if code := app.Run(len(os.Args), os.Args); code > 0 {
		os.Exit(code)
	}
}

func activate(app *gtk.Application) {
	window := gtk.NewApplicationWindow(app)
	window.SetTitle("purego")
	container := gtk.NewBox(gtk.OrientationHorizontalValue, 8)

	dragFrame := gtk.NewFrame("Drag Source")
	dragS := gtk.NewDragSource()
	dragPrep := func(_ gtk.DragSource, x float64, y float64) gdk.ContentProvider {
		// TODO: weird constructor name
		file := gio.FileNewForPath("/tmp/foo")
		// TODO: the dereference
		return *gdk.NewContentProviderTyped(gio.FileGLibType(), file.GoPointer())
	}
	dragS.ConnectPrepare(&dragPrep)

	dragBeg := func(_ gtk.DragSource, _ uintptr) {
		paintable := gtk.NewWidgetPaintable(&dragFrame.Widget)
		dragS.SetIcon(paintable, 0, 0)
		paintable.Unref()
	}
	dragS.ConnectDragBegin(&dragBeg)
	dragFrame.AddController(&dragS.EventController)

	dropFrame := gtk.NewFrame("Drop Target")
	dropT := gtk.NewDropTarget(types.GType(gobject.TypeInvalidVal), gdk.ActionCopyValue)
	dropT.SetGtypes([]types.GType{gio.FileGLibType()}, 1)
	enterCb := func(_ gtk.DropTarget, _ float64, _ float64) gdk.DragAction {
		fmt.Println("DROP ENTER")
		return gdk.ActionCopyValue
	}
	dropT.ConnectEnter(&enterCb)
	dropCb := func(_ gtk.DropTarget, val uintptr, _ float64, _ float64) bool {
		// How to extract information from `val` here?
		fmt.Println("DROP")
		return true
	}
	dropT.ConnectDrop(&dropCb)
	dropFrame.AddController(&dropT.EventController)

	container.Append(&dragFrame.Widget)
	container.Append(&dropFrame.Widget)
	dragFrame.Unref()
	dropFrame.Unref()
	window.SetChild(&container.Widget)
	// cleanup, no finalizers are used in this library
	container.Unref()
	window.SetDefaultSize(500, 500)

	window.Present()
}

But I've not worked out how to extract information at the drop site as params of type gobject.Value currently appear to  be rendered as uintptr, and I don't see how to convert the ptr to a Value.
Other than that, I think it's just the type of the gobject.Type*Val that needs looking at, as mentioned earlier. As most of them are defined as untyped ints they are currently accepted without conversion, but for example gobject.TypeInvalidVal is defined explicitly as uint and so requires conversion. Making them all types.GType is probably correct though.

I do note in the example from the DropTarget docs that they use a macro func G_VALUE_HOLDS to check the GValue type, though I don't think that's necessary for this case since we can just compare the GType value directly against the consts, but there may be other more useful macros exposed by gir as the function-macro type, so might be a possible future enhancement to implement support for function-macro.


New theme (based on bira).

@torzech oh-my-zsh is not accepting new theme.
cf.
https://github.com/robbyrussell/oh-my-zsh#do-not-send-us-themes

OK. Sorry.

No Problem!


version 1.0.6

A version 1.0.5 may have been previously uploaded to PyPI, creating various
possibilities for difficulty or confusion if we try to upload a different
release with that version number. So we're just going with 1.0.6

regarding the Travis checks, see #151 but longer-term we really do need to fix that so that Travis CI can consistently check PRs as intended. :/


Add BlobTargetOption and BlobWriteOption classes to Bucket

This fixes #702

Looks good. This PR does not cover all the comments mentioned in #702.
I think #702 was suggesting to not use any of the Storage.* options. Personally, I am fine either way.

It does not cover all comments because I see no reason for not using existing options when they apply

It does not cover all comments because I see no reason for not using existing options when they apply.

Fine with me. Would be nice to state that in the issue when merging this PR (and auto-closing the issue).


Not working with https

Hi,
I configured the integration on my HA instance, and it was working very well. Now, I would like to be able to access HA from the outside, so I started to secure it. I added ssl certificates, and I am now connecting via https://192.168xxxxx
Since that, the Nuki Lock integration is not working anymore.
Do I have to change something to specify that I am using this new protocol?
Thanks

Nuki Bridge doesn't support SSL. You have to configure HA to accept also http, otherwise it won't work. It's a hw limitation.

But even when I skip niki bridge (I'm just giving the web api token) it does not work. However, niki web is supposed to accept https.

Nuki web works fine, only the bridge doesn't support https.
If Nuki web doesn't work with https, you have configuration issues, either with the ssl or with something else. Did you configure the web token and the rest correctly? Here it works fine. Did you check the logs for errors? Please provide the logs and try to reconfigure it, but do a screenshot before submitting the configuration so we can double-check the parameters you are using.
If you have the bridge, it doesn't make sense to not use it just because you want to force SSL. Configure the SSL addon you're using to accept http on local network, if you want to keep using the bridge.

Check also this thread: https://github.com/kvj/hass_nuki_ng/issues/42

Here is my configuration:

When I press ok, I get the "success" message. However, after, I have this, and no device nor entity is created:

When I go to the logs, it is empty!
Before I used https, everything was working perfectly, with this same configuration (regarding the web API).

In the screenshot, you filled the bridge IP field, and you put the https external_url of HA.
This doesn't work, as I told you, because the bridge can't call HTTPS URLs.
In order to have HA available via https (duckdns) and http internally, is to use the NGINX Proxy addon for HA, read here: https://community.home-assistant.io/t/nuki-card-with-callback-support-supports-both-lock-opener-it-replaces-the-official-integration/311932/390?u=alexdelprete

Ok thanks! I will install this add-on, so that I can have access to the bridge API also :)
I am only missing one thing, but I may open another issue for that: is it possible to get the state of the nuki smartlock button ? Like firing an event "button pressed" or "button pressed twice" when somebody hits the button, in order to start an automation on pressed, and not after the action due to button pressed is done.
Thanks again for your help

is it possible to get the state of the nuki smartlock button ?

Most likely no, but let me test it

In the screenshot, you filled the bridge IP field, and you put the https external_url of HA.

Theoretically it doesn't matter. The "Bridge token" field is empty - nuki_ng should ignore bridge stuff.

We do that now. HA url and bridge IP are both auto-filled.

so we can validate if it's an https url and warn the user that it doesn't work, right?

The field is either mandatory or optional.

got you, but can we validate a field based also on other fields' contents?

We don't accept it now, but only when bridge token is filled. Otherwise the integration ignores the input of two other fields.

I understand, but there's no feedback to the user, so they get confused and issues are opened.
I know you're busy, appreciate all your effort on this integration.
BTW: I'm in a small beta group of Nuki for MQTT implementation. We managed to convince the devs finally to implement support for MQTT, that will solve A LOT of issues we're facing now. Hope you'll like it. The first beta has not been released yet, I'll keep you posted.

BTW: I'm in a small beta group of Nuki for MQTT implementation

That's a very funny coincidence. I've been working on a similar stuff in my spare time and (mostly) re-implemented bridge and web API functions using ESP32 platform and Nuki bluetooth API and MQTT.
I was about to ask whether someone is interested in this direction or not.
It's quite functional and stable, it also uses HA MQTT discovery protocol, so no custom integration is needed. In my test setup I have no Bridge, no nuki_ng just a tiny m5atom device and everything mostly works.

This is the latest spec available

Ok, pretty basic stuff. Status + lock action. I wouldn't expect Nuki devs. will expose anything extra than bridge can do now. Actually it can do much more via the Bluetooth API, basically anything you can do via the App and/or Web API should be available to bridge.

Does the project require soldering or it's just a device ready to be programmed and it works?
No, no soldering. Just any cheap ESP32 board from Amazon, USB cable and PlatformIO installed should do the job. Let me publish something and I let you know. For now only the Lock 2.0 / 3.0 is supported, the Opener can be supported also, the API is 95% the same but I have no Opener, so no motivation to work on it :)

Here is what's already exposed, and some data is also writable:

Ok, pretty basic stuff. Status + lock action. I wouldn't expect Nuki devs. will expose anything extra than bridge can do now.

Basically the Bridge API, through MQTT. That's what has been asked.

No, no soldering. Just any cheap ESP32 board from Amazon, USB cable and PlatformIO installed should do the job. Let me publish something and I let you know

I'm absolutely interested in a better version of the bridge. :)

the Opener can be supported also, the API is 95% the same but I have no Opener, so no motivation to work on it

I will try to find my opener, don't know where it is anymore, I have too many boxes with old cables and IT gear. If I find it, I can send it to you, no problem.

Ok, pretty basic stuff. Status + lock action. I wouldn't expect Nuki devs. will expose anything extra than bridge can do now.

That is what has been asked them: Bridge API through MQTT. If you have suggestions on what could be interesting to be added, let me know so I can try to ask to modify the MQTT API. :)

Just any cheap ESP32 board from Amazon, USB cable and PlatformIO installed should do the job. Let me publish something and I let you know.

I understand, ESP32 has Wifi and BT embedded, so any board with ESP32 is fine. Let me know, I'm very interested in this project. It's a better version of the bridge. Hope the BT signal is strong enough to be located not very near the lock.

the Opener can be supported also, the API is 95% the same but I have no Opener, so no motivation to work on it

I tried to find my opener, it's in one of my old IT gear boxes, my wife helped me fix the confusione but now I can't find where the opener ended. When I find it, I can send it to you so you can develop and test it. :)

That's a very funny coincidence. I've been working on a similar stuff in my spare time and (mostly) re-implemented bridge and web API functions using ESP32 platform and Nuki bluetooth API and MQTT. I was about to ask whether someone is interested in this direction or not.

There are hidden gems in this GitHub issue. 😍
I would be very interested to have access to this implementation, having myself a spare M5 ATOM Lite.
Is it related or based on this project? https://github.com/technyon/nuki_hub
I just discovered it, and it seems similar to your project. It looks very promising, and it can impersonate an app in the latest version so you can also keep the poor hardware hub.
There's also this one but unrelated to MQTT https://github.com/I-Connect/NukiBleEsp32
I also had a look at https://github.com/dauden1184/RaspiNukiBridge (based on https://github.com/jandebeule/nukiPyBridge)

@Mincka @alexdelprete
Indeed. https://github.com/technyon/nuki_hub looks very good code quality wise. I haven't gone that far, even though the functions are quite similar. I will definitely compare the performance/stability/etc and happy to start using nuki_hub and/or contribute. After a quick check, MQTT discovery can be improved a bit. Also, exposing auth entries and/or keypad entries as enities could be handy.

Is there a sort of M5 ATOM Lite with the physical format as the Nuki Bridge (with the embedded AC plug)?

No I don't think so, I use small USB AC plug + 10cm usb-c cable + m5atom

I can confirm nuki_hub is easy to use. I tried with an Espressif ESP32-DevKit. It looks like it supports only one lock for now.
Indeed, I would be very happy to see more things discovered in HA, there's an open issue about this already.
You may be both also interested in this project if you use, or would like to use ESPHome.
https://github.com/uriyacovy/ESPHome_nuki_lock/
This project is less "complete" but is going to support multiple locks very soon.
I am also going to test it since it would be also great to share the ESP32 with other modules of ESPHome.

You may be both also interested in this project if you use, or would like to use ESPHome.
https://github.com/uriyacovy/ESPHome_nuki_lock/

Nuki Hub seems more complete in terms of functionality, just missing some things that Konstantin mentioned in his last post.
What I actually was thinking is asking HA devs if Nuki support (through NukiBleESP32?) could be directly integrated in the core. They seem to like Bluetooth a lot in latest versions, there's a lot of hype around it. I will write a post in WTH section of HA forum. :)
The only issue is that that library is not in Python...

I will definitely compare the performance/stability/etc and happy to start using nuki_hub and/or contribute. After a quick check, MQTT discovery can be improved a bit. Also, exposing auth entries and/or keypad entries as enities could be handy.

Let me know what you decide, right now I like Nuki Hub, but your technical judgement is needed to appropriately assess the decision. Would be perfect if you can contribute/PR Nuki Hub, also taking into account that you're very busy usually. :)

After a quick check, MQTT discovery can be improved a bit.

What's missing in discovery?

Also, exposing auth entries and/or keypad entries as enities could be handy.

Agreed, all the web integration, etc. we have in the component. :)

I was also thinking: can we hack the hw of the bridge? I mean, open it, and replace current board with a better ESP32 based one with better software? Because the form factor is cool, square with the plug, the problem is the inside. ;)

Let me know what you decide, right now I like Nuki Hub, but your technical judgement is needed to appropriately assess the decision.

Nuki_hub is good. I was able to compile and setup it using the same M5Atom device. The performance and stability is the same, mainly constrained by the ESP32 hardware. I'm thinking about opening some PRs to the original project to proposes a number of improvements. The orverall approach exposing the data via MQTT isn't well defined there

The performance and stability is the same, mainly constrained by the ESP32 hardware. I'm thinking about opening some PRs to the original project to proposes a number of improvements. The orverall approach exposing the data via MQTT isn't well defined there

This is EXCELLENT news Konstantin. :)
I'm sure you'll improve the project with your knowledge and experience done with Nuki APIs and HA.
I noticed the entities don't have unique ids and all the web api sensors are missing.
Meanwhile, I opened the first issue there: don't enable Keypad Control, it messes up everything. :)

Mincka

someone can explain me how to use technyon/nuki_hub/ with nuki_ng and retrieve api bridge api token ?

Mincka

someone can explain me how to use technyon/nuki_hub/ with nuki_ng and retrieve api bridge api token ?

Nuki Hub replaces Nuki Bridge and Nuki NG.

Mincka

someone can explain me how to use technyon/nuki_hub/ with nuki_ng and retrieve api bridge api token ?

Nuki Hub replaces Nuki Bridge and Nuki NG.

I wrote you on discord... (in italian)

Let me know what you decide, right now I like Nuki Hub, but your technical judgement is needed to appropriately assess the decision.

Nuki_hub is good. I was able to compile and setup it using the same M5Atom device. The performance and stability is the same, mainly constrained by the ESP32 hardware. I'm thinking about opening some PRs to the original project to proposes a number of improvements. The orverall approach exposing the data via MQTT isn't well defined there

fun fact: the nuki bridge seems to host already a ESP-WROOM-02 chip for WIFI + a Cypress CY8C4248LQI-BL483 chip for Bluetooth according to this teardown-article: (https://314159.xyz/post/nuki-smart-lock/).. maybe some day we see a custom firmware for the ariginal nuki Bridge. :)))

I was also thinking: can we hack the hw of the bridge? I mean, open it, and replace current board with a better ESP32 based one with better software? Because the form factor is cool, square with the plug, the problem is the inside. ;)

fun fact: the nuki bridge seems to host already a ESP-WROOM-02 chip for WIFI + a Cypress CY8C4248LQI-BL483 chip for Bluetooth according to this teardown-article: (https://314159.xyz/post/nuki-smart-lock/).. maybe some day we see a custom firmware for the ariginal nuki Bridge. :)))


Panic in simplify_expressions optimizer rules when running an aggregate query (SQLancer)

Describe the bug
See the reproducer in datafusion-cli (compiled from the latest main, commit 84c940978)
> CREATE TABLE t1(v1 int);
> SELECT v1
FROM t1
WHERE ((count(v1) % 1) << 1) > 0;
thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/physical-expr/src/expressions/binary/kernels.rs:87:1:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

-- Backtrace
......
  22: datafusion_expr::logical_plan::tree_node::<impl datafusion_expr::logical_plan::plan::LogicalPlan>::map_expressions
             at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/expr/src/logical_plan/tree_node.rs:570:19
  23: datafusion_optimizer::simplify_expressions::simplify_exprs::SimplifyExpressions::optimize_internal
             at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs:125:9
  24: <datafusion_optimizer::simplify_expressions::simplify_exprs::SimplifyExpressions as datafusion_optimizer::optimizer::OptimizerRule>::rewrite
             at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs:73:9
.......

To Reproduce
No response
Expected behavior
The query is invalid, given aggregate function is not allowed in where clause, so it should return a planning error, instead of panics
Additional context
Found by SQLancer https://github.com/apache/datafusion/issues/11030

take


Disable submit button when form is invalid

How can I do that in any views (creation, edition, deletion)?
Is there a work around?

Try overriding the view template (cf https://github.com/marmelab/ng-admin/blob/master/doc/Theming.md#customizing-the-view-template-for-a-given-entity).


visualization results of navigation

Hi, I saw a lot of visualization results of navigation steps in your paper, could you tell me how to get these results?

Since I have no access to the server that holds the full codes of ESceme anymore, I can only suggest you find the visualization method from the Matterport3DSimulator repo.

Thank you very much for your prompt reply. In fact, I did find the visualization method in Mattport3D.


Windows task manager like process grouping

Is it possible to have processes grouped together if they are related? For instance, in task manager in windows, all discord processes are under the drop down of discord.  Feel free to correct me if I've been doing it the wrong way.
Thank you

I meant to open it under Feature request, apologies for the wrong label

please use the issue templates


[EC-42] Create cleaner client interface to Skyhook functionality

clean up v2 protocol interface
add easy interfaces for clients

@tboinske-skyhook - please review.

Addressed all code review comments. Also added a simple query client API to consolidate send and recv.


fix: overflow of links in tweets

Before:

After:

I change windicss version to minor change cause there is a bug in windicss 3.3 cli, refer: https://github.com/windicss/windicss/issues/599

Thanks @louis-she .For the windicss, yes there is an error and you can get the same version with pnpm i --frozen-lockfile.


Infinite water buckets with sink

If you right click a Sink with a empty bucket, it gives you 1000 water buckets

Playing FTB Unstable 1.10 v4.2.4 (with Cooking for Blockheads v3.1.26), so i'm not sure it's a FTB bug or a Cooking for Blockeads bug

See https://github.com/SleepyTrousers/EnderIO/issues/3507#issuecomment-233017995 - it's an issue in IC2.

Yeah, so the problem it's not here xD. Thank you for your time (and of course for your mode - it makes my life easier with food ^-^)


Add Databricks Serverless SQL Warehouse Support

The one known issue is inability to do insert/overwrite on SQL Warehouse: https://community.databricks.com/t5/data-engineering/configuration-spark-sql-sources-partitionoverwritemode-is-not/td-p/43646
We may have to detect a SQL Warehouse connection and then have it do a delete/insert instead.
We should add a new test to our engine test_integrations tests to test both general purpose clusters and Serverless SQL Warehouse.

this is now implement i believe? @eakmanrq

Although we don't test it, we do believe this addressed now. Thanks.


Why is the body of web action response base64 string, not object?

In action/lib/common.js and action/alarmWebAction.js, there are web action responses which the body is bas64 string of JSON. I wonder why the body is base64 string, not the response or error object.
// https://github.com/apache/incubator-openwhisk-package-alarms/blob/master/action/lib/common.js#L100-L104
return {
    statusCode: statusCode,
    headers: { 'Content-Type': 'application/json' },
    body: new Buffer(JSON.stringify(params)).toString('base64')
};

I think the following return statement is more simple:
return {
    statusCode: statusCode,
    headers: { 'Content-Type': 'application/json' },
    body: params
};

After testing with a simple web action, I found the difference between the base64-encoded JSON string body and object body:

with base64 body, I get one-line JSON response like:{"__ow_method":"get","__ow_headers":{"host":"controllers","user-agent":"curl/7.54.0","accept":"*/*"},"__ow_path":""}

with object body, I get multi-line pretty JSON response like:{
  "__ow_method": "get",
  "__ow_headers": {
    "host": "controllers",
    "user-agent": "curl/7.54.0",
    "accept": "*/*"
  },
  "__ow_path": ""
}

Is there any intent using base64-encoded JSON string body?

It’s just legacy in past web action only supported base64 for json output.
I don’t see any problem removing the base64 step


[1.3.7] Update soft version to 1.3.7

Purpose of the pull request

this pr modify ds version to 1.3.7 deal with when upgrade ds from 1.3.6 to 1.3.7,  the t_ds_version table still 1.3.6
Brief change log

modify soft_version file

@Eights-Li Please refer to https://dolphinscheduler.apache.org/en-us/community/release-prepare.html


Update NetworkPolicy concepts doc for egress

Update docs/concepts/services-networking/network-policies.md to fully account for the changes introduced long ago with the support for egress filtering and identifying peers by IP address.
Fixes #30908

Hi @caseydavenport Can you serve as the technical reviewer for this.  Just add a /lgtm when you are happy with it and I'll take care of the rest.  Thanks!
/assign

Please see #30958 instead.


support inline display of the dialog

We wanted to display the recurring select dialog inline (below the select input), so we customised your plugin as follows.
The inline display can be specified using data attribute on the input:
  f.select_recurring :current_existing_rule, nil, { :allow_blank => true }, { data: { recurring_select_position: 'inline' } }

A position class (either fixed or inline) is added to the . rs_dialog_holder element and the css now supports the two options.
We also adjusted the recurring_select_dialog.js.coffee.erb so that when inline:

the dialog is not vertically positioned
clicking anywhere outside of the dialog (body) cancels it

Mainly, these changes do not break existing configurations.

any chance to have this merged?

This would be great!


Tooltip on timeline strips all spaces

e.g. the data says "Bounty awarded" but hovering over the horizontal timeline shows "Bountyawarded"

It looks like this bug is caused by the line var name = $(this).find("#title").text().replace(/ /g, ''); on line 552 of /app/assets/javascripts/timeline/timeline.js.erb. It was resolved whe I deleted .replace(/ /g, '').
I will try to submit a PR for this, by my project has been a little broken since I tried to update the postgres gem.

What's broken after updatig pg? Did you recreate yor database after updating?

It wasn't liking the line gem 'pg', '=> 0.19.0'. But I think I just needed to update bundler. It works now.


list_discussions: duplicate node (selfhost)

Describe the bug
I checked out my MR branch.
If i run summary() i see the summary text as expected. But if i run list_discussion() i get an unexpected.
Error executing vim.schedule lua callback: ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: duplicate node id-6035-3-```
stack traceback:
        [C]: in function 'error'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:64: in function 'initialize_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:288: in function '_add_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:315: in function 'set_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:222: in function 'init'
        .../.local/share/nvim/lazy/nui.nvim/lua/nui/object/init.lua:132: in function 'NuiTree'
        ...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:86: in function <...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:54>

I checked with basically all MRs one where we dont have in line comments, one where we just have a general discussion in the "overview" tab.
To Reproduce
Steps to reproduce the behavior:

git switch to any branch which got an MR
open vim
run :lua require("gitlab").list_discussion()
See error

Expected behavior
I would expect the list of comments. For a freshly created MR i also do see a test comment. But not for any older MR/with multiple authors/comments
Desktop (please complete the following information):

OS: linux
gitlab.nvim config is set to selfhost

Just noticed new comments are working. As i just commented for test purposes i now see that one comment. But on some other MR where there are a lot of comments i dont see any.
Furthermore i now get
Error executing vim.schedule lua callback: ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: duplicate node id-6035-3-```
stack traceback:
        [C]: in function 'error'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:64: in function 'initialize_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:288: in function '_add_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:315: in function 'set_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:222: in function 'init'
        .../.local/share/nvim/lazy/nui.nvim/lua/nui/object/init.lua:132: in function 'NuiTree'
        ...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:86: in function <...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:54>

Per this comment: "But on some other MR where there are a lot of comments i dont see any."
Are those comments directly linked to the code itself? If not, I'm currently filtering them out from showing in the tree, because they don't have location information (line numbers). I'll eventually have a separate MR to add support for showing comments that are not linked to specific lines of code, see this ticket: https://github.com/harrisoncramer/gitlab.nvim/issues/17
In regards to your second error, it looks like this is happening when we try to initialize the tree for the discussions (line 86 of discussions.lua with new nodes, because of a duplicate Node ID. My guess is that it's due to the discussion.id property not being unique for some reason (line 77 of that file).
It's going to be difficult for me to debug what's going wrong but you might try replacing that line with a random UUID (see this for instance https://gist.github.com/jrus/3197011) to see if that resolves things. You could also try looking at the actual response from Gitlab's API to see whether there is a duplicate somewhere in the data.discussions value in that function.

Are those comments directly linked to the code itself?
yes all comments (or on code lines and which were added)

you might try replacing that line with a random UUID
i tried that. still getting the same error. just different line numbers now. But this is expected as i added that suggested function.

  Error executing vim.schedule lua callback: ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: duplicate node id-6059-3-```                                                                                stack traceback:                                                                                [C]: in function 'error'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: in function 'initialize'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:64: in function 'initialize_nodes'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:288: in function '_add_nodes'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:315: in function 'set_nodes'                                                                                ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:222: in function 'init'                                                                                .../.local/share/nvim/lazy/nui.nvim/lua/nui/object/init.lua:132: in function 'NuiTree'                                                                                ...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:95: in function <...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:63>
> diff ~/.local/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua.bak ~/.local/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua
12a13,21
> local random = math.random
> local function uuid()
>     local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
>     return string.gsub(template, '[xy]', function (c)
>         local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
>         return string.format('%x', v)
>     end)
> end
>
77c86
<                 id = discussion.id,
---
>                 id = uuid(),

It does look like you implemented my suggestion correctly. Thank you for using this plugin while it's still under active development, this is very helpful for me to catch these issues! I can understand that this might be frustrating.
If you're able to, could you share the API call result with me to the discussions endpoint? I could try to resolve on my end (You can message me personally if you'd rather not share it in this issue, since I'm not sure if it would contain important information for your repository).
The on_stdout callback on line 15 of discussions.lua calls a function that will construct a tree that's used to display the discussions. For whatever reason, the data that you're feeding it is causing that function to error. To get the API response data, you can just open Neovim like you are right now (which will start the Go server) and then, in a separate terminal window, hit the Go server directly:
$ curl localhost:21036/discussions

This will give you the JSON response that's being used to try and construct the tree. That JSON response might give us a clue into what is going wrong -- we could probably take that JSON and feed it into the tree constructor function manually to try and see why it is erroring. You can also see that the Go server is acting as an intermediary and hits the Gitlab API for us.
Separately, you can see the API call for the discussions going out if you look at the ~/.cache/nvim/gitlab.nvim.log file, although I suspect that is working fine if you are getting a JSON response.

@Otterpatsch I just merged in a fix -- encountered this same bug on my end. Believe that if you pull down the latest plugin and rebuild you should be good to go. Let me know if you are not and I'll reopen this issue.
We were pulling down all merge requests for any repository on Gitlab with the feature branch name; I was using the wrong API basically.

Somehow i still get the same kind of error but with a different style of node id now:
Error executing vim.schedule lua callback: ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: duplicate node id-8b513ccdad86f5522d86d15f1f7c36edfb3779ce-2-
stack traceback:
        [C]: in function 'error'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:36: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:55: in function 'initialize'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:64: in function 'initialize_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:288: in function '_add_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:315: in function 'set_nodes'
        ...at/.local/share/nvim/lazy/nui.nvim/lua/nui/tree/init.lua:222: in function 'init'
        .../.local/share/nvim/lazy/nui.nvim/lua/nui/object/init.lua:132: in function 'NuiTree'
        ...l/share/nvim/lazy/gitlab.nvim/lua/gitlab/discussions.lua:48: in function 'callback'
        ...at/.local/share/nvim/lazy/gitlab.nvim/lua/gitlab/job.lua:25: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

So i get the json form the $ curl localhost:21036/discussions is it still worth for further debugging?

Thank you for providing the JSON -- that helped me track down what's going wrong here.
Basically there seems to be a bug in an external library (https://github.com/MunifTanjim/nui.nvim) that we're using for the tree. The body of these comments have the string ``` in them (three ` symbols) which seems to be breaking the ID generation for those nodes.
I'm probably not going to solve this immediately but that is definitely the issue here.

Will you pull down latest and try again? This recent fix worked for me with the JSON you provided!


Purge private information. Minor cosmetic changes.

Rebased on latest master.
Added private information purge on ecs.config and docker inspect outputs, sanitization will be introduced at a later point.
Added some minor cosmetic changes.

@slacksec LGTM, any thoughts?


Oauth2 can not be opened

When I set the parameter "enable:true", the system did not take effect.
spring:
  security:
    oauth2:
      enable: true

Interface:
 /api/v3/configurations

the return response:
{
  "payload": {
    "security": {
      "oauth2": {
        "enable": false
      }
    },
    "jwtToken": {
      "timeout": "1800000"
    },
    "version": "0.3-rc"
  }
}

Finally, I located the wrong code location.
package edp.davinci.controller;
class HomeController

public Map<String, Object> configurations() {}

"security.oauth2.enable"  should be "spring.security.oauth2.enable"

#2015 has fixed it. i close this issue.


Setting up WebSocket protocol

Hi,
when I use browsermob-proxy all connections goes through https:// even WebSocket methods.
For example: GET /echo HTTP/1.1 returns WebSocket-Location: wss://site.com/echo/123/websocket, after that initiates GET wss://site.com/echo/123/websocket with response code 101 switching protocols. But with browsermob-proxy initiates request GET https://site.com/echo/123/websocket
I've try to change protocol with addRequestFilter() but there is only http version of protocol:
proxy.addRequestFilter(new RequestFilter() {
   @Override
    public HttpResponse filterRequest(HttpRequest request, HttpMessageContents contents,    HttpMessageInfo messageInfo) {
       if (request.getUri().contains("echo/") && request.getUri().contains("/websocket")) {
           request.setProtocolVersion(new HttpVersion("WSS/1.1", true));
       }
       return null;
   }
});

There is no info about WebSocket and browsermob-proxy just this self-reply https://groups.google.com/forum/#!topic/browsermob-proxy/JzTHxje0qP4
I need proxy to monitor HTTP and WebSocket, there are a lot of autotests that I could make with it, but if I run tests with WebSocket it does not work at all.
Kind regards!

BMP doesn't currently support WebSockets because LittleProxy doesn't support WebSockets (AFAIK). I am not familiar enough with WebSockets to implement them myself, but I would welcome the efforts of anyone who would like to add them to LittleProxy!

Hi! May be there is a way do disable interception for websocket connections at all?
BTW I'm using python bindings https://browsermob-proxy-py.readthedocs.io/en/stable/

Hi, I use PAC file to
// Start BrowserMobProxy server
BrowserMobProxy proxyServer = new BrowserMobProxyServer();
proxyServer.setTrustAllServers(true);
proxyServer.setRequestTimeout(120, TimeUnit.SECONDS);
proxyServer.setConnectTimeout(120, TimeUnit.SECONDS);
proxyServer.enableHarCaptureTypes(CaptureType.getAllContentCaptureTypes());
proxyServer.start(0);
// Get BrowserMobProxy server port for PAC file
int proxyPort = proxyServer.getPort();
// Create PAC file to send WebSocket requests direct but other protocols throught BrowserMobProxy server
String pacFunction = "function FindProxyForURL(url, host) { if (url.substring(0, 3) === "ws:" || url.substring(0, 4) === "wss:") { " +
"return "DIRECT"; } else { return "PROXY localhost:" + proxyPort + ""; } }";
String pacLocation = String.format("target/pac/websocket-proxy.pac", proxyPort);
writeStringToFile(new File(pacLocation), pacFunction, "UTF-8");
// Set PAC file path to Selenium proxy
Proxy seleniumProxy = new Proxy();
seleniumProxy.setProxyType(Proxy.ProxyType.PAC);
seleniumProxy.setProxyAutoconfigUrl(String.format(System.getProperty("base-dir"), pacLocation));
// Add Selenium proxy to DesiredCapabilities
DesiredCapabilities desiredCapabilities = capabilities;
desiredCapabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
desiredCapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
// Start driver with desiredCapabilities
WebDriver driver = new ChromeDriver(capabilities);
But it work only in Chrome and does not work in Firefox.

Hi, Snezhana!
Yup, looks like something I might use, thanks! I'm trying to figure out how to do something similar with this python wrapper.
Привет соотечественникам:)

BTW where did you find the information about PAC files, how should your JS function look like, and what it should return?

I've found out this answer
https://groups.google.com/forum/m/#!topic/browsermob-proxy/JzTHxje0qP4
ср, 15 февр. 2017 г. в 19:35, scythargon<EMAIL_ADDRESS>
BTW where did you find the information about PAC files, how should your JS
function look like, and what it should return?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lightbody/browsermob-proxy/issues/408#issuecomment-280062318,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALAso8-mFojlvwP0cxU4qI9mSRrDBauHks5rcylAgaJpZM4H4SBT
.

@scythargon did you find the way it works on python?

@affinage unfortunately, nope
On May 17, 2017 11:04 AM, "affinage"<EMAIL_ADDRESS>wrote:

@scythargon https://github.com/scythargon did you find the way it works
on python?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lightbody/browsermob-proxy/issues/408#issuecomment-302016654,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABrK3srgxQIAe4zBv-49J-GJviAguhAmks5r6qnxgaJpZM4H4SBT
.

Hi snezhana-krass
What is base-dir here, i am getting null for base-dir
seleniumProxy.setProxyAutoconfigUrl(String.format(System.getProperty("base-dir"), pacLocation));

Note: while this will work for ws:// and wss:// requests, it will not work for protocol upgrades over HTTP, e.g. like the Intercom does with the header Upgrade: websocket. Those connections will fail.

@Ravichandran-3112 String.format(System.getProperty("base-dir"), pacLocation) - this is equal to the path for PAC file location. I use "base-dir" in Maven pom.xml file for project files paths.

@jekh Looks like littleproxy supports WebSockets already https://github.com/adamfisk/LittleProxy/releases/tag/littleproxy-1.1.0
Could somebody take a look at this issue?

@snezhana-krass I tried to use your answer, and so I created a poc file with the following content
function FindProxyForURL(url, host)
{
    if (url.substring(0, 3) === "ws:" || url.substring(0, 4) === "wss:")
    {
        return "DIRECT";
    } else {
        return "PROXY <IP_ADDRESS>:8080";
    }
}

and a simple python script (for firefox, however):
proxy = Client("localhost:8080", {})
proxy.new_har("test")

profile = webdriver.FirefoxProfile()
selenium_proxy = webdriver.Proxy()
selenium_proxy.proxy_type = webdriver.common.proxy.ProxyType.PAC
selenium_proxy.proxyAutoconfigUrl = "/path/to/poc-file/proxy.poc"
profile.set_proxy(selenium_proxy)
driver = webdriver.Firefox(firefox_profile=profile)

driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
print (proxy.har)

The example 'works', but the har file has no entries at all.
When I use the proxy directly from the browsermob-proxy object (selenium_proxy = proxy.selenium_proxy()) I get a HAR list with many entries.
But, like you, I want to solve the issue with the websockets I have with jupyter notebooks...
I also tried to use this approach for chrome, but no chromedriver seems to work for the basic approach with the simple proxy. So I am blocked with chrome as well (bug report filed).
Any suggestions?

I think I found a workaround. The idea is to define a PAC file to avoid any websocket requests through browsermob-proxy. My PAC file looks like follows
// Calomel.org Proxy Auto-Config
//

//
// Define the network paths (direct, proxy and deny)
//

// Default connection
var direct = "DIRECT";

// Alternate Proxy Server
var proxy = "PROXY <IP_ADDRESS>:SHANGHAI";

// Default localhost for denied connections
var deny = "PROXY <IP_ADDRESS>:65535";

//
// Proxy Logic
//

function FindProxyForURL(url, host)
{
    if (url.substring(0, 3) === "ws:" || url.substring(0, 4) === "wss:")
    {
        return direct;
    } else {
        return proxy;
    }

    return direct;
}

where I replace SHANGHAI with the port number of the current proxy (client.port). Then in the python code I get the webdriver as follows:
from selenium import webdriver
import pathlib # Must be installed via 'pip install pathlib' for python<3.4

selenium_proxy = webdriver.Proxy()
selenium_proxy.proxy_type = webdriver.common.proxy.ProxyType.PAC
selenium_proxy.proxy_autoconfig_url = pathlib.Path(path_to_pac_file).as_uri()

profile = webdriver.FirefoxProfile()
profile.set_proxy(selenium_proxy)

driver = webdriver.Firefox(firefox_profile=profile)

where path_to_pac_file is the path to the PAC file.

Hi,
I am having this problem currently with BMP v2.1.4. I'm observing ws:// and wss:// connections being switched to http:// and https://.
I'm trying the PAC approach, but believe that this problem should have been fixed in BMP v2.1.0-beta-6?
I will need to generate the pac files dynamically as the proxy port changes for every test we run (hundreds of tests per hour).
Has anyone ran into this recently and found a solution? Any help would be appreciated!
Thanks!

Hi,
I am having this problem currently with BMP v2.1.4. I'm observing ws:// and wss:// connections being switched to http:// and https://.
I'm trying the PAC approach, but believe that this problem should have been fixed in BMP v2.1.0-beta-6?
I will need to generate the pac files dynamically as the proxy port changes for every test we run (hundreds of tests per hour).
Has anyone ran into this recently and found a solution? Any help would be appreciated!
Thanks!

Hi, I use PAC file
// Start BrowserMobProxy server
BrowserMobProxy proxyServer = new BrowserMobProxyServer();
proxyServer.setTrustAllServers(true);
proxyServer.setRequestTimeout(120, TimeUnit.SECONDS);
proxyServer.setConnectTimeout(120, TimeUnit.SECONDS);
proxyServer.enableHarCaptureTypes(CaptureType.getAllContentCaptureTypes());
proxyServer.start(0);
// Get BrowserMobProxy server port for PAC file
int proxyPort = proxyServer.getPort();
// Create PAC file to send WebSocket requests direct but other protocols throught BrowserMobProxy server
String pacFunction = "function FindProxyForURL(url, host) { if (url.substring(0, 3) === "ws:" || url.substring(0, 4) === "wss:") { " +
"return "DIRECT"; } else { return "PROXY localhost:" + proxyPort + ""; } }";
String pacLocation = String.format("target/pac/websocket-proxy-%s.pac", proxyPort);
writeStringToFile(new File(pacLocation), pacFunction, "UTF-8");
// Set PAC file path to Selenium proxy
Proxy seleniumProxy = new Proxy();
seleniumProxy.setProxyType(Proxy.ProxyType.PAC);
seleniumProxy.setProxyAutoconfigUrl(String.format(System.getProperty("base-dir"), pacLocation));
// Add Selenium proxy to DesiredCapabilities
DesiredCapabilities desiredCapabilities = capabilities;
desiredCapabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
desiredCapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
// Start driver with desiredCapabilities
WebDriver driver = new ChromeDriver(capabilities);
But it works only in Chrome and does not work in Firefox.

Thank you for this workaround. I had to tweak it a little bit since Chrome and Windows blocks the file:// schema usage for pac file url and I did not want to start a webserver to host the pac file. I found the solution here: https://superuser.com/questions/1405499/chrome-72-seems-to-no-longer-accept-proxy-pac-url
--proxy-pac-url='data:application/x-javascript-config;base64,'$(base64 -w0 /path/to/local/proxy.pac)
The code after this trick has been applied:
// Create PAC file to send WebSocket requests direct but other protocols throught BrowserMobProxy server String pacFunction = "function FindProxyForURL(url, host) { if (url.substring(0, 3) === "ws:" || url.substring(0, 4) === "wss:") { " + "return "DIRECT"; } else { return "PROXY localhost:" + proxyPort + ""; } }"; seleniumProxy.setProxyAutoconfigUrl("data:application/x-javascript-config;base64," +                         Base64.getUrlEncoder().encodeToString(pacFunction.getBytes()));
As you can see I encoded the script not the location because that way it did not work for me.
Note: Actually I used BrowserUp proxy but I think this should work with BrowserMob also.


No member named 'rotate' error when building iOS samples

Describe the bug
Missing api in filament::math when building the iOS samples in XCode. The mat* headers don't have those functions.
/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:27:19: error: no member named 'rotate' in 'filament::math::details::TMat33<double>'
    return (mat3::rotate(ry, double3{ 0, 1, 0}) * mat3::rotate(rx, double3{ 1, 0, 0})) * v;
            ~~~~~~^
/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:27:57: error: no member named 'rotate' in 'filament::math::details::TMat33<double>'
    return (mat3::rotate(ry, double3{ 0, 1, 0}) * mat3::rotate(rx, double3{ 1, 0, 0})) * v;
                                                  ~~~~~~^
/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:116:32: error: no member named 'rotate' in 'filament::math::details::TMat44<double>'
        mat4 rotate_z  = mat4::rotate(mRotation.z, double3(0, 0, 1));
                         ~~~~~~^
/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:117:32: error: no member named 'rotate' in 'filament::math::details::TMat44<double>'
        mat4 rotate_x  = mat4::rotate(mRotation.x, double3(1, 0, 0));
                         ~~~~~~^```

/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:118:32: error: no member named 'rotate' in 'filament::math::details::TMat44<double>'
        mat4 rotate_y  = mat4::rotate(mRotation.y, double3(0, 1, 0));
                         ~~~~~~^
/Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:119:32: error: no member named 'translate' in 'filament::math::details::TMat44<double>'; did you mean 'translation'?
        mat4 translate = mat4::translate(mTranslation);
                         ~~~~~~^~~~~~~~~
                               translation
In file included from /Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.cpp:17:
In file included from /Users/luanbach/dev/filament/ios/samples/hello-pbr/hello-pbr/CameraManipulator.h:23:
../../../out/ios-debug/filament/include/math/mat4.h:323:29: note: 'translation' declared here
    static constexpr TMat44 translation(const TVec3<A>& t) {
                            ^
1 warning and 6 errors generated.

To Reproduce
Steps to reproduce the behavior:

Sync master
Build iOS
Open ios/samples/hello-pbr.xcodeproj
Build for metal target

Expected behavior
Sample should build and run.
Desktop (please complete the following information):

OS: iOS
Backend: Vulkan

Smartphone (please complete the following information):

Device: iPad Pro

@pixelflinger You forgot the iOS samples after your refactoring


Provides go to def support for overloaded operators and special method names.

Currently pylance only supports go to definition on named symbol such as method name, variable name, type name and etc. but it doesn't support go to definition on operator.
In python, overloading operator such as ==, +, [] is quite common. for example, pandas Series type overload == so it returns another Series, or numpy overrides ~ to return new numpy array. It would be nice if one can do go to definition on == which jump to __eq__ or [] jump to __getitem__
If pylance can also color those overloaded operators differently than the default one, it would help coding as well.

It would be nice if pylance can support all special names (https://docs.python.org/3/reference/datamodel.html#special-method-names) but supporting at least all major ones would be good start and help people understanding/navigating third party libraries.

maybe also add a semantic token

This issue has been fixed in prerelease version 2023.6.11, which we've just released. You can find the changelog here: CHANGELOG.md


Unicode character U+309B not accepted in identifiers

Describe the bug
Some unicode character not accepted in identifiers.
If using unicode character, it will get the error “”Invalid character in identifier"
If using encoded character, it will get the error: Unexpected character '゛'
Input code
var ゛; // U+309B
var \u309B;
var \u309C;
var a\u309B;
var a\u309C;

Config
{
  "jsc": {
    "parser": {
      "syntax": "ecmascript"
    },
    "target": "es5"
  },
  "module": {
    "type": "commonjs"
  },
  "isModule": false
}

Playground link
https://play.swc.rs/?version=1.2.148&code=H4sIAAAAAAAAAytLLFJ43DTbWkFfXyFU29jA0gkAY3O%2FZhIAAAA%3D&config=H4sIAAAAAAAAAy2LQQqAMAwE%2F5KzVy%2F9g48INUpL05YkgkX6dw142t0Z9oGsEcIDHUVJvOmohjcEoMioUVI3mAsYyknmWFff3ParkB9s9C8hNuZWs7pMuv36wKI0X3tLUmhnAAAA
https://play.swc.rs/?version=1.2.148&code=H4sIAAAAAAAAAytLLFKIKTU2sHSy5iqDsZ0h7ERkiUSoDAASLisXMQAAAA%3D%3D&config=H4sIAAAAAAAAAy2LQQqAMAwE%2F5KzVy%2F9g48INUpL05YkgkX6dw142t0Z9oGsEcIDHUVJvOmohjcEoMioUVI3mAsYyknmWFff3ParkB9s9C8hNuZWs7pMuv36wKI0X3tLUmhnAAAA
Expected behavior
SWC should properly parse these unicode as these code are valid identifiers.
Actual behavior
error: Unexpected character '゛'
 --> input.js:1:5
  |
1 | var ゛; // U+309B
  |     ^
Caused by:
    0: failed to process js file
    1: failed to process js file
    2: Syntax Error

error: Invalid character in identifier
 --> input.js:1:5
  |
1 | var \u309B;
  |     ^^^^^^

Version
1.2.148
Additional context
I run swc use cmd as follows
npx swc --config-file=.swcrc poc.js -o poc.js

The environment is ubuntu 20.04 amd64.

Isn't this same as https://github.com/swc-project/swc/issues/3341 except charpoint?

@kwonoj Sounds like yes, maybe we can union them

It's an identical issue iff U+309B unicode id and not unicode xid.
I didn't close this as a duplicate as I need to check it.

I found https://github.com/Boshen/unicode-id
I'll patch it.