Connection fails if tests are not allowed to complete

I've been struggling to get Drupal Nightwatch tests running at all, but this appears to be a bug worth sharing:
If I start running tests, and ^C before they finish, the web container will never connect to the selenium-chrome container again until I ddev restart.
Copy/Pasted output for search-ability:
andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js

[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
ℹ Connected to selenium-chrome on port 4444 (585ms).
  Using: chrome (101.0.4951.41) on LINUX.

  ℹ Loaded url http://web in 181ms

  Running Test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ℹ Loaded url http://web/test-page in 263ms
  ✔ Element <body> was visible after 53 milliseconds.
  ✔ Testing if element <body> contains text 'Test page text' (59ms)

  ✨ PASSED. 2 assertions. (443ms)

  Running Page objects test page:
───────────────────────────────────────────────────────────────────────────────────────────────────
  ℹ Loaded url http://web/test-page in 142ms
  ✔ Element <body> was visible after 34 milliseconds.
  ✔ Testing if element <Element [name=@body]> contains text 'Test page text' (28ms)
  ✔ Ensuring no deprecation errors have been triggered (11ms)

  ✨ PASSED. 3 assertions. (292ms)
^C

andy@drupal-tests-web:/var/www/html/core$ yarn test:nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js
yarn run v1.22.19
$ node -r dotenv-safe/config ./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js tests/Drupal/Nightwatch/Tests/exampleTest.js

[Tests/Example Test] Test Suite
──────────────────────────────────────────────────────────────
⠹ Connecting to selenium-chrome on port 4444...
  Error
      POST http://selenium-chrome:4444 /wd/hub/session - ECONNRESET
Error: socket hang up
    at Socket.socketCloseListener (node:_http_client:467:25)
    at Socket.emit (node:events:525:35)
    at Socket.emit (node:domain:489:12)
⠧ Connecting to selenium-chrome on port 4444...
^C

andy@drupal-tests-web:/var/www/html/core$

I'll also leave a screenshot version in case people prefer reading with the color-coded outputs:

ddev debug test output here

If anyone finds out whats happenning here, I'm all ears.


Make Nodes more resilient

Motivation
As a k8s-user i would like to have resilient kubernetes worker nodes (as much as possible).
The kubelet has multible configuration options/flags which improves the resilience of a worker node.
Todo

[ ] Configure the Eviction Thresholds (see 1.)
[ ] Configure the system reserved compute resources (see 2.)

1. Eviction Thresholds
currently we only set (by not defining anything):
    "evictionHard": {
      "memory.available": "200Mi"
    },
    "evictionSoft": {
      "memory.available": "500Mi"

As only memory values are configured, all remaining eviction Values are ignored (xref: kubelet code)
The default values for evictionHard are
"memory.available":  "100Mi",
"nodefs.available":  "10%",
"nodefs.inodesFree": "5%",
"imagefs.available": "15%",

I would recommend to set these values again (via kubeadmconfigtemplate)
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
  name: quick-start-default-worker-bootstraptemplate
spec:
  template:
    spec:
      joinConfiguration:
        nodeRegistration:
          kubeletExtraArgs:
            eviction-hard: 'nodefs.available<10%,nodefs.inodesFree<5%,imagefs.available<15%,memory.available<100Mi'

2. system-reserved + kube-reserved
Currently it's possible for a pod to allocate all the resources which are available on a node. The Operatingsystem and some processes/daemons also require some resources. Therefore it's possible to define the number of resources which are required from the core OS components via --system-reserved=[cpu=100m][,][memory=100Mi][,][ephemeral-storage=1Gi][,][pid=1000]
This mean, having a 8000 MB Memory Node and reserving 100Mi for system components, the kubelet reports only 7900Mi as allocatable for pods.
(xref: kubelet configuration)

Comment from @primeroz in related ticket ->
For reference in the past i used the GKE calculation method for reservations ( which works well especially on very big nodes ) and the EKS bootstrap script code
for reference i was playing with a startup script to add the kube-reserved ( and possibly the systemd-reserved ) at bootstrap time by adding to the kubelet systemd service unit drop in
#!/bin/bash

# TODO
# Eviction - should this be hardcoded in kubeadmconfig ?
# Ephemeral Storage

# Helper function which calculates the amount of the given resource (either CPU or memory)
# to reserve in a given resource range, specified by a start and end of the range and a percentage
# of the resource to reserve. Note that we return zero if the start of the resource range is
# greater than the total resource capacity on the node. Additionally, if the end range exceeds the total
# resource capacity of the node, we use the total resource capacity as the end of the range.
# Args:
#   $1 total available resource on the worker node in input unit (either millicores for CPU or Mi for memory)
#   $2 start of the resource range in input unit
#   $3 end of the resource range in input unit
#   $4 percentage of range to reserve in percent*100 (to allow for two decimal digits)
# Return:
#   amount of resource to reserve in input unit
get_resource_to_reserve_in_range() {
  local total_resource_on_instance=$1
  local start_range=$2
  local end_range=$3
  local percentage=$4
  resources_to_reserve="0"
  if (($total_resource_on_instance > $start_range)); then
    resources_to_reserve=$(((($total_resource_on_instance < $end_range ? $total_resource_on_instance : $end_range) - $start_range) * $percentage / 100 / 100))
  fi
  echo $resources_to_reserve
}

# Calculates the amount of CPU to reserve for kubeReserved in millicores from the total number of vCPUs available on the instance.
# From the total core capacity of this worker node, we calculate the CPU resources to reserve by reserving a percentage
# of the available cores in each range up to the total number of cores available on the instance.
# We are using these CPU ranges from GKE (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable):
# 6% of the first core
# 1% of the next core (up to 2 cores)
# 0.5% of the next 2 cores (up to 4 cores)
# 0.25% of any cores above 4 cores
# Return:
#   CPU resources to reserve in millicores (m)
get_cpu_millicores_to_reserve() {
  #local total_cpu_on_instance=$(($(nproc) * 1000))
  local total_cpu_on_instance=$((12 * 1000))
  local cpu_ranges=(0 1000 2000 4000 $total_cpu_on_instance)
  local cpu_percentage_reserved_for_ranges=(600 100 50 25)
  cpu_to_reserve="0"
  for i in "${!cpu_percentage_reserved_for_ranges[@]}"; do
    local start_range=${cpu_ranges[$i]}
    local end_range=${cpu_ranges[(($i + 1))]}
    local percentage_to_reserve_for_range=${cpu_percentage_reserved_for_ranges[$i]}
    cpu_to_reserve=$(($cpu_to_reserve + $(get_resource_to_reserve_in_range $total_cpu_on_instance $start_range $end_range $percentage_to_reserve_for_range)))
  done
  echo $cpu_to_reserve
}

#25% of the first 4 GiB of memory
#20% of the next 4 GiB of memory (up to 8 GiB)
#10% of the next 8 GiB of memory (up to 16 GiB)
#6% of the next 112 GiB of memory (up to 128 GiB)
#2% of any memory above 128 GiB

get_memory_to_reserve() {
  #local total_memory_on_instance_in_gb=$( echo $(awk '/MemTotal/ {print $2}' /proc/meminfo)/1024/1024 | bc )
  local total_memory_on_instance_in_bytes=$( awk '/MemTotal/ {print $2}' /proc/meminfo )
  local memory_ranges=(0 4000000 8000000 16000000 128000000 $total_memory_on_instance_in_bytes)
  local memory_percentage_reserved_for_ranges=(2500 2000 1000 600 200)
  memory_to_reserve_in_kbytes="0"
  for i in "${!memory_percentage_reserved_for_ranges[@]}"; do
    local start_range=${memory_ranges[$i]}
    local end_range=${memory_ranges[(($i + 1))]}
    local percentage_to_reserve_for_range=${memory_percentage_reserved_for_ranges[$i]}
    memory_to_reserve_in_kbytes=$(($memory_to_reserve_in_kbytes + $(get_resource_to_reserve_in_range $total_memory_on_instance_in_bytes $start_range $end_range $percentage_to_reserve_for_range)))
  done
  # Output in Mi
  echo $memory_to_reserve_in_kbytes/1024 | bc
}

echo "--kube-reserved cpu=$(get_cpu_millicores_to_reserve)m,memory=$(get_memory_to_reserve)Mi"

Alternatively we could just map in the cluster-<provider>
instance_type: { <RESERVATIONS> }

and look it up at helm rendering time but that would mean much more maintenance

See origin of this story in -> https://github.com/giantswarm/giantswarm/issues/23809


Fix build WARNINGs in pnpm build

From pnpm build, there are a series of:
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
[WARNING] {"moduleIdentifier":"/Users/alr/git/TBD54566975/developer.tbd.website/node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].use[1]!/Users/alr/git/TBD54566975/developer.tbd.website/node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].use[2]!/Users/alr/git/TBD54566975/developer.tbd.website/site/src/css/docs.css","moduleName":"../node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].use[1]!../node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].use[2]!./src/css/docs.css","message":"Module Warning (from ../node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js):\n(219:3) from \"autoprefixer\" plugin: start value has mixed support, consider using flex-start instead\n\nCode:\n  justify-content: start\n","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"/Users/alr/git/TBD54566975/developer.tbd.website/node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].use[1]!/Users/alr/git/TBD54566975/developer.tbd.website/node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].use[2]!/Users/alr/git/TBD54566975/developer.tbd.website/site/src/css/docs.css","moduleName":"../node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].use[1]!../node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].use[2]!./src/css/docs.css","message":"Module Warning (from ../node_modules/.pnpm/postcss-loader@7.3.4_postcss@8.4.31_typescript@5.3.3_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js):\n(219:3) from \"autoprefixer\" plugin: start value has mixed support, consider using flex-start instead\n\nCode:\n  justify-content: start\n","compilerPath":"client"}
[WARNING] {"moduleIdentifier":"/Users/alr/git/TBD54566975/developer.tbd.website/node_modules/.pnpm/sodium-javascript@0.8.0/node_modules/sodium-javascript/randombytes.js","moduleName":"../node_modules/.pnpm/sodium-javascript@0.8.0/node_modules/sodium-javascript/randombytes.js","loc":"23:6-13","message":"Critical dependency: require function is used in a way in which dependencies cannot be statically extracted","compilerPath":"client"}

