Webhook does not receieve information about uploaded images/resources on initial post creation

Describe the bug
There is an issue in the application where the webhook server does not receive any information about uploaded images or resources when a new memo is created. Only the textual content of the memo is sent. However, if the memo is updated, the webhook server then receives the resource-related information.
Steps to reproduce

Set up a webhook server to receive notifications from the Memos application.
Log in to the Memos application.
Create a new memo and upload an image or other resource.
Save the memo.
Check the payload received by the webhook server.
Update the memo.
Check the payload received by the webhook server again.

The version of Memos you're using
latest
Screenshots or additional context
No response

This looks like it is because when a Memo is created it sends out the webhook instantly - at that point the Resource has not actually been created yet. It awaits on the Memo creation and then sets the resource after - by which time the webhook has already been sent.

With the delete memo the current behavior is okay because we know the resource that is going to be deleted but with creation we at least need to update webhook with resource url. The upload can finish at later point.

I suppose there is a kind of simple way in that when the resources are updated that could also fire a memo updated Webhook event so if you created a memo and also attached a file then you would get a memo was created webhook event with no resource but then pretty quickly you would get a memo updated event with the resources attached. @boojack what do you think? Would this solve the issue?

@boojack actually looks like the Webhook payload was trimmed down a few days ago so that now it only sends the memo content and resources are omitted?

@mmacdo54 Sorry for the late reply. I just use v1pb.Memo as part of webhook response in https://github.com/usememos/memos/commit/f33571fec6e31a7025ccfd5133806a9d58c8c673. It'll include all the related resources/relations. So I think the next step is to bind all resources/relations when creating memo. But this could be an enhancement as the user can get the all memo information asynchronously via an API call in the webhook.


Spring Boot / az cli Key Vault user assigned identity - response 400 or 405 method not allowed

Please provide us with the following information:

This issue is a: (mark with an x)

[x] bug report -> please search issues before submitting
[ ] documentation issue or request
[ ] regression (a behavior that used to work and stopped in a new release)

Issue description
I want to use user assigned identity to access key vault. Somehow I can't access the vault, as it is unsuccessful to get a token.
Request:
http://localhost:42356/msi/token?resource=https%3A%2F%2Fvault.azure.net&api-version=2017-09-01&clientid=xxx-xxxx-xx
Steps to reproduct

Create user assigned identity and attach to capps, assign policy to key vault
try to login with identity to access keyvault
or try to login in container with azure cli

Expected behavior
Token is generated, key vault is accessed.
Actual behavior
Token can't be generated and throws an error 400 / 405 on the localhost-msi call.
Additional context
When I try to use the spring boot keyvault starter to access the keyvault:
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:42356/msi/token?resource=https%3A%2F%2Fvault.azure.net&api-version=2017-09-01&clientid=xxx

When I try to login with the azure cli in the container via console:
# az login --identity -u xxxxxx
The command failed with an unexpected error. Here is the traceback:

405 Client Error: Method Not Allowed for url: http://localhost:42356/msi/token
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/knack/cli.py", line 206, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 608, in execute
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 666, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 659, in _run_job
    six.reraise(*sys.exc_info())
  File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 636, in _run_job
    result = cmd_copy(params)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 306, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 493, in default_command_handler
    return op(**command_args)
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/profile/custom.py", line 128, in login
    return profile.find_subscriptions_in_vm_with_msi(username, allow_no_subscriptions)
  File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py", line 305, in find_subscriptions_in_vm_with_msi
    msi_creds = MSIAuthentication(resource=resource, client_id=identity_id)
  File "/usr/lib/python3/dist-packages/msrestazure/azure_active_directory.py", line 592, in __init__
    self.set_token()
  File "/usr/lib/python3/dist-packages/msrestazure/azure_active_directory.py", line 598, in set_token
    self.scheme, _, self.token = get_msi_token(self.resource, self.port, self.msi_conf)
  File "/usr/lib/python3/dist-packages/msrestazure/azure_active_directory.py", line 486, in get_msi_token
    result.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: http://localhost:42356/msi/token

The library used to integrate with managed identity appears to be using an old api version to call the managed identity endpoint (2017-09-01) which I believe is not supported by Container Apps. Related: https://github.com/microsoft/azure-container-apps/issues/297#issuecomment-1178056458

Then it looks like the current version of spring cloud azure is not supporting this API versio of capps. Maybe https://github.com/Azure/azure-sdk-for-java/issues/30043 is related.
Even if I update to the latest 4.3.3, it tries to use 2017 API.

@vturecek Do you know what might be happening here?

I made a sample application, that works in appservice and throws an error in container apps: https://github.com/anrub/azure-spring-boot with the docker image: ghcr.io/anrub/azdemo:2. Needs a few env vars, see README, tries to read testKey from the configured keyvault.

@anrub just as a sanity check, can you confirm that you are using the correct Client ID for the user-assigned identity?

@vturecek nice, somehow I put in the principal_id instead of the client_id, don't know how I could have missed that

@anrub happens to me all the time, glad it was an easy fix!


Refactor Collection Implementations: Drop Guava for Java Native

drop ImmutableList, ImmutableMap, ImmutableSet, Splitters etc. and use Java Native (Java.utils..)

fixes #6


Allow setting custom behavior when rate limit exceeded

