z.string().url() seems to accept any string

Hello, I think I may have found a bug with URL validation.
Indeed, I am trying to validate an object which has a property “ticketLink" that should be an URL (z.string().url())
This is my schema :

const schema = z.object({
    projectId: z.string().uuid(),
    title: z.string().min(5).max(100),
    description: z.string().max(255).optional(),
    punchTypeId: z.string().uuid(),
    hours: z.number().min(0.25).max(24),
    ticketLink: z.string().url(),
    billable: z.boolean().optional(),
    date: z.date(),
});

However, no matter what I am setting as a value for the ticketLink property, the schema does not return an error for this property, even if the value is not a valid URL.
For instance, validating this object :
const formState = {"date": 2023-03-23T20:00:05.466Z, "projectId": "28dfcf92-5b36-4976-1d48-08db1f3ca426", "ticketLink": "abc"}
schema.safeParse(formState)

doesn't raise an error for the ticketLink field, but "abc" should not be accepted as an URL.
We're using "zod": "3.21.4"

This is working fine for me, I'm getting the Invalid url message in the errors list.
import { z } from 'zod';

const schema = z.object({
  projectId: z.string().uuid(),
  title: z.string().min(5).max(100),
  description: z.string().max(255).optional(),
  punchTypeId: z.string().uuid(),
  hours: z.number().min(0.25).max(24),
  ticketLink: z.string().url(),
  billable: z.boolean().optional(),
  date: z.date(),
});

const formState = {
  date: '2023-03-23T20:00:05.466Z',
  projectId: '28dfcf92-5b36-4976-1d48-08db1f3ca426',
  ticketLink: 'abc',
};

const result = schema.safeParse(formState);
if (!result.success) console.log(result.error.issues);

Everything is working as expected for me. Please send a reproducible example if you are still having issues.
const schema = z.object( {
    ticketLink: z.string().url(),
} )

const formState = {
    ticketLink: 'abc',
}
const result = schema.safeParse( formState )
!result.success && console.log( result.error.issues )
// [
//     {
//         validation: 'url',
//         code: 'invalid_string',
//         message: 'Invalid url',
//         path: [ 'ticketLink' ]
//     }
// ]

I re-verified my code and cannot find why it still seems to skip the validation of this field.
Here's the real code snippet used in my app where I added some console.log for debugging. This function is a recoil selector in a react native app.
export const punchCreationFormValidationSelector = selector({
    key: "punchCreationFormValidationSelector",
    get: ({ get }) => {
        const formState = get(punchCreationFormStateAtom);

        const schema = z.object({
            projectId: z.string({required_error: "Ce champ est requis"}).uuid("Identifiant du projet invalide"),
            title: z.string({required_error: "Ce champ est requis"}).trim().min(5, "Le titre du punch doit avoir au moins 5 caractères").max(100, "Le titre du punch doit être inférieur à 100 caractères"),
            description: z.string().max(255, "La description du punch doit être inférieure à 255 caractères").optional(),
            punchTypeId: z.string({required_error: "Ce champ est requis"}).uuid("Identifiant du type de punch invalide"),
            hours: z.coerce.number({required_error: "Ce champ est requis", invalid_type_error: "Ce champ est requis"}).min(0.25, "Le nombre d'heures doit être supérieur à 0.25").max(24, "Le nombre d'heures doit être inférieur à 24"),
            ticketLink: z.string().url(),
            billable: z.boolean(),
            date: z.date({required_error: "Ce champ est requis"}),
        })

        console.log("Form state for validation", formState)
        const result = schema.safeParse(formState);
        console.log("result.success", result.success);

        if (!result.success) {
            const errors = result.error.flatten();
            console.log(errors);
            return {
                success: false,
                fieldErrors: errors.fieldErrors,
                data: undefined,
            }
        } else {
            return {
                success: true,
                fieldErrors: undefined,
                data: result.data,
            }
        }
    },
});

As we can see in the console output, the ticketLink field is defined with an invalid value in the formState object. Neverteless, result.success is true and there is no error for this field.

However, what's weird is that I tested essentially the same code in a standalone js file with the same version of Zod (outside the React app) and it works properly.
zodtest.mjs
import { z } from "zod";

const schema = z.object({
    projectId: z.string({required_error: "Ce champ est requis"}).uuid("Identifiant du projet invalide"),
    title: z.string({required_error: "Ce champ est requis"}).trim().min(5, "Le titre du punch doit avoir au moins 5 caractères").max(100, "Le titre du punch doit être inférieur à 100 caractères"),
    description: z.string().max(255, "La description du punch doit être inférieure à 255 caractères").optional(),
    punchTypeId: z.string({required_error: "Ce champ est requis"}).uuid("Identifiant du type de punch invalide"),
    hours: z.coerce.number({required_error: "Ce champ est requis", invalid_type_error: "Ce champ est requis"}).min(0.25, "Le nombre d'heures doit être supérieur à 0.25").max(24, "Le nombre d'heures doit être inférieur à 24"),
    ticketLink: z.string().url(),
    billable: z.boolean(),
    date: z.date({required_error: "Ce champ est requis"}),
});

const data = {
    "billable": true,
    "date": new Date("2023-03-20"),
    "hours": "1",
    "projectId": "28dfcf92-5b36-4976-1d48-08db1f3ca426",
    "punchTypeId": "e1a28cff-b39e-4d5f-f0d6-08db2c16a4af",
    "ticketLink": "notanurl",
    "title": "Punch title"
}

console.log(data);
const result = schema.safeParse(data);
console.log(result.success);
console.log(result.error.flatten().fieldErrors);

So, I don't know if the issue is related to Zod or if it relates to recoil, but it's strange since all other fields are validated properly in both scenarios.

Another interesting thing I found is that if I add other validation rules to ticketLink  e.g.
ticketLink: z.string().min(2).url() the min(2) rule is enforced properly.
For instance ticketLink: 'ab' will not pass, but  ticketLink: 'abc' does... which means that the formState.ticketLink field is indeed verified by zod, but the url() rule is not enforced.

@obrassard this is definitely a React Native new URL bug:
https://github.com/colinhacks/zod/issues/2256#issuecomment-1493780042
I couldn't find an upstream tracker issue - maybe that's something you could hunt down?:
https://github.com/facebook/react-native/issues/

Is there any update on this matter ? Or could you provide a specific way to handle this case on native with zod ? Thanks in advance.

Still facing this issue.

+1 can confirm it does not work in react native

+1 can confirm it does not work in react native also

I have the same problem in react native

I have the same issue in Vue 3

Are any corrections expected, or is it better to use some custom validation?

Using: "zod": "^3.22.4"
I can reproduce a similar issue in SvelteKit where the only thing required to return valid is that the string begins with a letter followed by a colon x:.
Returns Valid:
http:example.com
http:.......///broken.com
http:
a:example.com
b:
C:
WWW:WWW.COM
e:911
call:411
Returns Invalid:
anything that does not start with a letter followed by a colon
Have reverted to using regex for urls for now.

Additional hostname validation solves most of edge cases but it prevents from using localhost and custom aliases.

Till then
z.object({
  meetingLink: z
    .string()
    .refine((value) => /^(https?):\/\//.test(value), {
      message: 'Please enter a valid HTTP or HTTPS URL',
    }),
});

I am seeing this issue in Vue3, as well.
This URL is valid:
http://localenv.website.com/events/create
This URL (note the leading D) is not valid, but Zod passes validation:
Dhttp://localenv.website.com/events/create
Version:
"node_modules/zod": {
            "version": "3.22.4",
            "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",

I am using this through @vee-validate/zod and this is the validation rule:
z.optional(z.string().url('Must be a valid URL'))

Till then
z.object({
  meetingLink: z
    .string()
    .refine((value) => /^(https?):\/\//i.test(value), {
      message: 'Please enter a valid URL',
    }),
});