As these call our deprecations, they could lead to errors in subsequent versions and put us in a place where we can't upgrade anymore or publish.

Troubleshooting this

We are thinking about closing this issue in favor of a new website, since @dayhaysoos already spent some meaningful time troubleshooting it without progress.

Following up on this, I think this will be resolved with the new websites. Closing this out for now, lemme know if there are any objections.


Distinguish between same-named functions in FunctionSignatureDecompilerHover

Instead of using the function name to locate the function, it gets the function directly. I also removed the now-unused getSymbolForLocation function.
Note: I have not yet tested this; I'm working on setting up the build environment.

Merged 68a9c0a5


Code Review: Improve Arrows on Paths (#15320)

Code review for BohemianCoding/Sketch#15320 (“Improve Arrows on Paths”):
Connect to BohemianCoding/Sketch#15320.

Warnings

:warning:

This pull request may need a CHANGELOG entry.

:warning:

Source/dom/style/BorderOptions.js changed, but not its tests. That's OK as long as you're refactoring.

:warning:

Source/dom/style/BorderOptions.js changed, but not its doc. That's OK as long as you're refactoring.

  Generated by :no_entry_sign: dangerJS


Polish letters in url

Polish letters in the url are not properly encoded, which causes errors during scraping.
We should convert them to ISO-8859-2 encoding.
For example POŁ -> PO%A3

Closed with #43


How I can extract the adversarial java code?

Hello,
Thank you for your work!
Sorry for this tedious question, but I am trying to get the adversarial java source code but did not mange to?

Hi @eghannoum ,
Thank you for your interest in our work!
Can you please clarify your question?
The adversarial java source code is the output of our approach, given a benign source code and a specific model.
Best,
Uri

Hi @eghannoum , Thank you for your interest in our work!
Can you please clarify your question? The adversarial Java source code is the output of our approach, given a benign source code snippet and a specific model.
Best, Uri

So basically, I want to generate new adversarial examples using your models.
My dataset contains Java source code snippets but I do not know the steps to use the model with my dataset.
I hope you understand my problem.
Thank you

Did you look at the README here? https://github.com/tech-srl/adversarial-examples/tree/master/code2vec

I have followed the instructions and ran the model on the provided preprocessed dataset,
Where I can find the resulting samples?

In the file log.txt.
The code that writes to this file is at: https://github.com/tech-srl/adversarial-examples/blob/master/code2vec/model.py#L425-L605
So if you want to log additional information, you can change the code there.
I hope it helps.
Best,
Uri


No way to use wrapperComponent: false with AnimatedSwitch

I have a use case where I need fine control over styles – specifically I need to add more styles to the element with the tweening styles. { wrapperComponent: false } seemed like the perfect option as it uses cloneElement and injects the styles.
However it turns out there is noway to consume the injected style prop (at least with AnimatedSwitch) – cloned element is actually an internal provided Switch component.
Is there something I am missing?
I came up with a work around I thought I would share using recompose and React context.
const WithStyleContext = withContext({ style: PropTypes.object }, ({ style }) => ({ style }))(({ children }) => children)

const StyleWrapper = getContext({ style: PropTypes.object })('div')

<AnimatedSwitch
  wrapperComponent={WithStyleContext}
  children={[
    <Route
      children={() =>
        <StyleWrapper children="Hello world!" />
      }
    />
  ]}
/>

Is there a way to provide the style prop without needing to use context?
Thanks for the awesome library! :)

I think I figured it out. In RouteTransition, props is cloned into component, which is wrapped by a Route. The Route class does not pass props down.

This appears to be by design https://github.com/ReactTraining/react-router/issues/4627
I think it would make sense to export an AnimatedRoute component with this lib which provides this enhancement to React Router’s Route.

I replaced that Route element with this:
const TransRoute = ({component, style, ...props}) => (
  <Route {...props} render={props => component({style, ...props})} />
);

And it works.

Awesome! I’ll give it a go
On Fri, 24 Nov 2017 at 15:03, Jeff Wen<EMAIL_ADDRESS>wrote:

I replaced that Route element with this:
const TransRoute = ({component, style, ...props}) => (
<Route {...props} render={props => component({style, ...props})} />
);
And it works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/maisano/react-router-transition/issues/83#issuecomment-346847433,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAZ9LVck55DZg2sEAUzt26FpgGCMWTMmks5s5trLgaJpZM4QmDuD
.


Add Input-OTP feature

Pull Request Template
Description:
Noticed the input-otp was missing, so added the code for it in the packages and the showcase section, I am fairly new to open source so pleas elet me know if i have done anything wrong while contributing to the project.
Fixes # (issue)
Tested Platforms:

[x] Web
[x] iOS
[x] Android

Affected Apps/Packages:

Showcase/components
Packages/reusables

Screenshots:

Notes:

Hey @rangelkoli, thanks for contributing. Unfortunately, the OTP component is in the list of excluded components from shadcn. Would you mind creating your own repo for this component? That way I could add a link to your repo in https://github.com/mrzachnugent/react-native-reusables?tab=readme-ov-file#excluded-components


GPC-NONE: Remove gds-users access to accounts

More of a question than anything else. Now that we have SSO access, do we still want the gds-users roles knocking about?

Have approved this as yep I think that is correct


Tutorial updates

removes the default embedding net
introduces the FCEmbedding as an optional pre-configured embedding net
updates tutorials (mostly very minor updates)

Running slow tests on this now


Regression bug: Using a flag leads to error "Multiple flags used"

In the new version, using any flag leads to the error "Multiple flags used".
Reproduce:
$ dn -t
Mutiple flags used
[...]

In the old version, the same command worked.

Sorry about that, the issue has been fixed in commit 6727f94c80b22bcaaf0481d2bea45dd72aa616ec.


Not compatible with RN 0.60

When starting the bundler, this message is displayed:
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-orientation: https://github.com/yamill/react-native-orientation#readme
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.

It's a fairly straightforward fix, I'd be glad to contribute if I find some open time in the near future

Opened #353

I'm using this one and it worked perfectly on version 0.60.5
https://github.com/react-native-hooks/device-orientation


cordova-plugin-background-mode stop working when the application is closed ionic 2

Hello everyone!
I'm trying to implement this plugin to my project, when I have the application open it works fine, does the job as I want. The problem is when I close the application, it closes completely and the plugin stops working. To let you know a litle what I want to do is, I want to make web service for example every 5 minutes, it does not metter if the application is in use or not someone can some one help me with this problem

It is illegal in many service to keep running after application is closed.

That requires native code and possibility depends on the target platform. A cordova app isn't suitable for that.

query remains as well as :(


Infeasibility not detected

The problem
OSQP does not detect infeasibility on the following problem. Gurobi, on the other hand, detects infeasibility directly from the pre-solve phase.
Minimal Example
Download data.jld2 and run in Julia:
using SparseArrays
using LinearAlgebra
using JLD2
@load "data.jld2" A c
m, n = size(A)

# We want to solve the following problem
# minimize    1/2x'x - c'x
# subject to  Ax = 1
#              x ≥ 0

# Gurobi
using Gurobi
env = Gurobi.Env()
model = gurobi_model(env, H=SparseMatrixCSC(1.0*I, n, n), f=-c, Aeq=A, beq=ones(m), lb=zeros(n))
optimize(model)

# OSQP
using OSQP
A_ = [A; I]
l = [ones(m); zeros(n)]
u = [ones(m); Inf*ones(n)]
model = OSQP.Model()
OSQP.setup!(model; P=SparseMatrixCSC(1.0*I, n, n), q=-c, A=A_, l=l, u=u)
OSQP.solve!(model)

The problem arises in doubly stochastic normalisation of an undirected weighted graph from the SuiteSparse collection.
System Info
julia 1.1.0
osqp 0.5.0
gurobi 8.1

I have updated your comment to include the required packages to run.
We should check how the infeasibility conditions behave during the iterations. I can already see that OSQP finds large primal objective and residuals fairly soon.

This is fixed in #147


[Bug] Missing schema key in ~/.sheetwork/profiles.yml

Is your feature request related to a problem? Please describe.
Missing the key schema in profiles.yml.
Describe the solution you'd like
Add the key into the file.

It looks like sheetwork init doesn't create any content of the profile.yml file at the minute. The only place I found an example is in the documentation that did not have a schema entry so I updted this.
I'll close the issue as I thiink it's resolveed.


auro-skeleton: use of deprecated<EMAIL_ADDRESS>

General Support Request
This component has a dependency on a deprecated version of the wcss.
Please update from<EMAIL_ADDRESS>to latest<EMAIL_ADDRESS>or later)

This project is still a Node 12 environment. We should do a complete update of the repo to support Node 20 and all dependencies.

This issue is a duplicate of

https://github.com/AlaskaAirlines/auro-skeleton/issues/23


eclector not taking set-macro-character into account?

