KOGITO-1678 Service tasks should support futures

depends on #572
It should now be possible for services to be defined as:
public class MyService {
   public CompletionStage<T> myMethod(...) {
      return CompletableFuture....
   }
}

the completion will be async

@evacchi have you tried this with persistence enabled? The thing is that you pass work item and manager to the async completion method which wont be connected to runtime any more. It will be called from anither thread and thus won’t be part of the unit of work so even if it will not throw any exception during completion of work item it won’t be saved into the storage.
I’d say using process.instances().findById().completeWorkItem() Should be used instead.

I’d say using process.instances().findById().completeWorkItem() Should be used instead.

thanks will verify that

I managed to get this green with commit 8b60a9f, now I am trying to address @mswiderski's comment using process.instances().findById().completeWorkItem() however, this cannot be used in every situation because if it is synchronous, then the PI-ID might not be present yet. This is a behavior @danielezonca and I observed while writing our home automation demo (using signals). At the time we wondered if we could set the pi-id before the process started so that the value would have been available; however I am not sure whether this changes the semantics somewhere else
/cc @cristianonicolai @ricardozanini

@evacchi not sure what you mean by

this cannot be used in every situation because if it is synchronous, then the PI-ID might not be present yet.

instance id is assigned before process instance is started so it's there.

@mswiderski maybe the issue is different then. This line fails:
app.processes().processById(pid).instances().findById(piid)
                                       .orElseThrow(() -> new IllegalArgumentException(piid))
                                       .completeWorkItem(piid, result);

throwing the IllegalArgumentException in test org.kie.kogito.codegen.tests.WorkItemParamsTest; i.e. the pi-id cannot be found. Maybe there is some different initialization issue

ok, that is slightly different as what it fails here is not the missing process instance id but persistence layer does not have it. Which is sort of expected as this is the call that starting process instance and thus it should never be there until call/unit of work is completed.
So this code should only be invoked from another thread, meaning when async method call has completed.

ok, that is slightly different as what it fails here is not the missing process instance id but persistence layer does not have it. Which is sort of expected as this is the call that starting process instance and thus it should never be there until call/unit of work is completed.
So this code should only be invoked from another thread, meaning when async method call has completed.

I suspected so; but now I fear that there is a looming race condition there :/ i.e. the detached thread may occasionally bump into a situation where the ID is not set in either place

correct, it might be a race condition so maybe you could integrate that with unit of work... so it is called after it was successfully persisted...

you could integrate that with unit of work...

what do you mean with "that" ? :)

call to complete work item
app.processes().processById(pid).instances().findById(piid)                                         .orElseThrow(() -> new IllegalArgumentException(piid))                                        .completeWorkItem(piid, result);

so you're suggesting it is not done in the handler anymore?

handler only registers it to be done not earlier than the completion of this request, same as process event listeners are "delayed"


<EMAIL_ADDRESS>should fail?

I found<EMAIL_ADDRESS>passes the validation. The email has multi-byte underbar before the at-mark.
(The validation fails if I set strict mode)
AWS SES rejected the email address so I wonder what is the expected result.

I t depends on the RFC to which validation conforms. RFC 822 does not allow multibyte characters.

After #49 the validation is intentionally left loose. That email will pass validation. See #49 and the new README for details.
@karlwilbur Thanks for all of the comments you've made in the issues and pull-request here ❤

I want this gem implements RFC validation rule and be selectable from option.
v2 does not validate email address anymore...

/[^\s]@[^\s]/.
https://github.com/balexand/email_validator/blob/3f9628baad1761253a4ebd843815750e1523d314/lib/email_validator.rb#L13

@balexand, Happy to help.


Implement SafeContextHandle as a wrapper for TFE_Context

I'm actually on the Roslyn team, specifically the team that maintains the IDE tools and developer experience for C# and Visual Basic. I've spent a lot of time in the past working on interop layers though, so I worked on this as part of lending a hand to the ML.NET team.

Oh I see, you’re the expert on the .NET language and leading me to the right direction.


Arkime fails to correctly merge the session termination request into the current session

Describe the bug
After upgrading Arkime to version 5.0, we encountered a problem with HTTP traffic session handling. Specifically, Arkime fails to correctly merge the session termination request into the current session. Instead, it creates a separate session for the termination request.
For example, the first session is an HTTP session, but Arkime does not capture the termination request (FIN/ACK) as part of this session. Instead, it places the termination request in a second, separate session.
Here are the details:

First Session:
    Protocol: HTTP
    Description: Standard HTTP traffic

Second Session:
    Protocol: TCP
    Description: Contains only the termination request (FIN/ACK) of the first HTTP session

This behavior causes an unexpected increase in the number of sessions and complicates session analysis, especially under high traffic conditions. We need a way to ensure that session termination requests are correctly merged into the corresponding HTTP sessions.
Elasticsearch version:7.6
Arkime/Moloch version:5.0，5.1，5.12
OS name and version:ubuntu22
How was Arkime/Moloch built/installed: (rpm, deb, easybutton, ...) deb
Provide logs, stack traces and steps to reproduce:

When the traffic is 10000/s, Arkime can correctly distinguish sessions. However, when the traffic is 30000/s, the issue mentioned above occurs. We are using the PF_RING interface.

Here are the details of the two packets in the pcap file:

u1

os is ubuntu22

