Letsencrypt Certificates

I've been testing the proxy and have been continually starting and stopping the binary which has landed me in the dog house;
ERRO[09-15 20:27:05] failed to renew certificate: failed to obtain certificate:
  - acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates (5) already issued for this exact set of domains in the last 168 hours: {domains}, retry after 2024-09-17T08:39:24Z: see https://letsencrypt.org/docs/duplicate-certificate-limit/

So it looks like I've been banned from letsencrypt for 168 hours.
==========================
Would it perhaps be beneficial to add a --staging flag to use the letsencrypt staging server (acme-staging-v02) instead of live (acme-v02.api)? This would increase the new order certificates to 1,500 new orders per 3 hour period versus the 5 which you get from live.
Or maybe just logic which searches for cert.crt and priv.key and foregoes grabbing another cert if they're found?
Appreciate your work. Loving the proxy so far.

please see compose.example.yml, you should mount the ./certs folder to container, in order to store obtained certs: "- ./certs:/app/certs". And happy to inform you that, v0.5-rc1 is out, I may consider this version is way better than v0.4. You may want to give it a try

If there are certs already in certs/, autocert will still run and check for existing cert and its expiry date. It should not request a new cert if the existing one is not expired, check the source code for that.
If it is still trying to obtain a new cert, check the working directory when you run go-proxy.

I pulled the repo to /opt/proxy and ran the setup. I pulled the initial certificates and they are in /opt/proxy/certs/, but each time I run ./go-proxy it query's letsencrypt for new certificates.

Sorry for your bad experience, please give me some time to check and fix. Thank you for trying go-proxy out.

Hi, I have just tested it out and did not face the same issue as yours,

And my config is:
autocert:
  email<EMAIL_ADDRESS>  domains:
    - "domain.tld"
    - "*.domain.tld"
  provider: cloudflare
  options:
    auth_token: <token>
...

I removed the entire environment and started over from a fresh git pull. I wasn't able to replicate the previous error, or rather I should say I can't get that far anymore;
❯ ./go-proxy
ERRO[09-16 16:26:41] open certs/cert.crt: no such file or directory  module=main
INFO[09-16 16:26:41] Now attempting to obtain a new certificate...  module=main
2024/09/16 16:26:41 [INFO] acme: Registering account for<EMAIL_ADDRESS>2024/09/16 16:26:41 [INFO] [hostname.dev, *.hostname.dev] acme: Obtaining bundled SAN certificate
INFO[09-16 16:26:41] starting http proxy server on :80
INFO[09-16 16:26:41] starting http api server on :8888
panic: no certificate available

goroutine 41 [running]:
github.com/yusing/go-proxy/autocert.(*Provider).ShouldRenewOn(...)
        /opt/proxy/src/autocert/provider.go:115
github.com/yusing/go-proxy/autocert.(*Provider).ScheduleRenewal(0xc00044a180, {0xae24a0, 0xc00008c1e0})
        /opt/proxy/src/autocert/provider.go:133 +0x446
created by main.main in goroutine 1
        /opt/proxy/src/main.go:90 +0xd72

config.yml;
autocert:
  email<EMAIL_ADDRESS>  domains:
    - "hostname.dev"
    - "*.hostname.dev"
  provider: cloudflare
  options:
    auth_token: "token"
providers:
  include:
    - providers.yml

providers.yml;
hostname:
  host: {ip}
  port: 9010
docker:
  host: {ip}
  port: 9001

Do you see anything that jumps out at you? I'm at a loss.

I've checked my code for autocert, there are a few bugs. I'm working on it, should inform you in case they're fixed.

Hi, it should be fixed, please git pull again and test it out.

OK. I've pulled the new tag, and built with go.
First run;
2024/09/17 10:25:11 [INFO] acme: Registering account for<EMAIL_ADDRESS>2024/09/17 10:25:11 [INFO] [domain.dev, *.domain.dev] acme: Obtaining bundled SAN certificate
2024/09/17 10:25:11 [INFO] [*.domain.dev] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/404829716146
2024/09/17 10:25:11 [INFO] [domain.dev] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/404829716156
2024/09/17 10:25:11 [INFO] [*.domain.dev] acme: use dns-01 solver
2024/09/17 10:25:11 [INFO] [domain.dev] acme: Could not find solver for: tls-alpn-01
2024/09/17 10:25:11 [INFO] [domain.dev] acme: Could not find solver for: http-01
2024/09/17 10:25:11 [INFO] [domain.dev] acme: use dns-01 solver
2024/09/17 10:25:11 [INFO] [*.domain.dev] acme: Preparing to solve DNS-01
2024/09/17 10:25:12 [INFO] cloudflare: new record for domain.dev, ID 83b09b9098c57b78f0faecb72522de1f
2024/09/17 10:25:12 [INFO] [domain.dev] acme: Preparing to solve DNS-01
2024/09/17 10:25:12 [INFO] cloudflare: new record for domain.dev, ID 4af5a69873a0f4df0876745492d4342e
2024/09/17 10:25:12 [INFO] [*.domain.dev] acme: Trying to solve DNS-01
2024/09/17 10:25:12 [INFO] [*.domain.dev] acme: Checking DNS record propagation. [nameservers=<IP_ADDRESS>:53]
2024/09/17 10:25:14 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/09/17 10:25:15 [INFO] [*.domain.dev] acme: Waiting for DNS record propagation.
2024/09/17 10:25:17 [INFO] [*.domain.dev] acme: Waiting for DNS record propagation.
2024/09/17 10:25:22 [INFO] [*.domain.dev] The server validated our request
2024/09/17 10:25:22 [INFO] [domain.dev] acme: Trying to solve DNS-01
2024/09/17 10:25:22 [INFO] [domain.dev] acme: Checking DNS record propagation. [nameservers=<IP_ADDRESS>:53]
2024/09/17 10:25:24 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2024/09/17 10:25:28 [INFO] [domain.dev] The server validated our request
2024/09/17 10:25:28 [INFO] [*.domain.dev] acme: Cleaning DNS-01 challenge
2024/09/17 10:25:29 [INFO] [domain.dev] acme: Cleaning DNS-01 challenge
2024/09/17 10:25:29 [INFO] [domain.dev, *.domain.dev] acme: Validations succeeded; requesting certificates
2024/09/17 10:25:32 [INFO] [domain.dev] Server responded with a certificate.
INFO[09-17 10:25:32] certificate "domain.dev": expire on 2024-12-16 13:26:58 +0000 UTC  module=main
INFO[09-17 10:25:32] certificate "*.domain.dev": expire on 2024-12-16 13:26:58 +0000 UTC  module=main
INFO[09-17 10:25:32] starting http proxy server on :80
INFO[09-17 10:25:32] starting https proxy server on :443
INFO[09-17 10:25:32] starting http api server on :8888

On second run, the previously pulled certificates were used. 👍🏻 Awesome!


pull docker image from remote repository and run on PCF DEV

I have a Docker image hosted on a remote Nexus repository that I want to run on a local PCF DEV Virtual Machine (running version 1.11).
My manifest.yml file looks like this:

applications:

name: image-name
instances: 1
random-route: true
docker:
image: url-to-repo/image-name

But i get a "Failed getting docker image by tag: Received unexpected HTTP status: 504 Unknown Host Going to retry attempt: 1" message. How do I go about running a docker image on my local Windows PCF DEV VM?

See: https://docs.pivotal.io/pcf-dev/configuring.html#insecure-docker-registries


Renamer crashes when attempting to concatenate a string with None

For one of my python projects pyobf2 crashes with the following trace:
Traceback (most recent call last):
  File "/data/src/pyobf2/examples/api/batch/main.py", line 47, in <module>
    main()
  File "/data/src/pyobf2/examples/api/batch/main.py", line 36, in main
    for _ in obf.do_obfuscation_batch_ast(list(in_asts.values()), list(in_asts.keys())):
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/__init__.py", line 108, in do_obfuscation_batch_ast
    source_asts[i] = fix_missing_locations(x.transform(s_ast, s_fn, source_asts, source_file_names))
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/transformers/memberRenamerTransformer.py", line 30, in transform
    MappingApplicator(generator.mappings).visit(ast)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 398, in visit_ClassDef
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 371, in visit_FunctionDef
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 416, in visit_Call
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 416, in visit_Call
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 416, in visit_Call
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 387, in visit_ListComp
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 416, in visit_Call
    self.generic_visit(node)
  File "/usr/lib/python3.11/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.11/ast.py", line 418, in visit
    return visitor(node)
           ^^^^^^^^^^^^^
  File "/data/src/pyobf2.venv/lib/python3.11/site-packages/pyobf2/lib/renamer.py", line 407, in visit_Call
    search_str = "mt_" + node.func.id + "_arg_" + k.arg
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
TypeError: can only concatenate str (not "NoneType") to str

Unfortunately it doesn't reveal which code / part of my project might be at fault here :/

