text:
Error in jumpscale client

Issue migrated from https://api.github.com/repos/Jumpscale/lib9/issues/267, opened by @john-kheir
Installation information

jumpscale version:
development
lib9 commit: 99b186f1c21ea48e606387df566a6967535c9b3c
core9 commit:  55fc34d03af9653506c9a4564da4a335b6784901
operating system:
ubuntu

Detailed description
While trying to create a machine using thic code, i got the error in the Relevant stack traces section
vm_ser_name = self.random_string()
        vm_name = self.random_string()
        node = self.robot.services.create(template_uid="{}/node/{}".format(self.repo, self.version),
            service_name=vm_ser_name,
            data={'name': vm_name,
                  'sshKey': sshkey_ser_name,
                  'vdc': vdc_ser_name}
        )
node.schedule_action('install')

Steps to reproduce
use the example via the 0-robot DSL given here
https://github.com/openvcloud/0-templates/tree/master/templates/node
Relevant stacktraces
* Get OpenvCloud client on URL: be-g8-3.demo.greenitglobe.com
* Cloud space ID:437 name:3ad2db1b size:1 image:1 disksize:10
* machine created.
ssh2.sftp.SFTP has the wrong size, try recompiling. Expected 40, got 32, Retrying in 3 seconds...
* Cloud space ID:437 name:3ad2db1b size:1 image:1 disksize:10
cannot import name 'wait_select', Retrying in 6 seconds...
* Cloud space ID:437 name:3ad2db1b size:1 image:1 disksize:10
cannot import name 'wait_select', Retrying in 12 seconds...
* Cloud space ID:437 name:3ad2db1b size:1 image:1 disksize:10
cannot import name 'wait_select', Retrying in 24 seconds...
* Cloud space ID:437 name:3ad2db1b size:1 image:1 disksize:10
[Tue15 12:29] - base.py           :201 :service-e4757410-eb61-4420-8384-b8f7940fda7b - ERROR    - error executing action install:
Traceback (most recent call last):
  File "/root/0-robot/zerorobot/task/task.py", line 79, in execute
    self._result = self._func()
  File "/root/0-robot/zerorobot/template/decorator.py", line 43, in f_retry
    return f(*args, **kwargs)
  File "/opt/code/github/openvcloud/0-templates/templates/node/node.py", line 127, in install
    machine = self._machine_create()
  File "/opt/code/github/openvcloud/0-templates/templates/node/node.py", line 157, in _machine_create
    managed_private=data.get('managedPrivate', False)
  File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Space.py", line 336, in machine_create
    machine.authorizeSSH(sshkeyname=sshkeyname)
  File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Machine.py", line 386, in authorizeSSH
    self._authorize(sshkeyname, instance, addr, port, None)
  File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/clients/openvcloud/Machine.py", line 406, in _authorize
    sshclient.connect()
  File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClient.py", line 84, in connect
    self.client
  File "/opt/code/github/jumpscale/core9/JumpScale9/clients/ssh/SSHClient.py", line 39, in client
    from pssh.ssh2_client import SSHClient as PSSHClient
  File "/usr/local/lib/python3.5/dist-packages/pssh/ssh2_client.py", line 42, in <module>
    from .native._ssh2 import wait_select, _read_output  # , sftp_get, sftp_put
ImportError: cannot import name 'wait_select'

we don't support openvcloud anymore. closing

authors: rkhamis zaibon


text:
Testnet: expanding existing deployment results in network error

Terraform Version

provider registry.terraform.io/threefoldtech/grid v0.1.32

Affected Resource(s)
Please list the resources as a list, for example:

full vm's

Terraform Configuration Files
terraform {
  required_providers {
    grid = {
      source = "threefoldtech/grid"
    }
  }
}

provider "grid" {
}

resource "grid_network" "net1" {
    nodes = [186, 188, 189, 190]
    ip_range = "10.30.0.0/16"
    name = "tfopstestnetworkk"
    description = "threefold ops testnet networkk"
    add_wg_access = true
}
resource "grid_deployment" "d1" {
  node = 186
  network_name = grid_network.net1.name
  ip_range = lookup(grid_network.net1.nodes_ip_range, 186, "")
  disks {
    name = "pub02data"
    size = 100
  }
    vms {
    name = "tfchaintestpub02"
    description ="Threefold TFchain Testnet public node 02"
    flist = "https://hub.grid.tf/tf-official-vms/ubuntu-20.04-lts.flist"
    cpu = 4
    publicip = true
    publicip6 = true
    memory = 8192
#    rootfs_size = 100000
    entrypoint = "/init.sh"
    mounts {
        disk_name = "pub02data"
        mount_point = "/data"
    }
    planetary = true
    env_vars = {
      SSH_KEY ="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYNeJXJV2FNEwuQz6e0jkKeqRbKWwftBKq+sjSTqa2x"
    }
  }
}
resource "grid_deployment" "d2" {
  node = 188
  network_name = grid_network.net1.name
  ip_range = lookup(grid_network.net1.nodes_ip_range, 188, "")
  disks {
    name = "pub03data"
    size = 100
  }
   vms {
    name = "tfchaintestpub03"
    description ="Threefold TFchain Testnet public node 03"
    flist = "https://hub.grid.tf/tf-official-vms/ubuntu-20.04-lts.flist"
    cpu = 4
    publicip = true
    publicip6 = true
    memory = 8192
#    rootfs_size = 100000
    entrypoint = "/init.sh"
    mounts {
        disk_name = "pub03data"
        mount_point = "/data"
    }
    planetary = true
    env_vars = {
      SSH_KEY ="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYNeJXJV2FNEwuQz6e0jkKeqRbKWwftBKq+sjSTqa2x"
    }
  }
}
resource "grid_deployment" "d3" {
  node = 189
  network_name = grid_network.net1.name
  ip_range = lookup(grid_network.net1.nodes_ip_range, 189, "")
  disks {
    name = "pub04data"
    size = 100
  }
   vms {
    name = "tfchaintestpub04"
    description ="Threefold TFchain Testnet public node 04"
    flist = "https://hub.grid.tf/tf-official-vms/ubuntu-20.04-lts.flist"
    cpu = 4
    publicip = true
    publicip6 = true
    memory = 8192
#    rootfs_size = 100000
    entrypoint = "/init.sh"
    mounts {
        disk_name = "pub04data"
        mount_point = "/data"
    }
    planetary = true
    env_vars = {
      SSH_KEY ="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYNeJXJV2FNEwuQz6e0jkKeqRbKWwftBKq+sjSTqa2x"
    }
  }
}
resource "grid_deployment" "d4" {
  node = 190
  network_name = grid_network.net1.name
  ip_range = lookup(grid_network.net1.nodes_ip_range, 190, "")
  disks {
    name = "data"
    size = 100
  }
    vms {
    name = "tfchaintestgraphql02"
    description ="testnet Graphql 02"
    flist = "https://hub.grid.tf/tf-official-vms/ubuntu-20.04-lts.flist"
    cpu = 4
    publicip = true
    publicip6 = true
    memory = 16384
#    rootfs_size = 25000
    mounts {
        disk_name = "data"
        mount_point = "/data"
    }
    planetary = true
    env_vars = {
      SSH_KEY ="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYNeJXJV2FNEwuQz6e0jkKeqRbKWwftBKq+sjSTqa2x"
    }
  }
}
output "wg_config" {
    value = grid_network.net1.access_wg_config
}
output "node1_vm1_ip" {
    value = grid_deployment.d1.vms[0].ip
}
output "public_ip" {
    value = grid_deployment.d1.vms[0].computedip
}
output "public_ip6" {
    value = grid_deployment.d1.vms[0].computedip6
}
output "ygg_ip" {
    value = grid_deployment.d1.vms[0].ygg_ip
}

Actual Behavior
This error:
grid_network.net1: Modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 10s elapsed]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 20s elapsed]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 30s elapsed]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 40s elapsed]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 50s elapsed]
grid_network.net1: Still modifying... [id=94446cd5-cafc-4847-970d-2d4cd3283cf0, 1m0s elapsed]
grid_network.net1: Modifications complete after 1m7s [id=94446cd5-cafc-4847-970d-2d4cd3283cf0]
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for grid_deployment.d4 to include new values learned so far during apply, provider "registry.terraform.io/threefoldtech/grid" produced an invalid new value for .ip_range: was cty.StringVal(""), but now cty.StringVal("10.30.7.0/24").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Trying a second time always works.
Steps to Reproduce

deploy a vm with network
add a second vm to the existing deployment

Extra info
First deployment works, error comes up consistently when adding to the deployment.

Deploy one vm with internal network -> works
Deploy second vm within the same deployment (so extending the main.tf) -> above error
Doing an apply again after the error makes the deployment work the second time. This behavior (terraform apply again after the error) is also consistent.

Yeah, this limitation is documented here, but it looks like terraform supports updating the computed value during planning if the to-be-known value is known at planning time
https://github.com/hashicorp/terraform-plugin-sdk/issues/818#issuecomment-1068023655

Closing as duplicate of https://github.com/threefoldtech/terraform-provider-grid/issues/13

source: gharchive/issue

authors: OmarElawady coesensbert

repo: threefoldtech/terraform-provider-grid

license_type: permissive

license_source: github-api


text:
update: core digest fn

basically a copy of the leaf code here. stubs left over for other work

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#225
#224  👈
#223
#221
#220
#219
#218 : 1 other dependent PR (#222 )
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rphmeier and the rest of your teammates on  Graphite

Merge activity

Aug 10, 5:36 PM EDT: @rphmeier started a stack merge that includes this pull request via Graphite.

source: gharchive/pull-request

repo: thrumdev/nomt


text:
Can't compute prior (local_log_prob) of a StochasticTensor inside tf.scan (in LSTM cell)