In the screen shot it is a RST that is in a different session, is this always the issue? [you said FIN above, but that isn't what it shows]
It looks like the RST is coming from the client?
have you changed any of the tcp settings in the config.ini file?
I don't understand what you mean by "When the traffic is 10000/s, Arkime can correctly distinguish sessions. However, when the traffic is 30000/s". Are you saying when there are 30000 packets a second Arkime doesn't work?
If you could DM me on slack the 2 pcap files that would be helpful

BTW, I would suggest moving everything over to AFPacket, it works much better with Arkime.

In the screen shot it is a RST that is in a different session, is this always the issue? [you said FIN above, but that isn't what it shows]

It looks like the RST is coming from the client?

have you changed any of the tcp settings in the config.ini file?

I don't understand what you mean by "When the traffic is 10000/s, Arkime can correctly distinguish sessions. However, when the traffic is 30000/s". Are you saying when there are 30000 packets a second Arkime doesn't work?

If you could DM me on slack the 2 pcap files that would be helpful

Yes, the RST is not being correctly merged.
Yes, the RST is coming from the client.
No,the config.ini  is similar to version 4.6.
When the session in traffic  is 10000/s，arkime worked correctly ,When the session is 30000/s，the RST is not being correctly merged and arkime will generate 60000/s session

Please provide pcaps
I still don't understand what you mean by "traffic is 10000/s", can you rephrase?
Can you provide your config.ini or the output of grep -i tcp config.ini

Please provide pcaps

I still don't understand what you mean by "traffic is 10000/s", can you rephrase?

Can you provide your config.ini or the output of grep -i tcp config.ini

here is the two pcap : https://github.com/ljskyg/arkime-pcap
means we have 10000 sessions per second

So if I merge the 2 pcap files and run it with capture it works fine. So i don't think this is a bug.
When you have 10000 sessions/sec it works fine but when you have 30000 sessions/sec or more it doesn't.
I would try AFPacket, and I would check your capture.log for any errors. Our PFRing implementation is not optimized.

So if I merge the 2 pcap files and run it with capture it works fine. So i don't think this is a bug.
When you have 10000 sessions/sec it works fine but when you have 30000 sessions/sec or more it doesn't.
I would try AFPacket, and I would check your capture.log for any errors. Our PFRing implementation is not optimized.

Thank you. and the 4.6 version is worked fine , when we try 5.0 we found this Situation

I would double check you didn't change something in the config file. I don't see anything obvious in the code between 4.6.0 and 5.0.0. (those are the two versions right?) Unfortunately there are a bunch of changes because of the name change and formatting, but nothing stands out.
git diff -w -r v4.6.0 -r v5.0.0 capture/plugins/pfring  capture/packet.c capture/parsers/tcp.c

here is the config file we used , we may changed something after we found this situation but still not worked fine
Latest settings documentation: https://arkime.com/settings

Arkime capture/viewer uses a tiered system for configuration variables. This allows Arkime
to share one config file for many machines. The ordering of sections in this
file doesn't matter.

Order of config variables use:
1st) [optional] The section titled with the node name is used first.
2nd) [optional] If a node has a nodeClass variable, the section titled with
the nodeClass name is used next. Sessions will be tagged with
class: which may be useful if watching different networks.
3rd) The section titled "default" is used last.
[default]
Comma seperated list of OpenSearch/Elasticsearch host:port combinations. If not using a
Elasticsearch load balancer, a different OpenSearch/Elasticsearch node in the cluster can be
specified for each Arkime node to help spread load on high volume clusters. For user/password
use https://user:pass@host:port OR elasticsearchBasicAuth
elasticsearch=http://node1:9200
elasticsearchBasicAuth=
#plugins=kafka.so
kafkaBootstrapServers=node1:9092,node2:9092,node3:9092,node4:9092,node5:9092,node6:9092,node7:9092
kafkaMsgFormat=doc
kafkaTopic=arkimekkk
interface=zc:10@7;zc:10@8;zc:10@9;zc:10@10;zc:10@11;zc:10@12;zc:10@13;zc:10@14;zc:10@15;zc:10@16;zc:10@17
#interface=zc:10@18;zc:10@19;zc:10@20;zc:10@21;zc:10@22;zc:10@23;zc:10@24;zc:10@25;zc:10@26;zc:10@27;zc:10@28;zc:10@29;zc:10@30;zc:10@31;zc:10@32
packetThreads=11
pcapReadMethod=pfring
#pcapReadMethod=afpacketv3
pcapDir=/data/arkime/raw
rootPlugins=reader-pfring.so
Where the user database is, the above is used if not set
For user/password use https://user:pass@host:port OR usersElasticsearchBasicAuth
usersElasticsearch=http://localhost:9200
usersElasticsearchBasicAuth=
How often to create a new OpenSearch/Elasticsearch index. hourly,hourly[23468],hourly12,daily,weekly,monthly
See https://arkime.com/settings#rotateindex
rotateIndex=daily
Uncomment if this node should process the cron queries and packet search jobs, only ONE node should
process cron queries and packet search jobs
cronQueries=true
Cert file to use, comment out to use http instead
certFile=/opt/arkime/etc/arkime.cert
File with trusted roots/certs. WARNING! this replaces default roots
Useful with self signed certs and can be set per node.
caTrustFile=/opt/arkime/etc/roots.cert
Private key file to use, comment out to use http instead
keyFile=/opt/arkime/etc/arkime.key
Password Hash Secret - Must be in default section. Since OpenSearch/Elasticsearch
is wide open by default, we encrypt the stored password hashes with this
so a malicous person can't insert a working new account.
Comment out for no user authentication.
Changing the value will make all previously stored passwords no longer work.
Make this RANDOM, you never need to type in
Use a different password for S2S communication then passwordSecret.
Must be in default section. Make this RANDOM, you never need to type in
#serverSecret=
HTTP Digest Realm - Must be in default section. Changing the value
will make all previously stored passwords no longer work
httpRealm=Moloch
Semicolon ';' seperated list of interfaces to listen on for traffic
#interface=eth1
Host to connect to for wiseService
#wiseHost=<IP_ADDRESS>
Log viewer access requests to a different log file
#accessLogFile=/opt/arkime/logs/access.log
Control the log format for access requests. This uses URI % encoding.
#accessLogFormat=:date :username %1b[1m:method%1b[0m %1b[33m:url%1b[0m :status :res[content-length] bytes :response-time ms
The directory to save raw pcap files to
#pcapDir=/data/arkime/raw
The max raw pcap file size in gigabytes, with a max value of 36G.
The disk should have room for at least 10*maxFileSizeG
maxFileSizeG=12
The max time in minutes between rotating pcap files. Default is 0, which means
only rotate based on current file size and the maxFileSizeG variable
#maxFileTimeM=60
TCP timeout value. Arkime writes a session record after this many seconds
of inactivity.
tcpTimeout=6000
Arkime writes a session record after this many seconds, no matter if
active or inactive
tcpSaveTimeout=7200
tcpClosingTimeout=50
UDP timeout value. Arkime assumes the UDP session is ended after this
many seconds of inactivity.
udpTimeout=30
ICMP timeout value. Arkime assumes the ICMP session is ended after this
many seconds of inactivity.
icmpTimeout=10
An aproximiate maximum number of active sessions Arkime will try and monitor
maxStreams=1000000
Arkime writes a session record after this many packets
maxPackets=10000
Delete pcap files when free space is lower then this in gigabytes OR it can be
expressed as a percentage (ex: 5%). This does NOT delete the session records in
the database. It is recommended this value is between 5% and 10% of the disk.
Database deletes are done by the db.pl expire script
freeSpaceG=5%
The port to listen on, by default 8005
#viewPort=8005
The host/ip to listen on, by default <IP_ADDRESS> which is ALL
#viewHost=localhost
A MaxMind account is now required, Arkime checks several install locations, or
will work without Geo files installed. See https://arkime.com/faq#maxmind
geoLite2Country=/var/lib/GeoIP/GeoLite2-Country.mmdb;/usr/share/GeoIP/GeoLite2-Country.mmdb;/opt/arkime/etc/GeoLite2-Country.mmdb
geoLite2ASN=/var/lib/GeoIP/GeoLite2-ASN.mmdb;/usr/share/GeoIP/GeoLite2-ASN.mmdb;/opt/arkime/etc/GeoLite2-ASN.mmdb
Path of the rir assignments file
https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.csv
rirFile=/opt/arkime/etc/ipv4-address-space.csv
Path of the OUI file from whareshark
https://raw.githubusercontent.com/wireshark/wireshark/release-4.0/manuf
ouiFile=/opt/arkime/etc/oui.txt
Arkime rules to allow you specify actions to perform when criteria are met with certain fields or state.
See https://arkime.com/rulesformat
#rulesFiles=/opt/arkime/etc/arkime.rules
User to drop privileges to. The pcapDir must be writable by this user or group below
dropUser=nobody
Group to drop privileges to. The pcapDir must be writable by this group or user above
dropGroup=daemon
Header to use for determining the username to check in the database for instead of
using http digest. Use this if apache or something else is doing the auth.
Set viewHost to localhost or use iptables
Might need something like this in the httpd.conf
RewriteRule .* - [E=ENV_RU:%{REMOTE_USER}]
RequestHeader set ARKIME_USER %{ENV_RU}e
#userNameHeader=arkime_user

Headers to use to determine if user from userNameHeader is
authorized to use the system, and if so create a new user
in the Arkime user database. This implementation expects that
the users LDAP/AD groups (or similar) are populated into an
HTTP header by the Apache (or similar) referenced above.
The JSON in userAutoCreateTmpl is used to insert the new
user into the arkime database (if not already present)
and additional HTTP headers can be sourced from the request
to populate various fields.

The example below pulls verifies that an HTTP header called UserGroup
is present, and contains the value "ARKIME_ACCESS". If this authorization
check passes, the user database is inspected for the user in userNameHeader
and if it is not present it is created. The system uses the
arkime_user and http_auth_mail headers from the
request and uses them to populate userId and userName
fields for the new user record.

Once the user record is created, this functionaity
neither updates nor deletes the data, though if the user is no longer
reported to be in the group, access is denied regardless of the status
in the arkime database.

#requiredAuthHeader="UserGroup"
#requiredAuthHeaderVal="ARKIME_ACCESS"
#userAutoCreateTmpl={"userId": "${this.arkime_user}", "userName": "${this.http_auth_mail}", "enabled": true, "webEnabled": true, "headerAuthEnabled": true, "emailSearch": true, "createEnabled": false, "removeEnabled": false, "packetSearch": true }
Should we parse extra smtp traffic info
parseSMTP=true
Should we parse extra smb traffic info
parseSMB=true
Should we parse HTTP QS Values
parseQSValue=false
Should we calculate sha256 for bodies
supportSha256=false
Only index HTTP request bodies less than this number of bytes */
maxReqBody=64
Only store request bodies that Utf-8?
reqBodyOnlyUtf8=true
Semicolon ';' seperated list of SMTP Headers that have ips, need to have the terminating colon ':'
smtpIpHeaders=X-Originating-IP:;X-Barracuda-Apparent-Source-IP:
Semicolon ';' seperated list of directories to load parsers from
parsersDir=/opt/arkime/parsers
Semicolon ';' seperated list of directories to load plugins from
pluginsDir=/opt/arkime/plugins
Semicolon ';' seperated list of plugins to load and the order to load in
plugins=tagger.so; netflow.so
Plugins to load as root, usually just readers
#rootPlugins=reader-pfring; reader-daq.so
Semicolon ';' seperated list of viewer plugins to load and the order to load in
viewerPlugins=wise.js
NetFlowPlugin
Input device id, 0 by default
#netflowSNMPInput=1
Outout device id, 0 by default
#netflowSNMPOutput=2
Netflow version 1,5,7 supported, 7 by default
#netflowVersion=1
Semicolon ';' seperated list of netflow destinations
#netflowDestinations=localhost:9993
Specify the max number of indices we calculate spidata for.
ES will blow up if we allow the spiData to search too many indices.
spiDataMaxIndices=4
Uncomment the following to allow direct uploads. This is experimental
#uploadCommand=/opt/arkime/bin/capture --copy -n {NODE} -r {TMPFILE} -c {CONFIG} {TAGS}
Title Template
cluster = ES cluster name
userId  = logged in User Id
userName = logged in User Name
page = internal page name
expression = current search expression if set, otherwise blank
-expression = " - " + current search expression if set, otherwise blank, prior spaces removed
view = current view if set, otherwise blank
-view = " - " + current view if set, otherwise blank, prior spaces removed
#titleTemplate=cluster - page -view -expression
Number of threads processing packets
#packetThreads=2
ADVANCED - Semicolon ';' seperated list of files to load for config. Files are loaded
in order and can replace values set in this file or previous files.
#includes=
ADVANCED - How is pcap written to disk
simple          = use O_DIRECT if available, writes in pcapWriteSize chunks,
a file per packet thread.
simple-nodirect = don't use O_DIRECT. Required for zfs and others
pcapWriteMethod=simple
ADVANCED - Buffer size when writing pcap files. Should be a multiple of the raid 5 or xfs
stripe size. Defaults to 256k
pcapWriteSize=262143
ADVANCED - Max number of connections to OpenSearch/Elasticsearch
maxESConns=30
ADVANCED - Max number of es requests outstanding in q
maxESRequests=2000
ADVANCED - Number of packets to ask libpcap to read per poll/spin
Increasing may hurt stats and ES performance
Decreasing may cause more dropped packets
#packetsPerPoll=50000
packetsPerPoll=50000
ADVANCED - The base path for Arkime web access. Must end with a / or bad things will happen
Only set when using a reverse proxy
webBasePath=/arkime/
DEBUG - Write to stdout info every X packets.
Set to -1 to never log status
logEveryXPackets=100000
DEBUG - Write to stdout unknown protocols
logUnknownProtocols=false
DEBUG - Write to stdout OpenSearch/Elasticsearch requests
logESRequests=true
DEBUG - Write to stdout file creation information
logFileCreation=true
High Performance settings
https://arkime.com/settings#high-performance-settings
magicMode=basic
pcapReadMethod=tpacketv3
tpacketv3NumThreads=2
pcapWriteMethod=simple
pcapWriteSize=2560000
packetThreads=5
maxPacketsInQueue=5000000
Low Bandwidth settings
packetThreads=1
pcapWriteSize=65536
##############################################################################
override-ips is a special section that overrides the MaxMind databases for
the fields set, but fields not set will still use MaxMind (example if you set
tags but not country it will use MaxMind for the country)
Spaces and capitalization is very important.
IP Can be a single IP or a CIDR
Up to 10 tags can be added

