text:
A Terraform application could be deleted when there is no provider

Describe the bug

From Slack.
An application failed to delete.
╰─ vela status create-s3
About:

  Name:         create-s3
  Namespace:    kubevela-test
  Created at:   2022-05-25 10:19:44 +0100 IST
  Status:       deleting

Workflow:

  mode: DAG
  finished: false
  Suspend: false
  Terminated: false
  Steps
  - id:lfc1bho4xv
    name:create-s3
    type:apply-component
    phase:running
    message:wait healthy

Services:

  - Name: create-s3
    Cluster: local  Namespace: kubevela-test
    Type: aws-s3
    Unhealthy
    No trait applied

╰─ kubectl get configuration.terraform.core.oam.dev create-s3 -n kubevela-test -o yaml
apiVersion: terraform.core.oam.dev/v1beta2
kind: Configuration
metadata:
  annotations:
    app.oam.dev/appAlias: ""
    app.oam.dev/appName: create-s3
    app.oam.dev/deployVersion: "20220525091944263"
    app.oam.dev/last-applied-configuration: '{"apiVersion":"terraform.core.oam.dev/v1beta2","kind":"Configuration","metadata":{"annotations":{"app.oam.dev/appAlias":"","app.oam.dev/appName":"create-s3","app.oam.dev/deployVersion":"20220525091944263","app.oam.dev/last-applied-time":"2022-05-25T09:19:44Z","app.oam.dev/publishVersion":"workflow-syc-kubevela-test-20220525091944270","app.oam.dev/workflowName":"workflow-syc-kubevela-test","definition.oam.dev/description":"Terraform
      configuration for AWS S3","oam.dev/kubevela-version":"v1.3.5"},"creationTimestamp":null,"labels":{"app.oam.dev/app-revision-hash":"f721edd86734f4d0","app.oam.dev/appName":"create-s3","app.oam.dev/appRevision":"create-s3-v1","app.oam.dev/cluster":"","app.oam.dev/component":"create-s3","app.oam.dev/name":"create-s3","app.oam.dev/namespace":"kubevela-test","app.oam.dev/resourceType":"WORKLOAD","app.oam.dev/revision":"create-s3-v1","oam.dev/render-hash":"cc8205214b571571","workload.oam.dev/type":"aws-s3"},"name":"create-s3","namespace":"kubevela-test"},"spec":{"hcl":"terraform
      {\n  required_providers {\n    aws = {\n      source = \"hashicorp/aws\"\n      version
      = \"3.74.3\"\n    }\n  }\n}\n\nresource \"aws_s3_bucket\" \"bucket-acl\" {\n  bucket
      = var.bucket\n  acl    = var.acl\n}\noutput \"BUCKET_NAME\" {\n  description
      = \"Bucket name\"\n  value = aws_s3_bucket.bucket-acl.bucket_domain_name\n}\nvariable
      \"bucket\" {\n  description = \"S3 bucket name\"\n  type        = string\n}\nvariable
      \"acl\" {\n  description = \"S3 bucket ACL\"\n  default     = \"private\"\n  type        =
      string\n}\n","providerRef":{"name":"aws","namespace":"default"},"variable":{"acl":"private","bucket":"kubevela-23-test","deleteResource":true}},"status":{"apply":{},"destroy":{}}}'
    app.oam.dev/last-applied-time: "2022-05-25T09:19:44Z"
    app.oam.dev/publishVersion: workflow-syc-kubevela-test-20220525091944270
    app.oam.dev/workflowName: workflow-syc-kubevela-test
    definition.oam.dev/description: Terraform configuration for AWS S3
    oam.dev/kubevela-version: v1.3.5
  creationTimestamp: "2022-05-25T09:19:44Z"
  deletionGracePeriodSeconds: 0
  deletionTimestamp: "2022-05-25T09:45:14Z"
  finalizers:
  - configuration.finalizers.terraform-controller
  generation: 2
  labels:
    app.oam.dev/app-revision-hash: f721edd86734f4d0
    app.oam.dev/appName: create-s3
    app.oam.dev/appRevision: create-s3-v1
    app.oam.dev/cluster: ""
    app.oam.dev/component: create-s3
    app.oam.dev/name: create-s3
    app.oam.dev/namespace: kubevela-test
    app.oam.dev/resourceType: WORKLOAD
    app.oam.dev/revision: create-s3-v1
    oam.dev/render-hash: cc8205214b571571
    workload.oam.dev/type: aws-s3
  name: create-s3
  namespace: kubevela-test
  resourceVersion: "315841352"
  uid: 119e553f-2518-4e4f-81ba-b5066e3e7b98
spec:
  deleteResource: true
  hcl: |
    terraform {
      required_providers {
        aws = {
          source = "hashicorp/aws"
          version = "3.74.3"
        }
      }
    }

    resource "aws_s3_bucket" "bucket-acl" {
      bucket = var.bucket
      acl    = var.acl
    }
    output "BUCKET_NAME" {
      description = "Bucket name"
      value = aws_s3_bucket.bucket-acl.bucket_domain_name
    }
    variable "bucket" {
      description = "S3 bucket name"
      type        = string
    }
    variable "acl" {
      description = "S3 bucket ACL"
      default     = "private"
      type        = string
    }
  providerRef:
    name: aws
    namespace: default
  variable:
    acl: private
    bucket: kubevela-23-test
    deleteResource: true
status:
  apply:
    message: provider not found
    state: Authorizing
  destroy:
    message: Cloud resources is being destroyed...
    state: Destroying
  observedGeneration: 2

To Reproduce

Expected behavior

Screenshots

KubeVela Version

Cluster information

Additional context

Already implemented:
╭─qiaozp@B-Q698Q05P-1858 ~/workspace/pr-3929
╰─$ kaf app.yaml
application.core.oam.dev/wrong-db created
╭─qiaozp@B-Q698Q05P-1858 ~/workspace/pr-3929
╰─$ kg configuration wrong-db -oyaml |grep -C5 Au
    instance_name: some_name
    region: cn-hangzhou
status:
  apply:
    message: provider not found
    state: Authorizing
  destroy: {}
  observedGeneration: 1
╭─qiaozp@B-Q698Q05P-1858 ~/workspace/pr-3929
╰─$ kdelf app.yaml
application.core.oam.dev "wrong-db" deleted

╭─qiaozp@B-Q698Q05P-1858 ~/workspace/pr-3929
╰─$ cat app.yaml
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: app.yaml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ apiVersion: core.oam.dev/v1beta1
   2   │ kind: Application
   3   │ metadata:
   4   │   name: wrong-db
   5   │ spec:
   6   │   components:
   7   │     - name: wrong-db
   8   │       type: alibaba-rds-instance
   9   │       properties:
  10   │         providerRef:
  11   │           name: not_valid_provider
  12   │           namespace: default
  13   │         instance_name: some_name
  14   │         region: cn-hangzhou
  15   │
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Some Background
Issue created before this post: https://cloud-native.slack.com/archives/C01BLQ3HTJA/p1653556538146979?thread_ts=1653492993.689669&cid=C01BLQ3HTJA
But he already delete the application controller before. https://cloud-native.slack.com/archives/C01BLQ3HTJA/p1653901016064719?thread_ts=1653492993.689669&cid=C01BLQ3HTJA. However we don't know it when create this issue. That's why the application can't be deleted. The same to Configuration, controller gone.
Actually, this is implemented, see logic in https://github.com/kubevela/terraform-controller/blob/55fd92efa4cb2cf7552265c85b12fe7b3f32acb2/controllers/configuration/configuration.go#L93. It shows that if provider is not found, Configuration can be deleted.

authors: chivalryq zzxwill

repo: kubevela/kubevela


text:
[flaky ci] k8s-1.17 temporary cluster failure

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

/triage build-watcher
What happened:
One of the tests broke the cluster, so a couple of tests failed, until the cluster eventually healed and the remaining tests continued as usual.
Example runs:

https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4444/pull-kubevirt-e2e-k8s-1.17/1325754118735663104
https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4522/pull-kubevirt-e2e-k8s-1.17/1326441901062098944

What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

KubeVirt version (use virtctl version):
Kubernetes version (use kubectl version):
VM or VMI specifications:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

Another example of this: https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4522/pull-kubevirt-e2e-k8s-1.17/1326441901062098944

Do these look related?

https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4522/pull-kubevirt-e2e-k8s-1.17/1326441901062098944
https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4492/pull-kubevirt-e2e-k8s-1.19/1326520795349913600

Maybe related as well
https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4435/pull-kubevirt-e2e-k8s-1.19/1328354755927347200

Another one?
https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/4617/pull-kubevirt-e2e-k8s-1.19/1336757737995898880

Could we identify which tests break the cluster?
In recent builds where there are a lot of failures after one test breaks the cluster we are getting 7h timeouts and the test output is not parseable by junit, like in this case https://prow.apps.ovirt.org/view/gcs/kubevirt-prow/logs/periodic-kubevirt-e2e-k8s-prev/1364334520735633408 For this one the first test that failed was test_id:2221 already reported here https://github.com/kubevirt/kubevirt/issues/4534

Looking at the kubelet logs in this last case I see a lot of:
Feb 24 01:35:05 node01 kubelet[3323]: E0224 01:35:05.896959    3323 kubelet_volumes.go:154] orphaned pod "b89e14d5-5a4c-44f3-ba2e-740a96a00c3b" found, but volume paths are still present on disk : There were a total of 1 errors similar to this. Turn up verbosity to see them.

and also:
Feb 24 02:08:26 node02 kubelet[2029]: E0224 02:08:26.700526    2029 kubelet.go:1768] skipping pod synchronization - PLEG is not healthy: pleg was last seen active 3m0.553374936s ago; threshold is 3m0s

/reopen
reopening given that we are still getting a lot of failed builds because of this.

Time is the best cure for flakiness,
even the hardest ones

source: gharchive/issue

authors: dhiller fgimenez oshoval phoracek tomob

repo: kubevirt/kubevirt

license_type: permissive

license_source: github-api


text:
Revise memory overhead of Passt binding

What happened:
Passt binding currently requires an overhead of 800Gi when a VMI doesn't explicitly specify ports, and thus the whole port range is forwarded.
An effort to optimize this is being tracked in https://bugs.passt.top/show_bug.cgi?id=20
This issue serves as a reminder to update the memory overhead added in https://github.com/kubevirt/kubevirt/pull/8716
when the above bug is resolved.

/sig-network

We'll track this at https://github.com/kubevirt/kubevirt/issues/8371 so that passt related things are at one place only


text:
Disks created within Filesystem PVCs use the overall Capacity of the underlying PV instead of requested storage size of PVC

