Is it possible to get place details using Google Places Api?

I'm not sure if it is an issue, but I would appreciate some help. :)
I want to get details of places (cityName, ZipCode, etc) from predictions that I get from Autocomplete Places service. My code is like the following:
Places.GeoDataApi.getAutocompletePredictions(googleApiClient, query, bounds, null)
            .setResultCallback(
                    new ResultCallback<AutocompletePredictionBuffer>() {
                        @Override
                        public void onResult(AutocompletePredictionBuffer buffer) {
                            if (buffer == null)
                                return;

                            if (buffer.getStatus().isSuccess()) {
                                for (AutocompletePrediction prediction : buffer) {
                                    // How to get cityName here
                                }
                            }
                            buffer.release();
                        }
                    }, 15, TimeUnit.SECONDS);

Is this possible? How can I implement it? If I look for place details by placeId, I can't get that I want neither:
Places.GeoDataApi.getPlaceById(googleApiClient, placeId)
        .setResultCallback(new ResultCallback<PlaceBuffer>() {
            @Override
            public void onResult(PlaceBuffer places) {
                if (places.getStatus().isSuccess()) {
                    // How to get cityName here
                }
                places.release();
            }
        });

Thanks in advance!!

This sample has been deprecated/archived (check README for more information on newer samples related to this technology).
As recommended by GitHub, we are closing all issues and pull requests.


Add airship

Airship is a Webmachine-inspired HTTP library.
cc @reiddraper

The only constraints error reported by Travis is this:
http-types-0.8.6 depended on by:

airship-<IP_ADDRESS> (==0.9.*). Tim McGilchrist<EMAIL_ADDRESS>@lambda_foo. @helium

Unfortunatley, the latest version of http-types is currently being held back from the nightly builds. https://github.com/fpco/stackage/issues/880

Thanks @DanBurton. We should be able to depend on 0.8 as well, with a minor change.

I've pushed <IP_ADDRESS> to Hackage, which should resolve this issue.


Scraping google search result

I want scrape all data from html page but I get result which is not seen on that page
import requests
from bs4 import BeautifulSoup
import re
from selenium import webdriver
query = input("What would you like to search: ")
query = query.replace(" ","+")
base = "http://www.google.de"
query = "https://www.google.com/search?q=" + query
#patterns = ["More places"]
driver = webdriver.Firefox(executable_path=r'C:\Users\Swapnali\AppData\Local\geckodriver.exe')
driver.get(query)
elem1 = driver.find_element_by_link_text("More places")
elem1.click()
Current_Url = driver.current_url
print('Current_Url')
print(Current_Url)
r = requests.get(Current_Url)
html_doc = r.text
soup = BeautifulSoup(html_doc, 'html.parser')
for s in soup.find_all('p'):
allDetail = s.text
print('allDetail')
print(allDetail)
My code is like above
Expected behavior
I want all details from that page
e.g if my query is
list of meter manufacturing companies in pune
Result will be like Compnay Names and all details
Actual behavior
D:\Web-Scrapping>python more-places-link.py
What would you like to search: list of meter manufacturing companies in pune
Current_Url
https://www.google.com/search?q=list+of+meter+manufacturing+companies+in+pune&npsic=0&rflfq=1&rlha=0&rllag=18493799,73906966,2651&tbm=lcl&ved=0ahUKEwjoqqmL2pjbAhWKvY8KHQ9yBU8QjGoIWg&tbs=lrf:!2m1!1e2!2m1!1e3!3sIAE,lf:1,lf_ui:2&rldoc=1#rlfi=hd:;si:;mv:!1m3!1d55336.219470077114!2d73.85998475!3d18.49845465!2m3!1f0!2f0!3f0!3m2!1i516!2i351!4f13.1;tbs:lrf:!2m1!1e2!2m1!1e3!3sIAE,lf:1,lf_ui:2
allDetail
Your search - list of meter manufacturing companies in pune - did not match any documents. Reset search tools
allDetail
Suggestions:Make sure that all words are spelled correctly.Try different keywords.Try more general keywords.Try fewer keywords.
allDetail
D:\Web-Scrapping>
Environment settings (for bug reports)

OS: windows 10
Python version: 3.7
Locust version:

As far as I can tell, this has nothing to do with Locust.

I am not using Locust

is there any other way to get that output

You're asking in the wrong forum. This is the issue tracker for the Locust projects. Perhaps you could try with stackoverflow.com or something similar.

ok. thank you


Add compatibility with app extensions

From Xcode 12.5, extensions have to set APPLICATION_EXTENSION_API_ONLY to Yes to avoid any unsupported APIs
iOS main project PR: https://code.developers.mega.co.nz/mobile/ios/iOS_dev/-/merge_requests/1585

test


USB MIDI functionality

This adds USB MIDI support with an interface compatible with the MidiHandler. Sysex send is not supported, but all other messages in and out should be. It's possible the endpoints are not perfectly set up, since they're identical to the standard CubeMX CDC ones, but so far for me it seems to be working perfectly. We will likely want to expand or modify the descriptor strings for MIDI mode so it's easier to identify in a DAW.

That is sooo cool :) And it works too. Just tweaked my daisy_field.cpp and tada! USB MIDI. Thank you :)
Clearly I'm not a PR approver just a grateful user.

I haven't actually found time to look at this or test this, but ... Does it support multiple virtual midi ports? I know the midibox project does. Maybe it's worth checking their code to see how they achieved it. That could also be a good way to check if the descriptors are setup correctly.
Here's the code: https://github.com/midibox/mios32/blob/master/mios32/STM32F4xx/mios32_usb_midi.c
(They also have USB host support, btw)

@TheSlowGrowth this does not implement multiple virtual ports (yet).
Does seem like it wouldn't be too crazy to go the route that they did on the mios32 stuff you linked.
This version 'just works'™  for now, though it's still mostly wrapped into the CDC class.
I'm pretty partial to cleaning this up and getting it in there for now with the known issue that you can only use it for MIDI or CDC.
Sooner than later, I'd like to revisit the existing USB implementation, clean it up quite a bit, and starting working toward a (reasonably easily configurable) composite device class that can do both (and more) at once.

Multiple virtual ports would be really nice, I agree. The Teensy also has it in the MIDI-over-USB implementation.

Actually, now that I think of it, adding multiple virtual ports should be pretty trivial. All it requires is some additions to the USB MIDI descriptor and an argument in the USB MIDI send / receive methods to select the port.


fix helm chart release condition

Is this a bug fix or adding new feature?
What is this PR about? / Why do we need it?
What testing is done?

/approve
/lgtm


Proposal: Change logo.

