Escaping apostrophes in Table.objects.filter(stringColumnName="a string with ' apostrophes in it" may not be necessary

In filterutils.py, the quote value routine.  I have apostrophes in the data of one of my string columns in one of my AirTable
tables.  The         return '"%s"' % re.sub(r'(["\'\\])', lambda ch: '\\' + ch.group(0), value) is escaping apostrophes.
An example is "augmentin '400'" becomes "augmentin \'400\' before being sent in the filterByFormula querystring field
to AirTable and then MyTable.objects.filter(stringColumnName="augmentin '400'") yields no results.  I don't know if the newer AirTable API automatically escapes apostrophes itself so you don't have to.  Looks like we are using pyrtable==0.7.11 from pip freeze.
def quote_value(value) -> str:
    import datetime

    if isinstance(value, str):
        return '"%s"' % re.sub(r'(["\'\\])', lambda ch: '\\' + ch.group(0), value)
    if isinstance(value, bool):
        return 'TRUE()' if value else 'FALSE()'
    if isinstance(value, (int, float)):
        return str(value)
    if isinstance(value, Enum):
        return quote_value(value.value)
    if isinstance(value, datetime.datetime):
        return format(value, '"%Y-%m-%dT%H:%M:%S.%fZ"')
    if isinstance(value, datetime.date):
        return format(value, '"%Y-%m-%d"')
    raise ValueError(value)

I'm doing this absolutely filthy patch of the code below for the moment to exclude apostrophes from being escaped.  When you have some time, perhaps you could create a small Airtable with a single column and put a record in there with an apostrophe in the string to see if your objects.filter function also fails to find the record with an apostrophe in it.
    def my_quote_value(value) -> str:
        import datetime
        import re
        from enum import Enum
        if isinstance(value, str):
            return '"%s"' % re.sub(r'(["\\])', lambda ch: '\\' + ch.group(0), value)
        if isinstance(value, bool):
            return 'TRUE()' if value else 'FALSE()'
        if isinstance(value, (int, float)):
            return str(value)
        if isinstance(value, Enum):
            return my_quote_value(value.value)
        if isinstance(value, datetime.datetime):
            return format(value, '"%Y-%m-%dT%H:%M:%S.%fZ"')
        if isinstance(value, datetime.date):
            return format(value, '"%Y-%m-%d"')
        raise ValueError(value)
    import pyrtable.filterutils
    pyrtable.filterutils.quote_value=my_quote_value

I would have preferred to discuss this over email with you than raise an issue in here, because I would have liked to try and decide if you were aware of other context(s) where escaping the "apostrophes" is needed and that I may have just found one simple context where it is maybe not needed.  Anyways, let me know what you think.  You can email me at<EMAIL_ADDRESS>if you prefer to discuss anything about this.  Just wanted to make you aware of my experience.

Hello, thanks for the detailed report. I did some preliminary testing and could not find a case that requires escaping of apostrophes.
Give me a day or two to stress it a little bit further and I'll release a fix. In the meantime, your “filthy” patch actually seems the way to go!

Fixed in commit 0b98060 (released in v0.7.12).

Wow!  Thanks for the quick response.  I will keep my eye out for any other
things I find.  So you just eliminated the
apostrophe from the list of characters that need to be escaped.  Probably
not a huge risk if build_formula methods were the
primary users of the utility function.  I will download and try the scripts
out without my "filthy" hack.
On Tue, Jun 1, 2021 at 3:31 PM Vilar da Camara Neto <
@.***> wrote:

Closed #4 https://github.com/vilarneto/pyrtable/issues/4.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/vilarneto/pyrtable/issues/4#event-4827690756, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AP5E7VCWBKVEEGSWMEUNAK3TQU7QZANCNFSM4532HNPA
.

--
Kind regards,
Eric
http://www.OneSourceRegulatory.com
| Eric Hauk    Senior Developer
| @.***
| +1<PHONE_NUMBER> | +1 (833) OSR-TEAM
http://www.OneSourceRegulatory.com
https://www.linkedin.com/company/onesource-regulatory/
https://www.youtube.com/channel/UCAHl8HLPFSkxFvqjGSeL-Tg/videos
https://twitter.com/1SourceReg
https://www.facebook.com/OneSourceRegulatory/
Solutions by OSR:
http://www.MyIndago.com
http://www.MyIndago.com https://www.linkedin.com/company/myindago-com/
https://www.youtube.com/channel/UCAHl8HLPFSkxFvqjGSeL-Tg/videos
https://twitter.com/MyIndago?lang=en https://www.facebook.com/MyIndago/
Confidential Information
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify
<EMAIL_ADDRESS>and then delete this email from your system.
Forwarding or saving this information is strictly prohibited.

Please keep me in the loop about your experience – and don't hesitate to open a ticket even if it is a “presumed” bug – I'll only have the courage to promote this package to “stable” after hearing some positive feedback on several use cases.


Call from get attribute instead of using if else in the encoder class

new format of data (see #26) should solve the issue

solved in #26


Inconsistent version name

Describe the bug
Sometimes our version name is prepending with  v, something it's not. This breaks the links added in https://github.com/liyasthomas/postwoman/pull/135.
In prod we don't have a v:

In dev we do have a v:

To Reproduce
Steps to reproduce the behavior:

Go to the app in prod | https://postwoman.io
Got to the app in dev | http://localhost:3000/
Compare the release version tags in the footer
Notice they're different and the link is broken in prod

Expected behavior
They're the same, v0.1.0 on both, in this case.

In package.json, version is specified without v
In GitHub releases, tag is specified with v

In dev mode, version is picked from package.json
Whereas at prod build, version is taken from env tag, ie: Release Tag
This might be the reason why at dev mode, version link is broken and at production link is working. We need to unify source from which tag is selected.

Everything seems to working as desired now.


Mobile App [Radzima UIKit] The sub-categories are placed randomly in 'Sightseeings'/'Достопримечательности' category on the Main page

Tested area:
iOS 13.3.1 (iPhone 11, UIKit)
Description:
The sub-categories are placed randomly in 'Sightseeings' category on the main page. The order of the subcategories doesn't match the order of categories in Radzima Admin App. But when the list of all categories is opened, the order of sub-categories matches the order of categories in Radzima Admin App.
Steps to reproduce:

Run the App;
Scroll till the category 'Sightseeings'/'Достопримечательности'
Swipe right the sub-categories.

Actual result:
The categories are placed randomly.
Expected result:
The sub-categories is placed in order as in Radzima Admin App (Architecture, Religion, Nature, Museums. War monuments, Others)

@Olga-Kurbatskaya please recheck in the latest build.


Link to maintainer(s) and contributor(s)

The Data Package specifies both maintainers and contributors fields, however I am not seeing these anywhere in the interface. It could at least initially be part of the legend, though further on I think that there needs to be some kind of info pop-up with additional documentation (i.e. these links and even logos, plus texts representative of the use case / methodology / interpretability of the data).

The info box currently is responsible for rendering Data Package Metadata and should have a way of surfacing maintainers and contributors.
As for the second part: I would be very interested in exploring a pipelines data model as part of the platform, linking data processing offerings and resulting snapshot. It could hold a name/uuid, a title, a description (preferrable in multiple languages), an organization/contact, a prize etc. From that users could request snapshots based on the available pipelines and a perimeter and see the status of their requests.

The info box currently is responsible for rendering Data Package Metadata and should have a way of surfacing maintainers and contributors.
As for the second part: I would be very interested in exploring a pipelines data model as part of the platform, linking data processing offerings and resulting snapshot. It could hold a name/uuid, a title, a description (preferrable in multiple languages), an organization/contact, a prize etc. From that users could request snapshots based on the available pipelines and a perimeter and see the status of their requests.


Added two sample notebooks - First sample notebook demonstrates usage of AutoML algorithm and second sample notebook demonstrates how to use pre-trained models for extracting vehicle's metadata

Issue #, if available:
Description of changes:

Created a sample notebook that demonstrates how to use Automl Algorithm from AWS Marketplace.
Created a sample notebook that demonstrates how to use two model packages from AWS Marketplace to extract metadata such as make, model, year, bounding box, damage-type from a car's picture.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Incorporated review comments.


Refine MaterialX render module build configuration

Add more refined control over building MaterialX render modules. Specifically USD only needs the core render module in some build configurations (iOS).
Also add a guard to ensure that MaterialXGenGlsl is built if MaterialXGenMsl is built, because of the dependency in the data library.  USD uses MaterialX::GlslShaderGenerator::TARGET to locate those resources.

@ld-kerley I like the idea behind this proposal, though the split between MATERIALX_BUILD_RENDER and MATERIALX_BUILD_RENDER_CORE seems counterintuitive to me, as there's no corresponding module named MaterialXRenderCore.
As an alternative, what if we added a MATERIALX_BUILD_RENDER_PLATFORMS flag, defaulting to ON, with all platform-specific render modules gated by this flag?
This would allow USD developers to opt out of platform-specific render modules such as MaterialXRenderGlsl and MaterialXRenderOsl, without losing access to the MaterialXRender module that they still need.

Thanks for the updates, @ld-kerley, and this looks really promising!  I'll take a closer look in upcoming days, and let's see if we can get this change ready to include in MaterialX v1.39.2.


Adding info to site backup docstring

Issue #121
The list function was not listed as part of the help information
for the backup command.
I also re-wrote a couple of the docstring lines to make the format
more consistent with other docstrings throughout Terminus.
 Thanks!

I'll let @mikevanwinkle do the honors, but this is 100% :ship:

Aww, thanks @joshkoenig :blush:
Whenever I see a simple, quick fix, I try to take a minute and make it happen.
Thanks!

Thanks again @ElliotFriend! Sorry for the delay on this merging now and it will be in the 0.5.0 release.


How to export docx  in c# NPOI XWPF landscape format

How to export .docx in landscape format (How To Set Page Orientation For A Word Document in c# coding) using c# code in  NPOI.XWPF XWPFDocument ?

https://stackoverflow.com/questions/33970037/unable-to-change-orientation-of-ms-word-filexwpf-using-apache-poi


Add osu defines when needed

Description
Add OSU definitions when needed
Changes include

[X ] New feature (non-breaking change that adds functionality)

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

Project coverage is 59.65%. Comparing base (5686449) to head (ac14882).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #579   +/-   ##
=======================================
  Coverage   59.65%   59.65%
=======================================
  Files          12       12
  Lines        1678     1678
=======================================
  Hits         1001     1001
  Misses        677      677

Flag
Coverage Δ

unittests
59.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

IMO this solution seem fragile, when updating SDK files, we are going to often break the OSU build as OSU build is not check by the SDK CI...

IMO this solution seem fragile, when updating SDK files, we are going to often break the OSU build as OSU build is not check by the SDK CI...

Use existing flag BOLOS_OS_UPGRADER_APP instead of OSU to not introduce an other FLAG.


Issue with k8s.io/docs/tutorials/configuration/configure-redis-using-configmap/

I tried to follow the tutorial, but the docker image kubernetes/redis:v1 doesn't seem to exist :(

Thank you for reporting this issue.
The image doesnot exist and must be replaced with simply redis

Is this OK to close?

Yes, sorry for the late reply, with the suggested changes for that tutorial, I'm going to close this


centre align the links "vertically" in the navbar. Hint - use flexbox and remove float.

can I work on this

can you elaborate more what I have to do and where ?

can you elaborate more what I have to do and where ?

Please finish the already assigned issues before moving on to another issue.


[Task]: Write test cases Execute API payload changes w.r.t Datatype handling

Is there an existing issue for this?

[X] I have searched the existing issues

SubTasks

Research on how to write cypress test cases on API request payload/ function.
Write test cases for all the changes.

Index
Datatype
Status

1
Binary
Completed

2
Enum
Completed

3
Numeric
In Progress

4
Array

5
Binary

6
DateTime

7
JSON

8
Character


Search results do not include/highlight partial display name matches

Affected module
Search UI
Describe the bug
The search results show correctly when there is an exact match on the full display name or on parts separated with underscores. When there is a partial match, the table is shown in search results, but the section with aggregated matches and highlights are not visible. Possibly the scoring is also affected.
To Reproduce
Search for a part of a display name, such as tab or strain and note the difference between full vs partial display name matches in the screenshots. A simple use case would be search for 'order' to find a table called 'orders'.

Expected behavior
Consistent search result display
Version:
OM 1.2
Additional context
N/A

@chirag-madlani

I am closing this as done, Let me know if anything else is needed


Stop saving failures to flush jobs in InMemoryConfigStorage to disk

I've found several problems with this approach:

Call to \Google\Cloud\Core\Batch\HandleFailureTrait::initFailureFile leads to a RuntimeException when constructing the class.
Persisting job flushing failures to disk is very unexpected from a class called with the words in memory in the name. This can lead to very unexpected situations, like the disk filling up.
As far as I can tell, it is not useful unless google-cloud-batch is running. This is unexpected to users when the InMemoryConfigStorage is used - which is a default in the \Google\Cloud\Trace\TraceClient, for example.

What do you think about removing the failure handling features from InMemoryConfigStorage?

@ged15, thanks for taking the time to organize this. I'll take some time shortly to fully review the proposal.

This is not really going to help in my case since \Google\Cloud\Core\Batch\BatchJob::__construct calls \Google\Cloud\Core\Batch\HandleFailureTrait::initFailureFile as well.
My problem is that an exception is thrown when the batch failure dir cannot be created because it exists. To fix that, I've made a separate PR.
This PR can still be merged but the problem is that \Google\Cloud\Core\Batch\BatchJob::__construct also calls \Google\Cloud\Core\Batch\HandleFailureTrait::initFailureFile.

@ged15, what if instead of disabling the file usage completely - we had an environment variable that would allow for disabling it? I totally agree with your points, but it would be a breaking change to remove this functionality at the moment.

@ged15 have you had a chance to review this based on @dwsupplee's most recent comment?

I think this is taken care in #4982
If you pass the env variable GOOGLE_CLOUD_BATCH_DAEMON_FAILURE_DIR with a string false, that should prevent logging of the failed items.
I am closing this PR since 4982 is already merged. Feel free to reopen this if more help is needed.


Insert byte[] array using O'Dataclient  to database

I need to know, how can I insert byte[] array using O'Dataclient  to sql database.
I have my code =>
byte[] data = target.ToArray();
   Client.For<MyClass>()
                                          .Set(new MyClass
                                          {
                                              AssemblyByte = data
                                          })
                                          .InsertEntryAsync();

My domain class is =>
public class MyClass
{
public byte[] AssemblyByte { get; set; }
public Guid Id { get; set; }
}
but It shows me Internal server error.
Could anyone have any idea , how can I insert  AssemblyByte  to database.

How is AssemblyByte defined in your OData service? Can you check the service metadata?

AssemblyByte  is name of my property in MyClass as
byte[] data = target.ToArray();
public class MyClass
{
public byte[] AssemblyByte { get; set; }
public Guid Id { get; set; }
}
I have directly assign the data  to AssemblyByte i.e AssemblyByte = data
Is this something wrong with my syntax

This is fine but I would like to know is how AssemblyByte is exposed by your OData service. All your entities are mapped to OData types, so even if you use byte array in your local code it might be mapped to Edm.Binary type, this is what I'd like to know. So please check the following:

Get your service metata available at [SERVICE_URL]/$metadata address. Check how AssemblyByte is defined there.
Check your communication in an app like Fiddler and see what is sent to the service (HTTP payload) - if it is ever sent.

Are u talking about this ?
I have nothing in my service, I just call insert of O'data directly, I think it should maintain everything internally.
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API routes
config.MapHttpAttributeRoutes();
        ODataModelBuilder builder = new ODataConventionModelBuilder();
        builder.EntitySet<MyClass>("MyTable");

        config.MapODataServiceRoute(
            routeName: "client",
            routePrefix: "route",
            model: builder.GetEdmModel());

    }

and in context
public class DbContext : ConventionBaseDbContext
{
public DbContext()
: base("DataBase")
{
    }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {

    public virtual DbSet<MyClass> MyClass{ get; set; }

}

Yes, this is what I meant, so it's Edm.Binary which corresponds to a byte array. Now I need to know what kind of error is raised i.e. whether exception happens in the client or it is the service that returns HTTP error code. Can you check run your program while having Fiddler session open and check the HTTP traffic? Note that Simple.OData.Client simply generates HTTP requests so in order to find out what's wrong it's important to understand whether such HTTP request was generated and if so what was the response.

And just to test if it works with strings, can you try the following:
public class MyClass
{
public string AssemblyByte { get; set; }
public Guid Id { get; set; }
}
and when calling Insert: AssemblyByte = Convert.ToBase64String(data)
Does it still fail? (and if so, Fiddler output would be useful)

Hi again,
I ran some tests and they worked, so there can something that your OData service doesn't accept. However I found and fixed a bug that might affect base64 conversion for JSON payload. Can you try the newest version 4.14.2, try both scenarios: the one that you wrote yourself and the one I suggested with using Convert.ToBase64String (and defining AssemblyByte as string).

for
public class MyClass
{
public string AssemblyByte { get; set; }
public Guid Id { get; set; }
}
It properly works
but
public byte[]AssemblyByte { get; set; }
doesn't work.

I'll explain u complete problem
=> I need to store AssemblyByte  in sql table
=> In sql table i have assigned datatype VarBinary for AssemblyByte  column
=> In c# my class property is
public class MyClass
{
public byte[]AssemblyByte { get; set; }
public Guid Id { get; set; }
}
=> Now , I need to insert byte via o'dataclient
e.g.
byte[] data = target.ToArray();
Client.For()
.Set(new MyClass
{
AssemblyByte = data
})
.InsertEntryAsync();
=> It shows me Internal server error in web api. even I didn't wright down any thing in my web api. I just inherit mu web api from odata.
what is the wrong one Iam doing

Yes its now working.

Good to know!


Ability to test and fix Selectors step by step in debug mode

Please add Ability to test and fix Selectors step by step in debug mode.
Time of execution  of E2E test scenario in some cases and in some type of websites can be very long. And because of that, if some selectors break during refactor, You need to run this very long test multiple times while trying to fix the selectors. This can take for example 1h to do.
Some of my tests take 15min to finish execution. If I have to fix 100x Selectors this takes a lot of time!
What are you suggesting?
With this feature being implemented, You could run test in debug mode, and whenever some selector was not found during test execution, the runner would pause and display input where You could test selectors. After inputing into this input value Selector('.some-improper-class') TestCafe would inform that no elements were found. After that, if You would input Selector('.good-class') and TestCafe would be able to find this element on page, You could update this selector in Code, press Continue button in TestCafe toolbar in browser and TestCafe would execute current step with this new Selector You have provided in input, and pause again next time it won't find another Selector.
This would allow to fix whole test in one debug run - which would drastically reduce time to do refactors.
What alternatives have you considered?
None.
Additional context
None.

@Evilweed,

Thank you for sharing your idea with us. We are working on this feature in the context of this thread: #3244 .

I noticed that you already added a comment there. I will close this thread as a duplicate.


Feature - adding invokable tasks to cli (193)

This introduces basic functionality to list and invoke custom defined tasks

Checklist

[ ] Affected Issues have been mentioned in the Closing issues section
[ ] Documentation has been written/updated.
[ ] Changelog entry has been written

Closing issues
closes #193

@bomoko can you run make docs and update this PR with the docs changes please 😄

@shreddedbacon - docs generated :)


Type fixing

In an effort to improve the quality of SimpleITK's documentation, I went on a quest of spell checking much of the ITK codebase.  This PR touches a lot of files (over 500), mostly headers in the Modules folder.  I intentionally ignore spelling bugs in the ThirdParty sub-folder, since they presumably come for other codebases.
The PR is broken up into a bunch of commits.  Each commit deals with files in a particular sub-folder and/or a file type (.h vs .hxx vs .cxx).  That way you should be able to select particular subsets of the PR if needed.
ref: @blowekamp
PR Checklist

🚫   Makes breaking changes
:no_entry_sign: Makes design changes
:no_entry_sign: Adds the License notice to new files.
:no_entry_sign: Adds Python wrapping.
:no_entry_sign: Adds tests and baseline comparison (quantitative).
:no_entry_sign: Adds test data.
:no_entry_sign: Adds Examples to ITKExamples
:no_entry_sign: Adds Documentation.

Refer to the ITK Software Guide for
further development details if necessary.

@hjmjohnson I could certainly have a go at the ITK Examples repo.  It's much smaller than ITK, so it should be easy.

@hjmjohnson I could certainly have a go at the ITK Examples repo. It's much smaller than ITK, so it should be easy.

Spectacular!  That codebase populates public web examples.


Change to assertEquals

Please use assertEquals("x and y", x, y) instead of assertTrue("x and y", x == y) In general, use the most specific assert you can, because this will give you the most useful error messages when your test fails. Plus it is a bit more self-documenting

Went through all the JUnit classes and fixed all inappropriate asserts.
Changed AssertTrue( ****, XX == null) to: AssertNull(, XX)
Changed AssertTrue( ****, XX != null) to: AssertNotNull(, XX)
Changed AssertTrue( ****, XX == YY) to: AssertEquals(, YY, XX)
Changed AssertTrue( ****, XX != YY) to: AssertNotSame(, YY, XX)


Notification not showing when app is open

I'm unable to show notification when app is open. I did that before and I know fcm library support it but I forgot how I did it last time without using local notification.
Currently I'm using standard method described in read me.
I've tried adding custom_notification in data payload along with the priority and show_in_foreground but nothing helped.
I'm able to show it using local notification but don't want to bcs I'm not sure how it will act in different scenarios. It can result in duplicate notification in certain cases.
showLocalNotification(notif) {
  FCM.presentLocalNotification({
    id: new Date().valueOf().toString(),         // (optional for instant notification)
    title: notif.title,      // as FCM payload
    body: notif.body,                // as FCM payload (required)
    show_in_foreground: true                     // notification when app is in foreground (local & remote)
  });
}
  FCM.on(FCMEvent.Notification, notif => {
  if (!notif.opened_from_tray) {
          this.showLocalNotification(notif);
      }
});

What version of RN and react-native-fcm are you running?
     "react-native": "0.50.3",
 "react-native-fcm": "^10.0.3"

What device are you using? (e.g iOS9 emulator, Android 6 device)?
All devices android & iOS

Is your app running in foreground, background or not running?
foreground

can you provide notification payload?

try set priority: "high"

@evollu already added it. Adding priority outside notification and data or inside nothing helped.

{                    to = deviceId,
                    badge = 0,
                    notification = new
                    {
                        title = "test",
                        body = "body",
                        sound = "default",
                       // priority = "high",
                        badge = 0,
                      show_in_foreground = true,
                      //  content_available = true
                    },
                    data = new
                    {
                      //  custom_notification = new
                       // {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "Enabled",
                            fcmMessageType = notifType,
                            //priority = "high",
                                 show_in_foreground = true,
                            //  click_action = "fcm.ACTION.OPEN_NOTIFICATION",
                             //content_available = true
                       // }
                    },
                    content_available = true,
                   priority = "high",
                };

for android
{                    to = deviceId,
                    badge = 0,
                    data = new
                    {
                          custom_notification = new
                          {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "Enabled",
                            fcmMessageType = notifType,
                            priority = "high",
                            show_in_foreground = true
                       // }
                    },
                    content_available = true
                };

for iOS it creates notification automatically so calling local notification will just create another notification.
what do you mean not working for the android payload?

I mean for android & iOS it is not showing the notification from top when app is open. I've tried the following payloads:
1.
{                    to = deviceId,
                    badge = 0,
                    data = new
                    {
                          custom_notification = new
                          {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "default",
                            fcmMessageType = notifType,
                            priority = "high",
                            show_in_foreground = true
                        }
                    },
                    content_available = true
                };

{                    to = deviceId,
                    badge = 0,
                    notification = new
                    {
                        title = "test",
                        body = "body",
                        sound = "default",
                        priority = "high",
                        badge = 0,
                      show_in_foreground = true,
                    },
                    data = new
                    {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "Enabled",
                            fcmMessageType = notifType,
                            show_in_foreground = true,
                    },
                    content_available = true,
                   priority = "high",
                };

{                    to = deviceId,
                    badge = 0,
                    notification = new
                    {
                        title = "test",
                        body = "body",
                        sound = "default",
                        priority = "high",
                        badge = 0,
                      show_in_foreground = true,
                    },
                    data = new
                    {
  custom_notification = new
                          {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "Enabled",
                            fcmMessageType = notifType,
                            show_in_foreground = true,
}
                    },
                    content_available = true,
                   priority = "high",
                };

But if it is local notification it displays it on foreground.

payload 2 and 3 should work on iOS.
can you add breakpoint on https://github.com/evollu/react-native-fcm/blob/master/Examples/simple-fcm-client/ios/SimpleFcmClient/AppDelegate.m#L65 and see if notification ever make to your phone?

Can you explain the below lines bit bcs my code don't enter in this bloack while in foreground.
alert outside the block shows notification data.
 alert(JSON.stringify(notif)) shows notification data.

 if(Platform.OS ==='ios' && notif._notificationType === NotificationType.WillPresent && !notif.local_notification){
      // this notification is only to decide if you want to show the notification when user if in foreground.
      // usually you can ignore it. just decide to show or not.
      notif.finish(WillPresentNotificationResult.All)
      return;
    }

@evollu  UPDATE:
notification shows in android while app is in foreground using the below payload. I just removed the sound:"Enabled" and changed it to "default". I think my device was on silent mode and FCM can't change the sound settings and it just don't shows the notification.

{                    to = deviceId,
                    badge = 0,
                    notification = new
                    {
                        title = "test",
                        body = "body",
                        sound = "default",
                        priority = "high",
                        badge = 0,
                      show_in_foreground = true,
                    },
                    data = new
                    {
  custom_notification = new
                          {
                            badge = 0,
                            title = "title",
                            body = "body",
                            sound = "default",
                            fcmMessageType = notifType,
                            show_in_foreground = true,
}
                    },
                    content_available = true,
                   priority = "high",
                };

But for iOS it still don't shows. Now I'm curious why is this happening. Can you explain the below lines bit bcs my code don't enter in this block while in foreground. Alert outside the block shows notification data in iOS.

 alert(JSON.stringify(notif)) //shows notification data.

 if(Platform.OS ==='ios' && notif._notificationType === NotificationType.WillPresent && !notif.local_notification){
      // this notification is only to decide if you want to show the notification when user if in foreground.
      // usually you can ignore it. just decide to show or not.
      notif.finish(WillPresentNotificationResult.All)
      return;
    }

@evollu

sound: "Enabled" means "look for a sound called Enabled.mp3 and use it for notification sound, which will blow up notification
you say it doesn't go into the if condition. Can you show what was the actual value?

@sfm2222 finally .... iOS9 can't show foreground notification. it just get ignored

I'll try on the latest version and will get back to you. Thank You. @evollu

What are means the payload, if you use the Firebase-Web-GUI to send messages:
https://console.firebase.google.com/project/myproject-123/notification ?
5th last Post from here, sfm2222 wrote, it work this way for Android.
I only send Messages via console.firebase.google.com. Can I make it work from there?
I got this in console.log(notif), if App is in foreground. The screen & show_in_foreground was added by me:

@xstable are you targeting SDK 26? if so you need to use SDK-26 branch and register notification channel

Yes, you're right, I have this build.gradlew:
android {
    compileSdkVersion 27
    buildToolsVersion "28.0.0 rc2"

    defaultConfig {
        applicationId "com.schwarzenbergfestival"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 3
        versionName "0.1-alpha"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

@evollu How can I register Notification-Channels?

@xstable there is example in SDK-26 branch
https://github.com/evollu/react-native-fcm/blob/sdk-26/Examples/simple-fcm-client/app/App.js#L38

@evollu After registering notification channel in my Galaxy A8 Android 8, notification banner still not showing.
But Nexus Emulator 6 shows notification banner well.
AndroidManifest.xml

App.js
FCM.createNotificationChannel({
id: 'ccon_channel',
name: 'CCON Channel',
description: 'used for ccon',
priority: 'high'
});
compileSdkVersion 27
targetSdkVersion 27
buildToolsVersion '27.1.1'

samsung has extra settings? I don't have samsung phone, does anyone else have the same issue?

This works for me!
Nodejs
Im using firebase-admin to send my notifications.
My iOS pay load is:
let userToken = token;
let message = {
notification: {
title: title,
body: body,
type: notification_type,
sound : "default",
badge: "1",
vibrate: "1"
},
data: {
type: notification_type,
targetScreen: "details",
show_in_foreground: "true",
id: userID,
offerID: offerId,
job_status: job_status
}
}
let options = {
content_available: true,
priority: "high"
}
For Android the payload is the same except for my "message" variable:
message = {
notification: {
title: title,
body: body,
type: notification_type,
sound : "default",
badge: "1",
vibrate: "1"
},
data: {
custom_notification: {'body': '${body}',                                                  'title': ${title},                                                  'type': ${notification_type},                                                  'id': '${userID}',                                                  'offerID': '${offerId}',                                                  'job_status': '${job_status}',                                                  'sound': 'default',                                                  'color':'#00ACD4',                                                  'priority':'high',                                                  'icon':'ic_notif',                                                  'group': 'GROUP','id': 'id',                                                  'show_in_foreground': true ,                                                  'badge':'1'},
}
}
customNotification only accepts strings so make sure to wrap your object in parens.
Note: make sure when you interpolate, your strings are actual strings.
(ex. var food = "milk" will sometimes output without quotation or commas. Hence why I used this method instead '${food}' )

I was also facing the same issue but after adding lines of code in manifest mentioned in this link https://rnfirebase.io/docs/v4.2.x/messaging/android#Update-Android-Manifest, I was able to listen to notification inside my App.js
Follow the android setup steps mentioned in the link
inside App.js
    // subscribe listner inside componentDidMount
componentDidMount() {
    const channel = new firebase.notifications.Android.Channel(
        'Your channel ID',
        'Channel Name',
        firebase.notifications.Android.Importance.Max
    ).setDescription('A natural description of the channel');
    firebase.notifications().android.createChannel(channel);

    // the listener returns a function you can use to unsubscribe
    this.notificationListener = firebase.notifications().onNotification((notification) => {

        if (Platform.OS === 'android') {

            const localNotification = new firebase.notifications.Notification({
                sound: 'default',
                show_in_foreground: true,
            })
                .setNotificationId(notification.notificationId)
                .setTitle(notification.title)
                .setSubtitle(notification.subtitle)
                .setBody(notification.body)
                .setData(notification.data)
                .android.setChannelId('Your channel ID') // e.g. the id you chose above
                .android.setSmallIcon('ic_notification_icon_white') // create this icon in Android Studio
                .android.setColor('#000000') // you can set a color here
                .android.setPriority(firebase.notifications.Android.Priority.High);

            firebase.notifications()
                .displayNotification(localNotification)
                .catch(err => console.error(err));

        } else if (Platform.OS === 'ios') {

            const localNotification = new firebase.notifications.Notification()
                .setNotificationId(notification.notificationId)
                .setTitle(notification.title)
                .setSubtitle(notification.subtitle)
                .setBody(notification.body)
                .setData(notification.data)
                .ios.setBadge(notification.ios.badge);

            firebase.notifications()
                .displayNotification(localNotification)
                .catch(err => console.error(err));

        }
    });
}

//Remove listeners allocated in createNotificationListeners()
componentWillUnmount() {
    this.notificationListener();
}


World link broken

Describe the bug
To Reproduce
Steps to reproduce the behavior:

Go to https://thirdroom.io/world/#thirdroom-public:matrix.org
You are redirected to https://thirdroom.io/preview

Expected behavior
Join the World as before.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
I guess this is caused by https://github.com/matrix-org/thirdroom/pull/233.
cc @ajbura

its not broken, if user is not logged in then all user are redirected to preview and if you login after that it will follow the link.
If already logged in then it will skip preview.

previously there was just the login, so i would expect to get to the login when i open that link and not logged in


Async write to prevent blocking of the calling thread

Reads are still concurrent (from different threads), but writes won't block the calling thread.

Hello @okla; thanks for contributing.
The project is not compiling; some more work is needed since using sync requires explicit capture semantics.
I kept the mutate method synchronous for consistency with read/write access and I would like to keep it like that, but I am really open to add a second mutateAsync method.
Would you mind pushing those changes?

Hey again.
Using async requires an escaping closure. Since the wrapper is a struct we cannot reference itself because it is a value type. I might consider switching to classes if this becomes an important/requested feature, but for now I think this is not needed, hence i am closing the PR.
Thanks anyways for the idea! Regards.


Weak References in XCode 7.3

I've come across an issue after upgrading to XCode 7.3 - and I'm not sure if this is something that should be addressed by Cocoapods or Cedar. My Specs target compiled and ran fine in XCode 7.2.1.
My configuration:

Cedar 0.12.0
Cocoapods 0.33.1
Standalone setup with a Specs target

The Specs target no longer compiles and gives me this error in CDRSpyInfo.mm:

Cannot create __weak reference in file using manual reference counting
Until I received this error, I wasn't even aware that ARC is turned OFF by Cocoapods, in the Pods project. My Specs target, and project build configurations clearly have it set to YES.
Looking at the above screenshot, I did some digging and found an Apple developer thread about the same issue: https://forums.developer.apple.com/thread/38934 and also a Stackoverflow post about the same: http://stackoverflow.com/questions/36147625/xcode-7-3-cannot-create-weak-reference-in-file-using-manual-reference-counting
The official word from Apple (contained in those threads) is that the semantics will change in the future and implies that references to __weak should be removed.  I've experimented with Weak References in Manual Retain Release to YES in my Pods project, and this causes a different error in CDRSpyInfo.mm.
So, I'm not sure where to go from here. Is there any plan to remove those or is there a work-around of some sort?

Hey @mkanthan! We have just released Cedar v0.13.1 which addresses this (and other) issues.

@mkanthan If you also use PivotalCoreKit be sure to not init or deinit its copy of Cedar because it has not yet been updated and will cause the same issue.

Great! I see this was released 2 hours ago, which was probably just after I checked for a recent update. I will upgrade.

Upgrading to 0.13.1 fixed it.


Upgrade to 0.72

It seems that the filtered items do not appear. I have tried override with zIndex and this didn't fix it.
Even if I use data (as below) within AutocompleteDropdown.
These were tested in a vanilla boilerplate build, e..g  npx react-native init x1
However, Flatlist seem to be ok, such as
const data = [
{ id: '1', name: 'Item 1' },
{ id: '2', name: 'Item 2' },
{ id: '3', name: 'Item 3' },
// Add more items as needed
];
const renderItem = ({ item }) => (

{item.name}

);
<View style={{zIndex:1,flex:1, backgroundColor:'orange'}}>
<FlatList
data={data}
keyExtractor={(item) => item.id}
renderItem={renderItem}
/>
</View>

I'm facing this issue, is there any solution?

Did anyone find a solution to this issue. i am running into it now

Please post a minimal code snippet to reproduce the issue


Possible catch-22 problem when using automatic deployment

We're deploying search-guard-ssl (<IP_ADDRESS>) and search-guard-2 (<IP_ADDRESS>) to a few elasticsearch clusters (2.3.4), and stumbled upon a strange issue that I cannot see mentioned in the documentation or that anyone else has seem to be having issues with.
I haven't been able to completely verify that this is the problem, but it seems like if you install and configure search-guard-ssl and search-guard-2 at the same time you end up in a catch-22 problem where the cluster seems to be correctly configured, but when you try to initialize it the searchguard index is not replicated across the cluster. They are clearly communicating with each other, as the other nodes are notified about what configuration it should have loaded, see below.
However, if you uninstall search-guard-2 and restart the cluster, then let puppet or whatever reinstall the plugin again, the cluster becomes operational and the index is replicated across the entire cluster.
This was a real gotcha, as the error messages we got back was Search Guard not initialized (SG11) and Not yet initialized, which sort of makes sense, but all seemingly similar issues was solved by running the sgadmin tool, which we could successfully run, it was just not synced across the cluster.
The solution is naturally simple, just let search-guard-ssl be installed first, wait for the cluster to return to a stable state, then install search-guard-2. But I seems like the kind of things that could be solved in the plugins themselves.
Message you get on other nodes when applying configuration using sgadmin:
[2016-07-25 07:39:03,769][ERROR][com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction] [test-apps-vpc-elasticsearch03c-node] Unable to load all configurations types. Loaded '[]' but should '[config, roles, rolesmapping, internalusers, actiongroups]'

I believe I've may be seeing this as well on es/sg v2.3.3 using elastic/puppet-elasticsearch to install both SG-SSL and SG2. I've taken to re-running puppet a second time after a bit of a delay to get everything working. The uninitialized failure seems to only happen when the searchguard index is created the first time. Later restarts or changes to elasticsearch or searchguard plugins seem to always do the right thing.  Maybe not relevant but nodes are in AWS and transport/node discovery on port 9300 is handled by the elasticsearch-cloud-aws plugin.

The documentation [1] actually states that searchguard-ssl should be running before searchguard-2 is installed:
"First you need to install and configure Search Guard SSL on all nodes in your cluster. Please note that while most of the configuration settings for Search Guard can be changed at runtime, configuration changes for the SSL/TLS layer require the restart of all participating nodes. So please make sure that Search Guard SSL is running properly before installing Search Guard, and pay attention to the different types of certificates you need for server- and client nodes."
[1] https://github.com/floragunncom/search-guard-docs/blob/master/installation.md

Thanks for the explaination.
Would it be possible to narrow down which Search Guard SSL es index, file, etc that SG2 requires from SG SSL to successfully startup ?
This would make it possible to define a dependency in configuration management tools like Chef and Puppet... enabling them to start SG SSL, wait for it to come fully up and then start SG.

There is no reliable way to install both search-guard-ssl and search-guard-2 without adding a lot of logic around the deployment process to avoid running the commands on every run. Wouldn't it be better that search-guard-2 before fully initializing checked wether or not search-guard-ssl was actually running and configured, seeing as it's a required dependency? It makes very little sense to load search-guard-2 if that is not the case. Even more so if that blocks search-guard-ssl when done in parallel.
I did see the docs you are referring to, but it's was not entirely clear that you need to install, configure and restart the nodes first. I knew that search-guard-ssl was configured correctly, so I just imagined it would be able to install search-guard-2.

For what it's worth, for my system I'm installing Elasticsearch, Searchguard SSL, and Searchguard 2 (in that order) before I start up Elasticsearch for the first time and it looks to start up correctly. I then run the sg-admin tool after Elasticsearch has started up and consider it "ready" after that tool has completed successfully.

To bring in some clarification here:

Do do not need install searchguard-ssl first and then start your nodes or something like this
The normal procedure is:

Shutdown all nodes if they are running
Install searchguard-ssl plugin and search-guard-2 plugin on every node
Make you configuration elasticsearch.yml on every node
Start up all nodes
Wait a minute (just to be sure cluster is established)
Run sgadmin.sh against one of the nodes
The "dynamic configuration  (like roles, users, ...)" are immediately and instantly applied to all nodes without an restart
Done

To update the dynamic configuration (like roles, users, ...) just

Run sgadmin.sh against one of the nodes. The dynamic configuration is immediately and instantly applied to all nodes without an restart

If you need to update config properties in elasticsearch.yml then you have to make those changes on every node and then you need to restart every node cause elasticsearch.yml in only read once during node startup.
@vegardx Your Unable to load all configurations types. Loaded '[]' but should '[config, roles, rolesmapping, internalusers, actiongroups]' is strange, i will look into this
@ewolinetz The documentation you cited [1] is meant like that: If you misconfigure SSL then your cluster could not be established because the nodes can not talk to each other and then you have n clusters with a node count of one and of course then only the node you connect to with sgadmin will be properly initialized. So if you know for sure that you SSL stuff is working there is no need to install search-guard-ssl "first".

@vegardx did you have an update on this already ? having the same issue

Hi All,
Can anyone help me with the below issue I am facing
I used tarfile which was said to be the easiest way to installtion searchguard which also includes elasticsearch package. Please refer to below link
https://github.com/floragunncom/search-guard/wiki/Search-Guard-Bundle.
After extracting tarfile I have started elasticsearch using the steps as mentioned in link and later ran agadmin.sh script and evrything was looking great.
Once I have installed Kibana and Logstash as root user , installed beats on client machine . Currently beats are able to push logs to logstash whereas logstash is not able t uso comminucate to elasticsearch.
When I found reason it says "Search Guard not initialized (SG11)" which is really strange.
Note: I deployed search guard tarfile using non rootuser.I also installed Kibana logastah and Elasticsearch with search guard on same server. beats on client machines.
Can anyone guide me here please as I am going crazy with this searchguard installation?

I tried exactly what you did.   I gave up trying to get it working with both SG SSL and
SG plugins enabled and loaded on a new ES cluster. Appears there is some
dependency and possibly race condition between SG SSL / SG plugins and the
sgadmin.sh interface on the first install... at least in my experience.
Others experiences may differ.
Using puppet we try and tear down the entire stack and bring it up from
scratch regularly--new ES, SG SSL, SG, ES templates, indexes, etc.
Hopefully we can uncover what the missing piece or timing delay which
causes this one... it works beautifully apart from this.
On Thu, Aug 4, 2016 at 6:04 AM, rocky4bmw<EMAIL_ADDRESS>wrote:

Hi All,
Can anyone help me with the below issue I am facing
I used tarfile which was said to be the easiest way to installtion
searchguard which also includes elasticsearch package. Please refer to
below link
https://github.com/floragunncom/search-guard/wiki/Search-Guard-Bundle.
After extracting tarfile I have started elasticsearch using the steps as
mentioned in link and later ran agadmin.sh script and evrything was looking
great.
Once I have installed Kibana and Logstash as root user , installed beats
on client machine . Currently beats are able to push logs to logstash
whereas logstash is not able t uso comminucate to elasticsearch.
When I found reason it says "Search Guard not initialized (SG11)" which is
really strange.
Note: I deployed search guard tarfile using non rootuser.I also installed
Kibana logastah and Elasticsearch with search guard on same server. beats
on client machines.
Can anyone guide me here please as I am going crazy with this searchguard
installation?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/floragunncom/search-guard/issues/182#issuecomment-237533599,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOPoEzLdkVvVh8DhgXRreS64F7ixj5GGks5qcdVPgaJpZM4JUEuz
.

Maybe this will fix it (or at least make it more robust): https://github.com/floragunncom/search-guard/commit/fad8b4d05c5ee7eef37076ec86edc918ed700b47

Can you pls test the new <IP_ADDRESS> release, issue should be fixed with this version.

I get same problem with search gurad bundle last version. it gives to me  Unable to load all configurations types. Loaded '[]' but should '[config, roles, rolesmapping, internalusers, actiongroups].
Please help

@floragunncom I am using elasticsearch 2.3.4 with searchguard bundle. When I added newusers and roles
after that when I start sgadmin.sh to update roles and users it says cluster timedout. Can you please let us know how can I fix this issue?
Also if I want to change password of admin and other users how can I achieve it?

I stopped trying in my vagrant environment, switched to my live
environment, there it loaded without problems. I could easily connect
kibana as well, however when trying to connect logstash I was running in
lots of problems again.
I stopped trying to get search-guard up and running, I switched to elastic
shield and got everything running within a day in a multi server cluster
with kibana logstash and ldap all connected.
Op 26 aug. 2016 20:00 schreef "Laura"<EMAIL_ADDRESS>
I get same problem with search gurad bundle last version. it gives to me Unable
to load all configurations types. Loaded '[]' but should '[config, roles,
rolesmapping, internalusers, actiongroups].
Please help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/floragunncom/search-guard/issues/182#issuecomment-242759833,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARwD0nYF5oZqGqYAvZCV1xZj-e3r_ZWuks5qjv-RgaJpZM4JUEuz
.

@vegardx @ewolinetz @john-bakker @Lamabu @brdaugherty seems we found the issue but we cannot reproduce the issue locally so we kindly ask you if you can test https://oss.sonatype.org/content/repositories/snapshots/com/floragunn/search-guard-2/<IP_ADDRESS>-SNAPSHOT/search-guard-2-<IP_ADDRESS>-20160826.200736-47.zip and report back if the problem persists or is gone. It was likely a nasty threading issue. Thanks in advance.

'Cannot retrieve configuration (first object) due to timeout' for
https://oss.sonatype.org/content/repositories/snapshots/com/floragunn/search-guard-2/<IP_ADDRESS>-SNAPSHOT/search-guard-2-<IP_ADDRESS>-20160826.221744-48.zip

Seems that version http://downloads.floragunn.com/elasticsearch-866a7b29-59d7-444c-833c-f10c42d533e9.tar.gz passes the running of sgadmin.sh successfullly

@vegardx colleague here. @floragunncom I have tried search-guard-2-<IP_ADDRESS>-20160831.101820-74.zip (it is master branch, isn't it?) and it still doesn't work, i.e. consistently does not work. So I looked at the code.
First of all, some context. I'm testing with:

ES 2.3.5
com.floragunn/search-guard-ssl/<IP_ADDRESS>
com.floragunn/search-guard/ (v<IP_ADDRESS>-47-g25142b8 as of writing)
Clean data state.

No other plugins or anything.

Single node.
Single processor.
elasticsearch.yaml as follows:

processors: 1
cluster:
  name: sgtest
network:
  bind_host:
    - _local_
    - _eth0_
  publish_host: _eth0_
node:
  name: first
path:
  data: /usr/share/elasticsearch/data/node
  logs: /var/log/elasticsearch/node
searchguard:
  authcz:
    admin_dn:
            - CN=admin
  ssl:
    http:
      enabled: true
      keystore_filepath: keystore.jks
      keystore_password: changeit
      truststore_filepath: truststore.jks
      truststore_password: changeit
    transport:
      enabled: true
      enforce_hostname_verification: false
      keystore_filepath: keystore.jks
      keystore_password: changeit
      truststore_filepath: truststore.jks
      truststore_password: changeit

Pay attention to "processors: 1" is there. This is my default case but your test machines are probably multicode so this setting emulates my case.
Start ES.
Run sgadmin:

Contacting elasticsearch cluster 'sgtest' and wait for YELLOW clusterstate ...
Clustername: sgtest
Clusterstate: GREEN
Number of nodes: 1
Number of data nodes: 1
searchguard index does not exists, attempt to create it ... done
Populate config from /etc/elasticsearch/node/searchguard/
Will update 'config' with /etc/elasticsearch/node/searchguard/sg_config.yml
   SUCC: Configuration for 'config' created or updated
Will update 'roles' with /etc/elasticsearch/node/searchguard/sg_roles.yml
   SUCC: Configuration for 'roles' created or updated
Will update 'rolesmapping' with /etc/elasticsearch/node/searchguard/sg_roles_mapping.yml
   SUCC: Configuration for 'rolesmapping' created or updated
Will update 'internalusers' with /etc/elasticsearch/node/searchguard/sg_internal_users.yml
   SUCC: Configuration for 'internalusers' created or updated
Will update 'actiongroups' with /etc/elasticsearch/node/searchguard/sg_action_groups.yml
   SUCC: Configuration for 'actiongroups' created or updated
FAIL: Expected 5 config types for node O8lLSUZETm6IyWjPU2KoAA but got only []
Done with failures

sgadmin hangs just there until it times out later. Node stays in not initialized state.
If I set "processors: 2" and restart with clean state, sgadmin completes with success. This is because you have:
clusterService.addLifecycleListener(new LifecycleListener() {

            @Override
            public void afterStart() {
threadPool.executor(ThreadPool.Names.GET).execute(new Runnable() {

in TransportConfigUpdateAction class while "get" thread pool is defined as follows in ES ThreadPool class:
add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.GET).size(availableProcessors).queueSize(1000));

So maximum one GET thread is available, that is already used by TransportConfigUpdateAction initialization code above waiting forever for multiGet in ConfigurationLoader.load() (which is async). MultiGet has no chance of completing because there is no thread available (it is in queue) for it to happen. So we have a guaranteed deadlock here.
Stacktrace bits mentioning com.floragunn (sgadmin is in progress on the node)
"elasticsearch[admessg-admin-vpc-elasticsearch01a-node][management][T#2]" #43 daemon prio=5 os_prio=0 tid=0x00007f7124150000 nid=0x3925 waiting on condition [0x00007f710c71d000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000008ccd3af8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
        at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:418)
        at com.floragunn.searchguard.configuration.ConfigurationLoader.load(ConfigurationLoader.java:180)
        at com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction.nodeOperation(TransportConfigUpdateAction.java:200)
        at com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction.nodeOperation(TransportConfigUpdateAction.java:55)
        at org.elasticsearch.action.support.nodes.TransportNodesAction.nodeOperation(TransportNodesAction.java:92)
        at org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:228)
        at org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:224)
        at com.floragunn.searchguard.ssl.transport.SearchGuardSSLTransportService.messageReceivedDecorate(SearchGuardSSLTransportService.java:165)
        at com.floragunn.searchguard.transport.SearchGuardTransportService.messageReceivedDecorate(SearchGuardTransportService.java:190)
        at com.floragunn.searchguard.ssl.transport.SearchGuardSSLTransportService$Interceptor.messageReceived(SearchGuardSSLTransportService.java:104)
        at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
        at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

"elasticsearch[admessg-admin-vpc-elasticsearch01a-node][get][T#1]" #26 daemon prio=5 os_prio=0 tid=0x00007f7141217000 nid=0x3913 waiting on condition [0x00007f710e34c000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000008b0e5e08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
        at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:418)
        at com.floragunn.searchguard.configuration.ConfigurationLoader.load(ConfigurationLoader.java:180)
        at com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction$1$1.run(TransportConfigUpdateAction.java:111)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

When stopping node, the following appears in the logs (as multiget gets its chance but it is too late):
[2016-09-01 11:16:55,309][INFO ][node                     ] [sgtest] started
[2016-09-01 11:16:55,337][INFO ][gateway                  ] [sgtest] recovered [0] indices into cluster_state
[2016-09-01 11:17:18,789][INFO ][cluster.metadata         ] [sgtest] [searchguard] creating index, cause [api], templates [], shards [1]/[0], mappings []
[2016-09-01 11:17:19,016][DEBUG][com.floragunn.searchguard.configuration.SearchGuardIndexSearcherWrapperModule] FLS/DLS not enabled
[2016-09-01 11:17:19,712][INFO ][cluster.routing.allocation] [sgtest] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[searchguard][0]] ...]).
[2016-09-01 11:17:19,795][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] searchguard index exists
[2016-09-01 11:17:20,346][INFO ][cluster.metadata         ] [sgtest] [searchguard] create_mapping [config]
[2016-09-01 11:17:21,054][INFO ][cluster.metadata         ] [sgtest] [searchguard] create_mapping [roles]
[2016-09-01 11:17:21,221][INFO ][cluster.metadata         ] [sgtest] [searchguard] create_mapping [rolesmapping]
[2016-09-01 11:17:21,397][INFO ][cluster.metadata         ] [sgtest] [searchguard] create_mapping [internalusers]
[2016-09-01 11:17:21,614][INFO ][cluster.metadata         ] [sgtest] [searchguard] create_mapping [actiongroups]
[2016-09-01 11:17:21,802][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] searchguard index exists
[2016-09-01 11:19:19,861][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to null (null means timeout)
[2016-09-01 11:19:19,862][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to timeout
[2016-09-01 11:19:21,802][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to null (null means timeout)
[2016-09-01 11:19:21,802][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to timeout
[2016-09-01 11:21:19,862][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (2 object) due to null (null means timeout)
[2016-09-01 11:21:19,862][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (2 object) due to timeout
[2016-09-01 11:21:21,803][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (2 object) due to null (null means timeout)
[2016-09-01 11:21:21,803][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (2 object) due to timeout
[2016-09-01 11:23:19,862][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (3 object) due to null (null means timeout)
[2016-09-01 11:23:19,862][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (3 object) due to timeout
[2016-09-01 11:23:21,803][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (3 object) due to null (null means timeout)
[2016-09-01 11:23:21,803][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (3 object) due to timeout
[2016-09-01 11:25:19,863][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (4 object) due to null (null means timeout)
[2016-09-01 11:25:19,863][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (4 object) due to timeout
[2016-09-01 11:25:21,803][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (4 object) due to null (null means timeout)
[2016-09-01 11:25:21,803][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (4 object) due to timeout
[2016-09-01 11:27:19,863][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (5 object) due to null (null means timeout)
[2016-09-01 11:27:19,863][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (5 object) due to timeout
[2016-09-01 11:27:20,864][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] searchguard index exists
[2016-09-01 11:27:21,804][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (5 object) due to null (null means timeout)
[2016-09-01 11:27:21,804][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (5 object) due to timeout
[2016-09-01 11:27:21,804][ERROR][com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction] [sgtest] Unable to load all configurations types. Loaded '[]' but should '[config, roles, rolesmapping, internalusers, actiongroups]'
[2016-09-01 11:27:21,804][DEBUG][com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction] [sgtest] Retrieved config due to config update request and will now update config change listeners
[2016-09-01 11:27:23,902][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-09-01 11:27:28,567][ERROR][com.floragunn.searchguard.auth.BackendRegistry] Not yet initialized
[2016-09-01 11:29:20,865][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to null (null means timeout)
[2016-09-01 11:29:20,865][WARN ][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (first object) due to timeout
[2016-09-01 11:30:22,067][INFO ][node                     ] [sgtest] stopping ...
[2016-09-01 11:30:22,094][DEBUG][action.get               ] [sgtest] null: failed to execute [org.elasticsearch.action.get.MultiGetShardRequest@334dd681]
TransportException[transport stopped, action: indices:data/read/mget[shard][s]]
        at org.elasticsearch.transport.TransportService$2.run(TransportService.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[2016-09-01 11:30:22,125][DEBUG][action.get               ] [sgtest] null: failed to execute [org.elasticsearch.action.get.MultiGetShardRequest@2d799de7]
TransportException[transport stopped, action: indices:data/read/mget[shard][s]]
        at org.elasticsearch.transport.TransportService$2.run(TransportService.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[2016-09-01 11:30:22,126][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (2 object) due to failure config transport stopped, action: indices:data/read/mget[shard][s] (null means timeout)
[2016-09-01 11:30:22,126][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (3 object) due to failure roles transport stopped, action: indices:data/read/mget[shard][s] (null means timeout)
[2016-09-01 11:30:22,126][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (4 object) due to failure rolesmapping transport stopped, action: indices:data/read/mget[shard][s] (null means timeout)
[2016-09-01 11:30:22,126][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Cannot retrieve configuration (5 object) due to failure internalusers transport stopped, action: indices:data/read/mget[shard][s] (null means timeout)
[2016-09-01 11:30:22,112][DEBUG][action.get               ] [sgtest] null: failed to execute [org.elasticsearch.action.get.MultiGetShardRequest@2113b6b2]
TransportException[transport stopped, action: indices:data/read/mget[shard][s]]
        at org.elasticsearch.transport.TransportService$2.run(TransportService.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[2016-09-01 11:30:22,153][INFO ][node                     ] [sgtest] stopped
[2016-09-01 11:30:22,153][INFO ][node                     ] [sgtest] closing ...
[2016-09-01 11:30:23,127][DEBUG][com.floragunn.searchguard.configuration.ConfigurationLoader] Unexpected exception while checking if searchguard index exists: EsRejectedExecutionException[rejected execution of org.elasticsearch.action.support.ThreadedActionListener$1@2967ef28 on EsThreadPoolExecutor[listener, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@13eaf203[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 12]]]
[2016-09-01 11:30:23,129][DEBUG][com.floragunn.searchguard.transport.SearchGuardTransportService] [sgtest] failed to notify response handler on rejection
EsRejectedExecutionException[rejected execution of org.elasticsearch.transport.TransportService$3@7bd232d9 on EsThreadPoolExecutor[generic, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@3fecad4a[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 121]]]
        at org.elasticsearch.common.util.concurrent.EsAbortPolicy.rejectedExecution(EsAbortPolicy.java:50)
        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
        at org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor.execute(EsThreadPoolExecutor.java:85)
        at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:341)
        at com.floragunn.searchguard.transport.SearchGuardTransportService.sendRequest(SearchGuardTransportService.java:87)
        at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:299)
        at com.floragunn.searchguard.transport.SearchGuardTransportService.sendRequest(SearchGuardTransportService.java:79)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:221)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.start(TransportSingleShardAction.java:178)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.doExecute(TransportSingleShardAction.java:87)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.doExecute(TransportSingleShardAction.java:51)
        at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:149)
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:172)
        at com.floragunn.searchguard.filter.SearchGuardFilter.apply(SearchGuardFilter.java:111)
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:144)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:85)
        at org.elasticsearch.action.get.TransportMultiGetAction.doExecute(TransportMultiGetAction.java:97)
        at org.elasticsearch.action.get.TransportMultiGetAction.doExecute(TransportMultiGetAction.java:42)
        at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:149)
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:172)
        at com.floragunn.searchguard.filter.SearchGuardFilter.apply(SearchGuardFilter.java:111)
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:144)
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:85)
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:58)
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
        at org.elasticsearch.client.support.AbstractClient.multiGet(AbstractClient.java:567)
        at com.floragunn.searchguard.configuration.ConfigurationLoader.load(ConfigurationLoader.java:113)
        at com.floragunn.searchguard.action.configupdate.TransportConfigUpdateAction$1$1.run(TransportConfigUpdateAction.java:120)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

I'm not sure but probably it is makes sense to use MANAGEMENT thread here, because it is the only one which does not depend on available processors:
       add(defaultExecutorTypeSettings, new ExecutorSettingsBuilder(Names.MANAGEMENT).size(5).keepAlive("5m"));

So lets do that, rebuild and test. Now it works with "processors: 1".
But this still does not explain why it sometimes works and sometimes does not for other people (the lockup I described above should be pretty much 100% reproducible with "processors: 1") . I used to be able to reproduce the issue even with MANAGEMENT thread fix quite reliably but now I does not happen (maybe ES used to run out of MANAGEMENT threads even). I don't know why but I will report back if I notice anything.
Could release a new version with a fix ASAP? So more testing could continue.
Just one more remark. I really do not quite like the code in ConfigurationLoader.load() which is basically a critical method (i.e. nothing works until it succeeds). You attempt to synchronize asynchonization (of multiGet) with BlockingQueue which has a huge potential of deadlocks as demonstrated above. Add that its usage on startup is looping forever until load() succeeds is simply a disaster to happen and you never know what may hang for a long time (e.g. due to unsatisfied quorum or something else) if not forever. What is more, I'm also not sure how long running ES thread jobs are supposed to be. I believe ES excepts them to be quick since thead sizes are small and queues are big. I suggest you rewrite the code with callbacks in a fully async manner rather than use a BlockingQueue. The code will be uglier but it will be more bullet proof. Even if you stay with current code, it seems like timeouts of 2 minutes for each config (10 minutes in total) are way too big.

@modax thanks for this great analysis !
The snapshot v<IP_ADDRESS>-47-g25142b8 was not build from master, it was build from a local branch which already contained some of your suggestions but you analysis helped to figure out another one. I created a new branch for this: https://github.com/floragunncom/search-guard/commits/issue-182 Can you build it yourself or should i publish a snapshot build?
Your right regarding the ConfigurationLoader.load() code, we will revise it and will commit it to the branch mentioned above. Would be great if you can revise it and/or help with a PR

@modax If you like we can have a

related https://github.com/floragunncom/search-guard/issues/199

related https://github.com/floragunncom/search-guard/issues/203

related https://github.com/floragunncom/search-guard/issues/178

fixed with version 6

Confirm the latest bundle (ES2.4.0) fixed my issue.
https://floragunn.com/downloads/elasticsearch-76EDC0BB-9A7E-40BE-96B6-67872AB3D965.tar.gz
I was using(ES2.3.5) bundle:
https://floragunn.com/downloads/elasticsearch-866a7b29-59d7-444c-833c-f10c42d533e9.tar.gz
It works fine on a windows machine, but when I try using the same bundle on docker image with ubuntu with JDK8, sgadmin.sh hangs util time out:

Will connect to localhost:9300 ... done
Contacting elasticsearch cluster 'elasticsearch' and wait for YELLOW clusterstate ...
Clustername: elasticsearch
Clusterstate: GREEN
Number of nodes: 1
Number of data nodes: 1
searchguard index does not exists, attempt to create it ... done (with 0 replicas, auto expand replicas is off)
Populate config from /searchguard-client/plugins/search-guard-2/sgconfig
Will update 'config' with plugins/search-guard-2/sgconfig/sg_config.yml
SUCC: Configuration for 'config' created or updated
Will update 'roles' with plugins/search-guard-2/sgconfig/sg_roles.yml
SUCC: Configuration for 'roles' created or updated
Will update 'rolesmapping' with plugins/search-guard-2/sgconfig/sg_roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update 'internalusers' with plugins/search-guard-2/sgconfig/sg_internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update 'actiongroups' with plugins/search-guard-2/sgconfig/sg_action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Done with success

then seeing time out error message in the ES Server logs:

Unable to load all configurations types. Loaded '[]' but should '[config, roles, rolesmapping, internalusers, actiongroups]'

@floragunncom will we get a updated bundle for the older version?

@kenhuang here is a updated ES 2.3.5 bundle https://cdn.filestackcontent.com/Re5LngWBTu2Wid30LAaS


Create helper and UI component to easily support SGR ANSI escape sequences in the UI

I think we should have a general helper and UI component which handles these escape sequences, just like how it's easy to inject codicons into the workbench.

We can make this on the first thing that needs it


Formats passed in date_formats only work for English, even if languages=["es"]

version: 0.7.0

Apparently, months, weekdays etc. are not captured if they are specified in a custom format passed in date_formats unless they are written in English, independently from the languages you pass under languages. I add an example below.
dateparser.parse('xxxx junio', languages=['es'], date_formats=['xxxx %B'])
# >> None
dateparser.parse('xxxx june', languages=['es'], date_formats=['xxxx %B'])
# >> datetime.datetime(2018, 6, 30, 0, 0)

This is not exactly true. The date_formats depends on the locale set on the computer. If the locale is 'es' this shouldn't happen.
You can usually change the locale by doing this (it works for me on Ubuntu):
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'es_ES.UTF-8')
'es_ES.UTF-8'

Now this will work:
>>> dateparser.parse('xxxx junio', date_formats=['xxxx %B'])
datetime.datetime(2020, 6, 23, 0, 0)

I tried to figure out if we could internally change the locale and try the format in multiple locales, but I think changing the locale is discouraged and could cause other issues...
I will check this again in the future.

Looks like we might need something like https://stackoverflow.com/a/24070673


this.set Not Picking Up Changes to Object

Description
I asked the question here on stack overflow to find the bug.
Live Demo
http://codepen.io/tylergraf/pen/EyXZva/
Fixed with workaround: http://codepen.io/jshcrowthe/pen/JKypxr
Steps to Reproduce

Create Array of Objects
Call this.set to a property on web component
Change a property on an object in the array using .map
call this.set with the new copy of array
See no change to DOM

Expected Results
I expect the DOM to change because of the property change within the array. I'm assuming is this because the .map creates a new array but the object is still pointing to the old object in memory or something? I don't know.
Actual Results
No change to DOM.
Browsers Affected
I only looked at Chrome.
Versions

Polymer: v1.5.0
webcomponents-lite: v0.7.22

From my point of view this is expected.  The child element displays [[item.stuff]].  For that to update, someone has to inform the child of a new item or an updated item.stuff.  In this case there's no notification of such a change, so you don't see an update.  Maybe you expected the dom-repeat to re-render all of its children?  I agree that it appears there's an optimization being made by dom-repeat.

@devinivy Right, so the childe element has no idea it needs to update. Yeah, I expect the parent element to rerender all the children since the array has changed.

This is working as intended as the object that is being modified is not a property, but rather managed on window. Therefore, Polymer does not know you are making any changes. Either you need to make it a property of the custom element, or use the MutableData mixin to trigger the update. In general, we advise custom elements authors to not be depended on properties outside of the element scope and manage any internal data-structures in the element rather than from the outside.


Support CockroachDB

Buffalo itself supports cockroach, but we don't yet support provisioning Cockroach on Azure. To support it, we'd need to extend the gobuffalo quickstart template to offer a pre-configured cockroach cluster.

PM at Cockroach labs--let us know if you run into any trouble!


Is there an implementation library for C++?

I hope to implement it with C++ & and inlinehook

Hi,
Any chance you can provide some more information on what you are hoping to do or why the existing code does not work for C++?
Thanks

Closing as no response.


Please Update Tools and Link for SQL 2019 RTM

Hi Guys, looks like the installer is still using CTP 2.3 - at least that's what it says when you get to the UAC prompt asking if you would like to allow this app to make changes to your device.  Would you mind updating for RTM now that 2019 is GA as of Nov 4?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8da1f57b-a8fd-cca7-4cf0-9d594d365062
Version Independent ID: 60c46780-6a03-7958-c77a-e7c94e3b9e85
Content: sqlcmd Utility - SQL Server
Content Source: docs/tools/sqlcmd-utility.md
Product: sql
Technology: tools-other
GitHub Login: @markingmyname
Microsoft Alias: maghan

@PrometheusRising1 Thank you for the feedback, assigning this to the author for review.

@PrometheusRising1,
I apologize for the delay.
Can I ask what are specifically you are clicking to get this result?
Is this the MsSqlCmdLnUtils.msi (https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15)?
Please let me know.
Thank you.

@PrometheusRising1,
Thanks for your comment.
I apologize for the delay.
Your contribution is much appreciated.
A couple of questions:

Can I ask what are specifically you are clicking to get this result?
Is this the MsSqlCmdLnUtils.msi (https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15)?

However, our team can only answer feedback related to the documentation. Please kindly log your product feedback by using the button "Give Product Feedback" at the bottom of the DOCS page or visit the UserVoice page. If you have any feedback related to the documentation, please feel free to log in through this channel. We truly appreciate your contribution to our articles.
I hope this helps.
Thank you.
P. S.  I reached out to our engineering team to see if they can elaborate on your issue.  If I hear back, I will let you know.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion, and we will reopen the issue. To see what the community is wanting, please visit the UserVoice site.

No, this is going through the normal GUI installer - double click on it and UAC pops up.  The UAC prompt indicates the RTM is CTP 2.3.  Just double click on the installer and look at the prompt when it asks you to elevate.

I'm probably guilty of missing this (old) thread. The good news is that (finally!) we uploaded the ""RTM" branded MSIs to the download center and we are in the process of uploading the new DOCS pages with the updated fwlinks.

[x86] https://go.microsoft.com/fwlink/?linkid=2142257
[x64] https://go.microsoft.com/fwlink/?linkid=2142258

Note that your browser should be smart enough to download the MSI that matches your OS language,
If you want a different language, just append something like &clcid=<LCID_IN_Hexadecimal>to the URLs above (e.g. for the x64 Italian MSI, you would use https://go.microsoft.com/fwlink/?linkid=2142258&clcid=0x410.


Rooting objects

I was reading over the section about dereferencing safely and noticed that there was not any way to root objects. I don't know if this already planned to be covered in the section on garbage collection, but I think it is a really interesting problem that doesn't have a easy solution. It seems like the two approaches used for Rust thus far are either mutation sessions where you can only access heap objects in a closure or having some macro with drop guards. Each have their own trade-offs and I am curious what rust-hosted-langs recommends.

In this project we're using mutation sessions. See https://github.com/rust-hosted-langs/book/blob/master/interpreter/src/memory.rs#L142 for the interface and usage. This is essentially just the interior mutability pattern, and thus as a pattern that Rust widely supports, has seemed to me the more likely to be sustainable in a larger codebase.
As for rooting, you're right, I haven't explicitly addressed this yet. I intend to in the WIP section on GC. In short, though, everything referenced by a Thread object should be considered as roots: https://github.com/rust-hosted-langs/book/blob/master/interpreter/src/vm.rs#L178
There are some holes in the safety of the mutation session implementation currently: I think at present you could instantiate two separate VMs each with their own heap, but they do not validate that a Thread and its roots are associated with a particular instance. That's a TODO.
If you see any other gaps/holes I would love to know!  Thank you for your interest :)

Thank you. Just looking over the code, and had a few questions:
Can roots be stored outside of Memory, or each time you open a mutating session do you need to reaccess your roots? If they are stored outside, how to find them during garbage collection?
With the Mutator trait you can only have a single run method with static input and output types. How would handle a struct that has many methods, like vec or hashmap? Would you have to define you input type as some sort of enum that tells the run method which operation to perform?
Looking at the repl it seems like you would be unable to call GC at all during the execution of a function (which could be arbitrarily long) because the whole thing is evaluated inside a mutation session. Is that the case?
What would prevent me from doing the following:

clone a CellPtr<T>
change something so that the original T is not accessible (this is not a problem because GC can't run, so it is still safe to access)
pass the cloned CellPtr<T> out of the mutation session via the Output type or Thread-local storage.
run garbage collection (the original T is now collected and freed).
pass the CellPtr<T> back into a mutation session and then convert it to a ScopedPtr via get.
try to access T (triggering UB via UAF)

Thank you for provoking me to write some things down that have only sat in my own head so far! 😁  Sorry for the months gone by, hopefully this is still interesting!

Can roots be stored outside of Memory, or each time you open a mutating session do you need to reaccess your roots? If they are stored outside, how to find them during garbage collection?

My goal, not yet fully thought through into implementation, is that roots would strictly reside only inside Memory. That said, I can foresee some kind of pinning mechanism to allow references to roots from outside of Memory. This mechanism would probably use reference counting and also prevent the GC from moving objects.

With the Mutator trait you can only have a single run method with static input and output types. How would handle a struct that has many methods, like vec or hashmap? Would you have to define you input type as some sort of enum that tells the run method which operation to perform?

I think you're asking how data structures would be shared between the language runtime and external Rust code? Which in some way is also asking what is the input/output interface between the two domains.
Since native Rust and the hosted language are, in this project, a lot more independent than I think most Rust language implementations, it would be up to the user to implement aa translation layer. The language Memory is not intended to be shared between the hosted language and external Rust data structures (Vec, HashMap etc), so some kind of serialization/deserialization protocol would be needed to make an interface for more complex data structures. The only thing implemented at this time is a basic repl, which provides simply for string input and printing to screen!

Looking at the repl it seems like you would be unable to call GC at all during the execution of a function (which could be arbitrarily long) because the whole thing is evaluated inside a mutation session. Is that the case?

This is a work in progress on my own code branch. The code as-is hasn't been refactored towards answering this situation.
My thought thus far is that if GC is needed, the allocator would signal as such by returning a AllocPressure enum variant. This would then pause bytecode evaluation and tell the Mutator that a GC iteration is needed.

What would prevent me from doing the following?

inside a mutation session clone a CellPtr
change something so that the original T is not accessible (this is not a problem because GC can't run, so it is still safe to access)
pass the cloned CellPtr out of the mutation session via the Output type or Thread-local storage.
run garbage collection (the original T is now collected and freed).
pass the CellPtr back into a mutation session and then convert it to a ScopedPtr via get.
try to access T (triggering UB via UAF)

Right, another form of causing a root to escape.
I am hoping that the answer to be that generalized negative impls will solve this in a future stable Rust release.
If Mutator::Input and Mutator::Output cannot implement or contain anything that implements, a trait, say, Pointer, and if CellPtr implements Pointer, then perhaps the hole can be closed?
I am not sure if this would work or if I have understood all the implications of generalized negative impls.
What do you think?

I think you're asking how data structures would be shared between the language runtime and external Rust code? Which in some way is also asking what is the input/output interface between the two domains.

I was more asking about how you would handle the case where you wanted your entry point to have more then 1 method. For example ReadEvalPrint has only a run method. What if you wanted it to have other functionality (like parsing, batch-mode, or linting mode)?

My thought thus far is that if GC is needed, the allocator would signal as such by returning a AllocPressure enum variant. This would then pause bytecode evaluation and tell the Mutator that a GC iteration is needed.

But you would have to unwind all the way back to the mutator scope to call GC correct?

Right, another form of causing a root to escape.
I am hoping that the answer to be that generalized negative impls will solve this in a future stable Rust release.
If Mutator::Input and Mutator::Output cannot implement or contain anything that implements, a trait, say, Pointer, and if CellPtr implements Pointer, then perhaps the hole can be closed?

Is there not a solution that people can use now to write a sound interpreter?

What would prevent me from doing the following?
1. inside a mutation session clone a `CellPtr<T>`
2. change something so that the original T is not accessible (this is not a problem because GC can't run, so it is still safe to access)
3. pass the cloned `CellPtr<T>` out of the mutation session via the `Output` type or Thread-local storage.
4. run garbage collection (the original T is now collected and freed).
5. pass the `CellPtr<T>` back into a mutation session and then convert it to a `ScopedPtr` via `get`.
6. try to access `T` (triggering UB via UAF)

I've been thinking more on this but ultimately, I cannot see a way to absolutely prevent it.  If somebody wants to, they will find a way to circumvent type based roadblocks. However, I wouldn't consider myself a Rust or type logic expert by any means and I've tried to avoid deep/clever type logic in this project to keep it more accessible. Do you have any insight into a solution?

Looking at the repl it seems like you would be unable to call GC at all during the execution of a function (which could be arbitrarily long) because the whole thing is evaluated inside a mutation session. Is that the case?

I've thought more about this, too. In this particular project implementation, GC will never move objects. I'm certain I can implement stop-the-world transparently to the Mutator instance inside an alloc() call. Obviously I need to add the relevant code to identify roots.

if somebody wants to, they will find a way to circumvent type based roadblocks

I would be a lot more worried about people accidentally passing an object out and hitting UB without realizing it. I think the only way to really prevent this would be to disallow passing CellPtr out of the mutation session. Or when it does get handed out, wrap it in a Rc or Arc.

Obviously I need to add the relevant code to identify roots.

I think that is 90% of the problem. freeing unused memory is easy if you know the roots. But getting the roots is hard. How would you identify them?

It's been a while since reading the available articles out there on rooting, so honestly, thanks for prompting me to revisit.

https://manishearth.github.io/blog/2021/04/05/a-tour-of-safe-tracing-gc-designs-in-rust/
https://without.boats/blog/shifgrethor-iii/
and your very own https://coredumped.dev/2022/04/11/implementing-a-safe-garbage-collector-in-rust/

I think I agree that a Pin based mechanism as originally prototyped by withoutboats is the right approach. I think, early on, understanding shifgrethor did not come easy and so I deferred a deeper dive but it's clearer what's going on, now.