i have trouble loading maxima with the cst version of clasp, while it loads fine with the ast-version.
The cst-version of clasp uses eclector.concrete-syntax-tree:cst-read to read lisp-sources.
The problem seems to be the following (tested with sbcl and eclector from git)
Define a marco character "_" (the silly pprints are just to test)
(ql:quickload :eclector)
(ql:quickload "eclector-concrete-syntax-tree")
(set-macro-character #\_ (lambda (stream char)
                             (pprint `(char = ,char))
                             (let ((was (peek-char nil stream nil nil t)))
                               (pprint `(peek = ,was))
			       (case was
				 (#\" (values))
				 (#\N (read-char stream t nil t) (values))
				 (otherwise '_))))
                       t)

Use that
* (read-from-string "_N\"The message-lookup\"")
(CHAR = #\_)
(PEEK = #\N)
"The message-lookup"
22

but than in eclector:
* (eclector.reader:read-from-string "_N\"The message-lookup\"")
_N
2
* (with-input-from-string (stream "_N\"The message-lookup\"")
  (eclector.concrete-syntax-tree:cst-read stream))
#<CONCRETE-SYNTAX-TREE:ATOM-CST raw: _N {10046D7143}>
NIL

Am I missing something or are user-defined macro-characters not used?

I'm not sure how Clasp uses Eclector, but considering your example, the problem is that cl:set-macro-character affects the "host" readtable. Eclector has is own readtable class and thus *readtable* variable (the "host" could restrict cl:*readtable* to values of its own readtable type). Its name is eclector.readtable:*readtable*.
Therefore, when running inside e.g. SBCL, something the following is needed
(eclector.readtable:set-macro-character
 eclector.readtable:*readtable*
 #\_ (lambda (stream char)
       (pprint `(char = ,char))
       (let ((was (peek-char nil stream nil nil t)))
         (pprint `(peek = ,was))
         (case was
           (#\" (values))
           (#\N (read-char stream t nil t) (values))
           (otherwise '_))))
 t)

(with-input-from-string (stream "_N\"The message-lookup\"")
  (eclector.concrete-syntax-tree:cst-read stream))
(CHAR = #\_)
(PEEK = #\N)
#<CONCRETE-SYNTAX-TREE:ATOM-CST raw: "The message-lookup" {100BA4C2F3}>
NIL

If Clasp's cl:set-macro-character modifies the value of cl:*readtable*, Eclector won't pick those changes up.

As far as I can see, clasp simply uses the following integration pattern:

eclector.reader:client is set up
eclector.concrete-syntax-tree:cst-read is used, when the compiler reads lisp-source
eclector.parse-result:source-position is customized
eclector.reader:find-character is customized

Looking at your answer, that won't work - as I have seen it compiling maxima.
I assume the following have to be added:

loading files needs to use eclector as well
all operations on readtables need to

use the eclector readtable directly or
need to inform eclector about changes in the readtable (and how this could work with (copy-readtable ..) is not clear to me

cl:read-from-string needs to use eclector.reader:read-from-string
cl:read-preserving-whitespace needs to use eclector.reader:read-preserving-whitespace
cl-read needs to call eclector.reader:read
and in an earlier conversation you told me to consider
ECLECTOR.READER:MAKE-STRUCTURE-INSTANCE and
ECLECTOR.READER:WRAP-IN-*

This list might be incomplete or partially wrong. Is there already a documentation for such an integration?

loading files needs to use eclector as well

I'm not sure what this means. Doesn't Clasp use Eclector as its reader and thus for loading files?

cl:read-from-string needs to use eclector.reader:read-from-string
cl:read-preserving-whitespace needs to use eclector.reader:read-preserving-whitespace

This is an interesting point. I haven't thought about whether you can do
(let ((eclector.reader:*client* <a-cst-client>))
  (eclector.reader:read-from-string …))

i.e. using a CST client with the ordinary read functions. I think it should work, but I haven't tested it.
Doing it this way may do lots of unnecessary work constructing parse results that are not going to be used, though. So maybe having separate classes clasp-client (for shared behavior), clasp-raw-client and clasp-cst-client is the best approach.

This list might be incomplete or partially wrong. Is there already a documentation for such an integration?

If you are asking for a "How to use Eclector as the reader of a Common Lisp implementation" section - No that does not exist yet, but it seems like a good idea.

At the moment, Clasp only uses Eclector to read files it is compiling. Everything else (explicit calls to read, load, etc.) uses Clasp's own reader.


Can't create a new temp email.

Describe the bug
Can't register a new temp email on the bot. It says: "Something bad just happened with me. Stay back till I get fixed"
To Reproduce
Steps to reproduce the behavior:

Install bot.
Create a new email.
See error

Expected behavior
Should create a new email to receive emails.
Screenshots

Smartphone (please complete the following information):

Device: Android, Samsung M40
OS: Android 10

@Suleman-Elahi  This is just display bug. Actually the user is getting created but the there in code by mistake it was written for all successful creations the this message was being thrown.
https://github.com/r0hi7/Trashemail/blob/6819a7648f917c8b428208560772929d9f6a2d95/src/main/java/io/github/trashemail/Telegram/TelegramRequestHandler.java#L119
Thanks again for pointing this out.

Fixed in 6819a76


force pad bytes before field with large aligement

Seems a regression issue to place a field with large aligement.

 Warning

These commits modify unsafe code. Please review it carefully!

@bors-servo r+

:pushpin: Commit 0494698 has been approved by emilio

:hourglass: Testing commit 0494698 with merge 70612ae...

:broken_heart: Test failed - status-travis

Updating registry https://github.com/rust-lang/crates.io-index
error: failed to load source for a dependency on objc
Caused by:
Unable to update registry https://github.com/rust-lang/crates.io-index
Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index
To learn more, run the command again with --verbose.
The command "BINDGEN_FEATURES="$BINDGEN_FEATURES" ./ci/test.sh" exited with 101.

@bors-servo retry

:hourglass: Testing commit 0494698 with merge 80665f4...

:broken_heart: Test failed - status-travis

Ok, this is green, I'm merging manually, since the OSX builders seem to have network problems.


Add support for Periodic Notes plugin

In addition to Daily Notes I want Actions URI to support weekly, monthly, quarterly and yearly notes, c/o liamcain/obsidian-periodic-notes.

[ ] add endpoints for weekly notes
[ ] add endpoints for quarterly notes
[ ] add endpoints for weekly notes
[ ] add endpoints for quarterly notes
[ ] document endpoints for monthly notes
[ ] document endpoints for yearly notes
[ ] document endpoints for monthly notes
[ ] document endpoints for yearly notes

Forgot to tag the issue in these related commits:

05a363559ffc8447f787a90edf71134cf8f981c4
a93bb9bbe3efc709d7ad659d7c84e483a9e870f7
6e2065c84dc665b32b0e3015ac558ce6ad203ea2
976cb98062e385d306b34893a87662498329c6e6


Error when adding tags

Describe the bug
I press <leader>ot to add a tag and the following error message appears:
[orgmode] ....vim/plugged/orgmode/lua/orgmode/treesitter/headline.lua:66: start is higher than end

I've tried reinstalling the parser for org in Treesitter, but the issue is still there.
Steps to reproduce
It only triggers on some of my org files. I've tried to reproduce it on a test file, but there it works, I don't really know why it triggers.
Here's a zip with the file it's not working on:
tag_bug.zip
Expected behavior
Tag is added.
Emacs functionality
No response
Minimal init.lua
/
Screenshots and recordings

OS / Distro
Manjaro 21.2.6
Neovim version/commit
NVIM v0.8.0-dev+60-ga75efc237
Additional context
No response

I actually came here to file this same bug. I have only experienced this bug when the headline contains CJK/unicode text. So, for example, a headline with the phrase "안녕하세요" will trigger this behavior, but a headline with "Hello" does not.
I am using the stable release of Neovim 0.7 and fully updated tresitter etc.

That's right - it triggers only when there's unicode in the headline :+1:

I also experience this bug (headline including a word with umlaut character, if that is removed it works).

The error is because there is a mismatch between what treesitter thinks is the length of the headline title is and what neovim tells us when we do vim.api.nvim_strwidth on the title:

as you can see in TSPlayground on the left, every unicode character entered counts towards two characters with treesitter.
@kristijanhusak what do you think, is that a problem with tree-sitter-org?

@jgollenz I don't think it's tree-sitter-org issue. I think this line is the culprit. I'm just not sure why it was used. @joaomsa do you remember if you used nvim_strwidth for any specific reason here?

but how come nvim_strwidth returns a different value than treesitter? :thinking:

Unicode chars are generally a double width char, an treesitter returns them like that. strwidth returns a Unicode as 1 char instead of 2

FWIW the end_col of a line can be gotten with col([lnum, '$']) (or virtcol or charcol if that's more appropriate).

I pushed some changes to master that should fix this. Can you give it a try?

I can confirm that it works now on my machine (macOS 12.4).

Confirming on my side - works :+1:
Thanks :pray:


How to extend more service binding operations?

Explain the terms I will use below：
application：The system used to carry the user's own business. On the platform, the code of an application is deployed to servers provided by platform.
OSB API：Abbreviation of the open service broker API
As a platform I provide the loadbanlancer service that supports the OSB API. Loadbanlancer needs to mount the user's server for load balancing. In my opinion, the binding operation binds a service instance of loadbanlancer to the user's application. At this moment, there may be none servers mounted  with the instance of loadbalancer service. After the user's application is published to the servers, it may be necessary to call the loadBanlance OSB API to mount these servers to the instance of loadbanlancer service. In this case, the OSB API may not have a proper method of operation. I came up with two solutions：
1. Use the update method of the service instance with different parameters to distinguish whether modifying the attributes of the loadbanlancer itself or mounting the servers to the loadbanlancer service instance;
2. Extend the service binding with a new operation, such as adding a schema definition to the catalog that modifies the server mount relationship.
I want to know what is best practice  to solve this situation when using the OSB API. And when considering about the OSB API V3 standard, how do you think about supporting such a situation?

Hey @Zhaojing-Wang We will be talking more about the Generic Extensions #431 proposal on today's call. I'm going to close this issue for now and I hope you get involved in the #431 discussions as your input would be very valuable!


Bench scopex

https://www.npmjs.com/package/scopex

https://github.com/taowen/define-function

https://github.com/nusr/jsjs

https://github.com/mavoweb/vastly


Documentation unclear.

Under each example, the wording is very hard to tell what will automatically work, and what will not.
For example : https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-point-to-site-routing#vnetbranchbgp says
"Routes added to Windows Clients" and lists only the local Vnet routes.
But immediately after it says :
"Windows clients can access VNet1 and Site1, but routes to Site1 will have to be manually added."
It is unclear what IS and IS NOT added by default, and what needs to be added manually.
There is not a clear distinction between BEFORE manual route entry and AFTER.
Should be re-worked to have three sections
Routes added by default
Routes added to Windows clients: <IP_ADDRESS>/16, <IP_ADDRESS>/24
Routes added to Non-Windows clients: <IP_ADDRESS>/16, <IP_ADDRESS>/16, <IP_ADDRESS>/24
Access
Windows clients can access VNet1.
Non-Windows clients can access VNet1 and Site1.
Manual Route entry
Windows Clients : Routes to Site1: <IP_ADDRESS>/16 will need to be manually added in order to access Site1.

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

ID: 6860efb1-ddab-04a1-bf34-4e0a41844102
Version Independent ID: 2321ec49-4cb8-d477-3430-44af3790bcdd
Content: About Azure Point-to-Site routing
Content Source: articles/vpn-gateway/vpn-gateway-about-point-to-site-routing.md
Service: vpn-gateway
GitHub Login: @cherylmc
Microsoft Alias: anzaman

@n0ttsweet Thanks for the feedback !  I have assigned this issue to content author to investigate and update the document as appropriate.

#please-close

@n0ttsweet We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


python3Packages.groq: init at 0.6.0

Description of changes
Add a new python package (an API library for https://groq.com/)

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 313031 run on x86_64-linux 1

4 packages built:

python311Packages.groq
python311Packages.groq.dist
python312Packages.groq
python312Packages.groq.dist


feat: add defaultContainerSecurityContext

Signed-off-by: Philipp Hitzler<EMAIL_ADDRESS>
What issues does your PR fix?

partially fixes #578

All code taken from your comment @thesuperzapper.
Changes for Redis, Postgresql still missing #303, #304, I'm willing to help with this two issues.
Anyway, even if this PR does not complete #578 I want to show some support.
What does your PR do?
This PR adds defaultContainerSecurityContextto airflow.image, dags-git-sync and pgbouncer.
Checklist
For all Pull Requests

[x] Commits are signed off
[x] Commits have semantic messages
[x] Documentation updated
[x] Passes ct linting

For releasing ONLY

[ ] Chart.yaml version bumped
[ ] CHANGELOG.md updated

seems like a good feature to use, will this approved?


Fix modal id not escaped in href

Got error like this during testing
Only the one is uk-toggle is not escaped

Thanks for the PR!

You closed it instead of merging it 😨

Still not fixed 😵💫

This fix is missing in later versions...
e.g. https://github.com/blockpane/tenderduty/releases/tag/v2.2.1


/profile e shows no results

hello there, im trying to use the TickProfiler but the Result screen is empty
our server is using Minecraft 1.10.2 and Forge <IP_ADDRESS>6
if you need more information tell me

Please upload your FML log file.
Also, make sure you are running /profile e while at least one user is online. It may report nothing if no users are online, as the world isn't ticked after a while with no users and no forced chunks.

i used the command while we had some players on the server and we use server sided chunkloader for chunkloading.

https://www.dropbox.com/s/87s9vml00kbzwhv/fml-server-latest.log?dl=0 heres the log file

Cause:
[10:55:51] [main/ERROR] [ModPatcher/]: Failed to load MCP mappings
Will fix in a few hours, at work right now.


Update elastic4s-client-esjava, ... to 7.9.2

Updates

com.sksamuel.elastic4s:elastic4s-client-esjava
com.sksamuel.elastic4s:elastic4s-effect-cats
com.sksamuel.elastic4s:elastic4s-json-circe

from 7.8.1 to 7.9.2.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.sksamuel.elastic4s" } ]

labels: library-update, semver-minor

Superseded by #168.


Use paymentsSellerId for payments-related actions

📝 Changed routes:

…oard/payments/settings

(view full size)

Commit b02a477eda873ac9e759250022fe0c3b356cf838 (https://thirdweb-ql5il1eto.thirdweb-preview.com).


Zero threads means use default

This simplifies the Configuration API and makes it more robust by removing the NumberOfThreadsZero error case and removing the Option from num_threads. The previous implementation was broken if the env var RAYON_RS_NUM_CPUS == 0. Now we check num_threads, then RAYON_RS_NUM_CPUS and finally use the default. The other commits are more agressive simplifications, killing off validate which is very worthwhile because it makes ThreadPool::new infallible and switching the InitError enum for a struct since it was left with a single variant. This is quite a breaking change.

@cuviper Thank you for the great review, all points have been addressed. I went with Box<Error> for maximum future-proofness and GlobalPoolAlreadyInitialized should no longer be accessible outside rayon-core.

Not sure if this is of interest in the context of the current pull request, but anyway. If a new semantics for the number of threads is to be used, the Gecode (http://www.gecode.org) system has a nice way of specifying the number of threads to use using a double value. Quoting from the documentation (http://www.gecode.org/doc-latest/MPG.pdf, section 9.3.1):
Assume that your computer has m processing units and that the value for threads is n.

If n = 0, then m threads are used (as many as available processing units).
If n ≥ 1, then n threads are used (absolute number of threads to be used).
If n ≤ −1, then m + n threads are used (absolute number of processing units not to be used). For example, when n = −6 and m = 8, then 2 threads are used.
If 0 < n < 1, then n · m threads are used (relative number of processing units to be used). For example, when n = 0.5 and m = 8, then 4 threads are used.
If −1 < n < 0, then (1 + n) · m threads are used (relative number of processing units not to be used). For example, when n = −0.25 and m = 8, then 6 threads are used.
Note that all values are of course rounded and that at least one thread will be used.

Review by @nikomatsakis addressed, thanks!
@zayenz Always good to know what other libraries are doing! Given how easy it is to get the number of CPUs in Rust I'd leave more complex logic up to the user. Taking a float might negate the value of this PR since set_num_threads would be fallible again (have to check for NaN).


Fix sil_combine_global_addr.sil for 32-bit targets

The body of 'foo' is not relevant to the test, so just remove it.

@rajbarik Please take a look.

@swift-ci Please test

Sounds good.


How to enable new home structure and navigation (disabled by default)

How do we enable the new home structure and navigation? If it is disabled by default, there must be some toggle option or code snippet to turn it on, right?
Posted by @amd64fox in https://github.com/amd64fox/SpotX/discussions/50#discussioncomment-3202577

You need to add the incoming parameter -enablenavalt to your installer
Learn more about incoming parameters


Missing out accounts in accounts.csv

If i start the script with making users 0-100, it is missing a lot of users in the .csv file.  The script makes them, but they are not in the .csv. i need to write it manually, then do the TOS again.

I've seen the same issue on my server... so It seems skip some accounts...

Can you include your settings and screenshots of the missing accounts?
My current best guess is that the server occasionally reports failure (by not showing the success page), so the account gets created but the gen thinks it failed so it doesn't save them. If this guess is correct, it's a Nintendo issue, but I could add a workaround to handle these cases.
If you can send me some more details (debug logs, screenshots), I'll take a look at it. This is most likely related to #87.


Add spinner to customer search.

Add spinner to the "customer search", that is, when the agent clicks "start customer session"

PR #4478


Questions about dataset masks

Great job! I've recently been trying to experiment on your CPCL algorithm using other datasets, so I'm wondering what format the mask of your dataset is in? That way I can modify my dataset accordingly to your format. Thanks!

It's about the PASCAL VOC2012 dataset.


I think there is a bug in this challenge, it does not seem to run

Challenge Add Borders Around your Elements has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4.
Please describe how to reproduce this issue, and include links to screenshots if possible.
 Try that and see if it works.

Hi @jvs09182
Thanks for reporting this issue.
Here are some next steps that you should follow before we can help you with your query:

Check these troubleshooting steps first.
Please use the Chat Rooms or try looking through our forum for help with a specific challenge and any coding assistance.

IMPORTANT:
Please NOTE that this tracker is for reporting bugs and enhancements to freeCodeCamp's code base only.
Happy Coding!

Same :(

follow this link, maybe it work for you too.
stackoverflow

Same issue her!

*here

Your class ID in the HTML is "thick-green border", it should be "thick-green-border". Spaces aren't allowed in CSS identifiers.


ParseOptions are not preserved when writing content

create an instance of the editor with parseOptions (https://tiptap.dev/docs/editor/api/editor#parseoptions)
this.tiptapEditor = new Editor({
  ...
  parseOptions: {
    preserveWhitespace: 'full',
  },
  ...

In editor.directive.ts this options are ignored when setting the content and whitespace is collapsed as per HTML's rules.
writeValue(value: Content): void {
  this.editor().chain().setContent(value, false).run();
}
      ...
if (innerHTML) {
  editor.chain().setContent(innerHTML, false).run();
}

To take into account editor configuration, when setting the content, command setContent has third parameter parseOptions.
Code in editor.directive.ts can be changed to.
writeValue(value: Content): void {
  this.editor().chain().setContent(value, false, this.editor().options.parseOptions).run();
}
      ...
if (innerHTML) {
  editor.chain().setContent(innerHTML, false, this.editor.options.parseOptions).run();
}

Can you raise an issue in the TipTap repository to get this clarified? If that is how it should be done we can fix it.

Started discussion https://github.com/ueberdosis/tiptap/discussions/5933

Thanks @vlad-kuz for creating the discussion. It am running on some tight deadline items, so I couldn't reach and follow up with tiptap myself


Select / Option visibility wrongly calculated for very wide options

We are using ~> 2.6.0 and started receiving a visibility related regression.
We're doing:
e.first("select option", text: "General - Private Clients").select_option

but get warnings the element next to it would receive the click
Selenium::WebDriver::Error::UnknownError: Element is not clickable at point<PHONE_NUMBER>011719, 69.16667175292969). Other element would receive the click: <select tabindex="22" class="ember-view ember-select selector" id="ember1875"></select>

It turns out this is because of an extra long option causing the displayed options to be very wide; and Capybara thinks that the non-displayed options would overlap, maybe due to z-index?, with the selected option.

Since all capybara does for select_option when using selenium is tell selenium to click the option unless it's already selected -- this would seem to be a selenium issue.  If you're not already using the latest selenium-webdriver try updating - If you are you may want to report an issue on the selenium project.
As a side note you could write your code as
e.first(:option, "General - Private Clients").select_option

it's not a great benefit when dealing with option elements since the :option selector doesn't add any extra filters, but getting in the habit of using the provided selectors can lead to better reading tests with more flexibility

Looks like https://github.com/SeleniumHQ/selenium/commit/b21a4f52d37588d2938aace2f47c93d442cd052e is probably the fix for your issue - and was released in selenium-webdriver 2.52.0


Setting props on list item

Describe the feature / bug 📝:
Hi, I'm trying to set the tabIndex value of the parent container to -1 of a toast item. As you see in the image below it is currently not at -1 and I cannot see how I can change this.

I believe the tab indexing is targeting the li element. Is there currently a way to set the props on a list item as this would fix the issue? I checked the API documentation and I don't see that it is possible.
It would be cool of it was done via something like this:
  toast(
A custom toast with default styling
, {
    duration: 5000,
    props: {
      tabIndex: -1,
    },
  });

This would only spread the props onto the list item and not affect any other toasts.
Steps to reproduce the bug 🔁:

Create a custom toast via the custom code: https://sonner.emilkowal.ski/toast#custom
Make the toast appear.
Press tab, it will select the toast.

Why would you do that out of curiosity? That would make the toasts inaccessible.

I'm setting tabIndex manually on my custom components inside of the toasts, so they will be accessible.


Gaplayout

What does this implement/fix?
Adds ability to specify a gutter between columns in the Layout object
Any other comments?
Bunch of stuff:

The reason I built this was because my custom widget was taking up the entire column. I'm not sure if this is best practice or not. I noticed when I built the test cases using a TextBox, that the default layout was already leaving a single character gap between the columns... which I suspect was being put there by the TextBox itself? Adding a gutter parm of 3 meant the actual gap between the columns becomes 4. Not sure what is the best approach here, could be just that my own widget really had a bug in it, and in that case spec'ing "gutter=3" should turn into an extra 2 space?
I went with "gutter" rather than "gap" as "gap" is used internally in the comments and I didn't want it to be confused
I did a small re-factor on the assert_canvas_equal() helper function so that the canvas -> text was in its own function. It makes it easier to print the result to the screen when you're trying to figure out what is going on
nosetests appear to be failing with Python 3.11, I down switched to Python 3.9. Something to do with the fact that they moved the Collections.abc.Callable class
The test for the image renderer is failing, but I suspect that's a Pillow version thing. I was unable to install the pinned version of Pillow due to some weirdness with zlib being not found even though it was actually there. I double checked and none of the code I touched is invoked by that test, so I'm assuming it wasn't my fault :)
I see the occasional comment in the code about the "2.0" version, you going to drop Python 2.7 when you go there?

Sorry for the slow reply.  Bunch of responses... :-)

Gutter logic looks good - just some comments on the tests.
I don't believe that any widget deliberately leaves an extra gap on the layout...  They should all fill the specified column.  Is it an integer rounding issue?
i need to look at nosetest at some point.  May have to drop tty testing if I can't fix that...
Yeah - Pillow changes its algorithms and so breaks image rendering tests unless you use the pinned dev version.
Yeah - I plan to drop 2.7 support in the next major update.

Gutter logic looks good - just some comments on the tests.

Yeah, looks like I screwed up and put them in the same branch, which means the second PR includes the changes from the first. This is what happens when you don't code for other people much anymore :)
Do whatever is easiest to compensate for my mistake, either all in one or separate.

Yeah, looks like I screwed up and put them in the same branch, which means the second PR includes the changes from the first. This is what happens when you don't code for other people much anymore :)

Happens to me all the time outside of this project!  :-)  Let's break out ReadBox.  I still want to think a little more on how best to integrate that.

Sure. What's easiest? Want me to create a new PR, or is there something you can do to pick out the file changes?

I've cherry picked and merged manually.


Any option to have it capture gui interface?

I thought "CameraEvent.AfterEverything" might have included the interface stuff, being that its called 'AfterEverything'.. it seems not.

I would like this as well.

I would like this as well.

absolutely, but not in the first role out.
V1 is very much geared towards exporting the image rendering output, while the UI is actully a second stage pass to add to the rendered image.

it seems there is no way other than using RenderTexture (render scene and UI to RenderTexture, record it with another camera).


[stable] std.process: Include program name in exception msg if it cannot be found

On Windows, the message for this common error case wasn't as informative as it should be:
Failed to spawn new process (The system cannot find the file specified.)

Handle this just like on POSIX via a message like:
Executable file not found: 7z.exe

I think https://github.com/dlang/phobos/pull/7394 aimed for the same goal, but at the end was a smaller diff and made fewer assumptions. The author lost interest, perhaps it should be continued instead?

I don't have a preference wrt. extra struct vs. extra param + some more versioning lines - I only care about the msg, as pretty much all ProcessExceptions I've ever seen on Windows were due to some missing program or incomplete PATH, and all I ever wanted to know was what it was trying to invoke. Using the program as additional context for all other CreateProcess errors might be worth it; that was actually my first version, before I checked what happens on Posix, after which I went for a simpler msg consistent with the Posix one.

If we can make things both useful and consistent across platforms, I think that would be a win :)

On Posix, that msg is used when the program is only a name (no dir separator). With a path, it's Not an executable file: ./iDontExist. At least according to run.dlang.io - I'll need to debug why the testcase fails on Posix.

please ping me when this is good to go.

Good now IMO, improving the msg on Posix too if the program contains a slash.

BTW, why did this target stable?

BTW, why did this target stable?

Because I hate waiting for months to finally see a trivial improvement such as this (targeting master now means it shows up in 2.096).

I understand, but there are a lot of other PRs that this would apply to, and if that were to happen, I think that would considerably diminish the value of the stable branch.
There is also the matter that follow-up PRs need to target stable too (see #7727).
Perhaps consider using Digger to easily use the current DMD master? :)

There is also the matter that follow-up PRs need to target stable too

Yes, or wait until stable is merged into master again.

Perhaps consider using Digger to easily use the current DMD master? :)

This was bothering me in production (countless errors due to missing programs and me having no idea what it tried to invoke), where using DMD master is out of the question.

This was bothering me in production (countless errors due to missing programs and me having no idea what it tried to invoke),

I see. I would use Process Monitor for this case, but I'm guessing that wasn't an option.

where using DMD master is out of the question.

FWIW, Digger also allows cherry-picking changes, e.g. stable+phobos#7726.

Another reason to not put things in stable unless necessary: https://github.com/dlang/phobos/pull/7727#discussion_r546227580
@thewilsonator 👆


cilium monitor accepts multiple related-to args

filtering will occur if monitor event doesn't match any related-to args if any are provided by user.

test-me-please

test-me-please


Use standard library data-structures, instead of rustc structures, in cbmc crate.

Description of changes:
Currently, the CBMC crate uses data-structures from the compiler.
This creates unnecessary coupling and will make it harder to seperate into a seperate crate.
Instead, use the std structures.
Resolved issues:
Resolves #ISSUE-NUMBER
Call-outs:

The x.py build raises a warning if you use std::collections::HashMap instead of the FxHashMap from the compiler crate.
This should go away once we move to regular cargo.
Also, this might be slightly slower, as std uses a (slightly slower) randomized hash function than the main compiler.
We can profile, but this should not be a major issue.
Testing:

How is this change tested? Existing reg tests

Is this a refactor change? Yes

Checklist

[ ] Each commit message has a non-empty body, explaining why the change was made
[ ] Methods or procedures are documented
[ ] Regression or unit tests are included, or existing tests cover the modified code
[ ] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

New cbmc:
        Command being timed: "scripts/std-lib-regression.sh"
        User time (seconds): 76.61
        System time (seconds): 65.14
        Percent of CPU this job got: 187%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 1:15.70
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 969192
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 10996
        Minor (reclaiming a frame) page faults: 1262906
        Voluntary context switches: 1069
        Involuntary context switches: 39062
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 6
        Page size (bytes): 4096
        Exit status: 0

old
        Command being timed: "scripts/std-lib-regression.sh"
        User time (seconds): 77.41
        System time (seconds): 65.85
        Percent of CPU this job got: 188%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 1:16.10
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 955544
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 1240
        Minor (reclaiming a frame) page faults: 1270353
        Voluntary context switches: 355
        Involuntary context switches: 41362
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 8
        Page size (bytes): 4096
        Exit status: 0

So same timing, 1% increase in memory usage, which is basically noise.


Unable to generate data

I tried generating data for my postgresql tables but for some reason it is 0 records where as it was able to create the json file in my workspace

Can you post any details? CLI output, JSON, etc.?

Sending the JSON file
client_billing_hierarchy.txt

Like I said on Discord, change the low on the array on the very top to a 1 instead of a 0. I'll also work on fixing whatever caused it to import like this in the first place.


"File not found" error when package and directory structure do not match

There is no clear reason why the package and directory structures have to match, and is a non-requirements as far as the proto team are concerned (from what I know).  So why is the plugin showing an error for this?
Thanks!

It's not a requirement, but that way plugin is able to resolve imports without any additional configuration.
Plugin tries to resolve import against one of "source roots", and if it fails to, it shows an error.
Next plugin release will contain better heuristics for import resolution.

The protocol compiler searches for imported files in a set of directories specified on the protocol compiler command line using the -I/--proto_path flag. If no flag was given, it looks in the directory in which the compiler was invoked. In general you should set the --proto_path flag to the root of your project and use fully qualified names for all imports.

https://developers.google.com/protocol-buffers/docs/proto3#other
protoc resolves imports against "include paths" which are explicitly specified. For a plugin, it is a little bit more complicated, because it should "guess" include paths (except if they are specified in "custom include paths" settings).
All lookups are registered here: https://github.com/protostuff/protobuf-jetbrains-plugin/blob/master/src/main/java/io/protostuff/jetbrains/plugin/reference/file/FilePathReferenceProvider.java#L64
Last change in resolution algorithm that I did - I added https://github.com/protostuff/protobuf-jetbrains-plugin/blob/master/src/main/java/io/protostuff/jetbrains/plugin/reference/file/ProtoFileRelativePathRootsProvider.java - it uses package statement in order to guess "include path". I hoped that it will cover most of the cases, but apparently it does not, so it is still "work in progress".

Thanks for the detailed response!


Bring in vercel-action updates

Heyyyy @gtback looks like I was never added to this repo. So two questions:

Can you add me and Scotty please?
Do you have a suggestion for what to do about the CLA above?

cla/check

Hey @scottybollinger I would love your review on this! Heads up that changes to .github/workflows and examples don't really pertain to us since we don't run either. However good to look over everything to make sure we both agree with brining in outside code 👍
Resolving conflicts now.
CLA policy update: https://github.com/elastic/open-source/issues/303#issuecomment-1405499576

Because I can't change upstream, I have a new PR that will merge all of these changes and updates dist (our one merge conflict). I am leaving this PR open for ease of review but we'll be merging https://github.com/elastic/builder/pull/5 instead.

Also, with all of these changes and failed checks, is there any way we can test this before merging?

I too am confused. Hold please.

In the mean time, would love your eyes on this PR.


New version: Embeddings v0.4.4

Registering package: Embeddings
Repository: https://github.com/JuliaText/Embeddings.jl
Created by: @oxinabox
Version: v0.4.4
Commit: 615fb52ebcacc33d5c7c24e35dd42a01de1573a0
Reviewed by: @oxinabox
Reference: https://github.com/JuliaText/Embeddings.jl/commit/615fb52ebcacc33d5c7c24e35dd42a01de1573a0#commitcomment-126177368
Description: Functions and data dependencies for loading various word embeddings (Word2Vec, FastText, GLoVE)

I would like to merge this anyway.
I don't know why previous release didn't get registered, but it was long enough ago that I don't trust myself to know I didn't have a good reason

I would like to merge this anyway. I don't know why previous release didn't get registered, but it was long enough ago that I don't trust myself to know I didn't have a good reason

It's because I had already bumped the version in the PR and you bumped it again :)


Support for dark theme

Impact Map has low compatibility when running on IntelliJ

im interested please assign me, ill share my proposed solution as soon as u ping me

Feel free to make PRs, thanks


Handle the rename

.k => .dnx
klr => dnx

dnx?

https://www.youtube.com/watch?v=fGx6K90TmCI

LOL :grin:

fixed in #120


replicate

strangely, Lazy lists have it (https://github.com/purescript/purescript-lists/blob/v4.8.0/src/Data/List/Lazy.purs#L155-L155).
But not strict lists. They should have it, no?

Found in Unfoldable: https://github.com/purescript/purescript-unfoldable/blob/v3.0.0/src/Data/Unfoldable.purs#L54-L54
closing


Generated worksheet not showing data

I have the following code which outputs data for a new worksheet, but the existing and new tabs do not display any data when opened in Excel:
`let XLSX = require('xlsx');
let inquirer = require('inquirer');
let getType = require('pinyin-or-hanzi');
let pinyinify = require('hanzi-tools').pinyinify;
inquirer.prompt([{
type: 'input',
name: 'origFileLocation',
message: 'What file do you want to translate?',
default: './test.xlsx'
},
{
type: 'input',
name: 'newFileLocation',
message: 'Where do you want to store the new file?',
default: './newtest.xlsx'
}
]).then(
answers => {
let workbook = XLSX.readFile(answers.origFileLocation);
let firstSheetName = workbook.SheetNames[0];
let worksheet = workbook.Sheets[firstSheetName];
var range = XLSX.utils.decode_range(worksheet['!ref']);
for (let rowNum = range.s.r; rowNum <= range.e.r; rowNum++) {
for (let colNum = range.s.c; colNum <= range.e.c; colNum++) {
let cellName = XLSX.utils.encode_cell({
r: rowNum,
c: colNum
})
let cellObject = worksheet[cellName];
let status = cellObject ? getType(cellObject.v.toString()) : '';
let retValue = status == 'other' ? cellObject.v : (cellObject !== undefined ? pinyinify(cellObject.v) : '');
console.log(retValue);
worksheet[cellName] = retValue;
}
}
console.log(worksheet);
console.log(workbook);
XLSX.utils.book_append_sheet(workbook, worksheet, 'converted');
console.log(workbook);
XLSX.writeFile(workbook, answers.newFileLocation);
}
)`

test.xlsx is the original, which does display data, and newtest.xlsx is the generated file that shows nothing.
newtest.xlsx
test.xlsx
Thanks in advance for your help!

You are overwriting the original cell objects with a string value, you probably want to assign the v key of the object:
// worksheet[cellName] = retValue; // this is wrong
worksheet[cellName].v = retValue; // this sets the value


Allows users to override the QRCodeReaderViewController class

This implements the new open access modifier introduced with Swift 3.0 that allows users to override the class.

I don't know if it is a good idea to allow the inheritance here. If you need update the QRCodeReaderViewController I prefer the composition design instead.
Why do you need to override the controller?

You don't need to subclass the QRCodeReaderViewController now because you can create your own view using the QRCodeReaderContainer object and set it in the builder.

Ok, thanks.


feat: add blob deployments for scripts and predicates

Description
[WIP]
TODO:

[x] Script blob deployment
[x] Script blob deployment tests
[ ] Predicate blob deployment
[ ] Predicate blob deployment tests
[ ] Serialize the loader contract to disk

Now that we are generating more than contract deployment artefacts i.e DeployedScripts, perhaps it makes sense to introduce a new enum that can be returned from the deploy function. Something like
#[derive(Debug, PartialEq, Eq, Clone)]
pub enum DeployedArtifact {
    Contract(DeployedContract),
    Script(DeployedScript),
    Predicate(DeployedPredicate),
}

Then the deploy function could be
/// Builds and deploys contracts, scripts, and predicates from the given path or workspace.
///
/// Contracts are deployed directly, while scripts and predicates are deployed as blobs with generated loaders.
///
/// Returns a vector of `DeployedArtifact` representing all successful deployments.
pub async fn deploy(command: cmd::Deploy) -> Result<Vec<DeployedArtifact>> {
    existing code...

    let mut deployed_artifacts = Vec::new();

    // Deploy contracts
    let deployed_contracts = deploy_contracts(&command, contracts_to_deploy).await?;
    deployed_artifacts.extend(deployed_contracts.into_iter().map(DeployedArtifact::Contract));

    // Deploy scripts
    let deployed_scripts = deploy_scripts(command.clone(), scripts_to_deploy).await?;
    deployed_artifacts.extend(deployed_scripts.into_iter().map(DeployedArtifact::Script));

    // Deploy predicates (when implemented)
    // let deployed_predicates = deploy_predicates(command, predicates_to_deploy).await?;
    // deployed_artifacts.extend(deployed_predicates.into_iter().map(DeployedArtifact::Predicate));

    Ok(deployed_artifacts)
}

Now that we are generating more than contract deployment artifacts i.e DeployedScripts, perhaps it makes sense to introduce a new enum that can be returned from the deploy function. Something like

#[derive(Debug, PartialEq, Eq, Clone)]

pub enum DeployedArtifact {

    Contract(DeployedContract),

    Script(DeployedScript),

    Predicate(DeployedPredicate),

}

Then the deploy function could be

/// Builds and deploys contracts, scripts, and predicates from the given path or workspace.

///

/// Contracts are deployed directly, while scripts and predicates are deployed as blobs with generated loaders.

///

/// Returns a vector of `DeployedArtifact` representing all successful deployments.

pub async fn deploy(command: cmd::Deploy) -> Result<Vec<DeployedArtifact>> {

    existing code...

    let mut deployed_artifacts = Vec::new();

    // Deploy contracts

    let deployed_contracts = deploy_contracts(&command, contracts_to_deploy).await?;

    deployed_artifacts.extend(deployed_contracts.into_iter().map(DeployedArtifact::Contract));

    // Deploy scripts

    let deployed_scripts = deploy_scripts(command.clone(), scripts_to_deploy).await?;

    deployed_artifacts.extend(deployed_scripts.into_iter().map(DeployedArtifact::Script));

    // Deploy predicates

    let deployed_predicates = deploy_predicates(command, predicates_to_deploy).await?;

    deployed_artifacts.extend(deployed_predicates.into_iter().map(DeployedArtifact::Predicate));

    Ok(deployed_artifacts)

}

What are your thoughts Kaya?

Yes, that is what I was planning exactly!

I had to make a slight renaming from our last discussion, rather than calling deployed instances DeployedArtifacts I called them DeployedPackage because we already have a notion of DeploymentArtifact (for serializing the deployment info) and don't want this to be confused with that.

Also please do not take the cargo.lock changes into account. They are going to be reverted back once we have the releases ready. I had to recreate it because cargo wasn't playing very nicely with git based patches that gets updated frequently.

Oh looks like cargo is going crazy because one of our patches is merged, and the branch does not exists anymore 😅, fixing it now.


Add workaround for huge idmap diffs

Pull Request Description
Fixes probably #9198 See this comment for justification. TLDR: the diff algorithm is too slow for our huge idmap.
The proper fix would be to reduce idmap size. Expect tasks for that soon.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[ ] The documentation has been updated, if necessary.
[ ] Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
[x] All code follows the
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
All code has been tested:

[x] Unit tests have been written where possible.
[x] If GUI codebase was changed, the GUI was tested when built using ./run ide build.

The proper fix would be to reduce idmap size. Expect tasks for that soon.

This whole issue would go away if we decided to treat ID maps as ephermal per-session data, instead of storing them in a file.


Performance overhead for non-change actions

Under the 0.x code, and as best I can tell 1.x, it looks like object serialization is run for every single action in the system, regardless of if it changes the state or not. This could lead to overhead both in the JSON stringify calls and the blocking Storage calls.
I'm wondering if it's worthwhile for the storage logic to perform pure checks to see if the state has changed to help improve the general performance of the app, particularly when used in conjunction with libraries like redux-form that can create actions on every keypress.

Noticed the same issue when added a heartbeat action that triggers every second. +1

Just to clarify: state is not deeply cloned on every action. Only the parts that changed are cloned (again, not deeply—depends on what changed). For example, when a todo is edited in TodoMVC app, only that todo object is cloned. The rest of the todo objects are the same. Of course, a root new todo list array is created, pointing to the new object, but the objects themselves are not cloned if they have not changed.  - https://github.com/reactjs/redux/issues/758

Looks like just need to compare (key by key) the previous state to the new state to see if it needs to persist or not. heh, that will be compatible even if using an immutable library
might have a poke on weekend, in same situation with timer running every few seconds hah.

https://github.com/hampsterx/redux-localstorage/commit/7f0407b8d03023972f1076596738e0e152f29914
Won't do a PR as it's on the master branch, not sure how it should be done on 1.x branch
will suffice for my own needs, author's last commit was 4 months ago :(

I agree. This is a real issue. @hampsterx 's solution works great for me.
It seems 1.x is stable now. @elgerlambert can you please tell us how should we integrate this into 1.x? I can do the pull request if you busy, but at the moment I don't know how (or where, to be exact)

Hi guys,
The design decisions that have lead to the direction of 1.x were based on solving this particular issue in an unopinionated way. Storage enhancers allow you to "insert" your own logic in between fetching & persisting the data.
To solve this issue with 1.x you would create a storage enhancer that (reference) checks the state passed to storage.put and either returns if nothing has changed or persist if it has.
I haven't had the chance to put it through its paces and implement this in production yet, but my approach for a project I'm working on will be to create a storage enhancer that splits the store state so that each reducer "slice" is persisted separately, followed by a second storage enhancer that reference checks each slice so that it is only persisted if it's changed. (I'll open source these when implemented)

@elgerlambert any examples of how one can do this?

Haven't found the time to pick up where I left off, but this is the code I was working on:
function splitReducers(storage) {
  return {
    ...storage,

    put(prefix, state, callback) {
      let error;
      let count = 1;
      const keys = Object.keys(state);

      const done = err => {
        if (err) { error = err; callback(err); return; }
        count--;
        if (!count && !error) callback();
      };

      storage.put(`${prefix}/_keys`, keys, (err) => {
        if (err) { callback(err); return; }
        keys.forEach(key => {
          count++;
          storage.put(`${prefix}/${key}`, state[key], done);
        });
        done();
      });
    },

    get(prefix, callback) {
      let error;
      let count = 1;
      const persistedState = {};

      const done = (key, err, value) => {
        if (err) { error = err; callback(err); return; }
        count--;
        if (value) persistedState[key] = value;
        if (!count && !error) callback(null, persistedState);
      };

      storage.get(`${prefix}/_keys`, (err, keys) => {
        if (!keys) { callback(err); return; }
        keys.forEach(key => {
          count++;
          storage.get(`${prefix}/${key}`, done.bind(null, key));
        });
        done();
      });
    }
  };
}

In combination with:
function pureMixin(storage) {
  const previousState = {};
  return {
    ...storage,

    put(key, state, callback) {
      if (previousState[key] === state) { callback(); return; }
      console.log('Persisting', key);
      previousState[key] = state;
      storage.put(key, state, callback);
    },

    get(key, callback) {
      storage.get(key, (err, state) => {
        previousState[key] = state;
        callback(err, state);
      });
    }
  };
}

Apply these as you would any storage enhancer:
export default compose(
  splitReducers,
  pureMixin
)(adapter(localforage));

With the current implementation the _keys object is still persisted every time..

Hey, guys!
I have a similar issue. I use redux to build animation tools and pretty big apps. Performance gets really bad with a lot of actions and a large store because you have to serialize data and access localStorage on every fired action. Of course, in my case, this can overlap with background animations which start to hang and jabber.
My solution over this was to save/load the state exactly once - when a user leaves a page and when a page is loaded. So I have a unified pageHide that saves the state.
Are you planning/considering something like that?
Thanks a lot!

Hi @legomushroom,
Are you effectively saying that you've "whitelisted" a particular event and that your state is only persisted when this event is dispatched? If you could share some code that could help me better understand what you've done, that would be great!
As a side note I would also suggest looking at something like (Mozilla's) localForage for example. localStorage only provides a synchronous (blocking) api that requires all the data to be serialized before persisting. localForage provides an asynchronous (non-blocking) api that doesn't require store state to be JSON.serialized before hand. So this should definitely help in your case since animations will be particularly sensitive to localStorage's blocking api. (requires v1.0.0-rc)

Hi @elgerlambert !
The simplified code is:
window.addEventListener('beforeunload', saveStore);

Of course in cross-browser manner so I target more events. The idea is that you save your store only once - when a user leaves the page.
Thanks a lot for pointing out the localForage, love it. Will try shortly.
Cheers!

I'm just trying out redux-localstorage on a React-Native project with AsyncStorage and ImmutableJS, so my use-case is a little different to the others in this thread, however I found perf to be miserable until I added debounce.
I figured it was worth a mention here, since it goes a long way towards addressing the problem described here (serialization on every action) but is a little less all-or-nothing than @legomushroom's approach.
Of course it would be much sweeter if slices of state were stored separately and only when modified (per @elgerlambert's wip code above), but debounce already appears to reduce the problem to the point of being unnoticeable to me.
const storage = compose(
  debounce(500),
  serialize
)(adapter(AsyncStorage));


add interface firmware for MultiTech xDot platform

@mfiore02 please accept the contributors agreement:
https://developer.mbed.org/contributor_agreement/
Also, you'll need to update info.py before this PR can be tested. To enable full testing (recommended), pyOCD needs to be supported.

@c1728p9 the link you posted says I signed the agreement Tue 16 Dec 2014. I'll push updates to this PR with info.py changes.

What is your mbed account name? I didn't see mfiore02 on mbed.

On mbed it's just mfiore

You'll also want to rebase past #152. If you want this board to be included in the upcoming release package you'll need to update the table PROJECT_RELEASE_INFO.

@c1728p9 our platform uses the daplink bootloader. Assuming that means it is not legacy. So would the following be correct for our line in PROJECT_RELEASE_INFO
("k20dx_xDot-L151_if",                  False,      0x0000,     "bin"       ),

Hi @mfiore02, if you are using the DAPLink booloader on a k20dx than the interface offset would be 0x8000, and legacy would false.  If legacy is false then the the build file k20dx_xDot-L151_if_crc.bin would be packaged rather than k20dx_xDot-L151_if_crc_legacy_0x5000.bin or k20dx_xDot-L151_if_crc_legacy_0x8000.bin. The new line would look something like this:
("k20dx_xDot-L151_if", False, 0x8000, "bin" ),

@c1728p9 glad I checked! Thanks for the speedy response. I'll be pushing updates to the PR momentarily.

Hi @mfiore02, could you push one more updated? I didn't actually post my review comments as I thought I did.

Hi @mfiore02, this PR still has conflicts and needs to be rebased. Also, the target specified for the board is invalid and will fail testing. To make things easier I made these changes and pushed up PR #159. Feel free to pull these changes into your PR here, or discard this PR and use the one I created.

I'm a Daplink noob. Sorry! I'll close this one as yours looks good. Appreciate all your support!


Coon fails if repo fails

If remote is unavailable should log and skip it.

Fixed in https://github.com/comtihon/coon/pull/50


chore: update semantic-release rules

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

Project coverage is 81.48%. Comparing base (eb691c2) to head (5b20235).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #132   +/-   ##
=======================================
  Coverage   81.48%   81.48%
=======================================
  Files          50       50
  Lines        1842     1842
  Branches      344      344
=======================================
  Hits         1501     1501
  Misses        341      341

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


Puppeteer and ServiceWorkers offline mode

Steps to reproduce
Tell us about your environment:

Puppeteer version: 1.3.0
Platform / OS version: CentOS 7 x64
URLs (if applicable): -
Node.js version: 8.11.1

What steps will reproduce the problem?
Please include code that reproduces the issue.

Initialise empty project with puppeteer
Create test file with following content

const puppeteer = require('puppeteer');
(async () => {
  const browser = await puppeteer.launch({ args: ['--no-sandbox']});
  const page = await browser.newPage();
  page.on('console', msg => console.log('PAGE LOG:', msg.text()));
  await page.goto('https://googlechrome.github.io/samples/service-worker/custom-offline-page/', { waitUntil: 'networkidle0' });
  console.log('Setting app offline');
  await page.setOfflineMode(true);
  await page.waitFor(1*2000);
  await page.reload();
  await page.waitFor(1*2000);
  await page.screenshot({path: 'test.png'});
});

Check the resulting screenshot, the page was reloaded but the offline mode was not applied.

What is the expected result?
The resulting screenshot will contain offline page as in classic example https://googlechrome.github.io/samples/service-worker/custom-offline-page/
What happens instead?
Seems like the offline mode is not applied and the page is loaded regularly.
StackOverflow question for reference: Service worker installation in Headless Chrome (via puppeteer)

cc @aslushnikov

@ebidel The following code also does not work:
const client = await page.target().createCDPSession();
...
await client.send('Network.enable');
await client.send('Network.emulateNetworkConditions', {
  offline: true,
  latency: 100,
  downloadThroughput: -1,
  uploadThroughput: -1
});

So, I assume that this could be a problem of DevTools protocol, as the talking straight to DevTools is not working as well.

Is there any update on how to run offline tests that also disable the network for service workers?

Also interested on an update on this. There needs to be a good way to QA service workers for offline mode.

Service workers are their own target (see https://github.com/ChromeDevTools/devtools-protocol/issues/102), so something like the below should work.
;(async () => {
  const puppeteer = require('puppeteer')
  const browser = await puppeteer.launch({headless: false})

  const page = await browser.newPage()
  await page.goto('https://googlechrome.github.io/samples/service-worker/custom-offline-page/', {
    waitUntil: 'networkidle0',
  })
  await page.evaluate('navigator.serviceWorker.ready')

  console.log('Going offline')
  await page.setOfflineMode(true)
  const targets = await browser.targets()
  console.log(targets.map((t) => [t.url(), t.type()]))
  const serviceWorker = targets.find((t) => t.type() === 'service_worker')
  const serviceWorkerConnection = await serviceWorker.createCDPSession()
  await serviceWorkerConnection.send('Network.enable')
  await serviceWorkerConnection.send('Network.emulateNetworkConditions', {
    offline: true,
    latency: 0,
    downloadThroughput: 0,
    uploadThroughput: 0,
  }).catch

  await page.reload({waitUntil: 'networkidle0'})
  await browser.close()
})()

What's weird is that the Network.emulateNetworkConditions on the SW target fails with Error: Protocol error (Network.emulateNetworkConditions): Not supported even though it appears to work.  In fact DevTools itself fails with this error now too. Seems like a Chromium bug, but gets the job done for now 🤷

Ha, that makes a lot of sense - we'll try that! Would probably still be good to have an easier high-level API for that though :-) Thanks a lot Patrick!

See https://bugs.chromium.org/p/chromium/issues/detail?id=1068544 for the Chrome bug.

Just to update folks on this thread, the script I posted does actually work with latest puppeteer even though Chromium is throwing. You'll just need to catch the command and trust it works :)
;(async () => {
  // ... same as example above

  await serviceWorkerConnection.send('Network.emulateNetworkConditions', {
    offline: true,
    latency: 0,
    downloadThroughput: 0,
    uploadThroughput: 0,
  }).catch(() => {}) // <-- this catch is new

  // ... same as example above
})()

https://chromium-review.googlesource.com/c/chromium/src/+/2199476 will remove the need for the catch eventually.

Amazing, thanks! Now Grygorii's and my dream can come true, to scan the web for the best offline page ever built :-D

Closing this since it's now resolved. Thanks everyone!

Other types of web workers also fall under this same issue. Above code doesn't work since the other types of web workers are of type other.
Here's the console output from @patrickhulce 's fix:
[
  [ 'about:blank', 'page' ],
  [ '', 'browser' ],
  [ 'http://localhost:8080/', 'page' ],
  [ 'http://localhost:8080/service-worker.js', 'service_worker' ],
  [ 'http://localhost:8080/worker.js', 'other' ]
]

and here's the code that would get the service worker and Worker working
const workers = targets.filter((t) => t.type() === 'service_worker' || t.type() === 'other');
for (const worker of workers) {
  const workerConnection = await worker.createCDPSession();
  await workerConnection.send('Network.enable');
  await workerConnection.send('Network.emulateNetworkConditions', {
    offline: true,
    latency: 0,
    downloadThroughput: 0,
    uploadThroughput: 0,
  }).catch(() => {});
}

Notice how I put the catch back in, as https://chromium-review.googlesource.com/c/chromium/src/+/2199476 did not remove the need for catch for the other type. Same error, Protocol error (Network.emulateNetworkConditions): Not supported.


Remove ReactiveUI from DI test projects

Let's try and keep RxUI out of the Splat project (along with Rx in general).
If any of these are specific functionality needed by RxUI lets move to the RxUI test project in that repository.

This was completed by #285


Speed up validator key loading

Description
Investigate ways to speed up validator key loading. scrypt encrypted keystores are inherently slow to load but pbkdf2 should be faster and Teku is still pretty slow.
We should investigate what we can do to speed up loading pbkdf2 keys and what other options are available to load keys faster (e.g. alternative key storage formats etc).

echo "First: $(docker logs besu-teku-beacon-1 2>&1 | grep "Loaded validator key" | head -n1)" && echo "Last: $(docker logs  besu-teku-beacon-1  2>&1 | grep "Loaded validator key" | tail -n1)"
First: 2024-09-24 09:30:09.551 INFO  - Loaded validator key 10 of 4000.
Last: 2024-09-24 09:47:22.347 INFO  - Loaded validator key 4000 of 4000.

beacon-1     | 2024-09-24 09:47:17.188 INFO  - Loaded validator key 3980 of 4000.
beacon-1     | 2024-09-24 09:47:19.484 INFO  - Loaded validator key 3990 of 4000.
beacon-1     | 2024-09-24 09:47:22.347 INFO  - Loaded validator key 4000 of 4000.

almost 3s load 10 key, sir @ajsutton @rolfyone rolfyone  Is there any plan to further optimize it? or take this part https://github.com/Consensys/teku/blob/fd599c4cfc587dcc9d35d2270760759e4901d61f/validator/client/src/main/java/tech/pegasys/teku/validator/client/loader/MultithreadedValidatorLoader.java#L83 as the configuration parameter

It's possible to re-encode the keys to be less strongly encrypted... I'd prefer to not load them into database without good encryption, i do think file storage is what we want...
Currently this has been on our backlog for a fair period of time and we've just had too many core changes to spend the time we need to dig into what else may be done to be honest. Your comment is the first since 2022...

If key loading time is an issue, you can try converting the keystores from Scrypt (the default format from most deposit tools) to PBKDF2 format. This tool comes from a reputable team. Teku will happily load these instead.
Scrypt is slow (and memory hungry) by design; PBKDF2 is much, much faster, but more easily brute-forced as a result. So you takes your choice.

If key loading time is an issue, you can try converting the keystores from Scrypt (the default format from most deposit tools) to PBKDF2 format. This tool comes from a reputable team. Teku will happily load these instead.
Scrypt is slow (and memory hungry) by design; PBKDF2 is much, much faster, but more easily brute-forced as a result. So you takes your choice.

@benjaminion  thks for your advice! I recently ran a different client combination with the same amount of keys, and found that teku's performance has a magnitude gap compared with other cl clients.

@ohko4711 are you referring Scrypt or PBKDF2 encrypted keys?

@ohko4711 are you referring Scrypt or PBKDF2 encrypted keys?

as user/validator, I just figured out that teku is slowly when loading a lot of keys than lighthouse/prysm, at that time I didn’t know lighthouse/prysm  is Scrypt or PBKDF2

Aiui both Prysm and Lighthouse have an initial key-import process when you set them up, and then store the keys in their own format internally for future use. We took a decision not to do this for Teku since we didn't want to override the user's key-security model.
It could be revisited, but (1) I'd imagine that most set-ups with a lot of keys are likely using a remote signer such as Web3Signer, and (b) it can be worked around by converting the keystores to PBKDF2 for those whom it is a problem and are happy with the tradeoffs.


[BEAM-1572] Adding per-stage level matching of metrics filters.

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[x] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[x] Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
[x] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[x] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

Also fixed a bug in Python metrics.

r: @bjchambers

Coverage increased (+0.02%) to 69.164% when pulling 7552af4b159db0cf592d9f78c5be9742ed8a035f on pabloem:metrics-filter into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.

Coverage increased (+0.01%) to 69.16% when pulling 7552af4b159db0cf592d9f78c5be9742ed8a035f on pabloem:metrics-filter into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.

Coverage increased (+0.2%) to 69.301% when pulling d935862ecfa666b2a358f4b1971c03faeea609c8 on pabloem:metrics-filter into c8dfb851cdcb24a9afb01416598d2881e449f079 on apache:master.


Added support for PIVX

Description
We have added support for PIVX, a bitcoin based blockchain. Since the transaction structure, signing process, address, etc. are same as bitcoin, we have not created new Address or Signer classes.
Testing instructions
We have added all the common cpp, swift and kotlin tests.
Types of changes

New feature (non-breaking change which adds functionality)

Checklist

[ ] Prefix PR title with [WIP] if necessary.
[x] Add tests to cover changes as needed.
[ ] Update documentation as needed.

Could you please check this bitcoin-forks-checklist?, make sure you have all covered

I've gone through the checklist and added all the missing tests. The PR is now ready for review. The android test might need to be re-run.

Wait for https://github.com/TrustWallet/wallet-core/pull/521

Hi, we add two new fields to coins.json:

url: project homepage url
rpcNodeInfo: rpc node software, for bitcion and forks, it's blockbook

Does blockbook support PIVX?

please also provide public blockbook node url, thanks!

Does blockbook support PIVX?
Yes, PIVX is in blockbook's  Port Registry. I don't think we need a separate url then, do we?

Are there any issues still with the PR?

Sorry for late reply, we have an updated requirements now, it looks like PIVX doesn’t rank top 100 in CMC.

Thanks for your efforts, let's cose it now