text:
Get all Admin Users with role slug = manager

I intent get all Admin Users with role slug = manager.
I try query on mysql by using below code:
SELECT * from `iread_admin`.`admin_users`
JOIN `iread_admin`.`admin_role_users`
ON `iread_admin`.`admin_users`.id = `iread_admin`.`admin_role_users`.user_id
WHERE `iread_admin`.`admin_role_users`.role_id = 2

How to implement this query into form() with select input (choose one)
Hope for your comments soon

SELECT * from admin_users
  JOIN admin_role_users on admin_users.id = admin_role_users.user_id
  JOIN admin_roles on admin_roles.id = admin_role_users.role_id
  WHERE admin_roles.slug = 'manager';

I mean how to show that result into the $form->select(...)->options()

use Encore\Admin\Auth\Database\Role;

...

$role = Role::where('slug', 'administrator')->first();
$options = $role->administrators->pluck('username', 'id');

$form->select(...)->options($options);

It works. Thank @z-song so much.

repo: z-song/laravel-admin


text:
Grid中导出表格含有中文字符的CSV时出现乱码

找到一个解决办法
修改 vendor/encore/src/Grid/Exporter/CsvExporter.php 中的expoter()方法
public function export()
{
$titles = [];

$filename = $this->getTable().'.csv';

$data = $this->getData();

if (!empty($data)) {
$columns = array_dot($this->sanitize($data[0]));

$titles = array_keys($columns);
}

$output = implode(',', $titles)."\n";

foreach ($data as $row) {
$row = array_only($row, $titles);
$output .= implode(',', array_dot($row))."\n";
}

$headers = [
'Content-Encoding' => 'UTF-8',
'Content-Type' => 'text/csv;charset=UTF-8',
'Content-Disposition' => "attachment; filename=\"$filename\"",
];

response(chr(0xEF).chr(0xBB).chr(0xBF).rtrim($output, "\n"), 200, $headers)->send();

exit;
}

已提交合并请求

补充了一篇自定义导出的文档，建议按照上面的说明来实现导出

大哥，我也遇到了这个问题，但是贴代码缺了方法，sanitize，能贴全面点吗？谢谢

source: gharchive/issue

authors: Harrypoters Share-Man z-song

license: mit

license_type: permissive

license_source: bigquery


text:
Grid->column('xx.xx') expand click 无效

Laravel Version: 6.x
PHP Version: 7.2
Laravel-admin: 1.8

Description:
Grid expand 在使用模型关联显示时，点击下拉无效，经查询，由于关联模型column('xxx.xxx') 中包含.，expand 关键代码未对其作处理导致。问题关键代码如下：

路径： src\Grid\Displayers\Expand.php

return Admin::component('admin::components.column-expand', [
            'key'           => $this->getKey(),
            'url'           => $this->getLoadUrl(),
            'name'          => $this->getName() . '-' . $this->getKey(),
            'html'          => $html,
            'value'         => $this->value,
            'async'         => $async,
            'expand'        => $isExpand,
            'loadGrid'      => $loadGrid,
            'elementClass'  => "grid-expand-{$this->grid->getGridRowName()}",
        ]);

可选方案：将 $this->getName() . '-' . $this->getKey() 替换为 $this->getClassName().'-'.$this->getKey() 即可解决。
请大佬修复！！！

修复了  #4883

authors: iwantest z-song


text:
Performance question: over an hour for dbt-osmosis document ?

