text:
form_extra_fields doesn't skip FormField and tries to apply it to model, crashing request

It seems FormField field in form_extra_fields tries to apply itself to model, despite model not having attribute written in form_extra_fields.
e.g.:
# Model
class Product():
  name = String()

# Admin view
class CustomView(ModelView):
  form_extra_fields = {
    'shipping_info': FormField(ShippingInfoForm)
  }

After submit there is error that populate_obj cannot discover which field in the model should be this field applied to.
Error here:
https://github.com/flask-admin/flask-admin/blob/v1.5.3/flask_admin/contrib/sqla/view.py#L1142

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin, form
from flask_admin.contrib.sqla import ModelView
from wtforms import Form, StringField, SubmitField

app = Flask(__name__)
app.config['SECRET_KEY'] = 'your_secret_key'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

db = SQLAlchemy(app)
admin = Admin(app)

class Product(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100))
    shipping_address = db.Column(db.String(200))
    shipping_city = db.Column(db.String(100))

class ShippingInfoForm(Form):
    address = StringField('Address')
    city = StringField('City')
    submit = SubmitField('Submit')

class CustomView(ModelView):
    form_extra_fields = {
        'shipping_info': form.FormField(ShippingInfoForm)
    }

    def on_model_change(self, form, model, is_created):
        # Handle the form extra fields manually
        shipping_info_form = form.shipping_info
        # Process the data from shipping_info_form
        model.shipping_address = shipping_info_form.address.data
        model.shipping_city = shipping_info_form.city.data

        super(CustomView, self).on_model_change(form, model, is_created)

@app.route('/')
def index():
    return 'Hello, World!'

admin.add_view(CustomView(Product, db.session))

if __name__ == '__main__':
    db.create_all()
    app.run(debug=True)

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin, form
from flask_admin.contrib.sqla import ModelView
from wtforms import Form, StringField, SubmitField

app = Flask(__name__)
app.config['SECRET_KEY'] = 'your_secret_key'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False

db = SQLAlchemy(app)
admin = Admin(app)

class Product(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100))
    shipping_address = db.Column(db.String(200))
    shipping_city = db.Column(db.String(100))

class ShippingInfoForm(Form):
    address = StringField('Address')
    city = StringField('City')
    submit = SubmitField('Submit')

class CustomView(ModelView):
    form_extra_fields = {
        'shipping_info': form.FormField(ShippingInfoForm)
    }

    def on_model_change(self, form, model, is_created):
        # Handle the form extra fields manually
        shipping_info_form = form.shipping_info
        # Process the data from shipping_info_form
        model.shipping_address = shipping_info_form.address.data
        model.shipping_city = shipping_info_form.city.data

        super(CustomView, self).on_model_change(form, model, is_created)

@app.route('/')
def index():
    return 'Hello, World!'

admin.add_view(CustomView(Product, db.session))

if __name__ == '__main__':
    db.create_all()
    app.run(debug=True)

authors: idchlife ljluestc

repo: pallets-eco/flask-admin


text:
Can't access help of subcommands without going through parent's prompts

I have a script with subcommands that both require a username/password. I abstracted this to the parent. Here's a short example demonstrating the issue:
import click

@click.group()
@click.option('--username', default='admin', prompt=True)
@click.password_option()
def cli(username, password):
    """This is my parent description"""
    pass

@cli.command()
@click.option('--reference', help="I should be able to see this without entering a username and password.")
def subcommand(reference):
    """This is my subcommand"""
    pass

If you access the main help:
my_prog --help

It displays the help page without any prompting for username or password, as expected. However, if you try to access the help page for the subcommand:
my_prog subcommand --help

It prompts for username and password before displaying the help page of the subcommand. This makes sense, but it still isn't expected behavior by the end user. As my sample program says, I should be able to see help without entering a username and password.
What's the correct way to model my desired behavior? Do I have to move and duplicate the username and password prompt options into each of my sub commands?

I have encountered this problem and is easy to solve by using the eager option example from the documentation.

@philipsd6 Same issue, I was going to approach this problem by removing the prompt=True on the option and checking for the required options but realized that sub-commands would have to do the same. Is there no directive for Ignoring prompts on certain options

+1 for fixing this.

Have you tried using an eager option?
http://click.pocoo.org/3/options/#callbacks-and-eager-options

@ryanneufeld This is a nice suggestion but how do you define that for the provided --help option ?
http://click.pocoo.org/3/advanced/#callback-evaluation-order

@warsamebashir you can override the help command with your own.

@ryanneufeld do you have an example of how we can do that. I couldn't find anything in the docs. Is it just the traditional @click.option decorator with the is_flag=True set ?

