StructuredQueryBuild search throws exception when no results found

So we can address your issue, please include the following:

Version of MarkLogic Java Client API (see Readme.txt)
MarkLogic 8 - Java API 3.0.1, 3.0.8
MarkLogic 9 - Java API 4.0.3, <IP_ADDRESS>
Version of MarkLogic Server (see admin gui on port 8001)
MarkLogic 8.0-3
MarkLogic 9.0-4
Java version (java -version)
java version "1.8.0_111"
OS and version
MacOS, High Sierra, 10.13.3
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
Structured queries throw an exception when the data queried is not found. If data is found, results are returned as expected and no exceptions are throws. I've included a .ZIP file that recreates the issue using ML9 and <IP_ADDRESS> of the Java Client API.

//DEFINE A QUERY MANAGER
QueryManager queryMgr = client.newQueryManager();
	//DEFINE THE STRUCTURED QUERY BUILDER AND TELL IT WHICH SEARCH OPTIONS DOCUMENT TO USE
    StructuredQueryBuilder sQB = new StructuredQueryBuilder("Unit09-Exercise3-Options");

	//CREATE THE STRUCTURED QUERY
	//WE WANT "AND" LOGIC:  ARTIST AND GENRE AND OTHER-TERM AND NOT SOME-OTHER-TERM
	StructuredQueryDefinition queryDef = sQB.and(
			sQB.rangeConstraint("artist", Operator.EQ, qArtist),
			sQB.rangeConstraint("genre", Operator.EQ, qGenre),
			sQB.term(qOther),
			sQB.not(sQB.term(qNot))
            );

	//RUN THE QUERY, RETURNING RESULTS USING A SEARCH HANDLE
	SearchHandle results = queryMgr.search(queryDef, new SearchHandle());

Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleResponse(SearchHandle.java:1157)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleTop(SearchHandle.java:1130)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.parse(SearchHandle.java:1098)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.access$100(SearchHandle.java:1061)
at com.marklogic.client.io.SearchHandle.receiveContent(SearchHandle.java:158)
at com.marklogic.client.io.SearchHandle.receiveContent(SearchHandle.java:82)
at com.marklogic.client.impl.OkHttpServices.search(OkHttpServices.java:2062)
at com.marklogic.client.impl.QueryManagerImpl.search(QueryManagerImpl.java:175)
at com.marklogic.client.impl.QueryManagerImpl.search(QueryManagerImpl.java:139)
at com.mlu.app.App.runSearch(App.java:52)
at com.mlu.app.App.main(App.java:26)

Expected output: What specifically did you expect to happen?
Expected no results but no exceptions thrown.
mlu-test.zip

Alternatives: What else have you tried, actual/expected?

I don't have the options and so I changed the code like this
//DEFINE A QUERY MANAGER
QueryManager queryMgr = client.newQueryManager();

//DEFINE THE STRUCTURED QUERY BUILDER AND TELL IT WHICH SEARCH OPTIONS DOCUMENT TO USE
StructuredQueryBuilder sQB = new StructuredQueryBuilder();

//CREATE THE STRUCTURED QUERY
//WE WANT "AND" LOGIC:  ARTIST AND GENRE AND OTHER-TERM AND NOT SOME-OTHER-TERM
StructuredQueryDefinition queryDef = sQB.and(
	sQB.term(qOther),
	sQB.not(sQB.term(qNot)));

//RUN THE QUERY, RETURNING RESULTS USING A SEARCH HANDLE
SearchHandle results = queryMgr.search(queryDef, new SearchHandle());

//RUN SEARCH AGAIN BUT OUTPUT THE RESULTS IN THE CONSOLE USING A STRING HANDLE
System.out.println(queryMgr.search(queryDef, new StringHandle()).get());

return results;

This gave me nothing to match. I got the following output
<search:response snippet-format="snippet" total="0" start="1" page-length="10" xmlns:search="http://marklogic.com/appservices/search">
  <search:metrics>
    <search:query-resolution-time>PT0.001131S</search:query-resolution-time>
    <search:total-time>PT0.001351S</search:total-time>
  </search:metrics>
</search:response>

Hello World!

I get no exception.
Please paste the options. I will check again.

Thanks for attempting to recreate! That helps narrow down the issue.  I've attached 3 .zip files to assist in further efforts. One is the search options and a curl command to load them. You'll probably have to adjust the curl call as it's targeting our course environment. Another .zip has a couple of test top-songs .XML documents to verify results. The final is the database index configuration that was used. I hope these are helpful.
stuct-query-options.zip
top-songs-config.zip
top-songs.zip

Thanks for passing those! Still unsuccessful. Can you paste me the full stack of the exception. The issue is missing some details of the exception. Also, doing a curl
curl --anyauth --user admin:admin -X PUT<EMAIL_ADDRESS>-i -H "Content-type: application/json" "http://localhost:8002/manage/v2/databases/Documents/properties"

on the Documents database, gives me a 500 Internal server error
{"errorResponse":{"statusCode":"500", "status":"Internal Server Error", "messageCode":"XDMP-AS", "message":"XDMP-AS: (err:XPTY0004) $localname as xs:string -- Invalid coercion: <localname xmlns=\"http://marklogic.com/manage/database/properties\">...</localname> as xs:string"}}

Ok. I recreated everything from the app server, loading test songs, loading database index config and loading search options. These are attached in the attached .zip files. I've also included my code test app in the "mlu-test.zip" file.
To setup my test bed:

run the curl statement in the "top-songs-server-config" folder to create the rest instance, content and module databases.
run the curl statement in the "top-songs-config" folder to load the index options to the "top-songs-content" database
run the 2 curl statements in the "top-songs" folder to load the song documents.
run the curl statement in the "struct-query-options" to load the search option used.

Testing:
My success criteria was artist="eagles" genre="Rock" other="kid" and not condition="". My failure criteria changes genre="classic".
The results of the failure are as follows:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.IllegalArgumentException:
at com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl.(DurationImpl.java:519)
at com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl.(DurationDayTimeImpl.java:106)
at com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.newDurationDayTime(DatatypeFactoryImpl.java:362)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.parseTime(SearchHandle.java:1615)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleMetrics(SearchHandle.java:1550)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleTop(SearchHandle.java:1140)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.collectTop(SearchHandle.java:1169)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleResponse(SearchHandle.java:1157)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.handleTop(SearchHandle.java:1130)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.parse(SearchHandle.java:1098)
at com.marklogic.client.io.SearchHandle$SearchResponseImpl.access$100(SearchHandle.java:1061)
at com.marklogic.client.io.SearchHandle.receiveContent(SearchHandle.java:158)
at com.marklogic.client.io.SearchHandle.receiveContent(SearchHandle.java:82)
at com.marklogic.client.impl.OkHttpServices.search(OkHttpServices.java:2062)
at com.marklogic.client.impl.QueryManagerImpl.search(QueryManagerImpl.java:175)
at com.marklogic.client.impl.QueryManagerImpl.search(QueryManagerImpl.java:139)
at com.mlu.app.App.runSearch(App.java:52)
at com.mlu.app.App.main(App.java:26)
mlu-test.zip
struct-query-options.zip
top-songs-config.zip
top-songs-server-config.zip
top-songs.zip

Sorry, I lost this. Will try it out in the coming week and check. Thanks

Any more info on this? Thanks much!

@anu3990 , when you both have some time for a more extended investigation, please take a look at reproducing the issue with the zipfiles that Alan provided.  Feel free to talk to Akshay or myself to get an overview of what the setup is doing or if you run into any difficulties with the setup. Thanks.

Test added.
@Test
  public void testAndNotQuery() throws KeyManagementException, NoSuchAlgorithmException, IOException, ParserConfigurationException, SAXException, XpathException,
      TransformerException
  {
    System.out.println("Running testAndNotQuery");

    String[] filenames = { "constraint1.xml", "constraint2.xml", "constraint3.xml", "constraint4.xml", "constraint5.xml" };
    String queryOptionName = "valueConstraintWildCardOpt.xml";

    DatabaseClient client = getDatabaseClient("rest-admin", "x", getConnType());

    // set query option validation to true
    ServerConfigurationManager srvMgr = client.newServerConfigManager();
    srvMgr.readConfiguration();
    srvMgr.setQueryOptionValidation(true);
    srvMgr.writeConfiguration();

    // write docs
    for (String filename : filenames) {
      writeDocumentUsingInputStreamHandle(client, filename, "/structured-query-andnot/", "XML");
    }

    setQueryOption(client, queryOptionName);
    QueryManager queryMgr = client.newQueryManager();

    // create query def
    StructuredQueryBuilder qb = queryMgr.newStructuredQueryBuilder(queryOptionName);
    StructuredQueryDefinition termQuery1 = qb.term("Atlantic");
    StructuredQueryDefinition termQuery2 = qb.term("Monthly");
    StructuredQueryDefinition termQuery3 = qb.term("Bush");
    StructuredQueryDefinition andQuery = qb.and(termQuery1, termQuery2);
    StructuredQueryDefinition andNotFinalQuery = qb.andNot(andQuery, termQuery3);

    // create handle
    DOMHandle resultsHandle = new DOMHandle();
    queryMgr.search(andNotFinalQuery, resultsHandle);

    // get the result
    Document resultDoc = resultsHandle.get();
    System.out.println(convertXMLDocumentToString(resultDoc));

    assertXpathEvaluatesTo("1", "string(//*[local-name()='result'][last()]//@*[local-name()='index'])", resultDoc);
    assertXpathEvaluatesTo("0113", "string(//*[local-name()='result']//*[local-name()='id'])", resultDoc);

    // To test Git issue 908
    StructuredQueryDefinition termQuery11 = qb.term("Pacific");
    StructuredQueryDefinition termQuery21 = qb.term("Yearly");
    StructuredQueryDefinition termQuery31 = qb.term("DT");
    StructuredQueryDefinition andQuery1 = qb.and(termQuery11, termQuery21);
    StructuredQueryDefinition andNotFinalQuery1 = qb.andNot(andQuery1, termQuery31);
    SearchHandle results = null;
    StringBuilder searchHandleEx = new StringBuilder();
    try {
     results = queryMgr.search(andNotFinalQuery1, new SearchHandle());
    }
    catch (Exception ex) {
    	searchHandleEx.append(ex);
    }
    long res = results.getTotalResults();
    System.out.println("No query results available. Total Results should be zero: " + res);
    assertTrue("Exception should not have been thrown when no query results are available", searchHandleEx.toString().isEmpty());
    assertEquals("No query results available. Should be zero.", 0, res);

    // release client
    client.release();
  }