What happened:
This might not be a bug and more of a design decision to avoid wasting space within PVs but I wanted to raise it either way.
I noticed $subject while using PVs maintained by the local-volume-provisioner within a kubevirtci deployed environment. At present we use it to create filesystem based PVs that share the same filesystem. As discussed in https://github.com/kubevirt/kubevirtci/issues/1014 this leads to a known short coming of the provisioner where the capacity of each PV is the size of the hosting filesystem.
This becomes an issue for KubeVirt as we eventually create a disk within the PV using the overall Capacity of the PV as the size. In this scenario this obviously fails as the disk is also being used by the host OS amongst other things.
https://github.com/kubevirt/kubevirt/blob/e145467d7527c7f6b7e2b94e62d22992c410f15d/pkg/host-disk/host-disk.go#L272-L287
$ ./cluster-up/kubectl.sh apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: example-pvc
spec:
  storageClassName: local
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
EOF
[..]
$ ./cluster-up/virtctl.sh create vm --volume-pvc=name:example,src:example-pvc --name example | ./cluster-up/kubectl.sh apply -f -
[..]
$ ./cluster-up/kubectl.sh get pvc/example-pvc -o json | jq .spec.volumeName
[..]
"local-pv-f44cc0e9"
$ ./cluster-up/kubectl.sh get pv/local-pv-f44cc0e9 -o json | jq .spec.capacity
[..]
{
  "storage": "34Gi"
}
$ ./cluster-up/kubectl.sh get vm/example -o json | jq .status.conditions[2]
[..]
{
  "lastProbeTime": null,
  "lastTransitionTime": "2023-05-26T14:39:37Z",
  "message": "preparing host-disks failed: unable to create /var/run/kubevirt-private/vmi-disks/example/disk.img, not enough space, demanded size 36507222016 B is bigger than available space 17550753792 B, also after taking 10 % toleration into account",
  "reason": "Synchronizing with the Domain failed.",
  "status": "False",
  "type": "Synchronized"
}

Reducing the overall Capacity of an example PV however causes the eventual disk to be created successfully but we still end up using the Capacity of the PV as the size of the disk instead of the size requested through the PVC:
$ ./cluster-up/kubectl.sh apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: example-pvc-2
spec:
  storageClassName: local
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
EOF
$ ./cluster-up/virtctl.sh create vm --volume-pvc=name:example,src:example-pvc-2 --name example-2 | ./cluster-up/kubectl.sh apply -f -
[..]
$ ./cluster-up/kubectl.sh get pvc/example-pvc-2 -o json | jq .spec.volumeName
[..]
"local-pv-3fb65ef2"
$ ./cluster-up/kubectl.sh get pv/local-pv-3fb65ef2 -o json | jq .spec.capacity
[..]
{
  "storage": "5Gi"
}
$ ./cluster-up/kubectl.sh exec -ti virt-launcher-example-2-b7spt bash
[..]
$ qemu-img info --force-share /var/run/kubevirt-private/vmi-disks/example/disk.img
image: /var/run/kubevirt-private/vmi-disks/example/disk.img
file format: raw
virtual size: 5 GiB (5368709120 bytes)
disk size: 4 KiB
Child node '/file':
    filename: /var/run/kubevirt-private/vmi-disks/example/disk.img
    protocol type: file
    file length: 5 GiB (5368709120 bytes)
    disk size: 4 KiB

What you expected to happen:
The size of an underlying disk created within a filesystem PV should match the requested size from the PVC and not the overall capacity of the PV.
How to reproduce it (as minimally and precisely as possible):
See above.
Additional context:
Environment:

KubeVirt version (use virtctl version): N/A
Kubernetes version (use kubectl version): N/A
VM or VMI specifications: N/A
Cloud provider or hardware configuration: N/A
OS (e.g. from /etc/os-release): N/A
Kernel (e.g. uname -a): N/A
Install tools: N/A
Others: N/A

So this is by design, let me explain why this happens. The local storage 'provisioner' actually just maps some bind mounts to volumes, and thus essentially share the underlying filesystem. There is nothing stopping one from requesting a 1Mi PVC, and completely filling up the disk writing to the volume. So the returned PVs must return the potential total amount of space one can write, which is the total space of the filesystem. The kubevirt hpp does the same thing since there is nothing stopping one from writing more than requested.
I am trying to understand why you are using capacity to create disk images, or even why kubevirt is trying to create disk images. When CDI creates disk images it uses min(request size, capacity) to determine how big the disk should be.

So this is by design, let me explain why this happens. The local storage 'provisioner' actually just maps some bind mounts to volumes, and thus essentially share the underlying filesystem. There is nothing stopping one from requesting a 1Mi PVC, and completely filling up the disk writing to the volume. So the returned PVs must return the potential total amount of space one can write, which is the total space of the filesystem. The kubevirt hpp does the same thing since there is nothing stopping one from writing more than requested.

Yeah understood, I still think moving to block device based PVs served from a single partitioned block device is going to be better for kubevirtci but I'll follow up in https://github.com/kubevirt/kubevirtci/issues/1014 once I'm back from PTO.

I am trying to understand why you are using capacity to create disk images, or even why kubevirt is trying to create disk images. When CDI creates disk images it uses min(request size, capacity) to determine how big the disk should be.

TIL, that same approach should work fine here, I've posted a WIP change essentially doing that but I'll clean it up when I get back from PTO.

authors: awels lyarwood


text:
tests/libmigration/migration: bug-fix migration create during retry

What this PR does
Before this PR:
Previously, RunMigrationAndExpectFailure used an Eventually block
to retry migration creation on transient failures. If Create failed
initially, the migration object was overwritten with an invalid result,
causing retries to use an empty migration.
After this PR:
This PR removes the Eventually block and now returns an error immediately on failure.
Release note
None

/cc @xpivarc

Also, out of curiosity, did you encounter an issue caused by this code?

/retest-required

@dasionov See that the test we were mentioning is not failing now. The failure is about the migration not having a name, which makes sense.
For example, this test fails:
https://github.com/kubevirt/kubevirt/blob/8925162860bfd94c4b2e38dd3f035b504cffaee7/tests/migration/migration.go#L1533
It creates a new migration with libvmi:
https://github.com/kubevirt/kubevirt/blob/8925162860bfd94c4b2e38dd3f035b504cffaee7/tests/migration/migration.go#L1549
Which in turn, returns a migration with GenerateName, but without a Name field:
https://github.com/kubevirt/kubevirt/blob/8925162860bfd94c4b2e38dd3f035b504cffaee7/tests/libmigration/migration.go#L43
However, RunMigrationAndExpectFailure() tries to get the migration by name, which is indeed empty:
https://github.com/kubevirt/kubevirt/blob/8925162860bfd94c4b2e38dd3f035b504cffaee7/tests/libmigration/migration.go#L428
/approve cancel

Maybe not related to this specific PR, but we can also get rid of the uid by returning directly string(createdMigration.UID)

i can do that in a separate commit should be no problem

/lgtm

/approve cancel

@iholder101 PTAL :pray:

/approve cancel

@iholder101 PTAL 🙏

Sorry!
Thanks @dasionov!
/approve

/retest-required

/cherry-pick release-1.4
/cherry-pick release-1.3

https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/13282/pull-kubevirt-e2e-k8s-1.30-ipv6-sig-network/1859255594477686784
16:41:01: Waiting on istio operator to become ready failed after maximum retries: Istio operator failed to move to Healthy status after max retries
16:41:02: /home/prow/go/src/github.com/kubevirt/kubevirt/kubevirtci/cluster-up/up.sh: line 34: pop_var_context: head of shell_variables not a function context
make: *** [Makefile:163: cluster-up] Error 1

@aerosouund
since it was changed by the refactor, can you please take a look ?

source: gharchive/pull-request

authors: dasionov fossedihelm iholder101 oshoval xpivarc


text:
Or test ipv6

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

/test pull-kubevirt-e2e-kind-k8s-1.17.0-ipv6


text:
Add finalizer

If the KWebUI custom resource is removed, the k8s finalizer should be used to remove the owned Deployment and remaining objects.
Workaround till implemented:  set spec.version to an empty string ("") before removing the CR.

/reopen
/remove-lifecycle rotten

repo: kubevirt/web-ui-operator


text:
Admission policy creation screen needs improvement

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
The icons included in the cards do not fit properly. The colors used should add meaning based on the type of policy (pod, ingress global, etc.).
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Architecture:

Anything else?

The colors used should add meaning based on the type of policy (pod, ingress global, etc.).
@kwwii Is this referring to the colors of the icons or the badges?

https://xd.adobe.com/view/86578da5-2dd3-435d-8e83-bf2f4dec827c-d304/

The first thing to take care of is the size of the icons themselves within the circles. The icon should fit within the circle with a bit of padding, not be cut off on the edges by the circle.

Should we remove the icons entirely? If we go with the "Simple Cards with Tags" approach from here we would have no use for the icons.

authors: jordojordo kwwii

repo: kubewarden/ui


text:
Accidental UT errors