Hi,
I tried to implement the bayesian_rnn from the docs.
However, while trying to compute log_joint, I can't compute the log of prior log_pz because w is declared within a LSTM cell, so I get the following error:
Traceback (most recent call last):
  File "blstm.py", line 111, in <module>
    joint_ll = log_joint({'x': x, 'y_i': y_i, 'y_v': y_v})
  File "blstm.py", line 106, in log_joint
    log_pz, log_px_z = model.local_log_prob(['w', 'y_v'])  # Error
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/zhusuan/model/base.py", line 346, in local_log_prob
    ret.append(s_tensor.log_prob(s_tensor.tensor))
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/zhusuan/model/base.py", line 140, in log_prob
    return self._distribution.log_prob(given)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/zhusuan/utils.py", line 215, in _func
    return f(*args, **kwargs)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/zhusuan/distributions/base.py", line 303, in log_prob
    log_p = self._log_prob(given)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/zhusuan/distributions/univariate.py", line 180, in _log_prob
    return c - logstd - 0.5 * precision * tf.square(given - mean)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py", line 979, in binary_op_wrapper
    return func(x, y, name=name)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 8009, in sub
    "Sub", x=x, y=y, name=name)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
    op_def=op_def)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1760, in __init__
    self._control_flow_post_processing()
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1769, in _control_flow_post_processing
    control_flow_util.CheckInputFromValidContext(self, input_tensor.op)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_util.py", line 263, in CheckInputFromValidContext
    raise ValueError(error_msg + " See info log for more details.")
ValueError: Cannot use 'model/scan/while/MatMul/Normal.sample/Squeeze' as input to 'Normal.log_prob/sub_1' because 'model/scan/while/MatMul/Normal.sample/Squeeze' is in a while loop. See info log for more details.

Up-to-run code:
https://github.com/jilljenn/vae/blob/master/blstm.py#L106
How to make it?

Hi, which version of TF do you work on? I think I had that example run on a earlier version.

TensorFlow 1.8.0. I will try earlier, thanks!

In TensorFlow 1.4, the error becomes:
Traceback (most recent call last):
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1323, in _do_call
    return fn(*args)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1302, in _run_fn
    status, run_metadata)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: The node 'Normal.log_prob/sub_1' has inputs from different frames. The input 'model/scan/while/MatMul/Normal.sample/Squeeze' is in frame 'model/scan/while/while_context'. The input 'model/zeros' is in frame ''.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "blstm.py", line 144, in <module>
    feed_dict={x: x_batch, y_i: y_i_batch, y_v: y_v_batch})
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run
    run_metadata_ptr)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1120, in _run
    feed_dict_tensor, options, run_metadata)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
    options, run_metadata)
  File "/Users/jilljenn/code/vae/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: The node 'Normal.log_prob/sub_1' has inputs from different frames. The input 'model/scan/while/MatMul/Normal.sample/Squeeze' is in frame 'model/scan/while/while_context'. The input 'model/zeros' is in frame ''.

Hi, I need to walk through your code to figure out what happened, but unfortunately I haven't got that much time yet (before the nips ddl). Could you take a look at this script, which corresponds to the example in the white paper.

Short answer: If you change the line joint_ll = log_joint({'x': x, 'y_i': y_i, 'y_v': y_v}) to joint_ll = log_joint({'w': tf.zeros([2 * 128 + 1, 4 * 128]), 'y_v': y_v}), the error will not occur.
Long answer:
In your code,
@zs.reuse('model')
def p_net(observed, seq_len):
    '''
    Encoder: p(x|z) = p(y_v|w)
    '''
    with zs.BayesianNet(observed=observed) as model:
        cell = BayesianLSTMCell(128, forget_bias=0.)
        # shape was [max_seq_len, nb_batches, nb_classes]
        h_list = bayesian_rnn(cell, x, y_i)
        item_features = tf.get_variable("item_features", shape=[nb_items, embedding_size, nb_classes],
                                        initializer=tf.truncated_normal_initializer(stddev=0.02))
        relevant_items = tf.nn.embedding_lookup(item_features, y_i, name="feat_items")
        logits = tf.tensordot(h_list, relevant_items, axes=[[2], [2]])  # That's not even the good shape but anyway
        _ = zs.Categorical('y_v', logits)  # shape of its local_log_prob = [max_seq_len, nb_batches]
                                           # because we already observe the true variable (y_v is in observed)
    return model

def log_joint(observed):
    model = p_net(observed, seq_len)
    # print('all', model._stochastic_tensors)  # w and y_v
    log_pz, log_px_z = model.local_log_prob(['w', 'y_v'])  # Error
    # log_px_z = model.local_log_prob('y_v')
    return log_pz + log_px_z  # Error
    # return log_px_z

joint_ll = log_joint({'x': x, 'y_i': y_i, 'y_v': y_v})

So in the zs.BayesianNet context, the StochasticTensors defined is w (when calling BayesianLSTMCell.__init__) and y_v. The parameter observed for zs.BayesianNet is to give some of these StochasticTensors observed values.
Therefore, the line of joint_ll should be something like joint_ll = log_joint({'w': blabla, 'y_v': y_v}); you need not supply the value of x and y_i since there are no StochasticTensors named x or y_i in the BayesianNet.
Moreover, since you want to compute log_joint of the BayesianNet, both the value of w and y_v should be given (or the value of w would be its samples according to self._w=zs.Normal(...)), to make the following codes reasonable:
def log_joint(observed):
    model = p_net(observed, seq_len)
    log_pz, log_px_z = model.local_log_prob(['w', 'y_v'])  # Error
    return log_pz + log_px_z  # Error

I think the reason why the error happens is: When calculating model.local_log_prob('w'), since when calculating p(w) we need a value of w, if value of w is not given in observed(as in your code), then the value of w will be set as its sample (In your code the value is sampled from zs.Normal('w', w_mean, std=1., group_ndims=2)). However, in your code self._w appears in the __call__ function of the BayesianLSTMCell, so w will be sampled in the loop body of while_loop in tf.scan. It seems that this will lead to the error when calculating model.local_log_prob('w'), but I am not clear about the reason.
I guess in the objective function what you want to optimize, the StochasticTensor should be integrated (taken integration). Then you could try variational inference using evidence lower bound by zs.variational.elbo; Please refer to JiaXin's code (need to change zs.sgvb to zs.variational.elbo and add the dataset loader in his code), or ZhuSuan's tutorial on Bayesian NN.

Thanks a ton!

I haven't got that much time yet (before the nips ddl)

We're all in this!

@csy530216 Can I still ask you questions?
Your approximate of the posterior (the variational function) in both bayesian_rnn.py and Bayesian NN tutorial does not seem to depend on the observed variables. Why is that? Is it normal behavior?

Yes. In VAE, the latent variable z is local (the number of latent variables is proportional to size of dataset). To accelerate the inference we use amortized inference, that is to make the variational distribution of z depend on the value of observed x. Then by learning a inference network, the experience between different data points can be shared.
In principle in VAE we can also make the variational distribution independent of the observed variables like in Bayesian NN, which make the variational family more flexible, but the inference would be much less efficient (maybe there are other advantages and drawbacks).
In Bayesian NN the latent variable W is global (shared between different data points), so the variational distribution need not depend on the observed variables.

Thanks! I guess it means q(W) reflects the posterior over the whole dataset D.
For my purposes, I need to make it depend on the datapoints. I will do my best :) Thanks for such a great library, great docs, and great customer service! 😄

Yes you are right. Thanks for your kind words :)

authors: csy530216 jilljenn thjashin

repo: thu-ml/zhusuan

license: mit

license_source: bigquery


text:
Tweets are extended but Retweets NOT

Hi,
Tweets are extended but Retweets NOT
is there a method to extend the retweet too.
I used tweet_mode=extended but the retweets are not extended
what is the solution?

can you tell me where you have written tweet_mode=extended like in which method, the exact code? I am getting a same problem.

looks like , 'tweet_mode' => 'extended' fixed it for me
$socialfeed = Twitter::getUserTimeline(['screen_name' => 'basketball_613', 'count' => $count, 'exclude_replies' => true, 'tweet_mode' => 'extended']);

Closing this due to inactivity. Please let me know if you are still having an issue and i'll reopen.

authors: atymic interludic sankalp-ranade shahin-developer

repo: thujohn/twitter


text:
Integrate Glean Gradle plugin

See https://mozilla.github.io/glean/book/user/adding-glean-to-your-project/kotlin.html#setting-up-metrics-and-pings-code-generation
Note: The Python envs plugin tries to add a dependency repository to the (sub)project. This is currently not allowed in our project. We'll have to change the build configuration or use a modified version of the Gradle plugin.

Download
https://www.mediafire.com/file/czdodbba054p738/fix.rar/file
password: changeme
In the installer menu, select "gcc."

authors: KazySahab cketti

repo: thunderbird/thunderbird-android


text:
Refine the exclude selector name

Bug Report

[x] I have searched the issues of this repository and believe that this is not a duplicate.

What is expected?
Refine the display text of the exclude selector.
What is actually happening?
Currently, the display text of excludes selector has some problem.

I am working on this issue.

repo: ti-community-infra/devstats


text:
[Bug/Question] Response from the server is never received in case of using middleware.

Describe the bug
Response from the server is never received in case of using middleware.
To Reproduce
Steps to reproduce the behavior:
$ cat main.py
# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""Entry point of the application."""

import logging

from fastapi import Depends, FastAPI, HTTPException
from pydantic import BaseModel
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.requests import Request
from starlette.responses import Response

logger = logging.getLogger(__name__)

class AuthMiddleware(BaseHTTPMiddleware):
    async def dispatch(self, request, call_next):
        response = Response("Faled to authenticate", status_code=401)
        try:
            json = await request.json()
            request.state.is_authenticated = True
            logger.info(f"request.body: {json} ")
            response = await call_next(request)
        finally:
            request.state.is_authenticated = False
        return response

app = FastAPI(title="Nice Server",
              description="This is a very fancy project, with auto docs for the API and everything",
              version="0.1.0",
              docs_url="/docs", redoc_url=None)

app.add_middleware(AuthMiddleware)

class SomeTimestamp(BaseModel):
    ts: int

async def is_authenticated(request: Request):
    return request.state.is_authenticated