This is a tough one to fix and I am not sure if it will be entirely possible without causing more issues elsewhere. :(

+1 for fixing this as well.

In a similar situation, instead of trying to pull the common behavior up to the group level, I defined a decorator that implemented the behavior and used that on the individual commands.  For example, something like (I haven't actually checked that this code works...):
from functools import wraps

def needs_username_and_password(f):
    @wraps(f)
    @click.option('--username', default='admin', prompt=True)
    @click.password_option()
    def wrapper(*args, **kwargs):
        return f(*args, **kwargs)

@click.group()
def cli():
    """This is my parent description"""
    pass

@cli.command()
@click.option('--reference', help="I should be able to see this without entering a username and password.")
@needs_username_and_password
def subcommand(username, password, reference):
    """This is my subcommand"""
    pass

Hey @vokal-isaac, thanks for your solution! It was throwing an error as-is for me but I was able to fix.
$ python -V; ./test.py subcommand --help
Python 2.7.15
Traceback (most recent call last):
  File "./test.py", line 25, in <module>
    @needs_username_and_password
  File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 170, in decorator
    _param_memo(f, OptionClass(param_decls, **attrs))
  File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 135, in _param_memo
    f.__click_params__ = []
AttributeError: 'NoneType' object has no attribute '__click_params__'

Adding return wrapper to needs_username_and_password resolved issue. Complete example:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import click

from functools import wraps

def needs_username_and_password(f):
    @wraps(f)
    @click.option('--username', default='admin', prompt=True)
    @click.password_option()
    def wrapper(*args, **kwargs):
        return f(*args, **kwargs)
    return wrapper # **** Added return ****

@click.group()
def cli():
    """This is my parent description"""
    pass

@cli.command()
@click.option('--reference', help="I should be able to see this without entering a username and password.")
@needs_username_and_password
def subcommand(username, password, reference):
    """This is my subcommand"""
    pass

if __name__ == '__main__':
    cli()

@druchoo Ah, yeah, looking at it now, it was definitely missing that return wrapper.  (As I'd said, "I haven't actually checked that this code works..." 😉)

I like the solution above a lot, but I ran into issues trying to "generalize" this by using multiple decorators  (I've posted on SO as well). The issue with the code below is that only the decorator that is "applies" to the bare function will properly get the @click.options in its argument list.
Is there a way to properly propagate wrap the functions as to propagate the __click_params__ that @click.option adds to a function?
from functools import wraps
import click

def init_session(f):
  @wraps(f)
  @click.option('--argument-B')
  def wrapper(*args, **kwargs):
    # do something with argument-B, and add session to list of arguments.
    del kwargs['argument-B']
    kwargs['session'] = session_created_above

    return f(*args,**kwargs)
  return wrapper

def parse_config_file(f):
  @wraps(f)
  @click.option('--argument-C')
  def wrapper(*args, **kwargs):
    # do something with argument-C, and add config to list of arguments.
    del kwargs['argument-C']
    kwargs['config'] = config_parsed_above

    return f(*args,**kwargs)
  return wrapper

@click.group()
def main():
  pass

@main.command()
@click.option('--argument-a')
@parse_config_file
@init_session
def do_something_in_session(argument_a, config, session):
   # code
   return

The issue with the decorator solution is that all of your group options get moved to command options, meaning the "global stuff" that all your commands need now has to be specified after the command, i.e this:
cli --some-global-option command
Becomes:
cli command --some-global-option
I don't know, but for some reason this irks me, I guess because of the mental model of group options applying to all the commands through context it makes intuitive sense to me to specify them before the command.

I ran into this issue with a required group option, I implemented a solution based on the answer of @ryanneufeld. I don't know if it works with every corner cases, but it shows the command help when the help flag is given or no arguments given. And returns an error when trying to use the command without help. I also tested it with the first example in this issue and it seems to work.
hope it can help someone
import sys

import click

CONTEXT = {"help_option_names": ["-h", "--help"]}

def print_cmd_help(ctx, param, value):
    group = ctx.command
    name, cmd, args = group.resolve_command(ctx, sys.argv[1:])
    help_names = cmd.get_help_option_names(ctx)

    if set(args) & help_names or not args:
        # return command help when a user wants it or when he does not provide
        # arguments
        # taken from https://github.com/pallets/click/blob/7.1.1/src/click/core.py#L597
        cmd_ctx = click.Context(cmd, info_name=cmd.name, parent=ctx)
        click.echo(cmd_ctx.get_help())
        cmd_ctx.exit()

@click.group(context_settings=CONTEXT)
@click.option("--required", required=True)
@click.option(
    "-h",
    "--help",
    is_flag=True,
    callback=print_cmd_help,
    expose_value=False,
    is_eager=True,
)
def cli(required):
    ...

@cli.command(help="this is the help of test")
@click.argument("name")
def test(name):
    click.echo(name)

cli()

I ran into this issue with a required group option, I implemented a solution based on the answer of @ryanneufeld. I don't know if it works with every corner cases, but it shows the command help when the help flag is given or no arguments given. And returns an error when trying to use the command without help. I also tested it with the first example in this issue and it seems to work.
hope it can help someone
import sys

import click

CONTEXT = {"help_option_names": ["-h", "--help"]}

def print_cmd_help(ctx, param, value):
    group = ctx.command
    # parse the cmdline and get the command and its arguments
    parser = group.make_parser(ctx)
    global_opts, args, _ = parser.parse_args(args=sys.argv[1:])
    if global_opts.get("help") is True or not args:
        # global help wanted
        click.echo(ctx.get_help())
        ctx.exit()

    # create the command object manually and parse its arguments
    name, cmd, args = group.resolve_command(ctx, args)
    help_names = cmd.get_help_option_names(ctx)

    if set(args) & help_names or not args:
        # return command help when a user wants it or when he does not provide
        # arguments
        # taken from https://github.com/pallets/click/blob/7.1.1/src/click/core.py#L597
        cmd_ctx = click.Context(cmd, info_name=cmd.name, parent=ctx)
        click.echo(cmd_ctx.get_help())
        cmd_ctx.exit()

@click.group(context_settings=CONTEXT)
@click.option("--username", default="admin", prompt=True)
@click.password_option()
@click.option(
    "-h",
    "--help",
    is_flag=True,
    callback=print_cmd_help,
    expose_value=False,
    is_eager=True,
)
def cli(username, password):
    ...

@cli.command(help="this is the help of test")
@click.argument("name")
def test(name):
    click.echo(name)

cli()

I don't think this is solvable within Click in a general way.
Click parses and process all args and callbacks for a command before moving on to a subcommand. The subcommand can be resolved dynamically based on the current command's context, so it's not possible to guarantee what commands and params will be processed before actually running the pipeline. Additionally, the help option isn't guaranteed to be --help, and --help could also show up as the value of another option, so it's not possible to guarantee that --help showing up in the raw args means the help callback will be executed.
There are a few different solutions a project can implement, some outlined above:

#1618 will introduce a new prompt_required argument, that changes the behavior of prompts so they're only shown if the option is required or if the flag without a value is given. This applies to prompts, but it doesn't apply to missing arguments in general.
The parameters can be moved to each command, with a decorator to avoid repetition.
The group --help param can be customized to figure out the subcommand and show its help.
A dedicated help command (like git help <command name>) is fairly straightforward to implement using group.get_command(ctx, name) and command.get_help(ctx).
Use a project like sphinx-click or click-man to generate external documentation.

source: gharchive/issue

authors: davidism druchoo dsully joeydumont johanventer kflavin kissgyorgy mitsuhiko panpann philipsd6 ryanneufeld vokal-isaac warsamebashir

repo: pallets/click

license_type: permissive

license_source: bigquery


text:
use difflib for name suggestions in error messages

fixes #1446

Thanks @Na-Ne :)

source: gharchive/pull-request

authors: Na-Ne tirkarthi


text:
Automatic sharding of large datasets

In the previous, balkanized featurization scheme, we would conduct featurization separately in either vs_utils or cluster_utils, and this would naturally lead to many (e.g., 100s or 1000s) of .joblib/.pkl files of sharded dataframes containing features. However, in the new, unified scheme, we instead begin with one giant dataset containing info about all complexes, and then deepchem proceeds to do preprocessing, featurizaiton, etc. The problem is, no sharding is currently implemented under the hood except in fit.py. Unfortunately, for large datasets (e.g., tensors for convnets), this is almost certain to MemoryError out at some point. Therefore, we should add an option, perhaps in featurize() in featurize.py to do this sharding under the hood at the preprocess stage. I am experimenting with one such implementation of this now.

Great. This is now resolved by #57 .

repo: pandegroup/deepchem

license: MIT

license_source: github-api


text:
added a short wait in process_input and added parameter values

Added a 1 s wait in the process_inputs function to see if this affects the "TooMAnyRequests" error we are getting from the  Pangaea server
https://github.com/pangeo-forge/paleo-pism-feedstock/issues/2
Also adds parameter values to the zarr.

@cisaacstern, when will the recipe run, https://pangeo-forge.org/dashboard/recipe-run/1048, start? Currently it says it is still queued.

@jkingslake thanks for checking in! These recipe runs require a project admin to manually run them, using a chatops command here on the discussion thread. I will do that now.

/run paleo-pism-stacked

authors: cisaacstern jkingslake

repo: pangeo-forge/paleo-pism-feedstock


text:
提交任务不阻塞

Pool.Submit和PoolWithFunc.Server提交任务，如果没有空的worker，会一直阻塞。建议增加不阻塞的接口，当前失败时直接返回错误。

这个需求很痛，现在如果想做熔断、限流一类的逻辑要在 pool 外面再包一层，其实完全可以在 pool 里做。
@panjf2000 我理解加个配置项，直接在 retrieveWorker 里面 reentry 那个分支判断一下然后返回 nil，Submit 里加一下对 retrieveWorker 返回值的判断就可以了？如果没什么问题我来搞一下

大体思路应该是这样没错，我以前觉得熔断or限流这个逻辑应该在业务层实现，保持library的generality，不过好像有不少人都提出希望把这个feature加入到lib里，现在我觉得熔断这个feature的既可以归属到business也可以归属到library，都可以说得通。
你有时间的话提个PR吧，我review一下🤝

这里我觉得应该在 pool 里实现，主要是因为目前 pool 没有任何接口能让我了解现在的拥塞状况，调用了 Submit 之后就直接卡在里面了；Running 和 Cap 之类的也不大准确，对于瞬间的突发流量没法用 Running 来衡量压力。

authors: choleraehyq panjf2000 tenfyzhong


text:
Questions with details
潘少，我复制官方版本2的示例到goland中，启动就报错。我查了下源码是在gnet.go文件中引用了engine.go文件中定义的engine结构体，但是engine.go文件中的engine结构体是非导出的，goland编辑器一直无法识别。
gnet版本v2
操作系统windows
错误日志：
github.com/panjf2000/gnet/v2
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:49:7: undefined: engine
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:54:14: invalid operation: s.eng == nil (operator == not defined on untyped nil)
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:59:19: el.loadConn undefined (type *eventloop has no field or method loadConn)
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:69:14: invalid operation: s.eng == nil (operator == not defined on untyped nil)
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:84:14: invalid operation: s.eng == nil (operator == not defined on untyped nil)
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:421:43: cannot use options (variable of type *Options) as type bool in argument to initListener
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:426:9: undefined: run
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:440:11: undefined: engine
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\gnet.go:442:13: undefined: engine
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\load_balancer.go:71:5: el.idx undefined (type *eventloop has no field or method idx)
E:\work\go\pkg\mod\github.com\panjf2000\gnet\v2@v2.2.0\load_balancer.go:71:5: too many errors
Code snippets (optional)
No response

v2 暂时不支持 Windows

#339


text:
Prevents deployment if there are no changes to deploy

Closes #201

:+1: thanks!

authors: TeslaDethray bensheldon

repo: pantheon-systems/cli

license: mit


text:
Drop dependency on deprecated gulp-util

Hi,
gulp-util is deprecated. It should be replaced by dependencies on the individual components used by gulp-eslint. The README lists alternatives for the different components.
See https://github.com/gulpjs/gulp/issues/2065

Should be straightforward to replace:

gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.PluginError => https://www.npmjs.com/package/plugin-error
gutil.log => https://www.npmjs.com/package/fancy-log

Hi,
I confirm that this is straightforward replacement.
The main blocker is the lack of type definitions for plugin-error. I opened a PR to fix this.
I have a patched version of gulp-tslint ready to be submitted but it uses my temporary fork of plugin-error until the types are available. I'll submit it is as soon as the types are ready.

The types for plugin-error got merged, they should be published soon.

ansi-colors being suggested is likely down to Gulp using it. If features unique to chalk aren't being used, may as well use ansi-colors. @types/ansi-colors has got the library covered by the way. I'll see if I can get typings in it directly too since I'm probably going to be using it in my own projects.

@Silic0nS0ldier Feel free to open a new PR. Having a smaller dependency would be a good thing.
I'm closing this issue since the updated version is now on npm.

authors: Silic0nS0ldier demurgos panuhorsmalahti

repo: panuhorsmalahti/gulp-tslint


text:
odroid/c2: Docker fails with "epoll wait function not implemented"

Trying to run docker-containerd:
WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 m[ 3577.734671] docker-containe[1251]: syscall 1069
[ 3577.740213] Code: f94023e4 f94027e5 f9400fe8 d4000001 (b13ffc1f)
[ 3577.746179] CPU: 1 PID: 1251 Comm: docker-containe Not tainted 3.14.29 #1
[ 3577.752934] task: ffffffc072626c00 ti: ffffffc072120000 task.ti: ffffffc072120000
[ 3577.760351] PC is at 0x4e8db8
[ 3577.763252] LR is at 0x4e8d98
[ 3577.766185] pc : [<00000000004e8db8>] lr : [<00000000004e8d98>] pstate: 60000000
[ 3577.773538] sp : 00000048202077c0
[ 3577.776817] x29: 0000007fb2151800 x28: 0000004820001e00
[ 3577.783911] x27: 0000000000e16f28 x26: 0000000000000000
[ 3577.789191] x25: 0000007fb2952780 x24: 00000000008470a8
[ 3577.794436] x23: 0000000000e39000 x22: 0000007fb295148f
[ 3577.799730] x21: 0000000000000000 x20: 000000000046a7a0
[ 3577.804960] x19: 0000000000438ab0 x18: 0000000000000000
[ 3577.810236] x17: 0000000000be3650 x16: 0000004820207eb0
[ 3577.815445] x15: 0000000000000180 x14: 0000000000000000
[ 3577.820681] x13: 0000007fb2951650 x12: 0000007fb2152090
[ 3577.825904] x11: 00000000003d0f00 x10: 0000000000848a78
[ 3577.831124] x9 : 0000004820207fa0 x8 : 000000000000042d
[ 3577.836321] x7 : 000000482010ca80 x6 : 0000000000532020
[ 3577.841515] x5 : 0000000000000000 x4 : 0000000000000000
[ 3577.846813] x3 : ffffffffffffffff x2 : 0000000000000080
[ 3577.851999] x1 : 00000048202078b8 x0 : 0000000000000004
ax=4096
DEBU[0000][ 3577.857234]
 containerd: read past events                  count=0
DEBU[0000] containerd: supervisor running                cpus=4 memory=1719 runtime=runc runtimeArgs=[] stateDir=/run/containerd
DEBU[0000] containerd: grpc api on /run/containerd/containerd.sock
FATA[0000] containerd: epoll wait                        error=function not implemented

Needs fixing.

This is because the kernel is just too old for the C2.
I need to investigate using a beta mainline kernel or something similar.

This is actually wrong.
In the arm64 version of the kernel only epoll_pwait is supported.

https://github.com/docker/containerd/pull/186

Fixed

repo: paralin/SkiffOS


text:
Info View needs to display memory image at moment of user code execution

For P2, when Debug is enabled, the Info View's hex display shows the memory image with the Debugger prepended, as it is upon download; however, this is not how the memory appears upon start of user code.
Upon execution, the Debugger is relocated to the end of Hub memory and the Spin2 Interpreter (if included) and the user's code/data are relocated to the start of Hub memory (as they'd be if Debug were disabled), then Cog0 is restarted with the user's code.
To address this, the Hex display should default to the relocated view to maintain the purpose as it was originally intended.  Additionally, as a potential enhancement, a way to toggle between the user-start vs. the download-image views could be implemented and the latter could also include the flash loader.

The forum thread that demonstrates this issue is here:  https://forums.parallax.com/discussion/comment/1538678#Comment_1538678

repo: parallaxinc/Propeller-Tool


text:
Chinese bastards

Chinese bastards

あなたのこのお母さんがいて、お母さんが飼っているものがありませんか。私は草案しますか。あなたの家族を殺します

repo: parallelchain-io/pchain-client-cli


text:
Cannot connect to PostgreSQL database

Hi. I create new connection with string:
host=127.0.0.1 port=5432 dbname=mydb user=postgres password=postgres

Looks like sqt does not recognize it's PostgreSQL, tries ODBC instead and gives me error:
error 0, state IM002: [unixODBC][Driver Manager]Data source name not found and no default driver specified

Or am I doing something wrong? Thanks.
Also, if I don't use %user% and %pass% macros, it probably should not popup up login dialog.

Do not use "name" field for connection string. Otherwise I would like to see screenshot

There's "dbname" parameter, but no "name". Or what do you mean?
http://dimgel.me/drop/sqt/screenshot-postgres-cannot-connect.png

Ah, damn. :) I see. I though that large textarea was just read-only info. Everything works now, thanks. :)