While rescheduling a job to occur later might be desirable for many situations, there are others where it's not.
For example, I have a job that is rate limited on a per-worker machine basis.
E.g., each machine is only allowed to process 1,000 jobs an hour, however I still want to process jobs as fast as possible.
Thus, I want to immediately add throttled jobs back to the job queue to allow another machine (which hasn't exceeded its threshold) to process it.
NB1: There is obviously a race condition in this example, but in practice it ensures that jobs are retried immediately, independent of the rate limit period, which is important for my use case. Note that a race condition also exists with the existing behavior (I think) because the job is being retried after a static period. Let's say that a job is limited to 1,000 executions per hour. 1 job was executed at :00 while another 1,000 were executed at :59. This will result in one of the jobs queued at :59 being retried in 60 minutes. If this pattern (1 job at :00, 1,000 at :59) continues ad infinitum, some throttled jobs might never be processed (or processed WAYYYYYYYY after they were submitted). At least I think that's how it would work...
To execute non-default behavior, simply specify a proc that takes up to 4 arguments (the period/delay of the rate limiter, the worker that's executing the job, the message payload, and the queue the job came from) in the :exceeded key in the worker class's throttler options.
NB2: The rate limiter now always passes these arguments to the specified exceeded block, so, while you can use a lambda instead of a proc, if you do so the lambda has to accept all 4 parameters. At least I think it does :)

+1 would love to see this merged


JSON Contact does not bring all the addresses and person_contacts associated

Let's say if we have a Customer with many branches in the city (A bank for example), we should be able to recover all the contacts associated with each branch. Currently, we are able to get just the main_address and the first delivery_address. We should be able to recover an array of addresses and person_contact associated to a specific contact.

Here is one example of a customer with 4 different addresses with contact_persons associated and we don't have a way to get this information through the API.
customer.tar.gz

Hi @wbsouza, you can add a query parameter to any GET request of /addresses to specify a specific contact. The URL then should look like this:
/addresses?contact_id=e38a3033af1711e7bb3b065b8ec10ed1
Then you have all addresses of a contact. You can then get all associated contact_persons of an address by adding an address_id to the GET query to contact_persons:
/contact_persons?address_id=ece67ebcaf1711e7bb3b065b8ec10ed1
With that, you can request all contact_persons for all addresses of a contact.

Ohhh, awesome! I did not see that parameters, it definitely solve the problem.
Thank you very much


istio pilot crash on load

(This is used to report product bugs, please visit https://discuss.istio.io for questions on using Istio)
Bug description
we are using istio latest 1.1.7 using helm default config.
we are doing load test before using istio in production env
in the test we target to create 4500  pods (during 30 minute), each pod contain 3 routes however
istio pilot was crashed after 2750 pods.  (also istio-ingressgateway & istio-policy)
using prometheus we saw that during the creation of the pods the pilot use 53GB of memory,...

what could be the reason for the high memory (53GB) consumption  ?
should we update any value here to avoid crash of pilot on heavy load?
https://istio.io/docs/reference/config/installation-options/#pilot-options

The error message which the istio pilot was down was
The node was law in resource, memory container discovery was using 31084218ki, which exceedes  its request for 2GI.
The pod error was crashloopback ,
Any suggestion/hint how we can overcome this issue ?
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[x] Networking
[x] Performance and Scalability
[x] Policies and Telemetry
[ ] Security
[ ] Test and Release
[x] User Experience
Expected behavior
Istio will be functional on high load
Steps to reproduce the bug
Version (include the output of istioctl version --remote and kubectl version)
1.1.7
How was Istio installed?
Helm
Environment where bug was observed (cloud vendor, OS, etc)
K8S  1.13.6
Additionally, please consider attaching a cluster state archive by attaching
the dump file to this issue.

Is there just 1 instance of pilot running? Are all the pods in one service and/or namespace or are they all different?

53GB is not normal for a deployment of this size. You could just bump up the requests, but there is likely something going wrong causing elevated memory usage.

Thanks for your report, 53GB is too much, @RaynDol Can you see how pilot crashed?  How many pods and how many services?

@hzxuzhonghu we have some regularly scheduled tests running at http://grafana.v12.qualistio.org/ (seems prometheus is having issues currently though, need to investigate). That one has 450 services and 1100 pods.
http://grafana.v11.qualistio.org also has 450 services and 1700 pods. Pilot is only using 2.5GB in this case, although it is using sidecar.
@RaynDol it would be useful if you could export the grafana Pilot dashboard during the time period. (top right of grafana ui -> share -> snapshot -> publish to raintank).

@howardjohn - thanks, we tried with the default config which in 1 - 5 instances , we will increase the auto pilot pilot.autoscaleMax to 10 and double the memory of pilot.resources.requests.memory  and will try again , is it sufficient for high load or you suggest  to  increase other properties ?

@hzxuzhonghu - Thanks, the error is OOM .

@RaynDol I even just a couple pilots should handle that load easily which is why I think you may be hitting a memory leak or something similar, so raising the limits may just hide the problem

@howardjohn - currently we dont use side car for each pods i.e. we didnt create kubectl label namespace tals istio-injection=enabled for each namespace, is it related somehow ? is it must ?
btw, there is command which enables it automatically for all the namespace instead of configuring it for each space ?

@rayndol you can set sidecarInjectorWebhook.enableNamespacesByDefault.
Not having them all injected should mean less load for pilot (each sidecar == 1 more connection to handle)

@howardjohn - thanks,
we are using the following ingress-gateway  maybe this could be the reason for the hign-memory consumption? should we change something ?
---
# Source: istio/charts/gateways/templates/deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: istio-ingressgateway
  namespace: istio-system
  labels:
    chart: gateways
    heritage: Tiller
    release: istio
    app: istio-ingressgateway
    istio: ingressgateway
spec:
  selector:
    matchLabels:
      app: istio-ingressgateway
      istio: ingressgateway
  template:
    metadata:
      labels:
        chart: gateways
        heritage: Tiller
        release: istio
        app: istio-ingressgateway
        istio: ingressgateway
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      serviceAccountName: istio-ingressgateway-service-account
      containers:
        - name: ingress-sds
          image: "gcr.io/istio-release/node-agent-k8s:master-latest-daily"
          imagePullPolicy: IfNotPresent
          resources:
            limits:
              cpu: 2000m
              memory: 1024Mi
            requests:
              cpu: 100m
              memory: 128Mi

          env:
          - name: "ENABLE_WORKLOAD_SDS"
            value: "false"
          - name: "ENABLE_INGRESS_GATEWAY_SDS"
            value: "true"
          - name: "INGRESS_GATEWAY_NAMESPACE"
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
          volumeMounts:
          - name: ingressgatewaysdsudspath
            mountPath: /var/run/ingress_gateway
        - name: istio-proxy
          image: "gcr.io/istio-release/proxyv2:master-latest-daily"
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 15020
            - containerPort: 80
            - containerPort: 443
            - containerPort: 31400
            - containerPort: 15029
            - containerPort: 15030
            - containerPort: 15031
            - containerPort: 15032
            - containerPort: 15443
            - containerPort: 15090
              protocol: TCP
              name: http-envoy-prom
          args:
          - proxy
          - router
          - --domain
          - $(POD_NAMESPACE).svc.cluster.local
          - --log_output_level=default:info
          - --drainDuration
          - '45s' #drainDuration
          - --parentShutdownDuration
          - '1m0s' #parentShutdownDuration
          - --connectTimeout
          - '10s' #connectTimeout
          - --serviceCluster
          - istio-ingressgateway
          - --zipkinAddress
          - zipkin:9411
          - --proxyAdminPort
          - "15000"
          - --statusPort
          - "15020"
          - --controlPlaneAuthPolicy
          - NONE
          - --discoveryAddress
          - istio-pilot:15010
          readinessProbe:
            failureThreshold: 30
            httpGet:
              path: /healthz/ready
              port: 15020
              scheme: HTTP
            initialDelaySeconds: 1
            periodSeconds: 2
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 4000m
              memory: 2024Mi
            requests:
              cpu: 100m
              memory: 128Mi

          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          - name: POD_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
          - name: INSTANCE_IP
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.podIP
          - name: HOST_IP
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: status.hostIP
          - name: ISTIO_META_POD_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.name
          - name: ISTIO_META_CONFIG_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: ISTIO_META_USER_SDS
            value: "true"
          - name: ISTIO_META_ROUTER_MODE
            value: sni-dnat
          volumeMounts:
          - name: ingressgatewaysdsudspath
            mountPath: /var/run/ingress_gateway
          - name: istio-certs
            mountPath: /etc/certs
            readOnly: true
          - name: ingressgateway-certs
            mountPath: "/etc/istio/ingressgateway-certs"
            readOnly: true
          - name: ingressgateway-ca-certs
            mountPath: "/etc/istio/ingressgateway-ca-certs"
            readOnly: true
      volumes:
      - name: ingressgatewaysdsudspath
        emptyDir: {}
      - name: istio-certs
        secret:
          secretName: istio.istio-ingressgateway-service-account
          optional: true
      - name: ingressgateway-certs
        secret:
          secretName: "istio-ingressgateway-certs"
          optional: true
      - name: ingressgateway-ca-certs
        secret:
          secretName: "istio-ingressgateway-ca-certs"
          optional: true
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 2
            preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
          - weight: 2
            preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - ppc64le
          - weight: 2
            preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - s390x
---

currently we are blocked, please advice how to proceed

@howardjohn - I've tried to do port forwarding to get the heap as you suggest via kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=itsio-pilot -o jsonpath='{.items[0].metadata.name}') 8080:8080 and get error: error: error executing jsonpath "{.items[0].metadata.name}": Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template: 	template was: 		{.items[0].metadata.name} 	object given to jsonpath engine was: 		map[string]interface {}{"apiVersion":"v1", "items":[]interface {}{}, "kind":"List", "metadata":map[string]interface {}{"resourceVersion":"", "selfLink":""}}
Can you please add the full command?

any idea how to provide the pprof data as the port forwarding to pilot is failing...is there any instruction how to provide it?

You command has a type itsio-pilot. You can just do kubectl -n istio-system port-forward svc/istio-pilot 8080 though

@howardjohn - when running this command it generates pprof folder with  tar and when extracting it I see .pb file which is half empty,pprof.pilot-discovery.alloc_objects.alloc_space.inuse_objects.inuse_space.001.pb
Should it be like this?

I normally do  pprof -http=:8090 /home/howardjohn/pprof/pprof.pilot-discovery.goroutine.001.pb.gz which starts a local server you can browse. But as far as sharing it, I think the two options are exporting to svg (something like go tool pprof -svg profile300.gz is what I got from https://coder.today/tech/2018-11-10_profiling-your-golang-app-in-3-steps/) or upload it here

You can also send it to me over slack or email if you are concerned about sensative info, although I don't think it has any

@howardjohn -

Not sure if this is related to our scenario , but currently we are not using the 'inject` label for each pod as discussed before, is there a way somehow to make pilot (with some config) to reduce the amount of work (maybe there is things which is not necessarily needed for prod) ?

we are using virtual service for each pods , is there a way somehow to provide only one virtual service to rule them all (all our pods)  ?  if yes please provide a reference , I think that for us this may help to solve the issue...

Btw,
which slack channel I should post this, or which email ?

Slack channel + instructions are on https://istio.io/about/community/join/. My email is my github name @google.com.
Using the Sidecar config you can specify what config to send to each envoy. So you can specify that each pod should only get config for services in its own namespace for example.
I don't think consolidating VS will help, internally they will be modeled essentially the same. Either way -- if you are seeing 53GB usage something is going very wrong (memory leak, etc), so i don't think a microoptimization would help much.

Thanks, As we are not using side car yet for all the services I think this wouldn't help us to reduce the pilot memory consumption...

It still would, say you have namespace X with all injected, but all other namespaces are not yet injected. The proxies in X will still get config for every service. But you can use the Sidecar resource and they will just get config for services in namespace X (or whatever you configure)

This is probably fixed by #14782. It would be great if you can try the 1.3rc1 and let us know

Presumed fixed in 1.3 -- please open and issues and mention me if you are still seeing issues

In my scene， goroutines and memory increase sharply while there're not many pods creating.
istioctl version
client version: 1.6.10
pilot version: 1.5.0
pilot version: 1.5.0
pilot version: 1.5.0
pilot version: 1.5.0
pilot version: 1.5.0


Update yarl and mypy versions

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.85%. Comparing base (23cdddd) to head (e53834c).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   98.85%   98.85%
=======================================
  Files           3        3
  Lines          87       87
=======================================
  Hits           86       86
  Misses          1        1

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


Using information schema

resolves #113 https://github.com/dbt-labs/dbt-bigquery/issues/113
Using information_schema instead of TABLES to fetch catalog data, which limits access level needed to generate DBT docs.
Checklist

[x] I have signed the CLA
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] I have updated the CHANGELOG.md and added information about my change to the "dbt-bigquery next" section.

currently running into the same issue and found this PR, looks like there are conflicts in this branch.

@hassan-mention-me Any updates on this?

This is something General Mills is also interested in seeing

Closing this in favor of getting #364 over the line


Video loading taking more time

While click play button it takes more time steaming to play the video, can't play play like you-tube and face-book videos(level by level streaming) please help.

it depends on video engine.  android.media.MediaPlayer is slow. you can change to ijkplayer by one line code.

@lipangit 你好，请问一下如果切换成ijkplayer，是否需要编译几个  .so库放进项目里？

理论不需要，先试试再说


Regex for ENV not properly matching unless line ends in \n or "

Let's improve the process to be fix these edge-cases if we can isolate them.

As discussed I will assign this to me.

@sourishkrout tweaked the behavior to support two new use cases:

export shell expressions, e.g.

export LICENSE=$(cat ../LICENSE)

export multi line, e.g.

export PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA04up8hoqzS1+
...
l48DlnUtMdMrWvBlRFPzU+hU9wDhb3F0CATQdvYo2mhzyUs8B1ZSQz2Vy==
-----END RSA PRIVATE KEY-----"

Good stuff @christian-bromann!


5.4.4-beta.3

Opening a new issue to prepare for v5.4.4-beta.3:

[ ] Update Changelog (hopefully automatic, as suggested)
[ ] Binary testing (hopefully also on a Windows VM)
[ ] Staged roll out
[ ] Schedule tweet

Only for non-beta releases:

Announcement API
Update cask, download links

Previously discussed here.
Continuing with https://github.com/getferdi/ferdi/issues/415 after working hours and taking care of binary testing, changelog and release.

Add support for unlocking with Touch ID https://github.com/getferdi/ferdi/pull/423- Add find in page feature https://github.com/getferdi/ferdi/issues/67 https://github.com/getferdi/ferdi/issues/432
Add custom dark mode handler support (#445)
Add option to disable reload after resume https://github.com/getferdi/ferdi/issues/442
Fix and enhance context menu https://github.com/getferdi/ferdi/issues/357 https://github.com/getferdi/ferdi/issues/413 https://github.com/getferdi/ferdi/issues/452 https://github.com/getferdi/ferdi/issues/354 https://github.com/getferdi/ferdi/issues/227
Fix regresssion around muting services https://github.com/getferdi/ferdi/pull/428

Re-tagging to add:

Window title now reflects service name #213

I'll be waiting this evening to publish the draft release. In the meantime, I think we would want to re-tag to include the latest translations (leaving https://github.com/getferdi/ferdi/pull/462 for now) and opened pull requests in the recipes repository. Otherwise LGTM 👍

Published v5.4.4-beta.3.


User-customizable option to specify depth?

Currently I only see 5 or 6 levels of depth rendered. Is it possible to make this customizable?

What do you mean by "depth"? I don't see any limit on this.

If the markdown has 10 levels of indentation, I only see up to Level 6 rendered...
Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
####### Level 7
######## Level 8

Ok. My bad... I was using the # for indentation when I should have used the * indentation.

# in Markdown represents headings, there are only h1 ~ h6 in HTML, so more #s won't work.


SSR filtering needs to be fixed and reimplemented

Godot version
4.0 RC 1 and earlier
System information
All systems
Issue description
SSR currently always runs at half resolution. Accordingly, before running it downsamples the color texture, the depth texture, and the normal-roughness texture to half resolution.
Currently, this code just takes one out of each block of 4 pixels which results in artifacts. There is a branch to filter during the downsample, but it is never used as it was causing some problems during the initial implementation.
We need to investigate why the filtering code was causing problems and then re-enable it.
In the long term, the filtering should be shared with SSAO and SSIL which already use a smart downsampler for the depth buffer.
Steps to reproduce
N/A
Minimal reproduction project
N/A

The key issue with the current filtering implementation is that it bleeds pixels across objects.
The most problematic is with z values :
On objects boundaries, instead of having one abrupt z change from one pixel to its neighbor, filtering produces a gradient of z values. When we march through this boundary, the ray has more opportunities to go below the thickness threshold as there are simply more pixels filling this gap.
      Without z interpolation                                With z interpolation

z = 0 ------------------------ far                    z = 0 ------------------------ far
        object 1          /                                   object 1
      xxxx              /                                   xxxx
          xxxx        /                                         xxxx
              xxxx  /                                               xxx
                  /  <- no hit                                         x  <- hit
                /                                                     /
              /                                                     /   o
            /     oooooooooooo                                    /      ooooooooooo
          ray       object 2                                    ray        object 2
z = 1 ------------------------ near                    z = 1 ------------------------ near

Interpolation of :

z values generate unwanted hits which creates noisy trails on the back of objects.
color causes objects to bleed onto its neighbors
normal / roughness should be less noticeable

One of the workarounds could be to not filter across objects, either by using a thickness parameter similar to the raymarching pass, or another buffer providing for example object hashes.

@Flarkk Aren't those only issues with naive filtering (i.e. averaging the neighbouring pixels only). We should probably reject samples based on similarity.
For example, for depth we could take min depth instead of average, then reject any color samples based on a threshold distance from min depth.

Yes those are with the current naive filtering.
And yes, having a depth threshold that operates for example on color or even on depth itself is what I meant by "thickness".


Strip stars in comments

It's petty common to write comments like the following:
/*
 * @component MyApp:Web
 */

Note a leading star symbol in the beginning of the comment like. Unfortunately threatspec doesn't handle this case correctly, so that the component will be ignored. There is a workaround:
/*
   @component MyApp:Web
 */

But it would be good to update the tool to work with multiline comments which have leading stars. This patch tries to address this little problem.
(the file contains some trailing spaces which my text editor kindly removed - I hope it's fine)

I have updated the patch with the following:

Strip leading stars and whitespaces in extended lines.
Use a regex to remove leading whitespaces and stars. It keeps whitespaces after stars since there maybe YAML.
Added a couple of tests.


Quick start for Docker Swarm might fail

(Thank you so much for your awesome work!)
The documentation provides a quick start for Docker Swarm through running multiple CLI commandos:
$ docker service create --name galera-seed --replicas 1 -e XTRABACKUP_PASSWORD=<pass> \
     colinmollenhour/mariadb-galera-swarm seed
 $ docker service create --name galera --replicas 2 -e XTRABACKUP_PASSWORD=<pass> \
     colinmollenhour/mariadb-galera-swarm node tasks.galera-seed,tasks.galera
 $ docker service rm galera-seed
 $ docker service scale galera=3

In my case, running Docker 18.09 CE on Ubuntu 18.04 on Digital Ocean, all Galera Tasks will be assigned the same container IP, resulting in a situation where the Galera nodes will not find each other, looping around in "waiting for 2nd IP.."
In my test setup, I created an overlay galled "galera" first and attached all services to this network.
The Galera main service will start up then.
Suggestion: Enhance the docs accordingly.

Thanks for the suggestion. Docs updated!


[meta] Add audio recording capability

What's the overarching idea and why is this additional feature necessary?
Sparrow currently has no autonomous audio recording functionality of its own.
Describe into what individual steps/features your suggestion decays, and outline their basic ideas in one sentence each

[x] figure out which library to use to interface with the microphone. PyAudio is an option, and birdnetlib shows how to use linux's arecord. But could also go for pvrecorder. #28
[x] #28
[x] figure out possible multiprocessing for concurrent running and analyzing
[ ] integrate into runner system

Also possible as a separate smaller package that chops up a stream and places snippets into a watch_folder for the runner to analyse.

Maybe there are libraries that can be used?

There's pvrecorder that does the chopping up. It's a rather big dependency, but does not rely on external dependencies.
Then there's also arecord  (available on linux as a separate app/package) which we would have to call via python and wrap in a class that allows to change the parameters upon model exchange (demanded sampling rate and interval length of different models can be different, and offloading this to the preprocessor to resample everything and handle mismatching lengths imho introduces too much overhead and complexity).
Finally, there's pyaudio  and python-sounddevice that can be used to write the stream-chop-save functionality with.
Probably comes down to ease of use and simplicity. bridnetlib examples use arecord on linux

Tried out different ones today. pyaudio seems to work best, but does depend on the external portaudio.

This now happens in iSparrowRecord. Closed


Update CoreCLR 'build from source' instructions

The instructions talked about the differences between the Release and Debug configurations without mentioning the difference in optimization level, which is the primary reason why the Release configuration is painful for debugging.
Title
On the title describe
what you've fixed (or created) with this Pull Request (PR).
Summary
Insert a short (one or two sentence) summary here.
Fixes #Issue_Number

Note: The "Fixes #nnn" syntax in the PR description causes
GitHub to automatically close the issue when this PR is merged.
Remove that line if you don't have issues associated with this
PR. Click on the Guidelines for Contributing link above for details.

Details
Explain your changes, and why you made them. If that
information is already available in the issue referenced
above, just referencing the issue is preferred to copying
the text.
This may not be necessary depending on the scope of the PR
changes. For example, "fix typo in introduction.md" is
sufficient to describe that PR.
Suggested Reviewers
If you know who should review this, use '@' to request a review.

@adityamandaleeka,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot


chore update fe snapshot to 1.2 and fix auditloader compile error

Proposed changes
Issue Number: close #xxx
Problem summary
This PR #14925 change some field of AuditEvent, so we need to upgrade the fe-core's SNAPSHOT to 1.2
because auditloader depends on fe-core
Already push the 1.2-SNAPSHOT to
https://repository.apache.org/content/repositories/snapshots/org/apache/doris/fe-core/1.2-SNAPSHOT/
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[x] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[x] No Need

Does it need to update dependencies:

[x] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 35.5 seconds
load time: 494 seconds
storage size:<PHONE_NUMBER>6 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230110195049_clickbench_pr_77089.html


Wait for pod evictions when draining, up to 60 seconds.

The drainer attempts to evict pods but doesn't wait at all (?) for evictions to complete which does not allow time for graceful termination of pods that need it.

Is there any appetite for this change?
Draining nodes w/o waiting at all for pods to be evicted isn't ideal behavior.
This can lead to ungraceful pod termination if the host is rebooted after the drain.


Unrecognised Type (Text)

Using the latest version of the repo, and changing the sample code to the following
command.CommandText = "CREATE TABLE integers(foo text, bar INTEGER);";
var executeNonQuery = command.ExecuteNonQuery();

command.CommandText = "INSERT INTO integers VALUES ('3', 4), ('5', 6), ('7', NULL);";

and PrintQueryResults changed to
if (queryResult.GetFieldType(ordinal) == typeof(string))
                    {
                        var sval = queryResult.GetString(ordinal);
                        Console.Write(sval);
                    }
                    else
                    {
                        var val = queryResult.GetInt32(ordinal);
                        Console.Write(val);
                    }

I get the unrecognized type error.
But if I change the DuckDBType enum to
DuckdbTypeVarchar = 17

then it works. This error existed on the previous version but the latest version of DuckDB.Net was released before I was finished investigating. Note that on the previous version the required value to get it work was 20, not 17. Does this mean that extra types should be inserted in the enum to get it up to at least 17?

The DuckDBType enum is missign some members.

How can I go about find which enum members are missing? Are they listed anywhere in the duckdb repo?

https://duckdb.org/docs/api/c/types

Fixed by 73171681cefc0a605ddd5895656b9e900d170381


Added lxc-dev package for fix build in debian

Earlier, when building lxd, I got an error in debian 10/11, now I found a solution in this issue. To solve this problem, you just need to install the lxc-dev package
stacktrace:

$ make

go get -t -v -d ./...
CC="cc" CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" go install -v -tags "libsqlite3"  ./...
gopkg.in/lxc/go-lxc.v2
# pkg-config --cflags  -- lxc
Package lxc was not found in the pkg-config search path.
Perhaps you should add the directory containing `lxc.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lxc' found
pkg-config: exit status 1
make: *** [Makefile:28: build] Error 2

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

The instructions we've got listed specifically state on Ubuntu. The Ubuntu LXC package uses liblxc-dev for that. Debian has a different name of lxc-dev.
It would be incorrect and may actually cause install failures to add both liblxc-dev and lxc-dev.
It's pretty common to have slight package name differences between distributions so when following instructions for another distro, one will have to do a bit of research when hitting a missing package to find the equivalent for their system.


Correlate messages across a distributed system

I would like to have a way of knowing why a message was processed - where it originated from, which user at the application-layer caused that message to be published and consumed, and things like that. I tend to think of messages like deferred HTTP requests.
In the HTTP world, I'd be able to add headers to the request like x-conversation with some unique ID, that can then be harvested & passed through as work ripples around a distributed system. This is really useful for tracing work and user journeys. I'm able to use the same mechanism to decide how to handle requests, for example if I'm A/B testing.
Having talked to @payman81, we think this is possible via something like

JustSaying makes a message Envelope (analogous to an HTTP request body) a 1st-class citizen, and available to handlers when they process messages.

the envelope can basically expose the SQS metadata, which opens up a set of enhancements like being able to know dwell times of the underlying transport, how many attempts that the message has had by a given handler, and some other stuff

To (try to) avoid a breaking change, we talked about introducing a base class for Handler with a virtual method that consumers can choose to override, or not, which has access to the Envelope, and can make decisions based on it.

We solved this by just adding a dict<string, string> as the Headers property on the message, and added middleware to put correlation ids on the outgoing messages. If correlation ID exists on incoming message, we pass that through to outgoing messages. In fact, we have the same going on with HTTP requests, so we can track API requests and bus messages and correlate these.
We should consider this carefully, but this might be a useful feature.

@dariusdamalakas that sounds like what we want too. Do you have code to share?

It's not trivial, as we've built a bus middleware concept around the IHandler interface, similar to what Owin gives with its middlewares, in a similar fashion with app.Use(justSayingBusMiddleware). I can try and extract some of it into a gist to give an idea how we went around with it. I'd be happy to hear your thoughts whether any of it could be made generic enough to suite everyone.

@dariusdamalakas It would be great If you could send us a gist with your snippets. I think that's something people can benefit from.

@payman81, here's the gist  - bus middleware support.  Apologies for that being explicitly verbose, but I wanted to show how we are using JustEat. I'll try to explain as much possible the key concepts we have introduced. Note that in any way I am not saying this is applicable to everyone, but some ideas i would like to see implemented in one way or another in JustSaying.

We use a autofac dependency injection. We needed a unit of work handler, where dependencies would be resolved once per message.
Middleware support, similarly to what we have with the Owin pipeline.
JustSaying handlers can be chained, but there is no way how to flow the context. We have introduced IBusContext which is passed to all middlewares and handlers.
In the startup class you can see how we set up the middlewares that will be used.
@petemounce , in the startup, we set up bus correlation middleware. This is what directly relates to your topic here. You put any context in bus headers - user id, current running service, correlation id, etc.
Added IDictionary<string, string> Headers { get; set; } to the message.
BusUnitOfWorkHandler is the implementation of JustSaying handler, which internally pushes the message through the middleware pipeline, and handles the message. We could even add support for registering multiple handlers here, which is not supported by JustSaying out of the box.
IBusPublisher - this is a wrapper on top of JustSaying publisher, adds support for message mutators. You can look at this as the pipeline for the published messages.

I have added some extra in line comments to the code, so hopefully that will explain some bits.
Hope this helps, comments and feedback more than welcome.


Update Bot.cs

Added !skipfarming command
!skipfarming - w/o arguments skip current farming game(s) for current session for current bot.
!skipfarming "appID" - skip "appID" farming for current session for current bot.
!skipfarming "botName" "appID" - skip "appID" farming for current session for "botName".

https://github.com/JustArchi/ArchiSteamFarm/wiki/Performance

The primary objective of ASF is to farm as effectively as possible, based on two types of data it can operate on - small set of user-provided data that is impossible for ASF to guess/check on it's own, and larger set of data which can be automatically checked by ASF.

ASF does not allow you to choose the games that should be farmed, neither allows you to change cards farming algorithm. ASF knows better than you what it should do and what decisions it should make in order to farm as fast as possible.
I'm not sure if I want to see option like this in ASF.

I dare to tell you my opinion about this.
Well, people want ability to farm certain game, and I can understand the reasons - sometimes it's important to get cards before price drop. Yes, they can stop asf and use idlemaster instead, but why have two programs that do merely the same, if we could have one?
The problem is - I'm unsure if this patch is the best way to achieve this. Skipping games one-by-one till you get what you want can be long enough. So, for this aim a command that skips to the needed appID would be more appropriate (and it should not add games to blacklist, but just skipping previous games, like it happens on MaxFarmingTime)
But it can be a temporal blacklist replacement, for those who don't want extra hours in the games they are planning to play on main account (I know enough people who are concerned about it). For example, if asf is running, and user won a game on sg, he could add it to temporal blacklist by this command without stopping farm, and then add it to config-file to always skip it. I would even say it would be nice if result wasn't temporal, and was actually written to config-file, but this would be too excessive feature to implement.
And I strongly dislike "%programname% knows better" attitude. That's a way to get very inconvenient and annoying software. But I would say ASF so far does not follow this way - it has enough configurable parameters and commands to make it work the way I like, because I always know better. I hope it would stay so in the future releases too.

I'm more likely to accept the command such as !play XXXXX which would stop farming and play specific appID until user tells it to stop rather than something like above altering cards farming algorithms.
It's not "programmer knows better", it's the fact that you don't use car for cooking eggs on it. ASF has quite clear objective/purpose, and I don't want to put everything and nothing in it, especially if it has negative outcome on already existing things.

If you want to use analogy you got to use better ones. Let's see:
Main purpose of the car is to ride.
Main purpose of asf is to farm cards.
Asf know better, how to farm cards.
Your car knows better, where you want to ride?
Sounds like nonsense for me. Even robo-cars developed by google and other manufacturers going to have manual controls. I believe asf should have ones too. So far I'm quite satisfied with the way it develops. With recent patches I actually have almost everything I could wish for. (Well, maybe accepting gifts would be nice... But I'm unable to find any ready implementation for it, so it's gonna wait).
I don't say that this patch is the best control we can get. I can't decide if it really useful, we need more people opinions about it. As for farming certain appID - looking at how often it's suggested, I think asf need it (sooner or later, one way or another).

Assuming you want to go from point X to point Y, and car has all required information to make all decisions regarding selection of optimal way - yes, car knows better than you how to get to given point in most optimal way, and shouldn't allow you to manually decide whether to go through point Z or A.
But as I said, I can find practical usage of suggested feature, I just can't find any practical usage of this pull request in it's current form, because in order to farm game X, you want to farm game X, not skip games Y, Z, A, B, C and D from farming.
I'm more willing to accept command like !playgame XXXXX which would stop automatic cards farming module, and switch into manual control of game that is being farmed, which doesn't have any side effects apart from you taking responsibility for the currently farmed game.
https://github.com/JustArchi/ArchiSteamFarm/issues/78
@rebel-000
I'd suggest to send new pull request following above idea, if you don't agree with it, please suggest better solution, so we can discuss it together. The major drawback of solution in this pull request is the fact that we need to execute the command multiple times, and that we can't remove games when they're added to blacklist without restart of ASF, which is not acceptable.

I have some idea, and I will send new pull request but most likely next week.


stratified performance quantification

Initial attempt at addressing issue #1
The code was developed based on email correspondence between @ACEnglish @nate-d-olson and @jzook.
The commit includes three files. One which annotates the benchmark vcf output from truvari and counts tp, fp, fn, ect. Then provides different methods for calculating performance metrics, including truvari's default method and methods described in the GA4GH best practices paper (though these are probably not necessary. The other two files are for generating the multiintersect bed for use in the stratified performance quantification.
The code runs but has not been thoroughly tested. Primarily becuase I am not sure a good way to test the results other than compare the output to hap.py stratified results which is not particularly straight forward.
Another open question is what input vcf format should the command accept; raw truvari base and call vcfs, base and call vcfs formatted usingt the truv2ga4gh command, or a combined ga4gh formatted base and call vcf.

Hey,
This looks like a good start. I've changed the base branch to feature/perf_qual. I'll go ahead and merge this pull request before adding you as a developer to this repo. This is probably going to take a few iterations to get right, so it'll be easier for you to directly contribute to the repo and we'll use git-flow to work in a feature branch before committing to develop.
I'll take a pass at making in-code changes as part of the review and email you when I'm done with notes.


Ignore folders

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when I have to turn off arcana to use the latex suite plugin.
Describe the solution you'd like
A clear and concise description of what you want to happen.
A ignore fTolder list inside settings to not put the:
---
arcana: {}
---

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Alternatives to this issue would be manually forking and having my own version or pull request.

Hi, what version of Arcana are you running? As far as I am aware, this should be gone in the later versions unless there is a bug in the code.
Did you build from source, or install from Obsidian marketplace?

Also which arcana tool where you using?

Installed from marketplace and source. When working on files is adds the aforementioned:
---
arcana: {}
---

Are you using the latest version?


Scorecard touchups

Followup to https://github.com/GreenInfo-Network/seattle-building-dashboard/pull/130#issuecomment-2515922326

Removes old code not being used for city scorecard
Updates CSS on print better than previous
Fixes pie chart labels

┆Issue is synchronized with this Asana task

Per conversation in Slack, merging without review to push to staging


(REQUEST)smooth bomb planting side and and bomb timer

As title says
example:

This can be done easily if you have the brains

We already have bomb timer.

Try it by your self.
Just learn C++

We already have bomb timer.

Lol it takes up half of the screen

This can be done easily if you have the brains

i didint say easy or something like that

Try it by your self.
Just learn C++

K

This can be done easily if you have the brains

Then do it if u can

This can be done easily if you have the brains

Then do it if u can

I have done something similar to this already but i shall leave it to your capable hands to type your own code


Update flyway-core to 7.5.1

Updates org.flywaydb:flyway-core from 6.5.7 to 7.5.1.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.flywaydb", artifactId = "flyway-core" } ]

labels: library-update, semver-major

Superseded by #1131.

Superseded by #1131.


Release 2023.01.13

This release adds the following PRs:

#93
#94
#95
#96
#97

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

v2.1.0
GitHub release

Your semantic-release bot :package::rocket:


Texas OA Data

After filing an official PIA, this is what I was sent.  Cheers!
Mr. Meyers,
The information responsive to your request can be downloaded via the following link:  https://geo-comm.sharefile.com/d-s72fbc0849fe49de9.  The Road Centerline and Site Structure Address Points (SSAP) layers include the fields responsive to your request.  SSAP includes fields for latitude and longitude, however, pursuant to the CSEC NG9-1-1 GIS Data Standard, latitude and longitude are currently optional fields so not all SSAP may have x/y information.  Please let me know if you need further assistance.
Thank you.
Patrick Tyler
Public Information Coordinator
Commission on State Emergency Communications (CSEC)

Wahoo! This is great, thanks for chasing this, @justinelliotmeyers.
I uploaded the data here: http://data.openaddresses.io.s3.amazonaws.com/cache/us/tx/20161129_CSEC_SSAP_RCL.zip

**They plan on having complete coverage by February 2017 - I will put in my calendar to do another formal PIA request so we can fill in the missing counties.


Issue 195

fixes #195

hmm It passes the python3 unittest, but 2 fails, will take a look at that tomorrow
python -m unittest discover
-------> tests.test_interface.TestInferface.test_load()
<- 0.024 tests.test_interface.TestInferface.test_load()
.-------> tests.test_interface.TestInferface.test_load_repertoire()
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 0 with validation error: MiAIRR field study.study_type is missing
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 1 with validation error: MiAIRR field study.study_type is missing
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 2 with validation error: MiAIRR field study.study_type is missing
<- 2.976 tests.test_interface.TestInferface.test_load_repertoire()
.-------> tests.test_interface.TestInferface.test_repertoire_template()
<- 0.910 tests.test_interface.TestInferface.test_repertoire_template()
.-------> tests.test_interface.TestInferface.test_validate()
<- 0.001 tests.test_interface.TestInferface.test_validate()
.-------> tests.test_io.TestRearrangementReader.test_validate()
<- 0.005 tests.test_io.TestRearrangementReader.test_validate()
.
----------------------------------------------------------------------
Ran 5 tests in 3.917s

OK

hmm It passes the python3 unittest, but 2 fails, will take a look at that tomorrow
python -m unittest discover
-------> tests.test_interface.TestInferface.test_load()
<- 0.024 tests.test_interface.TestInferface.test_load()
.-------> tests.test_interface.TestInferface.test_load_repertoire()
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 0 with validation error: MiAIRR field study.study_type is missing
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 1 with validation error: MiAIRR field study.study_type is missing
/home/franasa/syncf/PycharmProjects/airr-standards/lang/python/tests/data/bad_repertoire.airr.yaml has repertoire at array position 2 with validation error: MiAIRR field study.study_type is missing
<- 2.976 tests.test_interface.TestInferface.test_load_repertoire()
.-------> tests.test_interface.TestInferface.test_repertoire_template()
<- 0.910 tests.test_interface.TestInferface.test_repertoire_template()
.-------> tests.test_interface.TestInferface.test_validate()
<- 0.001 tests.test_interface.TestInferface.test_validate()
.-------> tests.test_io.TestRearrangementReader.test_validate()
<- 0.005 tests.test_io.TestRearrangementReader.test_validate()
.
----------------------------------------------------------------------
Ran 5 tests in 3.917s

OK

@franasa The build log has the stack error.
ERROR: test_load (tests.test_interface.TestInferface)
360----------------------------------------------------------------------
361Traceback (most recent call last):
362  File "/home/travis/build/airr-community/airr-standards/lang/python/tests/test_interface.py", line 42, in test_load
363    result = airr.load_rearrangement(self.data_good)
364  File "/home/travis/build/airr-community/airr-standards/lang/python/airr/interface.py", line 100, in load_rearrangement
365    df.to_csv(buffer, sep='\t', index=False)  # fill buffer
366  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/core/generic.py", line 3020, in to_csv
367    formatter.save()
368  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 172, in save
369    self._save()
370  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 274, in _save
371    self._save_header()
372  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 242, in _save_header
373    writer.writerow(encoded_labels)
374TypeError: unicode argument expected, got 'str'
375
376

@franasa The build log has the stack error.
ERROR: test_load (tests.test_interface.TestInferface)
360----------------------------------------------------------------------
361Traceback (most recent call last):
362  File "/home/travis/build/airr-community/airr-standards/lang/python/tests/test_interface.py", line 42, in test_load
363    result = airr.load_rearrangement(self.data_good)
364  File "/home/travis/build/airr-community/airr-standards/lang/python/airr/interface.py", line 100, in load_rearrangement
365    df.to_csv(buffer, sep='\t', index=False)  # fill buffer
366  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/core/generic.py", line 3020, in to_csv
367    formatter.save()
368  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 172, in save
369    self._save()
370  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 274, in _save
371    self._save_header()
372  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/pandas/io/formats/csvs.py", line 242, in _save_header
373    writer.writerow(encoded_labels)
374TypeError: unicode argument expected, got 'str'
375
376

I realized that earlier today and set up tox for testing.
Turns out that the Python 2.7 csv module doesn't support Unicode input  so for python 2.7.
If I use io.BytesIO, instead of io.StringIO it works, but there is no solution for both. By the way, is there a reason to keep maintaining support for python 2.7?

I realized that earlier today and set up tox for testing.
Turns out that the Python 2.7 csv module doesn't support Unicode input  so for python 2.7.
If I use io.BytesIO, instead of io.StringIO it works, but there is no solution for both. By the way, is there a reason to keep maintaining support for python 2.7?

It's not clear to me what the problem is. We are using the python 2.7 csv module for parsing the rearrangements AIRR TSV without trouble. Is it necessary to have different read code, why not just use the standard RearrangementReader and put the data into a pandas data frame?  I'll admit that I've never used pandas though...

It's not clear to me what the problem is. We are using the python 2.7 csv module for parsing the rearrangements AIRR TSV without trouble. Is it necessary to have different read code, why not just use the standard RearrangementReader and put the data into a pandas data frame?  I'll admit that I've never used pandas though...

The problem is that the issue of this PR (#195), is about using pandas to handle integer columns with missing values (I'm sorry for the uninformative title of this PR).
The simplest solution that I came with, was to use pandas to load the data avoiding the float conversion from the beginning and then converting the df back to a file object to load it into the standard RearrangementReader. This worked for python 3 with StringIO but for python 2.7 I had two find a workaround by importing  BytesIO as StringIO.  This solves the issue but that's why put this to review and also why I wanted to ask about the Python 2 support.

Sorry for the delay. Made some minor tweaks - importantly, increasing the pandas dependency to >= 0.24, which is needed for this change.
Looks ready to merge in to me.


tls based authentication

Resolves #13. Based on PR #28 by @tpo and @gandalfmagic

what a mess. closed :-D

thanks a lot having a look and working on this @pashagolub ! I'm on holidays this week and am not really able to look at vip-manager at this time.


Removed unicode() in filter_level for py3k supprt

fixes https://github.com/tweepy/tweepy/issues/782

Implemented in https://github.com/tweepy/tweepy/commit/09818085c0f8d259fff26b09a71f103ef53dd862.


Text is not being shown on desktop apps when OS DarkMode is enabled.

I just noticed the text inside the collection view from Part 2 code is not being shown on desktop apps when you have enabled the dark mode.
Steps to reproduce:

Enable Dark Mode on Windows or Mac OS.
Open the solution code for Chapter 2 (Part 2 - MVVM).
Click run on MacCatalyst or Windows.

Quick Fix: Force the color using the TextColor property of the Label. Of course, this shouldn't be the right way.
Update: The same is happening to the ActivityIndicator, it's not visible because of the background/foreground color I guess.

I added in <Label VerticalOptions="Center" TextColor="Gray"> for the first part. The main reason is because of styling that we learn about later.
I will look into the activity indicator though


refactor: Replace ArgoCD v1alpha1 references with v1beta1

What type of PR is this?
/kind code-refactoring
What does this PR do / why we need it:
Follow up PR for #964 to replace v1alpha1 references of ArgoCD to v1beta1.
Change:
Update the import path & references to use argoproj for v1beta1 ArgoCD API.
Note: v1alpha1 references are not updated in kuttl tests.

CI Linter is complaining about dead code and used params. Should we remove them? @iam-veeramalla @jaideepr97
  Running [/home/runner/golangci-lint-1.52.2-linux-amd64/golangci-lint run --out-format=github-actions --new-from-patch=/tmp/tmp-1758-IFBainwCYOUa/pull.patch --new=false --new-from-rev= --timeout 5m --exclude SA5011] in [] ...
  Error: `makeTestArgoCDForKeycloakWithDex` is unused (deadcode)
  Error: `newRoleForApplicationSourceNamespaces` - `name` is unused (unparam)
  Error: (*ReconcileArgoCD).reconcileRoleForApplicationSourceNamespaces - result 0 ([]*k8s.io/api/rbac/v1.Role) is never used (unparam)
  Error: `newRoleBindingWithNameForApplicationSourceNamespaces` - `name` is unused (unparam)

Maybe linter checks only changed files/patch. I don't see these errors on my other PRs where these files are not touched.


Fix ESP-IDF monitor command on Windows systems

The command west espressif monitordoes not work on my Windows system. The script calls the python interpreter with the string "python.exe", which executes the interpreter outside the west virtual environment.

Hi, thanks for the finding! Can you provide comment and sign-off in the commit please?

Done!

@valeriojr, please, squash your commits (there are 3..) into a single one.


It's not clear why Stage runs parallel or not

Both examples utilize
stages:

stage: Build
and yet one runs in sequence and the last one runs in parallel but there's no description as to what makes this different than the one above it other than steps are omitted for brevity.
stages:
stage: BuildWin
displayName: Build for Windows
stage: BuildMac
displayName: Build for Mac
dependsOn: [] # by specifying an empty array, this stage doesn't depend on the stage before it

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7458d5b2-1bb7-7d87-7ce6-2b0c430b0155
Version Independent ID: edf5bbd3-a3f0-5426-e985-31290f8afd05
Content: YAML schema - Azure Pipelines
Content Source: docs/pipelines/yaml-schema.md
Product: devops
Technology: devops-cicd
GitHub Login: @steved0x
Microsoft Alias: sdanie

@adamtuliper -- Adam, thank you for your feedback.  As you noted, the article states:

This example runs two stages in parallel. For brevity, the jobs and steps are omitted.

The previous example has jobs and steps under the stages, and the middle stage of that example defines two parallel instances of job under jobs.
- stage: Test
  jobs:
  - job: TestOnWindows
    steps:
    - script: echo Testing on Windows!
  - job: TestOnLinux
    steps:
    - script: echo Testing on Linux!

It looks to me like the next example behaves the same way, with two parallel instances of stage under stages.  There could be multiple jobs under each stage, some defined in parallel, as shown in the first example.
I am closing this issue now.  You are welcome to @ mention me for any followup. We hope to hear from you again.


[redux-saga] Updating libdef for 0.14.1

Hi, I've just started working on libdef for redux-saga 0.14.0.

Memo: Enhanced for v0.14.0 https://gist.github.com/8th713/16e99834c8461abd7a780cbad15183d4

I tried the above gist and noticed a possible problem.
When I use redux-saga, I often write some code like below:
import { takeLatest } from 'redux-saga/effects';

function* worker(action) {
    console.log(action.type);
}

export default function* rootSaga() {
    yield takeLatest('AN_ACTION', worker);
}

Just using takeLatest(or takeEvery) with generator functions.
This is my favorite pattern because it's easy to use.
I wanted to make that pattern typed. I struggled with flow and finally succeeded. The result is here.
/* @flow */
import { takeLatest } from 'redux-saga/effects';
import type { Effect } from 'redux-saga/effects';

type ExampleAction = {
    type: string;
}

function* worker(action?: ExampleAction) {
    if (!action) {
        return;
    }
    console.log(action.type);
}

export default function* rootSaga(): Generator<Effect,void,*> {
    yield takeLatest('AN_ACTION', worker);
}

Testing action argument is forced because Workable0 in the libdef take an action as optional.
But I know an action should be passed in in this case, testing the argument should not be required.
I'm not sure why action is typed as optional, there may be some unavoidable reasons.
In my app, I just rewrote libdef and make action parameter mandatory.
Example Repo: https://github.com/tai2/redux-saga-take-latest-typing-example

I don't know if it will help anybody here, but I came across this issue while trying to solve my own coverage gap. I've started working on an updated libdef for v0.15.x based on the .d.ts files from , and hopefully I can open a PR soon. If anybody has work already started, I'd be very happy to incorporate it.

@ironblock Thanks for taking the time to update it. There a little tool called flowgen which can auto translate .d.ts files, with some success.

@GAntoine yeah, that's a good catch. I started from the v0.13.x file already present, the v0.14.x file posted in this thread, and flowgen. Sadly, flowgen doesn't seem like it wants to play nice with the official TypeScript files. I found that a lot of output looks like this, and requires a lot of manual tweaking:
declare export function all(effects: Effect[]): AllEffectdeclare export type GenericRaceEffectDescriptor<T>= {
    [key: string]: T
};

In the end, I used it as a third reference point for "what's one answer for how this might be translated?". There are also a number of places where the official .d.ts does something that Flow doesn't support (as far as I can tell), e.g.:
export type SagaIterator = IterableIterator<Effect|Effect[]>;

This type of thing is currently getting my best approximation, and I'm looking forward to feedback and insight on the inevitable PR. The good news is that I absolutely need this for work, since it causes a huge gap in Flow coverage. We use redux-saga for all API interaction, and Flow doesn't seem to understand that the reference passed into call() is going to be invoked. Blech.

@ironblock is

export type SagaIterator = IterableIterator<Effect|Effect[]>;

equivalent to this?

type _Effect = Effect | Effect[]
export type SagaIterator = IterableIterator<_Effect>;

Whoever starts working on this issue, be aware, that current version of redux-saga is 0.16.0


Allow running sniproxy as a gateway

root@dev4-20-tunapi:/usr/local/bin# ./sniproxy --dns-redirect-ipv4-to=<IP_ADDRESS>  --tls-port=3133 --http-port=3134 --forward-proxy=http://<IP_ADDRESS>:3128
2023/10/10 11:04:19 [info] cmd: run sniproxy with the following configuration:
{
"DNSListenAddress": "<IP_ADDRESS>",
"DNSPort": 53,
"DNSUpstream": "<IP_ADDRESS>",
"DNSRedirectIPV4To": "<IP_ADDRESS>",
"DNSRedirectIPV6To": "",
"DNSRedirectRules": [
"*"
],
"DNSDropRules": null,
"HTTPListenAddress": "<IP_ADDRESS>",
"HTTPPort": 3134,
"TLSListenAddress": "<IP_ADDRESS>",
"TLSPort": 3133,
"BandwidthRate": 0,
"BandwidthRules": {},
"ForwardProxy": "http://<IP_ADDRESS>:3128",
"ForwardRules": null,
"BlockRules": null,
"DropRules": null,
"Verbose": false,
"LogOutput": ""
}
grk@dev4-20-tunapi:~$ curl -Iv https://<IP_ADDRESS> -k

Trying <IP_ADDRESS>:443...
Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 443 (#0)
ALPN, offering h2
ALPN, offering http/1.1
successfully set certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
TLSv1.3 (OUT), TLS handshake, Client hello (1):
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <IP_ADDRESS>:443
Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <IP_ADDRESS>:443

in sniproxy terminal output
...
2023/10/10 11:07:41 [info] sniproxy: [4] start tunneling to :443
2023/10/10 11:08:05 [info] sniproxy: [5] start tunneling to mail.google.com:443
...
in upstream squid access.log
...
1696928862.134      1 <IP_ADDRESS> NONE/400 3861 CONNECT :443 - HIER_NONE/- text/html
1696928899.311 240197 <IP_ADDRESS> TCP_TUNNEL/200 2748 CONNECT mail.google.com:443 - HIER_DIRECT/<IP_ADDRESS> -
...
looks like fallback to TCP  destination IP doesn't work properly, when in https connection there is no SNI field
when SNI field is present (https://mail.google.com) sniproxy works properly

Yeah but that's natural for a SNI proxy, the only place where it can learn about the target endpoint is the SNI field.

The problem is that there's no other signal in a TLS connection apart from SNI that can be used to discover the target address.

hm... even from  IP header in raw TCP? Maybe from  client handshake before TLS connection. I'm sure there is some way, but.... this is your code and you're most oriented what can be done and what can't. I don't want be too smart here because I'm not ;)

I think I found "the way" in other project. I hope it could be an inspiration for sniproxy to resolve this issue.
https://github.com/cybozu-go/transocks/blob/master/original_dst_linux.go
Looks like this code works in linux only, regarding to NAT redirect.

@grzech0 this is a case when you redirect connections locally using iptables. Alternative way would be to parse manually /proc/net/tcp for connections that were redirected using iptables -t nat redirect.
The thing is that this is a bit different from how sniproxy is supposed to be used. For instance, you won't be able to do this trick on a mobile device (originally, I made it for debugging mobile apps).
A more sophisticated way would be to allow using sniproxy as a gateway (basically, replacing the router), this approach is much more complicated, but on the other hand it does not limit it to a single device and does not require root access on the devices which traffic you want to inspect.

You're absolutely right. I fact, I try to use sniproxy on linux gateway for containers. My goal is to transparently redirect all https/http traffic to upstream squid, to have ACLs working without getting into squids bump/splice.
Squid is configured as explicit proxy and is placed in same network segment but not on the default route path.

I'll look into the gateway approach when I have free time, it is indeed may be very useful.

Thank you in advance


Cannot get schema whose $id starts with #

What version of Ajv are you using? Does the issue happen if you use the latest version?
8.11.0
Ajv options object
I'm using the default options.
JSON Schema

{
  "type": "object",
  "definitions": {
    "def1": {
      "$id": "#number-property",
      "type": "number"
    },
    "def2": {
      "$id": "number-property",
      "type": "number"
    }
  },
  "properties": {
    "property1": {
      "$ref": "number-property"
    }
  }
}

Your code

'use strict';

const assert = require('assert')
const Ajv = require('ajv')

const schema = {
  type: 'object',
  definitions: {
    def1: { $id: 'number-property', type: 'number' },
    def2: { $id: '#number-property', type: 'number' }
  },
  properties: {
    property1: { $ref: 'number-property' },
    property2: { $ref: '#number-property' }
  }
}

const ajv = new Ajv()

ajv.addSchema(schema)

assert.ok(ajv.getSchema('number-property'))
assert.ok(ajv.getSchema('#number-property')) // fails, returns undefined

What results did you expect?
To get the schema by #number-property reference

This is not a bug.
IDs that start with hash are local anchors in draft-07 (which is the default JSON Schema spec when you import from "ajv"), the later spec versions (that you can use with other imports) removed it and replaced with $anchor.
So you cannot find them in the global namespace of all Ajv schemas with getSchema.
You can retrieve these subschemas if you add $id to the root of your schema, e.g. $id: "mySschema" or $id: "https://example.com/mySchema" (the latter is closer to the spec, root schema $id should be an absolute URI), then you would be able to reference subschemas with anchors as "mySschema#number-property" (or "https://example.com/mySchema#number-property")


Configure OptimizeBufferReuse = true by default

Along with IncludeEventProperties = true and allow renderedMessage to be configured using Layout (Default = ${message})
Resolves #3

@AlanBarber I now see that some of the code comes from:
https://github.com/splunk/splunk-library-dotnetlogging/
And my optimizations to this code (Skipping StringBuilder) will get lost when they finally releases a NetCore-edition of their library that can be consumed using nuget.

@snakefoot Don't worry, at this point it seems they have no desire to release a NetCore edition of the library.  I asked them about it a year ago here https://github.com/splunk/splunk-library-dotnetlogging/issues/24 and there is even a pull request https://github.com/splunk/splunk-library-dotnetlogging/pull/27 that has been ignored for 2 months.
Since it is licensed under Apache 2.0 I'm fine with making improvements to their code and treating it as a fork at this point.


Code compatability with the 'robust fine-tuning ~' paper

Hello, thank you for sharing the great research!
My question is, is this code version easily compatible to the work https://github.com/mlfoundations/wise-ft ??
(since that work is from same research group)
Or, is the overall code structure modified?
Thank you.

Of course I found a lot similarities between two repos,
But there seem quite number of modification or structural differencies.
If I need to ablation on both of them, which one do you recommend to start from?

Hi @InugYoon, thanks for the interest in our work!
This codebase shares many similarities with the WiSE-FT codebase, although there are some differences. The most important one is that in this codebase we do not fine-tune the classification heads for each target task, in order to maintain the open-vocabulary nature of the models we fine-tune. The classification heads are initialized using the zero-shot text encoder from CLIP and remain frozen during fine-tuning (see https://github.com/mlfoundations/patching/blob/main/src/heads.py). This codebase also supports more downstream tasks (see https://github.com/mlfoundations/patching/tree/main/src/datasets). Overall, this codebase should be a good starting point, let us know if you run into any issues!

Thank you for your kind and clear explanations!
Okay, I'll refer to the codes in this repo.
Thank you for fast reponse!


Provide option to validate generated links

From #57: it could be nice to be able to build docs with some option that, much like our test suite now does, validates all the codeautolink targets. Sphinx's linkcheck doesn't really work for us, because the links are inserted to the final HTML.
Perhaps codeautolink_validate: bool = False in configuration.

Then again, we pull the link targets directly from Sphinx's own inventory. And given that we trust it, there shouldn't be any issues. So as long as our own test suite passes with comprehensive cases, we should be ok.


(feature request) More hierarchical menu properties: Timber\MenuItem::$parent and Timber\Menu::$flat_items

Expected behavior

The MenuItem class should have a parent field so you can traverse up the hierarchy.
The Menu class could also implement a $flat_items array so people can loop over all the menuitems in a menu without having to use recursion or a stack array.

Actual behavior

The MenuItem class does not have a parent property.
The Menu class does not provide flat_items property, a list of all the menu items it contains, only the direct children.

I'm using the following: https://gist.github.com/rubenvincenten/ac9ccf53861a06721c26e88b3b855924
I need this because when you have a page 5 levels deep, and a menu only has two levels, then you might want to select one of the ancestors. The code in the gist does that dynamicly but the step to get all the items is just obnoxious if you ask me...

One could also decide to use MenuItem::$menu that refers to the actual Timber\Menu object. Although, $menu is not maybe not descriptive enough...

@rubenvincenten Sounds like a good idea. Would you be up to creating a pull request for this?

Good suggestion but it was never followed up upon. Closing this for now, but if you still want to open a PR, please do!


docs: update template-development.md

Description

Fix package.json "supportedProtocols" example (use a list of values instead of a string)
Restate the "template" folder explanation

@nickshoe thanks but here we just store a copy of docs, please replicate PR in https://github.com/asyncapi/generator/blob/master/docs/template-development.md 🙏🏼

@derberg here: https://github.com/asyncapi/generator/pull/933


Addon resolution issue

when i open the Addon i can't bress any button to make the magic happened because my resolution is 1366x768 and the windows of the addon takes the whole screen and it doesn't let me resize it.

Have you tried alt+clicking the window and dragging it up in order to reach the buttons?

yup didn't work!

If you are using Windows, please try https://www.youtube.com/watch?v=0vXfRDcce_I
If you are using Linux, press Alt+F7 and it will allow you to reposition the current window.

Closing due to inactivity


Add nlargest and nsmallest function in groupby

Add nlargest and nsmallest function in groupby

Codecov Report

Merging #654 into master will decrease coverage by 2.46%.
The diff coverage is 96%.

@@            Coverage Diff             @@
##           master     #654      +/-   ##
==========================================
- Coverage   93.24%   90.77%   -2.47%
==========================================
  Files          32       32
  Lines        5267     5289      +22
==========================================
- Hits         4911     4801     -110
- Misses        356      488     +132

Impacted Files
Coverage Δ

databricks/koalas/missing/groupby.py
100% <ø> (ø)
:arrow_up:

databricks/koalas/groupby.py
86.37% <96%> (+0.66%)
:arrow_up:

databricks/koalas/usage_logging/__init__.py
23.14% <0%> (-74.08%)
:arrow_down:

databricks/koalas/usage_logging/usage_logger.py
50% <0%> (-50%)
:arrow_down:

databricks/koalas/__init__.py
76.92% <0%> (-7.7%)
:arrow_down:

databricks/conftest.py
90.69% <0%> (-6.98%)
:arrow_down:

databricks/koalas/frame.py
92.77% <0%> (-1.81%)
:arrow_down:

databricks/koalas/plot.py
92.51% <0%> (-1.58%)
:arrow_down:

databricks/koalas/utils.py
97.2% <0%> (-0.7%)
:arrow_down:

databricks/koalas/testing/utils.py
77.35% <0%> (-0.63%)
:arrow_down:

... and 3 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 f0f1859...0bac256. Read the comment docs.

I think there is no need change old DataFrame.nlargest DataFrame.nsmallest, Series.nlargest and Series.nsmallest function. Because there are differnt mechanism and parameter between them.

Thanks, @RainFung for working on this.


Implement new/upcoming endpoints

fixes #242
fixes #243

Codecov Report

Merging #244 (8f27164) into main (776492c) will decrease coverage by 0.00%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
- Coverage   69.35%   69.34%   -0.01%
==========================================
  Files         107      109       +2
  Lines        6200     6225      +25
  Branches      492      493       +1
==========================================
+ Hits         4300     4317      +17
- Misses       1783     1791       +8
  Partials      117      117

Impacted Files
Coverage Δ

pyEX/client.py
56.99% <ø> (ø)

pyEX/tests/test_api.py
100.00% <ø> (ø)

pyEX/tests/test_api_client.py
92.40% <ø> (ø)

pyEX/refdata/symbols.py
78.19% <50.00%> (-1.97%)
:arrow_down:

pyEX/refdata/isin.py
75.00% <75.00%> (ø)

pyEX/refdata/ric.py
75.00% <75.00%> (ø)

pyEX/refdata/__init__.py
100.00% <100.00%> (ø)

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 776492c...8f27164. Read the comment docs.

separate into 2 PRs


"insert type signature" does not respect qualified imports

For example, inserting a type signature for the expression test below causes an error because test :: Ratio Integer is inserted instead of test :: Real.Ratio Integer.
import GHC.Real ((%))
import qualified GHC.Real as Real

test = 4 % 5

I'm using ghcide version: 0.2.0 with GHC: 8.6.5.

I was literally coming here to post this :laughing:
It's not too bad, since the next quickfix will be the qualified version, but it is enough to break my "flow".
Since our codebase at work uses qualified imports everywhere, that means ghcide is less amazing of an experience (though still amazing! :smile:).
I might be interested in taking a stab at this as well if anyone can provide some breadcrumbs or direction.

I was literally coming here to post this 😆

Great minds think alike 😉
By the way, I just thought of something that may need to be taken into consideration when fixing this issue. In essence: what to do when the inferred type signature contains types that are not in scope in the current module? Let's say we have the following block of code:
import Control.Concurrent (myThreadId)

someThreadId = myThreadId

Inserting a type signature will insert someThreadId :: IO ThreadId, which will cause an error since ThreadId is not in scope. Generally speaking, it's entirely possible for types in the inferred type signature to be out-of-scope, and I think -- while fixing this issue -- we should decide how this should be handled.
Also, what if an inferred type is not exported by any of the current dependencies, so that a new dependency needs to be added in the case the user wants to insert a type signature?
I don't have an example at hand, but it's possible that a module exports a value whose type signature includes a type constructor that isn't exported by the library in question, thus requiring that a new dependency is added -- which I don't think ghcide is capable of (yet).
I think the best solution would be to make it configurable, and ignore the missing dependency-case until ghcide knows how to manage dependencies.

Related issue: #726
By the way, if this is a good first issue then I'd love a couple of pointers to get started hacking on ghcide.

I'm not sure this is a good first issue... But really, being motivated and caring about something makes something a good first issue for you, so I'll give you a few hints - but I'm not fully sure what the answer looks like.

https://github.com/digital-asset/ghcide/blob/826e886adac32378cb8a9f1ad735ca9234806eab/src/Development/IDE/Plugin/CodeAction.hs#L93-L131 seems to be the part which inserts type signatures and suggests them. I found that by searching for "insert type signature" in this repo.
https://github.com/digital-asset/ghcide/blob/826e886adac32378cb8a9f1ad735ca9234806eab/src/Development/IDE/Plugin/CodeAction.hs#L490-L512 seems to be the bit that generates the textual suggestion.

It seems we are processing the text from a GHC warning. So does the GHC warning get the qualification right? If not, that might be one that is better fixing upstream in GHC. If you want to hack it locally in Ghcide, then you might need to parse the type signature, and go through type by type trying to resolve it. That probably needs a current environment. Fixing it upstream in GHC is the "best" way to solve it (or even just turning it into a GHC bug is a good first step), while fixing it in Ghcide has a much shorter turnaround to getting a working result.

Thank you Neil.
If I do the following:

stack --resolver=lts-14.0 new qualified-sig
cd qualified-sig
Add

ghc-options:
  - -Wall

to package.yaml

Add the code snippet

import GHC.Real ((%))
import qualified GHC.Real as Real

test = 4 % 5

to src/Lib.hs

Run stack build

then GHC correctly outputs the qualified name in a warning:
/Users/runesvendsen/tmp/qualified-sig/src/Lib.hs:9:1: warning: [-Wmissing-signatures]
    Top-level binding with no type signature:
      test :: Real.Ratio Integer
  |
9 | test = 4 % 5
  | ^^^^

However, opening src/Lib.hs in VSCode and hovering over test, the popup reads Top-level binding with no type signature: test :: Ratio Integer (incorrect/unqualified name).
The only way I can get GHC to output without a qualification is if Ratio is actually in scope (thus making this output correct). So I wonder if, internally in ghcide, there are different values in scope than what is specified in the source file... Ie. is ghcide adding any imports to a source file when processing it (perhaps to aid autocompletion)?

So GHC gets it right, Ghcide gets it wrong - great find! Possible reasons:

We get the right message, then preprocess it textually to strip the information. I linked to the place we do the preprocessing. Perhaps remove most of that and see what happens.
We have more modules in scope. Quite possible.
We set some pretty print without qualification flag somewhere.
We do our own pretty printing of errors (we do, see the errors module) and we aren't passing some pretty printing flag GHC does.

Would be great to find out which it was. The one you identify is probably the hardest to fix, but the others probably aren't too hard.

I finally had some more time/motivation to look at this issue.
I grepped the code base for case-insensitive "qualif" and found the following suspicious line: https://github.com/haskell/ghcide/blob/1bb4c49fdacf969a0f18b032859480ba00515107/src/Development/IDE/Spans/Common.hs#L48.
neverQualify is a GHC flag -- although its documentation isn't very elaborate on its meaning. So -- it appears -- Development.IDE.Spans.Common.showName prints unqualified names only. I assume this related to the user's qualifications (e.g. the B in import Blah as B) as opposed to full qualifications (which I believe are always valid, regardless of the user's qualifications).
showName is used by Development.IDE.Spans.AtPoint.atPoint to get the name at a position. atPoint is used by Development.IDE.Core.Rules.getAtPoint, which is used to display information on hover: https://github.com/haskell/ghcide/blob/62f4d0644a3db022a49f582e2ad620c0aa6d241a/src/Development/IDE/LSP/HoverDefinition.hs#L34
I'm not sure where to go from here. I'm not 100% sure this is the culprit (I have yet to connect showName with Development.IDE.Plugin.CodeAction.suggestSignature), but it seems very likely. I assume there's a good reason all names are printed without qualification, and that I would break a lot of things simply by changing/removing this flag.

Update: changing neverQuality to reallyAlwaysQualify at https://github.com/haskell/ghcide/blob/1bb4c49fdacf969a0f18b032859480ba00515107/src/Development/IDE/Spans/Common.hs#L48 does not change the suggested type. Only the popup that appears when hovering over the definition changes from:
test :: Ratio Integer

to
fake_uid:Main.test :: base-<IP_ADDRESS>:GHC.Real.Ratio
  integer-gmp-<IP_ADDRESS>:GHC.Integer.Type.Integer


feat: list server stores

List the stores of defined servers.
Description
For each defined server (in the OpenFGA tool window) the stores list is displayed in the tree.
Review Checklist

[x] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

/easycla


Copy+paste fix

In fact, could you add links to commit ranges for the other releases as well (except 0.1.0, which doesn't have one).

bors r+


Change navbar title

Change navbar title from 'about text utils' to 'about us'.

Please assign this issue to me.


onnx tensorrt model infer results are different in some special shapes.

Hi,
i found two weird things in trt model inferencing process. Any one knows why?

"dict(type='Pad', size_divisor=32)", is not work in trt model, it can lead different results(eg. 10 pixels shifting in det box-x.) between onnx and trt. but when i used "dict(type='Pad', size_divisor=128)," the result is same with onnx result, the shifting is gone.

when i trained a model only 1 fg class num, i found
"rcnn=dict(
score_thr=0.3," ....)
is not working, i debuged and found some zeros det boxes, their scores is near to 0.5.

eg.
tensor([[[3.2900e+02, 1.1648e+02, 7.1000e+02, 1.5277e+02, 9.9482e-01],
[0.0000e+00, 0.0000e+00, 0.0000e+00, 0.0000e+00, 5.0489e-01],   ...    # this score is weird.

by the way, the model structure is cascade-res50-fpn-maskrcnn