ip=tag:TAGNAME1;tag:TAGNAME2;country:3LetterUpperCaseCountry;asn:ASN STRING
#[override-ips]
#<IP_ADDRESS>/16=tag:ny-office;country:USA;asn:AS0000 This is an ASN
##############################################################################
It is possible to define in the config file extra http/email headers
to index. They are accessed using the expression http. and
email. with optional .cnt expressions

Possible config atributes for all headers
type: (string|integer|ip)  = data type                (default string)
count:                     = index count of items     (default false)
unique:                    = only record unique items (default true)
headers-http-request is used to configure request headers to index
[headers-http-request]
referer=type:string;count:true;unique:true
authorization=type:string;count:true
content-type=type:string;count:true
origin=type:string
headers-http-response is used to configure http response headers to index
[headers-http-response]
location=type:string
server=type:string
content-type=type:string;count:true
headers-email is used to configure email headers to index
[headers-email]
x-priority=type:integer
authorization=type:string
##############################################################################
If you have multiple clusters and you want the ability to send sessions
from one cluster to another either manually or with the cron feature fill out
this section
#[remote-clusters]
#forensics=url:https://viewer1.host.domain:8005;serverSecret:password4arkime;name:Forensics Cluster
#shortname2=url:http://viewer2.host.domain:8123;serverSecret:password4arkime;name:Testing Cluster
WARNING: This is an ini file with sections, most likely you don't want to put a setting here.
New settings usually go near the top in the [default] section, or in [nodename] sections.