Running dbt-osmosis document took over an hour, and eventually froze iTerm2 (I'd guess due to memory issues?)
In terms of the size of our Snowflake instance, I think I'd say we're small to medium.
Is this expected? I have a total of 2051 models

This is awesome news! Thank you so much.

license_source: github-api


text:
Generate view - When unnesting, does not use new variable to extract values from

When unnesting data, it is output as null in the target table. But, since the column casting just creates a new column and populates it with nulls, this fails softly rather than causing an error in the compilation (personal experience pushing blank tables to prod by mistake)
Here is an example of a fix applied to the generated view
Broken version - Outputs only null
SELECT
  JSON_VALUE(DATA, '$.fullName') AS fullName,
  JSON_VALUE(DATA, '$.creationDate') AS creationDate,
  JSON_VALUE(DATA, '$.displayName') AS displayName,
  CAST(JSON_VALUE(DATA, '$.canBeDeleted') AS BOOLEAN) AS canBeDeleted,
  STRUCT( ARRAY(
    SELECT
      STRUCT(
          CAST(JSON_VALUE(DATA, '$.variablePayment.canBeDeleted') AS BOOLEAN) AS canBeDeleted,
          STRUCT( CAST(JSON_VALUE(DATA, '$.variablePayment.amount.value') AS FLOAT64) AS value,
          JSON_VALUE(DATA, '$.variablePayment.amount.currency') AS currency ) AS amount,
          STRUCT( JSON_VALUE(DATA, '$.variablePayment.change.reason') AS reason,
          JSON_VALUE(DATA, '$.variablePayment.change.changedBy') AS changedBy,
          JSON_VALUE(DATA, '$.variablePayment.change.changedById') AS changedById ) AS change,
          JSON_VALUE(DATA, '$.variablePayment.creationDate') AS creationDate,
          JSON_VALUE(DATA, '$.variablePayment.individualPercent') AS individualPercent,
          JSON_VALUE(DATA, '$.variablePayment.variableType') AS variableType,
          CAST(JSON_VALUE(DATA, '$.variablePayment.isCurrent') AS BOOLEAN) AS isCurrent,
          JSON_VALUE(DATA, '$.variablePayment.modificationDate') AS modificationDate,
          CAST(JSON_VALUE(DATA, '$.variablePayment.id') AS INT64) AS id,
          JSON_VALUE(DATA, '$.variablePayment.paymentPeriod') AS paymentPeriod,
          JSON_VALUE(DATA, '$.variablePayment.effectiveDate') AS effectiveDate
        ) AS variablePayment
    FROM
      UNNEST( JSON_QUERY_ARRAY(DATA, '$.payroll.variablePayment') ) AS variablePayment__rows ) AS variablePayment ) AS payroll
FROM <source>

Fixed version (with using new generated row)
SELECT
  JSON_VALUE(DATA, '$.fullName') AS fullName,
  JSON_VALUE(DATA, '$.creationDate') AS creationDate,
  JSON_VALUE(DATA, '$.displayName') AS displayName,
  CAST(JSON_VALUE(DATA, '$.canBeDeleted') AS BOOLEAN) AS canBeDeleted,
  STRUCT( ARRAY(
    SELECT
      STRUCT(
          CAST(JSON_VALUE(variablePayment__rows, '$.canBeDeleted') AS BOOLEAN) AS canBeDeleted,
          STRUCT( CAST(JSON_VALUE(variablePayment__rows, '$.amount.value') AS FLOAT64) AS value,
          JSON_VALUE(variablePayment__rows, '$.amount.currency') AS currency ) AS amount,
          STRUCT( JSON_VALUE(variablePayment__rows, '$.change.reason') AS reason,
          JSON_VALUE(variablePayment__rows, '$.change.changedBy') AS changedBy,
          JSON_VALUE(variablePayment__rows, '$.change.changedById') AS changedById ) AS change,
          JSON_VALUE(variablePayment__rows, '$.creationDate') AS creationDate,
          JSON_VALUE(variablePayment__rows, '$.individualPercent') AS individualPercent,
          JSON_VALUE(variablePayment__rows, '$.variableType') AS variableType,
          CAST(JSON_VALUE(variablePayment__rows, '$.isCurrent') AS BOOLEAN) AS isCurrent,
          JSON_VALUE(variablePayment__rows, '$.modificationDate') AS modificationDate,
          CAST(JSON_VALUE(variablePayment__rows, '$.id') AS INT64) AS id,
          JSON_VALUE(variablePayment__rows, '$.paymentPeriod') AS paymentPeriod,
          JSON_VALUE(variablePayment__rows, '$.effectiveDate') AS effectiveDate
        ) AS variablePayment
    FROM
      UNNEST( JSON_QUERY_ARRAY(DATA, '$.payroll.variablePayment') ) AS variablePayment__rows ) AS variablePayment ) AS payroll
FROM <source>

Hey @SBurwash 👋
So I am trying to understand this. What is DATA in the broken example equivalent to in the working example?
Happy to get cracking on a fix but don't fully understand the problem.
Is the issue the extra .variablePayment in the jsonpath of the broken example?

Hey @z3z1ma :wave:
The issue here is that when applying unnesting, in the broken example, we do not query the data from the generated unnest variable (variablePayment__rows), but rather from the DATA object itself.
This means that we don't actually query any data, and populate these rows with null values.
In the fixed example, I replace the DATA object with the generated variable in order to query the unnested data.
Does this make  more sense?

@SBurwash
Can you please share a failing test case; and before that, retry with the latest version to see if this is still the case?
I cannot recreate. A test case should just require the SCHEMA message / catalog schema for the stream in question.

license: MIT


text:
[zabbix-community/zabbix] Zabbix agent not work properly in active mode when Zabbix server has multi pods

Describe the bug
As described here : https://www.zabbix.com/forum/zabbix-help/444411-advice-about-running-zabbix-server-inside-a-kubernetes-cluster
When Zabbix server have multiple pods and Zabbix agent working on active mode, zabbix agent cannot communicate with zabbix server normally.
Version of Helm and Kubernetes:
Helm: Version: 4.0.2
Kubernetes: v1.22.0
Zabbix server Version : 6.4.10
Zabbix agent2 version: 6.4.9-1+ubuntu20.04
What happened:
zabbix-agent2 log :
2024/01/31 17:12:38.126297 [101] cannot connect to [SERVERIP:PORT]: dial tcp :0->SERVERIP:PORT: connect: connection refused
2024/01/31 17:12:38.126408 [101] active check configuration update from host [NODENAME] started to fail
2024/01/31 17:12:44.122352 [101] active check configuration update from [SERVERIP:PORT] is working again

Lost data if zabbix-server working on HA mode(after working normal for about 1 hour, data of all nodes including zabbix server):

What you expected to happen:
zabbix-agent2 should communicate with zabbix server properly when zabbix server has multi pods.
There should not be connection errors in zabbix-agent2 log.
Should not lost monitor data.
How to reproduce it (as minimally and precisely as possible):
Setup zabbix server on Kubernetes with 2 pods , add a zabbix-agent2 node working on active mode.
Anything else we need to know:
I modified some files in Helm chart,but this should not be the reason of this problem .

Hi @pirateunclejack!
Sorry for the delay in my response. When we use Kubernetes, communication involving Zabbix components must not use an IP address, as the pod's IP is ephemeral. Every time a pod is recreated, a different IP is assigned. It is unfeasible to keep changing IPs in the registration of hosts and/or configuration files. The correct way is to use DNS names.
In Kubernetes we have 3 types of service: ClusterIP, NodePort and Loadbalancer. See more details and differences here:

https://kubernetes.io/docs/concepts/services-networking/service/
https://medium.com/devops-mojo/kubernetes-service-types-overview-introduction-to-k8s-service-types-what-are-types-of-kubernetes-services-ea6db72c3f8c
https://www.youtube.com/watch?v=T4Z7visMM4E
https://loft.sh/blog/a-clear-and-complete-guide-to-kubernetes-services/
https://kodekloud.com/blog/kubernetes-services/

If the target host, which has zabbix-agentd installed, is in the same Kubernetes cluster, you can use the ClusterIP service DNS used by Zabbix Server and configure Zabbix Agentd to send metrics to it. The default ClusterIP name has the following format:
SERVICE_NAME.NAMESPACE.svc.cluster.local:PORT
Example:
zabbix-zabbix-server.monitoring.svc.cluster.local:10051
The name, type and IP of the services can be viewed using the command:
kubectl get service -n NAMESPACE

Example:
kubectl get service -n monitoring

The reverse is also true, that is... if the Zabbix Server expects to talk to the Zabbix Agentd and they are in the same cluster, the DNS name of the Zabbix Agentd ClusterIP service is:
Example:
zabbix-zabbix-agentd.mynamespace-example.svc.cluster.local:10050
Now, if they are on different clusters, networks or hosts, then it will be necessary to configure a Loadbalancer to expose the Zabbix Server, assign a DNS name on the DNS Server pointing to the loadbalancer IP, configure the network route and release permissions on the firewall.

https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/
https://medium.com/avmconsulting-blog/external-ip-service-type-for-kubernetes-ec2073ef5442
https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/access-application-cluster/create-external-load-balancer/
https://metallb.universe.tf/

Hi @aeciopires
Thank you for such detailed reply!
In my case Zabbix server deployment is in different network with zabbix-agent .
In fact , the SERVERIP in log is the IP of loadbalancer. We do have DNS name on the DNS server pointing to the loadbalancer IP.
I think the problem is :
The loadbalancer or Kubernetes CAN NOT identify which zabbix server pod is active to provide service.
When request from zabbix client is balnaced to standby zabbix server pod , it will failed.
Do you agree ?

Hi @pirateunclejack!
Thanks for adding this detail. I can understand better now.
You will probably need to adjust some configuration in your container network interface (CNI) in your Kubernetes cluster to preserve the source IP (in this case the zabbix agent).
Traffic Policies
Your loadbalancer must understands and respects the service’s externalTrafficPolicy option, and implements different announcements modes depending on the policy and announcement protocol you select.
Layer2
When announcing in layer2 mode, one node in your cluster will attract traffic for the service IP. From there, the behavior depends on the selected traffic policy.
“Cluster” traffic policy
With the default Cluster traffic policy, kube-proxy on the node that received the traffic does load balancing, and distributes the traffic to all the pods in your service.
This policy results in uniform traffic distribution across all pods in the service. However, kube-proxy will obscure the source IP address of the connection when it does load balancing, so your pod logs will show that external traffic appears to be coming from the service’s leader node.
“Local” traffic policy
With the Local traffic policy, kube-proxy on the node that received the traffic sends it only to the service’s pod(s) that are on the same node. There is no “horizontal” traffic flow between nodes.
Because kube-proxy doesn’t need to send traffic between cluster nodes, your pods can see the real source IP address of incoming connections.
The downside of this policy is that incoming traffic only goes to some pods in the service. Pods that aren’t on the current leader node receive no traffic, they are just there as replicas in case a failover is needed.
I think this is what you want, right?
In helm-zabbix chart, we have the externalTrafficPolicy option commeted by default. You can uncomment this option and change the value to each component of Zabbix.
References:

https://metallb.universe.tf/usage/
https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/
https://medium.com/pablo-perez/k8s-externaltrafficpolicy-local-or-cluster-40b259a19404
https://blog.getambassador.io/externaltrafficpolicy-local-on-kubernetes-e66e498212f9

Hi @aeciopires
Thank you for such quickly reply.
Unfortuately, switch externalTrafficPolicy from Cluster to Local can not solve problem.
This action make zabbix server can not recive monitoring data from zabbix agent,  no matter zabbix server is working on standalone mode with only one pod or working on HA mode with two pods.
I am sorry to provided a wrong information. We are not using loadbalancer in Kubernetes cluster.
The type of zabbix server service is NodePort . And the SERVERIP in zabbix agent log is the IP of nodes (we have three) which Kuberntes ingress controllers runing on.
Do you think this is the reason ?

Hi @pirateunclejack!
Hum... this new information changes the context.
I think this is the problem. I found this post explaining exactly your context:
https://stackoverflow.com/questions/60067188/how-do-kubernetes-nodeport-services-with-service-spec-externaltrafficpolicy-loca
I think you need to use a Loadbalancer type service to expose Zabbix Server.
If you use Kubernetes in an on-premises environment, you can install MetalLB as a Loadbalancer manager.

https://metallb.universe.tf/
https://metallb.universe.tf/installation/

If you use Kubernetes on the cloud provider, you must use the cloud controller to create the load balancer.
AWS:
ALB (Application Load Balancer):

https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/how-it-works/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/deploy/installation/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/deploy/configurations/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/deploy/subnet_discovery/
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.7/deploy/security_groups/
https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html

GCP:

https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer
https://cloud.google.com/kubernetes-engine/docs/how-to/external-svc-lb-rbs
https://cloud.google.com/kubernetes-engine/docs/concepts/firewall-rules

Azure:

https://learn.microsoft.com/en-us/azure/aks/load-balancer-standard

Oracle Cloud:

https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingloadbalancer.htm
https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingloadbalancers-subtopic.htm
https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingnetworkloadbalancers.htm
https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringloadbalancersnetworkloadbalancers-subtopic.htm
https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingloadbalancer_topic-Summaryofannotations.htm

This way you can change the externalTraffic policy correctly
Either way, using the NodePort service in this scenario is a bad idea. The NodePort service is recommended for testing environments only, as when a node fails, it is necessary to change the IP address on all Zabbix Agents/Proxy to redirect traffic to another node IP. This is not scalable or sustainable in the production environment.
I think the root cause of the problem is more related to the Kubernetes configuration and less related to this helm chart or Zabbix.

Hi @pirateunclejack!
Thanks for sharing this detail. I thought you were using vanilla Kubernetes. I didn't use https://github.com/kubesphere/kubesphere
Good luck with your new tests.
Can we solve this problem?
If you need help, you can open a discussion here https://github.com/zabbix-community/helm-zabbix/discussions (new Github feature) instead of opening an issue. It's like a community forum.

FYI, I was looking at this same issue a few weeks ago and one possible solution is to configure a readinessProbe which only returns true if the pod is running the active Zabbix server. You could test the port, but I thought it was a stronger guarantee to use an exec probe to go straight to the horses mouth; asking Zabbix itself whether it was active or not.
It's possible to get this information from the runtime control ha_status, which will show all servers in the cluster, and their statuses (active/standby/stopped etc.): https://www.zabbix.com/documentation/current/en/manpages/zabbix_server
I don't have a complete working example, but I was testing with 2 server replicas, with the zabbixServer service type set to LoadBalancer and applying this patch to the zabbix-server Deployment:
zabbixServer:
  service:
    externalTrafficPolicy: Local
    type: LoadBalancer

---
- op: add
  path: /spec/template/spec/containers/0/readinessProbe
  value:
    exec:
      command:
        - test
        - $(zabbix_server -R ha_status | awk /$ZBX_NODEADDRESS:10051/'{print $5}')
        - =
        - active
    initialDelaySeconds: 5
    periodSeconds: 10
    timeoutSeconds: 5
    successThreshold: 1
    failureThreshold: 6

I shelved it for a while because it doesn't play nicely with Argo CD (it leaves the deployment in a permanently degraded state in Argo CD terms, despite the unready pod being desirable in this case) but it may be worth a try in your scenario. Aside from that, it was promising... with the LoadBalancer only ever forwarding traffic to the active server pod.
This scenario is perhaps a bit too opinionated and specific to be much of a chart issue, except perhaps a generic feature allowing the readinessProbe to be configurable through the chart values/server template to avoid having to add patches (similar to how it is already configurable for the web deployment, except that one is hard-coded to the httpGet probe type).

Hey guys,
I just looked into it, I was surprised indeed why this was not taken care off... I think it will be good to write details about this solution in Readme file...
I had to do it another way by running a script via configmap to zabbix-server pod
helm config:
- name: zabbix-health-check
image: webdevops/php-apache
ports:
- containerPort: 80
volumeMounts:
- name: zabbix-health-check-scripts
mountPath: /app
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 10
Configmap:
index.php: |
<?php
// MySQL database connection parameters
$host = "1.1.0.6";
$user = "zbx_eks";
$password = "xyz";
$database = "zabbix";

// Create a MySQL connection
$conn = new mysqli($host, $user, $password, $database);

// Check the connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// SQL query to select the address where status is 3
$sql = "SELECT address FROM ha_node WHERE status = 3";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // Get the actual IP address of the server
    #$actualIP = $_SERVER['SERVER_ADDR'];
    $actualIP = gethostbyname(gethostname());

    // Output data of each row
    while ($row = $result->fetch_assoc()) {
        $address = $row["address"];

        // Check if the retrieved address matches the actual IP
        if ($address === $actualIP) {
            header("HTTP/1.1 200 OK");
            echo "Address of ha_nodeid with status 3 matches the actual IP: $actualIP";
        } else {
            header("HTTP/1.1 403 Forbidden");
            echo "Address of ha_nodeid with status 3 does not match the actual IP: $actualIP ";
        }
    }
} else {
    header("HTTP/1.1 404 Not Found");
    echo "No records found with status 3";
}

// Close the MySQL connection
$conn->close();

?>

But this solution with ha_status looks much simpler.. I will try it out

authors: aeciopires leighwgordon pirateunclejack zohairraza

repo: zabbix-community/helm-zabbix


text:
Constants Symbol

Put symbols for costants variable.
Reference, Issue 19

Constant and global variable visible

@zabel-xyz , I made corrections.
Do you let me know what you think?
Thanks

Parser refactoring in Version 1.2.0.
To consider global variables, constants, types in navigation and list of symbols.

source: gharchive/pull-request

authors: Danieleeee zabel-xyz

repo: zabel-xyz/plsql-language


text:
Obsolete interval parameter for all except intraday

Hi,
Thanks for providing a JS wrapper around the API.
You are saying that your API calls for time series are like this:
alpha.data.intraday(symbol, outputsize, datatype, interval);
alpha.data.daily(symbol, outputsize, datatype, interval);
alpha.data.daily_adjusted(symbol, outputsize, datatype, interval);
alpha.data.weekly(symbol, outputsize, datatype, interval);
alpha.data.weekly_adjusted(symbol, outputsize, datatype, interval);
alpha.data.monthly(symbol, outputsize, datatype, interval);
alpha.data.monthly_adjusted(symbol, outputsize, datatype, interval);
alpha.data.quote(symbol, outputsize, datatype, interval);

But the fact is the only intraday support interval parameter. The rest of the calls the internal is obsolete (and even an invalid request).
You could clean-up your API? And update your docs plz?
This is only very confusing for people.

Reference API doc of Alpha Vantage

Regards,
Melroy van den Berg

@danger89 Thanks for the heads up, it looks like the API may have changed. I'll get it fixed.

This was addressed in 2.1.0, thanks.