The code making trouble seems to be in a list comprehension in a function in a class somewhere, can you share all snippets that match that description? should roughly look something like this: ```py
class Abc:
def abc():
[something() for x in something]

Or, if you're fine with sharing all of your code, please do that.

Alternatively, you can DM me the code on discord @ `0x150`, if you don't want to publicly post it

on further inspection, it might have something to do with keyword args. if you have a call somewhere that uses keyword args, in a list comprehension, in a method definition in a class, that might be it

Thanks for the immediate response - is there a way to narrow it down for me? Like, at least which file is currently being parsed / operated on?

Found the offending part:
'{proto}://{host}:{port}/{path}/{call}?{cgi_params}'.format(proto=X['proto'], host=X['host'], port=PROV['port'], path=X['path'], call=call, cgi_params=''.join(["%s=%s&"%(k,v) for k,v in dict(**cgiparams, **X['params']).items()]))

that sounds about right, yeah i know what went wrong. i'll fix it in a bit

Alternatively, you can DM me the code on discord @ 0x150, if you don't want to publicly post it

I'm not familiar with navigating through discord, but the only seemingly feasible option was adding a user as "friend" - which resulted in it telling me 0x150 doesn't accept friend requests.

fixed in a rather unsatisfying manner with 12a236a


Build project with JDK 1.6

This changes will resolve #4, because you dont need to install lesser JDK on system to compile for that JDK. Any JDK itself can compile to lesser JDK version, if compabilty of source code if supported.

@valery1707 Hey, sorry I totally dropped the ball on getting a release out. I just moved and I completely forgot. I'm working on the release right now.

@valery1707 Just released 1.1.1-SNAPSHOT, let me know if that solves your problem and I'll promote it.

Yes, my problem is solved - thanks!


[Question]: How to enable AWS Bedrock

What is your question?
I configured ENDPOINTS=openAI,google,gptPlugins,AWS Bedrock in the .env file, but I cannot select AWS Bedrock. How can I enable AWS Bedrock?
More Details
AWS Bedrock
What is the main subject of your question?
No response
Screenshots
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

you need to add
BEDROCK_AWS_DEFAULT_REGION=us-east-1
BEDROCK_AWS_ACCESS_KEY_ID=your_access_key_id
BEDROCK_AWS_SECRET_ACCESS_KEY=your_secret_access_key
BEDROCK_AWS_MODELS=
on your .env file also


The first run is significantly faster even if .warmup() is used

I've been comparing the performance of two versions of the same function, and I've noticed that the first one is always significantly faster, possibly due to JIT.
bench.mjs
import { Bench } from "tinybench"

(async () => {
    const bench = new Bench()

    for (const [k, v] of Object.entries({
        "a": (i) => i, // The simpler the compared function, the greater the difference in ops/sec.
        "b": (i) => i,
        "c": (i) => i, // Comparing three functions to illustrate that only the first one is fast.
    })) {
        bench.add(k, () => {
            for (let i = 0; i < 1000; i++) {
                v(i)
            }
        })
    }

    await bench.run()
    console.table(bench.table())
})()

$ node bench.mjs
┌─────────┬───────────┬───────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │  ops/sec  │ Average Time (ns)  │  Margin  │ Samples │
├─────────┼───────────┼───────────┼────────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '847,777' │ 1179.5548020515819 │ '±1.01%' │ 423889  │
│    1    │    'b'    │ '76,335'  │ 13100.02999778449  │ '±0.41%' │  38168  │
│    2    │    'c'    │ '80,586'  │ 12409.009305943227 │ '±0.32%' │  40294  │
└─────────┴───────────┴───────────┴────────────────────┴──────────┴─────────┘

I've also tried increasing time and using .warmup() but it didn't help so much.
import { Bench } from "tinybench"

(async () => {
    const bench = new Bench({ time: 5000, warmupTime: 5000, warmupIterations: 100 })

    for (const [k, v] of Object.entries({
        "a": (i) => i,
        "b": (i) => i,
        "c": (i) => i,
    })) {
        bench.add(k, () => {
            for (let i = 0; i < 1000; i++) {
                v(i)
            }
        })
    }

    await bench.warmup()
    await bench.run()
    console.table(bench.table())
})()

$ node bench.mjs
┌─────────┬───────────┬─────────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns)  │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼────────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '1,098,539' │<PHONE_NUMBER>649747  │ '±0.16%' │ 5492697 │
│    1    │    'b'    │  '96,670'   │ 10344.420296798786 │ '±0.33%' │ 483353  │
│    2    │    'c'    │  '94,520'   │ 10579.704557811108 │ '±0.32%' │ 472603  │
└─────────┴───────────┴─────────────┴────────────────────┴──────────┴─────────┘

Am I missing something? Or could there be an option to run benchmarks in the sequence of a, b, c, a, b, c, ...?

Versions:

tinybench: 2.5.0
Node.js: Tested on 16.16.0, 18.11.0, and 20.0.0
OS: Tested on Ubuntu 22 and RunKit

Have you tried adding a noop function? bench.add('noop, () => {}) as the first task? let me know the results.

This is interesting. Part of it seems to be something with for (const [k, v] of Object.entries()). When I run with
for (const [k, v] of Object.entries({
    "a": (i) => i,
    "b": (i) => i,
    "c": (i) => i,
})) {
    bench.add(k, () => {
        for (let i = 0; i < 1000; i++) {
            v(i)
        }
    })
}

I get the following result:
┌─────────┬───────────┬─────────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns)  │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼────────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '3,371,257' │<PHONE_NUMBER>640348  │ '±0.36%' │ 1685629 │
│    1    │    'b'    │  '282,824'  │ 3535.7620041612818 │ '±0.10%' │ 141413  │
│    2    │    'c'    │  '276,717'  │ 3613.790052803212  │ '±0.06%' │ 138359  │
└─────────┴───────────┴─────────────┴────────────────────┴──────────┴─────────┘

which corresponds with your results. Somewhat surprising we get a similar result, although not as 'extreme', with the following:
function a(i: number) {
    return i + 1;
}

for (const [k, v] of Object.entries({
    a: a,
    b: a,
    c: a,
})) {
    bench.add(k, () => {
        for (let i = 0; i < 1000; i++) {
            v(i)
        }
    })
}

and the results:
┌─────────┬───────────┬─────────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns)  │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼────────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '3,435,444' │<PHONE_NUMBER>293736  │ '±0.31%' │ 1717723 │
│    1    │    'b'    │ '1,996,490' │<PHONE_NUMBER>915326  │ '±0.27%' │ 998246  │
│    2    │    'c'    │ '1,995,535' │<PHONE_NUMBER>6961496 │ '±0.04%' │ 997768  │
└─────────┴───────────┴─────────────┴────────────────────┴──────────┴─────────┘

(would assume a(i) could be optimized in the same way for every entry.)
This is consistent;  you change the order and the first task is always way faster.
But if we instead do the following:
bench.add("a", () => {
    for (let i = 0; i < 1000; i++) {
        a(i);
    }
});
bench.add("b", () => {
    for (let i = 0; i < 1000; i++) {
        a(i);
    }
});
bench.add("c", () => {
    for (let i = 0; i < 1000; i++) {
        a(i);
    }
});

the results changes:
┌─────────┬───────────┬─────────────┬───────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns) │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼───────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '1,962,552' │<PHONE_NUMBER>036191 │ '±0.31%' │ 981277  │
│    1    │    'b'    │ '3,395,278' │<PHONE_NUMBER>733146 │ '±0.08%' │ 1697640 │
│    2    │    'c'    │ '3,406,314' │<PHONE_NUMBER>795157 │ '±0.17%' │ 1703158 │
└─────────┴───────────┴─────────────┴───────────────────┴──────────┴─────────┘

And when we add a "noop" task (bench.add("noop", ()=>{})) the results is the following:
┌─────────┬───────────┬──────────────┬───────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec    │ Average Time (ns) │  Margin  │ Samples │
├─────────┼───────────┼──────────────┼───────────────────┼──────────┼─────────┤
│    0    │  'noop'   │ '15,179,119' │ 65.87997525602914 │ '±0.34%' │ 7589560 │
│    1    │    'a'    │ '3,373,602'  │<PHONE_NUMBER>3958  │ '±0.14%' │ 1686802 │
│    2    │    'b'    │ '3,377,632'  │<PHONE_NUMBER>008033 │ '±0.51%' │ 1688818 │
│    3    │    'c'    │ '3,409,823'  │<PHONE_NUMBER>713696 │ '±0.19%' │ 1704912 │
└─────────┴───────────┴──────────────┴───────────────────┴──────────┴─────────┘

Seems to be consistent (even without await bench.warmup().)
So it could be fine if we just run a "noop" operation for around 1 second in every call to bench.run() to  allow the engine to "JIT" the code?

That can be a good solution to be injected in the library! and then removed from the results.

I encountered this too. I "solved" my problem by doing a bunch of warmup runs before running the actual runs. This shim seemed to work rather well for sync-only stuff:
for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
  f();
}
for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
  start = now();
  f();
  end = now();
  total += end - start;
  count++;
}

const bench = {
  tasks: [],
  results: {},
  add(n, f) {
    this.tasks.push([n, f]);
  },
  run() {
    let start;
    let end;
    const now = process.hrtime.bigint;
    let n;
    let f;
    let x;
    let y;
    let count = 0n;
    let total = 0n;
    for (let i = 0; i < this.tasks.length; i++) {
      n = this.tasks[i][0];
      f = this.tasks[i][1];
      for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
        f();
      }
      for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
        start = now();
        f();
        end = now();
        total += end - start;
        count++;
      }
      this.results[n] = total / count;
    }
  },
  table() {
    return this.results;
  },
};

function a(i) {
  return i + 1;
}

for (const [k, v] of Object.entries({
  a: a,
  b: a,
  c: a,
})) {
  bench.add(k, () => {
    for (let i = 0; i < 1000; i++) {
      v(i);
    }
  });
}

await bench.run();
console.table(bench.table());

I think we should somehow add a noop warmup to benchmarking, so users won't have to do it themselves.

I think this might be fixable by re-working the way you divide between warmup() and run() and doing something like this:
// default to TRUE
await bench.run()
await bench.run({ warmup: true })
await bench.run({ warmup: false })

That way you let the JIT optimize per run instead of all upfront which then gets destroyed after you're done with the first task. basically this:
// WARMUP PART
for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
  f();
}

// ACTUAL BENCHMARK
for (x = now(), y = x +<PHONE_NUMBER>n; x < y; x = now()) {
  start = now();
  f();
  end = now();
}

👆 at least that kind of strategy worked for me 🤷♂ might be worth a try

@weedz @jcbhmr @yy0931 Hey folks, please try #50 and let me know.

@weedz @jcbhmr @yy0931 Hey folks, please try #50 and let me know.

Can also confirm it seems to be working fine now. Much more consistent results :+1: (only tested on node 20.5)

Hello, a java passerby here.
First things first. If you deoptimize the code, there's little sense in benchmarking it. While i don't have a full insight into node, at this point you're either benchmarking a low-quality JIT pass, or, even worse, an interpreter. Benchmarking tools are supposed to gather data about real life scenarios, and in those we expect functions to be optimized. There are no guarantees that if F1 is deoptimizedly faster than F2, then the relation is preserved under optimizations. Further, benchmarking exists not to get fancy numbers, but rather to find the root causes and explanations (and, of course, there is an explanation for this behavior). I also found it a bit surprising that the issue is rather ignored than researched - benchmarking tools have to be very certain about the results they provide, and pursuing just a stable output doesn't guarantee it's correct, so whenever a thing like this appears in the background, it has to be researched, otherwise it's possible that every result obtained by the tool is wrong.
Now to the gory explanatory stuff. It turned out to be pretty simple; i've observed the same behavior in toy scripts.
The first clue is the fact that only the first benchmark exhibits strange behavior, no matter how you shuffle them. Moreover, it is not some kind of an outlier, because no matter how long you run it, the numbers and relations are the same. The problem here is systematic and infrastructure-level; the first question would be if it's a framework or something deeper. As i've mentioned toy scripts - we can be certain it's the node itself. To continue poking the problem, we can look into the fact that while functions are identical, they are not the same object. What if all three benchmarks would be the same function? This result
┌─────────┬───────────┬─────────────┬───────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns) │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼───────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '2,971,961' │<PHONE_NUMBER>840262 │ '±2.02%' │ 1485981 │
│    1    │    'b'    │  '201,559'  │ 4961.308762490288 │ '±0.66%' │ 100780  │
│    2    │    'c'    │  '180,084'  │ 5552.938490784653 │ '±0.21%' │  90043  │
└─────────┴───────────┴─────────────┴───────────────────┴──────────┴─────────┘

Transforms into
┌─────────┬───────────┬─────────────┬───────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec   │ Average Time (ns) │  Margin  │ Samples │
├─────────┼───────────┼─────────────┼───────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '3,036,416' │<PHONE_NUMBER>034027 │ '±0.38%' │ 1518209 │
│    1    │    'b'    │ '1,760,917' │<PHONE_NUMBER>123154 │ '±0.24%' │ 880459  │
│    2    │    'c'    │ '1,729,899' │<PHONE_NUMBER>101545 │ '±0.37%' │ 864950  │
└─────────┴───────────┴─────────────┴───────────────────┴──────────┴─────────┘

So we're on the right track here. There is an optimization that relies on the fact that identical input is used. Are there any additional differences in the invocations of the first and the second benchmark? It's the name, k in the example above. I've struggled to provide a further example that would demonstrate that with elimination of it the issue would (should) be fully gone, but thankfully at this point i simply now what's happening, so i can stop with investigation here and just proceed with something that would actually convert guesses into a ground truth. I've restored the original benchmark, converted arrow functions into named ones and renamed Task.run into Task.runTask for filtering:
node --print-bytecode --print-bytecode-filter=run --print-opt-code src/reproduction.js  | tee dist/dissect

This will produce unpleasant thousands lines of output, but the answer is there. Ctrl + F 'runTask' ->
--- Optimized code ---
optimization_id = 12
source_position = 3260
kind = TURBOFAN
name = runTask
...
optimization_id = 16
name = runTask
...
optimization_id = 17
name = runTask

The Task.run itself is being recompiled. If there is only one benchmark, there is a single compilation; if there are 2+, there are three compilations. I don't have time to spend on finding out the reason of the third one appearing (if you check it, there's a fun fact), but let's look at the first two
Inlined functions (count = 5)
 0x084663c1f3b9 <SharedFunctionInfo g>
 0x084663c1c539 <SharedFunctionInfo>
 0x084663c1c3f9 <SharedFunctionInfo a>
 0x11773271baf1 <SharedFunctionInfo now>
 0x24c7eecd08e1 <SharedFunctionInfo hrtime>
...
Inlined functions (count = 4)
 0x084663c1f3b9 <SharedFunctionInfo g>
 0x084663c1c539 <SharedFunctionInfo>
 0x11773271baf1 <SharedFunctionInfo now>
 0x24c7eecd08e1 <SharedFunctionInfo hrtime>

The benchmark function isn't inlined anymore, because, well, this run doesn't include it - and TurboFan has to recompile everything it has previously assembled in a giant blob, keeping in mind that everything except a is left the same.  This is not just the benchmark code, this is a fusion of benchmark code and the framework. Let's do one last thing to keep the fun rolling. To put things to extreme:
(async () => {
  const bench = new Bench();

  bench.add('a', (i?: number) => i);

  await bench.warmup();
  await bench.run();
  console.table(bench.table());
})();

results:
┌─────────┬───────────┬──────────────┬───────────────────┬──────────┬─────────┐
│ (index) │ Task Name │   ops/sec    │ Average Time (ns) │  Margin  │ Samples │
├─────────┼───────────┼──────────────┼───────────────────┼──────────┼─────────┤
│    0    │    'a'    │ '16,953,858' │ 58.98362307122657 │ '±1.01%' │ 8476930 │
└─────────┴───────────┴──────────────┴───────────────────┴──────────┴─────────┘

We don't get much of a suspense here yet. However, as we know now, the function is inlined. While anything can be expected from an interpreted language (and others too, just not so often), including excessive machine code in some specific cases, 60ns translates to 240 cycles at 4GHz, which is somewhat my machine should be running at. For an inlined function that does absolutely nothing it's a bit too much, it should literally take zero instructions.
Let's fiddle with Task.run once more:
        } else {
          const taskStart = this.bench.now();
          for (let i = 0; i < 131072; i++) {
            this.fn();
          }
          taskTime = this.bench.now() - taskStart;
        }

        samples.push(taskTime / 131072);
        this.runs += 131072;
        totalTime += taskTime;

And then we get
┌─────────┬───────────┬─────────────────┬────────────────────┬───────────┬─────────┐
│ (index) │ Task Name │     ops/sec     │ Average Time (ns)  │  Margin   │ Samples │
├─────────┼───────────┼─────────────────┼────────────────────┼───────────┼─────────┤
│    0    │    'a'    │ '3,378,147,010' │ 0.2960202729157641 │ '±23.18%' │  12887  │
└─────────┴───────────┴─────────────────┴────────────────────┴───────────┴─────────┘

That's one CPU cycle per call, which is likely to be the loop increment. Technically, JIT should have dropped the loop altogether, because this code does virtually nothing, but i guess we're not there yet. Why am i getting to it? If this would be the result from the very beginning, guessing the inlining thing would be trivial.
Of course, this deserves a bit of explanation itself. The timer calls are not free, they are relatively expensive (55ns, as we see), so this benchmark actually measures timer rather than the passed code. What's happening is that the timer function is preamble ... actual time snapshot ... aftertaste, and when there are two calls with a benchmark in between, the difference of the snapshots is rather afterstaste + benchmark + preamble than just benchmark
Dear god. How this can be fixed!?
In java, we do some compiler instructions about what can and can't be inlined. We're a bit blessed with that - node doesn't seem to have function-specific knobs, only global ones. However, there is an escape hatch (and we use it too, for the same reasons) - each benchmark should run in a separate process (and these processes must not run in parallel). In that case, all optimizations are restricted to whatever code is provided by the user, and it's their responsibility to supply homogeneous or heterogeneous input to reflect their real workload. This is still far from perfect - JIT may decide to inline one thing and forget about the other - but at least gives a decent chance to compare apples to apples.


implement custom extraction option for http4s

related to the pull request to implement for akka, this adds the custom extraction option for http4s
Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

[ x] I acknowledge that all my contributions will be made under the project's license.

Codecov Report

Merging #810 into master will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #810      +/-   ##
==========================================
+ Coverage   82.80%   82.95%   +0.14%
==========================================
  Files          73       73
  Lines        5404     5428      +24
  Branches      146      149       +3
==========================================
+ Hits         4475     4503      +28
+ Misses        929      925       -4

Impacted Files
Coverage Δ

...drail/generators/Scala/Http4sServerGenerator.scala
95.65% <100.00%> (+1.96%)
:arrow_up:

...ala/com/twilio/guardrail/core/CoreTermInterp.scala
78.07% <0.00%> (+0.87%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa05f14...ab41ff6. Read the comment docs.


Display unknown tokens

When a transaction involves unlisted tokens (today we're looking at coingecko), they're not shown. This issue aims to fix that.
e.g. in: https://flashbots-explorer.marto.lol/?block=12589484
Explorer:

Etherscan:

Actually most of the times it's UNI pair tokens, which are not that relevant to the bundle. It's preferable not to display them even though we might have a few false positives.


Discuss: @async decorator

class GsBranchesCheckoutCommand(TextCommand, GitCommand):

    @async
    def run(self, edit):
        ...

def async(run):
    def async_run(self, *args, **kwargs):
        sublime.set_timeout_async(lambda: run(self, *args, **kwargs), 0)
    return async_run

Objections?  Seems like a perfect use case or am I missing something?

I had the same thought but deliberately kept it explicit, mostly to avoid any ambiguity regarding the life-cycle of edit objects.  I'll stick with the current approach for now, since it keeps things cleaner when I am running down bugs.

I had the same thought but deliberately kept it explicit, mostly to avoid any ambiguity regarding the life-cycle of edit objects.

Huh?  In all cases where it's hard-coded now run always calls async_run... how would it not be a huge clean up to just add the decorator to make that 100% clear?  If you're debugging it's just as easy to comment one line as to comment 2 (to let the run fall thru into run_async.  Am I missing something here?


fix schema1 fetchBlob()

Fix https://github.com/containerd/containerd/issues/2389

Codecov Report

Merging #2390 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2390   +/-   ##
=======================================
  Coverage   44.99%   44.99%
=======================================
  Files          92       92
  Lines        9398     9398
=======================================
  Hits         4229     4229
  Misses       4486     4486
  Partials      683      683

Flag
Coverage Δ

#linux
49.23% <ø> (ø)
:arrow_up:

#windows
41.26% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00d4910...703c25e. Read the comment docs.

LGTM

what's the relationship with #2263? They both seem to be changing similar code in the schema1 converter

This PR is unrelated to compression.
This PR just avoids -1 size.

LGTM


[ClangImporter] Swift needs to pass -Xclang -fbuiltin-headers-in-system-modules for its module maps that group cstd headers

Swift has some module maps it overlays on Linux and Windows that groups all of the C standard library headers into a single module. This doesn’t allow clang and C++ headers to layer properly with the OS/SDK modules. clang will set -fbuiltin-headers-in-system-modules as necessary for Apple SDKs, but Swift will need to pass that flag itself when required by its module maps.
rdar://118361742

Backtracing is currently just absorbing them all into its OS module

Indeed. Sadly that was necessary because of when this code gets built (it's before the Darwin or Glibc modules are available).

@swift-ci Please test

I'm still testing this with https://github.com/apple/llvm-project/pull/7619, looks like it's not working yet.

This turned out to be a bigger change, I'll clean up the PR tomorrow, I just pushed the branch to run the CI overnight.

Running one more test in https://github.com/apple/llvm-project/pull/7619 and then I'll put this through CI

@swift-ci test

@swift-ci smoke test

@swift-ci smoke test

@swift-ci smoke test

@swift-ci test

@swift-ci test Windows

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@compnerd any chance you could help me with the Windows failures? I'm pretty sure the issue is that -fbuiltin-headers-in-system-modules isn't making it down to ModuleMapParser::parseHeaderDecl in llvm-project/clang/lib/Lex/ModuleMap.cpp, but I don't have a way to actually debug on Windows. I tried debugging on macOS as best I could using -target x86_64-unknown-windows-msvc and checking the importer->Impl.Instance.getLangOpts().BuiltinHeadersInSystemModules in ClangImporter::create in swift/lib/ClangImporter/ClangImporter.cpp and it's always true there. I suspect it's getting lost somewhere between ClangImporter and ModuleMapParser, but all my attempts to debug die trying to load the standard Swift library for Windows which I'm not sure how to get on a Mac since all the downloads on swift.org are .exe files.

@compnerd any chance you could help me with the Windows failures? I'm pretty sure the issue is that -fbuiltin-headers-in-system-modules isn't making it down to ModuleMapParser::parseHeaderDecl in llvm-project/clang/lib/Lex/ModuleMap.cpp, but I don't have a way to actually debug on Windows.

I don't think that is the case at all if you look at the error logs.

:0: error: cannot open file 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.apinotes' (no such file or directory)

I think that the changes might not be honouring the VFS overlay as modifying the VS was undesirable, so this injection is now done through an injected VFS overlay by the frontend.

@compnerd any chance you could help me with the Windows failures? I'm pretty sure the issue is that -fbuiltin-headers-in-system-modules isn't making it down to ModuleMapParser::parseHeaderDecl in llvm-project/clang/lib/Lex/ModuleMap.cpp, but I don't have a way to actually debug on Windows.

I don't think that is the case at all if you look at the error logs.

:0: error: cannot open file 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.apinotes' (no such file or directory)

I think that the changes might not be honouring the VFS overlay as modifying the VS was undesirable, so this injection is now done through an injected VFS overlay by the frontend.

🤔 I only see that error in a few of the failed tests, is -code-completion eating that error in the other tests? Which way is the vfs supposed to be seen in those tests? Via the -Xcc -ivfsoverlay argument or injected by swift::getClangInvocationFileMapping? Why is -Xcc -ivfsoverlay passed instead of -vfsoverlay? I wonder if that was making the command line overlay be ignored until I started passing -strict-implicit-module-context which was needed for -Xcc -fbuiltin-headers-in-system-modules to make it through (otherwise InterfaceSubContextDelegateImpl in ModuleInterfaceLoader.cpp drops ClangImporterOptions.ExtraArgs). Maybe I should try taking out -Xcc -ivfsoverlay from the lit config since I think it was probably being ignored anyway, but keep -strict-implicit-module-context where we use -vfsoverlay.

@swift-ci test

@compnerd any chance you could help me with the Windows failures? I'm pretty sure the issue is that -fbuiltin-headers-in-system-modules isn't making it down to ModuleMapParser::parseHeaderDecl in llvm-project/clang/lib/Lex/ModuleMap.cpp, but I don't have a way to actually debug on Windows.

I don't think that is the case at all if you look at the error logs.

:0: error: cannot open file 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.apinotes' (no such file or directory)

I think that the changes might not be honouring the VFS overlay as modifying the VS was undesirable, so this injection is now done through an injected VFS overlay by the frontend.

🤔 I only see that error in a few of the failed tests, is -code-completion eating that error in the other tests? Which way is the vfs supposed to be seen in those tests? Via the -Xcc -ivfsoverlay argument or injected by swift::getClangInvocationFileMapping? Why is -Xcc -ivfsoverlay passed instead of -vfsoverlay? I wonder if that was making the command line overlay be ignored until I started passing -strict-implicit-module-context which was needed for -Xcc -fbuiltin-headers-in-system-modules to make it through (otherwise InterfaceSubContextDelegateImpl in ModuleInterfaceLoader.cpp drops ClangImporterOptions.ExtraArgs). Maybe I should try taking out -Xcc -ivfsoverlay from the lit config since I think it was probably being ignored anyway, but keep -strict-implicit-module-context where we use -vfsoverlay.

Awesome that made the "can't find file" errors all go away and the missing string one too. There's just one last "rebuilt a thing we didn't think we'd need to rebuild" error which isn't nearly so bad. I'll rerun the tests and see if it goes away.

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

@compnerd any chance you could help me with the Windows failures? I'm pretty sure the issue is that -fbuiltin-headers-in-system-modules isn't making it down to ModuleMapParser::parseHeaderDecl in llvm-project/clang/lib/Lex/ModuleMap.cpp, but I don't have a way to actually debug on Windows.

I don't think that is the case at all if you look at the error logs.

:0: error: cannot open file 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.apinotes' (no such file or directory)

I think that the changes might not be honouring the VFS overlay as modifying the VS was undesirable, so this injection is now done through an injected VFS overlay by the frontend.

🤔 I only see that error in a few of the failed tests, is -code-completion eating that error in the other tests? Which way is the vfs supposed to be seen in those tests? Via the -Xcc -ivfsoverlay argument or injected by swift::getClangInvocationFileMapping? Why is -Xcc -ivfsoverlay passed instead of -vfsoverlay? I wonder if that was making the command line overlay be ignored until I started passing -strict-implicit-module-context which was needed for -Xcc -fbuiltin-headers-in-system-modules to make it through (otherwise InterfaceSubContextDelegateImpl in ModuleInterfaceLoader.cpp drops ClangImporterOptions.ExtraArgs). Maybe I should try taking out -Xcc -ivfsoverlay from the lit config since I think it was probably being ignored anyway, but keep -strict-implicit-module-context where we use -vfsoverlay.

Awesome that made the "can't find file" errors all go away and the missing string one too. There's just one last "rebuilt a thing we didn't think we'd need to rebuild" error which isn't nearly so bad. I'll rerun the tests and see if it goes away.

I'm suspicious of the error I'm getting from -emit-pcm/-verify where it looks like the pcm is being emitted without -fbuiltin-headers-in-system-modules. I'm also having too much trouble trying to debug this without Windows, so I think what I'm going to do is try setting that flag in the MSVC driver/toolchain in clang for now. When I have a little breathing room, we'll either have removed that flag from Darwin and I'll have a better change at debugging how -fbuiltin-headers-in-system-modules flows through Swift, or we can fix the ucrt module to not require -fbuiltin-headers-in-system-modules, which we should do for all of our module maps anyway. Testing with the workaround.

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7848
@swift-ci test

@swift-ci smoke test

@swift-ci test

@swift-ci smoke test

@swift-ci test

https://github.com/apple/llvm-project/pull/7619
@swift-ci smoke test

https://github.com/apple/llvm-project/pull/7619
@swift-ci test

@swift-ci smoke test

@swift-ci test


Cant start Duel

I can't seem to get a duel to start. I can play against the AI but when I use !ttt and then the users @ nothing works. Could anyone help me out?

@Tman0560 have you followed steps mentioned in README?

Yes I have. I used the “use it as a independent bot” instructions in the Read Me

@Tman0560 no console errors? Bot token is valid?

No console errors. Bot Token is Valid. The bot works against the AI but it does nothing when doing !ttt @user. I wrote the script in Visual Studio Code.

@Tman0560 attack a screenshot of the code if possible? So I can have look at it

Sure

Hello @Tman0560, which version of Node do you use? I will try to reproduce the bug to fix it. Sounds weird because you should have either an error message in your text channel or a fatal error with the stack trace in your console. Also, the mentionned member must validate those conditions to start a duel with it :
https://github.com/utarwyn/discord-tictactoe/blob/37f936092bfa37801b52cb9c4b40322c40701175/src/bot/commands/StartCommand.ts#L67-L70
Otherwise a warning message is sent by the bot in the same channel, do you see it? The only case when no message is either printed in the console or text channel is when the command is not handled or a game is already running in it. Or a permission problem.

I use Node version 15.4, Also I use a raspberry pi 3 to run the bot. It’s a 32 bit system so do you think that affects it?

@utarwyn @anjannair With some messing around I managed to have it give me an error code. Here's the error code...
/usr/bin/node ./main.js
null: TypeError: fields.flat is not a function
at Function.normalizeFields (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)
at MessageEmbed.setup (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91)
at new MessageEmbed (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
at embedLikes.map.e (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:40)
at Array.map ()
at APIMessage.resolveData (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:31)
at TextChannel.send (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)
at DuelRequestMessage. (/home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:25:55)
at Generator.next ()
at /home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:8:71 {stack: 'TypeError: fields.flat is not a function
…st/src/bot/channel/DuelRequestMessage.js:8:71', message: 'fields.flat is not a function'}
arg0: TypeError: fields.flat is not a function
at Function.normalizeFields (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)
at MessageEmbed.setup (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91)
at new MessageEmbed (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
at embedLikes.map.e (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:40)
at Array.map ()
at APIMessage.resolveData (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:31)
at TextChannel.send (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)
at DuelRequestMessage. (/home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:25:55)
at Generator.next ()
at /home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:8:71 {stack: 'TypeError: fields.flat is not a function
…st/src/bot/channel/DuelRequestMessage.js:8:71', message: 'fields.flat is not a function'}
: _tickCallback @ internal/process/next_tick.js:68:7
null: TypeError: fields.flat is not a function
at Function.normalizeFields (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)
at MessageEmbed.setup (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91)
at new MessageEmbed (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
at embedLikes.map.e (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:40)
at Array.map ()
at APIMessage.resolveData (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/APIMessage.js:166:31)
at TextChannel.send (/home/pi/Desktop/discordbot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)
at DuelRequestMessage. (/home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:25:55)
at Generator.next ()
at /home/pi/Desktop/discordbot/node_modules/discord-tictactoe/dist/src/bot/channel/DuelRequestMessage.js:8:71 {stack: 'TypeError: fields.flat is not a function
…st/src/bot/channel/DuelRequestMessage.js:8:71', message: 'fields.flat is not a function'}

Oh.. it seems to be a Discord.js problem. Like that issue on their repository: discordjs/discord.js#3913
They are all saying to upgrade Node to at least v12+ or v14+. So check your node version with node -version and upgrade it if needed. This is not a problem with my bot I think.

Okay cool I will do some investigating then on that I will let you know if it was the node version

It was the node version and nothing wrong with your bot. Thank you so much for your help!

Great news! Thank you for the feedback, enjoy the bot :smile:


s3_tx_bytes_total and s3_rx_bytes_total metrics reports nothing

Metrics reported by s3_rx_bytes_total and s3_tx_bytes_total doesn't seem to work properly.
I've done some test where I have a mc process writing to a minio instance. mc reports around 700KiB/s but when I look at the graphs built from these 2 metrics I see a flat line:

Here are the query used to build the graphs:
rate(s3_tx_bytes_total{instance=~"$instance"}[1m])
rate(s3_rx_bytes_total{instance=~"$instance"}[1m])

This is coming from the Minio code itself.
https://github.com/threefoldtech/minio/blob/f6621b8a2093cf4c7c237f8e48a91e2ace0b94c2/cmd/generic-handlers.go#L546-L552
Not sure if this is a bug or it's intended.

What would be the bug in there ? I don't get it.
I also found https://github.com/threefoldtech/minio/blob/f6621b8a2093cf4c7c237f8e48a91e2ace0b94c2/cmd/gateway-metrics.go
Which seems to track metrics for gateways, which our implementation uses. So I wonder if this is not what we should uses instead. But I cannot find any of these metrics in prometheus like there are not reported by our implementation

@zaibon The gateway interface does not have any methods to report metrics. Specially since all metrics regarding upload/download bytes tracked by minio internals.
Regarding the graph. I think currently prometheus poll interval is "default value" of 1min. So if mc is fast enough you might miss the spike int he tx/rx value.
@DylanVerstraete I don't believe the code above is buggy! why do u think this is causing a problem

Regarding the graph. I think currently prometheus poll interval is "default value" of 1min. So if mc is fast enough you might miss the spike int he tx/rx value.

I did try to change that aggregation value to 10s and 20s and still got no result


Z-Wave HVAC/thermostat improperly show fan mode when toggled via service

Make sure you run the latest version before reporting an issue. Feature requests should go in the forum: https://community.home-assistant.io/c/feature-requests
Home Assistant release (hass --version):
0.19.4
Python release (python3 --version):
3.4.2
Component/platform:
Thermostat, HVAC
Description of problem:
If I issue a call to my CT100 thermostat a hvac.set_fan_mode with the arguments:
{"entity_id": "hvac.2gig_technologies_ct100_thermostat_usa_fan_mode_4", "fan": "On Low"}, then I can:
a) Hear my fan turn on
b) See it as "On" on the actual thermostat
c) See it as "On Low" in the Open Z-Wave Control Panel (see screenshot below)
However, the HVAC entity as well as both of the thermostat's entities ("heating" and "cooling") show the fan as "Idle" or "Off".

Potentially related, the fan_list shows up as:
    "R",
    "e",
    "a",
    "d",
    " ",
    "o",
    "n",
    "l",
    "y"
  ]```