`# Latest settings documentation: https://arkime.com/settings

Arkime capture/viewer uses a tiered system for configuration variables. This allows Arkime
to share one config file for many machines. The ordering of sections in this
file doesn't matter.

Order of config variables use:
1st) [optional] The section titled with the node name is used first.
2nd) [optional] If a node has a nodeClass variable, the section titled with
the nodeClass name is used next. Sessions will be tagged with
class: which may be useful if watching different networks.
3rd) The section titled "default" is used last.
[default]
Comma seperated list of OpenSearch/Elasticsearch host:port combinations. If not using a
Elasticsearch load balancer, a different OpenSearch/Elasticsearch node in the cluster can be
specified for each Arkime node to help spread load on high volume clusters. For user/password
use https://user:pass@host:port OR elasticsearchBasicAuth
elasticsearch=http://node1:9200
elasticsearchBasicAuth=
#plugins=kafka.so
kafkaBootstrapServers=node1:9092,node2:9092,node3:9092,node4:9092,node5:9092,node6:9092,node7:9092
kafkaMsgFormat=doc
kafkaTopic=arkimekkk
interface=zc:10@7;zc:10@8;zc:10@9;zc:10@10;zc:10@11;zc:10@12;zc:10@13;zc:10@14;zc:10@15;zc:10@16;zc:10@17
#interface=zc:10@18;zc:10@19;zc:10@20;zc:10@21;zc:10@22;zc:10@23;zc:10@24;zc:10@25;zc:10@26;zc:10@27;zc:10@28;zc:10@29;zc:10@30;zc:10@31;zc:10@32
packetThreads=11
pcapReadMethod=pfring
#pcapReadMethod=afpacketv3
pcapDir=/data/arkime/raw
rootPlugins=reader-pfring.so
Where the user database is, the above is used if not set
For user/password use https://user:pass@host:port OR usersElasticsearchBasicAuth
usersElasticsearch=http://localhost:9200
usersElasticsearchBasicAuth=
How often to create a new OpenSearch/Elasticsearch index. hourly,hourly[23468],hourly12,daily,weekly,monthly
See https://arkime.com/settings#rotateindex
rotateIndex=daily
Uncomment if this node should process the cron queries and packet search jobs, only ONE node should
process cron queries and packet search jobs
cronQueries=true
Cert file to use, comment out to use http instead
certFile=/opt/arkime/etc/arkime.cert
File with trusted roots/certs. WARNING! this replaces default roots
Useful with self signed certs and can be set per node.
caTrustFile=/opt/arkime/etc/roots.cert
Private key file to use, comment out to use http instead
keyFile=/opt/arkime/etc/arkime.key
Password Hash Secret - Must be in default section. Since OpenSearch/Elasticsearch
is wide open by default, we encrypt the stored password hashes with this
so a malicous person can't insert a working new account.
Comment out for no user authentication.
Changing the value will make all previously stored passwords no longer work.
Make this RANDOM, you never need to type in
Use a different password for S2S communication then passwordSecret.
Must be in default section. Make this RANDOM, you never need to type in
#serverSecret=
HTTP Digest Realm - Must be in default section. Changing the value
will make all previously stored passwords no longer work
httpRealm=Moloch
Semicolon ';' seperated list of interfaces to listen on for traffic
#interface=eth1
Host to connect to for wiseService
#wiseHost=<IP_ADDRESS>
Log viewer access requests to a different log file
#accessLogFile=/opt/arkime/logs/access.log
Control the log format for access requests. This uses URI % encoding.
#accessLogFormat=:date :username %1b[1m:method%1b[0m %1b[33m:url%1b[0m :status :res[content-length] bytes :response-time ms
The directory to save raw pcap files to
#pcapDir=/data/arkime/raw
The max raw pcap file size in gigabytes, with a max value of 36G.
The disk should have room for at least 10*maxFileSizeG
maxFileSizeG=12
The max time in minutes between rotating pcap files. Default is 0, which means
only rotate based on current file size and the maxFileSizeG variable
#maxFileTimeM=60
TCP timeout value. Arkime writes a session record after this many seconds
of inactivity.
tcpTimeout=6000
Arkime writes a session record after this many seconds, no matter if
active or inactive
tcpSaveTimeout=7200
tcpClosingTimeout=50
UDP timeout value. Arkime assumes the UDP session is ended after this
many seconds of inactivity.
udpTimeout=30
ICMP timeout value. Arkime assumes the ICMP session is ended after this
many seconds of inactivity.
icmpTimeout=10
An aproximiate maximum number of active sessions Arkime will try and monitor
maxStreams=1000000
Arkime writes a session record after this many packets
maxPackets=10000
Delete pcap files when free space is lower then this in gigabytes OR it can be
expressed as a percentage (ex: 5%). This does NOT delete the session records in
the database. It is recommended this value is between 5% and 10% of the disk.
Database deletes are done by the db.pl expire script
freeSpaceG=5%
The port to listen on, by default 8005
#viewPort=8005
The host/ip to listen on, by default <IP_ADDRESS> which is ALL
#viewHost=localhost
A MaxMind account is now required, Arkime checks several install locations, or
will work without Geo files installed. See https://arkime.com/faq#maxmind
geoLite2Country=/var/lib/GeoIP/GeoLite2-Country.mmdb;/usr/share/GeoIP/GeoLite2-Country.mmdb;/opt/arkime/etc/GeoLite2-Country.mmdb
geoLite2ASN=/var/lib/GeoIP/GeoLite2-ASN.mmdb;/usr/share/GeoIP/GeoLite2-ASN.mmdb;/opt/arkime/etc/GeoLite2-ASN.mmdb
Path of the rir assignments file
https://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.csv
rirFile=/opt/arkime/etc/ipv4-address-space.csv
Path of the OUI file from whareshark
https://raw.githubusercontent.com/wireshark/wireshark/release-4.0/manuf
ouiFile=/opt/arkime/etc/oui.txt
Arkime rules to allow you specify actions to perform when criteria are met with certain fields or state.
See https://arkime.com/rulesformat
#rulesFiles=/opt/arkime/etc/arkime.rules
User to drop privileges to. The pcapDir must be writable by this user or group below
dropUser=nobody
Group to drop privileges to. The pcapDir must be writable by this group or user above
dropGroup=daemon
Header to use for determining the username to check in the database for instead of
using http digest. Use this if apache or something else is doing the auth.
Set viewHost to localhost or use iptables
Might need something like this in the httpd.conf
RewriteRule .* - [E=ENV_RU:%{REMOTE_USER}]
RequestHeader set ARKIME_USER %{ENV_RU}e
#userNameHeader=arkime_user

Headers to use to determine if user from userNameHeader is
authorized to use the system, and if so create a new user
in the Arkime user database. This implementation expects that
the users LDAP/AD groups (or similar) are populated into an
HTTP header by the Apache (or similar) referenced above.
The JSON in userAutoCreateTmpl is used to insert the new
user into the arkime database (if not already present)
and additional HTTP headers can be sourced from the request
to populate various fields.

The example below pulls verifies that an HTTP header called UserGroup
is present, and contains the value "ARKIME_ACCESS". If this authorization
check passes, the user database is inspected for the user in userNameHeader
and if it is not present it is created. The system uses the
arkime_user and http_auth_mail headers from the
request and uses them to populate userId and userName
fields for the new user record.

Once the user record is created, this functionaity
neither updates nor deletes the data, though if the user is no longer
reported to be in the group, access is denied regardless of the status
in the arkime database.

#requiredAuthHeader="UserGroup"
#requiredAuthHeaderVal="ARKIME_ACCESS"
#userAutoCreateTmpl={"userId": "${this.arkime_user}", "userName": "${this.http_auth_mail}", "enabled": true, "webEnabled": true, "headerAuthEnabled": true, "emailSearch": true, "createEnabled": false, "removeEnabled": false, "packetSearch": true }
Should we parse extra smtp traffic info
parseSMTP=true
Should we parse extra smb traffic info
parseSMB=true
Should we parse HTTP QS Values
parseQSValue=false
Should we calculate sha256 for bodies
supportSha256=false
Only index HTTP request bodies less than this number of bytes */
maxReqBody=64
Only store request bodies that Utf-8?
reqBodyOnlyUtf8=true
Semicolon ';' seperated list of SMTP Headers that have ips, need to have the terminating colon ':'
smtpIpHeaders=X-Originating-IP:;X-Barracuda-Apparent-Source-IP:
Semicolon ';' seperated list of directories to load parsers from
parsersDir=/opt/arkime/parsers
Semicolon ';' seperated list of directories to load plugins from
pluginsDir=/opt/arkime/plugins
Semicolon ';' seperated list of plugins to load and the order to load in
plugins=tagger.so; netflow.so
Plugins to load as root, usually just readers
#rootPlugins=reader-pfring; reader-daq.so
Semicolon ';' seperated list of viewer plugins to load and the order to load in
viewerPlugins=wise.js
NetFlowPlugin
Input device id, 0 by default
#netflowSNMPInput=1
Outout device id, 0 by default
#netflowSNMPOutput=2
Netflow version 1,5,7 supported, 7 by default
#netflowVersion=1
Semicolon ';' seperated list of netflow destinations
#netflowDestinations=localhost:9993
Specify the max number of indices we calculate spidata for.
ES will blow up if we allow the spiData to search too many indices.
spiDataMaxIndices=4
Uncomment the following to allow direct uploads. This is experimental
#uploadCommand=/opt/arkime/bin/capture --copy -n {NODE} -r {TMPFILE} -c {CONFIG} {TAGS}
Title Template
cluster = ES cluster name
userId  = logged in User Id
userName = logged in User Name
page = internal page name
expression = current search expression if set, otherwise blank
-expression = " - " + current search expression if set, otherwise blank, prior spaces removed
view = current view if set, otherwise blank
-view = " - " + current view if set, otherwise blank, prior spaces removed
#titleTemplate=cluster - page -view -expression
Number of threads processing packets
#packetThreads=2
ADVANCED - Semicolon ';' seperated list of files to load for config. Files are loaded
in order and can replace values set in this file or previous files.
#includes=
ADVANCED - How is pcap written to disk
simple          = use O_DIRECT if available, writes in pcapWriteSize chunks,
a file per packet thread.
simple-nodirect = don't use O_DIRECT. Required for zfs and others
pcapWriteMethod=simple
ADVANCED - Buffer size when writing pcap files. Should be a multiple of the raid 5 or xfs
stripe size. Defaults to 256k
pcapWriteSize=262143
ADVANCED - Max number of connections to OpenSearch/Elasticsearch
maxESConns=30
ADVANCED - Max number of es requests outstanding in q
maxESRequests=2000
ADVANCED - Number of packets to ask libpcap to read per poll/spin
Increasing may hurt stats and ES performance
Decreasing may cause more dropped packets
#packetsPerPoll=50000
packetsPerPoll=50000
ADVANCED - The base path for Arkime web access. Must end with a / or bad things will happen
Only set when using a reverse proxy
webBasePath=/arkime/
DEBUG - Write to stdout info every X packets.
Set to -1 to never log status
logEveryXPackets=100000
DEBUG - Write to stdout unknown protocols
logUnknownProtocols=false
DEBUG - Write to stdout OpenSearch/Elasticsearch requests
logESRequests=true
DEBUG - Write to stdout file creation information
logFileCreation=true
High Performance settings
https://arkime.com/settings#high-performance-settings
magicMode=basic
pcapReadMethod=tpacketv3
tpacketv3NumThreads=2
pcapWriteMethod=simple
pcapWriteSize=2560000
packetThreads=5
maxPacketsInQueue=5000000
Low Bandwidth settings
packetThreads=1
pcapWriteSize=65536
##############################################################################
override-ips is a special section that overrides the MaxMind databases for
the fields set, but fields not set will still use MaxMind (example if you set
tags but not country it will use MaxMind for the country)
Spaces and capitalization is very important.
IP Can be a single IP or a CIDR
Up to 10 tags can be added

ip=tag:TAGNAME1;tag:TAGNAME2;country:3LetterUpperCaseCountry;asn:ASN STRING
#[override-ips]
#<IP_ADDRESS>/16=tag:ny-office;country:USA;asn:AS0000 This is an ASN
##############################################################################
It is possible to define in the config file extra http/email headers
to index. They are accessed using the expression http. and
email. with optional .cnt expressions

Possible config atributes for all headers
type: (string|integer|ip)  = data type                (default string)
count:                     = index count of items     (default false)
unique:                    = only record unique items (default true)
headers-http-request is used to configure request headers to index
[headers-http-request]
referer=type:string;count:true;unique:true
authorization=type:string;count:true
content-type=type:string;count:true
origin=type:string
headers-http-response is used to configure http response headers to index
[headers-http-response]
location=type:string
server=type:string
content-type=type:string;count:true
headers-email is used to configure email headers to index
[headers-email]
x-priority=type:integer
authorization=type:string
##############################################################################
If you have multiple clusters and you want the ability to send sessions
from one cluster to another either manually or with the cron feature fill out
this section
#[remote-clusters]
#forensics=url:https://viewer1.host.domain:8005;serverSecret:password4arkime;name:Forensics Cluster
#shortname2=url:http://viewer2.host.domain:8123;serverSecret:password4arkime;name:Testing Cluster
WARNING: This is an ini file with sections, most likely you don't want to put a setting here.
New settings usually go near the top in the [default] section, or in [nodename] sections.
`