repo: zackurben/alphavantage


text:
数据库错误，timeoutpanic

如图所示

一样报错

问题已记录，可能由于文件过大，导致数据库打开超时，已修改参数，下次发版修复，请留意issue关闭情况

@yamadafz @Kud-Fountain
能否检查一下你们是否有开多个进程，导致 pst.db 文件被其它程序所占用呢？

@yamadafz @Kud-Fountain 能否检查一下你们是否有开多个进程，导致 pst.db 文件被其它程序所占用呢？

没有，关闭程序后pst.db可被正常删除

@yamadafz @Kud-Fountain 能否检查一下你们是否有开多个进程，导致 pst.db 文件被其它程序所占用呢？

没有，关闭程序后pst.db可被正常删除

这里也一样

@yamadafz @Kud-Fountain
一个针对修复此问题的release，二位麻烦帮忙看下是否修复，如果没有请看下日志中的两次 GetDB：xxx 打印的值是否相同
https://share.zaigie.com/s/E3OTE3O

@yamadafz @Kud-Fountain 一个针对修复此问题的release，二位麻烦帮忙看下是否修复，如果没有请看下日志中的两次 GetDB：xxx 打印的值是否相同 https://share.zaigie.com/s/E3OTE3O

我这边已修复了，感谢大佬！

再起不能*2,   4.1版本

最新版0.4.2已修复

最新版本0.4.2已修复

说错了，测试的4.2版本，重启下控制台无报错，但网页数组还是为空
Level.zip

很明显的报错显示你没有指向正确的（或者有权限读取的）Level.sav 文件

很明显的报错显示你没有指向正确的（或者有权限读取的）Level.sav 文件

抱歉，重新下载4.2版本将文件全部删除了，这是正确指向Level.sav文件的错误

最新版0.4.2已修复

我这还是报错无显示sav的内容

最新版0.4.2已修复

我这还是报错无显示sav的内容

那麻烦你替换一下上面的特定版本release，检查一下 GetDB的输出呢（因为我是在无法复现）

@yamadafz @StrawDC
https://share.zaigie.com/s/E1NDcwO
再次麻烦各位，尝试一下这个特定的release版本帮忙排查！应该没有问题了

@yamadafz @StrawDC https://share.zaigie.com/s/E1NDcwO 再次麻烦各位，尝试一下这个刚刚新的资源特定的发布版本帮忙排查！应该没有问题了
成功回显页面，但是仅显示在线人，并且控制台报错
2024/02/01 - 17:18:18 | DEBUG | database/bbolt.go:44 | GetDB: 0xc70a580

{"player_uid":"2349545852","nickname":"ASDanmu","level":0,"exp":0,"hp":0,"max_hp":0,"shield_hp":0,"shield_max_hp":0,"max_status_point":0,"status_point":null,"full_stomach":0,"steam_id":"765611452792339","last_online":"2024-02-01T17:18:05.7497298+08:00","pals":null}

@yamadafz @StrawDC https://share.zaigie.com/s/E1NDcwO 再次麻烦各位，尝试一下这个刚刚新的资源特定的发布版本帮忙排查！应该没有问题了
成功回显页面，但是仅显示在线人，并且控制台报错
2024/02/01 - 17:18:18 | DEBUG | database/bbolt.go:44 | GetDB: 0xc70a580

{"player_uid":"2349545852","nickname":"ASDanmu","level":0,"exp":0,"hp":0,"max_hp":0,"shield_hp":0,"shield_max_hp":0,"max_status_point":0,"status_point":null,"full_stomach":0,"steam_id":"765611452792339","last_online":"2024-02-01T17:18:05.7497298+08:00","pals":null}

补充：等级，经验，血量，工会都未正确显示，实在不行这种个别情况不要排查了，复现也费劲

@yamadafz @StrawDC https://share.zaigie.com/s/E1NDcwO 再次麻烦各位，尝试一下这个刚刚新打包特定的release版本帮忙排查！应该没有问题了

还是一样的报错

该问题已经在 v0.5.0 修复

authors: Kud-Fountain StrawDC yamadafz zaigie

repo: zaigie/palworld-server-tool


text:
If pipeline run into error, just tell there is an error

Exemple : spheres.tiff -> blur -> mask : disable mask should work

Error is printed in the logger modal. We could show it in the pipeline, yet it requires an extensive rework.

repo: zakodium-oss/pixelium


text:
Simplify building of requestFactory

Clients have to provide a requestFactory to the NakadiClient, which can handle authorization and problem-responses.
final SimpleClientHttpRequestFactory requestFactoryDelegate = new SimpleClientHttpRequestFactory();
final ProblemHandlingClientHttpRequestFactory problemHandlingRequestFactory = new ProblemHandlingClientHttpRequestFactory(requestFactoryDelegate, objectMapper);
final ClientHttpRequestFactory requestFactory = new AuthorizedClientHttpRequestFactory(problemHandlingRequestFactory, () -> "MY_ACCESS_TOKEN");

As both is mandatory when communicating with nakadi it would be great if fahrschein could offer an easy way to wrap a client's requestFactory.

I introduced this in the latest commit of PR #18
https://github.com/zalando-incubator/fahrschein/blob/close-http-components/src/main/java/org/zalando/fahrschein/ClientHttpRequestFactoryHelper.java
I don't like the name though, especially as we discussed having no "helpers" or "utils" so far :)

We could hide this in a NakadiClientBuilder like this:
client = NakadiClient.Builder.for("https://my.nakadi.zalan.do")
    .withBackoff(new ExponentialBackoff())
    .withCursorManager(new PersistentCursorManager())
    .wrappingRequestFactory(new HttpComponentsRequestFactory())
    .build();

ExponentialBackoff, inMemoryCursorManager and SimpleRequestFactory can be defaults.

One complication is that the ManagedCursorManager itself needs a ClientHttpRequestFactory, so once you use that you again have to configure everything yourself.

Why not creating the HttpClient inside NakadiClient instead of asking the user for it? We can let the user specify the Parameters (e.g. connection and read timeouts), which then could be also coordinated with the Nakadi parameters stream_timeout, batch_flush_timeout etc.

authors: jhorstmann lukasniemeier-zalando tmuehl

repo: zalando-incubator/fahrschein


text:
Support for Open API Spec v3.0.0

OpenAPI Spec v3.0.0 is now the current version of the specification. Are there plans for Connexion to support it?

We should. But no work was started yet.

Duplicated. See: #420

Closing as duplicate of #420

authors: hjacobs jakul rafaelcaricio tomas-fp

repo: zalando/connexion


text:
Add information about variables for build

#388 Adds information about dc-font-path and dc-image-path variables

@avb1989 Hey, thanks for your contribution. Although we would like to see that information not in the readme but more likely here... add a page 04-scss-reference.html in that folder with the following content:
---
notes: |
    Variables used in Dress Code Core and their default values
---

      Variable
      Type
      Default
      Description

      $dc-font-path
      String
      "../fonts"
      Fonts folder

      $dc-image-path
      String
      "../img"
      Images folder

To see a preview just run npm start and open your browser at http://localhost:3000

@avb1989 Any updates? We'd love to see your contribution merged.

Hey, sorry for the late update.
Anyway, the reason I added it in the README was because was breaking my build.
Thus it seemed important enough to be on the 1st page. What do you think ?
Might be more friendly for newbies to not go through the entire docs until they have to.

@avb1989 I agree. I would like just to do some updates before merge, can you allow changes?

Yes. It is already allowed.

@avb1989 Great! Will take care about this PR in the next days.. thanks a lot.

👍

:+1:

authors: avb1989 dami-gg rbarilani

repo: zalando/dress-code


text:
Fix when request body is empty string

In Spring Framework, for GET requests the RequestBody is an empty string and throws an error when we want to apply the filter.
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.

In Spring Framework, for GET requests the RequestBody is an empty string

Under which circumstances?
We do check on the Content-Type being application/json (or derivatives). If you have a request that claims to be JSON (Content-Type is set) but the body is empty, then that's not a valid JSON request.

GET requests have Content-Type: application/json and not have a body and Spring returns an empty string that throws enception when trying to parse

GET requests have Content-Type: application/json and not have a body

But that's an illegal statement in HTTP.
Your content type claims that the request body is a valid JSON document, but an empty string is not valid JSON.
I'd argue that Logbook is not at fault here.
Why do you have that content type on a GET request in the first place?
What's the purpose of that?

I totally agree that the problem is not in the Logbook, but IMHO it must be protected from IllegalArgumentException.
The call workflow is as follows:
Mobile App -> Akamai -> F5 -> WSO2 -> Openshift
I don't know where this content type header is added, but it causes us problems

IMHO it must be protected from IllegalArgumentException

Agreed. Instead of checking for this particular issue (empty body), why not catch any exception from the JSON parser and handle that (by not doing something). That way we also covered syntactically incorrect JSON bodies, etc.

This exception also happens when the WithoutBodyStrategy is active, resulting in the following exception
java.lang.IllegalArgumentException: json string can not be null or empty
	at com.jayway.jsonpath.internal.Utils.notEmpty(Utils.java:383)
	at com.jayway.jsonpath.internal.ParseContextImpl.parse(ParseContextImpl.java:36)
	at org.zalando.logbook.json.JsonPathBodyFilters$JsonPathBodyFilter.filter(JsonPathBodyFilters.java:99)
	at org.zalando.logbook.NonMergeableBodyFilterPair.filter(NonMergeableBodyFilterPair.java:21)
	at org.zalando.logbook.FilteredHttpResponse.getBodyAsString(FilteredHttpResponse.java:50)
	at org.zalando.logbook.json.JsonHttpLogFormatter.prepareBody(JsonHttpLogFormatter.java:64)
	at org.zalando.logbook.StructuredHttpLogFormatter.prepare(StructuredHttpLogFormatter.java:95)
	at org.zalando.logbook.StructuredHttpLogFormatter.format(StructuredHttpLogFormatter.java:26)
	at org.zalando.logbook.logstash.LogstashLogbackSink.write(LogstashLogbackSink.java:52)
	at org.zalando.logbook.Strategy.write(Strategy.java:119)
	at org.zalando.logbook.DefaultLogbook$1.lambda$process$0(DefaultLogbook.java:55)
	at org.zalando.logbook.servlet.LogbookFilter.write(LogbookFilter.java:87)
	at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:80)
	at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:121)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
	at nl.topicuszorg.rm.backend.web.filter.TenantFilter$doFilter$1.invoke(TenantFilter.kt:52)
	at nl.topicuszorg.rm.backend.web.filter.TenantFilter$doFilter$1.invoke(TenantFilter.kt:51)
	at nl.topicuszorg.rm.backend.web.service.TenantedRunnerImpl.runFor(TenantedRunnerImpl.kt:21)
	at nl.topicuszorg.rm.backend.web.filter.TenantFilter.doFilter(TenantFilter.kt:51)

Agreed. Instead of checking for this particular issue (empty body), why not catch any exception from the JSON parser and handle that (by not doing something). That way we also covered syntactically incorrect JSON bodies, etc.

If the body is incorrect JSON, we never execute this code. The corner case is when the body does not exist and Spring treats it as an empty string.
This PR solve this problem. I do not believe that we should give solutions to cases that will not occur. This is YAGNI