authors: dimgel parihaaraka

repo: parihaaraka/sqt


text:
Do not allow + show an error if user imports a Parity Signer account for a chainId other than the current chain

@axelchalon mentioned:

@parity/qr-signer returns us the address and chainId when scanning the account, so this can be done. However I think it might be easier to simply show the Signer account in the accounts list if we're connected to the right chain (we might want to show a warning at one point if we import a Signer account for a chainId other than the chain we're currently connected to -- otherwise the user might be surprised not to see their imported signer account show up in the accounts list after completing the import).

I'm able to look into this now that I've resolved https://github.com/paritytech/fether/issues/466

repo: paritytech/fether


text:
The road to the native runtime free world

The Vision
We want to get rid off the native runtime. Initially the native runtime was added to overcome the performance "problems" of using wasmi for the runtime execution. However, with wasmtime we are around 2x slower than native. While this still isn't perfect, it is way faster than wasmi that is around 10x slower (all depending on the work load etc). While the performance plays an important role here there are also other things to consider, like ensuring that the native and wasm runtime are deterministic. We have already run into problems with Polkadot when it comes to this determinism problems. While we can ensure to use the exact same compiler version for building the Polkadot binary in our release process, we can not ensure that everyone else is also using the same compiler version as we used for the wasm build.
There is also a nice write up and some discussions here: https://github.com/paritytech/substrate/issues/7288
The Plan
To remove the native runtime, we need to fix some things before:

Make the wasm memory growable. We have already run into a situation of a OOM. This happened because we only allow a fixed amount of memory per wasm instance. We solved this problem temporarily by running the native runtime which can just use the entire system memory and then afterwards we released a new Polkadot node with an increased memory budget. So, we were lucky because we had the native runtime that saved our ass, but if we remove it it would not be there anymore. So, we should support growing of the wasm memory. It can still in the end allocate in maximum 4GB, but that should be way enough for all our use cases and combined with some proper monitoring we should be able to be informed before we hit this upper limit.
Remove runtime api requirement of statically checking that the runtime api is implemented. Currently when trying to use a runtime api, it is required to tell the compiler that a certain type is required that needs to implement a runtime api. This was done on purpose to give people better hints at compile time that they don't have implemented a certain api, but this only works by checking the native runtime (because we can not tell the compiler to check the wasm file). So, if we want to remove the native runtime we also need to remove this requirement on having the runtime api being implemented for a type. This can be solved by implementing the runtime apis for a different trait that will then be able to call into the runtime. We will also need to change some stuff, like checking that a runtime api is implemented on startup instead of failing later when the node is running. https://github.com/paritytech/substrate/issues/13331
Genesis is currently being created using the native runtime. We will also need to fix this. Maybe with an extra tool or whatever. https://github.com/paritytech/substrate/issues/13334

Open Questions
If you want to help us out and contribute to this issue, in this section you can find open questions and tasks where we would appreciate any input.
There are maybe still some other things to consider and to fix on the way, like only compiling the runtime for wasm instead of the current native & wasm build.

Here you can find the board with specific sub-tasks to this milestone:
https://github.com/orgs/paritytech/projects/18/views/9

As an aside not strictly relevant here, we do envision having "runtime libraries" eventually, like SPREEs or perhaps large verifier keys ala halo2, which might be implemented in another way like a flat file of data, or if they undergo closer auditing then eBPF or native code loaded via dlopen, or a native generator for a verifier key.  Afaik all node should use identical deployment scheme, so we'd never walk back the consensus improvement described here.

Okay, sounds interesting. I always thought that SPREE would be different wasm files that are just linked at runtime?
Do we really want to native load code? Doesn't this destroy the entire advantage of using wasm? I mean then we could have done that from the beginning and could have distributed the runtime as a native library.

I've too little grasp about what "wasm files linked at runtime" means, but the SPREE would require process-like separation from the main PVF, and the SPREE invokes hostcalls that modify the SPREE state, for which the main PVF lacks permission.
At least in my mind that's impossible with "linked at runtime" so instead the SPREE exposes some crate linked at build time, but then itself creates new hostcalls or more SPREE-calls available to the whole PVF including its own part.
Yes, SPREEs could be WASM but maybe 2x matters enough that a common enough SPREE would be native and well audited, or maybe doing those native builds limits our hardware choices too much?  I donno..

Do we really want to native load code?

I donno, it's plausible we'd never want native code loaded, but much here remains unclear to me, like the performance hit eBPF takes.
I only raised the comment in case anything of this impacts how you remove the native runtime.  :)

I've too little grasp about what "wasm files linked at runtime" means, but the SPREE would require process-like separation from the main PVF, and the SPREE invokes hostcalls that modify the SPREE state, for which the main PVF lacks permission.

Yeah that makes sense and I did not thought about it, but this could just be a host call to communicate with SPREE and the SPREE could be anything.
Aka we could have SPREE by default in wasm and could provide native compiled SPREE that ships with the node. If the requested SPREE version would not be supported by the node, we could just run the wasm version. However, I think whatever we do it is orthogonal to removing the native runtime.

I only raised the comment in case anything of this impacts how you remove the native runtime. :)

That is always a good idea nevertheless :)

@bkchr  Would host functions be removed entirely along side the  native runtime?
Or would there be a workaround for that?