[default] elasticsearch=http://node1:9200 kafkaBootstrapServers=node1:9092,node2:9092,node3:9092,node4:9092,node5:9092,node6:9092,node7:9092 kafkaMsgFormat=doc kafkaTopic=arkimekkk interface=zc:10@7;zc:10@8;zc:10@9;zc:10@10;zc:10@11;zc:10@12;zc:10@13;zc:10@14;zc:10@15;zc:10@16;zc:10@17 packetThreads=11 pcapReadMethod=pfring pcapDir=/data/arkime/raw rootPlugins=reader-pfring.so rotateIndex=daily httpRealm=Moloch maxFileSizeG=12 tcpTimeout=6000 tcpSaveTimeout=7200 tcpClosingTimeout=50  udpTimeout=30 icmpTimeout=10 maxStreams=1000000 maxPackets=10000 freeSpaceG=5% geoLite2Country=/var/lib/GeoIP/GeoLite2-Country.mmdb;/usr/share/GeoIP/GeoLite2-Country.mmdb;/opt/arkime/etc/GeoLite2-Country.mmdb geoLite2ASN=/var/lib/GeoIP/GeoLite2-ASN.mmdb;/usr/share/GeoIP/GeoLite2-ASN.mmdb;/opt/arkime/etc/GeoLite2-ASN.mmdb rirFile=/opt/arkime/etc/ipv4-address-space.csv ouiFile=/opt/arkime/etc/oui.txt dropUser=nobody dropGroup=daemon parseSMTP=true parseSMB=true parseQSValue=false supportSha256=false maxReqBody=64 reqBodyOnlyUtf8=true smtpIpHeaders=X-Originating-IP:;X-Barracuda-Apparent-Source-IP: parsersDir=/opt/arkime/parsers pluginsDir=/opt/arkime/plugins spiDataMaxIndices=4 pcapWriteMethod=simple pcapWriteSize=262143 maxESConns=30 maxESRequests=2000 packetsPerPoll=50000 logEveryXPackets=100000 logUnknownProtocols=false logESRequests=true logFileCreation=true magicMode=basic pcapWriteMethod=simple pcapWriteSize=2560000 maxPacketsInQueue=5000000 [headers-http-request] referer=type:string;count:true;unique:true authorization=type:string;count:true content-type=type:string;count:true origin=type:string [headers-http-response] location=type:string server=type:string content-type=type:string;count:true [headers-email] x-priority=type:integer authorization=type:string

I would double check you didn't change something in the config file. I don't see anything obvious in the code between 4.6.0 and 5.0.0. (those are the two versions right?) Unfortunately there are a bunch of changes because of the name change and formatting, but nothing stands out.
git diff -w -r v4.6.0 -r v5.0.0 capture/plugins/pfring capture/packet.c capture/parsers/tcp.c

here is the config we used ,we changed something after found this situation and still not worked fine
[default]
elasticsearch=http://node1:9200
kafkaBootstrapServers=node1:9092,node2:9092,node3:9092,node4:9092,node5:9092,node6:9092,node7:9092
kafkaMsgFormat=doc
kafkaTopic=arkimekkk
interface=zc:10@7;zc:10@8;zc:10@9;zc:10@10;zc:10@11;zc:10@12;zc:10@13;zc:10@14;zc:10@15;zc:10@16;zc:10@17
packetThreads=11
pcapReadMethod=pfring
pcapDir=/data/arkime/raw
rootPlugins=reader-pfring.so
rotateIndex=daily
httpRealm=Moloch
maxFileSizeG=12
tcpTimeout=6000
tcpSaveTimeout=7200
tcpClosingTimeout=50
udpTimeout=30
icmpTimeout=10
maxStreams=1000000
maxPackets=10000
freeSpaceG=5%
geoLite2Country=/var/lib/GeoIP/GeoLite2-Country.mmdb;/usr/share/GeoIP/GeoLite2-Country.mmdb;/opt/arkime/etc/GeoLite2-Country.mmdb
geoLite2ASN=/var/lib/GeoIP/GeoLite2-ASN.mmdb;/usr/share/GeoIP/GeoLite2-ASN.mmdb;/opt/arkime/etc/GeoLite2-ASN.mmdb
rirFile=/opt/arkime/etc/ipv4-address-space.csv
ouiFile=/opt/arkime/etc/oui.txt
dropUser=nobody
dropGroup=daemon
parseSMTP=true
parseSMB=true
parseQSValue=false
supportSha256=false
maxReqBody=64
reqBodyOnlyUtf8=true
smtpIpHeaders=X-Originating-IP:;X-Barracuda-Apparent-Source-IP:
parsersDir=/opt/arkime/parsers
pluginsDir=/opt/arkime/plugins
spiDataMaxIndices=4
pcapWriteMethod=simple
pcapWriteSize=262143
maxESConns=30
maxESRequests=2000
packetsPerPoll=50000
logEveryXPackets=100000
logUnknownProtocols=false
logESRequests=true
logFileCreation=true
magicMode=basic
pcapWriteMethod=simple
pcapWriteSize=2560000
maxPacketsInQueue=5000000
[headers-http-request]
referer=type:string;count:true;unique:true
authorization=type:string;count:true
content-type=type:string;count:true
origin=type:string
[headers-http-response]
location=type:string
server=type:string
content-type=type:string;count:true
[headers-email]
x-priority=type:integer
authorization=type:string

have you tried 5.2.0 yet to see if it has the issue?

have you tried 5.2.0 yet to see if it has the issue?
no ,It seems that version 5.2.0 introduced Elasticsearch SSL authentication, but I don't remember clearly. There was an error during database initialization due to authentication version mismatch, so I didn't proceed further.

5.2.0 does require a db.pl upgrade, maybe that is what you are thinking of.

5.2.0 does require a db.pl upgrade, maybe that is what you are thinking of.

We completely removed the old version and did a fresh install; we did not perform an upgrade.

ok, then share the error :)

ok, then share the error :)

thank you, we installed 5.2.0 again and succeed，we'll test it later

ok, then share the error :)

We have identified the issue. The maxStreams parameter controls whether sessions can be fully captured. Increasing its value should resolve the problem.thank you

Great, maybe I'll add a log msg when this happens


HDDS-6086. Compute MD5MD5CRC file checksum using chunk checksums from DataNodes

What changes were proposed in this pull request?
This is an initial draft to create the basic framework for fetching file checksums.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6086
How was this patch tested?
A unit test is added to test FileChecksumHelper

@jojochuang There are few checkstyle errors, pls take care.
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ReplicatedFileChecksumHelper.java
 38: Missing a Javadoc comment.
 43: Line is longer than 80 characters (found 97).
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/BaseFileChecksumHelper.java
 50: Variable 'rpcClient' must be private and have accessor methods.
 51: Variable 'xceiverClientFactory' must be private and have accessor methods.
 55: Variable 'blockChecksumBuf' must be private and have accessor methods.
 58: Variable 'keyLocationInfos' must be private and have accessor methods.

the test failure looks related. I'm looking into it.

I'm reverting back to commit da9c22cabfab0ac70a866c081bc289e16c01d521. The refactor to create a helper method is causing more trouble than i had expected. I'll defer that change to a separate PR @rakeshadr if you are okay with that.

I'm reverting back to commit da9c22c. The refactor to create a helper method is causing more trouble than i had expected. I'll defer that change to a separate PR @rakeshadr if you are okay with that.

@jojochuang Yes, makes sense to me.

Thanks Rakesh. Will adding additional UT in later PRs.

Thanks @lokeshj1703 for the reviews, @jojochuang  has replied to your comments.
Could you please review the updated patch and give your feedback/approval. Thanks!


SAK-41081 Move Rubrics CSS/SCSS styles to library

@josecebe would you mind to resolve the conflicts? There are conflicts after merging #6390

The conflicts have been resolved, awaiting for the build to merge it.

Thanks for making the changes, @josecebe.
However, I wish I had had time to re-review your changes again today before it was merged: you shouldn't have put the variables in the Bootstrap variables files. They should have been in a separate variables file in the morpheus-master/sass/modules/tool/rubrics/ directory instead.
I wish more time was given by the Sakai Core team to review these PRs by more people before they are merged.

hi @fostersdesign , this PR is very critical because needs to be merged just after #6390, if not Rubrics will be broken for QA.
Both PR resolved a big important problem for the future of Rubrics, moving the CSS to Morpheus (Library) and remove all the local JS files in favor of Webjars sounds very very well.
We'll be happy to make more corrections in future PRs, we don't want to break Rubrics waiting for this PR.
Miguel

I have created #6432 to move these SASS variables to the correct spot.


May I ask why an error occurred？

[16:25:31] INFO     Parsing airport.
[16:25:31] WARNING  Unknown value 106 found for LineType.
[16:25:31] WARNING  Unknown value 101 found for LineType.
[16:25:31] WARNING  Unknown value 105 found for LineType.
[16:25:31] WARNING  Unknown value 104 found for LineType.
[16:25:31] WARNING  Unknown value 22 found for LineLightingType.
[16:25:31] WARNING  Unknown value 103 found for LineType.
[16:25:31] INFO     Writing boundary.
[16:25:31] INFO     Writing runways.
[16:25:31] WARNING  Normalized/laundered field name: 'surface_type' to 'surface_ty'
[16:25:31] WARNING  Normalized/laundered field name: 'shoulder_surface_type' to 'shoulder_s'
[16:25:31] WARNING  Normalized/laundered field name: 'centerline_lights' to 'centerline'
[16:25:31] WARNING  Normalized/laundered field name: 'edge_lights' to 'edge_light'
[16:25:31] WARNING  Normalized/laundered field name: 'auto_distance_remaining_signs' to 'auto_dista'
[16:25:31] WARNING  Normalized/laundered field name: 'dthr_length_1' to 'dthr_lengt'
[16:25:31] WARNING  Normalized/laundered field name: 'dthr_length_2' to 'dthr_len_1'
[16:25:31] WARNING  Normalized/laundered field name: 'overrun_length_1' to 'overrun_le'
[16:25:31] WARNING  Normalized/laundered field name: 'overrun_length_2' to 'overrun__1'
[16:25:31] WARNING  Normalized/laundered field name: 'tdz_lighting_1' to 'tdz_lighti'
[16:25:31] WARNING  Normalized/laundered field name: 'tdz_lighting_2' to 'tdz_ligh_1'
[16:25:31] INFO     Writing startup_locations.
[16:25:31] WARNING  Normalized/laundered field name: 'location_type' to 'location_t'
[16:25:31] WARNING  Normalized/laundered field name: 'airplane_types' to 'airplane_t'
[16:25:31] INFO     Writing windsocks.
[16:25:31] WARNING  Normalized/laundered field name: 'illuminated' to 'illuminate'
[16:25:31] INFO     Writing signs.
[16:25:32] INFO     Writing pavements.
[16:25:32] WARNING  Normalized/laundered field name: 'surface_type' to 'surface_ty'
[16:25:32] WARNING  Normalized/laundered field name: 'texture_orientation' to 'texture_or'
[16:25:32] INFO     Writing linear_features.
[16:25:32] WARNING  Normalized/laundered field name: 'painted_line_type' to 'painted_li'
[16:25:32] WARNING  Normalized/laundered field name: 'lighting_line_type' to 'lighting_l'