Almost perfect... when I input "https://", it accepts :(

This worked for me:
`const urlRegex = /^(?:\w+:)?//([^\s.]+.\S{2}|localhost[:?\d])\S$/;
const schema = z.object({
website: z.string().refine((value) => urlRegex.test(value), {
message: 'Invalid URL format',
}),
});`

Hiya, also having the same issue. :(

I'm having the same issue with react 18.2.0 (no react native) & zod 3.22.2

Till then
const schema = z.object({
  meetingLink: z
    .string()
    .refine((value) => /^(https?):\/\/(?=.*\.[a-z]{2,})[^\s$.?#].[^\s]*$/i.test(value), {
      message: 'Please enter a valid URL',
    }),
});

this works for me

Shouldn't the bug-unconfirmed label be removed if at least a few people confirmed the bug?


Does this project support Vue2?

Sure, it supports any framework

@egoist what about this usage https://github.com/egoist/vue-ga#vue-router ? or do I have to use the non vue-router way

It depends on if you're using vue-router

The only API we use from vue-router is router.afterEach


Artifact name goes missing for any type other than OPENAPI

Description
If we create artifacts of type AVRO and OPENAPI using same json input file, name gets lost for type AVRO.
It can be later provided/modified using set-metadata. Is this expected?
Steps to reproduce

Create two different artifacts of type OPENAPI and AVRO using the same input file (which must contain value for info.title.
rhoas artifact list should show both the created artifacts but name will be available for only one of them.

@rkpattnaik780 avro should have different format/content so we should not be using the same file.
If we use OpenAPI file that will be openapi - and it should be autodetected. If we use Avro it should be the same.

@rkpattnaik780 avro should have different format/content so we should not be using the same file.
If we use OpenAPI file that will be openapi - and it should be autodetected. If we use Avro it should be the same.

Thanks for the clarification. Closing this issue.


⚠ ClamAV has degraded performance

In 59bfe91, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 219 ms

Resolved: ClamAV performance has improved in abfcd45.


⚠ Bofrost.be has degraded performance

In 2ba6992, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1068 ms

Resolved: Bofrost.be performance has improved in ad01fd0.


Finish authentication

TODO list:

[x] Redirection from /users/login using to query parameter
[x] Cookie-based authentication memory with User-Agent safety and expiration
[ ] 2 factor authentication

[ ] TOTP
[ ] Magic mail link

Introduced policies

Usernames must be 3 characters minimum
Usernames can contain letters, numbers, underscores and dot
On devices without a token, password and 2FA are needed
After 30 days without activity on a token, user will need to reauthenticate without needed 2FA
After 90 days, token will be invalid

The introduced system does not feel right, needs a serious design or some 3rd party help


Error message on hyper start

[x] I am on the latest Hyper.app version
[x] I have searched the issues of this repo and believe that this is not a duplicate

OS version and name: Windows 10 Pro Version 1709
Hyper.app version: 1.4.8
Link of a Gist with the contents of your .hyper.js: https://gist.github.com/7twin/3e6dca97b0785e62e0126b7585773518
Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere): N/A
The issue is reproducible in vanilla Hyper.app: No

Issue
Each time hyper starts on my computer I get following error message:

I tried executing that command on my own in cmd and get following things back in the cmd:
Plugin hyper-material-box (1.1.10) loaded.
Plugin hyperpower (0.2.2) loaded.
Plugin hyper-dark-scrollbar (1.1.0) loaded.
Plugin hyperborder (0.11.1) loaded.
plugins have changed / not init, scheduling plugins installation
running in prod mode
electron will open file://C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\index.html
Checking for notification messages

after which hyper pops up and shows the error message:
[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: Unable to start terminal process: CreateProcess failed
    at new WindowsPtyAgent (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\node_modules\node-pty\lib\windowsPtyAgent.js:25:24)
    at new WindowsTerminal (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\node_modules\node-pty\lib\windowsTerminal.js:45:24)
    at spawn (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\node_modules\node-pty\lib\index.js:26:12)
    at Session (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\session.js:45:18)
    at initSession (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\ui\window.js:90:23)
    at Server.Window.rpc.on.options (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\ui\window.js:93:7)
    at emitOne (events.js:96:13)
    at Server.emit (events.js:191:7)
    at Server.ipcListener (C:\Users\X\AppData\Local\hyper\app-1.4.8\resources\app.asar\rpc.js:34:11)
    at emitTwo (events.js:106:13)

[OK]

This error does not happen on my laptop though, what could be the issue?

This seems to happen even if I completely reinstall hyper and only change the shell to "C:\Windows\System32\bash.exe".

@7twin I realize it's been some time since you posted this, but have you tried changing the shell to wsl.exe?

@opes I have since wiped my computer and re-installed everything, it's working again, might have been an issue with node not getting cleanly uninstalled - and yes I did change it to wsl.exe


[uWSGI ~ websocket] SystemError: you can call uwsgi api function only from the main callable

Related to: https://github.com/unbit/uwsgi/issues/980
After merging master branch to our custom branch today, I got the error like below, related to uWSGI, gevent and websocket.
How could I solve this issue..?
[pid: 28|app: 0|req: 132/130] <IP_ADDRESS> () {62 vars in 1401 bytes} [Fri Sep  1 11:35:50 2023] POST /ds/context_log/ => generated 42 bytes in 10 msecs (HTTP/1.1 200) 3 headers in 85 bytes (3 switches on core 998)
[BUG] current_wsgi_req NOT FOUND !!!
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "/usr/local/lib/python3.9/site-packages/engineio/socket.py", line 223, in writer
    ws.close()
  File "/usr/local/lib/python3.9/site-packages/engineio/async_drivers/gevent_uwsgi.py", line 70, in close
    uwsgi.disconnect()
SystemError: you can call uwsgi api function only from the main callable
2023-09-01T11:35:50Z <Thread at 0x7f63a8909040: writer> failed with SystemError

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 831, in gevent._gevent_cgreenlet.Greenlet.join
  File "src/gevent/greenlet.py", line 857, in gevent._gevent_cgreenlet.Greenlet.join
  File "src/gevent/greenlet.py", line 846, in gevent._gevent_cgreenlet.Greenlet.join
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
  File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "/usr/local/lib/python3.9/site-packages/engineio/socket.py", line 223, in writer
    ws.close()
  File "/usr/local/lib/python3.9/site-packages/engineio/async_drivers/gevent_uwsgi.py", line 70, in close
    uwsgi.disconnect()
SystemError: you can call uwsgi api function only from the main callable
[pid: 28|app: 0|req: 133/131] <IP_ADDRESS> () {56 vars in 1260 bytes} [Fri Sep  1 11:35:48 2023] GET /-/socket.io/?EIO=4&transport=websocket => generated 2537 bytes in 1905 msecs (HTTP/1.1 101) 4 headers in 197 bytes (2 switches on core 995)

I use runservice script same as in the repo.
"prod_web")
    # gunicorn doesn't work with websocket
    # COMMAND="gunicorn -c querybook/server/gunicorn_conf.py app.server:flask_app"
    COMMAND="uwsgi --ini uwsgi.ini"
    ;;

[uwsgi]
http = :$(PORT)
gevent = 1000
wsgi-file = /opt/querybook/querybook/server/runweb.py
callable = flask_app
master = 1
http-websockets = 1

this issue was solved, thanks to the new release version (v4.7.1) of python-engineio.


Get-DbaDbBackupHistory and AgCheck Switch

I'm wondering why is AgCheck switch not NoAgCheck instead in the Get-DbaDbBackupHistory cmdlet.
Get-DbaDbBackupHistory -SqlInstance 'listener_name' -AgCheck:$false | select sqlinstance -Unique does availability group checks and
Get-DbaDbBackupHistory -SqlInstance 'listener_name' -AgCheck:$true | select sqlinstance -Unique  does not... which is very confusing

Lets link #6799 ([Get-DbaAgBackupHistory] - New command for the availability group functionality of Get-DbaDbBackupHistory) here and maybe close this if we have decided on the pull request.

The new command does not solve this issue.

As -AgCheck is deprecated I will close this.


Fix the permission of team's Actions unit issue

close #24449
The unit of Actions should be contorlled not only by repository.DISABLED_REPO_UNITS but also by actions.ENABLED
in the app.ini.
Previously, the permission of the team's Actions unit was not  controlled by actions.Enabled. So, even if the user sets actions.Enabled to false, he can still select the permission of the Actions unit for the team.
This PR makes the permissions of the team's Actions unit also controlled by actions.Enabled. Just appendTypeActions into DisabledRepoUnits slice when initializing if actions.Enabled is false.
Changes:
If Actions is set disbaled in app.ini, like below:
[actions]
ENABLED = false

If user try to create/edit a team, will prompt user that Actions is disbaled.

actions is not displayed in the sidebar on the team details page

The packages unit has the same logic, maybe we could follow what it does?
https://github.com/go-gitea/gitea/blob/58caf422e67c78f87327bc9b00f89083a2432940/modules/setting/repository.go#L307-L309
Actually, I don't like the hard code way of package, but I think we should keep be consistent, or it will be confusing.

The packages unit has the same logic, maybe we could follow what it does?
https://github.com/go-gitea/gitea/blob/58caf422e67c78f87327bc9b00f89083a2432940/modules/setting/repository.go#L307-L309
Actually, I don't like the hard code way of package, but I think we should keep be consistent, or it will be confusing.

done and tested


Documentation for configuring GitHub pipeline rules/settings

While looking at adding builds on forks, @plasticine and I were wondering "Do we have to update the docs if we add a new setting to the "GitHub" section in the pipeline settings. It doesn't look like there's any docs on it.
There's probably a good case for some docs, only because there's some patterns we recommend for common things that are a bit quirky with the way things currently work.
For example, if you only want to run a pipeline on pull requests, you have to set the "Brand filter pattern" on the pipeline to some branch name that will never occur (e.g. "this-branch-will-never-occur"). Pull request builds ignore the branch filter patterns, and all pushes to other branches (e.g. master/stable/beta/etc) will be ignored.
Perhaps it's worth adding a section that explains how to set up various common scenarios/patterns using our settings page as it is today? And down the track we can revisit the way the settings work, and integrate some of the use cases that docs had to help people with.

@toolmantim @plasticine @harrietgrace do you know of any more patterns? Or is the PR only thing enough for now.


Spring Cloud Alibaba Auto-Test Design | Spring Cloud Alibaba自动化测试方案设计

背景
目前我们需要为项目设计一套集成测试方案,为解决版本发布造成用户的issue复现困难，基于testcontainer + Github Action进行测试, 以便于覆盖spring-cloud-alibaba每次接入新组件特性时候的用例, 提升项目稳定性
设计方案
在社区年初的尝试当中,通过先在需要进行集成测试的类上标记 @HasDockerAndItEnabled 注解的方式 , 在Github Action当中 执行mvn clean -Dit.enabled=true test, 运行所有集成测试
但是这种方式在集成测试当中，无法对测试的配置初始化, bean的预加载进行准备。并且针对  nacos和 rocketmq 的测试，需要保证在测试运行之前，保持相关testcontainer的测试镜像稳定运行并测试, 所以目前对于Github Action的落地有两种方案可供讨论:

方案一 junit5 callback + docker-compose
目前的PR 是基于 org.junit.jupiter.api的回调函数 在用户运行测试之前，从上下文里面获取docker-compose文件的信息。然后在callback函数内完成容器运行. 之后执行测试

方案二  maven Profile + dockerfile-maven-plugin构建出Docker镜像和完成推送  + docker Load加载打包 spring-cloud-alibaba-tests  的构建产物 test-jar包:
通过参考shardingsphere的CI方式, 构建SCA的CI环境
shardingsphere构建步骤

部署镜像
Docker持续集成

目前实现的方式分为两步骤:

登陆dockerhub， 将nacos, rocketmq, sentinel ,seata等镜像 放在同一个dockerhub账号下,执行集成测试时，拉取相关镜像(默认是在alibaba的容器镜像服务当中，所以在docker.yml中会在alibaba仓库中搜索)
将待测试的类打包成一个jar，通过  docker load执行归档文件

目前方案一目前处于poc阶段，方案二处于测试阶段

设计思路以及折中

Github Action

方案一:

部署镜像并进行docker集成测试

name: Integration Testing
on:
  push:
    branches:
      - 2021.x
  pull_request:
    branches:
      - 2021.x
jobs:
  deploy-docker-image:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

  integration-testing:
    name: Integration Testing
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
      - name: Dependies Cache
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Compile & Checkstyle
        run: mvn clean compile
      - name: Testing
        run: mvn clean test
#        run: mvn clean -Dit.enabled=true test

- 方案二:
   - 部署镜像

name: Deploy Docker Image

on:
  push:
    branches:
      - 2021.x
      paths:
        - '**/pom.xml'
        - '**/src/main/**'
      pull_request:
        branches:
          - 2021.x
        paths:
          - '**/pom.xml'
          - '**/src/main/**'
  release:
    types:
      - published
  workflow_dispatch:

env:
  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -DskipTests

jobs:
  deploy-docker-iamge:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v2

      # setup docker
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      # build target with maven
      - name: Cache Maven Repos
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Set up JDK 8
        uses: actions/setup-java@v1
        with:
          java-version: 8

      - name: set environment
        run: export MAVEN_OPTS=' -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true $MAVEN_OPTS'
      - name: Build Project
        run: |
          ./mvnw -B -Prelease,docker -DskipTests clean install
          docker image ls --format "{{.ID}} {{.Repository}} {{.Tag}}" | grep alibaba| sed  's/apache\//${{ secrets.DOCKERHUB_USERNAME }}\//' |tr A-Z a-z |awk '{system("docker tag "$1" "$2":latest;docker tag "$1" "$2":"$3";")}'
      - name: Push Docker Image
        run: |
          echo Docker Images:
          echo `docker image ls|grep -i ${{ secrets.DOCKERHUB_USERNAME }}|awk '{print $1":"$2}'`
          docker image ls|grep -i ${{ secrets.DOCKERHUB_USERNAME }}|awk '{print $1":"$2}'|xargs -i docker push {}

   - docker集成测试

           name: Integration Testing
on:
  push:
    branches:
      - 2021.x
    paths:
      - '.github/workflows/integration-test.yml'
      - '**/pom.xml'
      - '**/src/main/**'
  pull_request:
    branches:
      - 2021.x
    paths:
      - '.github/workflows/integration-test.yml'
      - '**/pom.xml'
      - '**/src/main/**'
jobs:
  build-it-image:
    name: build-it-image
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2
      - name: Maven resolve ranges
        run: ./mvnw versions:resolve-ranges -ntp -Dincludes='org.springframework:*,org.springframework.boot:*'
      - name: Cache Maven Repos
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: spring-cloud-alibaba-it-cache-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          distribution: 'temurin'
          java-version: 8
      - name: Build IT image
        run: ./mvnw -B clean install -am -pl spring-cloud-alibaba-tests/spring-cloud-alibaba-testcontainers -Pit.env.docker -DskipTests -Dspotless.apply.skip=true
      - name: Save IT image
        run: docker save -o /tmp/spring-cloud-alibaba-testcontainers.tar apache/spring-cloud-alibaba-testcontainers:latest
      - name: Upload IT image
        uses: actions/upload-artifact@v3
        with:
          name: it-image
          path: /tmp/spring-cloud-alibaba-testcontainers.tar
          retention-days: 1

  integration-testing:
    name: Integration Testing
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
      - name: Dependies Cache
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Compile & Checkstyle
        run: mvn clean compile
      - name: Testing
        run: mvn clean test
#        run: mvn clean -Dit.enabled=true test
      - name: Download IT image
        uses: actions/download-artifact@v3
        with:
          name: it-image
          path: /tmp/
      - name: Load IT image
        run: docker load -i /tmp/spring-cloud-alibaba-testcontainers.tar
      - name: "run install by skip tests"
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: mvn -q -B -ntp clean install -DskipTests
      - name: run integration tests
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: ./build/run_integration_group.sh CLI

如何添加测试用例

方案一:  添加@SpringCloudAlibaba以及@TestExtend两个注解，在测试用例当中分为构建一个@BeforeEach标记的静态方法以及@BeforeAll标记的非静态方法, 如果测试线程的执行时间较长，可以修改@TestExtend里面的timeout属性

方案二:   当Github Action执行完 spring-cloud-alibaba-tests.tar测试jar打包，镜像构建推送等流程之后,基于脚本对于-Denv=docker的环境做测试(可以在PR中定位到  run: ./build/run_integration_group.sh CLI这一行) , 运行打包的集成测试方法

方案对比

拓展性
对于方案一而言： 由于没有将测试统一打包执行，所以每运行一个测试就要从github拉一次镜像
对于方案二而言： 镜像的构建和推送统一交给Github Action做管理。测试统一打包后执行 不需要每次进行镜像构建和推送
可维护性
对于方案一而言:  会随着测试的增加，延长每次用户提交PR时触发ci的时间，属于短线规划
对于方案二而言: 统一管理镜像的构建和推送 收敛测试范围，每次用户提交PR时触发ci时间可控, 可通过脚本拓展分组测试

如果有任何建议或者希望社区实现的自动化测试方案可以在这里讨论

Englist Version：
Background
At present, we need to design a set of integration testing solutions for the project. In order to solve the problem of user issue reproduction caused by version release, we will test based on testcontainer and Github Action, so as to cover the use cases of spring-cloud-alibaba every time when new component features are connected, to improve project stability.
Program Design
In the community's attempt at the beginning of the year, marking the @HasDockerAndItEnabled annotation on the class that need integration testing, executing mvn clean -Dit.enabled=true test in Github Action to run all integration tests.
However, in this way, in the integration test the configuration initialization of the test and the preloading of the bean cannot be prepared. And for the test of nacos and rocketmq, it is necessary to ensure that the test image of the relevant testcontainer is kept running and tested stably before the test is run. Therefore, there are currently two options for the implementation of Github Action:

Solution One: junit5 callback + docker-compose.
[Current PR](https://github.com/alibaba/spring-cloud-alibaba/pull/2694) is a callback function based on org.junit.jupiter.api.Get information from the docker-compose file from the context before the user runs the tests. Then running the container inside the callback function. At last executing the test.

Solution Two: Through maven Profile , using  dockerfile-maven-plugin to build a Docker image and complete the push and using docker Load to load and package spring-cloud-alibaba-tests ‘s build product spring-cloud-alibaba-tests.tar :
By referring to the CI method of shardingsphere, build the CI environment of SCA.
Shardingsphere build steps:

[Deploy mages](https://github.com/apache/shardingsphere/blob/master/.github/workflows/it.yml)
[Docker Continuous Integration](https://github.com/apache/shardingsphere/blob/master/.github/workflows/docker-per-commit.yaml)

[Current implementation](https://github.com/alibaba/spring-cloud-alibaba/pull/2524) is divided into two steps:

Log in to dockerhub, put nacos, rocketmq, sentinel, seata and other images under the same dockerhub account, when performing integration tests, pull the relevant images. (Default is in alibaba container image service, so it will be searched in the alibaba repository in docker.yml)
Package the class to be tested into a jar and execute the archive with docker load.

At present, the first solution is in the POC stage, and the second solution is in the testing stage.

Design Ideas and Compromises

Github Action

Solution One:

Deploy the image and run docker integration tests

name: Integration Testing
on:
  push:
    branches:
      - 2021.x
  pull_request:
    branches:
      - 2021.x
jobs:
  deploy-docker-image:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

  integration-testing:
    name: Integration Testing
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
      - name: Dependies Cache
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Compile & Checkstyle
        run: mvn clean compile
      - name: Testing
        run: mvn clean test
#        run: mvn clean -Dit.enabled=true test

Solution Two:

Deploy images

name: Deploy Docker Image

on:
  push:
    branches:
      - 2021.x
      paths:
        - '**/pom.xml'
        - '**/src/main/**'
      pull_request:
        branches:
          - 2021.x
        paths:
          - '**/pom.xml'
          - '**/src/main/**'
  release:
    types:
      - published
  workflow_dispatch:

env:
  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 -DskipTests

jobs:
  deploy-docker-iamge:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v2

      # setup docker
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1

      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      # build target with maven
      - name: Cache Maven Repos
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Set up JDK 8
        uses: actions/setup-java@v1
        with:
          java-version: 8

      - name: set environment
        run: export MAVEN_OPTS=' -Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true $MAVEN_OPTS'
      - name: Build Project
        run: |
          ./mvnw -B -Prelease,docker -DskipTests clean install
          docker image ls --format "{{.ID}} {{.Repository}} {{.Tag}}" | grep alibaba| sed  's/apache\//${{ secrets.DOCKERHUB_USERNAME }}\//' |tr A-Z a-z |awk '{system("docker tag "$1" "$2":latest;docker tag "$1" "$2":"$3";")}'
      - name: Push Docker Image
        run: |
          echo Docker Images:
          echo `docker image ls|grep -i ${{ secrets.DOCKERHUB_USERNAME }}|awk '{print $1":"$2}'`
          docker image ls|grep -i ${{ secrets.DOCKERHUB_USERNAME }}|awk '{print $1":"$2}'|xargs -i docker push {}

Docker integration test

name: Integration Testing
on:
  push:
    branches:
      - 2021.x
    paths:
      - '.github/workflows/integration-test.yml'
      - '**/pom.xml'
      - '**/src/main/**'
  pull_request:
    branches:
      - 2021.x
    paths:
      - '.github/workflows/integration-test.yml'
      - '**/pom.xml'
      - '**/src/main/**'
jobs:
  build-it-image:
    name: build-it-image
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2
      - name: Maven resolve ranges
        run: ./mvnw versions:resolve-ranges -ntp -Dincludes='org.springframework:*,org.springframework.boot:*'
      - name: Cache Maven Repos
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: spring-cloud-alibaba-it-cache-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          distribution: 'temurin'
          java-version: 8
      - name: Build IT image
        run: ./mvnw -B clean install -am -pl spring-cloud-alibaba-tests/spring-cloud-alibaba-testcontainers -Pit.env.docker -DskipTests -Dspotless.apply.skip=true
      - name: Save IT image
        run: docker save -o /tmp/spring-cloud-alibaba-testcontainers.tar apache/spring-cloud-alibaba-testcontainers:latest
      - name: Upload IT image
        uses: actions/upload-artifact@v3
        with:
          name: it-image
          path: /tmp/spring-cloud-alibaba-testcontainers.tar
          retention-days: 1

  integration-testing:
    name: Integration Testing
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 8
        uses: actions/setup-java@v2
        with:
          java-version: '8'
          distribution: 'adopt'
      - name: Dependies Cache
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Compile & Checkstyle
        run: mvn clean compile
      - name: Testing
        run: mvn clean test
#        run: mvn clean -Dit.enabled=true test
      - name: Download IT image
        uses: actions/download-artifact@v3
        with:
          name: it-image
          path: /tmp/
      - name: Load IT image
        run: docker load -i /tmp/spring-cloud-alibaba-testcontainers.tar
      - name: "run install by skip tests"
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: mvn -q -B -ntp clean install -DskipTests
      - name: run integration tests
        if: ${{ steps.check_changes.outputs.docs_only != 'true' }}
        run: ./build/run_integration_group.sh CLI

How to add test cases ?

Solution One: Add two annotations @SpringCloudAlibaba and @TestExtend. In the test case, it is divided into a static method marked with @BeforeEach and a non-static method marked with @BeforeAll. If the execution time of the test thread is long, you can modify the timeout property of @TestExtend .
Solution Two: When Github Action completes the spring-cloud-alibaba-tests.tar jar-packaging  test , image building and pushing, then test the -Denv=docker environment based on the script (It can be located in this line of PR run: ./build/run_integration_group.sh CLI ) , at last, run the integration test method of packaging.

Scheme comparison

Extensibility
For solution one: Because the tests are not packaged and executed uniformly, it must pull an image from github every time when you run a test.
For solution two: The image construction and push are  managed uniformly by Github Action. The test is executed after unified packaging, and there is no need to build and push the image every time.

Maintainability
For solution one: as the number of tests increasing, extending the time for triggering ci each time when user submit a PR.It is a short-term plan.
For solution two:Managing image construction and push uniformly and weaken the test scope.You can control the ci time triggered every time when user submit a PR.Group testing can be extended through scripts.


feat(vue-query-devtools): Use tanstackBuildConfig from @tanstack/config

This PR adds the unified Vite build config as described here: https://github.com/TanStack/config/blob/main/docs/build.md
The only package in the query repo using Vite build is vue-query-devtools, so this can be added as a non-breaking change. Migrating the other packages from tsup to Vite build would be breaking changes.

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

Comparison is base (e6cb6df) 41.73% compared to head (60ae3fd) 41.74%.
Report is 2 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6638      +/-   ##
==========================================
+ Coverage   41.73%   41.74%   +0.01%
==========================================
  Files         179      179
  Lines        7009     7011       +2
  Branches     1419     1419
==========================================
+ Hits         2925     2927       +2
  Misses       3713     3713
  Partials      371      371

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


Establish policy on screen grabs for GUI/viewer window images in docs

Do we have a policy on this? We probably should. As our documentation stands now, I am pretty sure we have a mix of snapshots of GUI windows from different systems (OSX, Windows and Linux) or from different versions of the same system such that there is very little consistency. In addition, we probably have a mix of full-window snapshots of viewer window and drag/select region snapshots
One policy proposal that might make sense...where no matter what system you are on you should

Always do full window grabs (e.g. no drag/select grabs)
For GUI grabs, go to Options->Appearance and select Fusion (because may that appears most similar across all platforms???)
For viewer grabs, do 500x500 (with various TBD annotations off)

For the most part I agree with always doing full window grabs, but there are a few windows that are particularly large and I don’t like doing full window grabs because of that. Examples of large windows I can think of off-hand are the main window, the host profiles, possibly the query window. There are probably a few others. For plot, operator and some of the other control windows, I agree we should do full window grabs.
I like the idea of using Fusion for window gui window grabs and 500x500 is probably good for most cases. Again, Again, I believe there may be case by case exceptions.

Another issue is how the platform where the images are grabbed effects image size in pixels. I think OSX's retina display can result in super high resolution images. Certainly, much higher than necessary for online, web-browsed documentation.
I was doing some tests with two 2500x500 images, one at 72 dpi and one at 300dpi. So, same pixel dimensions but dpi setting was different (the higher dpi image was about 5x larger in bytes but that is way less than the expected 16x probably due to compression). When I put both images in a web page and browsed with Safari, Chrome and Firefox, both images appeared the same size on the page. So, what I think web browser's do is always assume 72 dpi and then the image size on the screen just varies based on its pixel dimensions.
If we assume a typical display width of 1280 pixels and want our docs to use say half (or less) of that, that means we shouldn't have any images with width above 640. But, we have >170 images above that width...
[scratlantis:visit/src/doc] miller86% find gui_manual -name '*.png' -exec identify {} \; |\
 tr 'x' ' ' | cut -d' ' -f1-5 | sort -n -k 3 > foo.txt
.
.
.
gui_manual/MultipleDatabaseAndWindows/images/a_minus_a0.png PNG 1600 500 1600
gui_manual/MultipleDatabaseAndWindows/images/a_minus_b.png PNG 1600 500 1600
gui_manual/Operators/OperatorTypes/images/onion.png PNG 1600 800 1600
gui_manual/Plots/images/pointypes2.png PNG 1650 1275 1650
gui_manual/SavingPrinting/images/tiledbefore.png PNG 1774 1095 1774
gui_manual/MultipleDatabaseAndWindows/images/cyclecorrelation.png PNG 2044 271 2044
gui_manual/MultipleDatabaseAndWindows/images/timecorrelation.png PNG 2044 271 2044
gui_manual/Subsetting/images/lowfrac.png PNG 2469 500 2469
gui_manual/MultipleDatabaseAndWindows/images/a.png PNG 2500 500 2500
gui_manual/MultipleDatabaseAndWindows/images/a_minus_preva.png PNG 2500 500 2500
gui_manual/Plots/images/pointtypes.png PNG 2500 500 2500
gui_manual/Plots/images/glyph_types2.png PNG 3300 1806 3300

In addition, many of the png files are not optimized.
When Sphinx processes the docs, it simply copies the images wholesale to the output directory. But the images autoscale when displayed in the html pages.
So, size and lack of optimization makes for a lot of wasted space, slower load times, etc.

Figures 3.57-60 are blurry.
Figures 7.18-22 are blurry.
These are screen grabs of a large portion of the webpage, where the text is finer. I checked them against the current public docs, and turns out they're blurry in the public docs as well.


Remove Python 3.2 test in Travis CI

Travis CI tests fail in a Python 3.2 virtualenv - see https://travis-ci.org/eugenesia/Packt-Publishing-Free-Learning/jobs/298054217
The test fails as Python 3.2 doesn't support the Unicode literal u"myunicodestring" syntax. See failed Travis job log below. The u"myunicodestring" syntax only works on Python 2.7, and Python 3.3 and above.
  File "/home/travis/virtualenv/python3.2.6/lib/python3.2/site-packages/snowballstemmer/danish_stemmer.py", line 15
    Among(u"hed", -1, 1),
               ^
SyntaxError: invalid syntax

GitPython developers have commented that Python 3.2 is so old that it shouldn't be used for testing anyway: https://github.com/gitpython-developers/GitPython/issues/477#issuecomment-252986842
Hence we fix this by removing the requirement to test on Python 3.2. Tests on subsequent Python 3.x versions remain.

Good find, I was trying to debug it, but maybe it's better to remove testing on Python 3.2.
Why don't we just remove that line instead of adding 4 lines of comment?

Good job, merged!

Merged without squashing, let's remember about squashing in the future.


Some information missing for build-in GPU in Ryzen 7950X 3D Processor, note: no driver installed yet, just a basic one it seems.

<------- GRAPHICS CARD INFORMATION ------->
Graphics Card: Microsoft Basic Display Adapter
Graphics Card Model: Microsoft Basic Display Adapter
Graphics Card Publisher: (Standard display types)
Driver Version: 10.0.22621.1
Driver Date: 21.06.2006
Graphics Card Status: Offline
Graphics Card Hardware ID: PCI\VEN_1002&DEV_164E&SUBSYS_164E1002&REV_C9
DAC Type: Unknown
DirectX Driver: nvldumdx.dll
INF File: display.inf
INF File Graphics Card Section: MSBDA
Colors Offered: 0

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


UI papercuts

A few minor UI issues I came across testing the app

The icon and text should be centered together on the empty state buttons
All button labels should use title case
I'd maybe make the "take a shot" label more explicit, "shot" is a bit vague. How about "Take a Screenshot" or "New Scan"?

The action bar should have a divider line above
The buttons in the action bar should not be raised, i.e. have no background unless hovered/active
The "take a shot" button should probably have the .suggested-action class

The "Configure" menu item could be more explicit, e.g. "Manage Languages"

While we're at it, the Language list is quite ugly, and the scrollbar is in the wrong spot:

I'd remove the padding from the main box, putting it on the list instead, set selection-mode: none on it, make the download buttons the activatable widgets and used AdwClampScrollable instead of AdwClamp. In addition, .flat isn't really supposed to be used with scrolled views so it intersects the list nastily.

While we're at it, the Language list is quite ugly, and the scrollbar is in the wrong spot:  I'd remove the padding from the main box, putting it on the list instead, set selection-mode: none on it, make the download buttons the activatable widgets and used AdwClampScrollable instead of AdwClamp. In addition, .flat isn't really supposed to be used with scrolled views so it intersects the list nastily.

Your idea is a good one. But I have to mention this window will be totally redesigned in near future. I'll split installed and available languages, and add more options to configure.

@bertob Thank you! I hope most of the point were fixed in 1.1.0 release.

Nice, yeah the points from the original issue all look fixed to me!
I agree with @jannuary's suggestions about the language dialog, but maybe that should be a separate issue if it'll be redesigned soon?

Yep, since you think your issue is done, I'll move this one to its own issue and plan it for the next release.


Add styled-component and converted to navbar comp

I installed styled-components and didn't uninstall the tailwind because it can cause conflicts so I directly converted a navbar component to styled-components.
Also, we need to make a new file structure for styled-components like buttons, links, etc. And I am not sure how to write util classes with styled-components can we discuss on this?

For style we can open a file like nav-bar.elements.js or nav-bar-style.js.Also, we delete Tailwind as soon as the styled-components transformation is finished.

For style we can open a file like nav-bar.elements.js or nav-bar-style.js.Also, we delete Tailwind as soon as the styled-components transformation is finished.

we delete Tailwind as soon as the styled-components transformation is finished.

we delete Tailwind as soon as the styled-components transformation is finished.


implement a new API to let servers control client address verification

Fixes #3494.
This PR makes 2 changes:

It implements the new API suggested in #3494.
It disables address verification by default. This means that, unless configured otherwise, the QUIC handshake will take a single RTT. This is in line with providing safe defaults, as we implement the 3x amplification  protection.

@mholt, would be happy about your feedback on this PR!

This looks better!
So basically, if I understand right, I would implement RequireAddressValidation(net.Addr) bool to return true if the server is under load, correct? And I don't need to call any sort of defaultAcceptToken() function in addition?

So basically, if I understand right, I would implement RequireAddressValidation(net.Addr) bool to return true if the server is under load, correct? And I don't need to call any sort of defaultAcceptToken() function in addition?

Exactly! All the token validation logic is now handled under the hood (tunable using the MaxTokenAge and MaxRetryTokenAge). All you have to do is say if you want to perform address validation in the first place (at the cost of 1 additional RTT during the handshake).

@marten-seemann Excellent! I updated https://github.com/caddyserver/caddy/pull/4707 and it seems to be working (haven't tested the "highLoad" scenario but HTTP/3 works by default).


Add objectmeta override to ActionSpec

Change Overview
This PR adds handling to allow override objectMeta for kanister pods by specifying as args while creating actionsets.
Pull request type
Please check the type of change your PR introduces:

[ ] :construction: Work in Progress
[ ] :rainbow: Refactoring (no functional changes, no api changes)
[ ] :hamster: Trivial/Minor
[ ] :bug: Bugfix
[x] :sunflower: Feature
[ ] :world_map: Documentation
[ ] :robot: Test

Issues

#XXX

Test Plan

[x] :muscle: Manual

[ ] :zap: Unit test

[ ] :green_heart: E2E

After setting labels in args as:

      args:
        objectMetaOverride:
          labels:
            name: ankit
            id: 123

Verified in kanister-job pod launched that the labels were present:

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2021-02-26T13:34:34Z"
  generateName: kanister-job-
  labels:
    createdBy: kanister
    id: "123"
    name: ankit

Stale PR. Closing.


feature: kafka telegraf output options

What this PR does / why we need it:
feature: kafka telegraf output options

Does this PR need to be backport to the previous release branch?:

release/3.12
release/3.11
release/3.10
release/3.9

/cc @zexi

/lgtm


Add Dialogflow webhook example

Will merge on green, then generate the new index.html and push it.


deps: Relax dependency version specifiers

Same as https://github.com/15r10nk/pysource-minimize/issues/9:

Poetry has this bad default of adding dependencies to pyproject.toml with the ^ specifier (which by the way is not part of the PEP 508 standard), which depending on the specified version, can be super restrictive, and cause issues in the ecosystem due to resolution conflicts.
It can be seen as a good idea, because Semver promises to protect you from breaking changes, but in practice it does not, and the upper bounds contaminate every downstream projects, without any workaround possible.
A great article that explains the situation much better than I would: https://iscinumpy.dev/post/bound-version-constraints/.
I'd summarize it as: in the Python ecosystem, use upper bounds only if you know that the excluded versions will break your code.
Same thing happens for your development dependencies (higher chances of conflicts during resolution), although these one don't contaminate downstream projects, fortunately.
Similarly python = "^3.7" would contaminate every downstream project, forcing them to specify python-requires = ">=3.7,<4", but fortunately enough, most dependency/project managers just ignore this specific upper bound, to prevent exactly that. Poetry does not though.
I'd suggest using >= everywhere instead.

Again thank you for this issue. It is fixed in 0.4.3


Add Timestamps to Log Digest Emails

Feature as requested by @etcipnja

Coverage remained the same at 92.775% when pulling 5a3b303bdd3b325e54c47b8e72bba2703d07c91c on RickCarlino:cascade_qa into ca8b64564bea54e4bdad19c8c4080d405e70746c on FarmBot:staging.

Coverage remained the same at 92.775% when pulling 5a3b303bdd3b325e54c47b8e72bba2703d07c91c on RickCarlino:cascade_qa into ca8b64564bea54e4bdad19c8c4080d405e70746c on FarmBot:staging.


Parallel queries blocks nodejs/libuv worker pool

node-sqlite3 runs queries for the distinct prepared statements in independent worker pool tasks but all sqlite3 queries to the same sqlite3 connection internally serialized on the mutex. So other libuv worker pool tasks (dns resolution, crypto, etc) could be delayed while the pool spends a large amount of time waiting on sqlite3 mutex.
Wall clock profiling flamegraph (thread pool spends ~34% of wall clock time waiting on sqlite3 mutex):

Probably all queries (including prepared statement queries) to the same Database should be scheduled in the single queue.

This is a valid issue. For anyone wondering this is solved by calling db.serialize() (yes, without callback) right after opening the database.

@alex3d Looks like we should fix that 🙂 Do you have a short reproduction we can test with?

You could try this for (not too) short reproduction:
const sqlite3 = require('./lib/sqlite3');
const {promisify} = require('util');
const {performance} = require('perf_hooks');

const CONCURRENCY = 10;
const QUERIES = 2000;
const zlib = require('zlib');

async function main() {
  const db = new sqlite3.Database(':memory:');
  const prepare = (sql) => new Promise((resolve, reject) => {
    const stmt = db.prepare(sql, err => {
      if (err===null)
        resolve(stmt);
      else
        reject(err);
    });
  });

  await promisify(db.run).call(db, "CREATE TABLE lorem (info TEXT)");
  const insert = await prepare("INSERT INTO lorem VALUES (?)");
  for (let i = 0; i < 2000; i++) {
      await promisify(insert.run).call(insert, "Ipsum " + i);
  }

  const selectStatements = await Promise.all(Array.from({length: CONCURRENCY}, ()=>prepare("SELECT max(id), max(info) FROM (SELECT rowid AS id, info FROM lorem) GROUP BY id%500;")));
  const selectAll = selectStatements.map(s=>promisify(s.all.bind(s)));

  const T0 = Date.now(), ELU0=performance.eventLoopUtilization();

  const deflate = promisify(zlib.deflate);
  const deflateTiming = [];
  let int = setInterval(async ()=>{
    const T0=performance.now();
    await deflate(Buffer.from("asdf"));
    const T1=performance.now();
    deflateTiming.push(T1-T0);
  }, 10);

  await Promise.all(Array.from({length: QUERIES}, (_,i) => selectAll[i%selectAll.length]().then(v=>JSON.stringify(v)) ));

  deflateTiming.sort((a, b) => a-b);
  let medianTiming = deflateTiming[(deflateTiming.length/2)|0].toFixed(3);

  const T1 = Date.now(), ELU1=performance.eventLoopUtilization(ELU0);
  console.log(`${QUERIES} queries complete in ${(T1-T0)} ms,  ${(T1-T0)/QUERIES} ms per SELECT, event loop utilisation=${(ELU1.utilization*100).toFixed(0)}%`+
    `, median libuv thread pool queue latency = ${medianTiming} ms`);
  clearInterval(int);
}

main().catch(console.error);

CONCURRENCY= 1: 2000 queries complete in 1840 ms,  0.92 ms per SELECT, event loop utilisation=84%, median libuv thread pool queue latency = 0.924 ms
CONCURRENCY= 3: 2000 queries complete in 1748 ms,  0.874 ms per SELECT, event loop utilisation=88%, median libuv thread pool queue latency = 0.975 ms

CONCURRENCY=10: 2000 queries complete in 1688 ms,  0.844 ms per SELECT, event loop utilisation=91%, median libuv thread pool queue latency = 10.995 ms
CONCURRENCY=20: 2000 queries complete in 1936 ms,  0.968 ms per SELECT, event loop utilisation=81%, median libuv thread pool queue latency = 32.638 ms

As you could see when there are more than 4 concurrent queries (default libuv thread pool size) queue latency spikes up.
It is now shown by this repro but with 2-3 concurrent queries some thread pool threads are still uselessly blocked by node-sqlite3.


Create additional info blocks

You can make your resume less official by adding more entertaining info, like your hobbies and interest, or what do you like, some interactive content or joke, easter egg, etc.

Blazingly fast comment


SECCOMP error while using Node on Android-O

I've been implementing LiquidCore into Xamarin.Android as a way to execute JS in android and so far it's been pretty simple.  While testing across a few different devices i've run into an issue with a core event method that seems to crash the app entirely on android version 26 and up.
The issue comes from using setTimeout and the resulting exception when its used is Fatal signal 31 (SIGSYS), code 1 (SYS_SECCOMP).  After digging around a bit I've found its got something to do with a syscall filter introduced in API version 26 of android that blacklists syscalls that have been found to have security implications.  Details can be found here: https://android-developers.googleblog.com/2017/07/seccomp-filter-in-android-o.html
I can't get full details on the sys_call that cause the failure but i've found some evidence that one of the dependencies for node 8.9.3 called libuv is responsible for making a particular blacklisted sys_call epoll_wait that triggers this https://github.com/libuv/libuv/issues/2105.  I feel like there's multiple ways of getting around this however I wouldn't be surprised if this ends up being a problem in future with other restricted calls that node doesn't typically have problems with.
Is there strategy for dealing with this sort of this and is it possible to polyfill the behaviour of these methods (maybe by using native timers)?

Are you seeing this on the emulator?  Or is this on a specific piece of hardware?
Can you point me to an exact image I can use for my emulator to replicate this?  I have tried API 28 x86_64, API 26 x86, and API 28 arm64 (actual Pixel running Android P) and I cannot replicate this bug with v0.6.0.  I would love to swat this, but I need to be able to see it fail first!  Thanks.

Hmm I'm starting to think these added security measures may be a red herring.  I'm specifically testing x86_64 API 27 and API 28 at the moment in the emulator.  Though this is through the JNI as i'm integrating this with Xamarin so it's a bound library.  If all is well in native android then I can only assume it's got something to do with the JNI, it's just very strange that API 25 doesn't have the issue which indicates that they filters do probably play a roll.
Given that Xamarin isn't in scope with the project i'm happy to leave it be, I can give this a test once Node is updated and see if it makes a difference at all.  Would be awesome to get this working at some point so i'll keep an eye on it.


Append "/share" to AMENT_PREFIX_PATH

This PR appends the suffix "/share" to the list of directories loaded by AMENT_PREFIX_PATH. It fixes https://github.com/stack-of-tasks/pinocchio/issues/1520

Thanks @proyan !


[FIX] Packager script: Babel 7, named exports

Description
The packager script was broken in several ways:

... object rest spread operator in nest.md (now part of ES2018) was breaking Babel 6 without a transform plugin. Babel 7 works
Exports were not named and could not be imported like: import { snippet } from '30-seconds-of-code'
dist directory should be ignored in the repo and only published to npm

PR Type

[ ] Snippets, Tests & Tags (new snippets, updated snippets, re-tagging of snippets, added/updated tests)
[x] Scripts & Website & Meta (anything related to files in the scripts folder, how the repository's automated procedures work and the website)
[ ] Glossary & Secondary Features (anything related to the glossary, such as new or updated terms or other secondary features)
[ ] General, Typos, Misc. & Meta (everything else, typos, general stuff and meta files in the repository - e.g. the issue template)

Guidelines

[x] I have read the guidelines in the CONTRIBUTING document.

Does the ignore and delete fix the problem with the modules? Since the file has been tracked once, if it's added again won't it track?

@Chalarangelo dist being in the repo is actually considered bad practice since dist only needs to go to distribution channels, which Github is not.
For that matter however if you do want to upload dist to the repo it would be good to note it since it's not common, and bloats the NPM download and project sizes

@skatcat31 The npm download is essentially dist itself, right? How does it bloat NPM? Am I missing something there?
I am not against removing it or anything, I just thought it's not a problem and is useful to check if builds are ok in Travis. However, we could set up Travis to create the folder, make the builds and just notify us for errors.

@Chalarangelo often you add a post install step to build the dist folder to prevent duplicate byte download

it's why node-gyp is so popular

Aaaaand I need to look this whole thing up, my publishing skills are not that good yet. 😝

If this is still up for discussion, I think that the dist folder is useful asset to have in the repo. I have been downloading the compiled modules sometimes when I did not have npm on a computer I was working on, so I would like the folder to stay.

@mariastervic that is a fair point worth considering

Let's keep dist until we come up with a more robust plan to distribute the code from that directory? We shouldn't make hasty decisions.
Apart from the dist controversy, the PR seems like a very welcome change, so let's change .gitignore and merge?

@mariastervic the files in that folder had not been updated for a very long time though 😟
You don't need the dist folder because of the unpkg CDN which is a mirror for npm (as long as the releases get updated somewhat often)
<EMAIL_ADDRESS>.npmignore should be updated to ignore everything except package.json & dist.

The issue here is not that we have a dist folder, but rather that the files in it do not get pushed from the Travis CRON jobs. The dist folder was never meant to be the synced version with the latest release, but rather a nightly build that should sync up with the latest changes in the repo.

I keep forgetting unpkg is a place...
I think a good decision to be made then is two fold:

What is the purpose of the dist folder?
How should we build and deploy the dist folder to users?

I think the first one is pretty obvious:
The dist folder is used to however the actual files for use that are compiled by the build script.
The second id a little more nuanced though because there are two trains of thought:

Allow Travis nightlies to push to repo the folder(allows for possibly unstable problems)
Travis builds(releases to NPM) and NPM and Un-Package are the CDNs where people should get the dist folder from

Both have merits, but maintainability of the repo should probably guide the teams decision.

With that in mind, my thinking towards removing dist:
Pros:

Smaller repo
Faster Git downloads and syncs

Cons:

Can only get usable snippets from copy paste, NPM, or Un-Package
No nightlies unless you build it yourself

And my thinking to keeping dist:
Pros:

Nightly builds
Git can no be used in an emergency to fetch a copy while other sources are unavailable(somewhat unrealistic, but a backup is a backup)

Cons:

Git syncing and repository downloads will take longer
History must now track the dist folder contents aside from just for delivery

Great breakdown of the issue at hand, @skatcat31!
My two cents are:

Our current Travis build flow doesn't properly build and push the dist folder, which is quite problematic, however I feel like we should rewrite the packager.js script to do so, if we go with nightly builds.
The dist folder is not extremely large, but merge conflicts can arise from it, which has never been an issue so far, so maybe this is not the main concern there.
Cloning the repo with or without the dist folder doesn't seem like a concerning factor either - dist is currently 257KB and I doubt it will ever go beyond a couple of MBs in size, so it won't slow down clones all that much.
dist could theoretically be used for the testing, instead of individual .js files in the test directory, now that we have named exports. This will also test packaging problems (e.g. a snippet isn't properly loaded in from the module) and we could theoretically check against all the different pacakge builds, so we could use this to our advantage.

My opinion
Based on all previous discussion, I think we can utilize dist for testing the snippets and offload tdd.js a little bit, so we don't have to build each snippet file individually. Removing a few hundred files from the test directory and actually moving all the .test.js files to the main test folder will speed up searching for people who write and update tests (I have found myself scrolling a lot in there on VSCode) and will also guarantee that our builds work as intended, while repository size will be similar to what it is now if not lower (as we will essentially move all the exported code to the dist folder and remove a ton of unnecessary folders). Providing nightly builds in dist could help us indentify issues earlier and it could also be useful to some people that might still use those files. That being said, I vote towards this approach:

Fix Travis to push nightly builds to dist.
Remove individual snippets from test, use dist nightlies for importing, combine tester and packager into one procedure (separate files still) to make tests work together with nightly builds.
Move all .test.js files to top-level test directory to allow for easier search and access.

Thoughts?

If the rest of the team is onboard with the testable code copy/move to dist, this could end up being a reasonably big change in the build pipeline that could benefit us a lot in the long run.
Btw, if we do this, we should finally set up test coverage and remove the ugly testlog. I think tools like Codacy support this and it could help us check everything easily enough.
Note: If we do move and update the test system alongside this, we should just rename the PR and work on top of the work @atomiks has already commited. It's a good place to start and it's a perfectly valid PR already, so let's just improve everything that is related and merge the whole bunch at the same time.

The idea is solid, I would just like to voice descent of committing a lot at once. Sometimes small things fall through the cracks. It shouldn't be a problem, but I'm paranoid and you should get off mah lawn(read: I'm old)
I'd probably just revert the changes to build scripts and put those in another branch so we can work on that large, and potentially complex change, without having to worry about other things. It is after all seen as good practice to isolate procedures and changes to large systems in Git so you can surgically go back and reverse any mistakes without destroying anything else along the way.

It gives us, if nothing else, a clean starting point to make the next large group of changes to the build script which means these changes could be merged well before those changes, and safely.


Back-end (JVM) Internal error: Failed to generate function

As soon as I reference rootDir inside an object, the compilation crashes
Expected Behavior
Sync should work just fine
Current Behavior
I get

e: /home/elect/IdeaProjects/build-logic/build.gradle.kts:52:5: Back-end (JVM) Internal error: Failed to generate function addCommitPush
File being compiled: (52,5) in /home/elect/.gradle/.tmp/gradle-kotlin-dsl-8972668404569685282.tmp/build.gradle.kts
The root cause java.lang.UnsupportedOperationException was thrown at: org.jetbrains.kotlin.codegen.context.CodegenContext.getOuterExpression(CodegenContext.java:222)

Context
I was grouping common git function for fast dev cycles in an unique object
Steps to Reproduce
Clone this branch
Remove rootDir from here to have the compilation succedes
Your Environment
Gradle 7.0 rc-1 (but it was crashing with m3 as well)
Build scan URL: it cant make it to the scan

Did this work in 6.8?

Neither in 6.8.3

Here's a minimal reproducer Kotlin DSL script:
object myObject {
     fun myFunction() {
        println(project)
    }
}

I'm not sure if it's valid though. The problem is that the project reference is not available in the context of myObject.


failed instalation L 5.5

Installing yab/laratest (v0.1.1): Downloading (0%)    Failed to download yab/laratest from dist: The "https://codeload.github.com/YABhq/LaraTest/legacy.zip/1223d52aeb526ac16dabda7aa3523b0f81865468" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
Installing yab/laratest (v0.1.1): Cloning 1223d52aeb from cache
1223d52aeb526ac16dabda7aa3523b0f81865468 is gone (history was rewritten?)

[RuntimeException]
Failed to execute git checkout '1223d52aeb526ac16dabda7aa3523b0f81865468' -

&& git reset --hard '1223d52aeb526ac16dabda7aa3523b0f81865468' --

fatal: reference is not a tree: 1223d52aeb526ac16dabda7aa3523b0f81865468

We're only able to support 5.6 and up at this point due to package name transitions.


[BUG] Unable to find a way to select all duplicate images based on uniqueness

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu
Python version (python --version): 3.10.0
FiftyOne version (fiftyone --version): 0.20.1
FiftyOne installed from (pip or source): pip

Commands to reproduce
As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.
None

Describe the problem
Not an actual bug issue, more of an insight. I would like to know if it is possible to select all duplicate images with uniqueness 0 within the application or through Python. Somewhat of a select all button or such as I am unable to figure out how. The pasted code below is from: https://github.com/voxel51/fiftyone-examples/blob/master/examples/image_deduplication.ipynb
The issue is if there are many duplicates in the dataset, it seems time consuming to select each image one by one to filter them out. Is there already a functionality for this in place? I have not found in the documentation.
Thanks a lot for maintaining the application.
Neville
Code to reproduce issue
# Create the dataset
dataset = fo.Dataset.from_dir(
    dataset_dir=dataset_dir,
    dataset_type=fo.types.ImageDirectory, # Or ImageClassificationDirectoryTree for classification dataset
    name=name,
)

print(dataset)

fob.compute_uniqueness(dataset) # Compute uniqueness of dataset image samples
print(dataset)

# Get currently selected images from App
dup_ids = session.selected
print(dup_ids)

# Get view containing selected samples
dups_view = dataset.select(dup_ids)

session = fo.launch_app(dataset)

# Mark as duplicates
for sample in dups_view:
    sample.tags.append("duplicate")
    sample.save()

Other info/logs

What areas of FiftyOne does this bug affect?

[x] App: FiftyOne application issue
[ ] Core: Core Python library issue
[ ] Server: FiftyOne server issue

Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?

[ ] Yes. I can contribute a fix for this bug independently
[ ] Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
[x] No. I cannot contribute a bug fix at this time

I have solved this issue using dataset.match feature. Thanks a lot.


Add ILI9341 model

This PR adds the ILI9341 model, that was previously added as part of #39. I've cleaned up the code some more and extracted the common code for the ILI3941 and ILI9342C controllers into a separate module.
One remaining issue is the color order: Before #36 the RGB/BGR bit for the ILI9342C was inverted. According to the datasheet this shouldn't be necessary, but without the inversion I get incorrect colors on my display. I'm not sure if the datasheet is wrong or what is going on, but I've checked that my display is indeed using the RGB subpixel order by using a magnifying glass.

Forget what I wrote about the color order, my test program was broken.

@georgik Could you test if this PR works as well as #39 for your display? Or if you need to set the color order to BGR to get it working?

@rfuest Thank you for the update.
I've run the tests and it seems to suffer the same problem like my PR when I copied the code from ILI9342C. Blue and red chnnel seems to be swapped. The version on PR #39 works.
Incorrect version

Correct version

@rfuest Thank you very much for the suggestion. Using explicit with_color_order seems to be good option, because there are different displays with different color channel order. E.g. Kaluga is using RGB while M5Stack is using BGR.

@georgik Good to hear that it works for you.
@almindor The PR is ready to review/merge now.

Thank you


Update Core Workflow and Fish-AIR download

Updates to the latest core workflow to use the latest containers.
Replaces dataverse download with directly using the Fish-AIR API and including the Burress file in the repo.

Any suggestions for the Burress.md or README.md changes would be appreciated.


[BUG] [DISKANN] The first inserted record cannot be searched with DISKANN index

Searching with inserted vector, while distance is not 0:

Inserting vectors generated by random data:

/assign @cqy123456


auto-close when can't dm

When the bot can no longer DM someone due to them not being on the server, it should automatically close (with an option to toggle it maybe)
Error while replying to user: DiscordRESTError [50007]: Cannot send messages to this user

For the most part, the bot already did this. However, there was a bug with the closeMessage option where the bot would crash if it couldn't DM the close message to the user. Are you still experiencing this with the latest version of the bot (v2.16.0 at the time of writing)?


raftstore: fix missing workers' stop on shutdown (#11159)

ref #11159
Signed-off-by: Wenbo Zhang<EMAIL_ADDRESS>
What is changed and how it works?
Close #11159
What's Changed:
Related changes

Need to cherry-pick to the release branch

Check List
Tests

Integration test
Manual test (add detailed scripts or steps below)

Side effects

None

Release note
None

/label needs-cherry-pick-5.4

cc @tabokie

/merge


Bulk create

Hi,
I work on an app that creates irregular notifications for upcoming days (depending on calendar, user can have from 0 up to 10 events per day). It creates them using a loop one by one. I noticed it took at about 500 ms to execute createNotification method. The loop always creates 45 notifications, it means that the action could take apx 22 seconds.
Is there a way to create those 45 notifications at once - in order to decrease the total time. Now user can close the app before all notifications are scheduled which could prevent the app from scheduling all notifications.
Or is it possible to call the method  in parallel.

The notification creation itself take between 60-180ms, depending of what resources and layouts you've choosed to use to create your notification. The rest is all what the O.S. needs to display the notification. And you can take all these mesures inside this class:
https://github.com/rafaelsetragni/awesome_notifications/blob/master/android/src/main/java/me/carda/awesome_notifications/notifications/NotificationBuilder.java
To create what youre desiring, i need to understand what exactly what youre trying to do, and i cannot do it right now because im finishing the 0.7.0 version and the firebase companion plugin.

Hi! Sorry for taking so long to respond to your issue on GitHub. I was focused on releasing the new 0.7.0 version of awesome_notifications and awesome_notifications_fcm and i didn't had time enough to do both. But now I can answer all your questions.
So now i'm asking you to recreate this topic using the new issue template. There's a lot of missing informations that i need to understand your problem, and all the instructions are already in the new issue template. Also, remember to check beforehand if your issue was posted by another user.
So I will automatically close all previous issues so far.
Sorry for the inconvenience and i will be waiting for your new issue request.
Thank you so much for your support!


ENV variable cannot be read on production build

Reproduction/Description
Hi I am trying to use remix for my new project by using indie stack as a starter and since I have my own backend already, I tried to remove all the file and fucntion relate to prisma and sqlite db. I keep the session storage mechanism to store my access-token. it is running smoothly during development, but I get this kind of error while trying to run a production. thank you.

System Info
System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M2
    Memory: 66.34 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.10.2 - ~/Library/pnpm/pnpm
    bun: 1.0.17 - /opt/homebrew/bin/bun
    Watchman: 2<IP_ADDRESS> - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 120.0.6099.216
    Safari: 17.2.1
  npmPackages:
    @remix-run/css-bundle: ^2.4.0 => 2.4.0
    @remix-run/dev: ^2.4.0 => 2.4.0
    @remix-run/node: ^2.4.0 => 2.4.0
    @remix-run/react: ^2.4.0 => 2.4.0
    @remix-run/serve: ^2.4.0 => 2.4.0
    vite: ^4.5.0 => 4.5.1

Used Package Manager
pnpm
Expected Behavior
The environment variable SESSION_SECRET to be available.
Actual Behavior
The environment variable SESSION_SECRET is undefined.

How are you defining your environment variables in production? Remix loads .env files only in development. It expects you to set up the variables on your hosting provider for production.
For example, Fly.io uses fly secrets https://fly.io/docs/reference/secrets/

Hi @kiliman thank for the answer. It was oversight on my side, I was expecting that remix would load env from the .env file that was define on the root of the project. turn out it is need to be define on the on the hosting provider.
I will closed this as it is not a bug from remix side.
Thank you.


Hi, how do I move the control indicator to the top of the screen?

Hi,
Apparently, the 'paging' indicator control is always appear at the bottom of the ItemTemapltes regardless where I had it placed in Xaml.  If I am not mistaken, it has to be located within the 'cards:CarouselView</cards:CarouselView>'.
I've tried to place the indicator control before the 'cards:CarouselView.ItemTemaplte', but it doesn't appear on the top of the carousel.
Just wondering, how possible it is to place the indicator control on the top of item templates (On the top of the screen) ?
Please provide some solutions, thanks.

<IndicatorsControl AbsoluteLayout.LayoutBounds=".5,0,-1,-1" />


Simple Sender-Address Management for smtpd_sender_login_maps

From @kokel on August 4, 2015 11:9
Hello,
thanks for implementing support for all the sender_login_maps.
One feature I am missing here. We have several shared mailboxes users have access to via IMAP acls.
These shared mailboxes from modoboa point of view are normal accounts.
For example the user<EMAIL_ADDRESS>should be able to send mails with MAIL FROM address of the shared mailboxes e.g<EMAIL_ADDRESS>With the current implementation this is not possible.
Please add support for simple allowed from addresses which can be configured e.g. for normal account identities in the mail context.
It also would be great to have some kind of overview for the allowed sender addresses. e.g. a listing for all accounts/aliases etc. which account is allowed to send mails in account of.
Thanks in advance!
Copied from original issue: modoboa/modoboa-admin#39

@tonioo and @kokel
I'm not sure I understand completely the scenario here but shouldn't having this configuration like this in postfix achieve the objective?:
smtpd_sender_restrictions =
    permit_sasl_authenticated,
    reject_sender_login_mismatch,

First we permit any authenticated user to send from anywhere and then we reject if there is a mismatch, this would only apply to incoming mail.
I don't remember if my sender-login query is custom or not but here it's:
SELECT username
    FROM admin_mailbox m
        JOIN admin_domain d ON (m.domain_id = d.id)
        JOIN core_user u ON (m.user_id = u.id)
    WHERE
        d.enabled
        AND u.is_active
        AND u.username = '%s'
        AND d.name = '%d';

This is for version 1.2.2.

@carragom , this is already provided by Modoboa (https://github.com/tonioo/modoboa/blob/master/modoboa/admin/postfix_maps.py#L97).
The subject here is to add the possibility to add extra values on a per account basis.

I see so instead of all or nothing, you could actually pick which from addresses a user can use. That sounds useful.

@carragom @kokel Should we allow this feature to administrators only? I guess it is dangerous to let simple users edit such a list...

Yeah I think it would be a good idea to restrict this to admins only.

Ohai, sorry for late answer. +1 for administratively editing.


release 0.5.5 available on search.maven.org but not tagged in git

It is good practice to tag published releases in the source repository. To make it possible for users to find out which source corresponds to which release.

There are no 2.11 release of 0.5.5.

Ok, then where is the source for the 2.12 and 2.13 releases. I am just wondering.

I just found the tag in my local checkout and pushed it to github


Suggestion

I use an app called Dash in mac which allows me to read the docs offline (useful when traveling). It also reads markdown files as guides. It would be awesome if you could add fabrication's documentation as a guide so we Dash users could have it as an offline reference. Cheers!

Sorry for the delayed response. I think this is a great idea. I don't really use dash anymore but the docs for packaging it up are here.
https://kapeli.com/docsets#dashDocset


Font color is not working properly with Font size And Font Family Plugins

Versions:
"core-js": "~3.6.4",
"editorjs-inline-font-family-tool": "^1.0.4",
"editorjs-inline-font-size-tool": "^1.0.1",
"editorjs-text-color-plugin": "^1.12.1",
Issue:
When Font size And Font Family Plugins  are active then Font color is not passing color to json array during saving/storing process ,

Sorry, this problem does not show up when I am using all the libraries mentioned above, with editor.js ^2.23.2".

May need more users to report similar problems with more detailed descriptions.
Thanks!

okay Thank you for quick response,can You Please share latest stable version of these plugins which have no conflict with each an other

I am using "vue-editor-js": "^2.0.2", Please share solution for vue editor

Hi, I found this plugin works well when adopting editorjs with vuejs. You get a problem with editorjs state exporting, may because the "vue-editor-js" library only supports a limited number of plugins.

I use
  "editorjs-inline-font-size-tool": "^1.0.1",
   "editorjs-text-color-plugin": "^1.13.1",

And it doesn't work
  Color: {           class: ColorPlugin,           config: {             customPicker: true,             type: 'text',           },     },  fontSize: FontSize,
"type":"paragraph","data":{"text":"Text"
But this works for me
 fontSize: FontSize,     Color: {           class: ColorPlugin,           config: {             customPicker: true,             type: 'text',           },     },
"type":"paragraph","data":{"text":"Text"}

I use
  "editorjs-inline-font-size-tool": "^1.0.1",
  "editorjs-text-color-plugin": "^1.13.1",

And it doesn't work  Color: { class: ColorPlugin, config: { customPicker: true, type: 'text', }, }, fontSize: FontSize, "type":"paragraph","data":{"text":"Text"
But this works for me  fontSize: FontSize, Color: { class: ColorPlugin, config: { customPicker: true, type: 'text', }, }, "type":"paragraph","data":{"text":"Text"}

Do you mind to share the FE framework (React/Vue/Angular) you are using?

I use
  "editorjs-inline-font-size-tool": "^1.0.1",
  "editorjs-text-color-plugin": "^1.13.1",

And it doesn't work  Color: { class: ColorPlugin, config: { customPicker: true, type: 'text', }, }, fontSize: FontSize, "type":"paragraph","data":{"text":"Text"
But this works for me  fontSize: FontSize, Color: { class: ColorPlugin, config: { customPicker: true, type: 'text', }, }, "type":"paragraph","data":{"text":"Text"}

This is a workable solution, as the FONT tag output from editorjs-text-color-plugin was overwrote by editorjs-inline-font-size-tool.
Reasons in detail:

The editorjs-inline-font-size-tool tool only exports "size" and "face" properties from editorjs HTML.

  static get sanitize() {
    return {
      font: {
        size: true,
        face: true
      },
    };
  }

If you put the font size plugin after the color plugin, "color" property will be omitted by Editor.js when saving editor data.

Solution:

A quick solution is to make pull request to "editorjs-inline-font-size-tool" to allow more FONT properties exported by Editor.js.

But this may not be an effective solution. As there may be other plugins only exports it properties and
ignores the others'.

A better solution is to make PR to Editor.js.


Add emulator state migration guide

Moved to the onflow/cadence-lang.org repo: https://github.com/onflow/cadence-lang.org/pull/66, as per https://discord.com/channels/613813861610684416/1215760675276849153/1217225909237710858.


[Bug]: Parameter mismatch in _get_function_tool..model_fn()

Bug Description
Seems like the below code was added recently for function_program calling.
def _get_function_tool(output_cls: Type[Model]) -> FunctionTool:
    """Get function tool."""
    schema = output_cls.schema()
    schema_description = schema.get("description", None)

    # NOTE: this does not specify the schema in the function signature,
    # so instead we'll directly provide it in the fn_schema in the ToolMetadata
    def model_fn(**kwargs: Any) -> BaseModel:
        """Model function."""
        return output_cls(**kwargs)

    return FunctionTool.from_defaults(
        fn=model_fn,
        name=schema["title"],
        description=schema_description,
        fn_schema=output_cls,
    )

This method is calling FunctionTool.from_defaults from here, but the call and acall method are passing two parameters to the model_fn().
I think due to this when used, I am getting the below error when I call astructured_predict method as below
Method call:
response : my_output_cls = await my_llm.astructured_predict(
                    output_cls=my_output_cls,
                    prompt=my_prmpt,
                    prompt_arg1= prompt_arg1 #some more prompt args

                )

Error:
 _get_function_tool.<locals>.model_fn() takes 0 positional arguments but 1 was given

Version
llama-index-core == 0.10.31
Steps to Reproduce
Use the below method call:
response : my_output_cls = await my_llm.astructured_predict(
                    output_cls=my_output_cls,
                    prompt=my_prmpt,
                    prompt_arg1= prompt_arg1 #some more prompt args

                )

Relevant Logs/Tracbacks
No response

@akumar-b6i hmm, I can't reproduce. Am I missing a step?
from llama_index.llms.openai import OpenAI
from llama_index.core.prompts import PromptTemplate
from pydantic.v1 import BaseModel

class Test(BaseModel):
  """A test name."""
  name: str

async def run():
  await OpenAI().astructured_predict(
    Test,
    PromptTemplate("Predict a random test name about {topic1} or {topic2}."),
    topic1="cats",
    topic2="dogs",
  )

import asyncio
asyncio.run(run())

This is using the latest version of llama-index-core

Hey @logan-markewich  - You are using OpenAI maybe that's working just fine because it uses OpenAIPydanticProgram.from_defaults but I am using Gemini which is hitting the FunctionCallingProgram.from_defaults somehow. Code here
Eventually, calling the FunctionTool, let me know if that makes sense. Thanks!

Good point, I can try anthropic
Function calling isn't implemented in the Gemini class yet, so weird that it would even get to the function calling program though

@akumar-b6i do you have the full traceback?

Ah, I think I see the issue now actually (not sure how gemini got in there though haha)

I am not getting any stack trace pointing to the model_fn(), just the astructured_predict() returns the error string as a result.
Also, I tried with gpt4-32k (from AzureOpenAI) and got the same error.

Ok, I've narrowed this down, and there is this function def acall_tool() where if there is a single kwarg, we pass it in as a single arg to avoid cases where the LLM hallucinates the input name
This works for normal functions, but for pydantic class, we NEED the kwarg (you can initialize a pydantic object with positionals)

So if your structured class has more than one argument, it will work fine. Going to try and figure out a fix for this

@logan-markewich  - Are you implementing the same idea as above by @dosu, I had the same suggestion but wanted to check with someone! Let me know, if not I can raise a PR!

@akumar-b6i dosu's suggestion isn't quite correct. I'll open a PR in a sec, just got something working nicely


Optimize transferred_to and transferred_from in the Transfer model

def self.storage_locations_transferred_to_in(organization)
   includes(:to).where(organization_id: organization.id).distinct(:to_id).collect(&:to).uniq
end
def self.storage_locations_transferred_from_in(organization)
   includes(:from).where(organization_id: organization.id).distinct(:from_id).collect(&:from).uniq
end

Currently, this is what we have.
I'm getting code smell from it, but I'm not sure specifically why. Could someone evaluate the performance of this to see if it can be optimized any further?

Can we close this and track under https://github.com/rubyforgood/diaper/issues/411

Sure! sounds good.


fix(overlay): wait for panel to detach before removing panelClass

Currently we remove the panelClass as soon as detach is called, however the pane may still be animating. These changes wait for the panel to be done animating and to be removed from the DOM, before removing the class.
Fixes #13189.

What's with the CI failures?

Looks like it needed an extra null check. It's good to go now.


An error occurred contacting the server.

I have been met with this screen for the past several days. I can not upload any files. Is this issue specific to me? The problems began after I attempted to upload close to one hundred files--maybe my problems are related to that.

Please contact our help desk..


Check Sentry setup in backend sites

#1563 @ericvicenti can you take a look to this issue?

fixed


Make dynRouteLink open links in new tabs when Cmd-clicked

The links in the table cells at https://explorer.chainweb.com/ don't properly open a new tab when I Cmd-click them (on Mac).  The code for these links is here:
https://github.com/kadena-io/block-explorer/blob/master/frontend/src/Frontend.hs#L338
A conversation about this on #reflex-frp on IRC concluded that this is a bug and I should open an issue for it here.

This applies to all the routeLink variants as well.

Looks like routeLinkDynAttr will ignore a target = "_blank" attribute. Is this intended?
-- opens in same tab
routeLinkDynAttr (pure $ "target" =: "_blank") (pure $ FrontendRoute_Main :/ ()) $ text "yo"

-- open in another tab
elAttr "a" ("href" =: "http://localhost:8000/" <> "target" =: "_blank") $ text "yo"

I investigated this issue further. Here are my observations:

dynRouteLink and routeLinkDynAttr both suppress default behavior of the hyperlinks that they create. Due to this, Ctrl-click does not work.
We need conditional suppression of the default behavior here. Here is what I've thought of so far:
a. If the link is clicked simply, we need to suppress the default behavior. We should not pass the event to the browser, and let setRoute handle the event via client side routing. If we pass the event to the browser, it will make a network request.
b. If the link was Ctrl-clicked, we should do nothing. The browser will handle everything. Note that we should neither invoke setRoute in this case, nor should we suppress the event.
Let me summarize the requirements for making this happen:
a. We need event metadata in order to detect if Ctrl was pressed during a click.
b. We need to have conditional event suppression.
As far as I could check, reflex doesn't provide event metadata, nor is there a way to have conditional event suppression. We need to use JSaddle libraries to achieve this.

I will raise a PR with the above changes for review.

dynRouteLink and routeLinkDynAttr both suppress default behavior of the hyperlinks that they create

This violates my first assumptions about links.  IMO the sole point of routing is to make a particular app state accessible directly via a link.  I can't think of a case where I wouldn't want ctrl-click to work in a situation where I went to the trouble of defining a route that is able to access a particular app state.  IMO if you don't want ctrl-click to work, then I also would not go to the trouble of setting up routing, in which case dynRouteLink and routeLinkDynAttr would not be used.
However, I can see the need to special case the behavior for performance reasons, and the above requirements look reasonable to me.  Only other thing I can think of is that it also might be useful to include detection of target = "blank" as a part of the conditional logic.

CC: @cgibbard


[docs] the ChainIter struct needs documentation

The ChainIter struct implements the parallel iterator chain() combinator. It needs some simple docs that say precisely that and link to chain() method for more information.

Done in #248.


Add Qiskit Runtime 0.18 docs

The 0.17 docs are moved to be historical via npm run make-historical -- -p qiskit-ibm-runtime.
The 0.18 docs were generated with npm run gen-api -- -p qiskit-ibm-runtime -v 0.18.0 -a https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/7703740124/artifacts/1204347771. Note that they include two new top-level modules, closing https://github.com/Qiskit/documentation/issues/238.
This PR resulted in discovering https://github.com/Qiskit/documentation/issues/732. This has always been a problem we didn't know about. I manually ignore the broken links for now to unblock the Runtime 0.18 release and to close https://github.com/Qiskit/documentation/issues/238.

I noticed api/qiskit-ibm-runtime/qiskit_ibm_provider.transpiler.passes.basis was empty, should it include ConvertIdToDelay? (I don't fully understand sphinx 😢)

Good point. I asked Kevin Tian over DM to clarify. Either way, we should fix that in a follow up since we're behind on getting these docs out.