yet it can clearly be toggled, and has the options "Auto Low" and "On Low" when viewing through the Open Z-Wave Control Panel.  Note that when the system is heating/cooling, the the fan status is updated properly.

**Expected:**
The HVAC and/or thermostat components should properly display when I manually toggle the fan status through the `hvac.set_fan_mode` service.  Ideally, the `fan_list` entry should show the possible fan modes as well, simple to the `operation_list` in the HVAC entity.

**Problem-relevant `configuration.yaml` entries and steps to reproduce:**
```yaml
(none relevant, I believe)

Add a Z-Wave HVAC component
Navigate to the service calls and call hvac.set_fan_mode with {"entity_id": "hvac.2gig_technologies_ct100_thermostat_usa_fan_mode_4", "fan": "On Low"} (or whatever your fan's "On" status is)
Note that your fan will turn on, but no entity in Home Assistant indicates so.

Traceback (if applicable):

Additional info:
I'm logging this because I'm excited to learn that I can control the fan with Home Assistant, and it would be wonderful if I could create a custom input_select with the fan's status.

Please also see: https://github.com/ishults/home-assistant/commit/556029f6284fb3060aab88e578f81bdfe9e3271f#commitcomment-17566309


Add function to strip EXIF data from images

Hugo has a number of image processing facilities, which can be used to strip EXIF data out of images as a side effect of operations like Resize. However, there doesn't appear to be a way to strip the EXIF data without re-encoding the image, which causes a loss of data if using a lossy format like JPEG or WebP - I personally notice a visible loss of colour information when using these.
It would be useful, I think, to have a StripExif function (or perhaps a strip_exif directive to Process?). I'd be happy to take on doing this work myself if the maintainers are OK with it.
Thanks!

Assuming we can safely and reliably strip the EXIF data without re-encoding, is there ever a reason to retain the EXIF data once an image is published with Permalink, RelPermalink, or Publish? If not, could the EXIF data be stripped by default when invoking these methods (possibly configurable under the imaging key).
I've been aware of this issue for a while, in particular when a content author adds an image in markdown:
![alt](image.jpg)

An inexperience author has no idea they are publishing the photo's geo location.
Whether we add a new thing, or change the existing things, an image render hook would take care of the above.

I suppose it depends on the performance of the EXIF operation - I wouldn't want to risk ballooning a user's built time or repo size without that being opt-in. If however it's very fast and would just happen as part of the image being placed in public (as opposed to it going to resources first which I think is what happens when we process images) then I think I'm in agreement that stripping the EXIF by default is the right call.

However, there doesn't appear to be a way to strip the EXIF data without re-encoding the image,

EXIF is encoded into the image. How do you strip the EXIF without re-encoding the image?

"Re-encoding" was perhaps a poor choice of term - I meant without further iterations of JPEG compression or similar.

How do you strip the EXIF without re-encoding the image?

I have no idea if/how this would be accomplished in Go, but exiftool removes the metadata without touching the raster block. I've tested this by hashing the raster block (not the file itself) before and after stripping the metadata:
# before
identify -verbose -format %# assets/a.jpg

# strip meta
exiftool -all assets/a.jpg

# after
identify -verbose -format %# assets/a.jpg

The hash remains unchanged.

I have no idea if/how this would be accomplished in Go, but exiftool removes the metadata without touching the raster block.

Yea, I guess there's bytes that could be just trimmed.


[BUG] Metadata autosign workflow failed

Metadata portal one: Metadata autosign workflow failed to produce a autosign pr

This was due to a stale branch.  We will analyze the autosigner workflow to see how we could prevent these stale branches and update the documentation accordingly.
We have already:

Deleted the stale branch
Added diagnostic logging
Improved the documentation (NOTES.md)

We will re-run the autosigner workflow once the blocking issue of incorrect metadata has been fixed for the 1.0.x release.

seems to be working, closing


Automatically constrain node sizes

Diagram should not have size larger than page size and should constrain node sizes accordingly (breaking content in nodes).

If I put diagram inside block with width: 100%, height: 100% and breakable: false,  clip: true I get this picture - which means block constraints are not preserved.

You can give the nodes a width which will break the label text up. There is no "max width" however.


Use <For /> in Wrap documentation

Provide the exact quote of the error or issue
We should use <For /> component when repeating a component
e.g.
<For each={items}>{(item, index) => <Text key={index} fontWeight="bold">{item}</Text>}</For>

https://yamada-ui.com/components/layouts/wrap
Does the docs page already exist? Please link to it.
No response
Are you willing to participate in fixing this issue and create a pull request with the fix?
None

Hi, can i work on this?


DEST_BUCKET policy

The Uploader stores images in an S3 bucket. Is there a specific policy that needs to be set on the  bucket that is created manually? Noob here. I'm getting a 403 error after deploying then dropping an image/file on the dropzone in index.html

No, deploying the uploader will apply a policy to the S3 bucket (See policy configuration in the SAM template).
Do you have a / on the end of your path?  One thing I didn't consider when writing these apps was that the API Gateway invoke url can be viewed as https://invoke.amazonaws.com/Prod or https://invoke.amazonaws.com/Prod/, and the former will lead to the wrong upload paths.
Can you provide the url that's giving you the 403 error? (optionally with the invoke id scrubbed so others can't actually call your stack)

The / is missing. I’m unable to test it now but will later today and update this thread. Thanks for the response!


spdm_x509_certificate_check return value

When check issuer_name and subject_name in spdm_x509_certificate_check:
https://github.com/DMTF/libspdm/blob/8daea2f4f61673ca39ef8a10100917c483e1125c/library/spdm_crypt_lib/crypt.c#L1664-L1673
Function will go to end if status==true and len(issuer_name)==0, I think this means that issuername does not exist and should return wrong status. So maybe should set status false then go to end.
Something similar happened in x509_get_extended_key_usage case:
https://github.com/DMTF/libspdm/blob/8daea2f4f61673ca39ef8a10100917c483e1125c/library/spdm_crypt_lib/crypt.c#L1710-L1715

And there are problems with x509_get_issuer_name function self :
in mbedtls, it just a copy of get serial_id:
https://github.com/DMTF/libspdm/blob/8daea2f4f61673ca39ef8a10100917c483e1125c/os_stub/cryptlib_mbedtls/pk/x509.c#L895-L930
in openssl, it always return false if param CerIssuer is NULL:
https://github.com/DMTF/libspdm/blob/8daea2f4f61673ca39ef8a10100917c483e1125c/os_stub/cryptlib_openssl/pk/x509.c#L826-L883
Then
if (status && asn1_buffer_len == 0) {
...
}
will be dead code.
It seems that the get_issuer/subject_name return logic of two lib is different: openssl will return false if CerIssuer is null but mbedtls return true.


can skywalking agent support in weblogic or websphere？

Please answer these questions before submitting your issue.

Why do you submit this issue?

Question or discussion

[ ] Bug

Requirement

[ ] Feature or performance improvement

Question

What do you want to know?
we can use skywalking agent in tomcat easily.  but for some applications deployed with weblogic and websphere .  can it support ?  i can't get some info about this.

Bug

Which version of SkyWalking, OS and JRE?

Which company or project?

What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.

Requirement or improvement

Please describe about your requirements or improvement suggestions.

There is nothing different between weblogic and tomcat. Read weblogic and Websphere document about jvm arguments.

thx


verkle trees: add 2 fields to ExecutionPayload

Description
With the verge, proofs and witness of the pre-state of an (EL) block execution are included in the blocks. In order to build a PoS testnet that provides proofs in blocks, it would be great if it were possible to create a branch with the required fields to be added to the ExecutionPayload.
The ExecutionPayload needs to have two more, optional fields:

VerkleProof, a byte array of variable length
VerkleKeyVals, an array of (key, value) pairs, in which the key is a 32-byte vector, and value is a byte vector of length either 0 (missing value) or 32.

At the moment, there is no need to support forking as for this testnet, verkle trees are used since the genesis.
If present, these two fields should be propagated over the network with the rest of the ExecutionPayload so that other clients can inject these fields in their verkle-enabled EL.

hmm, I'm not sure I have enough info to actually implement this.  ExecutionPayload is an SSZ object so there's no way to add an optional field - there hasn't be some default value (for a list or array that's usually just the empty list), and there has to be a maximum length on every type.
For execution payloads specifically we'd also need to know if these new fields are present on ExecutionPayloadHeader as well or if they're replaced with the hash tree root like transactions is.

Thank you for the feedback.

Both lists are arbitraty-length, but limiting them to a maximum of 75K
each for now should be fine.
It should indeed be the empty list by default.
it can be hashed in the header, because without transactions, the
proof is of limited use

Thanks
Guillaume
On Mon, 31 Oct 2022, 06:42 Adrian Sutton, @.***> wrote:

hmm, I'm not sure I have enough info to actually implement this.
ExecutionPayload is an SSZ object so there's no way to add an optional
field - there hasn't be some default value (for a list or array that's
usually just the empty list), and there has to be a maximum length on every
type.
For execution payloads specifically we'd also need to know if these new
fields are present on ExecutionPayloadHeader as well or if they're
replaced with the hash tree root like transactions is.
—
Reply to this email directly, view it on GitHub
https://github.com/ConsenSys/teku/issues/6346#issuecomment-1296568501,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAY7ANU3KD4QPNKGKIMZHWDWF5L4VANCNFSM6AAAAAARQEK57A
.
You are receiving this because you authored the thread.Message ID:
@.***>

I've put up https://github.com/ConsenSys/teku/compare/master...ajsutton:teku:verkle-trees which has this added in. There's nothing to test it with so hard to know if there's something I've missed though.
I wound up including the full verkle proof and verkle key val values in the ExecutionPayloadHeader because blinding and unblinding them would introduce quite a bit more complexity. In terms of actual implementation the key question is likely whether or not the verkle proof and key/vals should wind up in the BeaconState.latestPayloadHeader field which uses the ExecutionPayloadHeader type.
To make this fit within SSZ the two new fields wind up being defined as:
class ExecutionPayload(Container):
# Execution block header fields
    parent_hash: Hash32
    fee_recipient: ExecutionAddress  # 'beneficiary' in the yellow paper
    state_root: Bytes32
    receipts_root: Bytes32
    logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM]
    prev_randao: Bytes32  # 'difficulty' in the yellow paper
    block_number: uint64  # 'number' in the yellow paper
    gas_limit: uint64
    gas_used: uint64
    timestamp: uint64
    extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
    base_fee_per_gas: uint256
    # Extra payload fields
    block_hash: Hash32  # Hash of execution block
    verkle_proofs: ByteList[75000],                              # New
    verkle_key_vals, List[VerkleKeyVal, 75000],          # New
    transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]

class VerkleKeyVal:
    key: Bytes32,
    value: ByteList[32]

Notably the value is allowing any length byte array up to 32 bytes because you can't express either 0 or 32 bytes in SSZ without using a union (and unions aren't currently used in the beacon chain so add quite a bit of complexity to support).

@ajsutton thank you for this, there is now a branch to test: https://github.com/gballet/go-ethereum/pull/136. We will add your branch to our tests when they are ready and come back with more feedback.
Incidentally, there has been a proposal for the SSZ encoding a few months ago: https://notes.ethereum.org/Si5tEWlMTYerkhG3fOIAMQ It hasn't been used so far because it requires the post-state, which isn't really practical to provide. The other problem is that it uses Unions. I could update the PR to return the fields needed to build these SSZ structures, but I would like to know your feedback on this, maybe it would be possible to tweak these structures to make it easier for a CL to implement?

Spec PRs
https://github.com/ethereum/consensus-specs/pull/3230

All the code is on a branch, waiting until it is time to merge it into master.


How to run detection network?

Problem description:
I want to run the detection network, but only Yolo3 are provided among the examples. Can I run SSD based detection networks on the ComputeLibrary? By the way, I mainly use the GPU to run the model.

Hi @hiigao,
It is possible, but you have to create the graph and give it the weights.
In this issue: https://github.com/ARM-software/ComputeLibrary/issues/617
you can find how to extract the weights from a tensorflow pre-trained MobilenetV2 SSDlite frozen graph
Best,
Manuel

Closing for inactivity, feel free to reopen otherwise


Breaks with new syntax system

With the new syntax definition system, line 111 now needs to read
find_language = re.compile(r"([\w -()]+)\.(?:tmLanguage|sublime-syntax)").search

in order to not break.

Fixed by 7aa11cd


APVI gap_fill bug

There's a bug in APVI gap filling on prod where it isn't filling days.
Might be the aggregator
https://opennem.org.au/energy/wem/?range=1y&interval=1d

949928499c1274e85f78df8e56d94d145a11b916

see #83


New Account Switcher

Here's Finally I changed and fixed it!

Ok i am waiting, but most of the peoples likes it

Thank You Guys :)


running /discover leads to 404

Hi,

Cloned the git repo
Issued npm install
Issues npm start
Went to browser entered in http://localhost:3049/discover
Returned 404 -> GET /discover 404 0.330 ms - 21

I tried running the tests and all 4 written are failing. I will continue to dig around to see if the issue is on my end.
thanks!
running on a mac (10.11.1) with node version 0.12.7

Hi, many thanks for the report.
I'm very sorry for now I have only tested this framework on Ubuntu 14.04 and 14.10 with node v0.10.40 (0.10.x should work also)
OTOH, could you open a console and post the output of below command here?
curl -H "Content-Type: application/json" -X POST http://localhost:3049/discover

$ curl -H "Content-Type: application/json" -X POST http://localhost:3049/discover
$ OK

Still get a 404 with /discover though

nope, downgrading give the same 404.

I think the reason you get OK from curl but 404 from browser is because this call requires HTTP POST method. Normally when you paste a URL in browser address bar it will issue HTTP GET method so it will return 404 in this case. After issue the above curl command, you may test if any device is found by issue below curl command:
  curl -H "Content-Type: application/json" -X GET http://localhost:3049/device-list

Ok, that was my issue, I didn't realize I had to POST to discover.
curl -H "Content-Type: application/json" -X POST http://localhost:3049/discover
returns OK.
As I have no devices to connect to atm, i will test at a later date; Thank you for your time helping me out on this.

Thank you for your efforts on my project. The reason I chose POST is because it might alter the framework's internal status. While GET calls should not.


Google Api Error: applicationNotFound: No application was found for the given package name.

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description
We build an android app using and try to build and ship it with fastlane.
When trying to send our app through fastlane supply, an error occurs:
Google Api Error: applicationNotFound: No application was found for the given package name.

Command executed
bundle exec fastlane android beta
Complete output when running fastlane, including the stack trace and command used

 bundle exec fastlane android beta
[23:06:46]: Driving the lane 'android beta' 🚀
[23:09:47]: --------------------
[23:09:47]: --- Step: supply ---
[23:09:47]: --------------------
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                Summary for supply 2.121.1                                                                                |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| package_name            | Birds Example                                                                                |
| json_key_data           | ********                                                                                |
| apk_paths               | ["build/outputs/release/arm64-release.apk", "build/outputs/release/armv7-release.apk",] |
| track                   | internal                                                                                |
| skip_upload_apk         | false                                                                                |
| skip_upload_aab         | false                                                                                |
| skip_upload_metadata    | false                                                                                |
| skip_upload_images      | false                                                                                |
| skip_upload_screenshots | false                                                                                |
| validate_only           | false                                                                                |
| check_superseded_tracks | false                                                                                |
| timeout                 | 300                                                                                |
| deactivate_on_promote   | true                                                                                |
+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+---------------+--------------+
|         Lane Context         |
+---------------+--------------+
| PLATFORM_NAME | android      |
| LANE_NAME     | android beta |
+---------------+--------------+
[23:09:48]: Google Api Error: applicationNotFound: No application was found for the given package name.
+------+---------+-------------+
|       fastlane summary       |
+------+---------+-------------+
| Step | Action  | Time (in s) |
+------+---------+-------------+
| 💥   | supply  | 0           |
+------+---------+-------------+
[23:09:48]: fastlane finished with errors
[!] Google Api Error: applicationNotFound: No application was found for the given package name.

Environment

✅ fastlane environment ✅
Stack

Key
Value

OS
10.13.6

Ruby
2.3.7

Bundler?
true

Git
git version 2.17.2 (Apple Git-113)

Installation Source
~/dev/birds/vendor/bundle/ruby/2.3.0/bin/fastlane

Host
Mac OS X 10.13.6 (17G6030)

Ruby Lib Dir
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib

OpenSSL Version
LibreSSL 2.2.7

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode.app/Contents/Developer/

Xcode Version
10.1

System Locale

Variable
Value

LANG
en_CA.UTF-8
✅

LC_ALL

LANGUAGE

fastlane files:
`./fastlane/Fastfile`
platform :android do
  desc "Deploy internal beta android app on play store"
  lane :beta do
    supply(
      package_name: 'Birds Example',
      json_key_data: ENV['GOOGLE_PLAY_CREDENTIAL'],
      apk_paths: [
        'build/outputs/release/arm64-release.apk',
        'build/outputs/release/armv7-release.apk'
      ],
      track: 'internal'
    )
  end
end

`./fastlane/Appfile`
# iOS
app_identifier "com.example.birds"
apple_id<EMAIL_ADDRESS>team_id "XXX"

# Android
package_name "Birds Example"

fastlane gems

Gem
Version
Update-Status

fastlane
2.121.1
✅ Up-To-Date

Loaded fastlane plugins:
Loaded gems

Gem
Version

did_you_mean
1.0.0

bundler
2.0.1

io-console
0.4.5

CFPropertyList
3.0.0

public_suffix
2.0.5

addressable
2.6.0

atomos
0.1.3

babosa
1.0.2

claide
1.0.2

colored
1.2

colored2
3.1.2

highline
1.7.10

commander-fastlane
4.4.6

declarative
0.0.10

declarative-option
0.1.0

digest-crc
0.4.1

unf_ext
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.20180417

dotenv
2.7.2

emoji_regex
1.0.1

excon
0.64.0

multipart-post
2.0.0

faraday
0.15.4

http-cookie
1.0.3

faraday-cookie_jar
0.0.6

faraday_middleware
0.13.1

fastimage
2.1.5

gh_inspector
1.1.3

jwt
2.1.0

memoist
0.16.0

multi_json
1.13.1

os
1.0.0

signet
0.11.0

googleauth
0.6.7

httpclient
2.8.3

mime-types-data
3.2019.0331

mime-types
3.2.2

uber
0.1.0

representable
3.0.4

retriable
3.1.2

google-api-client
0.23.9

google-cloud-env
1.0.5

google-cloud-core
1.3.0

google-cloud-storage
1.16.0

json
2.2.0

mini_magick
4.5.1

multi_xml
0.6.0

plist
3.5.0

rubyzip
1.2.2

security
0.1.3

naturally
2.2.0

simctl
1.6.5

slack-notifier
2.3.2

terminal-notifier
2.0.0

unicode-display_width
1.5.0

terminal-table
1.8.0

tty-screen
0.6.5

tty-cursor
0.6.1

tty-spinner
0.9.0

word_wrap
1.0.0

nanaimo
0.2.6

xcodeproj
1.8.2

rouge
2.0.7

xcpretty
0.3.0

xcpretty-travis-formatter
1.0.0

generated on: 2019-04-26

Additional note
It's our first attempt to push an app to Playstore. We don't have any artifact yet in any track.
Our Play Store account  has a draft app with proper matching name:

I tried re-generate the credentials key without any change to the error.
Is it safe to use a package name similar to the one on iOS com.example.birds? If yes, how then to set a proper name for Play Store users?

You have to manually upload a build into any track once manually. Then Google Play will connect that app to the package ID and let you upload further builds via supply.

What do you mean by package ID? Do we have to use a package id similar to com.example.birds or can we use app name in subsequent uploads?
Maybe the fact we first have to manually upload a build should be added in the doc.

I don't know Google's rules about package names, but usually package_name is something like com.example.birds. That is what is used to identify an app between supply and Google Play Store.
Yes, that should be added to the docs somehow. Any suggestion where would be an appropriate place?

Maybe somewhere in supply near the part where it's explained how to generate credential JSON.
It reminds me we may add some explanation about how to generate a keystore as well, or at least a link to google help page.

Of course!
Note that the docs are generated, so you don't actually change the supply docs in fastlane/docs but this file: https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md

Will do and add a separate include in docs, similar to what is done with google-credentials.md

@blackholegalaxy Please do! This is a vital step that is completing missing from the docs.

+1, would love to see these docs added.

We encountered similar situation yesterday under a flutter project. So I must think about proper doc to cover all these cases. Sorry guys for being late on that.

Has this problem been resolved yet ?
Please suggest.
My usecase is:

using fastlane to upload my apk directly to Play Store
m getting that error the second after I apply fastlane supply init command
And I'm not sure why is it not happy, even if I've provided the correct package name (which is same as package_id, if I'm not mistaking)

If you read the rest of the thread, the most common fix is to manually upload an apk yourself once. After that, fastlane should pick it up.

On 2. Aug 2019, at 12:37, Ritesh Aryal<EMAIL_ADDRESS>wrote:
Has this problem been resolved yet ?
Please suggest.
My usecase is:
using fastlane to upload my apk directly to Play Store
m getting that error the second after I apply fastlane supply init command
And I'm not sure why is it not happy, even if I've provided the correct package name (which is same as package_id, if I'm not mistaking)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


Question: How to add stop directive to an action?

Affected Puppet, Ruby, OS and module versions/distributions

Puppet: 5
Distribution: CentOS 7
Module version: 3.3.0

How to reproduce (e.g Puppet code you use)
I am attempting to re-create the following legacy config via this module:
$ActionQueueFileName fwdRule1
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1
local0.* @syslog.domain.internal:514
& stop

The rainerscript equivalent should look like this:
local0.*                       action(type="omfwd"
                                           queue.filename="fwdRule1"
                                           queue.maxDiskSpace="1g"
                                           queue.saveOnShutdown="on"
                                           queue.type="LinkedList"
                                           action.resumeRetryCount="-1"
                                           target="syslog1.resources.internal"
                                           port="514"
                                     )

  stop

I think this hiera configuration is almost there:
syslog::server::actions:
  http_logs:
    type: omfwd
    facility: 'local0.*'
    config:
      queue.filename: 'fwdRule1'
      queue.maxDiskSpace: '1g'
      queue.saveOnShutdown: 'on'
      queue.type: 'LinkedList'
      action.resumeRetryCount: '-1'
      target: 'syslog.domain.internal'
      port: '514'

How can I add the 'stop' directive after the action?

Currently we don't have any way to add that outside of the custom_config. In fact, I didn't know that was possible as my experience with rsyslog always had us discarding (stop) as part of a custom ruleset.
It shouldn't be too difficult to add. I'll look into it

@synaptis I did some research and adding support for what you want will work and is fairly simple, however if I place the option in there and it is activated, placing the stop after the action args AND the action is not the final config in the file (AKA default ruleset), you will see this error:
rsyslogd: version 8.32.0, config validation run (level 1), master config /etc/rsyslog.conf
rsyslogd: error during config processing: STOP is followed by unreachable statements!  [v8.32.0 try http://www.rsyslog.com/e/2207 ]

As such, I will probably refrain from adding this functionality and direct you to placing any actions that need a stop within a custom ruleset to prevent it from interfering with the rest of the configuration.
@bastelfreak @crayfishx @alexjfisher - thoughts on the above statement?

@synaptis I should probably give an example of what my suggestion looks like:
syslog::server::rulesets:
  action_http_logs:
    rules:
      - action:
          name: http_logs
          type: omfwd
          facility: 'local0.*'
          config:
            queue.filename: 'fwdRule1'
            queue.maxDiskSpace: '1g'
            queue.saveOnShutdown: 'on'
            queue.type: 'LinkedList'
            action.resumeRetryCount: '-1'
            target: 'syslog.domain.internal'
            port: '514'
    stop: true

@dhollinger Thanks for looking into this. I'll admit that my knowledge of syslog has been challenged and improved by implementing this module so the config I was trying to use may not have been optimal although it was working for us. I agree that introducing features that can easily cause errors is not a good idea.
Cheers also for your suggested config, I had worked around the problem using the conditional below  which I think will have a similar effect but I will test out your suggestion also.
rsyslog::server::expression_filters:
  httpd_logs:
    conditionals:
      if:
        expression: '$syslogfacility-text == "local0"'
        tasks:
          - action:
              type: omfwd
              facility: 'local0.*'
              config:
                queue.filename: 'fwdRule1'
                queue.maxDiskSpace: '1g'
                queue.saveOnShutdown: 'on'
                queue.type: 'LinkedList'
                action.resumeRetryCount: '-1'
                target: 'syslog1.resources.internal'
                port: '514'
          - stop: true

I'm happy for this to be closed or to close it myself if that's the process.


Feature: Restricting the list of allowable domains

Email domain: Enter your company's domain, eg. oswaldlabs.com
We'll allow people with emails from this domain to join this organization automatically
Do not allow the public domains to be included in this list like gmail, hotmail, rediffmail, and many others.

A super-admin could be probably allowed to maintain the names of the restricted domains.

Good plan! There are quite a few nice NPM packages for this, I'll make sure to add that validation. The feature of email restriction actually doesn't work, it's currently just a setting you can save, but I plan on shipping that this week too.
We already have a helper function for detecting educational emails using my package Edumail, and something similar can be used to prevent free/temporary/disposable email addresses too.

I've added a Staart-wide check for disposable emails while signing up or inviting a member. You can use the environment variable ALLOW_DISPOSABLE_EMAILS to control the setting. By default, disposable emails are not allowed.
For teams and company domain emails, I will make sure also not allow public email providers like Gmail, that's in the works! 😄

Great!
I'd like to request to create a super-admin role that controls the list of restrictive domains like gmail, etc.

Staart now has support for whitelisted domains:

You can add any number of domains to your team, and verify them by uploading a file or adding a DNS TXT record:

Then, you can choose to:

Only allow managers to invite members from approved domains, and
Automatically let users with an email on that domain to join your team


Bug: Using custom highlight group in a section's output causes the separator to be colored with wrong color

Self Checks

[x] I'm using the latest lualine.
[x] I didn't find the issue in existing issues or PRs.

How to reproduce the problem
Use the config provided below
Expected behaviour
The separator should be colored with the theme-defined background color
Actual behaviour
The separator is colored with default background color

Minimal config to reproduce the issue
-- Add new highlight group
vim.cmd[[hi MyHighlightGroup guifg=#ff966c]]

local function test_with_highlight()
	return [[%#MyHighlightGroup#Block with wrongly colored separator]]
end

local function test_without_highlight()
	return [[Block with correctly colored separator]]
end

require('lualine').setup {
	options = {
		theme = 'onedark',
	},
	tabline = {
		lualine_a = { test_with_highlight },
		lualine_b = { test_without_highlight },
	}
}

Additional information

Same problem. But I'm using the build-in themes "powerline" in statusline.

Same problem. But I'm using the build-in themes "powerline" in statusline.

I solved. I'm use "Windows Terminal" and change the config this way in "Defaults > Appearance". By the way, you can see the preview at the top of the window. Windows Terminal Version: 1.18.2822.0


[determinism] Fix indentation in release notes

NB: this is a PR against the r2.8 branch.
This PR fixes indentation that was lost in or after the cherry pick into the r2.8 branch of PR 53465, which was merged into the master branch.
I wonder if there is a script that auto-formats the release notes, a script which is replacing 2-space indents with 0-space intents, rather than 4-space intents. There may be other indentation losses in the r2.8 release notes file.

There is some autoformatting. We should disable it.
Thank you for the fix.


support additionalTextEdits for autocomplete results

In typescript, autocompleting something will create additionalTextEdits if it needs to do something like add an import
https://user-images.githubusercontent.com/6010774/221436283-9e13db4e-43e0-4f3f-8de0-01de435bd88a.mp4
Issues:

This likely won't work if there are two additional edits because one will be inserted and then the next one will try to insert in the wrong place
If you accept the autocomplete too fast, it won't work because the completionItem/resolve response hasn't come in yet

Should we close this, since #128 was merged?

Yep.
@pfgithub thank you for the contribution, it inspired #128.


Sample Project Broken cant make the setup...

What platform are you experiencing this issue on?
Windows
What architecture is your platform?
64-Bit
What version of UWB are you using?
Latest VoltstroUPM Release
What Unity version are you running?
2021.3.16
Describe what the issue you are experiencing is.
trying from yesterday and everything broken with missing packages i don't know why...  Sample project that "should be ok" its not...
Also doesn't tell you what else you need... Maybe an auto packages resolver cause this is a mess
Provide reproducible steps for this issue.

I did this.
I then did that.
Boom! Issue.

Any additional info you like to provide?
No response

another error Library\PackageCache\dev.voltstro.unitywebbrowser@2.0.2\Runtime\Core\PixelsEventTypeReader.cs(47,46): error CS0121: The call is ambiguous between the following methods or properties: 'VoltRpc.Extension.Memory.BufferedReaderMemoryExtensions.ReadBytesSpanSlice(VoltRpc.IO.BufferedReader, int)' and 'VoltRpc.IO.BufferedReaderExtensions.ReadBytesSpanSlice(VoltRpc.IO.BufferedReader, int)'

also getting a lot of errors opening the sample project from within the repo

being one example

dont know but its totally broken and instructions is a mess

also getting a lot of errors opening the sample project from within the repo
/Users/bonjo/Downloads/UnityWebBrowser-master/src/Packages/UnityWebBrowser.Communication.Pipes/Runtime/Base/EnginePipesCommunicationLayer.cs(7,39): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'VoltstroStudios.UnityWebBrowser' (are you missing an assembly reference?)
being one example

@M0rph3v5
You haven't not read the setup dev setup instructions if you are getting this error using the repo. Also please keep different issues in separate issues.

No response in over a month, closing.


collecting all logs for ESX/VMs

fixes #1077
https://github.com/vmware/docker-volume-vsphere/blob/master/misc/drone-scripts/dump_log.sh#L19
Currently our dump_log script is not collecting full vmdk_ops log if exceed the size and spawned to multiple files.
/cc @govint @pdhamdhere

I am fine with having this in as a patch. But - can we just pack the files in zips and shared them somewhere, maybe for a few days only ?

@msterin is it something similar to what is mentioned at #857?

yes

Thanks @msterin, your comment will be taken care by #857