from xplane_airports.gateway import scenery_pack
from xplane_apt_convert import ParsedAirport
airport_id = "LEBL"
recommended_pack = scenery_pack(airport_id)
apt = recommended_pack.apt
p_apt = ParsedAirport(apt)
p_apt.export("./airport.shp", driver="ESRI Shapefile")

Hi!
There are no errors, they are all "warnings", so no need to worry about it.
Most of the warnings are about field names being truncated. This is a limitation of the "ESRI Shapefile" format which has a limit of 10 character for field names.

However, I did not see any file generated

You should see a bunch of airport.*.* files in the same folder you are running your script from.
E.g. airport.runways.shp.

I looked at it, but it didn't

Upgrade to the new version of xplane-apt-convert (released now) and try again.
pip install xplane-apt-convert==0.5.6

You should now see new log lines specifying where the files are being written.
[11:09:06] INFO     Writing 'runways' to file: /home/[...]/airport.runways.shp

I hope that helps!


TS2589: Type instantiation is excessively deep and possibly infinite using forward and check

With the below schema we're receiving a TS error TS2589: Type instantiation is excessively deep and possibly infinite.
Code:
import * as v from 'valibot';

export const changePinSchema = v.pipe(
  v.object({
    pin: v.pipe(
      v.string('Enter 4-digit numerical PIN'),
      v.minLength(1, 'PIN is required'),
      v.length(4, 'Invalid PIN format. Please enter a 4-digit numerical PIN.'),
    ),
    confirmPin: v.string('Confirm your 4-digit PIN'),
  }),
  // @ts-expect-error TS2589 - see https://github.com/microsoft/TypeScript/issues/53514
  v.forward(
    v.check(
      ({ pin, confirmPin }) => pin === confirmPin,
      'PIN mismatch. Please verify your entry.',
    ),
    ['confirmPin'],
  ),
);

export type ChangePinFields = v.InferOutput<typeof changePinSchema>;

Lib:
"valibot": "^0.35.0",
"typescript": "^5.1.3"

Unfortunately even if we ts-expect it our ts run time has doubled, and ignoring this file means we need to also ignore all importers of it. for now our workaround is to handle that check manually in the component form rather than valibot which is a bummer bc this is super helpful lib

Could this problem be related to your TypeScript version? Everything looks fine in my editor and in our online playground.

thank you mate! that was it, you're a good egg. thanks so much for the quick response


Added sample for custom HTML Markers

Issue
https://github.com/Woosmap/woosmap/issues/1391
Describe your changes
Added Custom Marker extending woosmap.map.OverlayView
How to test

Checklist:

[x] My code follows the style guidelines for this repo
[x] I have performed a self-review of my code
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings/errors
[x] I have added tests that prove my fix is effective or that my feature works
[x] I don't require ops changes for this PR to go to prod
[x] This change does not include a migration

Comments

https://demo.woosmap.com/misc/js-samples-pr-deploy/pr-73/?sample=marker-html-css

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


iOS 13.4 cursor support?

Any plans to add cursor support in iOS 13.4?

Haven't looked into the API, but yes, definitely

Support added as part of https://github.com/gmarm/BetterSegmentedControl/pull/142!


Use of Unicode escapes confuses generateRecipes

The following source
JQ {
  lineTerminator
    = "\n" | "\r" | "\u2028" | "\u2029"
}

Generates a recipe file that compiles fine under node, but fails to compile with ts-node. If I remove the two Unicode escapes, it compiles fine under both.
~/P/jq|main ⚡☡
14∙37∙48≻ npx ohm  generateRecipes -t tmp/jq.ohm
tmp/jq.ohm-recipe.js
tmp/jq.ohm-recipe.d.ts

~/P/jq|main ⚡☡
14∙38∙11≻ ts-node tmp/jq.ohm-recipe.js

/usr/local/lib/node_modules/ts-node/src/index.ts:245
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
tmp/jq.ohm-recipe.js:1:416 - error TS1002: Unterminated string literal.