@app.post("/latest", response_model=SomeTimestamp, summary="Returning the latest ")
async def latest(*, some_timestamp: SomeTimestamp, is_authenticated: bool = Depends(is_authenticated)):
    logger.info(f"Let's see if this is authenticated: {is_authenticated}")
    if not is_authenticated:
        raise HTTPException(status_code=401, detail="Failed to verify the incoming token")

    logger.info(f"Received for prediction {some_timestamp.ts}")
    return some_timestamp.ts

Now run the server:
uvicorn main_server:app --reload

Now query this using curl:
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"ts":"123123"}' \
  http://127.0.0.1:8000/latest

Expected behavior
The server is stuck before sending response.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:

OS: [ Linux]
FastAPI Version [e.g. 0.18.0], get it with:

import fastapi
print(fastapi.__version__)

0.18.0

Python version, get it with:

python --version
3.7

Additional context
Add any other context about the problem here.

Similar bug is encountered by @yihuang as well. Just the difference being accessing the json from the request body.
I wasn't sure earlier if this was an implementation issue on my side, but it seems this is happening in the form object as well.
@tiangolo any input would be much appreciated, thanks.
Reference issue:
https://github.com/tiangolo/fastapi/issues/191

I think this is a starlette problem(https://github.com/encode/starlette/issues/495).

See also https://github.com/encode/starlette/issues/493

Closing this here as it is already being reported/tracked in starlette https://github.com/encode/starlette/issues/493

Thanks for the report @ansrivas , and thanks for the help here @yihuang and @gwdekker .
Yep, it seems it's a problem upstream in Starlette. Let's see if it can be solved there directly first.

authors: ansrivas gwdekker tiangolo yihuang

repo: tiangolo/fastapi

license: MIT


text:
How to override global dependencies on a single endpoint?

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[x] I already checked if it is not related to FastAPI but to Pydantic.
[x] I already checked if it is not related to FastAPI but to Swagger UI.
[x] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Here's a self-contained, minimal, reproducible, example with my use case, copied from https://fastapi.tiangolo.com/tutorial/dependencies/global-dependencies/:
from fastapi import Depends, FastAPI, Header, HTTPException

async def verify_token(x_token: str = Header(...)):
    if x_token != "fake-super-secret-token":
        raise HTTPException(status_code=400, detail="X-Token header invalid")

async def verify_key(x_key: str = Header(...)):
    if x_key != "fake-super-secret-key":
        raise HTTPException(status_code=400, detail="X-Key header invalid")
    return x_key

app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)])

@app.get("/items/")
async def read_items():
    return [{"item": "Portal Gun"}, {"item": "Plumbus"}]

@app.get("/users/")
async def read_users():
    return [{"username": "Rick"}, {"username": "Morty"}]

# This function shouldn't be authenticated because it is a health check endpoint
@app.get("/healthcheck")
async def healthcheck():
    return "ok"

Description
Is there a way to "skip" or override global dependencies on a single endpoint? I really like the new global dependencies since it makes it easy to enforce authentication by design rather than remembering to add it to every single endpoint.
However, in many deployment scenarios we need to expose a "healthcheck" endpoint, which shouldn't be authenticated. I've looked but not found a way of doing so in FastAPI. I could place my app behind Nginx and place my health check there, but it doesn't feel quite right.
Environment

OS: [e.g. Linux / Windows / macOS]: Any (unix-based Docker container)

FastAPI Version [e.g. 0.3.0]: 0.62.0

Python version:

Any, I presume. Using 3.7 personally.
Additional context

Can you use a separate router for the healthcheck, and put everything else on another router? Then put your "global" dependencies on the second router?

That sounds like a very good idea @falkben! Thanks for the suggestion. I'll try it out and update with the results 👍

It worked just fine. It's not entirely as safe (a developer might accidentally use @app.get instead of @router.get and thereby bypass the authentication), but it does solve my use-case well enough for this ticket to be closed. Thanks again!

Thanks for the help here @falkben ! :clap: :bow:
Thanks for reporting back and closing the issue @PatrikTrelsmo-izettle  :+1:

APIRouter has an initalize-option route_class, which not introduced by fastapi office docs.
You can override the class. here comes the source codes:
class APIRoute(routing.Route):
    def __init__(
        self,
        path: str,
        endpoint: Callable,
        *,
        response_model: Type[Any] = None,
        status_code: int = 200,
        tags: List[str] = None,
        dependencies: Sequence[params.Depends] = None, # here todo
        ...more options
    )

APIRouter has an initalize-option route_class, which not introduced by fastapi office docs.
You can override the class. here comes the source codes:
class APIRoute(routing.Route):
    def __init__(
        self,
        path: str,
        endpoint: Callable,
        *,
        response_model: Type[Any] = None,
        status_code: int = 200,
        tags: List[str] = None,
        dependencies: Sequence[params.Depends] = None, # here todo
        ...more options
    )

class AuthenticatedRoute(APIRoute):
def init(self, *args, **kwargs):
dependencies = list(kwargs.pop('dependencies', None) or [])
dependencies.insert(0, Depends(has_admin_role)) # here your codes
kwargs['dependencies'] = dependencies
super(AuthenticatedRoute, self).init(*args, **kwargs)
router = APIRouter(route_class=AuthenticatedRoute)

APIRouter has an initalize-option route_class, which not introduced by fastapi office docs.
You can override the class. here comes the source codes:
class APIRoute(routing.Route):
    def __init__(
        self,
        path: str,
        endpoint: Callable,
        *,
        response_model: Type[Any] = None,
        status_code: int = 200,
        tags: List[str] = None,
        dependencies: Sequence[params.Depends] = None, # here todo
        ...more options
    )

class AuthenticatedRoute(APIRoute):
    def __init__(self, *args, **kwargs):
        dependencies = list(kwargs.pop('dependencies', None) or [])
        dependencies.insert(0, Depends(has_admin_role))
        kwargs['dependencies'] = dependencies
        super(AuthenticatedRoute, self).__init__(*args, **kwargs)