@ChristianHersevoort Spot-on observation!
@ismail2ov What about this then:

Check for empty body and skip the filter

Maybe we should skip all body filters altogether in this case? I mean what is there to filter if there is no body, right?

Catch exceptions from the context.parse(..) call and default to return body as-is

* Check for empty body and skip the filter

  * Maybe we should skip all body filters altogether in this case? I mean what is there to filter if there is no body, right?

This solves our problem

* Catch exceptions from the `context.parse(..)` call and default to return body _as-is_

This case will never occur because we already know that it is a valid JSON

This case will never occur because we already know that it is a valid JSON

Not really. A faulty client could set Content-Type: application/json but send you an XML body.

Also application/json isn't the only content-type that is valid json!
You also have;
application/fhir+json (https://en.wikipedia.org/wiki/Fast_Healthcare_Interoperability_Resources)
application/geo+json (https://en.wikipedia.org/wiki/GeoJSON)=

Also application/json isn't the only content-type that is valid json!

@ChristianHersevoort You're right, that's also what's implemented in Logbook:
https://github.com/zalando/logbook/blob/1a3fe4e426ca6721ffbd1ede440797ee23c33fd5/logbook-json/src/main/java/org/zalando/logbook/json/JsonMediaType.java#L10-L35
Since my comment wasn't specifically about this, hence I simplified things a bit.

@ChristianHersevoort In this case, the Content Type is not important, it is important that if the body is an empty string, the code in the IF should not be executed

@whiskeysierra Can we merge this as a temporary solution? This is a blocker for us.

Catch exceptions from the context.parse(..) call and default to return body as-is

IMHO this is very expensive and does not make sense

IMHO this is very expensive and does not make sense

How is that expensive? The exception would be thrown anyway. It's a question about invasiveness of Logbook. We try to not change the behavior of the application that is instrumented with Logbook. Catching exceptions there would be very much in line with that.

How is that expensive? The exception would be thrown anyway.

The question is more about the design.
IMHO we shouldn't execute parser if we know it won't work.

It's a question about invasiveness of Logbook. We try to not change the behavior of the application that is instrumented with Logbook. Catching exceptions there would be very much in line with that.

Right now Logbook is breaking requests.

In this case, the Content Type is not important, it is important that if the body is an empty string, the code in the IF should not be executed
@ismail2ov Yeah I agree, I wasn't suggesting otherwise.
I don't understand how catching the exception is the ideal solution, but maybe it can be used as temporary fix.
It's a question about invasiveness of Logbook. We try to not change the behavior of the application that is instrumented with Logbook. Catching exceptions there would be very much in line with that.
How is that expensive? The exception would be thrown anyway.
@whiskeysierra
It's about preventing an exception to be thrown, and yes exception CAN be really expensive see; https://shipilev.net/blog/2014/exceptional-performance/
@whiskeysierra
I agree that invasive changes should be avoided as much as possible. But in this case it's not changing anything to the the behavior, it's only fixing a broken case in the "JsonPathBodyFilters" and making it more lenient / forgiving.

I totally agree with @ChristianHersevoort

IMHO we shouldn't execute parser if we know it won't work.

Ideally yes, but in order to catch every single invalid input that would make the parser fail you'd need to implement the same parser again... Empty inputs are just one of endless possibilities to invalid inputs.

Right now Logbook is breaking requests.

Exactly, and it very much should not.
That's why I'm proposing to:

Handle empty bodies and
Exceptions during body parsing
in the very same way, by ignoring them and leaving the body as-is.

It's about preventing an exception to be thrown

I'm fine with handling empty bodies separately.
But as stated above, empty bodies are just one possible cause of the parser failing.

yes exceptions CAN be really expensive and should be avoided see;

We're not using exceptions for control flows in tight loops and we don't throw exceptions where there wasn't one being thrown to begin with. So I don't see how the performance argument can be made here.

But in this case it's not changing anything to the the behavior, it's only fixing a broken case in the "JsonPathBodyFilters" and making it more lenient / forgiving.

You really gotta see the empty body in the bigger picture here.
Logbook, as of today, is very much breaking the behavior of the instrumented application here.
An application should react to requests in the very same way, regardless of whether it's instrumented with Logbook or not.
Today: That principle is violated in the following cases:

Empty body
Syntactically incorrect JSON
YAML instead of JSON
XML instead of JSON
endless more possibilities...

(Hopefully in the) Future: The principle is not violated.
As you can see from the list above, by fixing empty bodies, you just eliminated one of infinite possible errors instead of all of them.
For performance reasons, we should be checking for empty bodies, because:

They happen right now in real-world applications and they hurt
It's easy to do
It's faster than throwing and catching useless exceptions

However, that does not mean we should not also do catch exceptions, because:

It's easy to do
It's preserves the application's original behavior
(Granted, nobody complain about this until now, but why wait for somebody to stumble over this before we fix it?)

@whiskeysierra
I agree with everything what you are saying, but maybe it can be split the fix in 2 parts;
Part 1: (this) hotfix , only fixing this specific issue in the JsonPathBodyFilters. Ignoring (semi) unrelated content issues
Part 2. Refactor of how BodyFiltering works; This will probably be a major (breaking) change.

@whiskeysierra I totally agree with you.
What do you think of this approach? I'm logging only the class name of the exception to avoid problems if the exception is NPE

👍

@ismail2ov Great, let's go with that for now and we'll re-visit BodyFilters in general and whether we should skip or augment them with exception handling in general (not just the JSON ones).

repo: zalando/logbook


text:
Remote File Storage

The model weights file is too large to push to a production Heroku server, so we need to host them on Google Cloud Storage instead and access them from there. This PR allows the model to be compiled using these remote weights.

repo: zaman-lab/trumpmeter-py


text:
Tesseract v4.x support

Hi, I moved from tesseractjs to node-tesseract-ocr for performance reasons.
I tried to install it on a linux machine, it seems to work fine with Tesseract 3.x but having issues with Tesseract 4.
I'm passing an arraybuffer image as input, so wonder if that's the issue or if v4.x required additional configs.
Thanks,
Christian

For reference:
tesseract 4.1.3
leptonica-1.83.0
libjpeg 6b (libjpeg-turbo 2.0.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0

Closing as it's working fine, I'm using 5.0.1 and no issues

repo: zapolnoch/node-tesseract-ocr


text:
Add support for python 3.9

Context

AWS announced that python 3.9 is available for Lamba runtime.
Expected Behavior

Zappa should support python 3.9
Actual Behavior

I got this error:
Zappa (and AWS Lambda) support the following versions of Python: ['3.6', '3.7', '3.8']
Traceback (most recent call last):
  File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/task/zappa_handler.py", line 24, in <module>
    from zappa.middleware import ZappaWSGIMiddleware
  File "/var/task/zappa/__init__.py", line 14, in <module>
    raise RuntimeError(err_msg)

Possible Fix

Steps to Reproduce

Your Environment

Zappa version used:
Operating System and Python version:
The output of pip freeze:
Link to your project (optional):
Your zappa_settings.json:

bump, also need this, can someone please help stamp the fix which has been out for 20 days?
https://github.com/zappa/Zappa/pull/1026

Bump, need this one as well. Would be greatly appreciated 👍
#1026

authors: Ryce opqpop tsuga

repo: zappa/Zappa


text:
Missing Generics-Rep dependency

Please add this dependency to your bower.json and publish a patch release, as you have undeclared Generics-Rep usages. You can prevent this problem in the future by adding dev dependencies to your dependencies or using bower i -p (production install) to see if pulp build will succeed.

https://github.com/zaquest/purescript-uint/blob/25a52763e94fd6481348cbee55ba87737e0fbd70/src/Data/UInt.purs#L42

Definitely! Thank you for the heads up. Is this a compiler bug? Because it compiles fine currently, as of purs v0.12.0

er, derp, sorry I just kinda lapsed in what I was reading. Sorry, got the bower dependencies fixed!

authors: athanclark justinwoo

repo: zaquest/purescript-uint


text:
Couldn't create merge request, Cannot read property 'green' of undefined

I'm getting this issue whenever i try to create a MR, I'm really not sure what is going on and couldn't find anything similar posted previously. Can someone please help
vivek@ideacrest-0020:~/offset-widgets$ lab mr -b dev -t staging -m "Test MR" -a vivek.ideacrest -v
Verbose option used. Detailed logging information will be emitted.

Getting base branch information

Getting base branch name :
Argument provided : dev
Base branch name obtained : dev

Getting remote of branch : dev
Executing git config branch.dev.remote
Remote obtained : origin

Getting URL of remote : origin
Executing  git config remote.origin.url
URL of remote obtained : git@gitlab.com:greenstory/offset-widgets.git

gitlab host obtained : gitlab.com

Project name derived from host : greenstory/offset-widgets

Getting gitlab project info for : greenstory/offset-widgets
Couldn't create merge request
Cannot read property 'green' of undefined

It sounds like you picked the "wrong" lab. Neither the command line options nor the error messages match the code in this project.
Maybe the --help or --version flags provide some information to identify the correct project?

@profclems is this one of yours?

@profclems is this one of yours?

@profclems is this one of yours?

I don't think so. None of the error messages and logs matches any part of our code.

@profclems is this one of yours?

I don't think so. None of the error messages and logs matches any part of our code.

This was an issue with the wrong reference of lab. Sorry for the delay.

This was an issue with the wrong reference of lab. Sorry for the delay.

authors: fmuellner koshyviv profclems zaquestion

repo: zaquestion/lab


text:
Avoid loading scalar values automatically?

unless there is a good reason not to load scalar values automatically.

I guess the only reason not to is that once https://github.com/zarr-developers/zarr-python/issues/1977 is fixed (as it should be, else its a breaking change between v2 and v3) we will no longer need to load scalar values automatically, so we would be adding something to virtualizarr that we know we should remove later.
I think that's okay though - if you're happy to add a PR @ghidalgo3 we can think about what scenarios should cause a warning (or deprecation warning).
Originally posted by @TomNicholas in https://github.com/zarr-developers/VirtualiZarr/issues/194#issuecomment-2253161789

Raising because https://github.com/zarr-developers/zarr-python/issues/1977 was merged.

repo: zarr-developers/VirtualiZarr


text:
Type hints in Codec class

I've noticed that Codec class methods, such as encode and decode, do not use type hints. Is this intentional or something that can be added in the future?

It is not intentional - this code mostly predates type-hinting as normal practice in python. If you made a PR to add, it would probably be accepted, assuming you can find good definitions for "buffer-like" and similar.

I think it would be very valuable if numcodecs implements a protocol type for buffer-like similar to what we have for array-likes that we can use throughout the Zarr ecosystem.

In terms of typing Buffer, this is getting better. Please see PEP 688

authors: Alexey-Kamenev jakirkham madsbk martindurant

repo: zarr-developers/numcodecs


text:
Simplify datetime/timedelta check

As we already know that arr must be an array, simply check the array's type to see if it is datetime/timedelta. Thus this avoids the check of whether buf is an array.
TODO:

[ ] Unit tests and/or doctests in docstrings
[ ] tox -e py37 passes locally
[ ] tox -e py27 passes locally
[ ] Docstrings and API docs for any new/modified user-facing classes and functions
[ ] Changes documented in docs/release.rst
[ ] tox -e docs passes locally
[ ] AppVeyor and Travis CI passes
[ ] Test coverage to 100% (Coveralls passes)

Hello @jakirkham! Thanks for submitting the PR.

In the file numcodecs/compat.py, following are the PEP8 issues :

Line 37:80: E501 line too long (84 > 79 characters)
Line 52:80: E501 line too long (85 > 79 characters)
Line 62:80: E501 line too long (80 > 79 characters)
Line 63:80: E501 line too long (85 > 79 characters)
Line 65:80: E501 line too long (81 > 79 characters)
Line 69:80: E501 line too long (82 > 79 characters)
Line 76:80: E501 line too long (80 > 79 characters)
Line 86:80: E501 line too long (85 > 79 characters)
Line 94:80: E501 line too long (84 > 79 characters)
Line 95:80: E501 line too long (86 > 79 characters)
Line 96:80: E501 line too long (83 > 79 characters)
Line 97:80: E501 line too long (80 > 79 characters)
Line 115:80: E501 line too long (85 > 79 characters)
Line 123:80: E501 line too long (89 > 79 characters)
Line 127:80: E501 line too long (84 > 79 characters)
Line 141:80: E501 line too long (84 > 79 characters)

Sorry for pep8 noise, I've created .pep8speaks.yml here too now.

authors: alimanfoo jakirkham pep8speaks


text:
Collect JSON utility functions

This refactors out the JSON utility functions created in PR ( https://github.com/zarr-developers/zarr/pull/429 ) and moves them from zarr.meta to zarr.util. It also employs them in other places where the json module was being used directly. Should make it easier to leverage the buffer protocol as part of the loading process. Finally includes the encode step within json_dumps, which eliminates the need for it to be done every time json_dumps is called, which simplifies the code a bit.
TODO:

[ ] Add unit tests and/or doctests in docstrings
[ ] Add docstrings and API docs for any new/modified user-facing classes and functions
[ ] New/modified features documented in docs/tutorial.rst
[x] Changes documented in docs/release.rst
[x] Docs build locally (e.g., run tox -e docs)
[x] AppVeyor and Travis CI passes
[x] Test coverage is 100% (Coveralls passes)

Planning on merging Monday evening if no comments.

repo: zarr-developers/zarr


text:
ZBM does not allow snapshot revert if current FS has no kernel

If your only filesystem has no available kernel (for example, zfs failing to build on 6.2.8), ZBM dumps you into recovery shell only,
Even if you have snapshots available to revert to, you can only go to shell, making recovery more difficult than just promoting a snapshot from the menu

This is because ZFSBootMenu only identifies "boot environments" as root filesystems (or legacy mounts that have been opted in) with kernels. Walking the snapshot history of any candidates to identify past kernels would be far too expensive to undertake in a pre-boot environment. Unfortunately, the only real option here is passing this off to the user for manual intervention.

We could possibly add a recovery shell tool that tab completes available environments and just calls draw_snapshots . All of the action logic was moved to snapshot_dispatcher, so it wouldn't be too hard to call that after.

That would be a great solution, and we welcome any contributions.

authors: Biyoni ahesford zdykstra

repo: zbm-dev/zfsbootmenu


text:
Rename exodus to elysium

PR intention
Rename exodus to elysium
Code changes brief

Rename directory src/exodus to src/elysium
Rename exodus in qt
Rename exodus rpcs
Update rpc tests

@ultimaweapon the unused static variable warning is suppressed. Please review.

We can call !pub.IsValid() here
https://github.com/thebevrishot/zcoin/blob/5d0c31afa53e14e107cf79dbe9381899f23b6b27/src/elysium/sigmadb.cpp#L547

We need to call g.isInfinity() here
https://github.com/thebevrishot/zcoin/blob/5d0c31afa53e14e107cf79dbe9381899f23b6b27/src/elysium/sigmaprimitives.cpp#L29

We need to check isZero() here for serial and randomness
https://github.com/thebevrishot/zcoin/blob/5d0c31afa53e14e107cf79dbe9381899f23b6b27/src/elysium/sigmaprimitives.cpp#L70

also this one, check .. && !commitment.isInfinity()
https://github.com/thebevrishot/zcoin/blob/5d0c31afa53e14e107cf79dbe9381899f23b6b27/src/elysium/sigmaprimitives.cpp#L104

repo: zcoinofficial/zcoin


text:
PyPi does not include tarballs, and repo does not include version tags

We are in the process of creating conda packages for napari plugins and related dependencies.
As part of this process we create the conda packages on conda-forge based on either PyPI by

relying on the tarballs, but currently no tarballs are available on PyPI

The version in code still seems to be set to 0.0.1 -> See https://github.com/zcqwh/napari-aideveloper/blob/main/src/napari_aideveloper/init.py#L2

Finally the repository does not contain any tags that point to the specific versions.

Do you think it would be possible to provide fixes to the above issues?
Thanks a lot!

Fixed. Thank you for issue!

authors: goanpeca zcqwh

repo: zcqwh/napari-aideveloper


text:
Register Organization issues

Env: pipeline develop,reporting-ui:1.3,JENKINS_MASTER=5.1, qps-infra - master
Steps:

Register Organization
Start Register repository
Actual result:repository is not created. Errors are present on console log

Log:
21:08:26  HttpMethod: POST 21:08:26  URL: http://reporting-service:8080/reporting-service/api/iam/v1/auth/refresh 21:08:26  Content-Type: application/json 21:08:26  Sending request to url: http://reporting-service:8080/reporting-service/api/iam/v1/auth/refresh 21:08:27  Response Code: HTTP/1.1 404  21:08:27  Success code from [200‥404]

fixed. in 1.0 (5.2-qps) release RegisterOrganization should have empty values for Service URL and token.
major note: as of now please register Service URL in short format (fix from Zafira UI is coming).
i.e. instead of
http://hostname/reporting-service
use
http://hostname

Tested on release version 5.2. Fixed.

authors: okamara vdelendik

repo: zebrunner/zebrunner


text:
Optimize git fetch-depth

This PR improves the performance of the action's git fetches. For repositories with large histories, this can dramatically decrease the action's execution time.

Note
Users do not have to adjust anything to benefit from this change unless they have configured the actions/checkout's fetch-depth to anything else than the default: fetch-depth: 1

closes #267
closes #269
Motivation
Since #162 this action supports shallow clones, which is the default when cloning a repo using actions/checkout. This means that the action fetches all the necessary git refs itself.
For repositories with large git histories (i.e. containing many commits), this increased the execution time of the action dramatically. The action would spend most of its time fetching this history, apparently also fetching common parts of the history multiple times.
What has changed?
A core mechanism had to be adjusted to reduce the number of commits that have to be fetched. This action previously determined the commits to cherry-pick by looking for the merge base between the pull request's head and base refs. However, it's unclear how many commits may already exist on the pull request's base (i.e. PR target) since the PR's head was branched from it. So, there's no way to specify a particular fetch depth that is optimal deterministically.
As an alternative, this PR uses the Github API to find these same commits. This allows the depth of the fetch used to discover all the necessary commits to cherry-pick to be reduced to n+1. An additional fetch with depth 1 is still required for each backport target branch. This means that the fetch depth is now optimal.
Why about those removed tests?
Many of the tests in this project have been bothering me for a longer time. They've restricted progress much more than they've helped to make it safe to change things. This became clear to me once more when I wanted to adjust the core of this action. So, I've removed many of the tests.
To ensure the action works correctly, I've mostly switched to using korthout/backport-action-test. That repo verifies the main functionality but does not cover all scenarios yet. I plan to expand these in the future. I also plan to re-introduce fast-running unit tests at a later time. But now, I do not see any reason to keep any of the deleted tests.

Tested wth https://github.com/korthout/backport-action-test

Case 1

https://github.com/korthout/backport-action-test/actions/runs/3534050791
https://github.com/korthout/backport-action-test/pull/189
https://github.com/korthout/backport-action-test/pull/190

Case 2

https://github.com/korthout/backport-action-test/actions/runs/3534068755
https://github.com/korthout/backport-action-test/pull/191
https://github.com/korthout/backport-action-test/pull/192

Backporting a pull request to 2 branches went from ~1m on v0.0.9 to just 11s on v1-rc1 in the camunda/zeebe repo :green_heart:

Backporting a pull request to 1 branch went from ~5m to just 16s on v1-rc for the NixOS/nixpkgs repo 🌱 🌱 🌱

original pull request: https://github.com/korthout/nixpkgs/pull/2
created backport pull request: https://github.com/korthout/nixpkgs/pull/3

repo: zeebe-io/backport-action


text:
Pass over the Spicy analyzer template.

Pass over the Spicy analyzer template.
This now provides separate features for protocol/file/packet analyzers. For each, it introduces new Spicy-specific user variables as needed, to avoid overloading the meaning of the existing name and namespace variables, which are now back to referring just to normal zkg package terminology.
There's a test script that locally builds and tests the various Spicy-related features. We should move this into CI somehow.

This is ready for review.

Ok, I made another pass, see what you think.

Thanks, seems ready now, I squashed it all together. @ckreibich want to take a look too still?

One TODO: Need to update the Spicy-side documentation before merging this.

Documentation ready in https://github.com/zeek/spicy/pull/1278.
@ckreibich just let me know if/when you want me to go ahead and merge this.

    `zeek >=4.0.0`

Is that correct or should this be 5.0.0 now?

Spicy still works with 4.0.x, so I was reluctant to bump this unnecessarily at this point.

repo: zeek/package-template


text:
Complete deck sheet

Complete the deck sheet design.

Having a sheet that displays all cards in a deck is going to come in very handy for all cases where cards have a text printed on them (i.e. "Play to make +2 damage"). The sheet could use some stronger visual cue though as to which cards have been drawn. If you take a moment you can make out which card was drawn from those eight in the picture below, and which wasn't, but it isn't immediately clear at a quick glance.

Another idea: How about having a view where the cards themselves are smaller, as to get more on the screen at the same time, but show a detailed view of the card on mouse hover?
Also - Is there a roadmap with how the deck sheet design is planned to look in the end?

Is there a roadmap with how the deck sheet design is planned to look in the end?

No, not really. For the deck/pile I'm really unsure the best approach. And for any design, I basically go strait from in my head to CSS - I'm not much of an artist, so I would spend more time on a mockup than I would just implementing it and seeing how it looks.


text:
Change Table API

Hi :wave: @unix !
What do you think if we change the Table API for:
<Table>
  <Table.Head>
    <Table.Cell align="left">PROPERTY</Table.Cell>
    <Table.Cell align="left">DESCRIPTION</Table.Cell>
    <Table.Cell align="left">TYPE</Table.Cell>
    <Table.Cell align="left">DEFAULT</Table.Cell>
  </Table.Head>
  <Table.Row>
    <Table.Cell>type</Table.Cell>
    <Table.Cell>Content type</Table.Cell>
    <Table.Cell>secondary | warning | error | success</Table.Cell>
    <Table.Cell>-</Table.Cell>
  </Table.Row>
  <Table.Row>
    <Table.Cell>Component</Table.Cell>
    <Table.Cell>DOM element to use</Table.Cell>
    <Table.Cell>string</Table.Cell>
    <Table.Cell>-</Table.Cell>
  </Table.Row>
  <Table.Row>
    <Table.Cell>bold</Table.Cell>
    <Table.Cell>Bold style</Table.Cell>
    <Table.Cell>boolean</Table.Cell>
    <Table.Cell>false</Table.Cell>
  </Table.Row>
</Table>

I think so it gives the user much more control over what and how to render.
Copy the example from Vercel.
If you agree, I can take care of it.

Please edit the issue according to the template.

It seems that you just need the table style, if so, you can refer to the code here.
If not (you really want to change APIs): I have no plans to change the table API for the time being, these two styles have their own advantages and disadvantages, you can see that both antd and material have their own implementations.
If you have any other features about Table, please open a new issue.

authors: AugustoConti unix

repo: zeit-ui/react


text:
Add condensed shortargs / arg.COUNT

Closes #11. Supersedes #16, #17, and #18.
This PR adds:

support for condensed shortargs (e.g. -vvvs hello)
support for arbitrary flag handles via the use of arg.flag(() => {}), which attaches a symbol to the handler
arg.COUNT, a flag handler that accumulates the number of times a flag has been passed

These changes are a result of the excellent discussion on #11 and #18.
Everything here is backwards-compatible.

Can you provide an example of arg.COUNT ?

Done :)

Don't merge yet, I want to add docs for arg.flag().

Very +1 on arg.COUNT so far

Okay should be good to review.

@blakeembrey feel free to update the types now :)

authors: Qix- rauchg

repo: zeit/arg


text:
Repeated key presses don't register in Vim

If I press and hold a navigation key in vim like h or j the repeat doesn't register like it does in Terminal/iTerm.

Using 0.3.1 ?

that was using master with the latest stuff

I'm testing it now and it is fine... Closing this @rauchg.

MacOS High Sierra 10.13.3 using Hyper 2.0.0-canary.14 with no plugins I am currently experiencing the same issue. I can't press and hold a key for a repeat.

@Caryyon Thanks for reporting this error🙏

@albinekb @chabou This error I thought it had been fixed in the canary version 🙍 😞

@chabou Thanks friend 😺

@jdsimcoe you could close this. There is a better spot for it as well as I found out that it was because of the little character popup that mac has. I disabled it and i can repeat now!

going off of @Caryyon ... i used this for mac OS
defaults write -g ApplePressAndHoldEnabled -bool false

authors: Caryyon MAPESO adamki jdsimcoe rauchg

repo: zeit/hyper


text:
CMD + R breaks Hyper #2674

As mentioned in this issue https://github.com/zeit/hyper/issues/2674 the current Reload functionality is broken .
I'm not really sure what the difference should be between Reload ( cmd+R ) and Clear buffer ( cmd+K ) if there is one . Tested it on Terminal.app and iTerm2 and they seem to do the same thing .

Our reload is not working as expected but this is not attended to clear output.
Actually, Reload should force a React update without removing any output. But it seems to be more a development need.
I think that in near future, "Force reload" should, at least, replace "Reload". But user can restart application/window, thus imo, we'll remove both.
Thank you for your help and your work 🙏
But I must reject this PR.

authors: chabou lesce


text:
Add chat (gitter)?

I'd love to chat with other HyperTerm users. Gitter is easy, though limited. Could start there and move if there are issues scaling?

Seconded. Being able to connect to any channel would be awesome. And support for Mattermost as well (chat system built in to GitLab). This might be better suited as an add-on though.

Discord would be great. They're doing some good work :+1:

👍 We have had great success with Gitter for AVA.

ESLint has also found a lot of success with Gitter :+1:

Apparently they've created a public slack community: zeit.chat (https://twitter.com/zeithq/status/756195644021157888)

Slack is not a good fit for open source projects...

Better to say with just one so we dont split the community. I think we should go with gitter.

Left slack long time ago in favour of lighter solutions such as Discord
(Gitter definitely falls under the category of light and focused)
On Fri, 22 Jul 2016 at 19:12 Amila Welihinda notifications@github.com
wrote:

Better to say with just one so we dont split the community. I think we
should go with gitter.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/zeit/hyperterm/issues/297#issuecomment-234601116, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AH4pCPFMQCUtLD8zAed6VpLTRS-j3yU_ks5qYPn9gaJpZM4JQIqS
.

https://zeit.chat 🎉

authors: JacobDB WoodyWoodsta amilajack jamox kaicataldo kentcdodds rauchg sindresorhus

repo: zeit/hyperterm


text:
Fix two comments in default config file

The comments of termCSS and padding attributes in default config file had some problems, I think the comment of termCSS attribute was replaced by padding attribute's comment. I have fixed them, a super minor change.

beautiful. thanks!

authors: alireza-ahmadi rauchg


text:
Micro vs Express (or Koa)

Googled a lot but didn't find anything useful
So maybe someone here can give any insight ??

What are you looking for? Performance comparisons?

Anything & everything. Perfs come later but the main thing is how Micro differs from Express (or Koa). From googling, I got to know that Express comes with everything & Koa is minimal & u can use modules to add routing & stuff to Koa & Micro is same. So what's the difference between Micro & Koa bcz both are incremental ???

@shime Any insights ?

+1, i'm interesting this too

Why did you forget about hapi js? I think we can also add that in the comparation list.
I also found API implementation based on micro
https://github.com/littleStudent/micro-authentication-starter/blob/master/index.js
Looks a bit complicated (overloaded).

@AndrewLosikhin I've seen Hapi & it makes a lot of others Happy 😂 but as a personal preference I'm used to Express & Koa is much smaller & simpler & is from the same people who built Express & Micro is much smaller so thought those 2 comparisons will help me choose one without much learning curve. As with Hapi, its awesome but personally I am not gonna use it yet. After all customers need something that just works, doesn't matter which language or framework is used for that.

Seems like you figured out the difference between Express and Koa and you're now looking for
Koa vs. Micro comparison.
Differences:

Middleware - The main difference. Koa relies heavily on the use of middleware, while Micro doesn't. You can find good explanation about that in Guillermo Rauch's comment here.
Code base size - Micro is smaller with just ~260 SLOC, while Koa is ~570 SLOC.
Request and response vs. context - Micro passes req and res around, while Koa uses ctx
Documentation - Micro lacks any official documentation, while Koa provides some on their official home page

Those are the main differences I could think of. Perhaps someone more involved in either of those projects could chime in if you still have questions.

@shime that's a good explanation of the difference. But what do you mean by Micro lacks any official documentation? The Micro docs is in the readme of this repository.

@sergiodxa thanks, updated.

Seems like you figured out the difference between Express and Koa

That was never the problem. As while skimming through Koa docs & Quora I've seen people saying Koa is more like Express 5 but with Breaking Changes.
My main question is can Micro be used in a large scale application ?

@deadcoder0904 we use Micro in a larga scale microservice based application. The key is microservice, Micro is intended for that, while Express and other frameworks are intended to create a single HTTP server, you could you them for microservices but is not the original intentions of those frameworks.

Awesome thanks @sergiodxa
Keeping it open incase anyone wonders the same
Close it if you want

See https://github.com/zeit/micro/issues/234 for disk space usage comparison.
TLDR; micro is now the smallest which is nice.

@deadcoder0904 maybe you could create a wiki article 👍

Don't think I need to, this issue explains everything 😃 & I guess Google will index it by now 😛

Nice!

@sergiodxa Would you be kind enough to expand on this?

The key is microservice, Micro is intended for that, while Express and other frameworks are intended to create a single HTTP server, you could you them for microservices but is not the original intentions of those frameworks.

Where is the border between a microservice and an traditional API?

@sergiodxa Hey, so do you have any recommendation of service discovery and api gateway solution for micro? THX

@sergiodxa I'm very interested in the question @ithinco asked!

I have all those single-purpose servers but how do I make my client know which one it should talk to depending on what it wants?

@Telokis I believe Now v2 attempts to solve this problem by deploying a monorepo with many services.
See the blog post (specifically the section about the monorepo) here: https://zeit.co/blog/now-2#the-majestic-monorepo

@ithinco @Telokis I don't have any specific recommendation for Micro, any Service Discovery and API Gateway should work fine with Micro, is just a normal HTTP server at the end of the day, nothing special.
Now v2 has definitely interesting things for that like being able to define routes when deploying to match your microservices entry point, but so far is missing a Micro builder for Now.
@corysimmons what you said here

On top of all that, Micro and its deps are significantly smaller/better-performing than other frameworks, which is important when you consider your API might be slammed by millions of requests. Those 10ms differences add up quick.
Was what I meant, Micro is far smaller than other alternatives, is like building a microservice with Rails/Django/Laravel, you can but do you need a whole framework for a simple service? Nope, instead you can just code it yourself using the native HTTP module or in this case a tiny abstraction to simplify it a lot.

authors: AndrewLosikhin Telokis corysimmons deadcoder0904 ithinco sergiodxa shime styfle timneutkens veresnikov

repo: zeit/micro


text:
How to set env that can be accessed both by server and client?

In Meteor, we can use the SETTINGS env.
In create-react-app app, we can set REACT_APP_XXX.
How to do similar things in Next.js?

Please have a look at https://github.com/zeit/next.js/tree/master/examples/with-universal-configuration 😄

But I do think this raises a valid concern, that something easier ought to be baked-in. Why Next.js couldn't have a similar env var?

I have tried this in my app, but it complains:

project structure

.babelrc

env-config.js

usage in settings.js

Lets re-open it then.

Here's how to fix this problem.
You need to have a value for "APP_SERVER_URL" always. So, do something like this:
module.exports = {
  APP_SERVER_URL: process.env.APP_SERVER_URL || 'http://some.url'
};

And make sure to clean the babel cache by:

Running rm -rf node_modules/.cache or
Changing the content inside the page.

@zhaoyao91 Reopen again, it this doesn't fix your app.

I'm also getting the same error @arunoda . This issue might stem from a recent commit/update.

@pauldariye did you follow my steps here: https://github.com/zeit/next.js/issues/1415#issuecomment-286489055
If that didn't work well, send me a sample repo.

Can cache cleaning be avoided?

Check https://github.com/zeit/next.js/tree/canary/examples/with-universal-configuration-runtime

This might be what you are looking for ?
https://github.com/zeit/next.js#exposing-configuration-to-the-server--client-side

authors: arunoda ex3ndr griffithtp pauldariye sedubois timneutkens zhaoyao91


text:
FS Error whether running Next Dev or Next Prod

Everything was working fine last night, but today I am coming across these errors (both Mac and Windows).
Reinstalled all my node_modules, did not help.
ERROR  Failed to compile with 39 errors                                                                                6:32:32 PM
These modules were not found:

fs in ./~/next/dist/server/index.js, ./~/next/dist/server/config.js and 33 others
module in (webpack)/lib/NormalModule.js, ./~/babel-core/lib/helpers/resolve.js
readline in ./~/friendly-errors-webpack-plugin/src/output.js
net in ./~/debug/src/node.js

To install them, you can run: npm install --save fs module readline net
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
You likely forgot to export your component from the file it's defined in. Check your code at index.js?entry:16.
{ Error: Cannot find module '~/exampaths-next/.next/build-stats.json'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at new Server (~/exampaths-next/node_modules/next/dist/server/index.js:104:30)
at module.exports (~/exampaths-next/node_modules/next/dist/server/next.js:10:10)
at walkTree (~/exampaths-next/node_modules/react-apollo/src/server.ts:76:15)
at /mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/react-apollo/src/server.ts:90:11
at forEachSingleChild (~/exampaths-next/node_modules/react/lib/ReactChildren.js:51:8)
at traverseAllChildrenImpl (~/exampaths-next/node_modules/react/lib/traverseAllChildren.js:77:5) code: 'MODULE_NOT_FOUND'
, queryErrors: [ [Circular] ] }
WAIT  Compiling...                                                                                6:34:16 PM
ERROR  Failed to compile with 39 errors                                                                                6:34:21 PM
These modules were not found:

fs in ./~/is-windows-bash/index.js, ./~/mz/fs.js and 33 others
module in (webpack)/lib/NormalModule.js, ./~/babel-core/lib/helpers/resolve.js
readline in ./~/friendly-errors-webpack-plugin/src/output.js
net in ./~/debug/src/node.js

To install them, you can run: npm install --save fs module readline net

This is the error appearing on localhost.
Cannot find module '/mnt/c/Users/akaga/Documents/Github/exampaths-next/.next/build-stats.json'
Error: Cannot find module '/mnt/c/Users/akaga/Documents/Github/exampaths-next/.next/build-stats.json'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at new Server (/mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/next/dist/server/index.js:104:30)
at module.exports (/mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/next/dist/server/next.js:10:10)
at walkTree (/mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/react-apollo/src/server.ts:76:15)
at /mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/react-apollo/src/server.ts:90:11
at forEachSingleChild (/mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/react/lib/ReactChildren.js:51:8)
at traverseAllChildrenImpl (/mnt/c/Users/akaga/Documents/Github/exampaths-next/node_modules/react/lib/traverseAllChildren.js:77:5)

Getting the same thing w/ v.7.9.0 & next @ 2.1.1 even in tiny examples (just pages/index.js and the deps, nothing else); any ideas why this would be happening? Also worth nothing: on OS X

Can you provide the exact steps to reproduce, and an example repository? It's really hard to debug otherwise 👍

facepalm — was importing a nonexistent preset "next" in my babelrc; hard error to track down, but def. my own doing lol

@akadop Hey, @dizlexik was reporting a similar issue where it happened when he had his server using distDir and was essentially running 2 versions of the app. Can you post an example simple project of this issue occuring?

Sorry for the late response. Turns out it was infact running 2 different versions of the app, although I do not know how that happened. There was no error indicating port 3000 was in use.
In any case, Thanks for all the help.

Not sure if I should reopen the issue since it may not be related to Next.js. The case is that when using Next.js with Minio.js, the following errors shown:
These modules were not found:

* fs in ./node_modules/mkdirp/index.js, ./node_modules/minio/dist/main/minio.js

To install it, you can run: npm install --save fs

I have made a very simple project to show how to reproduce this error.
If this issue isn't the concern of Next.js but Minio.js, I would be happy to just post the issue there. Thanks.

authors: ApprenticeGC akadop alexnewmannn markthethomas timneutkens


text:
expand prompt input width if the prompt is long

The prompt input is only as wide as the input image by default, for looks.
If the prompt goes beyond a certain length, the input should grow to show more of the input text.

Or just make it an expanding textarea that spans multiple lines. Better for mobile.

repo: zeke/inpainter


text:
More examples

It would be great if more examples were added to typi readme/documentation,
like using margins on paragraphs and other textual items as lists, list items and title elements.
These should also follow the vertical rhythm. Also helpful:
http://alistapart.com/article/axiomatic-css-and-lobotomized-owls

Great idea. Will think about them when I have the chance to add more to the docs

authors: strarsis zellwk

repo: zellwk/typi


text:
parsing json can throw RuntimeException in AbstractRestfulController

in AbstractRestfulController here https://github.com/zendframework/zend-mvc/blob/ba5c1e124ba07965bfadc1abe2373431025e73db/src/Controller/AbstractRestfulController.php#L453 and https://github.com/zendframework/zend-mvc/blob/ba5c1e124ba07965bfadc1abe2373431025e73db/src/Controller/AbstractRestfulController.php#L576 can throw not catched exceptions leading to 500 response when header Content-Type: application/json and body is not valid json.
Is this bug or not? if not how can I workaround this? The only way to silent this I see is to override these methods or https://github.com/zendframework/zend-mvc/blob/ba5c1e124ba07965bfadc1abe2373431025e73db/src/Controller/AbstractRestfulController.php#L311 but I am not sure I want this.

To be more clear. In this situation I would like to not throw exception but validate the input and return with proper error message instead of this error. But this happens before I can do any validation in the controller.

@svycka If you want to validate, override the method:
public function processPostData(Request $request)
{
    try {
        return parent::processPostData($request);
    } catch (\Exception $e) {
        // do something with the exception
    }
}

Alternately, make the method override a no-op, and manually handle it.

@weierophinney so I should do it like this?
class TestController extends AbstractRestfulController
{
    public function create($data)
    {
        // data validation
    }

    public function update($id, $data)
    {
        // data validation
    }

    public function processPostData(Request $request)
    {
        try {
            return parent::processPostData($request);
        } catch (\Exception $e) {
            // first validation
        }
    }

    protected function processBodyContent($request)
    {
        try {
            return parent::processBodyContent($request);
        } catch (\Exception $e) {
            // second validation
        }
    }
}

but how many user does this? this is not documented and at least I didn't know this until sow errors in logs.
if this is desired behavior then feel free to close this.

@svycka At this point, it's the intended behavior; the AbstractRestfulController provides a convenience layer for the 80% use case.
Another option is to do the validation earlier, which is what Apigility does. In zf-content-negotiation, we have a route listener (on negative priority; runs once we know what route was matched) that does the body parameter parsing. This allows us to return a 400 response when we have JSON decoding errors.

authors: svycka weierophinney

repo: zendframework/zend-mvc


text:
wget missing url

At the end of the installation, I presume, I get the following

I selected 16.7.3-ce.0 as in the example

In recent versions of the Dockerfile, the DOWNLOAD_URL variable has been changed to DOWNLOAD_URL_amd64 and DOWNLOAD_URL_arm64. If you need to build an older version, you need to switch to the corresponding version's commit.
For version 16.7.3, I think you need to use this commit: https://github.com/zengxs/gitlab-arm64/tree/538df3e194b2c2c6b3d0b1194411f0d87c7773c8
I hope this resolves your issue. If you have any further questions, feel free to ask.

Sorry for writing something that might belong to mistakes of newbies.
Process:
docker pull zengxs/gitlab:16.0.4-ce.0
git clone https://github.com/zengxs/gitlab-docker.git
cd gitlab-docker
Build GitLab CE image
docker build .
-t gitlab-ce:16.0.4-ce.0
--build-arg RELEASE_PACKAGE=gitlab-ce
--build-arg RELEASE_VERSION=16.0.4-ce.0
Build GitLab EE image
docker build .
-t gitlab-ee:16.0.4-ce.0
--build-arg RELEASE_PACKAGE=gitlab-ee
--build-arg RELEASE_VERSION=16.0.4-ce.0
Same error.

I apologize for the delayed response.
I've reviewed your steps and noticed that there is a critical step missing. After you git clone the repository, you need to switch to the specific commit of the version you're referring to.
Here are the corrected steps:

Clone the repository:
git clone https://github.com/zengxs/gitlab-arm64.git

Navigate to the repository directory:
cd gitlab-arm64/

Find the specific commit hash. You can do this by:

Visiting the repository on GitHub.
Navigating to the "Commits" section.
Looking through the commit messages to find the commit corresponding to the GitLab version you want to build.

Checkout the specific commit:
# check out to the commit hash, eg. the commit hash of 16.11.1 is 47838c68db7d51eaae5c8588072689571ff3e0cd
git checkout 47838c68db7d51eaae5c8588072689571ff3e0cd

Please try this and let me know if you encounter any further issues.

after the checkout I did
docker build . \
   -t gitlab-ce:16.11.1-ce.0 \
   --build-arg RELEASE_PACKAGE=gitlab-ce \
   --build-arg RELEASE_VERSION=16.11.1-ce.0
# Build GitLab EE image
docker build . \
   -t gitlab-ee:16.11.1-ce.0 \
   --build-arg RELEASE_PACKAGE=gitlab-ee \
   --build-arg RELEASE_VERSION=16.11.1-ce.0

but I get the same error. Wrong assumption of the final step?

I apologize for the oversight. You are right, I have rechecked the build commands, and starting from version 16.11.1, an additional TARGETARCH build-arg is required. [ref this]
Please update your build command to include this argument, like so:
docker build . \
   -t gitlab-ce:16.11.1-ce.0 \
   --build-arg RELEASE_PACKAGE=gitlab-ce \
   --build-arg RELEASE_VERSION=16.11.1-ce.0 \
   --build-arg TARGETARCH=arm64
# Build GitLab EE image
docker build . \
   -t gitlab-ee:16.11.1-ce.0 \
   --build-arg RELEASE_PACKAGE=gitlab-ee \
   --build-arg RELEASE_VERSION=16.11.1-ce.0 \
   --build-arg TARGETARCH=arm64

For versions prior to 16.11.1, this parameter is not required.

I apologize for the ongoing issues you're experiencing. I've been quite busy, which has slowed down my response time. However, I plan to look into this further later this week. I will try to reproduce the problem in my testing environment and work on finding a solution.
Thank you for your patience.

No problem, I appreciate your care

Looking at chatGPT and then the 16.11.1 repo, I presume the problem comes from the dockerfile

Hopefully you have figured out that you are mixing CE and EE editions in your build args by now :)

authors: F041 descensus zengxs


text:
Debug Timed out while waiting for WAL record problem

It seems that our recent CI failures are caused by TIMEOUT that we use when waiting for walreceiver to catch up to the requested LSN.
https://github.com/zenithdb/zenith/blob/main/pageserver/src/repository/rocksdb.rs#L32
I suppose we observe it more often with recent changes simply because we've added more records to handle.
And now it depends on CircleCI performance fluctuations.
@knizhnik , @hlinnaka ,
Let's agree to increase this timeout or remove it at all  - at the very worst CI will timeout the job.
BTW,  does this wait_lsn() code really belong to rocksdb module? Or we should refactor it and move it somewhere?

Meanwhile, I fixed one more bug that could lead to strange failures if pageserver failed to return a page.
See https://github.com/zenithdb/postgres/commit/f0d0d15800c4eccd2b58d1d33b3e7441d2c861b2

Commit https://github.com/zenithdb/postgres/commit/6b6ad3d15cd6dd0b1a64ebe4a9bbd050a38e6828 made the compute node use the page server also for shared catalogs. I wonder if that reintroduced the chicken-and-egg problem explained in the comment that it also removed? I don't think we have any other mechanism in place to prevent it from happening.

Anastacia did implemented it in a following way:
https://github.com/zenithdb/postgres/blob/f0d0d15800c4eccd2b58d1d33b3e7441d2c861b2/contrib/zenith/pagestore_smgr.c#L378
https://github.com/zenithdb/zenith/blob/d95e1da7425674bec41348066a5950cfc761f043/pageserver/src/repository/rocksdb.rs#L534
There were also few previous attempts, but that seemed like a most compact. At the time that was written we saw some test failures and didn't enabled it fully before writing proper tests.

Let's agree to increase this timeout or remove it at all - at the very worst CI will timeout the job.

https://github.com/zenithdb/zenith/pull/172 is failing because of a timeout. And I can reproduce it on my laptop. I don't think it's just random fluctuation or a busy server, seems too consistent for that.

Let's agree to increase this timeout or remove it at all - at the very worst CI will timeout the job.

#172 is failing because of a timeout. And I can reproduce it on my laptop. I don't think it's just random fluctuation or a busy server, seems too consistent for that.

Or maybe things has just gotten very very slow recently? I bumped up the timeout on my laptop, and now it got past the create_index test where it has been failing previously:
parallel group (7 tests):  zenith-clog index_including index_including_gist create_view create_index_spgist zenith-vacuum-full create_index
     create_index                 ... ok       135874 ms
     create_index_spgist          ... ok       124330 ms
     create_view                  ... ok       119651 ms
     index_including              ... ok       118057 ms
     index_including_gist         ... ok       118617 ms
     zenith-vacuum-full           ... ok       133913 ms
     zenith-clog                  ... ok        17289 ms

authors: hlinnaka kelvich lubennikovaav

repo: zenithdb/zenith


text:
Add support for MDX

Inspiration:

https://www.joshwcomeau.com/react/wonderful-emails-with-mjml-and-mdx/#composing-emails-with-mdx
https://www.useplunk.com/markdown-to-email

Components needed:

https://github.com/zenorocha/react-email/issues/53
https://github.com/zenorocha/react-email/issues/52
https://github.com/zenorocha/react-email/issues/49
https://github.com/zenorocha/react-email/issues/48
https://github.com/zenorocha/react-email/issues/42
https://github.com/zenorocha/react-email/issues/13

Assigned myself for this one, going to work on it!

authors: vcapretz zenorocha

repo: zenorocha/react-email


text:
[RFC] More powerful plugin system

The proposal here is based on previous discussions with people on Discord. Moving to GitHub for better visibility.

Goal
Prisma’s schema offers a pleasant DX to model and program against a database. However, the pattern - DSL schema + TS code generation, has more potential than working with databases. Since ZenStack has already replicated the entire Prisma schema language with many extensions, we can try to achieve more above that.
Web development has been gradually shifting from hosting everything in-house to leveraging external services. That means databases, as important as they still are, only represent a (shrinking) part of the entire application’s model. Databases often store “opaque references” to models of foreign systems, and developers have to deal with disparate APIs and orchestrate them with database operations.
Hopefully, we can make the schema a gateway toward unifying and simplifying the DX:

Unified CRUD API style with natural joining and nesting
Consistently strongly-typed everywhere
Unified access control

Use Cases
1. Auth
When using auth services like clerk.dev, the main user repository is on the auth provider’s side. If you don’t choose to synchronize it to your own database, you can reference it as a foreign model:
plugin clerk {
    provider = 'zenstack-plugin-clerk'
    secretKey = env('CLERK_SECRET_KEY')
}

// ClerkUser model is imported from the "clerk" plugin and extended with a one-to-one "user" relationship
// Syntax here is subject to discussion
model ClerkUser imports clerk::User {

    // Imported models can only declare relation fields

    // a "virtual" relation to the `User` model
    // `onDelete` marks it to be deleted when `User` is deleted
    user User? @relation(onDelete: Cascade)

    @@allow('create', false)
    @@allow('all', user != null && auth() == user)
}

model User {
    id String @id

    // a one-to-one relationship with the `ClerkUser` foreign model,
    // internally mapped to a field storing clerk's user id
    clerkUser ClerkUser

    @@allow('create', true)
    @@allow('all', auth() == this)
}

model Post {
    id String @id
    author User @relation(...)
    authorId String

    @@allow('read', true)
    @@allow('all', auth() == author)
}

And the enhanced PrismaClient allows you to do things like:
// user will be typed as `User & { clerkUser: ClerkUser }`
// type `ClerkUser` is provided by the `@ext/clerk` plugin
const user = await prisma.user.findMany({
    where: { clerkUser: { email } },
    include: { clerkUser: true }
});

// update user attribute on clerk side
await prisma.user.update({
    where: { id },
    data: {
        clerkUser: { update: { attributes: { level: newLevel } } }
    }
});

// fetch posts with user email
await prisma.post.findMany({
    where: { authorId: userId },
    include: { clerkUser: { select: { email: true } } }
});

2. Blob Data
Using blob services like S3 to store files and save a reference in database table is a very common pattern.
plugin blob {
    provider = 'zenstack-plugin-s3'
    region = env('S3-REGION')
    bucket = env('S3-BUCKET')
    ...
}

model UserImageBlob imports blob::Blob {
    user User? @relation(onDelete: Cascade)

    @@allow('read', true)
    @@allow('all', user != null && auth() == user)
}

model User {
    id String @id
    profileImage UserImageBlob?
}

await prisma.user.update({
    where: { id },
    data: { profileImage: { update: { data: buffer } } }
});

const user = await prisma.user.findUnique({
    where: { id }, include: { profileImage: true }
});

const imageData = await readStream(user.profileImage.data);

3. Payment
Interfacing with payment systems like Stripe:
plugin stripe {
    provider = 'zenstack-plugin-stripe'
    apiKey = env('STRIPE-API-KEY')
}

model Subscription imports stripe::Subscription {
    team Team? @relation(onDelete: Cascade)

    @@allow('read', team.members?[user == auth()])
    @@allow('all', team.members?[user == auth() && role == 'ADMIN'])
}

model Team {
    id String @id
    members TeamMember[]
    subscription Subscription?
}

// pause the team's current subscription
await prisma.team.update({
    where: { id },
    data: { subscription: { update: { status: 'paused' } } }
});

Potential Approach

Plugins can contribute “virtual” models.
Plugins can provide CRUD handlers for the virtual models.
CRUD handlers mainly interface with 3rd party APIs, work synchronously, and have built-in retries, but don’t guarantee transactional atomicity and consistency.
[MAYBE] Plugins can contribute real models so that it creates database tables to their own data.

Open Questions

Is it appropriate to use CRUD to model all interactions with 3rd-party systems? Or is it necessary for plugins to contribute extension methods as well?
Calling remote APIs inside DB transactions can result in negative impacts due to long-running transactions. Maybe there should be an asynchonous “fire-and-forget” mode for mutation?
Related to the previous one: what should a transaction actually mean if it mixes database operations and foreign service updates? Should db operations actually be completed and then proceed with service updates?

Hi @ymc9, and thank you for this RFC. If I understand correctly, these plugins (clerk, blob, stripe...) would be built-in to Zenstack (non-customizable)? What the plugin::Class refers to? Initially, I was thinking of a more extensible system where we can write the desired logic, with the plugin providing access to model fields and abstracting other fields if needed (abstract models). It would be a kind of wrapper for Prisma's client-extensions AND Zenstack's abstract models... In my use case, here's what I would have liked to be able to do:
// Google Cloud Storage
plugin GCS {
    // local_path/gcs.ts where I define custom methods (like the upload method and custom getter)
    provider = "./extensions/gcs"
    abstractModels = [File]
}

abstract model File {
    id          String   @id @default(cuid())
    filename    String
    originalFilename    String
    bucket      String
    path        String
}

model User {
    id              String   @id @default(cuid())
    profileImage  GCS
    ...
}

model Product {
    id          String   @id @default(cuid())
    image       GCS
    ...
}

await prisma.user.update({  // --> not sure about that...
    where: { id },
    data: { profileImage: { file, bucket, path } } }
});