1 'use strict';module.exports=require('ohm-js').makeRecipe(["grammar",{"source":"JQ {\n\nlineTerminator\n  = \"\\n\" | \"\\r\" | \"\\u2028\" | \"\\u2029\"\n  \n}"},"JQ",null,"lineTerminator",{"lineTerminator":["define",{"sourceInterval":[6,58]},null,[],["alt",{"sourceInterval":[25,58]},["terminal",{"sourceInterval":[25,29]},"\n"],["terminal",{"sourceInterval":[32,36]},"\r"],["terminal",{"sourceInterval":[39,47]},"

tmp/jq.ohm-recipe.js:2:1 - error TS1005: ',' expected.

2 "],["terminal",{"sourceInterval":[50,58]},"
  ----
tmp/jq.ohm-recipe.js:2:6 - error TS1005: ',' expected.

2 "],["terminal",{"sourceInterval":[50,58]},"
       ----
tmp/jq.ohm-recipe.js:2:14 - error TS1005: ',' expected.

2 "],["terminal",{"sourceInterval":[50,58]},"
              ----
tmp/jq.ohm-recipe.js:2:18 - error TS1005: ',' expected.

2 "],["terminal",{"sourceInterval":[50,58]},"
                   ----
tmp/jq.ohm-recipe.js:2:32 - error TS1005: ',' expected.

2 "],["terminal",{"sourceInterval":[50,58]},"
                                ----
tmp/jq.ohm-recipe.js:3:9 - error TS1002: Unterminated string literal.

3 "]]]}]);

tmp/jq.ohm-recipe.js:3:1 - error TS1005: ',' expected.

3 "]]]}]);
  ----
tmp/jq.ohm-recipe.js:3:9 - error TS1005: ']' expected.

3 "]]]}]);

  tmp/jq.ohm-recipe.js:1:190
    1 'use strict';module.exports=require('ohm-js').makeRecipe(["grammar",{"source":"JQ {\n\nlineTerminator\n  = \"\\n\" | \"\\r\" | \"\\u2028\" | \"\\u2029\"\n  \n}"},"JQ",null,"lineTerminator",{"lineTerminator":["define",{"sourceInterval":[6,58]},null,[],["alt",{"sourceInterval":[25,58]},["terminal",{"sourceInterval":[25,29]},"\n"],["terminal",{"sourceInterval":[32,36]},"\r"],["terminal",{"sourceInterval":[39,47]},"
                                                                                ~
    The parser expected to find a '}' to match the '{' token here.

    at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:245:12)
    at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:249:19)
    at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:362:34)
    at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:395:32)
    at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:473:43)
    at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Object.require.extensions.<computed> [as .js] (/usr/local/lib/node_modules/ts-node/src/index.ts:476:12)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)

Interesting, thanks for reporting. Seems like it's related to this: https://v8.dev/features/subsume-json.
I am curious why there is a difference between JS and TS here. Can you let me know which version of TypeScript you're using? It seems to work for me under 4.4.3:
[ohm-scratch] cat jq.ohm
JQ {
  lineTerminator
    = "\n" | "\r" | "\u2028" | "\u2029"
}
[ohm-scratch] npx ohm generateRecipes jq.ohm && npx ts-node jq.ohm-recipe.js
jq.ohm-recipe.js
[ohm-scratch] grep typescript package.json
    "typescript": "^4.4.3"

A possible fix would be to modify Terminal.outputRecipe so that it always emits the escaped version if this.obj is exactly one of those characters.

Hmm, here was my first attempt at a fix: https://github.com/harc/ohm/compare/issue-322?expand=1 but it seems it's a bit more complicated than I thought. Will try to tackle it tomorrow.
Thanks @pragdave for taking the new stuff for a spin!

I am curious why there is a difference between JS and TS here. Can you let
me know which version of TypeScript you're using? It seems to work for me
under 4.4.3

{
  "name": "my-jq",
  "version": "1.0.0",
  "main": "cli.js",
  "license": "MIT",
  "devDependencies": {
<EMAIL_ADDRESS>"^0.1.0",
<EMAIL_ADDRESS>"^27.0.1",
<EMAIL_ADDRESS>"^16.9.1",
    "fast-glob": "^3.2.7",
    "jest": "^27.0.6",
    "ts-jest": "^27.0.4",
    "ts-node": "^10.2.1",
    "typescript": "^4.4.3"
  },
  "dependencies": {
    "ohm-js": "^16.0.0-pre.2"
  },
  "scripts": {
    "test": "jest",
    "testw": "jest --watch"
  }
}

Ok, turns out it was simpler than I thought — I was totally overthinking it, due to the multiple levels of escaping.
Thanks again for the bug report!


Copilot Chat - Enable navigating through prompts when chatting with an agent

If I'm not chatting with an agent, (no @[agentname] in the chat box) then I can use the up and down arrows to navigate through previous prompts I've typed. I LOVE this! Please don't change it.
However, if am chatting with an agent, I lose this ability regardless of whether I type the agent's name, or if it is persisted from the previous prompt.
What I expect is

if I type the agent's name I should be able to navigate through previous prompts with the agent.
if the agent's name persisted, then I could see navigating through all previous prompts, or just those with the agent. I'd check to see what customers expect.

Yes, I'd like to rework input history to support this, but a few aspects of it are complicated...

Tracking this in https://github.com/microsoft/vscode-copilot-release/issues/1208


WIP Tab completion for CLI

The goal of this pull request is to add out-of-the-box completer functionality to Spectre.Console, as suggested in #267.
The approach will be to mimic what a tool like dotnet complete does. As a result, the completion scripts that people can use, will be analogous to those for dotnet complete.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@patriksvensson @phil-scott-78 Do you feel am I taking this in the right direction? Today's start, to me, felt promising. Let me know your thoughts, and feel free to add (failing) tests to provide more specific direction.

I forgot to catch the actual parser error, so... I was accidentally muting an index out of bounds exception.. fixed now.

I'm going to pul this down tonight and play with it. So far it looks really cool.
One scenario that I was thinking about was being able to add a service to commands to specify valid values when they are resolved. E.g. when I type git add a<TAB> the add verb is clever enough to suggest dirty files starting with the letter a.

@phil-scott-78 I'm not entirely sure yet how to add what you mentioned above. Could you provide a pseudo code draft?
I added option parameter support and some more tests.

So my thought was given this settings
public class FooCommandSettings : CommandSettings
{
    [CommandArgument(0, "[QUX]")]
    [Description("The qux value.")]
    public string Qux { get; set; }
}

Let's assume Qux might be a list of *.qux files in the current folder or sub-folder.
Someone types in myapp.exe p<TAB> the app would be able to autocompletion info in the form of all the files that are p*.qux.
To implement perhaps would work like the `ParameterValidationAttribute
public sealed class FileCompletionAttribute : ParameterValidationAttribute
{
    public override string[] Complete(CommandParameterContext context, string partialElement)
    {
        return GetQuxCompletions(partialElement);
    }
}

public class FooCommandSettings : CommandSettings
{
    [CommandArgument(0, "[QUX]")]
    [Description("The qux value.")]
    [FileCompletionAttribute]
    public string Qux { get; set; }
}

It's absolutely the next step and would be super cool to have. I'll have a look at where this would fit, thanks for the input, appreciate it!

Hello @Jawz84, I'm just checking in to see if you made any further progress with this PR?

Hi Frank, thank you for checking in. I'm afraid life happened and I have since not continued the PR.
I don't think I will continue it either. It's been so long and lots of other things are happening.
Sorry to disappoint.
Met vriendelijke groet,
Jos Koelewijn

From: Frank Ray @.>
Sent: Saturday, May 13, 2023 9:21:41 PM
To: spectreconsole/spectre.console @.>
Cc: Jos Koelewijn @.>; Mention @.>
Subject: Re: [spectreconsole/spectre.console] WIP Fixes #267 completer (PR #727)
Hello @Jawz84https://github.com/Jawz84, I'm just checking in to see if you made any further progress with this PR?
—
Reply to this email directly, view it on GitHubhttps://github.com/spectreconsole/spectre.console/pull/727#issuecomment-1546734534, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJ5E5J5UQRAEYAI5ZNCIH3XF7NMLANCNFSM5NU77RXA.
You are receiving this because you were mentioned.Message ID: @.***>

Thanks for replying @Jawz84 , it's no disappointment and all contributions, even unmerged WIP PRs are appreciated. I was just doing some housekeeping across the open issues and PRs to check on any progress.
Regarding tab completion, and whilst I don't know anything about MacOS and Linux, it seems more involved than it first appears:  https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete    ie. each shell seems to need custom configuration manually added before tab completion actually works
Anyhow, I'm going to close this PR given your comment above and you can always come back to it later if you so desire.  Or not. Take care

Thank you Frank!

From: Frank Ray @.>
Sent: Monday, May 15, 2023 11:57:12 AM
To: spectreconsole/spectre.console @.>
Cc: Jos Koelewijn @.>; Mention @.>
Subject: Re: [spectreconsole/spectre.console] WIP Tab completion for CLI (PR #727)
Thanks for replying @Jawz84https://github.com/Jawz84 , it's no disappointment and all contributions, even unmerged WIP PRs are appreciated. I was just doing some housekeeping across the open issues and PRs to check on any progress.
Regarding tab completion, and whilst I don't know anything about MacOS and Linux, it seems more involved than it first appears: https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete ie. each shell seems to need custom configuration manually added before tab completion actually works
Anyhow, I'm going to close this PR given your comment above and you can always come back to it later if you so desire. Or not. Take care
—
Reply to this email directly, view it on GitHubhttps://github.com/spectreconsole/spectre.console/pull/727#issuecomment-1547544779, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJ5E5JDZIR53TAFQE7DXQ3XGH4XRANCNFSM5NU77RXA.
You are receiving this because you were mentioned.Message ID: @.***>


Link to related upstream proposals for self-hosted in README

I've been getting more questions about self-hosted as 1.3 approaches and since I've been talking about self-hosted in a couple of SIGs.
I've gotten feedback that this is awesome work, but the README in the repo doesn't really provide any information about the actual implementation/upstream work involved.
It would be great if we just documented this in some more detail, as well as linking to the upstream proposals this project is related to. I might submit a PR for this when I get some free time, but opening here to document the feedback.

Closed in: https://github.com/kubernetes-incubator/bootkube/pull/289


fsdp with custom process groups

What does this PR do?
This PR enables FSDP _auto_wrap to accept and propagate custom arguments, most notably, it enables the user to propagate dist process_groups.
Custom process_groups enable users to instantiate fsdp modules which shard / synchronize parameters over a subset of accelerators. This is useful for MoE Expert layers and TensorParallel layers.

What issue(s) does this change relate to?
Mixture of Experts (MoE)
https://mosaicml.atlassian.net/browse/RESEARCH-351
https://mosaicml.atlassian.net/browse/CO-1716
https://mosaicml.atlassian.net/browse/CO-1715
https://mosaicml.atlassian.net/browse/CO-1714
https://mosaicml.atlassian.net/browse/CO-1712
TensorParallel (TP)
https://mosaicml.atlassian.net/browse/CO-1635
https://mosaicml.atlassian.net/browse/RESEARCH-442
In general this doesn't fix an issue, but enables a feature which enable TP and MoE models
https://github.com/mosaicml/examples/pull/180
also see: https://github.com/mosaicml/tutel/pull/1

btw I ran this "test" on 16 gpus with different process_group configurations to validate different configurations run. For the MoE setup with pg 'self' or 'set1', I do test if the different configurations result in the expert weights not being sync'd. I do not check if params / grads are sync'd in appropriately in the TP setting; since TP params are sharded, the params shouldn't be equal, so idk what to check, just the fact that they params are gathered, have the appropriate shape, and run might be test enough.
Before submitting

[ ] Have you read the contributor guidelines?
[ ] Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
[ ] Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
[ ] Did you update any related docs and document your change?
[ ] Did you update any related tests and add any new tests related to your change? (see testing)
[ ] Did you run the tests locally to make sure they pass?
[ ] Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

https://github.com/mosaicml/composer/pull/2006#issuecomment-1445743125
Yes this enables the user to pass custom args to fsdp for every fsdp wrapped module; we include some of the mosaicml tooling for easily setting the configs
cc @dskhudia

LGTM, will approve when we add docs

@bcui19 added docs
@dakinggg made suggested updts, suggested runs from diff branches here (using tutel_moe branch in examples repo since it points to this branch)


external drive

Is your feature request related to a problem? Please describe
No response
Describe the solution you'd like
please add app instalation  and app data on external drive
and full data export to external drive
Describe alternatives you've considered
No response
Please specify the version of Windows Subsystem for Android
2209.40000.26.0

Is your feature request related to a problem? Please describe
No response
Describe the solution you'd like
please add app instalation  and app data on external drive
and full data export to external drive
Describe alternatives you've considered
No response
Please specify the version of Windows Subsystem for Android
2209.40000.26.0

- [ ] ``

yes


v0.43.1 Adding Stack From Catalog Hangs Indefinitely

Wanted to try out the new catalog feature by deploying an ELK setup, but the UI hangs at the dropdown window that asks for the software version. All I see is a spinning wheel and the "Cancel" button. This happens with the three stacks that I tried (Logstash, Elasticache and Kibana).
I am not seeing any errors in the Rancher logs.
Rancher	v0.43.1
Cattle	v0.106.0
User Interface	v0.63.0
Rancher Compose	v0.5.0

@xvela-devops If you're Rancher instance sits behind HTTPS maybe it's related to this issue. #2464 I got the same issue.

Thankyou @lkoenigsberger. I do have the same issue. Closing this issue as duplicate of #2464.


VSCode immediately closes on first start after clean install (partial workaround with logs)

VSCode Version: 1.46.0
OS Version: macOS Catalina 10.15.5

Steps to Reproduce:

Followed these blog post steps to do a clean uninstall of VSCode
Download latest version from website
Unzip and move to /Applications folder
Right-click and click on open
Click Open

VSCode icon would pop up briefly on the dock and immediately close

Does this issue occur when all extensions are disabled?: Yes
Workaround/"Fix"
After running $ code --verbose I noticed a
Unexpected error validating window state:

and
[main 2020-06-16T21:22:24.347Z] TypeError: Error processing argument at index 0, conversion failure from #<Object>
    at BrowserWindow.setBounds (electron/js2c/browser_init.js:579:21)

errors, which got me thinking I was always starting vscode on my secondary monitor. Moved to my primary laptop monitor and opened up with cmd + space -> vscode -> enter and it started up no problem, been working fine ever since.
Debugging with disabled extensions and gpu
$ code --disable-extensions --disable-gpu -w --verbose
Marker file for --wait created: /var/folders/qw/p15rvbr571n9gxvg2m1mddtr0000gp/T/dgiaiul

Debugging with only verbose
$ code --verbose
[main 2020-06-16T21:22:24.266Z] Starting VS Code
[main 2020-06-16T21:22:24.268Z] from: /Applications/Visual Studio Code.app/Contents/Resources/app
[main 2020-06-16T21:22:24.268Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'disable-restore-windows': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false,
  'disable-user-env-probe': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'no-proxy-server': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false
}
[main 2020-06-16T21:22:24.270Z] Resolving machine identifier...
[main 2020-06-16T21:22:24.270Z] Resolved machine identifier: 2e880a2064114d3e95540fbe40159595ce1ac0a36863766a7579716d105de5c2 (trueMachineId: undefined)
[main 2020-06-16T21:22:24.297Z] [storage state.vscdb] open(/Users/j0j0471/Library/Application Support/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2020-06-16T21:22:24.298Z] lifecycle (main): phase changed (value: 2)
[main 2020-06-16T21:22:24.299Z] windowsManager#open
[main 2020-06-16T21:22:24.305Z] window#validateWindowState: validating window state on 2 display(s) {
  width: 1024,
  height: 768,
  mode: 1,
  x: 2768,
  y: -0,
  hasDefaultState: true
}
[main 2020-06-16T21:22:24.308Z] Unexpected error validating window state: TypeError: Error processing argument at index 0, conversion failure from #<Object>
TypeError: Error processing argument at index 0, conversion failure from #<Object>
    at Object.module.<computed> [as getDisplayMatching] (electron/js2c/browser_init.js:6954:38)
    at r.validateWindowState (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:519:91)
    at restoreWindowState (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:517:727)
    at new r (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:505:861)
    at u._createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:287:255)
    at u.createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:286:683)
    at t.openInBrowserWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:576:38)
    at t.doOpenEmpty (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:567:97)
    at t.doOpen (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:566:564)
    at t.open (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:562:495)
    at t.openFirstWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:596:412)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:588:847
    at u.invokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:286:212)
    at t.startup (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:588:824)
    at async Object.startup (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:602:367)
[main 2020-06-16T21:22:24.308Z] window#ctor: using window state {
  width: 1024,
  height: 768,
  mode: 1,
  x: 2768,
  y: -0,
  hasDefaultState: true
}
[main 2020-06-16T21:22:24.346Z] telemetry/optInStatus { optIn: true }
[main 2020-06-16T21:22:24.346Z] telemetry/machineIdFallback { usingFallbackGuid: false }
[main 2020-06-16T21:22:24.347Z] TypeError: Error processing argument at index 0, conversion failure from #<Object>
    at BrowserWindow.setBounds (electron/js2c/browser_init.js:579:21)
    at new r (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:507:531)
    at u._createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:287:255)
    at u.createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:286:683)
    at t.openInBrowserWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:576:38)
    at t.doOpenEmpty (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:567:97)
    at t.doOpen (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:566:564)
    at t.open (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:562:495)
    at t.openFirstWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:596:412)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:588:847
    at u.invokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:286:212)
    at t.startup (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:588:824)
    at async Object.startup (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:602:367)
[main 2020-06-16T21:22:24.347Z] Lifecycle#kill()
[main 2020-06-16T21:22:24.347Z] Lifecycle#app.on(window-all-closed)
[main 2020-06-16T21:22:24.426Z] [storage state.vscdb] Trace (event): PRAGMA user_version = 1;

Actually it seems to still not be quite working correctly, if a second window is open on the secondary monitor it'll just be blank.

➜ code . --verbose
[main 2020-06-16T22:03:39.102Z] Sending env to running instance...
[main 2020-06-16T22:03:39.118Z] [
  'TypeError: Error processing argument at index 0, conversion failure from #<Object>',
  '    at BrowserWindow.setBounds (electron/js2c/browser_init.js:579:21)',
  '    at new r (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:507:531)',
  '    at u._createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:287:255)',
  '    at u.createInstance (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:286:683)',
  '    at t.openInBrowserWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:576:38)',
  '    at t.doOpenFolderOrWorkspace (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:567:417)',
  '    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:566:14',
  '    at Array.forEach (<anonymous>)',
  '    at t.doOpen (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:565:841)',
  '    at t.open (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:562:495)',
  '    at e.startOpenWindow (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:524:610)',
  '    at e.start (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:524:215)',
  '    at Object.call (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:194:81)',
  '    at E.onPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:186:441)',
  '    at E.onRawMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:186:70)',
  '    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:185:591',
  '    at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:52:801)',
  '    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:199:77',
  '    at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:52:801)',
  '    at f.acceptChunk (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:197:737)',
  '    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:197:89',
  '    at Socket.t (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:207:22)',
  '    at Socket.emit (events.js:203:13)',
  '    at addChunk (_stream_readable.js:295:12)',
  '    at readableAddChunk (_stream_readable.js:276:11)',
  '    at Socket.Readable.push (_stream_readable.js:210:10)',
  '    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)'
]
[main 2020-06-16T22:03:39.119Z] Lifecycle#kill()

https://code.visualstudio.com/updates/v1_44
download the oldest version will solve this problem

I choosed the March version to deal with it

@Sara1991908 thanks! Rolling back to 1.44 made the issue go away

Need to check if we have to defend ourselves from bad values of the window state, but that can only happen if someone else wrote into the storage.json file...

@deepak1556 I find this way of throwing not very pleasant and possibly something electron should change. E.g. I notice that when I pass in a very large number to one of the dimensions, I get this runtime exception. What is the story behind it?

@bpasero the backing container gfx::Rect for screen coordinates only accepts int arguments, hence electron threw an error instead of transforming it into a garbage value that would lead to undefined behaviors.

@deepak1556 well this is coming from persisted state that maybe got tampered with outside of our control, so it can really have any value. I am already checking for the type being number, but was not expecting an error when the number is simply large.

The current solution should be fine, If needed we can check if the persisted value is a 32-bit integer specifically (parseInt(pos, 10) | 0 === pos)


fixed the issue of sending on closed channel

This commit fixes the issue of headscale crashing after sending on a
closed channel by moving the channel close to the sender side, instead
of the creator. closeChanWithLog is also implemented with generics now.
Signed-off-by: Moritz Poldrack<EMAIL_ADDRESS>

[x] read the CONTRIBUTING guidelines
[ ] raised a GitHub issue or discussed it on the projects chat beforehand
[ ] added unit tests
[ ] added integration tests
[ ] updated documentation if needed
[ ] updated CHANGELOG.md

Fixes #342

This Commit was also sent to @juanfont 10.04.2022 22:37 UTC.

Happy to merge and test this when the tests pass, can you add an entry to the changelog?


Conditionalize-out the Instant::now test on M1 macs

It's flaky, due to a change in clock resolution. As it's not extremely
relevant to correctness, and really needs only run in CI (where we run
it on linux machines).
Fixes #114

bors merge


[OSD-7116] Adding validation to Secretref Name and Namespace

Fix for OSD-7116

Added validation to ensure AWSCredentials SecretRef was set
Added Unit tests for Account Types and Account Claim Types
Removed redundant redeclaration of AwsSecretName variable

Codecov Report

Merging #568 (d44daf4) into master (e01ae9d) will increase coverage by 0.29%.
The diff coverage is 2.59%.