Suggestion to improve 'map' block in makecode IDE

The current map block is really a great tool but it can be improved. check the following image and let me know if this is the right place to submit such request.

What is the new set angle parameter and what is it for?


Manage Final/Virtual for Method

In PHP, methods are virtual by default, but they can be made final.
Introducing Method#makeFinal and Method#removeFinal methods is a good way to manage it.

:+1:

Done.


energy_probe.py send wrong signal to caiman for ARM energy probe

Hi,
caiman don't register signal handler for SIGTERM but SIGINT, on the other hand energy_probe.py sends signal SIGTERM so eventually caiman don't receive signal and call function sigintHandler().
So I modify devlib code like below, but not sure if it's the correct way; or need change caiman code to handle SIGTERM signal as well.
diff --git a/devlib/instrument/energy_probe.py b/devlib/instrument/energy_probe.py
index 54ce8de..232a453 100644
--- a/devlib/instrument/energy_probe.py
+++ b/devlib/instrument/energy_probe.py
@@ -82,7 +82,7 @@ class EnergyProbeInstrument(Instrument):
                                         shell=True)

     def stop(self):
-        os.killpg(self.process.pid, signal.SIGTERM)
+        os.killpg(self.process.pid, signal.SIGINT)

     def get_data(self, outfile):  # pylint: disable=R0914
         all_channels = [c.label for c in self.list_channels()]

Fixed by https://github.com/ARM-software/devlib/commit/a48775ec5a28c178e0986232f37b8ebb800479ba


 Also, are all alertmanager pods failing their liveness probes or just one?

only one fail.
env:
master01: alertmanager is faild
master02: alertmanager is success
node01:  alertmanager is success
logs:
kubectl logs alertmanager-main-2 -n monitoring
 Error from server (BadRequest): a container name must be specified for pod alertmanager-main-2, choose one of: [alertmanager config-reloader]

"alertmanager" container logs:
kubectl logs alertmanager-main-2 -c alertmanager -n monitoring
level=info ts=2019-04-01T01:11:04.635447093Z caller=main.go:174 msg="Starting Alertmanager" version="(version=0.15.0, branch=HEAD, revision=462c969d85cf1a473587754d55e4a3c4a2abc63c)"
level=info ts=2019-04-01T01:11:04.635613399Z caller=main.go:175 build_context="(go=go1.10.3, user=root@bec9939eb862, date=20180622-11:58:41)"
"config-reloader" container logs:
kubectl logs alertmanager-main-2 -c config-reloader -n monitoring

"config-reloader" container didn't have logs

@guoyingying12 can you please post the logs from your failing alertmanager pod? Also, are all alertmanager pods failing their liveness probes or just one?

hi~
only one fail.
env:
master01: alertmanager is faild
master02: alertmanager is success
node01: alertmanager is success
logs:
kubectl logs alertmanager-main-2 -n monitoring
Error from server (BadRequest): a container name must be specified for pod alertmanager-main-2, choose one of: [alertmanager config-reloader]
"alertmanager" container logs:
kubectl logs alertmanager-main-2 -c alertmanager -n monitoring
level=info ts=2019-04-01T01:11:04.635447093Z caller=main.go:174 msg="Starting Alertmanager" version="(version=0.15.0, branch=HEAD, revision=462c969d85cf1a473587754d55e4a3c4a2abc63c)"
level=info ts=2019-04-01T01:11:04.635613399Z caller=main.go:175 build_context="(go=go1.10.3, user=root@bec9939eb862, date=20180622-11:58:41)"
"config-reloader" container didn't have logs
kubectl logs alertmanager-main-2 -c config-reloader -n monitoring

Could you please make sure to update to latest versions of everything? I would like to avoid situations where the inability to create the gossip mesh caused the process to go out of ready state.

Could you please make sure to update to latest versions of everything? I would like to avoid situations where the inability to create the gossip mesh caused the process to go out of ready state.

hi~
kubernetes  1.11.1
prometheus 0.23.2

That’s not latest, v0.29.0 is latest of the Prometheus Operator, and v0.16.1 is latest of Alertmanager.

Did that solve your issue?

No,I want to solve the reinstallation problem by another way.


Implement Trigger.Spec.DeliverySpec

Fixes #578
I'd wait for an E2E test from the eventing repository.

Proposed Changes

Implement Trigger.Spec.DeliverySpec

Release Note

:gift: Add support for Trigger.Spec.DeliverySpec

/kind enhancement

/hold

It needs lgtm tho.
/unhold

/lgtm
/approve

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

A PR in eventing breaks a test https://github.com/knative/eventing/pull/4843

This should fix it https://github.com/knative-sandbox/eventing-kafka-broker/pull/627

/test pull-knative-sandbox-eventing-kafka-broker-integration-tests

/retest


Unclear what extras to install: import nni.retiarii.execution.api fails due to missing pytorch_lightning

Describe the issue:
I want to use nni.retiarii.execution.api module. I've installed it as below:
Collecting nni>=2.3
  Downloading nni-2.9-py3-none-manylinux1_x86_64.whl (56.0 MB)

Environment:

NNI version: 2.9
Python version: 3.8

Log message:
_________________ ERROR collecting test/3rd_party/test_nni.py __________________
ImportError while importing test module '/__w/ai4cl-tianshou/ai4cl-tianshou/test/3rd_party/test_nni.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test/3rd_party/test_nni.py:8: in <module>
    import nni.retiarii.execution.api
/usr/local/lib/python3.8/site-packages/nni/retiarii/__init__.py:4: in <module>
    from .operation import Operation
/usr/local/lib/python3.8/site-packages/nni/retiarii/operation.py:6: in <module>
    from nni.nas.execution.common.graph_op import *
/usr/local/lib/python3.8/site-packages/nni/nas/__init__.py:4: in <module>
    from .execution import *
/usr/local/lib/python3.8/site-packages/nni/nas/execution/__init__.py:4: in <module>
    from .api import *
/usr/local/lib/python3.8/site-packages/nni/nas/execution/api.py:9: in <module>
    from nni.nas.execution.common import (
/usr/local/lib/python3.8/site-packages/nni/nas/execution/common/__init__.py:4: in <module>
    from .engine import *
/usr/local/lib/python3.8/site-packages/nni/nas/execution/common/engine.py:7: in <module>
    from .graph import Model, MetricData
/usr/local/lib/python3.8/site-packages/nni/nas/execution/common/graph.py:18: in <module>
    from nni.nas.evaluator import Evaluator
/usr/local/lib/python3.8/site-packages/nni/nas/evaluator/__init__.py:9: in <module>
    shortcut_framework(__name__)
/usr/local/lib/python3.8/site-packages/nni/common/framework.py:93: in shortcut_framework
    shortcut_module(current, '.' + get_default_framework(), current)
/usr/local/lib/python3.8/site-packages/nni/common/framework.py:83: in shortcut_module
    mod = importlib.import_module(target, package)
/usr/local/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
/usr/local/lib/python3.8/site-packages/nni/nas/evaluator/pytorch/__init__.py:4: in <module>
    from .lightning import *
/usr/local/lib/python3.8/site-packages/nni/nas/evaluator/pytorch/lightning.py:10: in <module>
    import pytorch_lightning as pl
E   ModuleNotFoundError: No module named 'pytorch_lightning'

How to reproduce it?:
pip install nni==2.9
python -c "import nni.retiarii.execution.api"

Try this:
import nni
nni.set_default_framework('none')

This will remove the default behavior to import pytorch-related dependencies.

this would already help, but how to install pytorch dependencies? I work with pytorch (but not pytorch lightning). Also maybe this should be default, it was confusing to me as a new user.

That's a good suggestion. Will try to improve that in next iteration.


Using a cutesy uname-r-boot2docker name for the boot2docker kernel breaks dkms

Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 4.4.17-boot2docker cannot be found.
Please install the linux-headers-4.4.17-boot2docker package,
or use the --kernelsourcedir option to tell DKMS where it's located
...failed!
(Failed, trying without DKMS)

any updates on this? I have same problem

Same here 😢
Where do we find the relevant kernel source code? We can get the headers from there.
AFASIK It should be open-source according to the GPL license

https://github.com/boot2docker/boot2docker/blob/e99ccc028a117cdc2d4717f3e5f5cba0fb9cece3/Dockerfile#L180-L224

@tianon thanks! This helped me progress a lot!


port changes from arangodb/velocypack

Scope & Purpose
Use the latest state from arangodb/velocypack

[x] Bug-Fix for devel-branch (i.e. no need for backports?)
[x] The behavior change can be verified via automatic tests

Testing & Verification
This change is already covered by existing tests, such as all tests.
Additionally:

[x] There are tests in an external testing repository (i.e. arangodb/velocypack)
[x] I ensured this code runs with ASan / TSan or other static verification tools

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/10355/

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/10359/

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/10385/

Tests blue


Preview Ideal Dialogue Length in the Editor

Is your feature request related to a problem? Please describe.
There's a limit to the amount of text a dialogue balloon can display without resizing the text or the balloon itself. For many games, limiting the length of the dialogue text in the dialogue editor would be a convenient way to avoid these sorts of compromises.
Describe the solution you'd like
Some sort of option to visualize whether a given line of dialogue has gone over a character limit (or some other equivalent metric of the length of a line).
This could be achieved by turning the excess characters red, but there are several reasons not to do it this way. For one, even within a single game various dialogue balloons may be able to handle various quantities of text. Some individual lines of dialogue may even be displayed differently (for example, one dramatic line of dialogue might be centered and in a larger font for emphasis.)
I think the least obtrusive option would be or simply putting a small guide line in the background for the writer to keep to the left of.

If multiple target lengths are needed for the project, it's as simple as adding an entry to an array of lengths and adding an additional guideline to the background. Each line could be toggled on and off as desired. Perhaps even named to help keep track of which is which.

Describe alternatives you've considered
Any other solutions I've thought of risk limiting the utility or predictability of the plugin (such as turning the excess text red, or making the dialogue manager treat excess text as a new line of dialogue automatically).
Additional context
There are still difficulties to consider here.

How would this work when wrapping text in the editor?
Is a character limit even the best way to determine the amount of space text will take up? ("llllll" and "MMMMMM" are the same number of characters, for example.)
What about screen sizes/editor zoom levels/etc.?
Most importantly, how would this work with character names of various lengths, which are visible on a separate label and don't contribute to the overall length of the line in-game? Adjusting the position of the guideline for every line of dialogue to account for this could quickly become visual noise.

Regardless, I believe keeping track of the length of dialogue lines is a worthwhile feature to consider, even if this proposal doesn't quite solve it.

Thanks for the suggestion but I'm not likely to add an ideal length indicator - mainly because there's no way to guarantee any meaningful accuracy.

Makes sense. Thanks for considering!


Add socket_connect_timeout option.

This allows you to specify the connection timeout for the stream; note that once the stream is connected the existing code performs stream.setTimeout(0) thereby preventing this patch triggering an idle timeout on an established connection. (This is also why I called it socket_connect_timeout rather than simply socket_timeout.)
I added this.stream.setTimeout to install_stream_listeners as it seemed the DRY-est place to put it since it is called for all streams just after they're created. If this is not the right place, please let me know.

@bengl LGTM would you please rebase and add some tests?

by @bengl you mean @benjie right? :smile:

@bengl ups sorry for bringing you up :D
And yes, I meant @benjie

:laughing: thanks @bengl :)
@BridgeAR I'm not sure how I'd write a test for this