const user = await prisma.user.findUnique({
    where: { id }, include: { profileImage: true }
});

const imageUrl = await user.profileImage;

In any case, I find the plugin system very useful, and the proposed syntax very clear.

Hi @Azzerty23 , thanks for the comment and example. My apologies for not being clear in the initial draft.
The plugins are supposed to be implemented outside of ZenStack, and hopefully, many of them by the community. You can think of the "provider" of the plugin to be all independent and standalone NPM packages. In fact, most of today's plugins, like trpc, tanstack-query, etc., don't depend on any inner workings of ZenStack's core and only obey the plugin contract.
If we were to go in this direction, ZenStack's core would define a richer contact for the plugins, like how to contribute models (as shown in your example with the File model) and behavior (create/update an object on GCS).
I haven't thought much about if this should be implemented based on Prisma's client extensions. It's definitely worth a try, just not sure if we'll soon hit some limit there.

Thanks for the pointer @bvkimball ! I didn't know Supabase has a set of Postgres FDW. They can be very good references. Yes, indeed the idea is quite close to FDW, just work at a higher level.
The foreign models won't be mapped to the database so shouldn't affect migration. The only trace they'll leave on the database is when you create a relation from a real model to a foreign model, on the real model side there should be a "virtual" foreign key that's persisted into the db.