A question on this popped up at https://github.com/Manta-Network/Manta/pull/701
The gist of it is:
There already exists a commandline flag to force WASM execution: --execution wasm
While stopping validators on a nondeterminism issue is certainly bad and should be avoided ( e.g. using that same CLI flag ), it might be tolerable for other full node network participants - as a downtime on their functions ( serving RPC in our case ) is not nearly as critical to the network as a chain stall.
We might want to actually optimize non-critical nodes for the happy case where everything works and have the 2x speedup in runtime execution result in a higher number of RPCs served per node ( got no numbers on the actual performance impact yet, using the 2x number from @bkchr's initial description here, actual gain I guess will also depend on the weight used per block on average )
native runtime free as on the tin would remove this optionality of tolerating stability issues for performance gain, so IMHO it's not desirable, since you can already force the WASM runtime with the above CLI flag.

Did you benchmark the execution? And do you have that many calls into the runtime on your RPC nodes?

Did you benchmark the execution? And do you have that many calls into the runtime on your RPC nodes?

No benchmarks yet. Can only intuit at this point that in the case of full-ish blocks and benchmark-scale machines a 2x performance penalty would hurt RPC throughput.
We do expect high RPC load on our nodes through custom wallet syncing logic in the near future.
I realize these RPC serving nodes can be easily scaled horizontally, but what I'm arguing here is that this change would condemn non-critical network participants to waste resources for a gain in stability which is not strictly necessary.
A proposal could be to force --execution wasm on validators but leave --execution native_else_wasm as default on full nodes, leaving them to opt into wasm execution with --execution wasm.

A "2x" slowdown estimate in the runtime execution speed does in no way translate in a 2x slowdown in the number of RPC requests that can be served. The slowdown obviously depends on the kind of requests that you get, but I actually expect it to be basically 0. Until recently, PolkadotJS didn't even expose the possibility to call into the runtime through the RPC layer.

got no numbers on the actual performance impact yet

I don't think it is reasonable argue that the performance hit is not worth the removal of the native runtime without having any number to back this up.

I don't think it is reasonable to argue that the performance hit is not worth the removal of the native runtime without having any number to back this up.

I agree, which is why I'm pointing to the general wasting of CPU cycles here. RPC is just our use-case. Other people will be running indexing (i.e. subsquid) or offchain-workers on their full nodes - they're all impacted by this change.

If the runtime execution speed suddenly divided by 2, then the weights would be multiplied by 2 in return.
The CPU usage problem that you describe is indeed correct, but it's actually independent of the time it takes to execute. No matter whether it takes 5 microseconds or 5 milliseconds to verify for example a balance transfer, the weights are adjusted so that a node running on the reference machine will use 100% CPU if the chain is at maximum capacity.

No matter whether it takes 5 microseconds or 5 milliseconds to verify for example a balance transfer, the weights are adjusted so that a node running on the reference machine will use 100% CPU if the chain is at maximum capacity.

There's some subtlety here. Weights are always benchmarked with the WASM runtime, as it's obviously important for validators who always use it to not overflow execution time.
Full nodes executing the native runtime thus use weights created with the WASM runtime, but execute them 2x faster => lower CPU usage on full nodes executing native.

My basis for argument is the assumption that a node that's executing block weight close to the benchmark limit will have a high CPU load if it's exactly on spec. That would leave little free resources to handle RPCs into the runtime. If that same node now had ~50% idle CPU because of native execution finishing faster, it'd have plenty capacity for "extra" RPC work. Please correct me if this assumption is wrong

You also need to consider how much of the RPC requests are querying recent state and how much of them are interested in "archive" data. The current native approach only helps if most of the calls are querying recent data, and the node is upgraded soon after an on-chain runtime upgrade. But yeah, we need hard benchmarking data to see how much extra resources are needed to avoid this native runtime optimization.

You also need to consider how much of the RPC requests are querying recent state and how much of them are interested in "archive" data. The current native approach only helps if most of the calls are querying recent data,

There's no relationship between the runtime and querying data through RPC requests.
When an RPC requests wants to read a storage value, it just reads directly from the database. The runtime is completely unrelated to this.

It is also worth mentioning that RPC throughput scales well with the number of CPU cores. Whilst block import is serialized at the moment. Weight calculations do not account for any extra cores, that may be used for serving RPC requests.

For the purpose of the master tutorial, what I would love to have is a fixed node that can ingest different runtimes (one at a time, of course), and run any of them. This should ideally be as simple as changing a single line in Cargo.toml, or simple be a --runtime wasm.wasm.
Will this be feasible once this is done?
I think this is already feasible using the first ugly approach. Assuming we only do wasm execution, we just need a glue trait that would convey some types like OpaqueBlock, and a few other types needed for building the RPC extensions (AccountId, Nonce) and the GenesisConfig.
As far as I know, genesis state will be built with wasm after this, and we are moving away from custom RPCs as well. So I think the amount of information that the client needs to know about the runtime is actually very very small.
looking at bin/minimal/node is a good small example to demonstrate this.

@kianenigma You can do that already with a custom chain spec. Generic substrate node should be able to sync any chain with substrate supported consensus. E.g. cargo run --release --chain polkadot.json in the substrate repo can sync polkadot.

@kianenigma You can do that already with a custom chain spec. Generic substrate node should be able to sync any chain with substrate supported consensus. E.g. cargo run --release --chain polkadot.json in the substrate repo can sync polkadot.

That's a valuable new avenue that I had totally forgotten about, thanks!
But -- in order to create a chain-spec, you still need some kind of fully-functioning client to be integrated with a wasm runtime. My ideal scenario is have a runtime that is itself capable of generating its initial state, and can be loaded into an omni-client that can run it with minimal configuration.
of course, as long as the consensus in the runtime and client are matching. For the sake of simplicity, assume manual-seal is being used.
For the tutorial, what I can do as the tutorial creator is to pre-generate all chain specs and let each step of the tutorial to have a .json file.
This is much better, but I am still hoping that we can (optionally) reduce the dependency of the client on the runtime even further.

My ideal scenario is have a runtime that is itself capable of generating its initial state, an

This will be do-able after: https://github.com/paritytech/substrate/issues/13334
The wasm file will have an API to generate the genesis state/initial state.

omni-client that can run it with minimal configuration.

This will not be possible after this pr. I mean yes we will move closer to this as the native runtime is gone. However, a lot of runtime api calls etc require that the node and the runtime know the type. This could also be changed, but would require to change a lot of things. (not impossible for sure)
But yeah, for your use case not that important.

cargo run --release --chain polkadot.json

Actually this does not seem to work. The genesis config of the linked node's native runtime and the chain-spec need to have matching pallets for this approach to work. Otherwise I get an error that the provided chain spec has either missing pallets or too many of them.
Given this, I am somewhat baffled about why cargo run --release -- --chain polkadot.json does indeed work. 🤔

cargo run --release --chain polkadot.json

Actually this does not seem to work. The genesis config of the linked node's native runtime and the chain-spec need to have matching pallets for this approach to work. Otherwise I get an error that the provided chain spec has either missing pallets or too many of them.
Given this, I am somewhat baffled about why cargo run --release -- --chain polkadot.json does indeed work. 🤔

The genesis config of the linked node's native runtime and the chain-spec need to have matching pallets for this approach to work.

The polkadot.json is a raw genesis config and this doesn't require the native runtime to load it. So, not sure what you have done there.

Then it must be because I have not used --raw chain spec, and now I see what is the point of it! :))

I don't know if I shared my opinion before but there are 2 important points to using Native runtime:

Speed (running 1000 tests using native is significantly faster, even when using interpreted wasm (which doesn't spend time compiling at the boot)
Debugging (So far, I wasn't able to get proper debugging of the wasm runtime (tried building with debug symbols and tell the wasmtime to debug it, but no success)

This will not be possible after this pr. I mean yes we will move closer to this as the native runtime is gone. However, a lot of runtime api calls etc require that the node and the runtime know the type. This could also be changed, but would require to change a lot of things. (not impossible for sure)

I was just thinking about this again. I accept that it is not possible to decouple the two 100%, that's not what I am asking for.
What I am asking for to make the interface between the two clear.
As it stands now, the client of a substrate based chain is expected to arbitrarily imports the runtime crate to use its type.
Moreover, the runtime code is assumed to know exactly which types it should declare as public in oder to satisfy a runtime.
I think both of the above are bad situation. I don't know if it was left like this because it is not possible, or out of ignorance? The solution seems to be a trait to connect the two in a clear manner.
/// The client's representation of a runtime.
trait Runtime {
    type RuntimeApis;
    type OpaqueBock;
    type GenesisConfig; // This will not be needed anymore, but you get the point ;)
}

I would even go that far and say that you don't even need to import the runtime in your node anymore.

Hell yeah is all I have to say to that then, yes none of what I said is needed.

Bumping @crystalin's comment here:

I don't know if I shared my opinion before but there are 2 important points to using Native runtime:

Speed (running 1000 tests using native is significantly faster, even when using interpreted wasm (which doesn't spend time compiling at the boot)
Debugging (So far, I wasn't able to get proper debugging of the wasm runtime (tried building with debug symbols and tell the wasmtime to debug it, but no success)

I've also found debugging of the wasm runtime very hit-or-miss, with lots of variables being logged as just empty strings.
As try-runtime-cli develops and more debugging features are added, I'm wondering if there could be a benefit to using it with a native runtime.

The native runtime can already not be used anymore.

with lots of variables being logged as just empty strings.

This is just because we have implemented a lot of Debug impls to do this. Generally this is something that we should revisit and to check the impact on the runtime. Generally, when things are not being used, the linker should strip them.

This is just because we have implemented a lot of Debug impls to do this. Generally this is something that we should revisit and to check the impact on the runtime. Generally, when things are not being used, the linker should strip them.

Log messages would probably the place which pull them into the runtime image. Solution would be to disable the lower log levels at compile time by default.

I guess then it would be an interesting experiment to see by how much the size of a runtime goes up if we replace all RuntimeDebug by Debug. We could compare if there is a substantial difference when sp-api/disable-logging is set. With lto enabled the linker should be able to eliminate the unused impls.

I tried once RuntimeDebug and noticed it was somehow more code with RuntimeDebug than Debug and I never used RuntimeDebug since. I didn't bother checking why it was the case though.

authors: Garandor Wizdave97 arkpar athei bkchr burdges crystalin kianenigma liamaharon nazar-pc tomaka wigy-opensource-developer

repo: paritytech/substrate


text:
Confirm Phragmen will always select a nominator who nominates only one validator

Test/fuzzing should confirm the behavior of Phragmen where a nominator is never left out of the stakers set for having only backed one validator.

Basically: reduce() will not remove a nominator with a single vote.
Answer being: generally speaking no and it is easy to see why: reduce only works on cycles, you need cycles in the graph of nominators to validators and then you remove one edge from that cycle. I cannot see how you can be part of a cycle if you have casted one vote only. cc @AlfonsoCev

authors: kianenigma shawntabrizi


text:
could not compile sp-core

sp-core = { default-features = false, version = '3.0.0' }
error[E0277]: a value of type `std::vec::Vec<Transcript>` cannot be built from an iterator over elements of type `merlin::transcript::Transcript`
   --> /home/wjy/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-core-3.0.0/src/sr25519.rs:648:4
    |
648 |     ).collect();
    |       ^^^^^^^ value of type `std::vec::Vec<Transcript>` cannot be built from `std::iter::Iterator<Item=merlin::transcript::Transcript>`
    |
    = help: the trait `FromIterator<merlin::transcript::Transcript>` is not implemented for `std::vec::Vec<Transcript>`

error[E0277]: the trait bound `Transcript: SigningTranscript` is not satisfied
   --> /home/wjy/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-core-3.0.0/src/sr25519.rs:651:3
    |
651 |         &mut messages,
    |         ^^^^^^^^^^^^^ the trait `SigningTranscript` is not implemented for `Transcript`
    |
   ::: /home/wjy/.cargo/registry/src/github.com-1ecc6299db9ec823/schnorrkel-0.9.2/src/batch.rs:70:8
    |
70  |     T: SigningTranscript,
    |        ----------------- required by this bound in `schnorrkel::verify_batch`
    |
    = note: required because of the requirements on the impl of `SigningTranscript` for `&mut Transcript`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: could not compile `sp-core`

there are dependencies:
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
edition = '2018'
homepage = 'https://substrate.dev'
license = 'Unlicense'
name = 'node-template-runtime'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '3.0.0'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

[build-dependencies]
substrate-wasm-builder = '4.0.0'

# alias "parity-scale-code" to "codec"
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
version = '2.0.0'

[dependencies]
hex-literal = { optional = true, version = '0.3.1' }
serde = { features = ['derive'], optional = true, version = '1.0.111' }
funty = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105 = { version = "=1.1.0", default-features = false } # https://github.com/bitvecto-rs/bitvec/issues/105

# local dependencies
pallet-template = { path = '../pallets/template', default-features = false, version = '3.0.0' }
#node-primitives = {path = '../primitives', default-features = false, version = '2.0.0'}
#node-constants = {path = '../constants', default-features = false, version = '0.1.0'}

##orml
#orml-tokens = { default-features = false, version = '0.4.0' }
#
##parachain
#cumulus-pallet-parachain-system = {version = "0.1.0", git = "https://github.com/paritytech/cumulus.git", branch = "master", default-features = false}
#cumulus-pallet-xcm-handler = {version = "0.1.0", git = "https://github.com/paritytech/cumulus.git", branch = "master", default-features = false}

# Substrate dependencies
frame-benchmarking = { default-features = false, optional = true, version = '3.0.0' }
frame-executive = { default-features = false, version = '3.0.0' }
frame-support = { default-features = false, version = '3.0.0' }
frame-system = { default-features = false, version = '3.0.0' }
frame-system-benchmarking = { default-features = false, optional = true, version = '3.0.0' }
frame-system-rpc-runtime-api = { default-features = false, version = '3.0.0' }
pallet-aura = { default-features = false, version = '3.0.0' }
pallet-balances = { default-features = false, version = '3.0.0' }
pallet-grandpa = { default-features = false, version = '3.0.0' }
pallet-randomness-collective-flip = { default-features = false, version = '3.0.0' }
pallet-sudo = { default-features = false, version = '3.0.0' }
pallet-timestamp = { default-features = false, version = '3.0.0' }
pallet-transaction-payment = { default-features = false, version = '3.0.0' }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = '3.0.0' }
sp-api = { default-features = false, version = '3.0.0' }
sp-block-builder = { default-features = false, version = '3.0.0' }
sp-consensus-aura = { default-features = false, version = '0.9.0' }
sp-core = { default-features = false, version = '3.0.0' }

sp-inherents = { default-features = false, version = '3.0.0' }
sp-offchain = { default-features = false, version = '3.0.0' }
sp-runtime = { default-features = false, version = '3.0.0' }
sp-session = { default-features = false, version = '3.0.0' }
sp-std = { default-features = false, version = '3.0.0' }
sp-transaction-pool = { default-features = false, version = '3.0.0' }
sp-version = { default-features = false, version = '3.0.0' }

#[dev-dependencies]
#sp-core = "=3.0.0"

[features]
default = ['std']
runtime-benchmarks = [
    'hex-literal',
    'frame-benchmarking',
    'frame-support/runtime-benchmarks',
    'frame-system-benchmarking',
    'frame-system/runtime-benchmarks',
    'pallet-balances/runtime-benchmarks',
    'pallet-timestamp/runtime-benchmarks',
    'sp-runtime/runtime-benchmarks',
]
std = [
    'codec/std',
    'serde',
    'frame-executive/std',
    'frame-support/std',
    'frame-system/std',
    'frame-system-rpc-runtime-api/std',
    'pallet-aura/std',
    'pallet-balances/std',
    'pallet-grandpa/std',
    'pallet-randomness-collective-flip/std',
    'pallet-sudo/std',
    'pallet-template/std',
    'pallet-timestamp/std',
    'pallet-transaction-payment/std',
    'pallet-transaction-payment-rpc-runtime-api/std',
    'sp-api/std',
    'sp-block-builder/std',
    'sp-consensus-aura/std',
    'sp-core/std',
    'sp-inherents/std',
    'sp-offchain/std',
    'sp-runtime/std',
    'sp-session/std',
    'sp-std/std',
    'sp-transaction-pool/std',
    'sp-version/std',
    "funty/std",
#    "node-primitives/std",
#    "node-constants/std",
]

indeed it seems sp-core can't compile with schnorrkel 0.9.2.
as a temporary fix you can do cargo update -p schnorrkel --precise 0.9.1 (or fix it in the cargo.toml)

0.9.2 is yanked, error shouldn't happen anymore

authors: thiolliere transxask


text:
Transaction pool benchmarks

With https://github.com/paritytech/substrate/pull/9958 we have added a transaction pool benchmark. It would be nice to add some more scenarios and see how they perform.

Have multiple accounts send transactions and some of them should reuse a nonce. We already have seen this in the "wild" and that lead to transactions being stuck in the tx pool. To fully reproduce this we may need to start 2 nodes.

@bkchr I would like to take it on.

@bkchr can I get some assist?
I'm assuming reusing a nonce is the same as creating 2 nodes then having the second node execute the same transaction(i.e create_benchmark_extrinsic)?
How would the second node be aware of the transactions that have taken place on the first node?

I'm assuming reusing a nonce is the same as creating 2 nodes then having the second node execute the same transaction

Creating 2 nodes? What you mean?

How would the second node be aware of the transactions that have taken place on the first node?

By syncing & importing the blocks that have included the transactions?

I think its enough if you modify this logic and use multiple accounts with nonce re-using.
No need for multiple nodes, the test runs all within one binary.
https://github.com/paritytech/substrate/blob/9acfbc0e88f5a6df873d222a3e01c2b59868b2e3/bin/node/cli/benches/transaction_pool.rs#L176

authors: Doordashcon bkchr ggwpez


text:
Fix CI

Changes:

Put type constraint at the end to satisfy the compiler
Add runtime-benchmarks rust features where they are missing
Use new OnRuntimeUpgrade hooks

bot rebase

bot merge


text:
Modular block request handler

If a substrate user wants to implement a custom block relay protocol (like Compact Blocks, Graphene, etc), it is not currently possible. This is because the block request handler is tightly coupled with the rest of the stack. This change makes the block request handler modular.
Main changes:

ChainSync currently calls into the block request handler directly. Instead, move the block request handler behind a trait. This allows new protocols to be plugged into ChainSync.
BuildNetworkParams is changed so that custom relay protocol implementations can be (optionally) passed in during network creation time. If custom protocol is not specified, it defaults to the existing block handler
BlockServer and BlockDownloader traits are introduced for the protocol implementation. The existing block handler has been changed to implement these traits
Other changes:

make TxHash serializable. This is needed for exchanging the serialized hash in the relay protocol messages
clean up types no longer used(OpaqueBlockRequest, OpaqueBlockResponse)

polkadot companion:  https://github.com/paritytech/polkadot/pull/7134
cumulus companion: https://github.com/paritytech/cumulus/pull/2489

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2730016

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2737684

Please point me how to fix the failing cumulus test (could not find anything in the contributing doc about making a dependent cumulus PR)

Please point me how to fix the failing cumulus test (could not find anything in the contributing doc about making a dependent cumulus PR)

You need to make a cumulus companion, much the same way as you made the polkadot companion

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2800902

You need to merge master to polkadot/cumulus companions

Hi @altonen @melekes @dmitry-markin Can you please let me know the next steps here, in terms of getting this merged? Sorry I am not clear about the process, as I am submitting an upstream patch for the first time. Thanks!

Hi @altonen @melekes @dmitry-markin Can you please let me know the next steps here, in terms of getting this merged? Sorry I am not clear about the process, as I am submitting an upstream patch for the first time. Thanks!

Hi @rahulksnv, please merge master into you PR to resolve the merge conflicts. Than I would wait for @altonen approval, and we can merge the PR.

Hi @altonen @melekes @dmitry-markin Can you please let me know the next steps here, in terms of getting this merged? Sorry I am not clear about the process, as I am submitting an upstream patch for the first time. Thanks!

Hi @rahulksnv, please merge master into you PR to resolve the merge conflicts. Than I would wait for @altonen approval, and we can merge the PR.

@dmitry-markin merged with latest master, thanks

@dmitry-markin merged with latest master, thanks

Could you do the same with companion PRs for tests to pass?

Re-synced all three repos the corresponding master.

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

Thanks for the reminder. I have been on a break, will wrap this up (resync with latest master)

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

Thanks for the reminder, was on a break, will resync with master and try to wrap this up

authors: altonen dmitry-markin paritytech-cicd-pr rahulksnv zk-qed


text:
Use balances::TotalIssuance for scaling between votes and balances (#…

…2361)

Use total issuance to convert between votes and balances

Remove cruft

ps. just checked with dev and local testnet and no one is ignored due to any of the previous issues.

authors: Kianenigma gavofyork


text:
Migrate away from SimpleDispatchInfo

Deprecates SimpleDispatchInfo, replaced with impls for Weight, (Weight, Class) and (Weight, Class, PaysFee)
Revamps all the docs accordingly. Since the new weight system is being prepared and will be presented in Sub0, this is quite important, the old docs were very much out of date.

I brought this up (intention to deprecate SimpleDispatchInfo) and there were no objections, so I assume it is okay. SimpleDispatchInfo was verbose, not flexible (i.e. for each permutation of (weight, class, fee) you need a new enum variant) and does not have any added value. I always saw it as hasty mistake which was added in the first version of weights.
So all in all, If this is going to happen, better for it to happen now before 2.0.
This PR should change no logic except for in weight.rs. substitution regex:
// FixedNormal pays fee, default class is Normal, only replace weight
SimpleDispatchInfo::FixedNormal\((.*)\)
$1

// FixedOperational pays fee, no need to set third value
SimpleDispatchInfo::FixedOperational\((.*)\)
\($1, frame_support::weights::DispatchClass::Operational\)

// FixedMandatory pays fee, no need to set third value
SimpleDispatchInfo::FixedMandatory\((.*)\)
\($1, frame_support::weights::DispatchClass::Mandatory\)

[x] polkadot companion: https://github.com/paritytech/polkadot/pull/1008
[x] clean some imports.

tests failing.

should be good now.  @gnunicorn

Updated the polkadot PR as well and both should be mergeable now.

authors: gnunicorn kianenigma


text:
Evaluate integration of rust-semver

See semver's CI setup

The current tool for that would probably be https://crates.io/crates/cargo-semver-checks. I am not sure though if it really is that useful to us.

authors: Robbepop pepyakin

repo: paritytech/wasmi


text:
Add {i32,i64}.{and,or,xor} branch+cmp instructions

Follow up of: https://github.com/paritytech/wasmi/issues/712
This adds the following Instruction variants to the wasmi IR:

BranchI32And
BranchI32AndImm16
BranchI32Or
BranchI32OrImm16
BranchI32Xor
BranchI32XorImm16
BranchI64And
BranchI64AndImm16
BranchI64Or
BranchI64OrImm16
BranchI64Xor
BranchI64XorImm16

This Gist of counted executed instructions while running coremark.wasm indicates that there might be a lot of places where this optimization could be applied: https://gist.github.com/Robbepop/16ac42197e1c745dd5ad3ab41524ae2d

Implemented this in https://github.com/paritytech/wasmi/tree/rf-add-br-and-or-xor but benchmarks with the existing wasmi benchmarks as well as with coremark.wasm showed no performance improvements. Therefore I think it is best to not merge this PR and close this issue.

Re-opened to account for https://github.com/paritytech/wasmi/issues/793.


text:
Fix Scene Logic

Changes proposed in this pull request:

WaitingScene 구체화
main.cpp 에 있던 PlayGame? 부분을 waitingScene으로 옮겼음
프레임워크 구조 수정

잘 따라와줬습니다 :)

repo: parkgeonhu/snake-game


text:
bump Kokkos to version 4.2

This updates Kokkos to version 4.2.01.
Kokkos 4.2 fixed bugs in reductions on both CUDA and HIP: https://github.com/kokkos/kokkos/issues/6197

@pgrete do you know what happened to the CI here? it didn't even initialize the Docker image...

@pgrete It looks like there's something wrong with the driver version on the CI machine:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #1: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
  nvidia-container-cli: initialization error: nvml error: driver/library version mismatch: unknown
  Error: failed to start containers: 3f6b9[27](https://github.com/parthenon-hpc-lab/athenapk/actions/runs/8667014387/job/23769079949?pr=109#step:2:30)4a47dd4451cbdae35c0788d44bf2d412fcd8d8e477d2e131700214a8b
  Error: Docker start fail with exit code 1

The CI machine needs to reload the cuda driver moduels (currently prevented by a running job). Should be fixed later today.

@pgrete Do you have any idea what is causing the MPI failures? They look like this:
[93f25432e875:07073] *** Process received signal ***
[93f25432e875:07073] Signal: Segmentation fault (11)
[93f25432e875:07073] Signal code: Address not mapped (1)
[93f25432e875:07073] Failing at address: (nil)
[93f25432e875:07073] [ 0] /usr/lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fb8e7f78090]
[93f25432e875:07073] [ 1] /usr/lib/x86_64-linux-gnu/libc.so.6(+0x183bf2)[0x7fb8e80b8bf2]
[93f25432e875:07073] [ 2] /opt/openmpi/lib/libopen-rte.so.40(+0x2d821)[0x7fb8e826f821]
[93f25432e875:07073] [ 3] /opt/openmpi/lib/libopen-rte.so.40(orte_show_help_recv+0x177)[0x7fb8e826fcb7]
[93f[254](https://github.com/parthenon-hpc-lab/athenapk/actions/runs/8667014387/job/23847736958#step:6:255)32e875:07073] [ 4] /opt/openmpi/lib/libopen-rte.so.40(orte_rml_base_process_msg+0x3e1)[0x7fb8e82cd7a1]
[93f25432e875:07073] [ 5] /opt/openmpi/lib/libopen-pal.so.40(opal_libevent2022_event_base_loop+0x7b3)[0x7fb8e81b3f13]
[93f25432e875:07073] [ 6] /opt/openmpi/bin/mpiexec(+0x14a1)[0x55c8789de4a1]
[93f25432e875:07073] [ 7] /usr/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fb8e7f59083]
[93f25432e875:07073] [ 8] /opt/openmpi/bin/mpiexec(+0x11fe)[0x55c8789de1fe]
[93f25432e875:07073] *** End of error message ***
"

Do they happen on init?
I've seen them intermittently, and IIRC they were (under some circumstances) also related to Kokkos 4.2.
Also, have you done any performance test with Kokkos 4.2? AthenaK reverted back after discovering performance issues.

Do they happen on init? I've seen them intermittently, and IIRC they were (under some circumstances) also related to Kokkos 4.2. Also, have you done any performance test with Kokkos 4.2? AthenaK reverted back after discovering performance issues.

No, they appear to happen at random timesteps in the middle of each test.
Also, no...maybe this is not a good idea. I will close this PR. Maybe things will stabilize in a few months.

authors: BenWibking pgrete

repo: parthenon-hpc-lab/athenapk


text:
Persists selected JDK version in URL

Makes it easier to share views via URL.

Fixed in https://github.com/parttimenerd/jfrevents-site-generator/commit/4fe7732d9da24c56a6aecc4f61bf136a865de4b1

repo: parttimenerd/jfrevents-site-generator


text:
Version Packages

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
create-partykit@0.0.39
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

nitroparty@0.0.6
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

party.io@0.0.13
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

partykit@0.0.100
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

partykit-ai@0.0.15
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

partymix@0.0.15
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

y-partykit@0.0.27
Patch Changes

#846 01f311d Thanks @threepointone! - Update dependencies

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

authors: CLAassistant threepointone

repo: partykit/partykit


text:
Error install

ERROR: Couldn't find env file: /opt/bitrix/private/environment/dnsrobocert.env

I suggest trying https://github.com/bitrixdock/bitrixdock instead, as it is much more user-friendly than this project.


text:
Tracking list of models per oseries

See discussion in #50

Will close this PR if the #62 is approved.

repo: pastas/pastastore


text:
Reece final

Addition of Unit tests

Can’t pull. Too many conflicts

repo: patrickbrawley/gymBuddi


text:
Possible to set meta robots noindex/nofollow?

Very excited to find this package, it covers 99% of my needs!  I was mildly surprised that it doesn't seem to allow setting a meta tag for robots, eg:
<meta name="robots" content="noindex">

https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag
Have I missed something, or do you have another recommended method to accomplish this?
If I was implementing this myself, I was going to add 2 checkboxes to each document type settings.  However given all the other SEO settings are now in a new page, I'd like to keep them grouped if possible.
I just found this promising teaser in the wiki:

Is it already possible, but just undocumented?
Regardless of your answer, love your work, and I'm excited to use this package.

Hi @ianleeder
Yeah, robot tags aren't yet possible. I will see what I can do in the coming days, it shouldn't be hard to add this to the metafields package.
And good find with the documentation. I'll also see if I can improve on that, because it is possible to add fields already

Part of this has been picked up with this PR: https://github.com/patrickdemooij9/SeoToolkit.Umbraco/pull/126. That will give you the ability to set the robot tag value on document type level.
I'll also get it working for content level, but that will take a bit longer so I already merged this part. Expect this to be in the new version somewhere next week

Any update on doing this at the content level @patrickdemooij9?
And similar to #140, is it possible to read these values through code?  My customer wants to hide NOINDEX pages from the Sitemap.
For now I'll probably just add two checkboxes (NOINDEX/NOFOLLOW), and access them through the Sitemap notification (#145), but once content-level robot tags are available through the package, it would be nice to consolidate, and remove duplication..

Has now been added in the latest release 2.3.0 & 3.1.0.
@ianleeder, I'll come back on the reading and writing of this in code tomorrow. I am going to see if I can extend the documentation for that

Thanks @patrickdemooij9.  I had a poke around in the source, and it looks like I need to use IMetaFieldsValueService.GetUserValues().  But I'm getting a NullReferenceException in GetCulture().  The accessor is non-null, but .VariationContext is null.
Am I on the wrong track?

@ianleeder you are on the right track. Here is some example code of me reading & setting the title on a published event:
public class TestAfterPublishNotification : INotificationHandler<ContentPublishedNotification>
    {
        private readonly IMetaFieldsValueService _valueService;

        public TestAfterPublishNotification(IMetaFieldsValueService valueService)
        {
            _valueService = valueService;
        }

        public void Handle(ContentPublishedNotification notification)
        {
            var nodeId = notification.PublishedEntities.First().Id;

            //To retrieve the values
            var userValues = _valueService.GetUserValues(nodeId);
            userValues[SeoFieldAliasConstants.Title] = "This is after Published";

            //To write the values
            _valueService.AddValues(nodeId, userValues);
        }
    }

Though, hearing that the VariationContext is null is a bit weird to me. I assume you are trying to do this outside Umbraco context?
You should be able to inject a IVariationContextAccessor in your constructor and then set the VariationContext yourself. Here is the above example with that included:
public class TestAfterPublishNotification : INotificationHandler<ContentPublishedNotification>
    {
        private readonly IMetaFieldsValueService _valueService;
        private readonly IVariationContextAccessor _variationContextAccessor;

        public TestAfterPublishNotification(IMetaFieldsValueService valueService, IVariationContextAccessor variationContextAccessor)
        {
            _valueService = valueService;
            _variationContextAccessor = variationContextAccessor;
        }

        public void Handle(ContentPublishedNotification notification)
        {
            _variationContextAccessor.VariationContext = new VariationContext("en-GB");
            var nodeId = notification.PublishedEntities.First().Id;

            //To retrieve the values
            var userValues = _valueService.GetUserValues(nodeId);
            userValues[SeoFieldAliasConstants.Title] = "This is after Published";

            //To write the values
            _valueService.AddValues(nodeId, userValues);
        }
    }

I also think that the service should have a method where you can pass the culture, so I made an issue for that: https://github.com/patrickdemooij9/SeoToolkit.Umbraco/issues/162. Though I think you should be able to get it working with the VariationContext. Let me know if you still have any issues with this!

Yeah, that's pretty much what I'm doing.  The customer wants to hide pages from the sitemap if the robots meta value is set to NOINDEX.
public class HideFromSiteMapNotificationHandler : INotificationHandler<GenerateSitemapNodeNotification>
{
    private IMetaFieldsValueService _metaFieldsValueService;

    public HideFromSiteMapNotificationHandler(IMetaFieldsValueService metaFieldsValueService)
    {
        _metaFieldsValueService = metaFieldsValueService;
    }

    public void Handle(GenerateSitemapNodeNotification notification)
    {
        notification.Node.HideFromSitemap |= notification.Node.Content.Value<bool>("hideFromSitemap");

        if(!notification.Node.HideFromSitemap)
        {
            Dictionary<string, object> values = _metaFieldsValueService.GetUserValues(notification.Node.Content.Id);
            // Check Robots NOINDEX value
        }
    }
}

It's a valid ID, I've also tried hard-coding one.  I had to create a debug build and step into the code to find out why it's throwing NullReferenceException.
I don't need my own IVariationContextAccessor.  The problem was in GetUserValues which calls GetCulture, and in there VariationContext is null.  If it's not something I'm doing wrong, want me to create a new issue?

@ianleeder, I think I see what is going on then. Am I right in assuming that you have a website with just one language?

Not at work at the moment, so I can’t check, but I think there may be two.  I added “en-au” as default. At some point I think I tried to delete “en-us”, but from memory I had some issue (possibly unrelated) and added it back.
On 9 Feb 2023, at 19:02, patrickdemooij9 @.***> wrote:

@ianleederhttps://github.com/ianleeder, I think I see what is going on then. Am I right in assuming that you have a website with just one language?
—
Reply to this email directly, view it on GitHubhttps://github.com/patrickdemooij9/SeoToolkit.Umbraco/issues/123#issuecomment-1423781576, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB64BFGI32TT26W2XVA26MLWWSQCBANCNFSM6AAAAAAQ6P5NHE.
You are receiving this because you were mentioned.Message ID: @.***>

Ok, so I have two languages installed:

However I get the same issue if I delete US and leave just AU language:

And if I restore US and set it as the fallback for AU:

Even setting it to US only still gives the same NullReferenceException:

It doesn't seem to be related to the installed languages.

So I was having a play with this today @patrickdemooij9 .  The top variable (_valueService) is inside the ContentPublishedNotification handler (the example you gave above).  The bottom variable (_metaFieldsValueService) is inside the GenerateSitemapNodeNotification handler (the code I posted above).

It looks like the VariationContext is not available for a SiteMap request, but it is on a publish event?  Same null value when I try to inject the IVariationContextAccessor manually.
It looks like #162 is required to bypass this limitation.

@ianleeder have you find a solution for hiding contents with NOINDEX selected?

@dederuhi Patrick's solution above works after the fix in #166.  For reference here is my complete class:
using SeoToolkit.Umbraco.MetaFields.Core.Interfaces.Services;
using SeoToolkit.Umbraco.Sitemap.Core.Notifications;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Events;
using Umbraco.Extensions;

namespace MyProject.Notifications;

// https://seotoolkit.gitbook.io/useotoolkit/extensions/notifications#generatesitemapnodenotification

public class HideFromSiteMapComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.AddNotificationHandler<GenerateSitemapNodeNotification, HideFromSiteMapNotificationHandler>();
    }
}

public class HideFromSiteMapNotificationHandler : INotificationHandler<GenerateSitemapNodeNotification>
{
    private readonly IMetaFieldsValueService _metaFieldsValueService;

    public HideFromSiteMapNotificationHandler(IMetaFieldsValueService metaFieldsValueService)
    {
        _metaFieldsValueService = metaFieldsValueService;
    }

    public void Handle(GenerateSitemapNodeNotification notification)
    {
        // Get settings for this content node
        Dictionary<string, object> values = _metaFieldsValueService.GetUserValues(notification.Node.Content.Id);
        // If settings include robots noindex, hide from sitemap
        if (values.TryGetValue("robots", out object? robotsObject) && robotsObject is string robotsString)
        {
            notification.Node.HideFromSitemap |= robotsString.Split(',').Contains("noindex");
        }
    }
}

authors: dederuhi ianleeder patrickdemooij9


text:
🛑 App AbaetéFest (PWA) is down

In fd09772, App AbaetéFest (PWA) (https://app.abaetefest.com.br/#/) was down:

HTTP code: 500
Response time: 136 ms

Resolved: App AbaetéFest (PWA) is back up in 811b479 after 7 minutes.

repo: patrickmonteiro/upptime


text:
Filter

This is a pretty good little tool and the best one I've seen yet, but you should add a player filter at some point.
I wish I could set it to only pick up strawberry for example, or block Firefox from being picked up at all.
I don't need people to know I'm watching a video on youtube about the history of pancakes at 3 AM because I forgot about it running.
Keep up the amazing work.
In case anyone was wondering.. https://www.youtube.com/watch?v=SD3WKbXhm6M

Yes, I am aware of the fact that this needs some sort of white/black list.
For now, you can use the -n or --player-name argument to get data from only one specified player. I wrote about this in the readme here.
But in short. You can list all active players with this argument:
./mpris-discord-rpc --list-players

Then copy exact player name from list and use it with -n or --player-name argument like this:
./mpris-discord-rpc --player-name "Insert name here"

So for example for VLC use it like this:
./mpris-discord-rpc --player-name "VLC media player"

From now on it will only listen to this one player and ignore the others.
I had planned to add white/blacklist functionality to filter players but didn't really need such a feature so I forgot about it.
But as you ask, I will add such an option in the near future (this weekend maybe) as it won't be a big problem.

I missed seeing that and that's totally my bad.
Thank you very much for your work.

So in version v0.1.4, I added an allowlist to filter music players:
./mpris-discord-rpc -a "VLC Media Player" -a "Chrome" -a "Any other player"

This is incompatible with the previous -n argument so you can use either -a or -n but not both at once.
Btw thanks for the kind words, I wrote this tool just for me and I'm happy that it could still be useful for someone else.

authors: corngoblin patryk-ku

repo: patryk-ku/mpris-discord-rpc


text:
Crash after large refactoring

Issue
I did asked for a reasonably large refactoring of some markdown files in which it removed two files, created a sub-directory and then created 4 files in that sub-directory. After the LLM response was complete, I got this stack dump and aider quit:
File "/home/github/chat/.venv/bin/aider", line 8, in <module>
    sys.exit(main())
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/main.py", line 661, in main
    coder.run()
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/coders/base_coder.py", line 725, in run
    self.run_one(user_message, preproc)
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/coders/base_coder.py", line 768, in run_one
    list(self.send_message(message))
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/coders/base_coder.py", line 1129, in send_message
    self.show_exhausted_error()
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/coders/base_coder.py", line 1206, in show_exhausted_error
    input_tokens = self.main_model.token_count(self.format_messages())
  File "/home/github/chat/.venv/lib/python3.10/site-packages/aider/models.py", line 590, in token_count
    msgs = json.dumps(messages)
  File "/usr/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ChatChunks is not JSON serializable

I restarted and tried the same refactoring again and I got the same crash.
Version and model info
Aider v0.54.4
Model: Sonnet 3.5 accessed through an OpenAI API on a LiteLLM proxy

Thanks for reporting this! Should be fixed now in the main branch, with test coverage.
To get the latest build:
aider --install-main-branch

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.

authors: efunneko paul-gauthier

repo: paul-gauthier/aider


text:
Add requests-cache dependency to setup.py

I tried to run the example code from your README in a brand new virtualenv, and got the error:
Traceback (most recent call last):
  File "./main.py", line 3, in <module>
    import zoopla
  File "/Users/…/.virtualenvs/zoopla/src/zoopla/zoopla/__init__.py", line 1, in <module>
    from api_factory import api
  File "/Users/…/.virtualenvs/zoopla/src/zoopla/zoopla/api_factory.py", line 4, in <module>
    from api_v1 import _ApiVersion1
  File "/Users/…/.virtualenvs/zoopla/src/zoopla/zoopla/api_v1.py", line 5, in <module>
    import requests_cache
ImportError: No module named requests_cache

Unless I'm missing something, I assume requests-cache should be in your setup.py…?

Thanks @zarino and apologies!

authors: paulfurley zarino

repo: paulfurley/python-zoopla


text:
fix: exit code is 1 when expectations are not fulfilled

Fix #193
A bit of refact of the start method, in order to return 1 as the exit code when expectations have errors.

@denar90 My PR is working well as you can see. The Travis job is failing due to the set expectations ^^
Can I raise them a bit?

Hi @GuillaumeAmat. The reason we don't fail when expectations haven't met because users might run several pages in one process. If the first page fails, the process will exit and other pages will be skipped.
You will be able to handle this stuff manually in your code when https://github.com/paulirish/pwmetrics/issues/188 will be done.

Oh, I understand. But as #188 helps to fill the gap, it not makes it easier to achieve :/
In my use case, all my pages are tested concurrently in parallel CI jobs. It is more efficient IMHO. But anyway, an easy way to fail the CI would be much appreciated.
What about a new option? Eg: --fail-on-error

Oh, I see. --fail-on-error will be nice to have. Good idea!

Done :)

@denar90 Do you know when you (or someone else) will be able to merge it (if it is ok) and release it?

I'll look at it later today)
On Fri, Oct 12, 2018, 9:00 PM Guillaume AMAT notifications@github.com
wrote:

@denar90 https://github.com/denar90 Do you know when you (or someone
else) will be able to merge it (if it is ok) and release it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/paulirish/pwmetrics/pull/194#issuecomment-429409790,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF8V3B8SOqMSk02wwd8INz1W15Cb8ZAKks5ukNjGgaJpZM4XVNw3
.

Published 💥

Thanks! 🤗

exactly what I needed, thanks for landing this.

You're welcome @sejoker ;)

authors: GuillaumeAmat denar90 sejoker

repo: paulirish/pwmetrics


text:
🛑 Paulynomial (index) is down

In 767e4c5, Paulynomial (index) (https://paulynomial.com) was down:

HTTP code: 502
Response time: 15395 ms

Resolved: Paulynomial (index) is back up in def6c49.

repo: paulkiernan/paulynomial-uptime


text:
invalid tag error cannot be caught?

updated from 0.1.4 to 0.4.0 now i keep getting invalid tag error - has something changed here? what should I look for?
Error: invalid tag
at Object.decrypt (node_modules/@noble/ciphers/src/chacha.ts:266:48)

any specific test vector you could share?

gives hard error that some apps cannot recover from ie Preact with ViteJS --- vs just wrong or invalid tag error depending on lib ver 0.1.4 or 0.4.0
const d =  XChaCha20Poly1305.decrypt({
              data  : new Uint8Array(10),
              key   : new Uint8Array(32),
              nonce : new Uint8Array(24),
              tag   : new Uint8Array(16)
            })
console.log(d)

Works fine for me with 0.4.0, the error is correctly catched:
import { xchacha20poly1305 } from '@noble/ciphers/chacha';
const key = new Uint8Array(32);
const nonce = new Uint8Array(24);
const chacha = xchacha20poly1305(key, nonce);
try {
  const data_ = chacha.decrypt(new Uint8Array(32));
} catch (error) {
  // console.log('log', error)
}

do you not need to pass a tag in 0.4.0 ?

huh? it was never needed, not even in 0.1.4

authors: jdutchak paulmillr

repo: paulmillr/noble-ciphers


text:
video

can you use this to convert videos or not?
if not can you add the feature if it's possible?

Actually, it's not possible 😕 This tool was based on ImageGoNord and it was built to handle images only. A work around would be to use ffmpeg, get each frame, run gruvbox-factory in each of them and then merge the frames again. Or you can just do a color grading similar to the gruvbox palette hahahaha

repo: paulopacitti/gruvbox-factory


text:
App in System Bar

While using Show external ip (Command+S) the displayed IP overlaps the application icon.

Hi, Thanks for reporting this. I've been unable to reproduce this. Would you please let me know, what hardware/OS versions you are using.

authors: Khoraxx pawong

repo: pawong/IPConnect


text:
Dev Server First-time Start Fails

When following instructions on Getting Started the server start fails.
Expected Behavior
Install and run a test server following instructions from PayID
Actual Behavior
fails with sh: 1: run-script-os: not found
Context
Trying to run a local instance of payid server for testing
Potential Solution

Steps to Reproduce
Install prerequisites
patrick@kali:~/Projects/payid$ node --version
v14.7.0

patrick@kali:~/Projects/payid$ docker --version
Docker version 19.03.12, build 48a6621

Add myself to docker group (then log out and back in)
sudo usermod -aG docker $USER

Clone project using Git
patrick@kali:~/Projects$ git clone https://github.com/payid-org/payid.git
Cloning into 'payid'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 4008 (delta 23), reused 7 (delta 4), pack-reused 3968
Receiving objects: 100% (4008/4008), 4.11 MiB | 5.78 MiB/s, done.
Resolving deltas: 100% (2630/2630), done.

patrick@kali:~/Projects$ cd payid/

Launch Server
patrick@kali:~/Projects/payid$ npm run devEnvUp

> payid@1.4.0 devEnvUp /home/patrick/Projects/payid
> run-script-os

sh: 1: run-script-os: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! payid@1.4.0 devEnvUp: `run-script-os`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the payid@1.4.0 devEnvUp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrick/.npm/_logs/2020-09-01T19_47_38_281Z-debug.log

Environment

Node version: v14.7.0
NPM version: 6.14.7
Operating System and version: Linux kali 5.6.0-kali2-amd64 #1 SMP Debian 5.6.14-1kali1 (2020-05-25) x86_64 GNU/Linux
PayID server version: 1.4.0 (as per package.json)
PayID Version header (if applicable):

Screenshots
N/A
Bonus
Are you willing to submit a pull request to fix this bug?
Not at the level where I would want others depending on any code I create
2020-09-01T20_04_13_979Z-debug.log

Try running npm install before you run npm run devEnvUp.
If that works, then I'll just edit the documentation.

Not sure about the unfunded packages but it looks like it works

patrick@kali:~/Projects/payid$ npm install

> @arkweid/lefthook@0.7.2 postinstall /home/patrick/Projects/payid/node_modules/@arkweid/lefthook
> node postinstall.js

SYNCING lefthook.yml
SERVED HOOKS: pre-commit, pre-push, prepare-commit-msg
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 741 packages from 473 contributors and audited 746 packages in 17.325s

49 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

No Joy
patrick@kali:~/Projects/payid$ npm run devEnvUp

> payid@1.4.0 devEnvUp /home/patrick/Projects/payid
> run-script-os

> payid@1.4.0 devEnvUp:default /home/patrick/Projects/payid
> PAYID_DOCKER_IMAGE_VERSION=$npm_package_version docker-compose up -d

sh: 1: docker-compose: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! payid@1.4.0 devEnvUp:default: `PAYID_DOCKER_IMAGE_VERSION=$npm_package_version docker-compose up -d`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the payid@1.4.0 devEnvUp:default script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrick/.npm/_logs/2020-09-02T23_50_44_295Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! payid@1.4.0 devEnvUp: `run-script-os`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the payid@1.4.0 devEnvUp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrick/.npm/_logs/2020-09-02T23_50_44_377Z-debug.log

2020-09-02T23_50_44_295Z-debug.log
2020-09-02T23_50_44_377Z-debug.log

Also tried;

patrick@kali:~/Projects/payid$ rm -rf node_modules

patrick@kali:~/Projects/payid$ ls -l *lock*
-rw-r--r-- 1 patrick patrick 235241 Sep  2 20:05 package-lock.json
patrick@kali:~/Projects/payid$ rm package-lock.json

patrick@kali:~/Projects/payid$ npm install --cache ./empty-cache
npm WARN deprecated flat@4.1.0: Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

> @arkweid/lefthook@0.7.2 postinstall /home/patrick/Projects/payid/node_modules/@arkweid/lefthook
> node postinstall.js

SYNCING lefthook.yml
SERVED HOOKS: pre-commit, pre-push, prepare-commit-msg
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @xpring-eng/eslint-config-base@0.11.0 requires a peer of eslint-plugin-jsdoc@^29.0.0 but none is installed. You must install peer dependencies yourself.

added 711 packages from 474 contributors and audited 716 packages in 28.101s

53 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

patrick@kali:~/Projects/payid$ npm run devEnvUp

> payid@1.4.0 devEnvUp /home/patrick/Projects/payid
> run-script-os

> payid@1.4.0 devEnvUp:default /home/patrick/Projects/payid
> PAYID_DOCKER_IMAGE_VERSION=$npm_package_version docker-compose up -d

sh: 1: docker-compose: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! payid@1.4.0 devEnvUp:default: `PAYID_DOCKER_IMAGE_VERSION=$npm_package_version docker-compose up -d`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the payid@1.4.0 devEnvUp:default script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrick/.npm/_logs/2020-09-03T00_10_32_743Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! payid@1.4.0 devEnvUp: `run-script-os`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the payid@1.4.0 devEnvUp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/patrick/.npm/_logs/2020-09-03T00_10_32_825Z-debug.log

You need Docker / docker-compose: https://docs.docker.com/compose/install/

Going to close this out, let us know if this didn't solve your issue.

authors: NetScr1be austin-king hbergren

repo: payid-org/payid


text:
Filter checkbox fields

Link to reproduction
demo.payloadcms.com -> Categories
To Reproduce

Open list view
Filter by checkbox field

Describe the Bug
When attempting to filter checkbox fields in the list view, you have to type "true" or "false". We should provide a dropdown or radio button for this type of field.

Payload Version
latest

Fixed with https://github.com/payloadcms/payload/issues/3114

authors: JarrodMFlesch denolfe

repo: payloadcms/payload


text:
Fix the bug

Bug Report

Expected Behavior
fix it
Current Behavior

Possible Solution

Steps to Reproduce

Detailed Description

Fix the bug as my whole device was hacked

Fix it

Fix it

Plz fix the bug and fix my emails and software


text:
change the onChange API

Right now the onChange callback is called with {selectedItem, previousItem} but I'm starting to think we should just call it with selectedItem. I'm thinking this because the onStateChange is only called with the changes, allState and doesn't include the previous state.
I just built the geniejs example and found I had to preserve the previousInputValue myself. It wasn't difficult at all and made total sense that I would have to do that to support my use case. So I don't think I want to add supporting passing the previous state to the onStateChange callback.
I want to have consistency between these two APIs. And I don't think that it's too much to ask folks to keep track of the previous state if they need it. In fact, I think it's odd that people have to destructure out the selectedItem in the onChange handler. So for that reason, I'm going to make this change unless someone can convince me otherwise... :smile:

I assumed that you had included the selected and previous in the 'same spot to give folks the ability to perform some comparison before they do a  mutation. That said, I've not needed that - I can't really select the same thing twice manually. The only thing I could see is if you'd set it via code twice in a row.. in this case I'd expect a developer to compare before setting at all.
In other words, I agree, just pass the value, like everything else does.

~/Developer/downshift (master)
🏎  $ npm publish --tag rc
+ downshift@1.0.0-rc.6

Hello,
I think this change introduced a bug.
onChange is no longer called when calling clearSelection.

Ah! Yes, that's a problem! Will fix that in a few hours!

authors: jgoux kentcdodds the-simian

repo: paypal/downshift


text:
fix autocomplete property #527

What:
Changes Autocomplete attribute to off.

Why:
Nope is ignored on current Chrome 67 and Opera 54.

How:
Changed the attribute and updated test snapshots

Checklist:

[x] Documentation
[x] Tests
[x] Ready to be merged

[x] Added myself to contributors table

should fix [#527]

Ah, looks like you'll need to update the snapshots. Please see the contributing guidelines to see how to do that. Thanks!

Oh, just noticed it's the react-native snapshots which are a tad harder to update. You can run:
npm run build
npx jest --config other/react-native --updateSnapshot

I think that should do it :) Thank you!

Thanks!

Thx @kentcdodds ! :)

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

authors: JCofman kentcdodds


text:
Adding FAQ.md and updated README.md

Hi all, adding a FAQ section and updated the README to link it.  Feel free to make any changes as I'm the best writer.

Codecov Report

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

@@          Coverage Diff          @@
##           master   #196   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          10     10
  Lines         142    142
  Branches       36     36
=====================================
  Hits          142    142

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 a4fc674...0e2625f. Read the comment docs.

Thank you very much!

Would you like to add yourself to the contributors table? You can do so in another PR if you like :)