Rebased :)

@benjie shouldn't it be enough if you just manipulate the socket timeout with the parameter? What you want to reach is to have a individual timeout instead of the system one, so everything else should stay the same?
And a test could be written by checking the system timeout (use a before, create a client that can't connect and check for the timeout and safe that value). Now you can increase or decrease that value as you want and do the same again and check that the timeout triggered at another time.

What endpoint should I use that it times out connecting to? I think a closed port won't do because it'll just drop the connection immediately (no chance for a timeout) so it'd need to be one that drops the packets. Adding an iptables filter would make the test platform dependent; is there a cross-platform /dev/null equivalent for TCP?

(debug() change implemented)

You could mock the stream :)
Google just gave me this: https://gist.github.com/mjackson/1201196

@benjie I used your work to use the connection_timeout as socket timeout if explicitly provided and mentioned you in the changelog. That way we do not have to add another option and most people thought the connection timeout would also set a socket timeout.
Thx a lot for your help!

Thanks @BridgeAR; sorry I didn't get around to writing the tests yet but your solution's probably better anyway! :smile:

Hey @BridgeAR; I think your fix serves a different purpose to my PR - I want the connection attempt to fail, be closed, and then attempt again in a much tighter loop than the OS default (like every 30 seconds rather than 180); whereas connect_timeout stops attempting to reconnect meaning we remain disconnected forever. There may still be value in this PR

This should really be reopened

@benjie thanks for pointing this out and sorry for not understanding your original issue properly right away.
There seems to be a new PR to do the same: https://github.com/NodeRedis/node_redis/pull/1430

No problem :)


[SDK] Resolve diamond pattern facets abi

Problem solved
Fetch and merge ABIs for facets (extensions) of diamond pattern contracts

/release-pr

/release-pr

/release-pr


refactor(cli): replacing mow.cli with cobra for daemon

Description
In this PR, mow.cli is replaced with cobra for the daemon CLI.
The functionalities and commands remain the same.
Related issue(s)

Related to #288

@kehiy Thanks


Gracefully handle different x-version-id being reported

Summary
Currently with the special deployment of community the app can become unusable and is totally unresponsive.
What cause this behavior is that community deployment uses different pods to provide HA as for some reason it reports the x-version-id with different hashes, this was causing the app to detect a "new" version and to update the config & license in a constant loop blocking the UI.
In this PR we made a few changes in behavior, first of all the server version being recorded is only the semantic version, so they'll always be the same as long as the server is not upgraded. Apart from this, whenever we receive a new config or license we are executing a deep comparison with the value that we currently have in the store to determine if it needs to be updated or not.
The config & license are being updated in the following scenarios:

When the user pings the server in the select server screen
When the user logs in
On app launch for an already logged in user
When the WebSocket receives an License or Config change event
When the WS reconnects after a period of inactivity
When the reliable WS sends the missing event for config or license change after a reconnection.

Ticket Link
N/A
Checklist

[x] Added or updated unit tests (required for all new features)

Release Note
NONE

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/20035
https://circleci.com/gh/mattermost/mattermost-mobile/20034

Artifact links:
https://20035-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.ipa
https://20034-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.apk

@enahum I'm unable to connect to any server at all. I tried the community servers and a bunch of test servers and the connect view just hangs in there with spinner on the Connecting... button

@josephbaylon android and ios or only ios?

@josephbaylon android and ios or only ios?

@enahum On both android and ios for me.

@josephbaylon android and ios or only ios?

@enahum On both android and ios for me.

Cool, I'll check it out first thing in the morning

Great stuff Elias!

@josephbaylon should be fixed, had an error in a line of code

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/20041
https://circleci.com/gh/mattermost/mattermost-mobile/20040

Artifact links:
https://20041-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.apk
https://20040-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.ipa

Initial testing looks good on Android and iOS. Will wait for the random hash server from Agniva and test against that before I approve

Sorry for the delay, here's the PR: https://github.com/mattermost/mattermost-server/pull/19509

Cherry pick is scheduled.


ACL in haproxy not created correctly when an ingress has a single host rule

Version 5.0.0.rc11
Create an ingress like this one:
apiVersion: voyager.appscode.com/v1beta1
kind: Ingress
metadata:
  name: api-ingress
  annotations:
    ingress.appscode.com/type: NodePort
    ingress.appscode.com/keep-source-ip: "true"
    # Configure depending on the load
    ingress.appscode.com/replicas: '1'
    ingress.kubernetes.io/rewrite-target: /
    # HSTS
    ingress.kubernetes.io/hsts: "true"
    ingress.kubernetes.io/hsts-preload: "true"
    ingress.kubernetes.io/hsts-include-subdomains: "true"
    ingress.kubernetes.io/hsts-max-age: 100
    ingress.appscode.com/default-options: '{"forwardfor": "true", "dontlognull": "true"}'
spec:
  tls:
  - hosts:
    - test1.example.com
    ref:
      kind: Certificate
      name: examplecert
  rules:
  - host: test1.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: monitoring-grafana.kube-system
          servicePort: '80'

No default backend, only one host rule. The generated frontend for HTTP looks like this:
frontend http-0_0_0_0-80
	bind *:80
	mode http
	option httplog
	option forwardfor
	acl is_proxy_https hdr(X-Forwarded-Proto) https
	acl url_acl_test1.example.com__ path_beg /
	redirect scheme https code 301 if ! is_proxy_https host_acl_test1.example.com url_acl_test1.example.com__

And of course the pod fails like this:

daemon.err: Jan 12 10:56:01 reloader:  [ALERT] 011/105601 (51) : parsing [/etc/haproxy/haproxy.cfg:36] : error detected in frontend 'http-0_0_0_0-80' while parsing redirect rule : error in condition: no such ACL : 'host_acl_test1.example.com'.
daemon.err: Jan 12 10:56:01 reloader: [ALERT] 011/105601 (51) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
daemon.err: Jan 12 10:56:01 reloader: [ALERT] 011/105601 (51) : Fatal errors found in configuration.

The HTTPS frontend, instead, has the acl as it should be. Creating more than one host rules triggers the creation of the missing ACL for all HTTP frontends.
The bug is indeed when having only one host rule and no default backend.

This was fixed in https://github.com/appscode/voyager/pull/786 , as part of other fixes.
We also tried with the master branch and the host_acl was working correctly.

Yes, that was my impression as well. Good job!


How to fit emqx_kafka_bridge for EMQ X 3.2?

I also want to know

hi 能否指导给个思路？

hi 能否指导给个思路？

see this :https://github.com/cshlxm/emqx_kafka_bridge


Migrate TestFilter to use lazy properties

I've triggered the following builds:

Pull Request Feedback (Trigger) (Check)

Build Scan

The following builds have failed:

Pull Request Feedback (Trigger) (Check)

Build Scan


File explorer freezes | unable to open/close files | on close message "Discarding backups is taking a bit longer"

#154085 is closed, but the bug is not fixed.
Version: 1.70.2
Commit: https://github.com/microsoft/vscode/commit/e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:36:25.715Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 5.15.0-46-generic
This bug has rendered VSCode nearly impossible to use. After some time, all active instances of the application will cease reading/writing files and the only way to restore function is to kill the application in such a way that no backups are provided anyway. Is there any way to completely disable this backups feature? It is presently counter-productive.