link: https://github.com/kubewharf/kubeadmiral/actions/runs/6307418487/job/17124013179?pr=226
The error case is t.Run("ClusterEventHandlers should receive correct old and new clusters", func(t *testing.T).
I ran it locally multiple times and found no similar errors.
I feel that there is a small time difference between the function entering assertionCh and calling callback, which is captured by the test case. I think it would be better to put the callBackCount.Add(1) before the assertionCh operation.

/cc @limhawjia

repo: kubewharf/kubeadmiral


text:
TS imports with .js extension break Jest-resolve

Issue :
TypeScript files using web-compatible ES6 imports cause Jest to throw an error about not being able to find the module. This error comes from jest-resolve/build/index.js:229 and happens regardless of the module type specified in ts-jest (commonjs, amd, ES6, etc.)
Expected behavior :
TypeScript supports adding a .js extension to import statements for web-compatibility (since imports require a full path, including the extension).
I would expect ts-jest to allow TypeScript to handle this and convert it to commonjs before it gets passed to jest.
Minimal repo :
/* user.ts */
export class User {
  public name : string;

  constructor(name : string) {
    this.name = name;
  }
}

/* user.spec.ts */
import { User } from './user.js';

describe('User', function() {
});

I facing the same issue :(

I set up a custom resolver and just published it to npm: jest-ts-webcompat-resolver

@kulshekhar this has been closed for awhile but the issue still happen in ts-jest 26.5.4.
Since handling ".js" extensions in import statement is standard in TypeScript (and will become increasingly needed as Node.js moves towards ES modules), shouldn't ts-jest resolve this correctly without the need for  @dpogue custom resolver?

Which error do you get, TypeScript type checking or Jest runtime errors? ts-jest transforms ts to js and throws type checking errors but not runtime errors.

A jest-resolve error:
 FAIL  test/index.spec.js
  ● Test suite failed to run

    Cannot find module './types.js' from 'src/index.ts'

    Require stack:
      src/index.ts
      test/index.spec.js

    > 1 | import { MyType } from "./types.js";
        | ^
      2 |

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (src/index.ts:1:1)

importing ./types.js (./src/types.ts file exporting some types/enums declarations) from ./src/index.ts.

This is Jest runtime error, not ts-jest type checking error. There are a few things to check:

Make sure the file has module.exports
Make sure allowJs is true.
Make sure jest config transform value specifying js processed by ts-jest

When transforming ts to js, the code from "./types.js"; becomes require(“./types.js”), which is a valid syntax. However, Jest resolver doesn’t understand, probably because missing module.exports

Thanks for the pointers!
"./types" doesn't have module.exports as it is a full ES modules codebase (allowJs is true and the transform is "^.+\\.(t|j)s$": "ts-jest" so no problem here).
Using on "jest-ts-webcompat-resolver", it rewrites './types.js' to './types.ts' so I guess that's enough for jest-resolve to understand where to look (although it still seems a bit hacky).

I set up a custom resolver and just published it to npm: jest-ts-webcompat-resolver

Won't work for TSX files, but changing a bit the code to also tries resolving path replacing .js to .tsx seems to work fine.
function getResolver() {
  try {
    return require('jest-resolve/build/defaultResolver').default;
  } catch (_) {
    return require('jest-resolve/build/default_resolver').default;
  }
}

const JAVASCRIPT_EXTENSION = /\.js$/i;

function resolverTSAndTSX(path, options) {
  const resolver = options.defaultResolver || getResolver();

  try {
    return resolver(path, options);
  } catch (error) {
    if (!JAVASCRIPT_EXTENSION.test(path)) throw error;

    try {
      return resolver(path.replace(JAVASCRIPT_EXTENSION, '.ts'), options);
    } catch (_) {
      return resolver(path.replace(JAVASCRIPT_EXTENSION, '.tsx'), options);
    }
  }
}

module.exports = resolverTSAndTSX;

I'll made a PR tomorrow, but this should be included in ts-jest for sure.

custom resolver doesn't belong to ts-jest. ts-jest is just a Jest transformer to transform ts to js and it doesn't do anything with the way how Jest resolves a file. ts-jest can add a section to documentation regarding to this error but natively, it is not ts-jest issue.
The issue is mainly caused by when using js extension, Node treats it as CommonJS, if you don't have module.exports it is not a valid js to Node to import.

TS resolves module imports when using ".js" extension, ts-jest should do the same in jest.

ts-jest doesn't do anything with Jest module resolution. The job of ts-jest is transforming ts to js. Transforming means compiling. Compiling process doesn't trigger the codes itself.
The output of import { MyType } from "./types.js"; is
var globals_1 = require(\\"./types.js\\");

This is a correct js compiling. However, how that require(\\"./types.js\\") executes depending on Jest.
As I said above, ts-jest is a Jest transformer, please check https://jestjs.io/docs/next/code-transformation to understand more.

In README.md the description is "It supports all features of TypeScript including type-checking.", and i'm using as a preset, not a transformer. But no problem, I can make a package just to resolve module in jest same way TypeScript does.

Actually, the preset means "A Jest configuration". This preset includes a transformer, which compiles ts into js. I know it's a bit hard to understand what's going on in internal ts-jest.
What tsc does is actually compiling ts into js, but if you need to execute js, tsc won't do it for you. This is the same like Jest + ts-jest. ts-jest takes care of compiling ts into js and gives the compiled js back to Jest. After that, Jest will execute the compiled js using V8 VM.
It supports all features of TypeScript including type-checking this means TypeScript language features, something like decorators (which is ECMA proposal stage 2), etc... This makes sure that the output js is understandable to V8 VM. See more at https://kulshekhar.github.io/ts-jest/docs/next/processing

I got things working with .js extensions in typescript imports with the following jest.config.js:
/**  @type {import('@jest/types').Config.ProjectConfig} */
const config = {
  transform: {
    "\\.[jt]sx?$": "ts-jest",
  },
  "globals": {
    "ts-jest": {
      "useESM": true
    }
  },
  moduleNameMapper: {
    "(.+)\\.js": "$1"
  },
  extensionsToTreatAsEsm: [".ts"],
};

export default config;

Cousin issue at Storybook: https://github.com/storybookjs/s
Both Jest and Storybook need to build code from sources, but might encounter index.ts "barrel files" exporting files using .js extension when a librairy is meant to be exposed as ESM.

Hello,
I want to share my config as well as far as the solution from above didn't work out for me.
I'm using nodejs v18.12.0, jest 29.2.2 and ts-jest 29.0.3, typescript 4.8.4.
I have "type": "module", in my package.json.
My tsconfig.json looks like this:
{
  "compilerOptions": {
    "outDir": "./lib/",
    "inlineSourceMap": true,
    "target": "es2022",
    "lib": ["ES2022"],
    "module": "ESNext",
    "moduleResolution": "NodeNext",
    "esModuleInterop": true,
    // "allowSyntheticDefaultImports": true, // this one along with allowJs are not required in my project
    "noImplicitAny": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["./test/**/*.ts", "./src/**/*.ts"]
}

Jest config file jest.config.cjs looks like this:
/** @type {import('ts-jest').JestConfigWithTsJest} */
const jestConfig = {
  testMatch: ['<rootDir>/test/?(*.)+(spec|test).ts'],
  transform: { '\\.[jt]s?$': ['ts-jest', { tsconfig: { allowJs: true } }] },  // allowJs is required for get-port
  transformIgnorePatterns: ['node_modules/(?!get-port/.*)'],  // you might need to ignore some packages
  moduleNameMapper: {
    '^(\\.{1,2}/.*)\\.[jt]s$': '$1',
  },
  // ...
}

module.exports = jestConfig

I solve the problem with add a config moduleFileExtensions setting in jest.config.json;
{
    "moduleFileExtensions": ["ts", "js"],
}

This comment started me on the right path, but for my project, the solution is simpler: make sure the moduleNameMapper only maps the '.ts' files that you refer to as .js in your imports elsewhere. In my case, those were the ./[filename].ts files, which are imported as ./[filename].js but for jest need to be imported as ./[filename].
In jest.config.json syntax:
"moduleNameMapper": {
    "^(\\.\\/.+)\\.js$": "$1"
  },

I tweaked the above version to allow ../ relative imports also:
"moduleNameMapper: {
    "^(\.\.?\/.+)\.jsx?$": "$1"
}

custom resolver doesn't belong to ts-jest.

@ahnpnl In my very humble opinion, if you give people a Jest plugin for them to write .test.ts files instead of .test.js, but it doesn't work, then that's your problem, not Jest's.

I got things working with .js extensions in typescript imports with the following jest.config.js:
/**  @type {import('@jest/types').Config.ProjectConfig} */
const config = {
  transform: {
    "\\.[jt]sx?$": "ts-jest",
  },
  "globals": {
    "ts-jest": {
      "useESM": true
    }
  },
  moduleNameMapper: {
    "(.+)\\.js": "$1"
  },
  extensionsToTreatAsEsm: [".ts"],
};

export default config;

Since the global ts-jest config is considered as deprecated.
I adjust the good tips by this way
{
  "transform": {
    "\\.[jt]s?$": [
      "ts-jest",
      {
        "useESM": true
      }
    ]
  },
  "moduleNameMapper": {
    "(.+)\\.js": "$1"
  },
  "extensionsToTreatAsEsm": [
    ".ts"
  ],
  ...
}

The below works for me in my Node.js backend project. The rule applies to relative imports starting with a period (.) or double periods (..)
"moduleNameMapper": {
        "@src/(.*)": "<rootDir>/src/$1",
        "^(\\./.+|\\../.+).js$": "$1"
    }

OR
"moduleNameMapper": {
        "@src/(.*)": "<rootDir>/src/$1",
        "^(..?/.+).js?$": "$1"
    },

authors: IdrisAkintobi VitorLuizC ahnpnl davidkhala dmnsgn dpogue eric-burel fkleedorfer joeldenning justrhysism mgrybyk oneWalker trusktr tuxan

repo: kulshekhar/ts-jest

license: MIT


text:
Revert "Create Dockerfile"

Reverts kumarjitu21/hello-github-actions#2

merge


text:
ModuleNotFoundError: No module named 'xclib.utils._sparse'

I'm running into the above issue when running from xclib.data import data_utils

Hi,
Thanks for trying it out. Can you please make sure that you are not running from xclib/pyxclib directory after installation.

Hi @kunaldahiya. Yes, I realized that yesterday and it works haha.

Hi @kunaldahiya I'm facing the same issue. Though I've run the command python3 setup.py install --user and I'm executing the code from pyxclib directory and not from xclib one.
I faced this while trying to run sparse_bow_features_from_raw_data.py file

Can you please try running it from somewhere else? Python will try to import from local files in this case.

Thanks for replying so quickly :) I'll try it out

Hi @kunaldahiya I'm still running into an error ImportError: cannot import name 'VectorizerMixin'  Sorry for troubling you 😅
This is the Traceback:
Traceback (most recent call last):
File ".\sparse_bow_features_from_raw_data.py", line 6, in
from xclib.utils.text import BoWFeatures
File "C:\Users\tarushi_sharma\AppData\Roaming\Python\Python36\site-packages\xclib-0.97-py3.6-win-amd64.egg\xclib\utils\text.py", line 11, in
from sklearn.feature_extraction.text import TfidfVectorizer, VectorizerMixin
All my other packages are in the location "c:\users\tarushi_sharma\appdata\local\programs\python\python36\lib\site-packages"
Also, I don't know if it would matter but I used to work on Linux earlier but since my system recently crashed, I shifted to Windows

Hi everyone!!
I'm getting the same problem:
`
runcell(0, '/home/elaine/Documents/datasets_xmlc.py')
Traceback (most recent call last):
File "/home/elaine/Documents/datasets_xmlc.py", line 9, in
import xclib
ModuleNotFoundError: No module named 'xclib'
`
How can I fix it?! I'm not well proficient in python as well. My file is in the /home/elaine/Documents/ folder and the package is installed at the /home/elaine/ folder.
Thanks

Can you please check if the notebook is using the same python version as used by xclib? It seems like (jupyter?) notebook is not detecting the installed library.

Hi Kunal
I'm using Spyder IDE. But I will check and return to you. I'm not at
home right now.
Thanks for now
***** Enviado do smartphone! *****
On Wed, Dec 8, 2021, 13:17 Kunal Dahiya @.***> wrote:

Can you please check if the notebook is using the same python version as
used by xclib? It seems like (jupyter?) notebook is not detecting the
installed library.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kunaldahiya/pyxclib/issues/11#issuecomment-988959147,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC7DF5LXBSKFZRY3PVNPBDDUP6AH3ANCNFSM4X7GZOAQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Can you please check if the notebook is using the same python version as used by xclib? It seems like (jupyter?) notebook is not detecting the installed library.

Kunal!!! Please, can you tell me what is the version of python you used? My laptop configurations:
###################################
elaine@bionote:~$ which python
/usr/bin/python
elaine@bionote:~$ which python3
/usr/bin/python3
elaine@bionote:~$ python
Python 2.7.18 (default, Mar  8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

elaine@bionote:~$ python3
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

elaine@bionote:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal
###################################
When I went out after sending a message to you, I power off my laptop. Then, when I came back I power on it. It seems that a restart helped with some issues because now I'm getting other errors:
##############################################################################################
runcell(0, '/home/elaine/Documents/datasets_xmlc.py')
Traceback (most recent call last):
File "/home/elaine/Documents/datasets_xmlc.py", line 13, in
features, tabels, num_samples, num_features, num_labels = data_utils.read_data('train.txt')
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/data/data_utils.py", line 342, in read_data
with open(filename, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'train.txt'
##############################################################################################
I believe that now is an issue about the folder where is my train.txt and the permissions for the file. So, I really don't know what exactly happened that fixed the problem. Do you have any idea? I hope that this can help others.
Thanks a lot!

HI
I'm getting new errors from this line
labels = data_utils.read_sparse_file('/home/elaine/Documents/Xf.txt', header=True)
##################################################
Traceback (most recent call last):
File "/tmp/ipykernel_5595/4045602250.py", line 1, in
labels = data_utils.read_sparse_file('/home/elaine/Documents/Xf.txt', header=True)
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/data/data_utils.py", line 243, in read_sparse_file
query_values, _header_shape = _read_file_safe(file,
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/utils/sparse.py", line 238, in _read_file_safe
f, _header_shape = _handle_header(f, header)
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/utils/sparse.py", line 228, in _handle_header
num_cols, num_rows = map(
ValueError: invalid literal for int() with base 10: '0%'
####################################################################################################
What to do?
Thanks

Hi
'read_data' is meant to read files in the following format (containing features and the labels). You can download the EURLex-4K dataset.
2 3 4
1,2 0:0.5 1:0.4 2: 0.3
2,3,4 0:0.5 2:0.4 3: 0.3

'read_sparse_file' is meant to read files like the following (only features are available)
2 3
0:0.5 1:0.4 2: 0.3
0:0.5 2:0.4 3: 0.3

repo: kunaldahiya/pyxclib


text:
Added game Laser Darts

PR Description 📜
Added a new game 'LaserDarts'
Fixes #3654 <your_issue_number>

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[x] I have specified the respective issue number for which I have requested the new game.

📸

Thank you soo much for contributing to our repository 💗

Thank you  @VijaySamant4368 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀

repo: kunjgit/GameZone


text:
Solved issue #3977- Forest Guardian Game

PR Description 📜
Please include summary related to the issue you have fixed and describe your PR in brief over here by specifying the issue number on which you were working below
Forest Guardian is a simple browser-based game where players control a guardian spirit navigating through a magical forest, collecting orbs while avoiding harmful creatures.
Fixes # <your_issue_number>
Fixes #3977

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[x] I have added working video of the game in README.md (optional)
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

https://github.com/kunjgit/GameZone/assets/142652964/e3ac3776-d6c6-45fc-bb37-ab62a8d51d64

Thank you soo much for contributing to our repository 💗

Thank you @Aditi22Bansal ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

@kunjgit
Done

@kunjgit
Kindly review and merge

@kunjgit
Kindly review and merge this
So that I can add another PR
If any changes are required kindly tell
Thankyou

Resolved the conflicts
Kindly merge
Thankyou

@kunjgit
Kindly review

@kunjgit
Kindly review and merge

Thank you  @Aditi22Bansal , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


text:
add log for download

Signed-off-by: hejianpeng hejianpeng2@huawei.com
What type of PR is this?

What this PR does / why we need it:
/kind bug
Which issue(s) this PR fixes:
Fixes #26
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

cc @prodanlabs is this what you expect?

cc @prodanlabs is this what you expect?

yes.

authors: hzxuzhonghu prodanlabs zirain

repo: kurator-dev/kurator


text:
An error occurred while running extractors

What's your CLI version?
0.86.12
Description & steps to reproduce
The following script throws an error:
def run(plan, args={}):
    service = plan.add_service(
        name = "service",
        config = ServiceConfig(
            image = "alpine",
            entrypoint = ["/bin/sh", "-c", "sleep infinity"],
        )
    )
    cmd = ''' echo '{"key": "value"}' '''
    plan.exec(
        service_name = "service",
        recipe = ExecRecipe(
            command = ["/bin/sh", "-c", cmd],
            extract = {
                "key": ".key"
            }
        ),
    )

INFO[2024-01-25T22:34:25Z] Creating a new enclave for Starlark to run inside...
INFO[2024-01-25T22:34:27Z] Enclave 'celestial-marsh' created successfully

Container images used in this run:
> alpine - locally cached

> add_service name="service" config=ServiceConfig(image="alpine", entrypoint=["/bin/sh", "-c", "sleep infinity"])
Service 'service' added with service UUID '48d512bae40d4e3596ffea8b343ef2cf'

> exec service_name="service" recipe=ExecRecipe(command=["/bin/sh", "-c", " echo '{\"key\": \"value\"}' "], extract={"key": ".key"})
There was an error executing Starlark code
An error occurred executing instruction (number 2) at DEFAULT_PACKAGE_ID_FOR_SCRIPT[12:14]:
  exec(service_name="service", recipe=ExecRecipe(command=["/bin/sh", "-c", " echo '{\"key\": \"value\"}' "], extract={"key": ".key"}))
  Caused by: Error executing exec recipe
  Caused by: An error occurred while running extractors 'map[key:.key]' on command output '{"key": "value"}
  '
  Caused by: An error occurred running extractor '.key' on recipe
  Caused by: No field '.key' was found on input '"{\"key\": \"value\"}\n"'

Error encountered running Starlark code.

Desired behavior
I expect the sample script to run without errors given
$ echo '{  "key": "value"}' | jq .key
"value"

What is the severity of this bug?
Critical; I am blocked and Kurtosis is unusable for me because of this bug.
What area of the product does this pertain to?
CLI: the Command Line Interface

thank you @igor-ritual , and apologies for the delay in response here. I was able to reproduce locally, so thanks for providing this level of detail - I'm tagging in @adschwartz here as well to help dig into it

Confirming, I'm looking into this issue

@igor-ritual Left an example at the bottom of our docs that is inspired of what you wrote with a bit more detail. Just let me know if you have any questions. Thanks!
https://docs.kurtosis.com/api-reference/starlark-reference/exec-recipe

authors: adschwartz galenmarchetti igor-ritual

repo: kurtosis-tech/kurtosis


text:
module reorganization

Currently everything is basically imported at top level, it could get messy if we expand to include more widgets for example. Currently Image and ImageWidget exist.
Only the following should exist at the top level:

graphics
layouts
Plot
widgets

For quick simple plots they just use Plot(), for everything else they do something like:
from fastplotlib.graphics import Image, Line
from fastplotlib.layouts import GridPlot

# or for widget plots
from fastplotlib.widgets import ImageWidget

@EricThomson thoughts?

I think we should try and minimize the number of imports that have to be written, try to avoid becoming messy like bokeh. Maybe have the widgets importable at top level since those will probably be used more frequently. Should see what we come up with for the events system as well in #39 and see where that will go.

This sounds like a good strategy to me! The one question I have here is where the line is between things that would fall into the Plot and graphics functionality. E.g., again with my usual thought:  try to emulate matplotlib where it is strong, but break from it where it is not (and where people don't really use it much anyway).
import fastplotlib.Plot as plot
plot = Plot()
plot.scatter() #does a scatter plot
plot.plot()  # plots a line (don't make ppl think about what special objects are needed)
plot.imshow()  # again, just let people do what they already expect

But then for special widgets with a ui component, you need widgets because matplotlib is not great, so you have special things for that, because you don't want to emulate matplotlib.
Anyway, just thinking out loud here as usual. I may well be wrong, esp as I am not yet a power user of fastplotlib.

Kind of, this is how the simple plot functionality works:
from fastplotlib import Plot()

plot = Plot()  # create a plotter

plot.image()  # image plot
plot.line()  # line plot, put on the same canvas since we're using the same plot instance
plot.scatter()  # scatter plot, put on top of the previous
... etc.

It's similar to matplotlib but I think a bit more explicity, image, line, scatter are the same exact names as the Graphic classes. That's how it's actually implemented in the Plot class anyways and probably makes it easy for a user to go between the simple Plot interfaces and Graphics if necessary.
For widgets, currently the image widget works like this:
from fastplotlib.widgets import ImageWidget

iw = ImageWidget(data=<data>, cmap="plasma")

# if it's a single data array, they can access the `Plot` instance of the imagewidget and add more things
iw.plot.line(data=<some line data>)

Just using with recent changes, it seems there are a lot of imports I'm doing right now, e.g.,:
from fastplotlib import Plot
from fastplotlib.layouts import GridPlot
from fastplotlib.graphics import ImageGraphic
from ipywidgets.widgets import IntSlider, VBox

This seems like too much for the simplicity of what I'm trying to do.
I see the unility of having these layout/graphics things in separate modules, but I wonder if you might want to set up the package (with imports in __init__) so people can just from fastplotlib import Plot, GridPlot, Image and all the things, but also maybe more importantly for the future they can just import fastplotlib as fpl and then just use these different widgets as needed? grid_plot = fpl.GridPlot(...things..)

authors: EricThomson kushalkolar

repo: kushalkolar/fastplotlib


text:
Text outline

Make it possible to add outline for text render with parameters like thickness and color.
Maybe options to extend outline in different directions: inner, outer and center

Ttf::draw_with_outline

authors: kuviman makscee

repo: kuviman/geng


text:
🛑 Community Action, Inc. (hosted elsewhere) is down

In ff05b74, Community Action, Inc. (hosted elsewhere) (https://community-action.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Community Action, Inc. (hosted elsewhere) is back up in bd922a6.

repo: kuznacic/wtf-uptime


text:
Release 1.0.0

1.0.0 (2017-06-20)
Compatibility

Kuzzle
Proxy

rc.x
rc.x

Bug fixes

[ #85 ] Deny to activate a new backend if another one is already active.   (ballinette)
[ #83 ] Close client connection when no backend left   (stafyniaksacha)
[ #75 ] Add an error message when there is no kuzzle instance   (dbengsch)
[ #74 ] Filter volatile instead of metadata in access logs   (dbengsch)
[ #68 ] Fix http client connection leak   (stafyniaksacha)
[ #63 ] Fixes #62 - empty errors coming from proxy   (benoitvidis)

New features

[ #72 ] Add support for Kuzzle graceful shutdown   (scottinet)

Enhancements

[ #77 ] Add request headers to request.context   (ballinette)
[ #69 ] Remove stack from error   (AnthonySendra)

Others

[ #79 ] Fix 836 ghost rooms   (benoitvidis)
[ #71 ] Improve debug function to allow toggle one/multiple lines   (stafyniaksacha)
[ #58 ] Update node prerequisite in package.json   (scottinet)
[ #57 ] Remove unused bluebird dependency   (scottinet)

Codecov Report

Merging #87 into master will decrease coverage by 1.2%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
- Coverage   98.98%   97.78%   -1.21%
==========================================
  Files          16       17       +1
  Lines         690      677      -13
==========================================
- Hits          683      662      -21
- Misses          7       15       +8

Impacted Files
Coverage Δ

var/app/lib/service/Router.js
94.73% <0%> (-5.27%)
:arrow_down:

var/app/lib/service/Backend.js
96.93% <0%> (-3.07%)
:arrow_down:

var/app/lib/service/protocol/SocketIo.js
98.46% <0%> (-0.24%)
:arrow_down:

var/app/lib/service/protocol/Websocket.js
98.98% <0%> (-0.11%)
:arrow_down:

var/app/lib/core/config.js
100% <0%> (ø)
:arrow_up:

var/app/lib/store/PendingItem.js
100% <0%> (ø)
:arrow_up:

var/app/lib/service/HttpFormDataStream.js
100% <0%> (ø)
:arrow_up:

var/app/lib/core/Context.js
100% <0%> (ø)
:arrow_up:

var/app/lib/store/Protocol.js
100% <0%> (ø)
:arrow_up:

var/app/lib/store/ClientConnection.js
100% <0%> (ø)
:arrow_up:

... and 7 more

Continue to review full report at Codecov.

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

authors: codecov-io stafyniaksacha

repo: kuzzleio/kuzzle-proxy

license_source: bigquery


text:
Update project to new ember-cli and add Fastboot 1.0.0 support

First, sorry for this large Pull Request. I've had problems in getting tests to work with my previous PR. So I started with a fresh project that uses up to date requirements for new ember projects/addons.
Implemented in this PR:

webfontloader.js is now loaded through node_modules
updated shim structure
implements Fastboot 1.0.0 style initializers
adds Fastboot 1.0.0 support
removes the dependancy on bower.json

Looking at how other addons solve the Fastboot 1.0.0 breakage/support, I would suggest maybe tagging this as 0.4.0 release and requiring Ember 2.x and Fastboot 1.0.0 to use.
I understand that this is a large change to the addon and that you're not actively using Ember anymore. I'm happy to stick around for a while and help with any issues that crop up because of this.

First, thank you a lot for the great job! :+1:
Seems a lot, but legit. I'm gonna merge this and will publish v1.0.0 so updates to README.md are required to make sure the versions are mentioned correctly.

Do you want me to update README/versions?

Okay, I updated, merged and published as 0.4.0. Too early for 1.0.0, I believe

Thanks!

authors: gandalfar kuzzmi

repo: kuzzmi/ember-cli-webfontloader

license: mit


text:
Failed to get list of devices from web API: 0

Nuki 3 pro, no bridge.
trying to set it up with API key
getting the following:
Logger: custom_components.nuki_ng.config_flow
Source: custom_components/nuki_ng/config_flow.py:51
Integration: Nuki Lock (documentation, issues)
First occurred: 1:10:58 PM (2 occurrences)
Last logged: 1:11:06 PM
Failed to get list of devices from web API: 0
Traceback (most recent call last):
File "/config/custom_components/nuki_ng/config_flow.py", line 51, in find_nuki_devices
title = response[0]["name"]
KeyError: 0
API key is set correctly with all rights.
Any suggestions?
Thanks.

yes. upgrade to the latest version 0.3.8

i am on 0.3.8 :(

Yeah, more changes == more bugs.
Please update to 0.3.9. Should be fixed

Yeah, more changes == more bugs.
Please update to 0.3.9. Should be fixed

Works like a charm!
Awesome stuff man, appreciate that.

authors: donmatanon kvj


text:
Add icon to WIT

NOTE: This PR is written against my PR branch that isn't in master yet.
Fixes https://github.com/almighty/almighty-core/issues/916

@hectorj2f thank you for reviewing.

I haven't tested but it looks good to me, too.

@xcoulon thank you for reviewing.

authors: kwk xcoulon

repo: kwk/almighty-core


text:
Update Discography “fill-murrays”

Automatically generated by Netlify CMS

:construction_worker: Deploy Preview for thar-ai processing.
:hammer: Explore the source changes: 8d85436103d4a03e0833edb5521bd5b3838be3a3
:mag: Inspect the deploy log: https://app.netlify.com/sites/thar-ai/deploys/60c5d52e588d640008144d54


text:
IntervalTier.intervalContaining(time)， if index = 0 ,return None

class IntervalTier(object)
def intervalContaining(self, time):
i = self.indexContaining(time)
if i :
return self.intervals[i]
indexContaining return 0， ‘ if 0 ’ return false ，then return None。 but must return intervals[0]

This is too cryptic for me to interpret. Can you state clearly what the issue is?

This is one part of your script (see below).
class IntervalTier(object)
    def intervalContaining(self, time):
        i = self.indexContaining(time)
        if i :
            return self.intervals[i]

For this part of script, I think there is something wrong.
test.zip
Based on your script, I wrote an example script named test.py. And I created a TextGrid file named data.TextGrid.
The files of test.py and data.TextGrid are in the attachment.
You can run test.py with data.TextGrid, then you will find what is wrong.
In data.TextGrid, in the first tier there are two intervals. The first interval is from 0 to 1.04s and the second interval is from 1.04 to 5s.
In test.py, for the command, itv = tg.tiers[0].intervalContaining(0.2), I want to find which interval is at 0.2s in the first tier.
The problem is:
When I run test.py, the result turns out to be NONE. It means there is no interval at 0.2s. I think the result is wrong and the correct result should be the 1st interval in the first tier. So, I think there is something wrong with your script.

authors: kylebgorman yuyanghua

repo: kylebgorman/textgrid


text:
Use CockroachDB PostgreSQL parser

Fantastic idea & project @kyleconroy!
Just in case you find interesting, the people from CockroachDB created a pg-compatible SQL parser in pure go: https://github.com/cockroachdb/cockroach/tree/master/pkg/sql/parser.
The benefit of avoiding the cgo dependency is that it would open the project up to other platforms.

I have two hesitations when it comes to using the CockroachDB query parser instead of pg_query_go. First is incompatibilities between the two parsers. I'll need to do more investigating to make sure there aren't valid PostgreSQL queries the Cockroach parser can't handle.
The second issue is Cockroach's licensing. The query parser is licensed under the Business Source License (BSL), which is not an open-source license. I'm not entirely sure how that licenses interacts with a tool like sqlc.

I have two hesitations when it comes to using the CockroachDB query parser instead of pg_query_go. First is incompatibilities between the two parsers. I'll need to do more investigating to make sure there aren't valid PostgreSQL queries the Cockroach parser can't handle.

Maybe @mjibson or @knz have something more to say on this :) But AFAIK the parser should be fully compatible and when it comes to execute it they check the compatibility of the AST (pointing you to the specific issue in case whatever thing in query is not supported).

The second issue is Cockroach's licensing. The query parser is licensed under the Business Source License (BSL), which is not an open-source license. I'm not entirely sure how that licenses interacts with a tool like sqlc.

That's a fair point, maybe they could told you how possible is to use freely.

A couple points:

cockroachdb's parser definitely does nog support all of postgres' grammar.

you can't simply "adopt a parser". A parser is a function from text to an AST data structure. If you reuse a parser you're also choosing to reuse the AST it was made for. However, an AST is also tightly bound to the rest of the language analyzer. In particular CockroachDB (currently) hangs off type checking and scalar evaluation as methods of AST nodes, with different semantics from postgres. I doubt that's what's desired here.

FWIW the CockroachDB tree is not 'go build'-compatible and the parsing code in particular uses a 4-step Makefile

(The licensing code is only a minor point, we can consider forking an Apache-licensed alternative for interested parties)
Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.

I was going through older issues and noticed that I never responded to this one.
@knz thanks for the explanation. I think it solidifies my opinion that we should not be using the Cockroach parser at this time.

authors: glerchundi knz kyleconroy

repo: kyleconroy/sqlc


text:
Postgres Materialized Views

Issue
Error running sqlc on a database containing materialized[1] views.
Context

Postgres
macOS
Running database on Docker

schema.sql
CREATE TABLE authors
(
    id   BIGSERIAL PRIMARY KEY,
    name TEXT NOT NULL,
    bio  TEXT
);

ALTER TABLE authors ADD COLUMN gender INTEGER NULL;

CREATE MATERIALIZED VIEW authors_names as SELECT name from authors;

docker-compose.yml
version: '3'

services:
  postgres-database:
    image: postgres
    restart: always
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: user
      POSTGRES_DB: database
      POSTGRES_PASSWORD: password

What is expected?
Running sqlc generate or sqlc compile must work and the materialized views must be handled the same way as normal views.
What happened?
I got the following panic.
panic: walk: unexpected node type *pg_query.IntoClause

goroutine 1 [running]:
github.com/kyleconroy/sqlc/internal/postgresql/ast.Walk(0x47ffbe0, 0xc0002acb80, 0x4804b20, 0xc0002984e0)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/postgresql/ast/soup.go:1175 +0x12b51
github.com/kyleconroy/sqlc/internal/postgresql/ast.walkn(0x47ffbe0, 0xc0002acb80, 0x4804b20, 0xc0002984e0)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/postgresql/ast/soup.go:22 +0x58
github.com/kyleconroy/sqlc/internal/postgresql/ast.Walk(0x47ffbe0, 0xc0002acb80, 0x4808d60, 0xc0002a8660)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/postgresql/ast/soup.go:499 +0x91ff
github.com/kyleconroy/sqlc/internal/postgresql/ast.walkn(0x47ffbe0, 0xc0002acb80, 0x4808d60, 0xc0002a8660)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/postgresql/ast/soup.go:22 +0x58
github.com/kyleconroy/sqlc/internal/postgresql/ast.Walk(0x47ffbe0, 0xc0002acb80, 0x480a220, 0xc0002ac9e0)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/postgresql/ast/soup.go:920 +0xa199
github.com/kyleconroy/sqlc/internal/dinosql.validateFuncCall(...)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/dinosql/checks.go:96
github.com/kyleconroy/sqlc/internal/dinosql.ParseCatalog(0xc0001631c0, 0x1, 0x1, 0x1, 0x101, 0x0)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/dinosql/parser.go:110 +0x389
github.com/kyleconroy/sqlc/internal/cmd.parse(0xc00017679c, 0x2, 0xc00003c004, 0x25, 0x46886d5, 0xa, 0xc0001631c0, 0x1, 0x1, 0xc0001631d0, ...)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/cmd/generate.go:194 +0x61c
github.com/kyleconroy/sqlc/internal/cmd.Generate(0xc00003c004, 0x25, 0x47ffda0, 0xc0000a2010, 0xc0000a2010, 0x4176c10, 0x45da300)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/cmd/generate.go:137 +0x8df
github.com/kyleconroy/sqlc/internal/cmd.glob..func3(0x4c7d6c0, 0x4cb4680, 0x0, 0x0)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/cmd/cmd.go:82 +0xb1
github.com/spf13/cobra.(*Command).execute(0x4c7d6c0, 0x4cb4680, 0x0, 0x0, 0x4c7d6c0, 0x4cb4680)
	/Users/claudemiro/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0xc00018cf00, 0xc0000e3f10, 0x1, 0x1)
	/Users/claudemiro/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/claudemiro/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/kyleconroy/sqlc/internal/cmd.Do(0xc0000b2010, 0x1, 0x1, 0x47ffd80, 0xc0000a2000, 0x47ffda0, 0xc0000a2008, 0x47ffda0, 0xc0000a2010, 0xc00008e058)
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/internal/cmd/cmd.go:30 +0x201
main.main()
	/Users/claudemiro/go/pkg/mod/github.com/kyleconroy/sqlc@v1.2.0/cmd/sqlc/main.go:10 +0xad

[1] https://www.postgresql.org/docs/12/rules-materializedviews.html

Thanks for the bug report.
While views are currently not supported (see #193 for discussion and workarounds), using them in a query should not cause a panic. I'll investigate.

The fix for the panic is now in master.
Sadly, you still won't be able to use your view in sqlc queries. Please follow #193 for updates when it's working.

@kyleconroy  Thank you


text:
Add temperature convert tool

Fahrenheit and Celsius

Probably you don't need it in an survival situation, but how about adding Kelvin? Just because it's the SI base unit and it's so simple to add :), just °C + 273,15

@qwerty287 sorry, I'm going to skip on that - I don't see a use for Kelvin outside of scientific applications (even if it is really easy to add)


text:
Matcher doesn't match partly URLs

It seems current version (2.0.1) of matcher doesn't match uri path partly.
Example:
func testPartlyPathMatches() {
    let request = URLRequest(url: URL(string: "https://api.palaverapp.com/some/other/v42/auth/login")!)
    XCTAssertTrue(uri("/auth/login")(request))
}

This test will fail. It seems I always need to specify everything after the host in the uri matcher. This is a bit inconvenient.
Because eg. I as mobile app developer don't want to care how the backend has structured the login endpoint in my tests or which endpoint version it is. I'm only interested in stubbing the login request.
Or did I miss something?

It seems current version (2.0.1) of matcher doesn't match uri path partly.

That is intentional, it is designed to be the full URI of full path.
Try the following:
func isLogin(_ request: URLRequest) -> Bool {
  return request.url?.path.hasSuffix("/auth/login") ?? false
}

stub(isLogin, failure(error))

I also noticed that it really needs to match the full URI including query parameters, which is very cumbersome in my case. The requests I want to simply mock have lots of query parameters.
My use case:
I want to write integration tests of my whole system. I want to test if our backend sends us a specific error code like 410 with some response body. So in those error case tests, I don't really care about any of those query parameters.
So my workaround is creating this new matcher to partly match the uri
func partUri(_ uri: String) -> (_ request: URLRequest) -> Bool {
    return { (_ request: URLRequest) in
        return request.url?.path.contains(uri) ?? false
    }
}

and then
    let jsonString = """ ... """
    let data = jsonString.data(using: .utf8)!
    stub(partUri("/samples"), jsonData(data, status: 410))

I believe a mocking library should offer a built-in possibility to mock network requests in a very easy and very fast way. This includes only matching part of uri.
eg. instead of using the regex pattern "^\(pattern)$", simply use "\(pattern)" in URITemplate.swift. Maybe add some flags to turn it on/off.

repo: kylef/Mockingjay


text:
Support for knative flag on kyma installation

The current installation scripts have a special flag to indicate a kyma installation based on knative. That mode will preset the minikube memory and disk settings and will preset the installer configuration.
Goal: Support installation of kyma in knative mode

As far as I know Kyma will be installed with Knative by default in 0.9, so I think we need to wait a moment to see the outcome. @a-thaler you can sync with @abbi-gaurav on this one.

Indeed with kyma 1.0 knative will be a mandatory dependency, so not worth of investing here anymore

authors: a-thaler sjanota

repo: kyma-incubator/kyma-cli


text:
Custom metrics autoscaling

#310

expose worker-pool metrics from mothership and component reconcilers

I do not see where the runningWorkers are getting reduced, with the current implementation the function UpdateWorkerPoolOccupancy only gets used to increase the amount of active running workers, but it is not used to reduce it when the worker finished.
Please also implement it, that when workers of a component reconciler finishes its work, the running workers column gets updated (decrease amount of running workers) due to the respective workerPoolID.
In the case of the workerpool from the mothership, it gets updated each time, when a worker invokes using the current running goroutines of the pool. This works, but maybe can be challanged in the future, since the update that a worked is not running anymore relies on the invoke of another worker.

Thanks for pointing this out! I forgot to implement this 😅 I will implement it shortly 👍
In the case of the worker pool, I first had the idea to implement it in the assignWorker() method, which is called by the remote invoker. But to introduce the least overhead, I decided to do it when the worker-pool is looking for processable ops, especially because this call is happening regularly within a configurable interval. But this totally can be challenged in the future if this approach gives us trouble.

Great work!

repo: kyma-incubator/reconciler


text:
The pre-main-control-plane-reconciler-e2e constantly fails

Description

The pre-main-control-plane-reconciler-e2e constantly fails due to the error:
  16 passing (9m)
  7 failing
  1) Executing Standard Testsuite:
       CommerceMock Tests:
         CommerceMock test fixture should be ready:
     Error: Waiting for lastorder function timeout (90000 ms)
      at Timeout._onTimeout (utils/index.js:403:20)
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)
  2) Executing Standard Testsuite:
       CommerceMock Tests:
         in-cluster event should be delivered (structured and binary mode):
     Error: read ECONNRESET
      at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
  3) Executing Standard Testsuite:
       CommerceMock Tests:
         function should be reachable through secured API Rule:
     Error: Error when requesting bearer token from https://oauth2.grdyc0i8j.kyma-prow.shoot.canary.k8s-hana.ondemand.com/oauth2/token: Error: read ECONNRESET
      at OAuthToken.getToken (lib/oauth.js:71:17)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async checkFunctionResponse (test/fixtures/commerce-mock/index.js:130:23)
      at async Context.<anonymous> (test/1-commerce-mock.js:60:7)
  4) Executing Standard Testsuite:
       CommerceMock Tests:
         order.created.v1 event should trigger the lastorder function:
     TypeError: Cannot read property 'data' of undefined
      at /home/prow/go/src/github.com/kyma-project/kyma/tests/fast-integration/test/fixtures/commerce-mock/index.js:182:38
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async /home/prow/go/src/github.com/kyma-project/kyma/tests/fast-integration/test/fixtures/commerce-mock/index.js:164:9
      at async sendEventAndCheckResponse (test/fixtures/commerce-mock/index.js:162:10)
      at async Context.<anonymous> (test/1-commerce-mock.js:64:7)
  5) Executing Standard Testsuite:
       CommerceMock Tests:
         should add, update and delete a service:
     Error: Error during adding a Service: Error: read ECONNRESET
      at convertAxiosError (utils/index.js:95:12)
      at addService (test/fixtures/commerce-mock/index.js:322:11)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/1-commerce-mock.js:68:25)
  6) Executing Standard Testsuite:
       Getting Started Guide Tests:
         Order should be persisted and should survive pod restarts (redis storage):
     Error: Error during creating order: TypeError: Cannot read property 'status' of undefined
      at /home/prow/go/src/github.com/kyma-project/kyma/tests/fast-integration/test/fixtures/getting-started-guide/index.js:79:11
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async verifyOrderPersisted (test/fixtures/getting-started-guide/index.js:75:3)
      at async Context.<anonymous> (test/2-getting-started-guide.js:36:7)
  7) Executing Standard Testsuite:
       Grafana Tests:
         Grafana redirects should work:
      Grafana redirect to kyma docs does not work!
      actual expected

      falsetrue

      at checkGrafanaRedirectsInKyma2 (monitoring/grafana.js:38:10)
      at async Object.assertGrafanaRedirectsExist (monitoring/grafana.js:29:5)
      at async Context.<anonymous> (test/3-monitoring.js:59:7)

Expected result

should work
Actual result

but it's not
Steps to reproduce

https://status.build.kyma-project.io/job-history/gs/kyma-prow-logs/pr-logs/directory/pre-main-control-plane-reconciler-e2e?buildId=1485879668207783936

Example on PR:
https://github.com/kyma-project/control-plane/pull/1294

Remember to revert the changes after fixing the pipeline:
https://github.com/kyma-project/test-infra/pull/4809

fixed

repo: kyma-project/control-plane


text:
Resuse cluster name for reconciler calls

Description
Changes proposed in this pull request:

Once the cluster name is created, it is stored as a clusterName in the instance details and can be reused by next operations

Related issue(s)

/hold

/retest

/retest

/retest

/retest

/unhold


text:
add customStateCheck into api doc

related issue: https://github.com/kyma-project/lifecycle-manager/issues/196

/test all

authors: medmes ruanxin

repo: kyma-project/lifecycle-manager


text:
Remove deprecated CRD types and apiextensions.JSON

Proposes an idea for Remove deprecated CRD types and apiextensions.JSON

Let's make sure that as part of this we're printing deprecation warnings for the fields removed in v2 schema if a user submits a v1 policy which uses these deprecated/removed fields. Also need to figure out how Kyverno upgrades would be handled if users have v1 policies already in the cluster and they upgrade Kyverno to a version in which they cannot be upgraded/migrated internally.

+1

authors: realshuting vyankyGH

repo: kyverno/KDP


text:
返回时导航栏会闪一下默认颜色

发生什么问题？
返回时导航栏会闪一下默认颜色
期望如何改进此问题？
预期返回上一页时导航栏颜色不会闪。
Demo 中是否出现这个问题？
Demo 没跑起来
额外信息（可选）
NXNavigationExtension 版本：4.1.6
Xcode 版本：14.3.1
运行平台：iOS 模拟器，版本 15.0
截图、示例代码等：
// NavigationDemoApp.swift
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        var classes: [AnyClass] = []
        if #available(iOS 15.0, *) {
            classes = [
                NSClassFromString("SwiftUI.SplitViewNavigationController"),
                NSClassFromString("SwiftUI.UIKitNavigationController"),
            ].compactMap { $0 }
        } else {
            classes = [
                NSClassFromString("SwiftUI.SplitViewNavigationController"), // iOS14
            ].compactMap { $0 }
        }

        let defaultConfiguration = NXNavigationConfiguration.default
        defaultConfiguration.registerNavigationControllerClasses(classes) { navigationController, configuration in
            // Configure
            navigationController.nx_applyFilterNavigationVirtualWrapperViewRuleCallback(NXNavigationVirtualView.configureWithDefaultRule(for:))
            return configuration
        }
        defaultConfiguration.navigationBarAppearance.backgroundColor = .red

        return true
    }

}

@main
struct NavigationDemoApp: App {

    @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

// ContentView.swift
import SwiftUI
import NXNavigationExtension

struct DestinationView: View {
    @State private var context: NXNavigationRouter.Context = NXNavigationRouter.Context(routeName: "/destinationView")

    var body: some View {
        Button {
            // NXNavigationRouter.of(context).pop()
            NXNavigationRouter.of(context /* /destinationView */).popUntil("/contentView")
        } label: {
            Text("Pop")
                .padding()
        }
        .useNXNavigationView(context: $context, onPrepareConfiguration: { configuration in
            configuration.navigationBarAppearance.useSystemBackButton = true
        })
    }

}

struct ContentView: View {
    @State private var context: NXNavigationRouter.Context = NXNavigationRouter.Context(routeName: "/contentView")

    var body: some View {
        NavigationView {
            NavigationLink { // 1. 使用 NavigationView 包装
                DestinationView()
            } label: {
                Text("Push")
                    .padding()
            }
        }
        .navigationViewStyle(.stack) // 2. 使用 StackNavigationViewStyle 风格
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

// SubView.swift
import SwiftUI
import NXNavigationExtension

struct SubView: View {
    @State private var context: NXNavigationRouter.Context = NXNavigationRouter.Context(routeName: "/destinationView")

       var body: some View {
           Button {
               // NXNavigationRouter.of(context).pop()
               NXNavigationRouter.of(context /* /destinationView */).popUntil("/contentView")
           } label: {
               Text("Pop")
                   .padding()
           }
           .useNXNavigationView(context: $context, onPrepareConfiguration: { configuration in
               // `DestinationView` NavigationView backgroundColor
               configuration.navigationBarAppearance.backgroundColor = .red
           })
       }
}

struct SubView_Previews: PreviewProvider {
    static var previews: some View {
        SubView()
    }
}

好的，我看下哈

@Robotxm 你在 ContentView 外面包装一个 NavigationView 就可以了，没有这一层的话，系统导航栏在 SwiftUI 上面的处理就会有问题。
var body: some Scene {
WindowGroup {
NavigationView {
ContentView()
}
.navigationViewStyle(.stack)
.useNXNavigationView { configuration in
configuration.navigationBarAppearance.backgroundColor = .red
}
}
}

感谢解答~


text:
Spoiler support, reworked attachments

Fixes #31.
Includes:

spoiler detecting in attachments
reworked attachments logic (AttachmentBuilder)

\cc @Benny-


text:
PWA enabled client

https://medium.com/geekculture/how-to-make-a-next-js-app-a-pwa-a5e2b13da548
https://dev.to/anuraggharat/pwa-with-nextjs-5178

Reopen on later date, non priority

repo: labfaz/turborepo


text:
Attempt to fix logging race

I'm trying to fix the logging race occurred when integrating raftify with Backend.AI, but it is still incomplete method currently.

I think the best solution at this point is to write the slog log to a file instead of standard output, so that it doesn't compete with the Python logger at all.
Writing a PyMutex binding to check if slog's standard output is locked every time in Python is too overheady, requires fixing every Python log call to an asynchronous function, and is unnecessary, in my opinion.

repo: lablup/rraft-py


text:
What does "tray" mean?

In the file tree, we have server/src/main/scala/org/labrad/tray. What does "tray" mean?

@maffoo ?

The tray package puts an icon in the system tray that when clicked will launch a web browser and load the scalabrad-web interface. I wrote this with a use case in mind where the browser would be run on your local machine (by double-clicking a jar, say) and then would itself connect to remote labrad, just like you do from, say, ipython. As opposed to running the web interface on a server with a well-known public DNS name that you connect to. The advantage of the former is that you don't have to set up a server (including certs etc. for security), you just need to have labrad going. The advantage of having a real server, on the other hand, is that you can share URLs with people, say pointing to different data sets. So basically, this is an experiment, not sure what we'll do with it in the long run. I will say it's a little awkward to have the tray package work with play, since play wants to do things one way, and it is much more geared toward running a server than running a desktop app.

authors: DanielSank maffoo

repo: labrad/scalabrad-web


text:
Use base tag in index.html to allow for relative urls

We send index.html to the browser to bootstrap the app no matter what route within the app the user loads. Hence, to use relative urls we must update the base against which urls in the index page are resolved to use the root path where the app is hosted, not the route from which the page was served.
On the server, we modify the base href appropriately before serving the page by manipulating the page DOM (previously this was done by injecting javascript, but the DOM manipulation is much cleaner). We also fix up the way this is handled on the client-side to be consistent with how the browser itself resolves relative URLs.

@joshmutus

Hey @maffoo can you provide me an example of how this worked before and how this works now? I'm having a little trouble understanding this from the PR description.
For example when I request https://SERVER/registry/Jim/AliceBobRes/Cooldown151230/160222/Bc/ what is happening different than before?

With the URL you provided, nothing is different. The idea here is I might have a single webserver where I want to host two copies of scalabrad-web (say, one running the latest release and one running a dev version for testing). I want to host the release version at the root url path so that people will see that by default when going to, say https://my.server/registry/... but I also want to host the dev version at another path like /dev/ so people can see it by going to https://my.server/dev/registry/.... The change here makes this possible. You would just have to run the dev server with the option --url-prefix=/dev/. (You would also have to run the dev server on a different port and set up a proxy server to forward the paths appropriately, but that is a different story).
The reason this didn't work before is that the index.html page had absolute URLs for things like javascript and html imports, so you could load the initial page from https://my.server/dev/registry/... but it would then load additional resources like javascript from the absolute URLs which would get the versions from the server running on the root path.
Does that help?

@maffoo OK, I understand that, how do I test it? Say I have two builds I'm running off the same server what uh, do I do with gulp to run them both at the same time?

I'm assuming there are commits to follow that deal with handling and labelling the versioning of the dev servers? It looks good. I'm able to bounce back and forth between the two versions of the software. I'm curious how I'll go about deploying my own dev-servers etc, it would be great to go through some together and create some instructions.

LGTM

authors: joshmutus maffoo


text:
Cannot start service gateway-controller: Bind mount failed: 'laf/deploy/docker-compose/cert' does not exists

群晖 docker
git clone https://github.com/labring/laf.git

cd laf/deploy/docker-compose

docker network create laf_shared_network --driver bridge || true

# 启动所有服务
docker-compose up

may you try mkdir laf/deploy/docker-compose/cert first.

authors: maslow wxiubin

repo: labring/laf


text:
[Feature]Read from command line

We need to read the configuration file or parameters from the control line, but now we read directly from the default configuration file

detail location：https://github.com/labring/sealfs/tree/main/src/bin

I opened a PR: https://github.com/labring/sealfs/pull/89

Also wondering, if it is a good idea to move and uniform CLI related stuff like: https://github.com/labring/sealfs/blob/9f751259c6ad777e66b862d7295fe00db7467ee5/src/client/mod.rs#L226-L238
to src/main/bin for cleaner file structure?

repo: labring/sealfs


text:
test: update version test to check stderr for version update notifica…

…tion

Summary

How did you test this change?

Issue

check windows

check windows

check windows

repo: lacework/go-sdk


text:
Bad Authentication data

I Am Already Configured the Twitter.
Calling Twitter Search API getting  "Bad Authentication data" .. In Lagotto 4.3

again, are you sure you don't want the lagotto application itself? it's here https://github.com/lagotto/lagotto/issues

authors: Gauravdhandre sckott

repo: lagotto/lagotto-rb


text:
Is there any way to return job id

hi
Is there anyway to return salt job id , say for example when highstating a server though salt api and return job id for that ,

Unfortunately at the moment no, the API doesn't return the jid for the call this library is making.
I will be implementing the POST /minion API call soon for these cases where you want to start something without waiting for the results immediately.

For reference: https://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#salt.netapi.rest_cherrypy.app.Minions.POST

This will be implemented in #19

authors: asheikm lahdekorpi

repo: lahdekorpi/node-salt-api


text:
lale.help platform homepage

We need a root homepage for the platform itself. This page is where we land on at www.lale.help.
It needs to be informational to non-registered users, allow sign up for a circle or new circle creation. It also needs to provide background on the lale non-profit and our mission.
Design spec for such a heom page is here:
https://docs.google.com/document/d/1SxMJPjNfpGbUw9aQ9SVZ-C3E1T3ZQXtB1C0MsNWqCxk/edit#

@dottorer: do you think this is required for the MVP? We were hoping to focus on getting the app usable for the people that will work in it most often. Once we have that, we can nail down the "i want to help right now!" use case. Do you think that makes sense?

I think we can work this somewhat in parallel. I need a form of simple website to respond to www.lale.help and we can wire in the app login there initially. But many folks are pinging me and are confused because they get an empty spot. Also, i hope that i can find a web page Guru and it is mostly static content and styling. Lets chat today briefly....

I think we can close this for now as we have a basic website in place. We will open issues for an expansion and rebrand soon...

authors: dottorer phil-monroe

repo: lale-help/lale-help


text:
feat: support custom id generator hook (#6)

fix #6

@laleksiunas Can you release a new version to npm?

Sorry @nekocode , I was busy yesterday. Thanks for your contribution! Published as version 1.5.0

authors: laleksiunas nekocode

repo: laleksiunas/inline-svg-unique-id


text:
Doesn't build with GHC 7.10

Sadly, relaxing package upper bounds doesn't just work:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1

$ cabal install bitset==1.4.8 --allow-newer
Configuring bitset-1.4.8...
Building bitset-1.4.8...
Preprocessing library bitset-1.4.8...

src/GHC/Integer/GMP/TypeExt.hs:16:8:
    Could not find module ‘GHC.Integer.GMP.Prim’
    Use -v to see a list of the files searched for.
Failed to install bitset-1.4.8

Is it to be expected that at some point this package will be upgraded to use version 1.0.0.0 of integer-gmp ? It would be useful to know what are the intentions.

I haven't looked into the sources of the new integer-gmp yet, but since it's complete re-write my guess is that a backward-compatible migration might take some time.

I have ported the library to 7.10.2, but dropped backward compatibility (I need to checkout henet package if it fits my needs). Perhaps, someone could reuse the work: https://github.com/Teaspot-Studio/bitset

Cool! I think backward compatibility is just a question of free time and some ifdef hackery. Feel free to submit a PR.

@superbobry, my big question is why bitset reimplements instance Bits Integer at all. If there's an efficiency problem with what base does there, shouldn't that be pushed upstream? And if there isn't (any longer) such a problem, shouldn't we strip out all the extra code? This whole thing seems strange. One issue I know about is that some Bits instances in base fail to INLINE some things they should. It would be much nicer to work around this problem using GHC.Exts.inline, which for non-GHC implementations can be defined as id, instead of digging around in Integer internals.

Ahh..... I see. https://ghc.haskell.org/trac/ghc/ticket/7860 is still open after all these years.

authors: NCrashed miguel-negrao robdockins superbobry treeowl

repo: lambda-llama/bitset


text:
ContractExecutor changes

Add option to never have debug names in functions and enable it on ContractExecutor, fix dangling temp library file

Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report
Attention: Patch coverage is 85.13514% with 11 lines in your changes missing coverage. Please review.

Project coverage is 88.68%. Comparing base (2be717c) to head (6dec2e6).

Files with missing lines
Patch %
Lines

src/executor/contract.rs
75.00%
5 Missing :warning:

src/bin/cairo-native-compile.rs
0.00%
1 Missing :warning:

src/bin/cairo-native-dump.rs
0.00%
1 Missing :warning:

src/bin/cairo-native-run.rs
0.00%
1 Missing :warning:

src/bin/cairo-native-stress/main.rs
0.00%
1 Missing :warning:

src/bin/scarb-native-dump.rs
0.00%
1 Missing :warning:

src/bin/utils/test.rs
0.00%
1 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #794   +/-   ##
=======================================
  Coverage   88.68%   88.68%
=======================================
  Files         121      121
  Lines       35458    35509   +51
=======================================
+ Hits        31445    31492   +47
- Misses       4013     4017    +4

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

authors: codecov-commenter edg-l


text:
Add default implementation of get_caller_address

Implements in the trait the default definition of get_caller_address

Codecov Report

Merging #43 (de2e5a0) into main (4b48c1f) will increase coverage by 0.23%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   72.60%   72.83%   +0.23%
==========================================
  Files          15       15
  Lines         814      821       +7
==========================================
+ Hits          591      598       +7
  Misses        223      223

Impacted Files
Coverage Δ

src/core/syscalls/syscall_handler.rs
67.07% <100.00%> (+2.13%)
:arrow_up:

src/core/syscalls/syscall_response.rs
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


text:
Do not add L2 to L1 logs to the pubdata

L2 to L1 logs are being added to the pubdata construction for both Rollup and Validium modes.
On Validium mode the pubdata should be empty, so we need to avoid adding the L2 to L1 logs to it.
Lines: https://github.com/lambdaclass/zksync-era/blob/validium_mode_pubdata_0_env/core/lib/types/src/commitment.rs#L227-L231

Resolved in #42

repo: lambdaclass/zksync-era


text: assets

repo: lambdalisue/vim-glyph-palette


text:
🚸 Simplify installation & API overview

Installation
Before:
pip install "lamindb[aws,bionty,jupyter,ourprojects]"

After:
pip install "lamindb[bionty,jupyter]"

Docs

Before
After

Materials

https://github.com/laminlabs/lamindb/issues/2301

But why the submodules were removed?

This will also break a ton of CI scripts across the repos.
I really don't like that aws dependency is installed by default now, it is very problematic because sometimes people because sometimes it can break existing environments, so if people have their environment with s3fs etc configured, it is better not to touch it.

I think such things should be discussed before merging.

Ok, about breaking i am probably not right, it was some time before, but was simplified.

No, thinking about this, it can still cause problems.

No, thinking about this, it can still cause problems.

What problems can it cause? I think it will reduce problems!
Assume that somebody has an incompatible version of s3fs installed. If they forget to provide the aws extra during installation, they'll never get feedback on clashing version requirements.
Now, they'll immediately get feedback if something clashes with what lamindb expects for aws.
I believe this might have been the cause of some bugs where people didn't notice anything until they call .load() or .cache() and then get a cryptic error and don't know what to do. That error would have been avoided if aws is simply part of lamindb.

But why the submodules were removed?

findrefs is deprecated in favor of ourprojects.
omop isn't a real use case; this requires much more discussion and is at this point confusing. There is still a link to https://omop.lamin.ai/
The docs job was beyond 6 min before this; now it's back to 3 min because omop is so huge.

I think such things should be discussed before merging.

Yes, I know. Sorry, I discussed it 4 times with myself and then considered it's high probability that we actually want this and be done with it so that I could finalize a downstream dependency at the same time.

What problems can it cause? I think it will reduce problems!

Yes, thinking yet again, you are right here. I had problems on sagemaker, where it worked with a given environment but broke with lamindb[aws], but it was long time ago, there are no sagemaker environments like this anymore and the structure of aws deps changed.
The only thing i don't like it having boto3 here https://github.com/laminlabs/lamindb-setup/blob/8426994be65f5a2cfded28d241c402e5ac207e7b/pyproject.toml#L32 that is used nowhere in lamindb, but was added just not to break existing environments where boto3 is installed and used.

If we have clients in the future that rely only on gcp, we will need to reintroduce aws extra i think.

If we have clients in the future that rely only on gcp, we will need to reintroduce aws extra i think.

I don't think so based on this argument from the issue

While purely local usage or purely GCP wouldn't need it, it seems that these are edge cases. Almost anybody will at some point want to pull something from an S3 bucket.

Also people on GCP will at some point want to access data from some AWS bucket. And AFAIK boto3 and s3fs aren't big; these are just a few python files.

Yes, this makes sense, you are right.

authors: Koncopd falexwolf

repo: laminlabs/lamindb


text:
Remove script and callback / refactor / fix timeout default value

Add .editorconfig (2 space feel free to change 😁 ).
Replace babel-preset-es2015 with babel-env.
Add Mocha and removed webpack from devDependencies.
Fix for #23.
Refactor core js file.
Minor Readme fixes.
Fix some errors in bower.json.

@lamp Let me know if I can help with other changes!

Add eslint with airbnb-base configuration
Call error wrapper function also for JSONP script onerror event (Fix #27)

Hi @marcalexiei Thanks for this, I'll take a look at it tonight and let's try and get this merged asap.

Hi @lamp When will you be release this version?

@thetaiz Has been published now as 0.2.0, sorry for the delay I forgot.

authors: lamp marcalexiei thetaiz

repo: lamp/superagent-jsonp


text:
Health Connect / HealthKit

Hi,
I would know if it is possible to use this plugin to open health connect with my app or HealthKit for iOS.
Many thanks

if (cordova.platformId == "android") {

		var pkgName = "com.google.android.apps.healthdata";

		var sApp = startApp.set({
			"package": pkgName,
			"application": pkgName
		});

		sApp.check(
			function (values) {

				//console.log(JSON.stringify(values));
				if (values.versionName) {
					sApp.start();
				}
				else {
					cordova.InAppBrowser.open('https://play.google.com/store/apps/details?id=' + pkgName, '_system', 'location=yes');
				}

			},
			function (error) {

				console.log(error);

			}
		);

	}
	else if (cordova.platformId == "ios") {

		var sApp = startApp.set("x-apple-health://").start();

	}

Help,
It seems that it does not work with Android 13.

It is running, sorry.


text:
[bug] Using gpu to train index would raise row_id out of range issue.

Python: 3.8.9
pylance: 0.8.17
File "create_index.py", line 6, in
full_ds.create_index(
File "/usr/local/lib/python3.8/dist-packages/lance/dataset.py", line 992, in create_index
ivf_centroids = train_ivf_centroids_on_accelerator(
File "/usr/local/lib/python3.8/dist-packages/lance/vector.py", line 173, in train_ivf_centroids_on_accelerator
kmeans.fit(ds)
File "/usr/local/lib/python3.8/dist-packages/lance/torch/kmeans.py", line 135, in fit
self.total_distance = self._fit_once(
File "/usr/local/lib/python3.8/dist-packages/lance/torch/kmeans.py", line 181, in _fit_once
for idx, chunk in enumerate(data):
File "/usr/local/lib/python3.8/dist-packages/lance/torch/data.py", line 122, in iter
for batch in stream:
File "/usr/local/lib/python3.8/dist-packages/lance/cache.py", line 68, in iter
for batch in self.stream:
File "/usr/local/lib/python3.8/dist-packages/lance/sampler.py", line 134, in maybe_sample
yield from _efficient_sample(dataset, n, columns, batch_size, max_takes)
File "/usr/local/lib/python3.8/dist-packages/lance/sampler.py", line 74, in _efficient_sample
dataset.take(
File "/usr/local/lib/python3.8/dist-packages/lance/dataset.py", line 452, in take
return pa.Table.from_batches([self._ds.take(indices, columns)])
OSError: Invalid user input: Row index 26514819 is beyond the range of the dataset., /home/runner/work/lance/lance/rust/lance/src/dataset.rs:892:31

Likely related: when indexing without an accelerator, get a similar index out of range error. My guess is it may be related to  the "KMeans: cluster 186 is empty" but how do I make sure there are no empty clusters then?
[2023-11-26T10:11:45Z WARN  lance_linalg::kmeans] KMeans: cluster 186 is empty
  0%|                                                                                | 0/1000 [00:00<?, ?it/s]thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance_background_thread' panicked at /home/runner/work/lance/lance/rust/lance/src/utils/tokio.rs:30:24:
called `Result::unwrap()` on an `Err` value: RecvError(())
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
thread 'lance_background_thread' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/task/core.rs:375:22:
JoinHandle polled after completion
thread 'lance_background_thread' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/runtime/task/core.rs:375:22:
JoinHandle polled after completion
  0%|                                                                                | 0/1000 [00:00<?, ?it/s]
thread 'lance-cpu' panicked at /home/runner/work/lance/lance/rust/lance-index/src/vector/pq.rs:116:14:
range end index 229376 out of range for slice of length 228480
Traceback (most recent call last):
  File "/home/ubuntu/benchmarking/benchmark.py", line 219, in <module>
    eval_lance(query, ground_truth, 5, "cosine")
  File "/home/ubuntu/benchmarking/benchmark.py", line 146, in eval_lance
    res = tbl.search(list(q)).metric(metric).limit(k).refine_factor(ref_factor).to_list()
  File "/home/ubuntu/.pyenv/versions/rag/lib/python3.10/site-packages/lancedb/query.py", line 217, in to_list
    return self.to_arrow().to_pylist()
  File "/home/ubuntu/.pyenv/versions/rag/lib/python3.10/site-packages/lancedb/query.py", line 409, in to_arrow
    return self._table._execute_query(query)
  File "/home/ubuntu/.pyenv/versions/rag/lib/python3.10/site-packages/lancedb/table.py", line 970, in _execute_query
    return ds.to_table(
  File "/home/ubuntu/.pyenv/versions/rag/lib/python3.10/site-packages/lance/dataset.py", line 321, in to_table
    ).to_table()
  File "/home/ubuntu/.pyenv/versions/rag/lib/python3.10/site-packages/lance/dataset.py", line 1595, in to_table
    return self.to_reader().read_all()
  File "pyarrow/ipc.pxi", line 757, in pyarrow.lib.RecordBatchReader.read_all
  File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
OSError: Io error: Execution error: External error: Execution error: ExecNode(Take): thread panicked: task 3247216 panicked

@wjones127 thanks, when will it be merged into main branch? Or, how can I fix it in the current version?

@amulil this was merged to main and we'll probably cut a new release including this fix within a week.

authors: amulil jerryyifei plaggy rok

repo: lancedb/lance