I would love to, thank you. :)

authors: codecov-io gt3240 kentcdodds

repo: paypal/glamorous


text:
Line item details Missing when using Braintree option

Description
Hi,
Is there a way to pass in the line item details when using braintree option using jsv4.
I am able to see the line item details in the paypal checkout screen when am not using braintree as an option.
When using client / server side integrations with jsv4 , passing the line items in the create payment flow works .
For example :
transactions: [
{
amount:
{
total: "4.00",
currency: "USD",
details:
{
subtotal: "2.00",
shipping: "1.00",
tax: "2.00",
shipping_discount: "-1.00"
}
},
item_list:
{
items: [
{
quantity: "1",
name: "item 1",
price: "1",
currency: "USD",
description: "item 1 description",
tax: "1"
},
{
quantity: "1",
name: "item 2",
price: "1",
currency: "USD",
description: "item 2 description",
tax: "1"
}]
},
description: "The payment transaction description.",
custom: "merchant custom data"
}]
But I am not able to pass in the line item details when using braintree option with jsv4.
Is the line item details option supported in braintree ?

Yes, I too have been scratching my head at this... The paypalCheckoutInstance.createPayment options seem limited! What's the best practice/workaround for adding line items with a Braintree client?

Hi! This would probably be a question best asked to Braintree, unless @crookedneighbor can weigh in if there are any plans to support line items?

Line items are now supported on the server side, but it is not yet supported on the client side.

Thanks guys, I've already implemented line items server side, would of liked to have the details appear on the Paypal client, just to complete the checkout experience. Perhaps a feature request for a future update...

It's on the roadmap, but since the line items can be displayed on the merchant's website underneath the PayPal popup, it's not a high priority at the moment.

Closing this issue here since no changes needed on checkout.js side.

authors: Arvind6353 ShaneSkuse bluepnume crookedneighbor

repo: paypal/paypal-checkout