Does the information at https://code.visualstudio.com/docs/editor/codebasics#_hot-exit  help?

Anything special about the setup? Like network drives, remote drives, remote extensions?

@bpasero Nothing special.  Local drives only, and only syntax-highlighting extensions.
@gjsjohnmurray I already have hot exit disabled.  I suspect the message about backups may be a red herring--since no files will open or save during this behavior, it could be that a routine check for backups hangs indefinitely, even if there are none.
The only thing that seems to reduce the frequency of the bug occurring is to regularly clear the recent file history.  I also tried to keep this history from being tracked, hoping to band-aid the issue, but to no avail.

Are you opening plain text files or custom editors / notebooks?

Plain text.

After some time, all active instances of the application will cease reading/writing files

This sounds to me as if something goes wrong already before you close VSCode, i.e. if you use VSCode long enough and maybe some condition happens that we still have to figure out, things get so slow that files can no longer read or write, is that accurate?

I have the same issue, at least the symptoms are similar. Same for stable as well as insiders (Version: 1.70.2 https://github.com/microsoft/vscode/commit/e4503b30fc78200f846c62cf8091b76ff5547662 )
Arch Linux. Local drives only.
I've had this happening since start of August (on VSCode 1.69).
Starting vscode with --disable-extensions makes no difference. Deleting ~/.vscode (the dir where the extensions are in i think) makes no difference. Deleting ~/.config/Code fixes it for me. But after a while it starts happening again.
I tried to look into the logs a bit but I didn't see anything interesting except this:
[785472:0811/150324.207081:INFO:CONSOLE(602)] "%c WARN color: #993 [lifecycle] onBeforeShutdown is taking a long time, pending operations: veto.backups",
source: vscode-[file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js](file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js) (602)

I think I also saw some other tasks hang during exit at one point but I can't reproduce that now.
Note that it's not just that it hangs for a while, but it just never finishes, even after keeping it running for 10 minutes. And it suddenly starts happening, it doesn't progressively get worse over time.

Deleting ~/.config/Code/Backups doesn't fix it.
Deleting ~/.config/Code/User fixes it. Deleting just ~/.config/Code/User/workspaceStorage doesn't fix it. (that way it reopens the previous workspaces but loses the file state in them)
Deleting just ~/.config/Code/User/globalStorage fixes it (that way it doesn't reopen the previous workspaces, but it does restore the file state when manually opening the previous work spaces).

Yeah please everyone figure out if this reproduces when only working locally on a local folder without remote and without network drives or exotic setups on VSCode for desktop (not web).

welp, now my VSCode just doesn't start at all anymore even If I delete Code/User
I just get this pretty empty window.

It is not really advised to tamper with the data in that folder, but you should always be able to start VSCode when you pass in a different folder for user data via the --user-data-dir command line argument.

My setup does not have and has never had any remote/non-local drives, folders, extensions, terminals, or anything of the sort.
If a single session of VSCode is running, eventually it will experience this bug.  If I open two sessions simultaneously and open a folder in the second one, it will immediately cause the bug in both sessions.  Specifically the second session--if I open a folder in the first session, neither session has a problem.  Also specifically a folder--opening single files in both sessions does not cause any issue.  It can be any folder--the presence or absence of a Git repo, for example, makes no difference; nor does it matter on which (local, physically and independently part of the machine) drive the folder is located.

@eahenle thanks for clarifying, but to confirm: VSCode is getting slower and slower even during the session when opening, closing, writing, reading files right? So the "Discarding backups is taking a bit longer" dialog is a symptom of that slowness, not the reason?

The file explorer tab will show the blue bar animation as though it is loading something, and files will not open or save.

Ok thanks, so this issue is not about backups on exit, this is about access to the filesystem getting to a point where nothing executes anymore in a timely manner.
Is there anything happening in the OS or maybe other apps at this point that could explain it?

And what Linux distro is this?

file explorer tab will show the blue bar animation as though it is loading something

I still don't know if my issue is the same as the OP, but for me it's the same. File opening, saving, closing stop working and the blue bar keeps spinning. It can't be related to the actual file system performance because everything except VScode continues working fine, and it immediately stops happening after removing the globalStorage dir and restarting VSCode (and starts happening again when restoring it).

Ubuntu 22.04.1 64-bit
No apps or OS operations going on at the same time; I can repeatedly trigger the error by opening a folder in a second VSCode window immediately after a restart and/or with no other programs running.  Checking the process monitor to verify this reveals multiple code processes running after closing all sessions:

These will accumulate until killed manually or on logout.
Unlike @phiresky, renaming globalStorage has no effect for me, although I share the observation that no other program running concurrently with VSCode has any disk access issues.

Ok, I suggest both of you to collect and send me logs (mail is fine) from a session where things get slow. You can run a command in VSCode "Open Logs Folder" and zip it and send it to me.

@eahenle thanks, I checked your logs, they really look normal, I could not find anything that points to an actual issue.
Is there any chance other applications might also suffer from slow down, or is it limited to VSCode?

Upper left, red annotations: VSCode "busy" trying indefinitely to open a file.  Note that even the title bar of the window has not updated to show that the file in focus has changed.
Right, green annotations: The system showing no sign of slowdown while simultaneously running a process that involves frequent disk I/O and lots of linear algebra.
(also, updated VSCode to 1.71 yesterday; no change)

Two more things to try:

does it reproduce when you run code --disable-extensions (all extensions disabled)
can you create a performance trace when this happens: https://github.com/Microsoft/vscode/wiki/Performance-Issues

--disable-extensions does not change the behavior.
code --status output during freeze:
[181029:0907/104128.986356:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[181066:0907/104129.282028:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
Version:          Code 1.71.0 (784b0177c56c607789f9638da7b6bf3230d47a8c, 2022-09-01T07:25:10.472Z)
OS Version:       Linux x64 5.15.0-47-generic
CPUs:             Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz (48 x 2200)
Memory (System):  187.52GB (182.18GB free)
Load (avg):       1, 1, 0
VM:               0%
Screen Reader:    no
Process Argv:     --disable-extensions --crash-reporter-id ddcde8c2-5546-4526-9316-2c826f968010
GPU Status:       2d_canvas:                              enabled
canvas_oop_rasterization:               disabled_off
direct_rendering_display_compositor:    disabled_off_ok
gpu_compositing:                        enabled
multiple_raster_threads:                enabled_on
opengl:                                 enabled_on
rasterization:                          enabled
raw_draw:                               disabled_off_ok
skia_renderer:                          enabled_on
video_decode:                           disabled_software
video_encode:                           disabled_software
vulkan:                                 disabled_off
webgl:                                  enabled
webgl2:                                 enabled
webgpu:                                 disabled_off
CPU %	Mem MB	   PID	Process
0	     0	180460	code main
0	     0	180463	   zygote
0	     0	180497	     gpu-process
0	     0	180507	       broker
0	     0	180464	   zygote
0	     0	180466	     zygote
0	     0	180503	   utility-network-service
0	   192	180526	   window (README.md - charge_prediction - Visual Studio Code)
0	     0	180610	   shared-process
0	     0	180628	     ptyHost
0	     0	180947	       /usr/bin/bash --init-file /usr/share/code/resources/app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh
0	     0	180736	     fileWatcher
0	     0	180899	     fileWatcher
0	     0	180723	   extensionHost
0	     0	180754	     /usr/share/code/code --ms-enable-electron-run-as-node /usr/share/code/resources/app/extensions/markdown-language-features/server/dist/node/main --node-ipc --clientProcessId=180723
0	   192	180804	   window (nervous-system - Visual Studio Code)
0	     0	180885	   extensionHost
Workspace Stats:
|  Window (nervous-system - Visual Studio Code)
|  Window (README.md - charge_prediction - Visual Studio Code)
|    Folder (nervous-system): 19 files
|      File types: jl(6) h(3) cpp(2) sh(2) gitignore(1) ino(1)
|      Conf files:
|    Folder (charge_prediction): 9 files
|      File types: cif(2) gitignore(1) md(1) jl(1)
|      Conf files:

Thanks, unfortunately I am out of ideas.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!

Same issue just hit me again. I have three repos open, all local.  It started happening right after I installed this extension. But now it happens reliably every time after I open VSCode even after uninstalling the extension AND starting vscode with --disable-extensions and reloading one of the windows once. All file operations just start hanging forever

I apt purged VSCode, deleted every file and folder related to the application I could find, rebooted, and reinstalled, and the problem persists... so I'm starting to believe it does have something to do with another app or service on the machine (well, Code not playing nicely with it, anyway).
No idea what, though.  I've just resigned myself to only having one workspace on this machine, despite it being the most powerful thing I have access to 🤨

I also have an issue like this. After some time or sometimes immediately, creating, saving, and opening files takes upwards of 20 seconds. It's been a problem for me on a variety of different Windows, Linux, macOS, and VS Code versions. This issue could possibly be related to a drive I use that occasionally performs terribly, likely due to the USB enclosure it's in, but this happens when editing on other drives as well.

A few months ago, the same thing happened to my VSCode. So I switched to insiders build, but after a few months, now the same thing happens to VSCode insiders too! It's really annoying every time closing VSCode or switching to a different project, keep wasting my precious time. It actually makes VSCode totally unusable. Can't believe they didn't fix it yet!

Can't believe they didn't fix it yet!

@rico345100 if you have a repro of your problem please use the instructions at https://github.com/microsoft/vscode/wiki/Performance-Issues to open a new issue with repro steps.


Measure history

Some preliminary changes from new code review.

Spent a lot time of time reviewing these changes with Lizzie in person.  I agree with all of them.


fixed integer types

fixed integer types so these reflect the types used by the libraries; nchannels, buffersize, slength and sampleRate

thanks, merging now


Documentation proofreading

I reviewed all the .mdx files in docs/, as well as the .md. files at the root.

Thank you Florian, that's awesome.
@AurelienLourot Should I merge or do you want to check for conflicts with your PR first?
@FlorianCassayre Feel free to DM me/us on Discord (if you want) :)

Thanks a lot @FlorianCassayre
@brillout merging now. I'll just solve potential conflicts in #1206 afterwards


Add character name

Below corresponding health bars should be the character name.  Player One name should be aligned on the left side and player two name should be aligned on the right side

Done!


Can jitsi compile and run in mac environment?

Can jitsi compile and run in mac environment? I get error java.lang.UnsatisfiedLinkError after launching in idea: net.java.sip.communicator.util.launchutils.AEGetURLEventHandler.setAEGetURLListener

Yes it can. This is an jvm agent binary that needs to be in special path when running and that is taken care of the info.plist file when dmg is created and used.
Please use the community forum before opening new issues.


Password protected rooms

Issue: Enhancing Room Security in Mirage
As part of our ongoing improvements during Hacktoberfest, we’re focusing on enhancing the security of rooms in Mirage.
Currently, all rooms in Mirage are public, meaning anyone can join without restrictions. We’ve initiated encryption, which is in its early stages but is functioning well. Our goal is to improve this system for better security.
Key Objectives:

Password Management:

When creating a room, users should have the option to set a password. If no password is provided, the room will remain accessible to everyone.
For password-protected rooms, a popup should appear when users attempt to join. This popup will prompt for a password, which will be sent to the server for validation.

Server-side Encryption:

Passwords must be securely stored on the server, encrypted within the rooms.json file, alongside other room data.

Additional Opportunities:

Separate Encryption Keys: Implement distinct encryption keys for private rooms while maintaining a common key for public rooms.

Implementation Hints:

Room Creation with Password Option:

Modify the Room Creation UI: Add an input field for the password in the room creation form. Ensure that this field is optional.
Server-side Logic: Update the server code to check for a password and encrypt it before storing it in the rooms.json file.

Joining Password-Protected Rooms:

Implement Popup for Password Entry: Display a modal to prompt the user for a password when trying to join a password-protected room.
Password Verification: Send the entered password to the server for validation against the stored encrypted password.

Server-side Encryption:

Store Passwords Securely: Use a secure hashing algorithm (e.g., bcrypt) to hash passwords before saving them.
Encryption Key Management: Manage different encryption keys for private and public rooms securely.

User Experience:

Error Handling: Ensure clear error messages (e.g., incorrect password) are provided to users.

If you're interested in taking on this challenge, please comment below! I’d be delighted to assign it to you.

@KorryKatti I have experience working with flask and django can you plz assign this to me

@KorryKatti I have experience working with flask and django can you plz assign this to me

The server uses socketio not flask , so would this be ok with you ?

or you could wait for the flask server to open ( planning on making a separate server which will use flask-socketio while keeping this one intact )

I can work on this, I have experience with socketio.

I can work on this, I have experience with socketio.

sounds cool , will assign you

Alright will give you an update as soon as I have one!!

Hello!
I would like to share some progress regarding this issue.
I have managed to incorporate the following from key objectives:

[x] Password Management
[x] Server Side Encryption

You can check the attached files!!
Creating a Room

Failed Login

Successful Login

From my side I have tested most of the cases but would like another set of hands to review since there are somethings I am not sure of. I will make a PR once you approve for the same.
(PS Ignore the password in users list, I have managed to fix that just now!)
Thanks and Happy Hacking!!

@nub-rin looks cool , please do make a pr if you feel the code is done

Alright!

finished with #41


feat(@schematics/angular): add sideEffects:false to library package.json

PR Checklist

[x] The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
This PR is related to #24122. It introduces the sideEffects: false flag to the package.json of libraries generated with ng generate library.
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@fischeversenker, thanks for this but you share not signed a CLA.
For more information please see: https://github.com/angular/angular-cli/pull/24132/checks?check_run_id=9089809374

Thanks, I missed that. I added the CLA now.


More gen 24 - for discussion- delegating reducer cases to functions

So making an object or map that holds the parts of the reducer really doesn't play nice with flow. There's a bunch of issues on their github about it and it seems just not possible at this time.
So:
Currently the switch does work and it does refine the type so the action/payload is figured out but when you do something like
case BlahGen.myAction:
const {myData} = action.payload
return {...state, blah}

myData now leaks into the rest of the switch case and flow isn't smart about this
So ideally we'd have individual closures for this (in a map or something)
So, to maximize flow coverage and not make too much boilerplate this is a possible solution. We still have the switch but we just call a closure, we can type it like (state, action) and flow will know the typing correctly.
This is kinda verbose, but this is very explicit and fixes these problems.
We don't have to merge this, its just to discuss. I applied it to dev (just to test the flow typing) and to chat (to see what its like at the worst)
@keybase/react-hackers comments please

also note this is the last of this series of refactors! (this or 23)

This pr was for discussion. We should decide if we like this pattern or not. If so i can remake it against the merged prs (1-21 and 22, 23). if not we'll just ditch it


"SHCL doesn't fork" - discussion

Hi,
I'm not sure whether the "SHCL doesn't fork" will work in practice.
How would you get $$ and $PPID correct? A shell script that does
(echo $$ > logfile ; exec long-running-process ) &
...
kill $(cat logfile)

would kill the whole SHCL process, and not just the child.
Even if $$ and $PPID got faked in a subshell, forking would be inevitable as soon as external commands are being called; and investigating the sub-shell command line to find out whether to fork or not feels quite unclean, too.
So I ask you to discuss for and against forking.
Thank you!

First off, thanks for the interest in my weird little project.
As for $$ and $PPID, I actually think non-forking is okay.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_02

$
Expands to the decimal process ID of the invoked shell. In a subshell (see Shell Execution Environment ), '$' shall expand to the same value as that of the current shell.

That's a bit unclear, but when you combine it with this
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03

PPID
Set by the shell to the decimal value of its parent process ID during initialization of the shell. In a subshell (see Shell Execution Environment), PPID shall be set to the same value as that of the parent of the current shell. For example, echo $ PPID and (echo $ PPID) would produce the same value.

Its pretty clear that $$ and $PPID should be unchanged in subshells.  Try it out in your favorite shell!  Bash actually has a different variable where they store the real pid of the current process ($BASHPID).
[brad@Jobe:~]$ sh
sh-4.4$ echo $$ $PPID; (echo $$ $PPID)
31359 31344
31359 31344
sh-4.4$ exit
[brad@Jobe:~]$ echo $BASHPID; (echo $BASHPID)
31344
31438

I'm very concerned that there will eventually be some part of the standard that requires forking, but I haven't found it, yet.  I'm especially nervous about signal handling.  I haven't even looked at that part of the standard yet.  I am almost positive its going to be problematic for a non-forking.
I wrote that "SHCL doesn't fork" bit to scare potential contributors away from mutating the process environment and explain why SHCL has so much complexity in some parts.  SHCL may very well one day support running in a forking mode.  I'm tempted to start investigating it once I finish up my work on the file descriptor table nonsense.  The important thing is that I intend to maintain support for a non-forking mode.  That will be a lot harder if people contribute code that assumes SHCL forks.


opencensus web packages in npm registry

When is the plan to publish opencensus web packages to npm registry?

Good timing on the question! I just created https://github.com/census-instrumentation/opencensus-web/pull/64 that sets up the release docs and tooling. Once that is in I can propose a release and get it approved and published.

This is done now! The packages are on npm at version 0.0.1. I'm planning to update the docs with more info for how to use them from NPM, but the release is out.


[Symfony 7.1] The Symfony\Component\HttpKernel\DependencyInjection\Extension class is considered internal since Symfony 7.1, to be deprecated in 8.1; use Symfony\Component\DependencyInjection\Extension\Extension instead

The "Symfony\Component\HttpKernel\DependencyInjection\Extension" class is considered internal since Symfony 7.1, to be deprecated in 8.1; use Symfony\Component\DependencyInjection\Extension\Extension instead. It may change without further notice. You should not use it from "Http\HttplugBundle\DependencyInjection\HttplugExtension".

thanks for reporting


Bring smacss sort order configuration up to date with scss-lint's

Quoting the lastest comment (@JWess's) in #1166:

... sass-lint is behind scss-lint, as scss-lint has now added the grid properties:
https://github.com/brigade/scss-lint/blob/master/data/property-sort-orders/smacss.txt

I updated the smacss sort order file according to the reference.
What do the changes you have made achieve?
Update smacss sort order to match that of other projects.
Are there any new warning messages?
Shouldn't be – will check out later on.
Have you written tests?
Yes. I updated the tests accordingly, just has it was done the last time we brought smacss.yaml up to date. The tests update are within their own separate commit (a7ce9ae).
Have you included relevant documentation
Deemed irrelevant.
Which issues does this resolve?
#1171 (sort of), once published. I didn't create an issue just for this.

Coverage remained the same at 97.53% when pulling 56fb8a99aa0f9991ccba6d5f5e31a1d94c45ee62 on ccjmne:update-smacss-ordering into 268c93984491d24a21aa9c7976e3b815bd2b3452 on sasstools:develop.

This still hasn't released. Is there an ETA?

:tada: This PR is included in version 1.13.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Move SitesCache invocation out of Site model

Make responsibilities a little clearer and the Site model a little more free-standing by removing any reliance on caching.
Question: what's the best way to shadow static methods with instance methods? Apparently PHP won't let them have the same name.

+1
To answer your question, since PHP doesn't support overloading as other languages do, the way you would make it work as though it did would to access both functions via __call($function, $args) and __callStatic($function, $args) and have it map the call to the true names of these functions. I would use:
public function findInstance($args) {
...
}
public static function findStatic($args) {
...
}
public function __call($function, $args) {
  $function_name = $function . 'Instance';
  return $this->$function_name($args);
}
public static function __callStatic($function, $args) {
  $function_name = $function . 'Static';
  return self::$function_name($args);
}

That being said, it's not great for readability.


[MINOR] remove unused method in UnsafeArrayData

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Can one of the admins verify this patch?


add support for the search_path session parameter

The schema name can be set now with the set session
statement, e.g. set session search_path = schema

@dobe can you please review, it was already previewed by you and haudi by in #4285

Current coverage is 81.21% (diff: 92.10%)

Merging #4316 into master will increase coverage by 0.03%

@@             master      #4316   diff @@
==========================================
  Files          1311       1313     +2
  Lines         44660      44713    +53
  Methods           0          0
  Messages          0          0
  Branches       7115       7124     +9
==========================================
+ Hits          36256      36313    +57
- Misses         5725       5727     +2
+ Partials       2679       2673     -6

Powered by Codecov. Last update c9324a2...537eaf9


Ongoing problems with actions

Although new repos in this org have demonstrated ability to have Actions, we are still having errors on this repo that seem to be beyond the bandframework organization's control.
I have opened up a ticket
https://support.github.com/ticket/personal/0/2347134

Here is the main part of the ticket:
Hello, previously we had a bug in this organization whereby Github Actions was not enable-able.
Github staff were able to find a bug in the backend and as a result, were able to have actions in repositories in repos in this Github organization. However, we are consistently running into problems with the bandframework/bandframework repo, whereby all actions fail on startup. The error messages include:
<EMAIL_ADDRESS>is not allowed to be used in bandframework/bandframework. Actions in this workflow must be: within a repository owned by bandframework or created by GitHub.

and
Error: .github#L1
<EMAIL_ADDRESS>and<EMAIL_ADDRESS>are not allowed to be used in bandframework/bandframework. Actions in this workflow must be: within a repository owned by bandframework or created by GitHub.

We now have one successful action https://github.com/bandframework/bandframework/actions/runs/6387692364

This has now been resolved!
https://github.com/bandframework/bandframework/actions


Added material theme and updated one dark pro

Previous Material theme was One dark Pro.
Added Original Material theme

The screenshot doesn't really explain how the theme looks like

PTAL @jschr

This PR isn't compatible with the updated themes section. Please take a look at the contributing guidelines and re-submit if you'd like to see these changes merged.
Thanks


METRON-1811: Alert Search Fails When Sorting by Alert Status

Contributor Comments
This PR fixes sorting on the alert_status field in the Alerts UI by defining the field in ES templates as a keyword type.  The change was applied to the sensor templates that ship with Metron:  bro, snort and yaf.  This field was added to the Solr schemas as well.
I also updated our documentation to give users guidance when defining their own templates or upgrading their templates.  I expanded this to include other internal fields like source:type and metron_alert.  I did not include dynamic fields but I can add documentation for that here if it makes sense.
Testing
This has been tested in full dev:

Spin up full dev and navigate to the Alerts UI.
Change the status of a couple alerts by opening up their details panel and clicking a different status (OPEN for example).
Sort by alert_status.  The Alerts UI should properly display alerts by alert_status and no errors should be reported in the console.
Enable Solr and verify data is visible in the Alerts UI.  Repeat steps 2 and 3.

Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[x] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[x] Have you included steps or a guide to how the change may be verified and tested manually?

[x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[x] Have you written or updated unit tests and or integration tests to verify your changes?

[x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

@merrimanr Are there any automated tests that could have caught this bug?  Is it possible to add a test for this?

I don't know that a test would have caught this.  The issue is that a UI feature was implemented and added a new field to sensor indices in ES.  This new field was not added to the ES templates but the feature still worked because ES has a very flexible schema.  It was a separate, unrelated operation (sorting on the new field) that exposed a problem.
What do you think?  Is there a way we can catch this kind of thing?  I can add a test that simulates a sort but it would only guard against a field being removed from a template and not added.

I can add a test that simulates a sort but it would only guard against a field being removed from a template and not added.

I agree, let's add that despite the tests limitations as you mentioned.
I ran this up and everything worked great.  Once we knock out that test, I think this is ready to go.

The latest commit changes the SearchIntegrationTest to use the ES templates that ship with Metron.  There are a couple different tests that verify certain fields are defined with the correct types and I made sure the internal fields (including alert_status) are covered.  The one potentially confusing change is that a couple test fields are added to the OOTB ES templates before these tests are run.  This was necessary for the existing tests to continue working without major changes.
I think this should cover it.  Let me know what you think.

+1 Looks great.  I think the test change is well worth it.  Thanks for doing that.


change diaperbase.org to diaper.app

Resolves #517
Description
just quick string fix
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
no need to test string replacement

:100: @4ndrej Thanks!!!


chore: XDEFI strict provider [3.0.6]

We currently override window.ethereum which can cause issue with MetaMask;
but we will make a strict window.xfi.ethereum check for XDEFI.

@davidp94 It shows this as in draft, is it ready for review? Additionally, can you fix the linting, and just to confirm, did you test this and it works? Thanks!

@taylorjdawson
We are releasing a new version this week that would change the injection of XDEFI to be on window.xfi.ethereum -- thus it is still in draft PR;
I will fix the lint & move to a non-draft PR once this is done;

@davidp94 It shows this as in draft, is it ready for review? Additionally, can you fix the linting, and just to confirm, did you test this and it works? Thanks!

v3.0.6 has been released and I've converted PR is ready to be reviewed/merged;

@taylorjdawson can we merge & release asap? 🙏

@taylorjdawson @cmeisl can we get a release asap that includes those changes?
Best,
David

@davidp94 Yes! I am testing today and looking to release this afternoon, thank you for your patience.


Command Line Option: Skip Private Profile Warning/Error

Hello :)
Is there a command line parameter which allows to skip private profiles?
For example if I try to run Instaloader.exe with following parameters:
--no-compress-json --no-metadata-json --no-video-thumbnails --no-captions --stories --highlights --tagged --igtv --fast-update -profile PROFILE1 PROFILE2 PROFILE3 -l MYLOGIN

And let's say PROFILE1 is private then it ends the whole execution and throws an exception (/warning/error) with following message:
PROFILE1: Private but not followed.

Errors or warnings occurred:
PROFILE1: Private but not followed.

So is there an option to say: "If download possible, download - if not, go on with the next profile"?
Greetings! :)

So is there an option to say: "If download possible, download - if not, go on with the next profile"?

that is what Instaloader does.


How does BotBuilder understand when create new IDialog object?

Bot Info

SDK Platform: .NET
SDK Version: 3.11.0

Issue Description
Hi!
I created a bot from the VS template. As a result, I have MessageController that launches RootDialog:
public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
	if (activity.Type == ActivityTypes.Message)
	{
		await Conversation.SendAsync(activity, () => new RootDialog());
	}
	...
}

MessagesController.Post is called every time the bot is sent some activity from the client. If the bot is sent a "message" activity, it is called:
await Conversation.SendAsync(activity, () => new RootDialog());
I had a need to pass a parameter into RootDialog(). I created the required constructor
public class RootDialog()
{
	int _param;
	public RootDialog(int param)
	{
		_param = param;
	}

and overwrote the call
await Conversation.SendAsync(activity, () => new RootDialog(param));
After a while, I noticed that in some cases in RootDialog objects this parameter is not filled.
After experimenting, I concluded that the RootDialog object is created only once for each specific channel and user. That is, if any particular user has already entered in the RootDialog before, then a new object will never be created for him. Even if reboot IIS.
The bot understands for whom to create a new RootDialog object, and for whom not to create and use the already created one.
Questions:

How does the bot know to create a new dialog object for the user or not?
Where is the information about the dialog objects already created stored?

You could pass your param in one of the data bags in the context object UserData, ``ConversationData, or PrivateConversationData` depending on what exactly you need to accomplish.  What is your use case?

Now there is no problem, because I used the data of activity object, so I moved the code to RootDialog.MessageReceivedAsync in which this object is also available through context.Activity.
Now I'm curious:

How does the bot know to create a new dialog object for the user or not?
Where is the information about the dialog objects already created stored?

The dialog stack is serialized and sent to the bot connector along with the outgoing message. When the subsequent message is sent back, this serialized payload is sent back. If it's not a user's first message, then instead of creating a new root dialog, their conversation will be deserialized and resumed.

sphanley, thanks!
I correctly understand that it is not right to describe any business logic in the constructor or StartAsync method of dialog?
For example, I want one message handler to be called for a particular user, and for the other users another. It would seem that this could be done like this:
public class RootDialog : IDialog<object>
{
	public async Task StartAsync(IDialogContext context)
	{
		if(context.Activity.From.Id == "123456")
			context.Wait(this.SpecialMessageReceivedAsync);
		else
			context.Wait(this.MessageReceivedAsync);
	}

But if user 123456 has already entered into a dialogue with the bot (before we decided to define for him a special handler), it will never get into SpecialMessageReceivedAsync handler.

@Verdysh, it depends on your use case, but generally, that's likely true. You'd only want to put business logic in the constructor or StartAsync if it's logic which you genuinely only wanted run the first time the user enters the dialog.
In your example, it may be valid to do that sort of flow control in the StartAsync. But at the end of the code flow that a user goes through, you want to make sure you end by calling context.Wait(Something) if you want their next method to be handled by a different method within the dialog, as their next message is going to immediately hit the last thing you set via context.Wait().

@sphanley, thanks!


fix: Handling for Provider Error for generic

What
Currently Provider errors are not handled for Providers outside Pin Challenge and Acknowledge Challenge
Why
Original changes were focused on the Response payloads.
How
By providing a Generic Error Payload as a default parser for any Provider Responses before throwing errors.
Test
Using Error Type object for Any API call outside Acknowledge Challenge and Pin Challenge
Checklist

[ ] I have self-reviewed this PR
[ ] I have added tests that prove the feature works or the fix is effective

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/Ripple/615/rdkcentral/Ripple

Commit: 0f4d9e5d42abfc09cf571a06d59b65595097ad1d

Report detail: gist

Blackduck scan failure details
Summary: 0 violations, 0 files pending approval, 1 file pending identification.

Protex Server Path: /home/blackduck/github/Ripple/615/rdkcentral/Ripple

Commit: 0f4d9e5d42abfc09cf571a06d59b65595097ad1d

Report detail: gist

WARNING: A Blackduck scan failure has been waived
A prior failure has been upvoted

Upvote reason: Not a problem

Commit: 0f4d9e5d42abfc09cf571a06d59b65595097ad1d


publish to maven central?

today you can use it directly with jbang like this:
jbang --javaagent https://github.com/beothorn/javaflame/releases/download/v23.0.0/javaAgent.jar <yourapp>
that will fetch it from github.
would be nice to have the agent in maven central to get mirroring "for free".and you could do just:
jbang --javaagent com.something.beothorn:javaflame:RELEASE <yourapp>
similar could be easier fetch with gradle and maven for running.

Done, I am not familiar with jbang but it is now deployed on maven central.
Please pay attention that now there are versions for jvms 8, 11 and 21.
Previously it only worked with java 8.
https://repo.maven.apache.org/maven2/com/github/beothorn/javaFlame/25.0.0/


CI: Add CI for package index sync

Should be merged after #92

OK so I checked the settings and found out I can't configure CI env vars from my side.
Will talk to the repo owner next week. This PR will remain unmerged before that.

Should add a environment like this:

Add some comment in the CI yaml file describing what these vars are


HamburgerMenu.IsOpen not working

I have a HamburgerMenu in DisplayMode = CompactOverlay that I'd like to have open when the application starts. Simply setting IsOpen = "true" doesn't do the trick for me. Any other toggles that I should set?
<controls:HamburgerMenu x:Name="Menu"
                        NavAreaBackground="Beige"
                        IsOpen="True"
                        VisualStateNormalMinWidth="0"
                        VisualStateNormalDisplayMode="CompactOverlay"
                        />

Well, it gets more interesting:
When I don't define a secondary button, I don't see the primary:
<Page
    x:Class="Dandelion.Views.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:views="using:Dandelion.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Template10.Controls"
    mc:Ignorable="d">

    <controls:HamburgerMenu x:Name="Menu"
                            IsOpen="True"
                            NavAreaBackground="Beige"
                            NavButtonBackground="Azure"
                            NavButtonForeground="Black"
                            VisualStateNormalMinWidth="0"
                            VisualStateNormalDisplayMode="CompactOverlay"
                            >

        <controls:HamburgerMenu.PrimaryButtons>

            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Home" Width="48" Height="48" />
                    <TextBlock Text="Home" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>

        </controls:HamburgerMenu.PrimaryButtons>

    </controls:HamburgerMenu>

</Page>

Results in (menu is closed on startup):

When I define a secondary button, I get to see the primary - but not the secondary:
<Page
    x:Class="Dandelion.Views.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:views="using:Dandelion.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Template10.Controls"
    mc:Ignorable="d">

    <controls:HamburgerMenu x:Name="Menu"
                            IsOpen="True"
                            NavAreaBackground="Beige"
                            NavButtonBackground="Azure"
                            NavButtonForeground="Black"
                            VisualStateNormalMinWidth="0"
                            VisualStateNormalDisplayMode="CompactOverlay"
                            >

        <controls:HamburgerMenu.PrimaryButtons>

            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Home" Width="48" Height="48" />
                    <TextBlock Text="Home" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>

        </controls:HamburgerMenu.PrimaryButtons>

        <controls:HamburgerMenu.SecondaryButtons>
            <controls:HamburgerButtonInfo PageType="views:MainPage">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Setting"  Width="48" Height="48"  />
                    <TextBlock Text="Settings" Margin="12, 0, 0, 0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>
        </controls:HamburgerMenu.SecondaryButtons>

    </controls:HamburgerMenu>

</Page>

Results in (menu closed again):

What am I doing wrong?

To answer the first part:

To start with, using VisualStateNormalMinWidth="0" is not the norm and I'm assuming that you know what you're doing here. I would set VisualStateNormalMinWidth around 520 to 600 (with default setting of 521 in Custom.xaml). Probably this answers the question.

If the above doesn't answer the question and still you want to do something with VisualStateNormalMinWidth set to 0, then to me IsOpen = True with DisplayMode = CompactOverlay makes no sense. When you set to CompactOverlay what you want is for the pane to open normally by user interaction. It would be odd for CompactOverlay to start with the pane open as if the HamburgerMenu button is tapped. If IsOpen = True is intended simply to show the 48px width compact part of CompactOverlay, which by the way is missing due to VisualStateNormalMinWidth="0" (and IsOpen = True doesn't bring it back), then you now know the problem which is already answered above.  The bold is to emphasize the difference between the two.

Regarding IsOpen
Ok, so I removed the VisualStateNormalMinWidth and VisualStateWideDisplayMode from the HamburgerMenu and also removed the VisualStateNormalMinWidth from the page header (that is not shown here). The general layout still looks the way I want - obviously I misunderstood the docs for the VisualStateNormalMinWidths.
My intention for IsOpen = true was indeed to start the application with the complete menu expanded to show the button descriptions. But still, the secondary button is not shown and the primary one disappears when I remove the definition for the secondary button.
Regarding the buttons
I played a bit with the buttons. When I add a second primary button, this one is shown while the first one isn't:
<Page
    x:Class="Dandelion.Views.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:views="using:Dandelion.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:Template10.Controls"
    mc:Ignorable="d">

    <controls:HamburgerMenu x:Name="Menu"
                            IsOpen="True"
                            NavAreaBackground="Beige"
                            NavButtonBackground="Azure"
                            NavButtonForeground="Black"
                            SecondarySeparator="Red"
                            DisplayMode="CompactOverlay"
                            >

        <controls:HamburgerMenu.PrimaryButtons>

            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Home" Width="48" Height="48" />
                    <TextBlock Text="Home" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>
            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Primary" Width="48" Height="48" />
                    <TextBlock Text="Second Primary" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>

        </controls:HamburgerMenu.PrimaryButtons>
    </controls:HamburgerMenu>

</Page>

When I define two primarys and two secondarys, the primarys are shown, the first secondary is not although there is space reserved for it (see the separator) and the second secondary is:
<Page
    (omitted)

        <controls:HamburgerMenu.PrimaryButtons>

            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Home" Width="48" Height="48" />
                    <TextBlock Text="Primary" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>
            <controls:HamburgerButtonInfo PageType="views:MainPage" ClearHistory="True">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Mail" Width="48" Height="48" />
                    <TextBlock Text="Second Primary" Margin="12,0,0,0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>

      </controls:HamburgerMenu.PrimaryButtons>

        <controls:HamburgerMenu.SecondaryButtons>
            <controls:HamburgerButtonInfo PageType="views:MainPage">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Setting"  Width="48" Height="48"  />
                    <TextBlock Text="Secondary" Margin="12, 0, 0, 0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>
            <controls:HamburgerButtonInfo PageType="views:MainPage">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <SymbolIcon Symbol="Shop"  Width="48" Height="48"  />
                    <TextBlock Text="Second Secondary" Margin="12, 0, 0, 0" VerticalAlignment="Center"/>
                </StackPanel>
            </controls:HamburgerButtonInfo>
        </controls:HamburgerMenu.SecondaryButtons>

    </controls:HamburgerMenu>

</Page>

My intention for IsOpen = true was indeed to start the application with the complete menu expanded to show the button descriptions.

Then what you want is CompactInline mode rather than CompactOverlay mode.

Then what you want is CompactInline mode rather than CompactOverlay mode.

Not exactly, as I don't want the content to be pushed to the right.

I haven't checked the code, but maybe it doesn't works because it loses the "focus" when the main page is navigated to (it's not merely the control focus because it stays open if you change active window).
I tried writing this line of code inside MainPageViewModel.OnNavigatedTo
Shell.HamburgerMenu.IsOpen = true
And it works, the menu stays opened in overlay mode, until the user interacts.

In the ViewModel?
When I override MainPage.OnNavigatedTo, Shell.Menu is not accessible due to its protection level.

In standard Shell code behind there is a static property HamburgerMenu that exposes the menu.

I added in App.xaml.cs:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
    Shell.Menu.IsOpen = true;
}

but it is still closed on app start.
I think I'll go with @dg2k 's suggestion and use CompactInlay and have to live with the content being pushed to the right, if I want to have an open menu.

Do you have these inside your Shell view?
		public static Shell Instance { get; set; } 		public static HamburgerMenu HamburgerMenu => Instance.MyHamburgerMenu;
It's called HamburgerMenu, not Menu... and it works to me.

Well it's called Menu in my Shell.xaml.cs:
public static Shell Instance { get; set; }
public static HamburgerMenu Menu => Instance.MainMenu;

public Shell(INavigationService navigationService)
{
    Instance = this;
    this.InitializeComponent();
    MainMenu.NavigationService = navigationService;
}

Sadly, doesn't work for me. But as I said, I'll go with CompactInlay...

Why has this been closed? While I can use the workaround, I'd really like the CompactOverlay to stay open :)

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

Because with a new app, it works. Probably there is something with your configuration.

@IIARROWS If it were something with my configuration, I'd be happy to get some help here.
But in fact, it isn't. I used the Hamburger Template from Template10, changed the DisplayMode to CompactOverlay and added the line Shell.HamburgerMenu.IsOpen = true; to MainPage.OnNavigatedTo(). The pane is closed on startup.

Start with checking your version, if it's the last or not. That can help.
I have the latest preview.
From the code you posted, you also have IsOpen="True" in XAML, try removing that.

I would also check that the template is 1.18, if it's not then you are not current and any code we suggest would be negative since the latest variant has significant changes from previous versions specifically how the Hamburger is started in code.

Removing IsOpen="true" from XAML didn't help.
I have the templates version 1.18 installed, also in project.json:
"dependencies": {
    (...)
    "template10": "1.1.11"
},

which seems to be the current version according to NuGet.
I just saw on the wiki page for template10 that

On initial load, the state of the HamburgerMenu can be incorrect (in some instances).

Curious what instances that might be. That's why I'd like to compare with other working examples.

Still struggling with it so I played around a bit more.
When I set Shell.HamburgerMenu.IsOpen=true in MainPage.OnNavigatedTo, navigate to a different page and then navigate again to MainPage (using the menu, not the back button), the menu is open for a split second before closing again.
If I use the back button instead, it stays open as desired!
Any ideas as to why?

You have to do that in the ViewModel, not in the View...
Also, do that on a new project before trying again for on your.

Slowly getting there - it is open on any navigation to the page, but still is closed on app startup...


WIP: aws deploy

Relatively close to working! Needs a lot of docs. Follow along here.

This is horrific beast of a PR, my apologies to everyone. But it fixes a lot of small things, adds geocoding, and incorporates AWS deployment.


not compatible with musl c

Hi, I've noticed that nodejs gcloud library relies on this one, and, in turn, this relies on glibc, which, is not supported in alpine linux distributions, since it uses musl c.
There are wrappers around muslc that provide semi-compatible API with glibc and make it look like it, but the real question is whether it's planned to support musl c or not, given that it's rapidly rising in popularity (who wouldnt want a 5mb base image vs a bloated debian?)
Hope to hear some positive response, thanks :)

This just got me too - Tried using libc6-compat but it just caused a different error
2016-06-21 16:35:38 - LoadError - Error relocating /usr/local/bundle/gems/grpc-0.13.1-x86_64-linux/src/ruby/lib/grpc/grpc_c.so: __strcat_chk: symbol not found - /usr/local/bundle/gems/grpc-0.13.1-x86_64-linux/src/ruby/lib/grpc/grpc_c.so

0.13.x wont work ever, upgrade to 0.14.x+, then you can use https://github.com/sgerrand/alpine-pkg-glibc inside alpine-linux

It'd also be nice if we could build grpc from source in Alpine.  I use an Alpine-based docker image for CI and just noticed that it doesn't build with musl libc (sched_getcpu isn't implemented).  I guess I'll have to switch to a glibc based distro for now (up to this point I was building a very lightweight docker image for demoing the product too, something not possible with other distros 😢 ).

I was able to build gRPC on Alpine using edge, which has musl libc 1.15.0 implementing sched_getcpu.
The following patches to gRPC were needed, though:

src/core/lib/support/wrap_memcpy.c assumes GLIBC for wrapping memcpy. Since this appears to be a legacy fix, slapping a #if defined(__GLIBC__) ... #endif around the entire thing will solve the issue when building with musl libc.

grpc/src/core/lib/iomgr/tcp_posix.c assumes msg_iovlen_type should be size_t, but msghdr::msg_iovlen is int in /usr/include/bits/socket.h on Alpine (x86_64).  For a x86_64 build, this results in truncation warnings (turned into errors) from size_t to int.  A proper fix to set GPR_MSG_IOVLEN_TYPE to int for Alpine is needed in include/grpc/impl/codegen/port_platform.h.

While it now builds, I haven't yet tested the resulting executables.

I really hope this will fix someday.. It`s really important since alpine is lightweight and easy to work with.

If it's possible to build this within a docker instance and folks are
willing to contribute some time, we ought to be able to get musl support
into our portability checks and keep things building in the future. Right
now besides giving advice I'm not sure that anyone on the team has
bandwidth to do the work however.
On Tue, Oct 18, 2016 at 12:06 AM Amit Ripshtos<EMAIL_ADDRESS>wrote:

I really hope this will fix someday.. It`s really important since alpine
is lightweight and easy to work with.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/grpc/grpc/issues/6850#issuecomment-254424382, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJpudTx5pkOCVkAyNKOm-JByoWhTbuYIks5q1G_fgaJpZM4IyRZb
.

Coalesced to #8899.


Reduce number of db connections used by Lifecycle

Django is known of leaking database connections and not closing them properly.
79 connections have been used on one racetrack instance which caused postgres to misbehave.

Let's test what it's like with psycopg in version 3

@Koshmaar I've found something interesting in psycopg v3 docs:

In psycopg2, using the syntax with connection, only the transaction is closed, not the connection. This behaviour is surprising for people used to several other Python classes wrapping resources, such as files.
In Psycopg 3, using with connection will close the connection at the end of the with block, making handling the connection resources more familiar.

So switching to psycopg3 looks promising.

psycopg3 seems to use conenctions more sparingly as the number of total connections dropped to 21-31 (from 79).


BUG - The process cannot access the file because it is being used by another process.

Albeit rare, this error happens when I use PCT. It is difficult to replicate due to it's rarity.
I thought could it be that some process from previous stages is not complete so it can not access that file yet? I can try debugging, but the error is hard to catch because by the time it happens, you're already out of the function to see the status of the variables.
Error using aaq_matlab_pct/runall (line 259)
Error detected on worker 3.

Error in aa_doprocessing (line 375)
            taskqueue.runall(dontcloseexistingworkers, true);

Error in studyB_preprocess (line 54)
aa_doprocessing(aap);

Caused by:
    Error using aas_retrieve_inputs_part2 (line 140)
    The process cannot access the file because it is being used by another process.

Like this? I haven't tested it yet, I will do a massive analysis with 140 subjects soon, so I'm planning of testing this during that. Hoping that the error will happen (or not, if the fix below works)

  if ispc()
      % On Windows, always use copyfile for now.
      % TODO: Allow hardlinks on Windows? Can they even be created without admin rights?
      % to avoid conflict in case of parallel execution make a copy of the file in tmp
      nTries = 1;
      src_full = fullfile(streamfiles(depind).src, streamfiles(depind).fns{ind});
      while nTries <= aap.options.maximumretry
          try
              copyfile(src_full, streamfiles(depind).fns_dest_full{ind});
              break;
          catch
              nTries = nTries + 1;
          end
      end
  else


find_cases() with ContainsStrings() not compatible with TH5

Hello,
when testing TheHive4py with a TH5 (5.2.1-1) instance with some historical code working on TH4 I noticed that usage of ContainsStrings() was not supported anymore on TH5. Context is doing a find_cases()
The TheHive4py object ContainsStrings("title", "Foobar") was generating this error:
{'errors': [{'acceptedInput': ['query', 'parentChildFilter'],
             'field': 'FObject(Map(_wildcard -> FObject(Map(_field -> '
                      'FString(title), _value -> FString(*Foobar*)))))',
             'format': 'empty',
             'name': '_and[1]',
             'type': 'InvalidFormatAttributeError'},
[...]

It seems that using Like() instead fix this issue, so letting you know about that if anyone stumble on this.

The patch on my side that fixes this misbehavior (working on both 4 & 5 versions) for the query building part:
-             [ContainsString("title", val) for val in args.title.split(" ")] +
+             [Like("title","*%s*" % val) for val in args.title.split(" ") if len(val) > 2] +

If there is any comment on this fix / how to do it even better, I'm listening :)
Cheers!

Hi @gelim and thank you very much for your input!
One thing I'm not sure about, where is the ContainString filter coming from exactly? I've checked the predefined filters in thehive4py and I don't see this declared anywhere in the lib.
When checking the docs of the Query API for available filters there's no reference to any _containsString filter either, so I'd recommend using _like or _match (in case of a single word lookup).
Filters
Available filters:

_and: {"_and": [...other filters] }
_or: {"_or": [...other filters] }
_not: {"_not": { other filter } }
_any: {"_any": null} match any entities
_lt: {"_lt": {"_field": "<field>", "_value": <value>} less than
_gt: {"_gt": {"_field": "<field>", "_value": <value>} greater than
_lte: {"_lte": {"_field": "<field>", "_value": <value>} less than or equal
_gte: {"_gte": {"_field": "<field>", "_value": <value>} greater than or equal
_ne: {"_ne": {"_field": "<field>", "_value": <value>} not equal
_eq: {"_eq": {"_field": "<field>", "_value": <value>} equal
_is: {"_is": {"_field": "<field>", "_value": <value>} same as _eq
_startsWith: {"_startsWith": {"_field": "<field>", "_value": "<value>"} string starts with
_endsWith: {"_endsWith": {"_field": "<field>", "_value": "<value>"} string ends with
_id: {"_id": "~123"} filter by ID
_between: {"_between": {"_field": "<field>", "_from": <from>, "_to": <to>}} range filter, from is inclusive, to is exclusive, they are both mandatory
_in: {"_in": {"_field": "<field>", "_values": [<value1>, ...] }} the field is one of these values
_contains: {"_contains": "<field>"} if an object contains this field
_like: {"_like": {"_field": "<field>", "_value": "<value>"} the field (or a word, depending on the index type) contains the substring
_match: {"_match": {"_field": "<field>", "_value": "<value>"} the field contains the word

Hope it helps!

Ok, so I'm using TheHive4py 1.x branch, so it seems this ContainsString disappeared in main (was in ./thehive4py/query.py)
I will test further with the latest code...

Closing it as it was more like of a version mismatch rather than a bug.


ModuleNotFoundError: No module named 'utils_sample'

Are there any code files that have not been uploaded?

Sorry, I upload the file util_sample.py now, thx!

Sorry, I upload the file ’utils_sample.py‘ now, thx!