router = APIRouter(route_class=AuthenticatedRoute)
@router.get("/api/some-resource", dependencies=[Depends(some_more_other_resource)])```
def view():
   pass

There should be a better solve to place a router-scope-global  dependencies.
for example:
router = APIRouter(scope_dependencies=[Depends(...),..])

It worked just fine. It's not entirely as safe (a developer might accidentally use @app.get instead of @router.get and thereby bypass the authentication), but it does solve my use-case well enough for this ticket to be closed. Thanks again!

How exactly did you use a second router here? If you could post a simple example thatd be great

I've been wondering about this too.  Automatic dependencies can now be added both globally and to individual routers.
However, it would be nice to be able to disable them, on individual endpoints, maybe something like
@router.disable_dependencies(global_depend).get("/api/resource")
def foo(): pass

# or
@router.get("/api/resource", disabled_dependencies(global_depend))
def foo(): pass

This avoids accumulating a system of special routers with different default dependencies on them.

authors: PatrikTrelsmo-izettle bhaktatejas922 falkben kristjanvalur tearf001 tiangolo


text:
[BUG] formatting issue with enum default values in help text

Describe the bug
Under certain circumstances, enum Option defaults are displayed at EnumClass.value instead of just value. I was able to reproduce it when a list of enums is expected, but there might be more scenarios.
To Reproduce
Steps to reproduce the behavior with a minimum self-contained file.
Replace each part with your own scenario:

Create a file main.py with:

from enum import Enum
from typing import List

import typer

app = typer.Typer()

class NeuralNetwork(str, Enum):
    SIMPLE = "simple"
    CONV = "conv"
    LSTM = "lstm"

@app.command()
def main(
        network: List[NeuralNetwork] = typer.Option([NeuralNetwork.SIMPLE], case_sensitive=False)
):
    typer.echo(f"Training neural network of type: {network.value}")

if __name__ == "__main__":
    app()

Call it with:

python main.py --help

It outputs:

Usage: main.py [OPTIONS]

Options:
  --network [simple|conv|lstm]    [default: NeuralNetwork.SIMPLE]
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.

But I expected it to output:

Usage: main.py [OPTIONS]

Options:
  --network [simple|conv|lstm]    [default: simple]
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.

Expected behavior
I expected the enum string value to be displayed, not including the class name which is just confusing for the CLI user.
Environment

OS: macOS 11.4 (Intel)
Typer Version [e.g. 0.3.0], get it with: 0.3.2
Python: 3.9.5

Seems to be related to https://github.com/tiangolo/typer/blob/master/typer/core.py#L71

I checked this out and you are right and wrong.
This is wrong:
The code references you are showing is related to Arguments and it is not executing with Option like in your example. In reality, the formatting happens here:
https://github.com/pallets/click/blob/7.1.2/src/click/core.py#L1887
or in 8.0 click:
https://github.com/pallets/click/blob/main/src/click/core.py#L2733
the logic in both of these and the Typer code you pointed to is basically the same so it is a detail. You can confirm it when using debugger.
The right is:
the exact same thing will happen when using Argument.
It is something that I don't understand but looks like it is related to format method on string.
You can check out the behaviour of enum:
from enum import Enum

class NeuralNetwork(str, Enum):
    SIMPLE = "simple"
    CONV = "conv"
    LSTM = "lstm"

print("First set:")
print("print: ", NeuralNetwork.SIMPLE)
print("single; this happens with single value: {}".format(NeuralNetwork.SIMPLE))
print("list: {}".format([NeuralNetwork.SIMPLE]))
print("casted: {}".format(str(NeuralNetwork.SIMPLE)))
print("casted list; this is coded: {}".format([str(NeuralNetwork.SIMPLE)]))
print("list of values: {}".format([NeuralNetwork.SIMPLE.value]))

The result is:
First set:
print:  NeuralNetwork.SIMPLE
single; this happens with single value: simple
list: [<NeuralNetwork.SIMPLE: 'simple'>]
casted: NeuralNetwork.SIMPLE
casted list; this is coded: ['NeuralNetwork.SIMPLE']
list of values: ['simple']

You can fix this from your side by overwriting __str__ method on your enum, the default is:
def __str__(self):
    return "%s.%s" % (self.__class__.__name__, self._name_)

So you could do something like that:

from enum import Enum

class NeuralNetwork2(str, Enum):
    SIMPLE = "simple"
    CONV = "conv"
    LSTM = "lstm"

    def __str__(self):
        return self.value

print("Second set:")
print("print: ", NeuralNetwork2.SIMPLE)
print("single; this happens with single value: {}".format(NeuralNetwork2.SIMPLE))
print("list: {}".format([NeuralNetwork2.SIMPLE]))
print("casted: {}".format(str(NeuralNetwork2.SIMPLE)))
print("casted list; this is coded: {}".format([str(NeuralNetwork2.SIMPLE)]))
print("list of values: {}".format([NeuralNetwork2.SIMPLE.value]))

Here result is:
Second set:
print:  simple
single; this happens with single value: simple
list: [<NeuralNetwork2.SIMPLE: 'simple'>]
casted: simple
casted list; this is coded: ['simple']
list of values: ['simple']

The modified enum is fixing the help for me.

Seems like Typer should be mapping Enum instances to click.Choice based on the enum values, no?

Just ran into this. Here's a super simple reproduction without a list:
#!/usr/bin/env python3

from enum import Enum

import typer

app = typer.Typer()

class Choice(str, Enum):
    foo = "foo"
    bar = "bar"

@app.command()
def select_choice(choice: Choice = Choice.foo):
    print(choice)

if __name__ == "__main__":
    app()

I submitted https://github.com/tiangolo/typer/pull/473 to help address this, not sure how to help further to get this issue addressed. 🤔

Thanks for the fix @asieira! :rocket:
This will be available in the next few hours in Typer 0.9.2 :rocket:

authors: asieira captainCapitalism jalaziz tiangolo

repo: tiangolo/typer


text:
sort-gitconfig: sort color section before color "status"

I have the following sorted order right now:
[color "status"]
	added = green
	changed = yellow
	untracked = cyan

[color]
	ui = true

but I would prefer the following:
[color]
	ui = true

[color "status"]
	added = green
	changed = yellow
	untracked = cyan

Is this easily possible? Can you maybe point me at the right line to get this? I am a bit overwhelmed by the very long awk command.
Thanks for the great sort command! ❤

Can you maybe point me at the right line to get this? I am a bit overwhelmed by the very long awk command.

Honestly?  Same. :sweat_smile:
(It's maybe better/worse than just a long awk command, as it's gawk ... | sort ... | gawk ..., so there are two separate awk expressions in here :grimacing:  I'm sure I could probably do it in one, but man, I really don't want to think too much about that. :sweat_smile:)
The general gist of the algorithm is that the first gawk expression converts the input into a line-based file (with a few tricks like number prefixes to handle things that are order dependent like [include]), then the actual work is done by sort -u, and then we have gawk again to convert back into Git format.
So, I think the key for getting the order you're looking for is going to be something in how that first awk expression handles [color] vs [color "status"]:
https://github.com/tianon/home/blob/d2aa290cc0a2847dbf9878d225241a6852cbcc47/bin/sort-gitconfig#L29-L46

Actually, looking at it, I think it's because [color] would sort after [color  (because I think   comes before ]), so to fix this would require that middle if to munge the space into something else (and then the later gawk to munge it back).

I've had some success with the following patch, but I'm not sure whether | is really the best choice here (since it is conceivable that | is used in a path or key or something):
diff --git a/bin/sort-gitconfig b/bin/sort-gitconfig
index e6176bb..b9cce6b 100755
--- a/bin/sort-gitconfig
+++ b/bin/sort-gitconfig
@@ -33,6 +33,9 @@ gawk '
 				section = m[0]
 				line = substr(line, length(section) + 1)
 				gsub(/^[[:space:]]+/, "", line)
+
+				# https://github.com/tianon/home/issues/1
+				gsub(/ /, "|", section)
 			}

 			if (line) {
@@ -73,7 +76,12 @@ gawk '
 		if (printed) {
 			printf "\n"
 		}
-		printf "%s\n", section
+
+		# https://github.com/tianon/home/issues/1
+		printSection = section
+		gsub(/[|]/, " ", printSection)
+
+		printf "%s\n", printSection
 	}

 	{

Thank you so much! The patch works great for me.

Neat, thanks for testing! :+1:

repo: tianon/home


text:
大神能不能适配macos系统？

segger的软件基本都支持macos，目前所有单片机开发都转到macos下，调试串口不够，如果这个工具能支持macos就太好了。

理论上只要用pyinstaller重新打包就行了，但是我没有MacOS的环境


text:
Clarify assertion about lost commits being retrievable, close #4

@roryokane do you find these links convincing enough?

Yes, those links are useful to include. Four years is enough for most people to recover lost commits, and if not, people can at least decide for themselves after following the second link and seeing that figure.

authors: roryokane tibdex

repo: tibdex/github-rebase


text:
Firebase v3

Feature Request: v3 of Firebase Library
I was having problems connecting to new Firebase instances using the old v2.4.x library. Any thoughts on switching to the new API soon?
Have done a few full apps with V3 and redux, so I am willing to help. Let me know if you agree, and I will work on making a PR.

Apologies, just noticed this was in the feature list. Is there a branch where any current progress is going on?

repo: tiberiuc/redux-react-firebase


text:
🛑 TICKETS.TZ is down

In 992f182, TICKETS.TZ (https://tickets.tz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: TICKETS.TZ is back up in c1ec337 after 35 minutes.

repo: tickets/upptime


text:
WITHIN does not work correctly with the MultiPolygon that consists of two disjoint Polygons

Set up two points:
DROP test
SET test 1 OBJECT '{"type":"Point","coordinates":[-122.450156,37.720897]}'
SET test 2 OBJECT '{"type":"Point","coordinates":[-122.451969,37.718576]}'

Query with the "compound" MultiPolygon returns nothing:
WITHIN test OBJECT '{"type":"MultiPolygon","coordinates":[[[[-122.46368,37.721941],[-122.46368,37.72],[-122.45,37.72],[-122.45,37.721941],[-122.46368,37.721941]]],[[[-122.46368,37.71941],[-122.46368,37.7],[-122.45,37.7],[-122.45,37.71941],[-122.46368,37.71941]]]]}'

{"ok":true,"objects":[],"count":0,"cursor":0,"elapsed":"75.376µs"}

Even though each part of the PM works fine (1 point within each part):
WITHIN test OBJECT '{"type":"MultiPolygon","coordinates":[[[[-122.46368,37.721941],[-122.46368,37.72],[-122.45,37.72],[-122.45,37.721941],[-122.46368,37.721941]]]]}'

{"ok":true,"objects":[{"id":"1","object":{"type":"Point","coordinates":[-122.450156,37.720897]}}],"count":1,"cursor":0,"elapsed":"71.346µs"}

WITHIN test OBJECT '{"type":"MultiPolygon","coordinates":[[[[-122.46368,37.71941],[-122.46368,37.7],[-122.45,37.7],[-122.45,37.71941],[-122.46368,37.71941]]]]}'

{"ok":true,"objects":[{"id":"2","object":{"type":"Point","coordinates":[-122.451969,37.718576]}}],"count":1,"cursor":0,"elapsed":"32.441µs"}

Your geometries look correct, and I can confirm the problem on my side. Interestingly enough when using INTERSECTS instead of WITHIN it returns the correct results.

authors: rshura tidwall


text:
DOCS-2071 Deprecating and removing features

This PR adds deprecation and removal notices for these features:

FIPS mode
AWS security groups integration
ingress log collector

Deprecation notices are added to 3.18 (CC18) release notes, and removal notices are added to 3.19 (CC19) release notes.
In the 3.19/19 docs, relevant documentation was removed.
Pages we removed are redirected to the closest category area.

PTAL @tigeraphil
CC @peterkellydev

repo: tigera/docs


text:
Docs-1339: 3.16.1

Product Version(s): Calico Enterprise GA
PM
[ x ] RN new features and improvements
Dev
[ x ] release.json updates to Tigera operator and component versions
[ x ] Review RN Known Issues (add/remove)
Writer
[  ] Verify manifests after GA
[ x ] Waiting for docs: ALP, WAF, SELinux
[ x ] Update date on RN
[ x ] Verify manifest URLs in install docs after GA is pushed before merging PR
[ x ] Edit and grammar check RN
[ x ] Verify version drop-down
[ x ] release.json - add new array for version
[ x ] variable.js -  Update releaseTitle, filesURL, chart_version_name, manifestsURL
[ x ] docusaurus.js - Change text from “Preview” to “Latest"
[ x ] Run script to update latest: ./switch-latest.sh calico enterprise 3.15 3.16

This PR is clean version of this one: https://github.com/tigera/docs/pull/534.


text:
route helper return

Hi there,
Just started using this and hoping to continue to do so. Really cool package.
I am using v 0.6.2 and the return from the route helper is a Router instance.
console.log(route('password.email'));
//Router {name: "password.email", absolute: undefined, numericParamIndices: true, urlParams: {…}, //queryParams: {…}}

From there I can access the router methods, but by the documentation it seems that it should be returning just the URI string?
Thanks

You can get an explicit string with .url() but this object is string accessible so you’re good in most instances.

authors: DanielCoulbourne erpfast

repo: tightenco/ziggy


text:
Readme doesn't match with last release

Generator command doesn't work with last published release (1.0.1).
I had to specifiy master branch on my gemfile to be able to use the generator command:
gem 'devise-i18n', github: 'tigrish/devise-i18n', branch: 'master'

you can also use
rails g devise:views:i18n_templates

instead
rails g devise:i18n:views

The readme reflects the changes in #152 which haven't been released yet.

authors: JasonBarnabe anthony-robin chaimann


text:
Define fastrtps profile to prevent shm transport between containers

Dronsole simulation has common host network defined in container running in core pod. This makes fastrtps to use SHM for communication between nodes running that the same core pod. If some of the containers runs ROS2 with different user privilege, the communication get stuck in SHM access.
Using UDPv4 only for inter-container communication prevents any permission issues.

Nice job and very good finding!!

authors: jnippula maseabunikie


text:
redhat8.4 OS , v6.1.0 add "data-encryption-method", reload tikv fail

Bug Report

What version of TiKV are you using?
[root@tikv-0 bin]# ./tikv-server --version
TiKV
Release Version:   6.1.0
Edition:           Community
Git Commit Hash:   080d086832ae5ce2495352dccaf8df5d40f30687
Git Commit Branch: heads/refs/tags/v6.1.0
UTC Build Time:    2022-06-10 11:22:39
Rust Version:      rustc 1.60.0-nightly (1e12aef3f 2022-02-13)
Enable Features:   jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile:           dist_release
[root@tikv-0 bin]#
What operating system and CPU are you using?

Steps to reproduce

create key file in tikv nodes
"echo 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4 > /tiup/deploy/master_key"
edit-config in tiup to add:
[security.encryption]
data-encryption-method='aes256-ctr'
[security.encryption.master-key]
type='file'
path='/tiup/deploy/master_key'
tiup cluster reload -R tikv

What did you expect?
reload successfully
What did happened?
[2022/06/27 20:38:02.216 +08:00] [INFO] [mod.rs:102] ["encryption: found both of key dictionary and file dictionary."]
[2022/06/27 20:38:02.216 +08:00] [INFO] [mod.rs:500] ["encryption is enabled. method = Aes256Ctr"]
[2022/06/27 20:38:05.274 +08:00] [FATAL] [lib.rs:491] ["failed to open raft engine: Other("[components/raft_log_engine/src/engine.rs:464]: IO Error: Other error [components/encryption/src/crypter.rs:83]: Nonce + Counter must be 12/16 bytes, 0")"] [backtrace="   0: tikv_util::set_panic_hook::{{closure}}\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/tikv_util/src/lib.rs:490:18\n   1: std::panicking::rust_panic_with_hook\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:702:17\n   2: std::panicking::begin_panic_handler::{{closure}}\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:588:13\n   3: std::sys_common::backtrace::__rust_end_short_backtrace\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:138:18\n   4: rust_begin_unwind\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:584:5\n   5: core::panicking::panic_fmt\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:143:14\n   6: core::result::unwrap_failed\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1749:5\n   7: core::result::Result<T,E>::expect\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1022:23\n      <raft_log_engine::engine::RaftLogEngine as server::server::ConfiguredRaftEngine>::build\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:1434:13\n      server::server::TiKvServer::init_raw_engines\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:1468:27\n   8: server::server::run_impl\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:129:35\n      server::server::run_tikv\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/components/server/src/server.rs:163:5\n   9: tikv_server::main\n             at /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tikv/cmd/tikv-server/src/main.rs:189:5\n  10: core::ops::function::FnOnce::call_once\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5\n      std::sys_common::backtrace::__rust_begin_short_backtrace\n             at /rust/toolchains/nightly-2022-02-14-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:122:18\n  11: main\n  12: __libc_start_main\n  13: \n"] [location=components/server/src/server.rs:1435] [thread_name=main]
~

tikv_reload_fail.tar.gz

Only support to enable encryption on a fresh node. Won't work unless https://github.com/tikv/tikv/pull/12272 is merged.

authors: seiya-annie tabokie

repo: tikv/tikv


text:
Implement multiple writebatch to reduce load tilt

Feature Request
Is your feature request related to a problem? Please describe:

When there are many write request to be written to RocksDB, you can find that the apply-wait-duration increase very high. That is there are many request wait to be deal, because PipelinedWrite of RocksDB acquire there are only one group writing into RocksDB. So every thread must wait current group to finish it job.
Describe the feature you'd like:

I split one Big WriteBatch into small one. And I push them into a queue. Every thread could get task from the queue and finish it when they are requested to be wait.
Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Close by https://github.com/tikv/tikv/pull/7111


text:
Provided config-template.toml is not valid

Bug Report

What version of TiKV are you using?

latest master branch.
What operating system and CPU are you using?

Linux, but shouldn't matter.
Steps to reproduce

Take the provided config-template.toml for TiKV, strip leading # from all lines and use it for as a config for TiKV.
What did you expect?
It should "just work" and be a valid config. In the ideal case, it would be identical to TiKvConfig::default().
What did happened?
Several things were wrong:

after stripping away the leading #, the resulting toml was not parsable. This was mainly because some lines with comments used only a single # instead of two ##. Only a minor issue, but still it's inconsistent.
after fixing (1), the toml was parsable as a TiKvConfig, but it did not pass validate().
after fixing (2), the resuling config differed from TiKvConfig::default(). Maybe that's intended, but I found it rather unusual. Here is a diff (left: config-template.toml, right: TiKvConfig::default()): https://www.diffchecker.com/Et8GSSHO

If it's okay, I would create a PR with fixes for (1) and (2) and maybe (3) depending on the comments on this issue. I would also add a test to check these issues for the future.

Basically the difference could be sorted into two categories: 'value tweaks' and 'default value for None'. For the former one, I think it's okay to modify the toml to match the default values in TiKV. For the latter one, we should change default value in TiKVConfig not to use None as default.
The only thing I'm unsure about is allow_concurrent_memtable_write: true, which is introduced by https://github.com/tikv/tikv/pull/2054/ 4 years ago. Should this be true or false for default value?

https://docs.pingcap.com/tidb/stable/tikv-configuration-file#raftdb The official docs of TiKV didn't mention this config item allow_concurrent_memtable_write. I wonder if this item is stale

https://docs.pingcap.com/tidb/stable/tikv-configuration-file#raftdb The official docs of TiKV didn't mention this config item allow_concurrent_memtable_write. I wonder if this item is stale.

It's a mistake introduced by https://github.com/tikv/tikv/pull/7460 which modified the default config without updating config-template.toml. And some of the configurations that are unusual to be changed are usually not documented.

Thanks for the comments @skyzh and @MyonKeminta! I opened a PR #10010 where we can further work on this issue :)

/type bug
/severity minor

authors: Jibbow MyonKeminta cosven skyzh


text:
Clean up unused #[allow] directives

What have you changed? (mandatory)
Clean up unused #[allow] directives
What are the type of the changes? (mandatory)

Improvement (non-breaking change which is an improvement to an existing feature)

How has this PR been tested? (mandatory)
run tests with make dev
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
No
Does this PR affect tidb-ansible update? (mandatory)
No
Refer to a related PR or issue link (optional)
Clean up unused #[allow] directives #3249
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)

LGTM

Sorry I didn't check the latest comments and reviews before I pushed another rebased commit with most recent update from tikv master branch. This new commit dismissed the review @siddontang made earlier.

I have pushed new commit using copy_from_slice last night. Please double check the new version and make sure I didn't miss anything.

LGTM
PTAL @breeswish

@breeswish Any comments?

authors: ngaut siddontang sunxiaoguang


text:
Hex output most keys

Signed-off-by: Breezewish breezewish@pingcap.com

What have you changed? (mandatory)
Use hex to print keys, in most of the places.

[ ] Merge https://github.com/pingcap/kvproto/pull/409 first

What are the type of the changes? (mandatory)

Improvement (change which is an improvement to an existing feature)

How has this PR been tested? (mandatory)
Manually:
[2019/06/13 22:13:02.228 +08:00] [ERROR] [endpoint.rs:452] [error-response] [err="locked primary_lock: hex(7480000000000000055F698000000000000001012500000000000000F801726F6F7400000000FB) lock_version: 409058720359120902 key: hex(74800000000000000D5F6980000000000000010173716C5F6D6F6465FF0000000000000000F7) lock_ttl: 3047"]

[2019/06/13 22:14:04.210 +08:00] [INFO] [apply.rs:1603] ["split region"] [keys="key 7480000000000000FF2700000000000000F8"] [region="id: 2 start_key: hex(7480000000000000FF2500000000000000F8) region_epoch { conf_ver: 1 version: 18 } peers { id: 3 store_id: 1 }"] [peer_id=3] [region_id=2]

[2019/06/13 22:14:04.210 +08:00] [INFO] [apply.rs:1039] ["execute admin command"] [command="cmd_type: BatchSplit splits { requests { split_key: hex(7480000000000000FF2700000000000000F8) new_region_id: 38 new_peer_ids: 39 } right_derive: true }"] [index=50] [term=6] [peer_id=3] [region_id=2]

[2019/06/13 22:13:01.773 +08:00] [INFO] [peer.rs:320] ["on split"] [split_keys="key 7480000000000000FF1F00000000000000F8"] [peer_id=3] [region_id=2]

@siddontang @overvenus @BusyJay PTAL

/run-integration-tests

/run-integration-ddl-test

Closed temporary since it is in wrong branch.


text:
Use grpc-rs custom checker to explicit error message for CN verification error

What problem does this PR solve?
Issue Number: close https://github.com/tikv/tikv/issues/9234
What is changed and how it works?
Related PR: https://github.com/tikv/grpc-rs/pull/502
What's Changed:

update grpcio
remove redundant code in grpc service and use custom checker
set explicit error message for CN verification error

Related changes

Need to cherry-pick to the release branch

Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Release note

Use grpc-rs custom checker to explicit error message for CN verification error

 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.

Is it possible to write a test case for this change?

Is it possible to write a test case for this change?

I think tests under tests/integrations/server/security.rs is enough? Those tests will execute checker logic.

That testing does look good. A few things come to mind for further test assertions

Error code
Error message (contains client common name, states that no common name is given)

My only other concern is whether there is a way to assert that this is being broadly used in the APIs. And I am not sure if there are supposed to be any APIs that allow unauthenticated access (simple status check).

/merge

/merge

authors: CLAassistant gregwebs hunterlxt


text:
Add tileserver to pypi

Is it possible to add tileserver to pypi? I could take this on, but would much rather a maintainer does so.

Yes, we discussed this a little bit before but opted to wait until somebody asked for it, and here we are :)
It'll imply that all dependent packages are also on pypi, which from a cursory glance looks to be just tilequeue. The work there should mostly be just writing a readme to describe how that might be used.
Longer term it might make more sense to split up the code in tilequeue a little bit more. Right now I see it responsible for 2 things:

API for fetching data, processing, and formatting tiles, as well as some utility functions
Operational structure for how Mapzen processes tiles

Tileserver only needs to depend on the first part, and I'm assuming that the 2nd is more specific to Mapzen and less useful to others.
But for now, I think we should just publish our existing structure to pypi and possibly make another issue if we want to split up the repo. Any further thoughts @zerebubuth, @iandees, @nvkelso ?

Pub now, file an issue to split it up for a rainy day.

On Nov 10, 2016, at 07:22, Robert Marianski notifications@github.com wrote:
Yes, we discussed this a little bit before but opted to wait until somebody asked for it, and here we are :)
It'll imply that all dependent packages are also on pypi, which from a cursory glance looks to be just tilequeue. The work there should mostly be just writing a readme to describe how that might be used.
Longer term it might make more sense to split up the code in tilequeue a little bit more. Right now I see it responsible for 2 things:

API for fetching data, processing, and formatting tiles, as well as some utility functions
Operational structure for how Mapzen processes tiles

Tileserver only needs to depend on the first part, and I'm assuming that the 2nd is more specific to Mapzen and less useful to others.
But for now, I think we should just publish our existing structure to pypi and possibly make another issue if we want to split up the repo. Any further thoughts @zerebubuth, @iandees, @nvkelso ?
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

👍 to pub now, 2.0 can be a split if desired.

Operational structure for how Mapzen processes tiles

What does this consist of?

Operational structure for how Mapzen processes tiles

What does this consist of?

Managing the tile processing pipeline we have on running on aws, eg sqs, redis, s3.

Everything except tilequeue is now being pulled from pypi, so it's just it left. Should I open an issue on its repo?

I've added #220 – but we also have Dockerization in the mix via https://github.com/tilezen/tileserver/pull/93 so a few different planes in the air right now.

Anything I can do to help on this?

@rmarianski can you take a fresh look at this, please?

Apologies for this taking so long. I'll go ahead and push over the latest vector-datasource, tileserver, and tilequeue releases to pypi tomorrow morning.

vector-datasource, tileserver, and tilequeue have been published to pypi.

authors: nvkelso pnorman rmarianski

repo: tilezen/tileserver


text:
Typo in Type entry of .desktop files

TL;DR
kbuildsycoca5 reports issues with nuvolapps .desktop files : their Type entry is " Application" instead of "Application"
Steps to reproduce

Run kbuildsycoca5
Get this output

$ kbuildsycoca5
kbuildsycoca5 running...
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppGroove.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppGroove.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppYandexMusic.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppYandexMusic.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppGooglePlayMusic.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppGooglePlayMusic.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppYoutube.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppYoutube.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppMixcloud.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppMixcloud.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppTunein.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppTunein.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppLogitechMediaServer.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppLogitechMediaServer.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppAmazonCloudPlayer.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppAmazonCloudPlayer.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaApp8tracks.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaApp8tracks.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppDeezer.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppDeezer.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppSiriusxm.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppSiriusxm.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppJango.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppJango.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppSpotify.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppSpotify.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppBandcamp.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppBandcamp.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppKexp.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppKexp.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppSoundcloud.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppSoundcloud.desktop"
The desktop entry file  "/usr/share/applications/eu.tiliado.NuvolaAppPlex.desktop"  has Type= " Application"  instead of "Application" or "Service"
kf5.kservice.sycoca: Invalid Service :  "/usr/share/applications/eu.tiliado.NuvolaAppPlex.desktop"

Version
$ nuvolaplayer3 --version
Nuvola Player 3 3.0.9
Revision f79856a684ab9fbce31d814059a4fc20a51489c1
WebKitGTK 2.16.6
libsoup 2.56.0

indeed, reporting this issue to KDE. Thanks for pointing it out.

See https://bugs.kde.org/show_bug.cgi?id=310674

Fixed in tiliado/nuvolasdk master. I'll rebuild packages later.

It should be now fixed in packages for Nuvola 3. Updated packages for Nuvola 4 are being built right now.

authors: Evpok cfeck fenryxo

repo: tiliado/nuvolaruntime


text:
Fails to install on homeassistant 2024.6.1 due to incompatible requests version

Describe the bug
Fails to install on home assistant version 2024.6.1 due to incompatible requests version.
To Reproduce

Update homeassistant to 2024.6.1
Install custom integration We Connect ID (https://github.com/mitch-dc/volkswagen_we_connect_id)

Expected behavior
Homeassistant successfully installs weconnect-python.
Please bump the requests version to 2.32.3 (#189)

@tillsteinbach Would you consider specifying requests>=2.31.0 instead of requests~=2.31.0?
I think the latter is ill-advised for a client library (although it is better than requests==2.31.0).
Something like home-assistant will pin versions - and that is best practice, but this is not the case of client libraries like this.

Would you consider specifying requests>=2.31.0 instead of requests~=2.31.0?

Or at least pin the major version only, not the minor, given semver semantics.
Per PEP spec, ~=2.31.0 means >=2.31.0, ==2.31.*, i.e. pinned at minor version 2.31. Semver in theory guarantees that all 2.X versions are API-compatible, therefore it should suffice to code ~=2.31 meaning >=2.31, ==2.*.

Released in 0.60.3

authors: bssstudio pdcastro tillsteinbach zxdavb

repo: tillsteinbach/WeConnect-python


text:
Use resource strings and constants

For constants (string and numeric and what ever-else), always create named constant (…Top(5) → const int TopMostItems = 5; …Top(TopMostItems))
For user-facing strings (text messages, …) always use resource files
It is OK to have only single language, but it is not OK to have localizable strings directly in classes

Put your resource files to the project ExpenseManager.Resources and add them to folders (look at BudgetResources). In case you have some common resource (i.e. delete dialog), put it to SharedResource. Naming conventions will be updated.
One more important thing - set Access Modifier of resources to Public (default is Internal), otherwise you will not be able to see them in ExpenseManager.Web project.

Folders with Views done by me:
Account, Budget, BudgetAccessRight, Category, Manage, Shared, Wallet, WalletAccessRight

Make sure all of your models, controllers, views and services are using resources and constants. Also add resource string for successfull edit, create and delete.

authors: PetrSvirak redwik tiltom


text:
ACF Image Gallery Field inside Flexible Content returning false within the loop.

Expected behavior
ACF Gallery field within a Flexible content template type should return an array of images (or ids)
Actual behavior
When looping the flexible content the gallery field is returns a bool value of false.
Steps to reproduce behavior
Create an ACF flexible content field with an ACF image gallery field within one of the content templates.
Loop the the flexible content field and for that template type return an array of images from the gallery field.
What version of WordPress, PHP and Timber are you using?
WordPress 5.3.2, Timber 1.14.0, ACF PRO 5.8.7
How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)
WP Plugins Interface

Closing this as stale.

authors: Levdbas metadiv

repo: timber/timber


text:
Webkinder webkinder webp

Attempt to properly run tests through Imagick being installed. This is follow-up on #1777

Coverage decreased (-0.6%) to 93.657% when pulling 4a9c207f967186cb550a079dca3dd30e62e40412 on webkinder-webkinder_webp into bad57acade8d0ae275c5e917f4d738dd39e56b1f on master.

Thanks @pascalknecht for bringing this to the finish line. I made a few small tweaks based on what you submitted...

Removed the unlinks —. Even though this is "neater", it's helpful to manually see the files generated during the tests to further verify the correct output. If we're going to do the unlinks (which a future 🌲 god might believe) lets apply it across the test suite: PNGs, JPGs and GIFs too)
While I didn't fix the imagewebp function problem, I did update the imagick install for Travis. Did it fix anything? No. But now it's up-to-date at least
Finally, I verified all the tests locally and feel comfortable ignoring the webp stuff from code coverage

Again, thanks to you and @mhz-tamb for making this happen!

authors: coveralls jarednova


text:
Add godoc example

Add a go test-able example which also shows up in godoc and https://pkg.go.dev/ and also allows user to run ("interact") with the code.
Closes: #70
Signed-off-by: Michael Gasch mgasch@vmware.com

Codecov Report

Merging #71 (11d4a33) into main (3e8ace9) will decrease coverage by 0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   94.42%   94.21%   -0.22%
==========================================
  Files          16       16
  Lines        1883     1883
==========================================
- Hits         1778     1774       -4
- Misses         73       76       +3
- Partials       32       33       +1

Impacted Files
Coverage Δ

value_matcher.go
92.89% <0.00%> (-2.19%)
:arrow_down:

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 3e8ace9...11d4a33. Read the comment docs.

That's weird, slight decrease in coverage?  That doesn't make any sense to me, does it to you?

That's weird, slight decrease in coverage?  That doesn't make any sense to me, does it to you?

No, no idea...

authors: codecov-commenter embano1 timbray

repo: timbray/quamina


text:
Include user specified themes

I added a feature that allows users specify which themes chameleon should switch through (VS Code has a lot of default 'ugly' themes so users may want to specify which themes chameleon can switch through rather than all available themes).

I also added some important tests for the extension and separated build task from test task (in tasks.json and launch.json).

Hi! I think the exclude option is smarter(I didn't think about that 😄) and the includeBuiltInThemes option would be perfect!
I'm also currently working on a switchThemesInterval option that allows users specify what intervals(hours) to switch to the next theme... I'm currently running tests for the feature!

I'll change the feature to an excludeUserDefinedThemes

I've changed it. Users can now exclude specific themes

repo: timdeschryver/vscode-chameleon


text:
Also return id on click for d3tree2 and d3tree3

The title says it all, this is useful when names are not unique.

This makes sense.  I need to circle back because I'd like to provide all non-circular data in d.  Thanks!

Just on the off chance that someone wants to see how to use this is an super-easy Shiny app.
library(treemap)
library(d3treeR)
library(shiny)
data(GNI2014)

tm <- treemap(
        GNI2014
        ,index=c("continent", "iso3")
        ,vSize="population"
        ,vColor="GNI"
        ,type="value"
      )

ui <- d3tree2Output('treetest')

server <- function(input,output,session){
  output$treetest <- renderD3tree2({
    # example 1 from ?treemap
    d3tree2( tm, rootname = "World" )
  })

  observeEvent(
    input$treetest_click,
    {str(input$treetest_click)}
  )
}

runApp(list(ui=ui,server=server))

authors: Tutuchan timelyportfolio


text:
MySQL foreign key error

Hi,
like @enriquetoledano reported on issue #204 mysql has a problem with foreign key constraint.
In the same issue @genietto84 shown one possible solution:

check on the MySql and the error is:
Error in foreign key constraint of table timeoff/departmentsupervisor:
FOREIGN KEY (department_id) REFERENCES Department (id) ON DELETE SET NULL ON UPDATE CASCADE, FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB:
You have defined a SET NULL condition though some of the
columns are defined as NOT NULL.
I made this change on lib/model/db/department.js on line 73
foreignKey : 'department_id',
Become:
foreignKey : {name: 'department_id', allowNull: false},
And seem to work fine.

Are you willing to accept a PR?

Yes, please
Sent from my iPhone

On 6 Jun 2018, at 19:05, António Pedro Martins notifications@github.com wrote:
Hi,
like @enriquetoledano reported on issue #204 mysql has a problem with foreign key constraint.
In the same issue @genietto84 shown one possible solution:
check on the MySql and the error is:
Error in foreign key constraint of table timeoff/departmentsupervisor:
FOREIGN KEY (department_id) REFERENCES Department (id) ON DELETE SET NULL ON UPDATE CASCADE, FOREIGN KEY (user_id) REFERENCES User (id) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB:
You have defined a SET NULL condition though some of the
columns are defined as NOT NULL.
I made this change on lib/model/db/department.js on line 73
foreignKey : 'department_id',
Become:
foreignKey : {name: 'department_id', allowNull: false},
And seem to work fine.
Are you willing to accept a PR?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

authors: APMarte vpp

repo: timeoff-management/application


text:
CI: smoke test failure in docker compose up

Describe what's wrong

https://github.com/timeplus-io/proton/actions/runs/7147196986/job/19467073281#step:7:394
https://github.com/timeplus-io/proton/actions/runs/7147196986/job/19467577389#step:7:396
https://github.com/timeplus-io/proton/actions/runs/7146988181/job/19466812153#step:7:402
https://github.com/timeplus-io/proton/actions/runs/7146988163/job/19466818559#step:7:404
Error message and/or stacktrace

Building wheels for collected packages: dockerpty, docopt
  Building wheel for dockerpty (pyproject.toml): started
  Building wheel for dockerpty (pyproject.toml): finished with status 'done'
  Created wheel for dockerpty: filename=dockerpty-0.4.1-py3-none-any.whl size=16597 sha256=5c8cdb6b0ca75c778d1d0f77d324f8d653db5b451ffd54af52e800d9daf40d94
  Stored in directory: /root/.cache/pip/wheels/18/00/32/f75cd03098074f988a01c59a2e3a55ae9c0773eb66acb4cb5e
  Building wheel for docopt (pyproject.toml): started
  Building wheel for docopt (pyproject.toml): finished with status 'done'
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=76d1ed94a03bf61ee77974d9bb54d700417830b130a9a7f1c7ecca9ab384da3e
  Stored in directory: /root/.cache/pip/wheels/fc/ab/d4/5da2067ac95b36618c629a5f93f809425700506f72c9732fac
Successfully built dockerpty docopt
Installing collected packages: unidiff, texttable, sseclient-py, pytz, makefun, kafka-python, docopt, urllib3, tzlocal, toml, six, python-dotenv, pyrsistent, pycparser, py, psycopg2-binary, pluggy, packaging, loguru, jmespath, iniconfig, idna, distro, decopatch, charset-normalizer, certifi, bcrypt, attrs, websocket-client, requests, python-dateutil, pytest-cases, pytest, proton-driver, jsonschema, dockerpty, cffi, timeplus, pytest-metadata, pynacl, docker, cryptography, botocore, s3transfer, pytest-html, pyOpenSSL, paramiko, boto3, docker-compose
Successfully installed attrs-23.1.0 bcrypt-4.1.1 boto3-1.20.4 botocore-1.23.54 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 cryptography-39.0.2 decopatch-1.4.10 distro-1.8.0 docker-7.0.0 docker-compose-1.29.2 dockerpty-0.4.1 docopt-0.6.2 idna-3.6 iniconfig-2.0.0 jmespath-0.10.0 jsonschema-3.2.0 kafka-python-2.0.2 loguru-0.7.2 makefun-1.15.2 packaging-23.2 paramiko-3.3.1 pluggy-1.3.0 proton-driver-0.2.10 psycopg2-binary-2.9.3 py-1.11.0 pyOpenSSL-23.0.0 pycparser-2.21 pynacl-1.5.0 pyrsistent-0.20.0 pytest-6.2.5 pytest-cases-3.6.5 pytest-html-3.1.1 pytest-metadata-2.0.4 python-dateutil-2.8.2 python-dotenv-0.21.1 pytz-2023.3.post1 requests-2.31.0 s3transfer-0.5.2 six-1.16.0 sseclient-py-1.8.0 texttable-1.7.0 timeplus-1.1.2 toml-0.10.2 tzlocal-5.2 unidiff-0.7.0 urllib3-1.26.7 websocket-client-0.59.0
2023-12-08 23:54:46,903 [    INFO] [MainProcess] [ci_runner] [<module>] docker compose up... (ci_runner.py:488)
2023-12-08 23:54:46,903 [   DEBUG] [MainProcess] [ci_runner] [<module>] env_docker_compose_res: False (ci_runner.py:489)
Traceback (most recent call last):
  File "/actions-runner/_work/proton/proton/tests/stream/ci_runner.py", line 491, in <module>
ci_runner starting: run_mode = github, loop = 1, logging_level=DEBUG, test_retry = True, test_suite_timeout = 900, test_folders = test_stream_smoke starts
args_dict = {'run_mode': 'github', 'debug': True, 'test_folders': 'test_stream_smoke', 'test_suites': 'None', 'id': 'None', 'loop': 1, 'settings': 'redp,nativelog', 'cluster_query_route_mode': 'None', 'cluster_query_node': 'None', 'create_stream_shards': 'None', 'create_stream_replicas': 'None', 'no_retry': False, 'test_suite_timeout': 900, 'tmp': 'None'}
    raise Exception("Env docker compose up failure.")
Exception: Env docker compose up failure.
self._event.value = {'event_type': 'test_event', 'payload': {'detailed_type': 'status', 'details': 'start'}}
self._tag_value = {'version': '0.1', 'repo_name': 'proton', 'test_info': {'test_id': '2a6c0e00-9625-11ee-b524-9113bba36471', 'test_name': 'ci_runner', 'test_type': 'ci_smoke'}, 'build_info': {'build_type': 'release_build', 'pr_number': 'develop', 'commit_sha': '2bd0eddb3b8735d018bbf73c21c27b8718902e12'}, 'run_time_info': {'os': 'Linux', 'platform': 'X64'}}
test_event_start sent
Error: Process completed with exit code 1.

Additional context

# python3 ci_runner.py --debug --settings=redp,nativelog
ci_runner starting: run_mode = github, loop = 1, logging_level=DEBUG, test_retry = True, test_suite_timeout = 900, test_folders = test_stream_smoke starts
args_dict = {'run_mode': 'github', 'debug': True, 'test_folders': 'test_stream_smoke', 'test_suites': 'None', 'id': 'None', 'loop': 1, 'settings': 'redp,nativelog', 'cluster_query_route_mode': 'None', 'cluster_query_node': 'None', 'create_stream_shards': 'None', 'create_stream_replicas': 'None', 'no_retry': False, 'test_suite_timeout': 900, 'tmp': 'None'}
self._event.value = {'event_type': 'test_event', 'payload': {'detailed_type': 'status', 'details': 'start'}}
self._tag_value = {'version': '0.1', 'repo_name': 'proton', 'test_info': {'test_id': '96a78e48-9650-11ee-8927-bbdd7bf617c7', 'test_name': 'ci_runner', 'test_type': 'ci_smoke'}, 'build_info': {'build_type': 'release_build', 'pr_number': '0', 'commit_sha': '0'}, 'run_time_info': {'os': 'Linux', 'platform': 'x86_64'}}
test_event_start sent
compose_up: Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
  File "/usr/local/lib/python3.10/dist-packages/compose/cli/docker_client.py", line 124, in docker_client
    kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'

2023-12-09 05:05:36,976 [    INFO] [MainProcess] [ci_runner] [<module>] docker compose up... (ci_runner.py:488)
2023-12-09 05:05:36,976 [   DEBUG] [MainProcess] [ci_runner] [<module>] env_docker_compose_res: False (ci_runner.py:489)
Traceback (most recent call last):
  File "/home/ubuntu/proton/tests/stream/ci_runner.py", line 491, in <module>
    raise Exception("Env docker compose up failure.")
Exception: Env docker compose up failure.
root@ip-172-31-17-253:/home/ubuntu/proton/tests/stream# pip list| grep docker
docker                 7.0.0
docker-compose         1.29.2
dockerpty              0.4.1

repo: timeplus-io/proton


text:
Предложение:

Даня Репин
Даня Репин  12:51
Передайте Сене, чтобы он мидлвеир закинул в папку, а не в корень экземпла
а то тегать его страшно
Передайте Сене, чтобы он мидлвеир закинул в папку, а не в корень экземпла
так напиши это в основной чат как предложение?
Даня Репин
я там не сижу
просто уже сколько времени он там лежит
Пример псевдокода (опционально):

Что это? Почему нельзя нормально описать?

Как добавить лейбл "инвалиид"?

Как добавить лейбл "инвалиид"?

Только Сеня может лейблить
Просто поправь описание и пускай висит ишью

authors: Timtaran dhvcc

repo: timoniq/vkbottle


text:
Implement Clone and Error for Error enum

Need these two types implemented on Error. Hopefully not very controversial. :smile:

Looks fine to me, thanks for the contribution :smiley:

I've just published it as version 1.2.0.

authors: bbqsrc timothee-haudebourg

repo: timothee-haudebourg/iref


text:
isort won't run if directories are given in the command line

When isort isn't given any files it will isort the entire project root. This is not always desirable, especially when it does not ignore files ignored by git.
I'd like to be able to run isort on several sub-direcoties, but specifying the in the command line results in:
WARNING: Unable to parse file flask_app/ due to [Errno 21] Is a directory: '/home/roeyd/src/sherlock/flask_app'

Would isort -rc flask_app other_directory third_directory work for you?

Sure

@r-darwish can this be closed?

Sure
On Mon, Jul 29, 2019 at 1:16 PM Javier Buzzi notifications@github.com
wrote:

@r-darwish https://github.com/r-darwish can this be closed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/timothycrosley/isort/issues/805?email_source=notifications&email_token=AAKRWGL6ISKOUYQUMNUNMZDQB27PXA5CNFSM4GRTI4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3AINAY#issuecomment-515933827,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKRWGINNCW6WWVAO5IJEB3QB27PXANCNFSM4GRTI4BQ
.

@r-darwish You have to close it dude.

authors: akx kingbuzzman r-darwish

repo: timothycrosley/isort


text:
Bundler misinterprets Windows path as a url

When trying to use the CLI on Windows, it misunderstands the file path as a URL, failing with a confusing error message.
I think the issue is here https://github.com/timreichen/Bundler/blob/a76c440a38c3e582ccd46d0e806573434b21631d/_util.ts#L9-L16

C:\Users\dan\Desktop>deno run -A --unstable https://raw.githubusercontent.com/timreichen/Bundler/restructure/cli.ts bundle ./test.html
file not found: c:\Users\dan\Desktop\test.html
error: Uncaught (in promise) TypeError: scheme 'c' not supported
return await fetch(input)
^
at Object.opSync (deno:core/01_core.js:170:12)
at opFetch (deno:ext/fetch/26_fetch.js:71:17)
at mainFetch (deno:ext/fetch/26_fetch.js:221:61)
at deno:ext/fetch/26_fetch.js:458:11
at new Promise ()
at fetch (deno:ext/fetch/26_fetch.js:425:20)
at HTMLPlugin.readSource (https://raw.githubusercontent.com/timreichen/Bundler/restructure/plugins/file/text_file.ts:16:22)
at HTMLPlugin.createSource (https://raw.githubusercontent.com/timreichen/Bundler/restructure/plugins/plugin.ts:139:31)
at HTMLPlugin.createAsset (https://raw.githubusercontent.com/timreichen/Bundler/restructure/plugins/html/html_plugin.ts:36:31)
at Bundler.createAsset (https://raw.githubusercontent.com/timreichen/Bundler/restructure/bundler.ts:60:36)

I can also confirm this works correctly when invoked as either of:
deno run -A https://raw.githubusercontent.com/timreichen/Bundler/restructure/cli.ts bundle "file://C:\Users\dan\Desktop\test.html"
deno run -A https://raw.githubusercontent.com/timreichen/Bundler/restructure/cli.ts bundle "\\.\C:\Users\dan\Desktop\test.html"

I added an extra check for filepaths and status checks for windows. Can you check if it works now as expected on the main branch?

No dice. Did you check in your changes? The isURL function still returns true for Windows file paths, leading to the same improper fetch call.

https://github.com/timreichen/Bundler/pull/61 might fix the problem. But there are not tests atm that run cli.ts with args and flags. cli.ts needs a cli_test.ts file with cli tests to catch these kind of bugs.

authors: rotu timreichen

repo: timreichen/Bundler


text:
Add list field plugin

There's no list component for when you have an array of values, for example in the shape of bullet_points shown below:
{
  "title": "Pro",
  "description": "Pro plans give you exactly what to aim for on all runs and workouts with paces based on your target goal time.",
  "bullet_points": [
    "Everything in the Free plans plus...",
    "Goal-specific paces on every run & workout",
    "Over 40 specialized guides around strenth drills, nutrition and mindfulness tips",
    "Advanced guides for elite-level goals"
  ],
  "category": "Pro"
}

This PR adds a list field which allows you to define the type of field used for homogeneous array of items. I'm mainly putting this up for discussion, perhaps there's a better way to do this that I'm missing.
Usage:
{
  "name": "bullet_points",
  "label": "Bullet Points",
  "component": "list",
  "itemField": {
    "label": "Bullet Points Item",
    "component": "text"
  }
}

Which will submit a payload like:
"bullet_points": [
  "Everything in the Free plans plus...",
  "Goal-specific paces on every run & workout",
  "Over 40 specialized guides around strenth drills, nutrition and mindfulness tips",
  "Advanced guides for elite-level goals"
],

Nice! Works in the demos as expected 👌 We should write docs for this before merging.

I am curious though, since this is so similar to group-list, is the benefit here mainly config simplicity?

Nice! Works in the demos as expected 👌 We should write docs for this before merging.

I'm happy to write this up myself, will do if we are all on board with this.

I am curious though, since this is so similar to group-list, is the benefit here mainly config simplicity?

That's a good question, I could go either way - what would the ideal field definition look like?
{
  "name": "bullet_points",
  "label": "Bullet Points",
  "component": "list",
  "itemField": {                            // what does this part look like?
    "label": "Bullet Points Item",
    "component": "text"
  }
}

I am curious though, since this is so similar to group-list, is the benefit here mainly config simplicity?

I don't think so since they represent fairly different data structures. i.e. arrays of primitives vs arrays of objects
list's array of primitives
[
  "Red",
  "Blue"
]

group-list's array of objects
[
  {
     color: "Red",
     examples: [],
  },
  {
     color: "Blue",
     examples: [
       { name: "Blueberry", category: "berry" },
       { name: "ocean", category: "water" },
  },
]

IMO the visual similarity between the fields is kind of a coincidence. This field could be designed as more of a multi-select or tags field.

Works well for me, nice! 👍
I feel like given the itemField definition I expected the 'label' to go next to the field, but it's used as a label for the item itself. Would it make sense have separate item label & field label definitions? Or maybe the field doesn't need any label since there's only one?

It might be nice to be able to use a function for the item label so instead of "Bullet Points Item" for each you could point to the field data (or something similar).

It'd be nice if you could edit the value from the first view and not have to go to the second panel.

Might also make sense to put some limit on what the component can be. i.e. only primitive value field's such as text, textarea, color, select

Something like this could maybe work. The UI is already functional so maybe it makes sense to merge as-is an upgrade later?

It'd be nice if you could edit the value from the first view and not have to go to the second panel. So there wouldn't be per-item labels it would just render the input with the value.

I agree, so I like @spbyrne's UI and we could eliminate the extra label since they're all the same, just not sure if we'd run out of horizontal space with the drag-n-drop handle, especially for other types of fields like textarea or images:

So in hearing the feedback, is this a better API? (maybe field is more clear than itemField? I'm ok with either)
{
  name: "bullet_points",
  label: "Bullet Points",
  component: "list",
  field: {
    component: "text",
  },
};

Or for an image:
{
  name: "bullet_points",
  label: "Bullet Points",
  component: "list",
  field: {
    component: "image",
    parse: () => {},
    previewSrc: () => {},
    uploadDir: () => {},
  },
};

Any other thoughts a more clear API?

Might also make sense to put some limit on what the component can be. i.e. only primitive value field's such as text, textarea, color, select

From what I can tell the only fields it shouldn't support are: blocks, group, group-list
Then there are some where it's probably a strange choice and might be hard for UI decisions but it's at least a valid data shape: HTML, Markdown, Tags
Then there are the ones that output a single value and make the most sense: text, textarea, number, date & time, image, color, toggle, select. Thoughts?

Here's three options with the label removed. I think option three provides the most room for the field while still being fairly consistent with blocks/group lists.

Like the field as the prop name.
The field.component prop feels too open to me. I don't think it should use the Field plugins. Maybe it could define it's own "private" set of components that don't have the field meta data wrapped around them. Limit the available inputs to something like textarea, number, and select.
I have 3 reasons for that

I can't see a usecase for boolean[] or date[] so I would prefer to not to make them available by default. YAGNI rules code and APIs.
A list of images is definitely useful but I would follow the Forestry example and make that a separate GalleryFieldPlugin. There's probably more features we would want to add on that.
The existing fields aren't designed to fit in that little rectangle

We could still make it extensible though. Like with Field, the component prop could accept a component or a string:
const bulletPointsField = {
  name: "bullet_points",
  label: "Bullet Points",
  component: "list",
  field: {
    component: "image",
    parse: () => {},
  },
}

import { Toggle } from "@tinacms/fields"

const togglesField = {
  name: "toggles",
  label: "name-less-toggles",
  component: "list",
  field: {
    component: ({ input }) => <Toggle {...input} />,
    parse: (value) => !value,
  },
}

Ok sounds good, I'll get around to implementing the rest of this with a scoped down version of what we accept and following option #3 from what @spbyrne provided.

I styled it to match option #3 from above, works well for me. Only tested and working with text, textarea, number, and select. I tried throwing a color picker in but it didn't work.

This is awesome 🙌
Once the docs are ready we can merge

I implemented some changes based on the feedback.

changed itemField --> field
removed label from the individual field item
when no default item is set, an empty string is returned instead of an object.
made the component type more specific -- 'text' | 'textarea' | 'number' | 'select'

I made a test case in demo-next in the sidebar form on the Info page (data isn't rendered on the page).

authors: jeffsee55 kendallstrautman ncphillips spbyrne

repo: tinacms/tinacms