Very interesting. I just wonder if defining the plugins on the schema itself would later become a limitation in terms of adding custom logic to the plugin functions / helpers.

Very interesting. I just wonder if defining the plugins on the schema itself would later become a limitation in terms of adding custom logic to the plugin functions / helpers.

Hi @pedrosimao , the plugins are just declared in the schema, and their implementation will be made in TS/JS.

One question I do have:
Let’s say I plan to use Lemonsqueezy as a payments/billing service instead of Stripe, and the Zenstack library doesn’t have a first-party plugin for that, but only for Stripe.
How easy would it be to create our own custom plugins to wrap any external API we wish?

One question I do have:
Let’s say I plan to use Lemonsqueezy as a payments/billing service instead of Stripe, and the Zenstack library doesn’t have a first-party plugin for that, but only for Stripe.
How easy would it be to create our own custom plugins to wrap any external API we wish?

Hi @andrictham , the idea is to make API integration part of the plugin mechanism, so that developers can introduce new integrations without changing the core. The detailed design hasn't been made yet.

repo: zenstackhq/zenstack


text:
zephyr: update include paths to use <zephyr/...>

Zephyr has prefixed all of its includes with <zephyr/...>. While the old
mode can still be used (CONFIG_LEGACY_INCLUDE_PATH) and is still enabled
by default, it's better to be prepared for its removal in the future.

cc: @sylvioalves @stephanosio


text:
Release Notes v3.0.0 sign off - Devicetree

Looking for sign off of the v3.0.0 release notes on the devicetree.

https://github.com/zephyrproject-rtos/zephyr/pull/42989 contains the rest of the API changes that are worth mentioning in my opinion. Then I'm ready to sign-off. I think it's probably no longer worthwhile to track bindings changes.

authors: dkalowsk mbolivar-nordic

repo: zephyrproject-rtos/zephyr