@madmaxoft designed us a new logo. Should we go ahead and replace both the grass block logo and the blue block logo with this new logo? Discuss.
Personally, I prefer the looks of this logo, and the copyright situation is much better. (@madmaxoft will freely license this one, the grass block one is not known to be licensed to the project, and the blue cube one was "donated to the project" according to FakeTruth.

As a comparison, here are the old logos.

1
/\ Ignore the text in that logo, it's just the cube we're talking about.

I really like the blue cube from the forum. It looks really modern. Since it was donated why not use it?

I like the blue cube too. @madmaxoft 's logo is nice as a concept, but it looks cartoonish and needs some modernization.

@tigerw: You don't have an opinion yourself?

I don't really like the new logo. I always liked the grass cube but I think it might be a better choice to just make a completely new thing.

I may not be really part of this whole operation, but if I may?
While the logo is pretty neat, I don't see it having much relevance for Minecraft. When I see this (well known) geometric trickery, I think of a lot of things, but I do not think Minecraft. At all. I'm fairly good with graphics myself, and I think I could do something nice as well, but if there's one thing I know, it's that it doesn't feel great when you put time, work and effort into something and that's not recognised.
So again, the proposal looks good. It just .. isn't Minecraft-y.
Remember projects like WINE? "Wine is not an emulator". Some projects use these kinds of acronyms to come up with a name, and have some humor attached to it. More importantly right now though, is their icon: a glas of wine.
I could very well imagine a round silver platter with a block of dirt/grass on it, akin to that.
Or a stylized hand, holding a block, as if giving it or holding it up.
Or a diamond sword in a block of stone.
The list goes on.

Suggestion: as the Cuberite organisation is for everything, not necessarily MCS (inc. AnvilStats, ProtoProxy, etc.), it needn't be wholly relatable to Minecraft per se, but maybe the ecosystem and tools around it. The proposed logo with some anti-aliasing and flattening could serve well for this purpose. Furthermore, contrary to bearbin's suggestion, separate logos for the organisation and the software will help to maintain a distinction between the two - consider the logo of Google and the logos of Chrome, Android, and GMail.
A MCServer logo change, if required, may be something that requires an icon more related to MC as the game, or Minecraft Server software (consider #436 or #304).
At the present moment, assuming we agree with the geometric logo for Cuberite, attention may be drawn to MCS. While the current logos are fine, there are two versions, one for the forum and one for everywhere else, which is somewhat unorthodox and maybe inconsistent. Additionally, the blue cube seems to have text in it and is a fixed size image, which limits its ability to be used everywhere (unlike an SVG for example); this may be resolved by finding the author and their source files to regenerate the logo.
Finally, a potential issue with all the logos so far are that they go against the prevailing UI design style of flat, flat, flat. Whilst originality is good, to some, they may stand out as being unprofessionally designed.
Suggestions: Cuberite - smooth the current one and change its colour scheme to something more muted (?). Maybe add some detail and a circle around it. MCS - ideally get something flatter and simpler (I push #436 once more) and modify to be in whatever style the Cuberite one comes out to be.

I always found flat icons to look really ugly. It's like somebody didn't really want to put much attention to it, and just created something in paint. I believe FakeTruth once uploaded all formats for the blue cube (small 16x16, medium 32x32,64x64, etc).

@jammet Good point. any oth those suggestions seem like good ideas, try one out and post it here.
@tigerw I thougth through it again and separate logos makes sense.

I am a little bit worried about this change because it doesn't solve our SEO problem.  If we just rename the organization we would end up with the same problem as before
(e.g. "How to disable mobs in MCServer")

The organisation name change is necessary to change the server name anyway.
But this issue is a discussion of logos, not names.

Two logos? The whole "organization name different from server name" feels like it's spawning needless complications.

It does seem to be spawning needless complications, yes.
We need to get everyone on the IRC at once and have a proper discussion and come to a solution about what we're going to do.

Relevant: http://forum.mc-server.org/showthread.php?tid=2000


Fix typo in config-settings

Summary
Remove extra W
Ticket Link
N/A

Hello @jomaxro,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Thanks, @jomaxro! This is very helpful. :)


Symfony\Component\Console\Exception\CommandNotFoundException in vendor/symfony/console/Application.php:536

Error in VATSIM-UK/Core
Symfony\Component\Console\Exception\CommandNotFoundException in vendor/symfony/console/Application.php:536
Command "statistic" is not defined.
Did you mean one of these?
sys:statistics:daily
visittransfer:statistics:daily
View on Bugsnag
Stacktrace
vendor/symfony/console/Application.php:536 - Symfony\Component\Console\Application::find

View full stacktrace

This was caused through my own stupidity of typing an artisan command wrong on production.  invalid.


[Enhancement] add status check

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 8 / 22 (36.36%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/storage/column_expr_predicate.cpp
0
5
00.00%
[34, 44, 46, 168, 197]

:large_blue_circle:
src/exec/hash_joiner.cpp
0
1
00.00%
[550]

:large_blue_circle:
src/exprs/in_const_predicate.cpp
0
1
00.00%
[78]

:large_blue_circle:
src/exec/hash_join_node.cpp
0
1
00.00%
[892]

:large_blue_circle:
src/exec/stream/scan/stream_scan_operator.cpp
0
1
00.00%
[95]

:large_blue_circle:
src/storage/column_predicate.h
1
2
50.00%
[158]

:large_blue_circle:
src/exprs/in_const_predicate.hpp
5
9
55.56%
[86, 96, 528, 529]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.h
1
1
100.00%
[]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.cpp
1
1
100.00%
[]

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 5 / 23 (21.74%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/storage/column_expr_predicate.cpp
0
9
00.00%
[34, 44, 46, 50, 60, 168, 169, 196, 197]

:large_blue_circle:
src/exec/hash_joiner.cpp
0
1
00.00%
[550]

:large_blue_circle:
src/exprs/in_const_predicate.cpp
0
1
00.00%
[78]

:large_blue_circle:
src/exec/pipeline/scan/olap_scan_prepare_operator.cpp
0
1
00.00%
[73]

:large_blue_circle:
src/exec/hash_join_node.cpp
0
1
00.00%
[892]

:large_blue_circle:
src/exec/stream/scan/stream_scan_operator.cpp
0
1
00.00%
[95]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.cpp
0
1
00.00%
[512]

:large_blue_circle:
src/storage/column_predicate.h
1
2
50.00%
[161]

:large_blue_circle:
src/exprs/in_const_predicate.hpp
3
5
60.00%
[86, 96]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.h
1
1
100.00%
[]

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 5 / 23 (21.74%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/storage/column_expr_predicate.cpp
0
9
00.00%
[34, 44, 46, 50, 60, 168, 169, 196, 197]

:large_blue_circle:
src/exec/hash_joiner.cpp
0
1
00.00%
[550]

:large_blue_circle:
src/exprs/in_const_predicate.cpp
0
1
00.00%
[78]

:large_blue_circle:
src/exec/pipeline/scan/olap_scan_prepare_operator.cpp
0
1
00.00%
[73]

:large_blue_circle:
src/exec/hash_join_node.cpp
0
1
00.00%
[892]

:large_blue_circle:
src/exec/stream/scan/stream_scan_operator.cpp
0
1
00.00%
[95]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.cpp
0
1
00.00%
[512]

:large_blue_circle:
src/storage/column_predicate.h
1
2
50.00%
[161]

:large_blue_circle:
src/exprs/in_const_predicate.hpp
3
5
60.00%
[86, 96]

:large_blue_circle:
src/exec/pipeline/scan/scan_operator.h
1
1
100.00%
[]


Invalid syntax highlighing of <!----------blablabla-----------> in .html file

as mentioned in the title..

I see that it messes up colorization. Not sure if it's invalid or what:

See also:
https://stackoverflow.com/questions/26600092/why-are-double-hyphens-invalid-in-html-comments
https://stackoverflow.com/questions/1850439/double-hyphen-in-script-makes-firefox-render-strangely

@luqimin if you a leave space on both sides of --------blablabla--------- just like <!-- --------blablabla--------- --> instead of <!----------blablabla-----------> it works perfectly well(It's a best practice as well).
It'll also work if you add one more - on the right-hand side of the blablabla, just in case if you don't want to leave any space in-between.
I wouldn't recommend typing <!-- --> manually to comment lines. better to use Ctrl+/ to avoid any DOM rendering issues.
SOURCE

Multiple hyphens in comments are valid in HTML5 standard:

8.1.6. Comments
Comments must have the following format:

The string "<!--"
Optionally, text, with the additional restriction that the text must not start with the string ">", nor start with the string "->", nor contain the strings "<!--", "-->", or "--!>", nor end with the string "<!-".
The string "-->"

In fact, according to the parsing rules, <! >, <!-- <!-- --> and <!-- --!> are parse errors but recoverable and also represents an HTML comment.
Of course, they are invalid in XML standard, but HTML is not XML.

This issue was moved to textmate/html.tmbundle#75


How to set dynamic=strict in mapping for nested object?

I am using MapFromAttributes() together with the following to create a mapping for a nested object:
[ElasticProperty(Type = FieldType.Nested, ...]
public MyNestedType MyNestedObject { get; set; }
In addition to this I want to set the dynamic property to strict on the nested object, as described here:
https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html#nested-params
I have already set the dynamic property to strict on the root object, and verified that this works (introducing new fields dynamically on top level in the root object is not possible). But the setting is not inherited to the nested object as far as I can see. The Elasticsearch documentation is a bit unclear on this, it does state that the setting is inherited to inner objects but does not mention nested objects:
https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html
I realize that the above is more suited for an Elasticsearch forum. The question for this issue is: How do I set dynamic = strict on nested objects using NEST and MapFromAttributes? Or is there another way?

This isn't possible in NEST 1.x using attributes, as they don't expose all the possible options for a given type.  You have to use the fluent API instead within either the CreateIndex() or Map() calls.  See  this test for an example.
This however will be possible in NEST 2.0 with the new attribute mapping API: https://github.com/elastic/elasticsearch-net/pull/1520


on /PageMode /FullScreen again

[This issue was already reported in #9159. I report again to ask for another approach.]

Attach (recommended) or Link to PDF file here:

Uncompressed PDF document with /PageMode /FullScreen.
The document contains the following code:
19 0 obj
<<
  /Type /Catalog
  [...]
  /PageMode /FullScreen
  /Version /1.7
>>
endobj

@Snuffleupagus replied to the original issue with this information:
+ * Converts API PageMode values to the format used by `PDFSidebar`.
+ * NOTE: There's also a "FullScreen" parameter which is not possible to support,
+ *       since the Fullscreen API used in browsers requires that entering
+ *       fullscreen mode only occurs as a result of a user-initiated event.

At least the reader version of Acrobat (which can be considered a de facto standard for PDF) asks the user if fullscreen is allowed or not for the document.
If PDF.js asks for permission before going fullscreen, /PageMode /FullScreen could be implemented in PDF.js (including the proper warning message to the user).
Many thanks for your help.

If PDF.js asks for permission before going fullscreen, /PageMode /FullScreen could be implemented in PDF.js (including the proper warning message to the user).

Not only would that require a implementing/maintain a bunch of code for something that's arguably very much an edge-case feature, the "ask for permission"-part would likely require a dialog-box (since I cannot imagine how it'd work otherwise) which would most likely end up annoying a significant portion of all users (since they'd need to dismiss the dialog to "get to" the document).
All-in-all, closing as WONTFIX (or perhaps a just duplicate of #9159).


Person ReID Task

https://github.com/XinshaoAmosWang/Improving-Mean-Absolute-Error-against-CCE/issues/1

Good news!
We released the code of `Deep Metric Learning by Online Soft Mining and Class-Aware Attention, AAAI 2019 Oral'
https://github.com/XinshaoAmosWang/OSM_CAA_WeightedContrastiveLoss
Please feel free to provide us your feedbacks. Thanks.


DeleteSession should check for corresponding schedules

A good feature to have, but might result in DeleteSessionCommand having a dependency on Schedule

Yes, I propose this implementation:

sdel INDEX : will delete only if there is no schedule tied to that session
sdel INDEX f/ true: will force delete all schedule tied to that session and the session itself.

Implementation:

Will look for all schedules tied to the corresponding session before deleting the session

looks good


negative scale changed into rotation after a spatial node is translated using the 3d viewport gizmo

Operating system or device - Godot version:
2.1rc1 official win64
2.1beta official win64
<IP_ADDRESS> stable official win64
2.0.2stable official win64
Issue description (what happened, and what was expected):
When you set a negative scale for a Spatial node and move it using the 3d viewport gizmo, the inspector set the scale positive and change the Rotation to -180° on some axis.
Steps to reproduce:
Create a new scene with a TestCube.
Set its scale to (-2, 1, 1) using the Inspector.
Translate it to (3, 0, 0) using the 3d viewport gizmo.
Look at the Inspector.

Scale became ( 2, 1, 1 )
Rotation became ( -0, 0, -180 )

On the other hand, if you set the Translation using the Inspector, there is no such behavior.
Link to minimal example project (optional but very welcome):

Is this still valid in the current master branch?

Well, this is not actually a bug, it's more of a result of Godot using transforms internally for loc/rot/scale. When you set loc/rot/scale, those values are used for the transform unless you go back to transform mode by using the gizmo.
This might be enhanced a bit by using translate() for nodes in loc/rot/scale mode, so this is kept.. let me give it a try

oh, no, nevermind, not possible given transforms are global. This is unfixable, unfortunately.

might need better documentation, though

This is actually on my TODO list, I"ll add this bit of detail when I go through the in-editor math docs. Meanwhile, there is currently a documentation in the code.

This came up several times before actually.
The proper fix for this would be to store the rotation and scaling parts of the Basis separately (in addition to the Basis matrix, which would be constructed again once rotation/scaling changes, although this would incur a small memory overhead). Another advantage of this would be much better precision (we wouldn't need to orthonormalize the Basis ever anymore). One disadvantage is, we'd need to disable direct write-access to rows/columns/elements of the Basis matrix (this is already the case in Unity, so I'm guessing they're using this scheme?).
@reduz What do you think? I can implement this if it sounds good.

This behaves differently as of 4.2.beta4 (scale of (-2, 1, 1) becomes (-2, -1, -1) but rotation doesn't change):


Update version to 1.1.1

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Refactor

Material now contains the weak entities:

Author
WeightedTag
Rating

The material repository is implemented just without the Read(Searchform).

quite a lot of possible null reference argument for parameter in WebService.Infrastructure/MaterialRepository

Yeah. It is because material does not have a constructor but uses paramters. It should be change to a constructor instead and refactor all code acordingly. I will make an issue with this.


x/crypto/ssh/terminal: ReadPassword does not support umlauts on Windows

What version of Go are you using (go version)?
go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\development\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

What did you do?
Execute this on Gist on Windows (https://gist.github.com/levrik/99210259065679da20c3c66ef383eea9) and enter some umlauts in the password prompt (e.g. ö, ü or ä).
What did you expect to see?

(Screenshot taken on go version go1.9.2 darwin/amd64)
What did you see instead?

This was discovered when a colleague tried to use a new version of an internal command line tool and it didn't accept the correct password anymore (password was supplied via command line flag before).

/cc @alexbrainman

@bradfitz @alexbrainman Just looked a bit more into this issue. Basically the problem is that Go expects UTF-8 but the Windows console uses Code Page xxx. Which code page exactly depends on the configured language (for example US English uses 437, German uses 850).

As far as I can see, x/crypto/ssh/terminal#ReadPassword take string argument not int.

Oh, sorry. My bad. it is implemented in util_windows.go

This should fix the issue.
diff --git a/ssh/terminal/util_windows.go b/ssh/terminal/util_windows.go
index 60979cc..e7dc952 100644
--- a/ssh/terminal/util_windows.go
+++ b/ssh/terminal/util_windows.go
@@ -17,6 +17,8 @@
 package terminal

 import (
+	"os"
+
 	"golang.org/x/sys/windows"
 )

@@ -98,5 +100,5 @@ func ReadPassword(fd int) ([]byte, error) {
 		windows.SetConsoleMode(windows.Handle(fd), old)
 	}()

-	return readPasswordLine(passwordReader(fd))
+	return readPasswordLine(os.NewFile(uintptr(fd), "sysfile"))
 }

When you read from stdin it uses default codepage. Printing the byte-sequence verifies this.
GetConsoleCP (https://docs.microsoft.com/en-us/windows/console/getconsolecp) can be used to get the current code page. SetConsoleCP can be used to switch to code page 65001 (utf8) -- but, initial testing only resulted getting 0 for characters. One possibility is to lookup the active code-page and translate after reading the buffer. However, I suspect that Code Page can change during typing.
readPasswordLine seems to need adjusting for multi-byte characters as well.

Also on Windows codepage 850 using levrik 's code sample the Danish characters (æ,ø,å) do not render.

@forskning I think the German umlauts are included in the English code page so it works fine.

I think you should use windows api MultiByteToWideChar and GetConsoleCP to solve your problem.
Implement another MultiByteToWideChar in golang will make the binary very large if you include gbk support.
By the way code page 65001 (utf8) on chinese win7 is an useless stuff. It looks like code page 437. But it will crash the process(include ipconfig.exe) if you want to output some chinese char.

@levrik did you try https://golang.org/cl/79335 ? Does it fixes your problem?
I think it should work for you.
Thank you.
Alex

@alex I confirm after applying CL 79335 and running cmd.exe set to Code Page 850
that with the keyboard layout set to DE that ö, ü, ä, and ß, all render
and with the keyboard layout set to DA that ä, ö, æ, ø, and å, all render

@alexbrainman sorry, didn't have the time to test yet. Will try it out this evening after work.

I confirm after applying CL 79335 and running cmd.exe set to Code Page 850
that with the keyboard layout set to DE that ö, ü, ä, and ß, all render
and with the keyboard layout set to DA that ä, ö, æ, ø, and å, all render

Thanks for checking.

Will try it out this evening after work.

Sounds good. I will wait.
Alex

My circa 2009 Danish Windows XP defaults to cp850.
But I think cp850 has since been superseded by cp1252.
The below link is regarding Tcl. (one can search therein for 1252)
http://nurmi-labs.blogspot.com/2017/05/9pvfs.html
FWIW, a more specific title might be the following.
ReadPassword does not support Western European Code Page

Genuine question(s): What's the advantage of using code pages on Windows? Why do not people switch to UTF-8? Is that possible on Windows?

http://nurmi-labs.blogspot.com/2016/11/git.html
for git-bash.exe I have LANG=da_DK.UTF-8
but as it utilises the Windows console $LANG has no effect on the current code in question
for tcsh.exe, which I added to my system and I run in mintty.exe, I have LANG=en_US
https://en.wikipedia.org/wiki/Code_page_850
above is a wikipedia page including information as
"code page 850 is the primary code page and default OEM code page in many countries, including various English-speaking locales (e.g. in the United Kingdom, Ireland, and Canada)"
and,
"Systems largely replaced code page 850 with, first, Windows-1252 (often mislabeled as ISO-8859-1), and later with UCS-2, and finally with UTF-16."

What's the advantage of using code pages on Windows?

It works.

Why do not people switch to UTF-8?

code page 65001 (utf8) on chinese win7 is an useless stuff. It looks like code page 437. But it will crash the process(include ipconfig.exe) if you want to output some chinese char.

Is that possible on Windows?

No. At least I can not solve a way to solve this problem by setting some stuff. It has a stuff called code page 65001 (utf8), but code page 65001 (utf8) is not useful with chinese win7.(it may work with english win7)

There is S. Quinlan's 9pm which contains the 9term.exe dumb terminal.
NB: Some golang code is expected to run in an intelligent termnial, and
this being dated software some Chinese characters would not be expected
to render.
https://9p.io/magic/webls?dir=/sources/extra
9pm051031.zip
https://github.com/nurmi-labs/9pm (copied to GitHub)
http://nurmi-labs.blogspot.com/2015/10/regexp.html (font settings)
And cognisant of different file permissions in a separate environment
subsystem, one could run an xterminal under WSL with VcXsrv.
http://nurmi-labs.blogspot.com/2017/03/p9p.html
NB: I haven't resolved some issues with the German keyboard layout for WeirdX.

@alexbrainman need to move my test to tomorrow. got a bit late today.

@alexbrainman Fix is working for me. Thanks!

@alexbrainman Fix is working for me. Thanks!

Thank you for confirming it.
Alex


[question] data-plane implementation using Envoy API (xDS)

I want to create a data-plane xDS compatible from scratch. How should I proceed?

does the envoy/api repository have the minimal API-set to bootstrap a proof-of-concept?
the poc will be in Java, how cumbersome it is to build xDS api using Java -- I know nothing about Starklark
after built, how can I use this API with a data-plane, let say go-control-plane or Istio, is there any trick to make it working?
is there any documentation/example/e2e-testing for the envoy/api in addition to Envoy website?

cncf/xds#30

I would recommend taking a look at either https://github.com/envoyproxy/go-control-plane or https://github.com/envoyproxy/java-control-plane. That would be the best way of getting started. We don't have any official documentation other than the protocol documentation here: https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol


How to test Script Hook V .Net for GTA5?

Please have a look at my question here:
http://gaming.stackexchange.com/questions/296780/how-can-franklin-not-lose-the-game-because-of-lamar?noredirect=1#comment419427_296780
I have installed Script Hook v dot net, script hook v, and Lua Plugin with Lua scripts and CSharp example scripts. However, while f4 works for indication of successful installation of script hook v, how can I make sure that script hook v .Net is also properly setup? How can I test it? I can't find a step-by-step video or tutorial for this purpose.

By checking the log.


Incompatibility with Gerrit <= v2.14

When using the Java client with Gerrit v2.14 (or earlier) the ChangeApiRestClient.get() would cause Gerrit to fail with the following error: com.urswolfer.gerrit.client.rest.http.HttpStatusException: Request not successful. Message: Bad Request. Status-Code: 400. Content: "TRACKING_IDS" is not a valid value for "-o"..
This is causing the Gerrit Code Review plugin for Jenkins to fail (see reported Issue JENKINS-60364).

@uwolfer I believe the problem is related to https://github.com/uwolfer/gerrit-rest-java-client/blob/c08c7631e2ddf2af2fb510d1186500395a784ff2/src/main/java/com/urswolfer/gerrit/client/rest/http/changes/ChangeApiRestClient.java#L281.
By adding ALL options you are adding also the ones that aren't supported in v2.14, like TRACKING_IDS.

@uwolfer I believe the solution would be:

Get the remote Gerrit version
Remove ALL extensions that are bigger than the highest extension available on that version

How does it sound?

In the README.md you stated Only Gerrit 2.6 or newer is supported: would you like possibly to revisit the statement and include only a more recent release? Let's say v2.10 or later? That would reduce the impact of the fix.

@lucamilanesio: Thanks for your detailed report.
I'm just wondering if you really need to call #get()? I'd suggest to call #get(EnumSet<ListChangesOption> options) also for performance reasons if you do not really need all of the details.
In the Gerrit IntelliJ plugin, I've used this workaround for Gerrit backwards compatibility: https://github.com/uwolfer/gerrit-intellij-plugin/blob/intellij14/src/main/java/com/urswolfer/intellij/plugin/gerrit/rest/GerritUtil.java#L454-L470
I agree, one possibility could be to fetch the Gerrit version, and then only use options which are supported. But I think in most cases, it makes sense to specify required options anyway.

@lucamilanesio: Thanks for your detailed report.
I'm just wondering if you really need to call #get()? I'd suggest to call #get(EnumSet<ListChangesOption> options) also for performance reasons if you do not really need all of the details.

I need all the change details because they are needed to setup the environment variables used by the job. I will also expose the change data as JSON object to the pipeline.

In the Gerrit IntelliJ plugin, I've used this workaround for Gerrit backwards compatibility: https://github.com/uwolfer/gerrit-intellij-plugin/blob/intellij14/src/main/java/com/urswolfer/intellij/plugin/gerrit/rest/GerritUtil.java#L454-L470

Saw that, however, it's a bit of a shoot in the dark isn't it? I'd prefer to have a clearer definition of what is and is not included in the version of Gerrit that the API is calling.

I agree, one possibility could be to fetch the Gerrit version, and then only use options which are supported. But I think in most cases, it makes sense to specify required options anyway.

True, but that option may not be available anyway in the version of Gerrit.
It would be best IMHO to have the Gerrit client API to manage that complexity rather than having all the applications having to deal with it.
BTW I was planning to fix the problem if you would have some time to review it :-) Thanks again for writing this Java client layer, it is very useful indeed.

@lucamilanesio: Thanks for your detailed report.
I'm just wondering if you really need to call #get()? I'd suggest to call #get(EnumSet<ListChangesOption> options) also for performance reasons if you do not really need all of the details.

I need all the change details because they are needed to setup the environment variables used by the job. I will also expose the change data as JSON object to the pipeline.

I see, makes sense.

In the Gerrit IntelliJ plugin, I've used this workaround for Gerrit backwards compatibility: https://github.com/uwolfer/gerrit-intellij-plugin/blob/intellij14/src/main/java/com/urswolfer/intellij/plugin/gerrit/rest/GerritUtil.java#L454-L470

Saw that, however, it's a bit of a shoot in the dark isn't it? I'd prefer to have a clearer definition of what is and is not included in the version of Gerrit that the API is calling.

Yes, this is a fallback which works in my specific case because I can handle it when some data is not available.

I agree, one possibility could be to fetch the Gerrit version, and then only use options which are supported. But I think in most cases, it makes sense to specify required options anyway.

True, but that option may not be available anyway in the version of Gerrit.
It would be best IMHO to have the Gerrit client API to manage that complexity rather than having all the applications having to deal with it.

I'm just wondering what happens when an option is requested, but the client knows that this option is not supported by the Gerrit server which is connected?

BTW I was planning to fix the problem if you would have some time to review it :-) Thanks again for writing this Java client layer, it is very useful indeed.

Sounds good - I'm happy to review it.

True, but that option may not be available anyway in the version of Gerrit.
It would be best IMHO to have the Gerrit client API to manage that complexity rather than having all the applications having to deal with it.

I'm just wondering what happens when an option is requested, but the client knows that this option is not supported by the Gerrit server which is connected?

I was thinking about exposing the list of supported options for the current detected version of the server that the client is connected to. Then, even after knowing them, if the client is explicitly using an unsupported option, he will get an exception, which is expected.
If no options are passed,  the client will get all the possible options supported by the remote Gerrit server version.
Hope that would make sense.

True, but that option may not be available anyway in the version of Gerrit.
It would be best IMHO to have the Gerrit client API to manage that complexity rather than having all the applications having to deal with it.

I'm just wondering what happens when an option is requested, but the client knows that this option is not supported by the Gerrit server which is connected?

I was thinking about exposing the list of supported options for the current detected version of the server that the client is connected to. Then, even after knowing them, if the client is explicitly using an unsupported option, he will get an exception, which is expected.
If no options are passed, the client will get all the possible options supported by the remote Gerrit server version.
Hope that would make sense.

Sounds good.

@uwolfer this is now fixed on master, is it possible to have a release?


Add ellipse to the canvas demo

Need to add the ellipse drawing API to the canvas demo.

This is fixed


--allow-empty-values option will break Windows compatibility

The documentation for System.Enviroment#setEnv says:

On Windows setting an environment variable to the empty string removes that environment variable from the environment. For the sake of compatibility, we adopt that behavior. In particular

setEnv name ""

has the same effect as
unsetEnv name

It also says that if we want to support empty environment variables, we have to use System.Posix.Env.setEnv. The problem with using this library is that will break the compatibility of dotenv-hs with Windows OS.
Should we care about Windows support?
/cc: @sestrella, @jsl, @mrkkrp, @CristhianMotoche

I do think we should care about windows support. There are some Haskell developers that use Windows and may found this library useful.
I had this concern a long time ago, you can check #7. I think the only solution for compatibility is using CPP.

Dotenv has implementations in many other languages. Can someone check what other implementations do for this case? Once we gather that information, we can choose behavior for dotenv-hs - preferably, something that is relatively flexible and safe.

I've tried the following .env file
FOO=
BAR=1234

with js dotenv
require('dotenv').config();

if(process.env.FOO === undefined){
  console.log("Foo is not set");
} else {
  console.log("Foo is set");
}

console.log('Foo', process.env.FOO);
console.log('Bar:', process.env.BAR);

and ruby dotenv.
require 'dotenv'
Dotenv.load('.env')

if ENV['FOO'].nil?
  print("Foo is not set\n")
else
  print("Foo is set\n")
end

print('FOO: ' + ENV['FOO'] + "\n")
print('BAR: ' + ENV['BAR'] + "\n")

In both cases the output is:
Foo is set
FOO:
BAR: 1234

Looking into the code, it seems they only use their own basic library to manage environmental variables:

js dotenv
ruby dotenv

Just in case, I did the same example with dotenv:
import Configuration.Dotenv
import System.Environment

main :: IO ()
main = do
  loadFile False ".env"
  foo <- lookupEnv "FOO"
  bar <- lookupEnv "BAR"
  case foo of
    Nothing -> putStrLn "Foo is not set"
    Just _ -> putStrLn "Foo is set"
  putStrLn ("Foo: " ++ show foo)
  putStrLn ("Bar: " ++ show bar)

And I got the following output:
Foo is not set
Foo: Nothing
Bar: Just "1234"

Wasn't there a related issue on this repository about blank environment variables not being set by dotenv-hs?
I remember commenting on that with a workaround (because it was a wontfix to preserve Windows compatibility), but that only works on Haskell source files. It won't work if you need to load your .env file with something like dotenv -f .env -- command (for example, with supporting scripts).
I think being able to have blank environment variables is useful, and I kind of resent the fact that this Windows is acting as a lowest common denominator here (no offence to the team here, I can understand why you made the decision).

@habibalamin Yeah, there is a PR (#7) where we discussed a little bit about it. I think it is good to have an issue open. We can have further discussions.

Closing this issue because of https://github.com/stackbuilders/dotenv-hs/pull/51#issuecomment-309638056


Upgrading to v0.12.2rc2 results in 99% of home page content no longer being available

The Issue
I saw that 0.12.2 rc2 was available on the github page.  I started the lbry app on my desktop but it did NOT tell me that an update was available (so I quit that).  I then manually downloaded the new RC and manually ran the update, which seemed to go ok.  When I then started the new version, only 1 video thumbnail would load from the homepage.  All the rest say 'this address contains no content'  Unused.  See screenshot below.  I've restarted the app several times, nothing is displayed except 1 video I purchased.  It's important to note that all the free videos are downloaded in my downloads folder and after checking the settings, it is still pointing to that folder so the content exists locally on my machine.
Steps to reproduce

Manually upgrade 0.12 -> 0.12.2rc2
Start lbry app and no content is available on home page except previous purchases.
If you try and click on any of the videos it says 'there is nothing at this location'.

Expected behaviour
All the homepage content should load and resolve.
Actual behaviour
It's all gone O_o?  Except my previous video purchase.
System Configuration

LBRY Daemon version: 0.11.0   <- isn't this supposed to be 0.13 ?
LBRY App version: 	0.12.2rc2
LBRY Installation ID: 3isBEMXr63RscYGaxCm5ixJG7NFXVjmWTV29gQgFTA625XWK7mRtr3g2DsT1kJSpY8
Operating system: Windows (Windows-10-10.0.14393)

Anything Else
I notice on the release page it says 'Upgraded to lbry daemon 0.13, including updating API signatures'
but in the app settings page it says the daemon is still 0.11.0  Could it have failed to upgrade the daemon?  And that's why all the content is missing?
I have confirmed that the app and daemon are running in memory. (Screenshot below.) and they all close and shutdown ok when I quit the app.
Screenshots

Rebooted the machine and tried again, this time:

Will try to revert back to 0.12.0

Yes, this behavior is happening since your daemon did not update. If you close all LBRY processes and run it again, it should work, but if you continue to see daemon v0.11 that explains the issue.
Also, RCs are pre-release versions not necessarily ready for mass usage. So you will only be prompted to upgrade once this is marked as a release.


[elasticsearch] Cannot run a single node cluster

Chart version:
7.4.0
Kubernetes version:
1.14.0
Kubernetes provider:
on-premise
Helm Version:
2.X
Describe the bug:
As a developper, I want to run a simple elasticsearch cluster, with a single node.
Steps to reproduce:
As indicated here https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html, values.yml:
esConfig:
  elasticsearch.yml: |
    discovery:
      type: single-node
      seed_hosts: ""

Expected behavior:
A single pod should run.
Provide logs and/or server output (if relevant):
This chart is hardcoding the setting cluster.initial_master_nodes which throw the exception
stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]"

One of our tested examples is a single node cluster.
The only configuration you need to add is replicas: 1 and it will work.

Running this, I got the elasticsearch error:
stacktrace": ["org.elasticsearch.discovery.MasterNotDiscoveredException: null",
"at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:214) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:325) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:252) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:598) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) [elasticsearch-7.4.0.jar:7.4.0]",
"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]",
"at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]",
"at java.lang.Thread.run(Thread.java:830) [?:?]"] }
{"type": "server", "timestamp": "2019-10-03T17:15:01,286Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "djobi-misc", "node.name": "djobi-misc-master-0", "message": "master not discovered or elected yet, an election requires at least 2 nodes with ids from [99unOw0lTSyn_sYsgwghvQ, 6qFokx8LSlqSPbnT6vkp2A, bcGq4W5YRNyxnOirkdE2Nw], have discovered [{djobi-misc-master-0}{6qFokx8LSlqSPbnT6vkp2A}{ahfijfkyQlaBJLwm0t-dWg}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dim}] which is not a quorum; discovery will continue using [] from hosts providers and [{djobi-misc-master-0}{6qFokx8LSlqSPbnT6vkp2A}{ahfijfkyQlaBJLwm0t-dWg}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dim}] from last-known cluster state; node term 3, last-accepted version 7 in term 3" }

I don't understand how this could work actually ....

I run:
helm install --set replicas=1 --set imageTag=7.4.0 --name single elastic/elasticsearch

This output
NAME:   single
LAST DEPLOYED: Thu Oct  3 19:26:11 2019
NAMESPACE: dev-steam
STATUS: DEPLOYED

RESOURCES:
==> v1/Pod(related)
NAME                    READY  STATUS    RESTARTS  AGE
elasticsearch-master-0  0/1    Init:0/1  0         3s

==> v1/Service
NAME                           TYPE       CLUSTER-IP     EXTERNAL-IP  PORT(S)            AGE
elasticsearch-master           ClusterIP  <IP_ADDRESS>  <none>       9200/TCP,9300/TCP  2s
elasticsearch-master-headless  ClusterIP  None           <none>       9200/TCP,9300/TCP  2s

==> v1/StatefulSet
NAME                  READY  AGE
elasticsearch-master  0/1    2s

==> v1beta1/PodDisruptionBudget
NAME                      MIN AVAILABLE  MAX UNAVAILABLE  ALLOWED DISRUPTIONS  AGE
elasticsearch-master-pdb  N/A            1                0                    2s

NOTES:
1. Watch all cluster members come up.
  $ kubectl get pods --namespace=dev-steam -l app=elasticsearch-master -w
2. Test cluster health using Helm test.
  $ helm test single

But the elasticsearch node is broken:
{"type": "server", "timestamp": "2019-10-03T17:29:06,466Z", "level": "DEBUG", "component": "o.e.a.a.c.h.TransportClusterHealthAction", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "no known master node, scheduling a retry" }

"stacktrace": ["org.elasticsearch.discovery.MasterNotDiscoveredException: null",
"at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:214) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:325) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:252) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:598) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) [elasticsearch-7.4.0.jar:7.4.0]",
"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]",
"at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]",
"at java.lang.Thread.run(Thread.java:830) [?:?]"] }

I run:

Running this cluster results in a working cluster for me on GKE.

Can you provide the output of helm get single.
Is there anything special about your on premise cluster that might cause issues? E.g. no persistent storage available?
Does deploying a cluster with the defaults work (3 nodes cluster)?

Another thing worth checking. Can you show the output of kubectl get pv. If you previously had a 3 node cluster and didn't delete the volumes after them being used the one node cluster will start up expecting to find 2 more nodes.

Ho ! You are right ! I am deeply sorry. I didnt notice that helm delete --purge is not removing the PV(c).
Thanks you for the support.

I am deploying this from scratch to AWS k8s 1.14.6 cluster created by kops and my kubectl get pv output is empty (I've deleted all pvc from a previous 3 node install):
helm install --set replicas=1 --set imageTag=7.4.0 --name single elastic/elasticsearch

However, I am still seeing this error in the log. Any ideas are appreciated as I am pretty stomped at this point. I get this error deploying 1 or 3 default ones:
{"type": "server", "timestamp": "2019-10-22T18:37:52,360Z", "level": "WARN", "component": "o.e.c.c.ClusterFormationFailureHelper", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and [cluster.initial_master_nodes] is empty on this node: have discovered [{elasticsearch-master-0}{60-eI8yESdyLkVHLzLpdkg}{8eKBeNsPQRabxtlwfZidTA}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dilm}{ml.machine_memory=2147483648, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [] from hosts providers and [{elasticsearch-master-0}{60-eI8yESdyLkVHLzLpdkg}{8eKBeNsPQRabxtlwfZidTA}{<IP_ADDRESS>}{<IP_ADDRESS>:9300}{dilm}{ml.machine_memory=2147483648, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0" }
{"type": "server", "timestamp": "2019-10-22T18:38:00,347Z", "level": "DEBUG", "component": "o.e.a.a.c.h.TransportClusterHealthAction", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "no known master node, scheduling a retry" }
{"type": "server", "timestamp": "2019-10-22T18:38:01,347Z", "level": "DEBUG", "component": "o.e.a.a.c.h.TransportClusterHealthAction", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "timed out while retrying [cluster:monitor/health] after failure (timeout [1s])" }
{"type": "server", "timestamp": "2019-10-22T18:38:01,348Z", "level": "WARN", "component": "r.suppressed", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "path: /_cluster/health, params: {wait_for_status=green, timeout=1s}",
"stacktrace": ["org.elasticsearch.discovery.MasterNotDiscoveredException: null",
"at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.onTimeout(TransportMasterNodeAction.java:214) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:325) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:252) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:598) [elasticsearch-7.4.0.jar:7.4.0]",
"at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:703) [elasticsearch-7.4.0.jar:7.4.0]",
"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]",
"at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]",
"at java.lang.Thread.run(Thread.java:830) [?:?]"] }

The error above was due to a bug in helm 2.15.0. It worked as expected after downgrading to 2.14.3.

Have the same problem, replicas 1 doesnt helped
chart version: 7.7.1
helm: 3

I had manually disable "cluster.initial_master_nodes" env var, in order to success deploy
How did you 'disable' it? I tried just overriding it in the values.yaml but that breaks helm upgrade as in this issue: https://github.com/helm/helm/issues/6002

I've disabled it with adding the following to my elasticsearch.yml:

discovery.type: single-node
cluster.initial_master_nodes: ""

@demisx did you configure ES as a single node cluster ?
esConfig:
  elasticsearch.yml: |
    discovery:
      type: single-node
      seed_hosts: ""

In the statefulset.yaml, line#295
- name: cluster.initial_master_nodes
value: "{{ template "elasticsearch.endpoints" . }}"
Using template function to set the cluster.initial_master_nodes as env variable, which conflicts discovery.type: single-node.
Basically in this form the helmchart is unable to receive a       'discovery.type: single-node'
I've deleted the env var in statefulset.yaml to workaround this.

I am reading everywhere the solution to fix clusering issue is to remove data and restart ... I understand this is ok for dev and test, but on production, this can happen, is it a clean way to fix clustering issue?

We're also facing the same issue, we recently upgraded our ES from 6.8 to 7.7. We're getting a similar error as mentioned in https://github.com/elastic/helm-charts/issues/312#issuecomment-545098138.
We're using replicas:1 and tried to use discovery single-node config but it started crash looping as mentioned by @Dexolite.
Unfortunately, deleting PVs didn't help either. Is there anything else that can be done?

We're also facing the same issue, we recently upgraded our ES from 6.8 to 7.7. We're getting a similar error as mentioned in https://github.com/elastic/helm-charts/issues/312#issuecomment-545098138.
We're using replicas:1 and tried to use discovery single-node config but it started crash looping as mentioned by @Dexolite.
Unfortunately, deleting PVs didn't help either. Is there anything else that can be done?

In the statefulset.yaml, line#295 in spec.template.spec.containers.env

      - name: cluster.initial_master_nodes
        value: "{{ template "elasticsearch.endpoints" . }}"

Using template function to set the cluster.initial_master_nodes as env variable, which conflicts discovery.type: single-node.
Basically in this form the helmchart is unable to receive a 'discovery.type: single-node' (helm v3.3.3)
I've deleted the env var in statefulset.yaml to workaround this.

You can set this variable to empty value like in snippet below:
extraEnvs:
  - name: discovery.type
    value: single-node
  - name: cluster.initial_master_nodes
    value: ""

P.S.: sorry for my bad English

@SubhamPramanik commenting out the cluster.initial_master_nodes (in my case the configuration yaml) took care of this issue for me. Hopefully you've resolved. FYI, setting it to "" as @DmitriySafronov stated did not work in my case.

@gilperme @DaimyGovaert for me, setting the value to null did the trick:
extraEnvs:

name: discovery.type
value: single-node
name: cluster.initial_master_nodes
value: null

Create file value-elastic.yaml with
extraEnvs:
  - name: discovery.type
    value: single-node
  - name: cluster.initial_master_nodes
    value: ""

or
  extraEnvs:
  - name: discovery.type
    value: single-node
  - name: cluster.initial_master_nodes
    value: null

Run helm
helm install elasticsearch elastic/elasticsearch --set replicas=1 -f value-elastic.yaml

Same issue for me.
ERROR IN LOG:
setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]
WORKAROUND:
Overwriting this with an ENV (see @patsevanton) fixes the issue but this seems like a messy solution.
SUGGESTED FIX:
initial_master_nodes should be set to 1 when discovery.type is set to single or make this property available to set directly in the helm chart.

Actually for this helm upgrade will fail if we override env variables..so either we need to install it again or we have to change the statefulset.yaml.

doesn't work for 8 version
Exception in thread "main" org.elasticsearch.ElasticsearchParseException: null-valued setting found for key [cluster.initial_master_nodes] found at line number [13], column number [30]

doesn't work for 8 version
Exception in thread "main" org.elasticsearch.ElasticsearchParseException: null-valued setting found for key [cluster.initial_master_nodes] found at line number [13], column number [30]

Same here

just wondering if there is any workaround or updates on @odinsy and @adadeeeh 's issue? thanks.


MGDCTRS-469: Get rid of the extra verify config button

https://issues.redhat.com/browse/MGDCTRS-469

@indraraj Mind a review?


feat: write cache in separate method

I have a case when a lot of concurrent requests all try to connect at the same time to the central database to refresh the cache. This is not optimal because in my case it takes all the available connections (from RDS proxy) and no connections for the actual target database are free anymore. Hence, I would like to control myself when the cache is written and use a job instead. I could copy the logic to my custom job but it would be nicer if I could simply call the new writeCache method.

I'm not sure what this PR is solving. If you deferred the cache write to a queued job, the request would still be trying to identify the tenant directly from the DB?
Are you trying to optimize database connections or cache connections here?

If I cache the tenants every 12 hours (for example)  and the TTL is 24 hours, no request should anytime hit the database, shouldn't it?

Sorry, for the bad explanation. I would like to have a job that runs every 12 hours that caches all tenants and their domains:
foreach ($domains as $domain) {
  app(DomainTenantResolver::class)->writeCache($domain);
}

Once I have this job, no request would every hit the central database and I don't have to worry about too many requests trying to cache the current domain/tenant association.

Too many connections occurs because you're trying to cache all domains at once. The feature is meant to update cache as it's used. If you want to maximize the cache, you can simply increase the TTL.

If my domain is hit by 100 requests at once and there is nothing in the cache, it will try to read the domain configuration from the database for every single request. Every request will connect to central database first and will then try to change to the tenant database. The problem is now that RDS proxy reserves the 100 connections for the central database for X minutes and not a single request can switch to tenant database because the maximum number of connections was reached.
Now, if I have the job like described above I can cache the tenant/domain configuration in advance and no request will every try to hit the central database.
I hope this makes my case clearer. Sorry for the confusion 😊

If my domain is hit by 100 requests at once and there is nothing in the cache, it will try to read the domain configuration from the database for every single request

If the same tenant domain is hit by 100 requests at once, at most n (= php-fpm worker count) requests will try to connect to the central database before requests start reading from the cache.
I think you're just trying to hack around how the cache TTL works. Why not just increase it? And again, I don't think the actual problem is being described well here. There will not be 100 concurrent DB requests if one tenant gets 100 requests at once. Additionally, requests will be naturally spread across different tenants which will update each tenant as it's used.
It just sounds like there's something misconfigured on your end and this convo is an xyproblem misdiagnosing it. I don't think you should be seeing any more central connections than you have fpm workers in the first place. You can try things like persistent connections, increasing the cache TTL here, and looking into what's actually happening more carefully.

Okay, thanks for your comments anyway. Though, I still think you didn't really understand the issue and my changes. My suggested change was just to add a writeCache method which can be publicly used and without having to think about the internals. I didn't mention using resolveWithoutCache at all. Also it's not about having infinite TTL because my change would only extend entries and non-existent entries would still expire.
The difference between central database and tenant database is that connections to the central database are used only once and afterwards they are not needed anymore.

From the description I was given here I don't see a legitimate reason for making a new public "convenience method" that I haven't been convinced has a good use case. The existing logic is public and you can achieve what you're trying to do with it.

I didn't mention using resolveWithoutCache at all

public function writeCache(...$args): Tenant
{
    $key = $this->getCacheKey(...$args);
    $tenant = $this->resolveWithoutCache(...$args);

    $this->cache->put($key, $tenant, static::$cacheTTL);

    return $tenant;
}

used only once and afterwards they are not needed anymore

Doesn't address the discrepancy in your scaling concerns. If this were truly a concern, you'd be in a position where you cannot add any more requests/sec or tenants to your application. If it's not a true concern, you should use the cache logic as intended.


DELETE THIS :)

Here's the commit to support the multiple input nodes on the Function Node. There currently are not labels for the different input ports, but could be added pretty easily.

Please discuss on the mailing list before setting out to make changes like this. Multiple inputs are subject to continual debate but are not part of our plans.

Understandable! I did not mean to create a PR back to the actual project, but my fork instead (hence why I closed it instantly).. Sorry about that.

Ok... But I hope you are aware of our position on multiple inputs and would really prefer discussion on the mailing list if you think it's something we ought to have.

We are aware and have read through the numerous discussions on the topic. It's something that we are in need of and wish to not have to manually add topics to each message. The approach we took still allows for the asynchronous approach, where it is left up to the user how they wish to handle the multiple inputs (i.e. wait for a value from each, stored in the context, before sending a message on, etc).
I do understand that this is unlikely to be merged and I did not mean to take out a PR on the project for it. It's more of a prototyping of what's possible to see if it meets my team's needs.
Thanks!

Ok ... It is possible we'll add multiple inputs in some form in the future... Subflows for example would definitely benefit from them, more so than other nodes. As it will drive a change in flow format, hopefully whatever you've done will be compatible in some form.

And of course were always keen to hear what people are doing with Node-RED... Especially when they find the need to modify the runtime to support their usage.


build(nodejs): changed version to >=12.0.0

:tada: This PR is included in version 3.5.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Pipeline configuration

Can you help with a sample pipeline configuration for Hygieia, I've no clue what to need to be provided for each environment ( DEV,QA,Int,etc )..
Thanks in advance..

@smsuresh Current pipeline configuration widget allows to choose the environments for DEV, QA,INT,PERF,..etc. Environment drop down will be populated with the values from deploy widget (if using uDeploy  collector or Hygieia Jenkins publisher data will be pushed to deploy widget).  #1020  is in progress, which dealt to customize the stage names for each environment.

Thankyou Nireesh @nireeshT

@smsuresh  Refer https://github.com/capitalone/Hygieia/issues/884 for info on configuring the pipeline.

@satishc1  Thankyou Satish, I've configured it , but  im able to select only "ONE" environment in Deployment widget, unable to see all the environments,
So in pipeline also ,seeing only either DEV/QA/PROD..

@smsuresh Do you have a deployment job configured with the jenkins hygieia publisher for each of the environments you want to see in hygieia ? Dev , QA , Prod etc need its own deployment jobs. Make sure you set up all the jobs and run them in jenkins and push the stuff to hygieia.

@satishc1 Yes I've jobs, It worked now
The issue was   " I DID NOT maintain similar string Application Name for all the environment, so it didn't join them,,
Earlier I had like  APP_DEV, APP_QA
Now I just kept them as "APP"
I see all environments in deployment widget & ALSO in pipeline now!!
Started enjoying hygiea now, very useful tool :)

@smsuresh Excellent.


TypeError: unhashable type: 'Color' during Qt resource compilation

🐛 Bug
Came across a bug after a fresh install of napari today, pyqt was installed through conda, napari from pip
Traceback (most recent call last):
  File "/Users/alisterburt/programming/fourier-nerf/cif_to_mrc.py", line 28, in <module>
    viewer = napari.Viewer(ndisplay=3)
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/viewer.py", line 61, in __init__
    self._window = Window(self, show=show)
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_main_window.py", line 414, in __init__
    get_app()
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_event_loop.py", line 195, in get_app
    _register_napari_resources()
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_resources/_icons.py", line 438, in _register_napari_resources
    resources = _compile_napari_resources(save_path=persist and save_path)
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_resources/_icons.py", line 374, in _compile_napari_resources
    with _temporary_qrc_file(svgs, prefix='themes') as qrc:
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_resources/_icons.py", line 99, in _temporary_qrc_file
    for alias, xml in xmls:
  File "/Users/alisterburt/mambaforge/envs/fourier-nerf/lib/python3.10/site-packages/napari/_qt/qt_resources/_icons.py", line 169, in generate_colorized_svgs
    yield (alias, get_colorized_svg(path, color, op))
TypeError: unhashable type: 'Color'

To Reproduce
Steps to reproduce the behavior:

launch napari in this environment

Expected behavior
succesful napari launch
Environment
napari: 0.4.16
Platform: macOS-12.5-arm64-arm-64bit
System: MacOS 12.5
Python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:22) [Clang 13.0.1 ]
Qt: 5.15.4
PyQt5: 5.15.7
NumPy: 1.23.2
SciPy: 1.9.1
Dask: 2022.8.1
VisPy: 0.10.0

OpenGL:
  - GL version:  2.1 Metal - 76.3
  - MAX_TEXTURE_SIZE: 16384

Screens:
  - screen 1: resolution 1512x982, scale 2.0

Plugins:
  - console: 0.0.4
  - mrcfile-reader: 0.1.3
  - napari-svg: 0.1.6
  - scikit-image: 0.4.16

Additional context
I have other working environments on this machine with 0.4.16 so the problem is likely somewhere slightly upstream...

I can confirm this on my M1 arm64 env, in python 3.9 arm64 env.
(pyqt from mamba, napari from pip)
But napari from conda-forge works...

also brand new for you?

Yea. I make napari envs a lot too, but usually via mamba.

@alisterburt please check if downgrade pydantic to 1.9.2 form 1.10.0 will solve your problem. The 1.10.0 was released 6 hour ago and create same problem for me on ubuntu. It looks like deprecation in a new release.

thank you @Czaki, that solves the issue! What do you think we should do, pin and potentially update deps for 0.4.16?

Yeah, looks like all our CI is broken by this. 🤦

From 4 hours it will fail also on conda: https://github.com/conda-forge/pydantic-feedstock/pull/64
@jaimergp it is possible to patch napari conda feedstock to block pydantic 1.10.0 for a few last releases if we do not get a positive response from pydantic maintainer?

Also breaks CI for stardist-napari: https://github.com/stardist/stardist-napari/actions/runs/2958470116

@uschmidt83 It will break all CI that depends on napari.
But pydantic maintainer agrees that this is deprecation that should be fixed. https://github.com/pydantic/pydantic/issues/4454#issuecomment-1232615233
And I have prepared PR with fix https://github.com/pydantic/pydantic/pull/4455, so hopefully, it will be fast merged, and a bugfix release will be created. We need to wait.
If you cannot wait, then add pydantic!=1.10.0 to your test requirements.

We have pre-releases test, that even catches this problem, but it fails so often that, unfortunately, we, unintentionally, start to ignore it.
We need to find a better way to handle pre-release failure and will be happy to take additional care when pydantic pre-release is available.

Thank you for sorting this out so quickly @samuelcolvin !
@Czaki pointed out this morning that our pre-tests did actually catch this... 8 days ago: https://github.com/napari/napari/runs/7963696182?check_suite_focus=true
we haven't been good about catching issues like this because they fail so often - we will put in place some process to make sure problems like this are caught earlier in future! 🙂

That would be great, thanks so much.

1.10.1 landed on pypi :rocket:

The bug is caused by @lru_cache being applied to get_colorized_svg(): the decorator requires all input arguments of the function to be hashable and pydantic.color.Color values do not satisfy that requirement. One way to fix the bug is to remove @lru_cache from get_colorized_svg().
It would be also worth updating the type signature for the second argument of get_colorized_svg() by changing
def get_colorized_svg(path_or_xml: Union[str, Path], color: str = None, opacity=1) -> str:
    ...

to
def get_colorized_svg(path_or_xml: Union[str, Path], color: Optional[Union[str, Tuple[str, str]]] = None, opacity=1) -> str:
    ...

???
pydantic.color.Color is now hashable, just use pydantic!=1.10.0.

@samuelcolvin Thank you for pointing out the current status of pydantic.color.Color. I have updated  pydantic in my working enviroment to version 1.10.1 and the original bug in napari seems to be solved by that. I suppose that no changes in the napari source code are required now, thanks to the timely release of the new version of pydantic.

@gtamazian, there are still changes required (update signature or update call), but I address them in #4997
Close this Issue as solved.
Thanks, @samuelcolvin, for the fast reaction.


The select box is not cleaned after making a selection.

[x] I have read through the manual page (man fzf)
[x] I have the latest version of fzf
[x] I have searched through the existing issues

Info

OS

[x] Linux
[ ] Mac OS X
[ ] Windows
[ ] Etc.

Shell

[x] bash
[ ] zsh
[ ] fish

Problem / Steps to reproduce

fzf --version
0.44.1 (debian)
Ctrl-t select current dirctory files
type 'enter'
The select box always show even though the selection already completed.

I'm curious if it's accurate in bash? if not, How to fix it? Thanks in advance!

That doesn't look right. Have you tried it on different terminal emulators?

Thanks for your reply!
yeah, I'm using the alacritty now, and I tried the xterm and stterm, get the same result.


Cldc 576 reproduce about this log

Am I right in thinking this PR just bring in the about this log pages, it doesn't yet enable complex routing? (i.e. things like, if it's a relet 4-5 pages become unnecessary to show?)

Am I right in thinking this PR just bring in the about this log pages, it doesn't yet enable complex routing? (i.e. things like, if it's a relet 4-5 pages become unnecessary to show?)

It is really just to prove that the logic we have works. We already have complex routing. Any scenario you can think of I'd be happy to prove that.