Reported cilium memory usage seems high

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
Hello,
I am surprised by the memory usage of cilium's daemonset pods reported by kubernetes metrics-server. In a cluster I'm using right now, newly started cilium pods are reported to use >330Mi. (All of my cilium pods use between 330Mi and 430Mi). It seems a bit high to me, correct?
$ kubectl -n kube-system top pods -l k8s-app=cilium
NAME           CPU(cores)   MEMORY(bytes)
cilium-5fj8p   6m           366Mi <-----
cilium-64vjc   12m          426Mi
cilium-77twq   5m           337Mi
...

Kubernetes metrics-server memory usage for a pod is based on cAdvisor's container_memory_working_set_bytes, itself is based on the pod's memory cgroup statistics.
In cgroupv1 it's calculated like this: container_memory_working_set_bytes = memory.usage_in_bytes - memory.stat[total_inactive_file]
source
An easy way to get these values is to kubectl exec a shell in a cilium pod "cilium-agent" container and to look at /sys/fs/cgroup/memory/memory.stat and /sys/fs/cgroup/memory/memory.usage_in_bytes.
(it's also more accurate to open a shell in the node itself and find the pod's cgroup, because there is actually also the stopped initContainer that can still use some memory even if it's completed)
(pod cilium-5fj8p) # cat /sys/fs/cgroup/memory/memory.usage_in_bytes
                                     403435520

(pod cilium-5fj8p) # cat /sys/fs/cgroup/memory/memory.stat
cache                                 73277440
rss                                   71852032
rss_huge                                     0
shmem                                 31850496
mapped_file                           25665536
dirty                                        0
writeback                                    0
swap                                         0
pgpgin                                15544572
pgpgout                               15509140
pgfault                                2099552
pgmajfault                              432855
inactive_anon                         92012544
active_anon                           11620352
inactive_file                         19111936
active_file                           22315008
unevictable                                  0
hierarchical_memory_limit<PHONE_NUMBER>
hierarchical_memsw_limit<PHONE_NUMBER>854771712
total_cache                           73277440
total_rss                             71852032
total_rss_huge                               0
total_shmem                           31850496
total_mapped_file                     25665536
total_dirty                                  0
total_writeback                              0
total_swap                                   0
total_pgpgin                          15544572
total_pgpgout                         15509140
total_pgfault                          2099552
total_pgmajfault                        432855
total_inactive_anon                   92012544
total_active_anon                     11620352
total_inactive_file                   19111936
total_active_file                     22315008
total_unevictable                            0

(pod cilium-5fj8p) # cat /sys/fs/cgroup/memory/memory.kmem.usage_in_bytes
                                     258306048

(pod cilium-5fj8p) # ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.4  2.1<PHONE_NUMBER>6 ?        Ssl  Sep22 233:43 cilium-agent --config-dir=/tmp/cilium/config-map
root         423  0.0  0.1 706916  4028 ?        Sl   Sep22   3:13 cilium-health-responder --listen 4240 --pidfile /var/run/cilium/state/health-endpoint.pid

If I do the calculation, WSS=(403435520-19111936)/1024/1024 ~= 366.5 Mi, the same as the kubernetes metric.
But why is memory.usage_in_bytes so high? According to the kernel's documentation it should be more or less equal to RSS+CACHE(+SWAP) but is much higher. memory.usage_in_bytes does not seem to count kernel memory as I have read at other places.
What do you think?
Thanks
Cilium Version
Client: 1.12.5 701acde 2022-12-15T16:03:30-08:00 go version go1.18.9 linux/arm64
Daemon: 1.12.5 701acde 2022-12-15T16:03:30-08:00 go version go1.18.9 linux/arm64
Kernel Version
Linux 5.15.0-1031-aws #35~20.04.1-Ubuntu SMP Sat Feb 11 16:19:53 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
Kubernetes Version
Server Version: v1.26.3
kops cluster
Sysdump
I have a sysdump but not like to share it publicly
Relevant log output
No response
Anything else?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Memory usage of Cilium depends on the resources within the cluster. More policies, more pods, more nodes, etc, can lead to an increase in memory usage. Without information about the cluster, it's difficult to determine whether Cilium is using an expected amount of memory or if there's some sort of leak.

I agree with that, and I'm ok with cilium using memory :) but what I don't understand is how memory usage is being reported. Why is the pod cgroup memory.usage_in_bytes so high (>300Mi) while rss + cache ~= 150Mi? Do you observe the same thing?
This example is from a "dev" cluster that is currently idle. It is not running any workload except running kube-prometheus-stack
$ kubectl get endpoints -A | wc -l
41
$ kubectl get ns | wc -l
21
$ kubectl get networkpolicies.networking.k8s.io -A | wc -l
No resources found
0
$ kubectl get nodes | wc -l
5
$ kubectl get pods -A | wc -l
77
$ kubectl get service -A | wc -l
41
$ kubectl -n kube-system top pods -l k8s-app=cilium
NAME           CPU(cores)   MEMORY(bytes)
cilium-chs8g   10m          504Mi
cilium-k7qxn   6m           351Mi
cilium-n47rm   6m           338Mi
cilium-v5bjx   5m           346Mi

$ kubectl -n kube-system exec -it cilium-chs8g -- ps aux
Defaulted container "cilium-agent" out of: cilium-agent, clean-cilium-state (init)
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  1.0  1.6<PHONE_NUMBER>72 ?       Ssl  Sep23 491:04 cilium-agent
root         420  0.0  0.0 706660   5060 ?       Sl   Sep23   1:08 cilium-health

$ kubectl -n kube-system exec -it cilium-k7qxn -- ps aux
Defaulted container "cilium-agent" out of: cilium-agent, clean-cilium-state (init)
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.6  1.5<PHONE_NUMBER>56 ?       Ssl  Oct13 107:12 cilium-agent
root         420  0.0  0.0 706660   5324 ?       Sl   Oct13   0:24 cilium-health

Oh man, cgroup memory accounting is super interesting and never obvious. The cgroup attempts to account for certain blocks of kernel memory, especially TCP sockets. You're not the first person to notice that RSS is calculated differently than usage_in_bytes. For example, the cgroup can include inactive_file, which is not included in RSS. So that, alone, is probably the difference you're seeing.

Seems like there is a plausible explanation, do you mind if we close this issue @piec ?

(Sorry for leaving this issue stale)
Hi @squeed, thanks for your answer

You're not the first person to notice that RSS is calculated differently than usage_in_bytes

I'm not saying that :)
What I'm saying is in my example:

according to k8s source code:
k8s pod memory = cAdvisor wss = cgroup memory.usage_in_bytes - memory.stat[total_inactive_file] ~= 366 Mi (corresponds to reported pod's memory)
according to kernel doc:
cgroup memory.usage_in_bytes ~= RSS+CACHE(+SWAP) and does not account for kernel memory.
If I do the calculation for my pod it <100Mi
So question: why is memory.usage_in_bytes so large?
Is the documentation outdated? I didn't find the time to check how the kernel does the accounting. Also it can be quite complex I suppose

I was playing with hetzner k8s terraform module and installed it with cilium as default cni for my initial empty 2 nodes clusters with few small cheap 5$/nodes. It wasn't able to start due to cilium crashes and OOM kills.
Later I saw this comment inside the module regarding cilium higher memory usage for empty clusters https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner/blob/master/kube.tf.example#L675

Cilium 1.12.5 is EOL, please upgrade to a more recent version and create a new issue if you are still facing this problem. Cilium 1.16.0, planned to be released at the end of this month has some memory optimizations which should decrease its memory usage.


Unable to preview svg files in Preview Pane

Environment
Windows build number: Windows 10 Insider review build 19608
PowerToys version: 0.16.1
PowerToy module for which you are reporting the bug (if applicable): File Explorer

Steps to reproduce
Start PowerToys
Go to File Explorer -> Enable Preview Pane
Click on an svg file
Expected behavior
Preview of the file should appear in the Preview Pane
Actual behavior
Message Appears "Some elements have been blocked to help prevent the sender from identifying your computer. Open this item to view all elements."
Screenshots

I noticed the exact same behavior. It's assuming that the file is not yours...

The same. How to solve this? Or should I update Windows system?

can you share your SVG?

actually ... looks like you associated the file with IE, that could be causing this.

can you share your SVG?
Unable to upload to github since github doesn't support uploading svg so here is a link
https://1drv.ms/u/s!AqA59TjcY92yg_od_wG051unV6uOkw?e=UBwIce

actually ... looks like you associated the file with IE, that could be causing this.

it isn't.
All such files are associated with IE, yet the preview issue occurs with only some of them.

Because it is an embedded PNG in the SVG.
Here is the opening bits of the SVG, note the last part hwere it says "IMG
<svg width="1814" height="1712" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="hidden"><defs><clipPath id="clip0"><path d="M1783 462 3597 462 3597 2174 1783 2174Z" fill-rule="evenodd" clip-rule="evenodd"/></clipPath><image width="1814" height="1712" xlink:href="data:image/png;base64

So, it's not an actual svg file, okay!

Why is not an SVG file? The PNG is embedded in the SVG, which is legal and local...

I have the same issue. Why is this not a SVG file? I have a BMP file that is referenced in a SVG. Is it possible to preview?
2021-10-23_18-38-43-414_PASS.svg.txt


Removing invalid numeric values from the sample plot

As a demonstration of this, look at the sleep apnea test dataset. Just to test this with a really broad log ratio that includes every sample in this dataset, run a text search of Bacteria / Firmicutes. Then switch the sample plot x-axis from the current default (rankratioviz_balance) to weekly_cage_food_consumption.

Notice the points all located at x = 0? Those points all have the value Missing: Not provided for the weekly_cage_food_consumption metadata field. For whatever reason, Vega doesn't filter them out when you switch the x-axis to this field.
Now, go into the main.js file associated with the sleep apnea test visualization (from the root directory of rankratioviz' code, you can generate this by running make pytest—the sleep apnea visualization is located in rankratioviz/tests/output/sleep_apnea/). Change the sample plot JSON's initial x-axis field from rankratioviz_balance to weekly_cage_food_consumption, then save the file and reload the visualization in the browser. Do the same text search as above. Now, notice how the x = 0 points have gone away? The plot now displays as expected.

What I think is happening is that Vega* runs some sort of filtering code when the plot is loaded, and that this filtering isn't rerun when rankratioviz' signals update the x-axis. Whether or not this is a bug in Vega or just a bug in the way I set up the xAxis signal remains to be seen, but it is something that I should address. (Eventually, once we go forward with #73 / #11, these sorts of problematic metadata fields will probably get labelled as invalid—but if we respect Q2 metadata typings, then these issues will slip through and still need to be handled appropriately.)

I think I've got it figured out. There's this line in the sample plot compiled Vega JSON for the "bad" example:
{
      "name": "data_0",
      "source": "data-5f78d7a898752516d86d90621ebdebbb",
      "transform": [
        {
          "type": "filter",
          "expr": "datum[\"rankratioviz_balance\"] !== null && !isNaN(datum[\"rankratioviz_balance\"])"
        }
      ]
    }

For the example where weekly_cage_food_consumption was the default x-axis, the block now reads
    {
      "name": "data_0",
      "source": "data-5f78d7a898752516d86d90621ebdebbb",
      "transform": [
        {
          "type": "filter",
          "expr": "datum[\"weekly_cage_food_consumption\"] !== null && !isNaN(datum[\"weekly_cage_food_consumption\"]) && datum[\"rankratioviz_balance\"] !== null && !isNaN(datum[\"rankratioviz_balance\"])"
        }
      ]
    }

So it looks like what remains to be done is modifying this expression (via the patch vega-embed argument) to basically do what the second block is doing above, but using the xAxis signal in there somehow. Not sure if that's possible but we'll find out!

Update: yeah, you can just replace the \"weekly_cage_food_consumption\" with xAxis in the above second block and it seems to fix the problem. (also I'm adding in an isFinite() for good measure, at least with a quantitative x-axis.)
Still a bit fuzzy on the details of some of the syntax here (some Vega things seem confusing / different from how they're documented), but this problem seems to be solved. so ... boutta close once I commit the fix

In retrospect, I think this is an artifact of Vega-Lite's default configuration. By default, invalidValues is set to filter, so ...all samples with invalid values are filtered.
But this filtering is only done for the initial x- and y-axes, since Vega-Lite has no notion of signals. What was needed, then, was to redo the filtering operations Vega-Lite uses in Vega (based on invalidValues) to filter based on the xAxis signal value.


[FLINK-20384][doc] Fix Wrong Links in Some Chinese Docs

What is the purpose of the change
This pull request will fix wrong links in some Chinese docs
Brief change log

Fix wrong links in plugins.zh.md
Fix wrong links in kubernetes_ha.zh.md
Fix wrong links in metric_reporters.zh.md
Fix wrong links in plugins.zh.md
Fix wrong links in metrics.zh.md
Fix wrong links in metrics.zh.md

Verifying this change
-Executing the script build_docs.sh
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@klion26 Yes, we should merge it to both master and release-1.12 branch.


Double JSON stringifying

I noticed that the __INITIAL_STATE__ object that was being inserted into the HTML had lots of escaped double quote characters (i.e., \"), and it was because the entire initial state object was itself a string. Apparently the initial state is put through JSON.stringify twice before unsafe characters are escaped! That seemed odd and unnecessary to me, so in my project I changed that part of the code in serializeState to JSON.stringify only once and in deserializeState to simply return state || {} without extra parsing. It turns out this works just fine—all unsafe characters are properly escaped, and there is far less overhead in transmitting/parsing the initial state object this way.
A couple questions:

Is there a real reason the initial state object is first serialized to a JSON string and then that JSON string is itself stringified again?
If not, would you accept a PR that removes the needless extra JSON.stringify?

@dchenk Hello! Thanks for raising this issue. Answering your questions:

Is there a real reason the initial state object is first serialized to a JSON string and then that JSON string is itself stringified again?

As far as I understand, parsing JSON is faster for the browser than parsing JavaScript. Therefore, it's interesting to have the state object as a string where we apply JSON.parse later instead of having a literal JS object (which has more complex grammar, read more here if you are interested).
However, what you say about the escape characters is true. I intended to address this at some point but forgot about it.

If not, would you accept a PR that removes the needless extra JSON.stringify?

Considering the previous answer, we can probably agree that instead of removing it completely, we could do this:
return "'" + JSON.stringify(state || {}).replace(...) + "'"

I think this effectively removes the extra escaping characters while keeping it as a string. Thoughts?
If that makes sense, feel free to submit a PR!


Iss287 separator

The purpose of this change is to allow users to use the customer_order_ref field to help identify orders, while preserving current behaviour. Specifically, this will not increase the risk of collisions.

Coverage increased (+0.01%) to 93.803% when pulling 63ba3a739d65d328ef0a07d2c917ef96ea526569 on jsphon:iss287-separator into b1717c7b13909d15fae865c88ecfd2108a4786d6 on liampauling:master.


Can it be applied to deepfloydIF

Thanks for the great work! Have you ever tried deepfloydIF?

Hi,
Sorry, but we did not try that.


automatically save xml

Hello Lin,
I am not familiar with python, do you know how can I change the code to automatically save xml with the format image_name.xml?
Thanks!

@201power
What's your format? Would you like to dondate me to help you?

It's the same format as yours ...(ImageNet / VOC), i just want to change it to auto-save, so you don't have to click "save" button every image.

@201power,
If you have set default save folder, the tool will save xml with the filename automatically while changing to the next image.

Great. Thanks!


Invoke-ASCmd problem when deploy a tabular model with XMLA

We always deploy a tabular model with module SqlServer using Invoke-ASCmd
We have been having troubles deploying with this task Invoke-ASCmd 6 days ago.
The pipeline throws an exception that said:
"##[error]When interactive authentication is not supported, an external access-token is required; either provide it in the connection-string or by setting the AccessToken property."
But we didn't make any change in our tabular model. We debug our script and said this exception:
"Invoke-ASCmd : Unable to obtain authentication token using the credentials provided.
At .\Test3.ps1:168 char:12

...   $output = Invoke-ASCmd -InputFile "$modelPath\bin\CustomisedModel.x ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : InvalidResult: (:) [Invoke-ASCmd], AuthenticationException
FullyQualifiedErrorId : ExecutionFailed,Microsoft.AnalysisServices.PowerShell.Cmdlets.ExecuteScriptCommand"
I don't know what happen with the library, can you tell me what's wrong or if there is something that I need to do to solve this issue?

I already do my own test with the module SQLServer in version 22.2.0, and the issue didn´t happen
Can you check this in the last updated (Version 22.3.0) ?
Thank you!

Hello,
I have a similar issue on my side with the last version. (22.3.0 and no issue on 22.2.0)
Do you have an idea about this ?
Thank you

Hi,
Yes I solved it changing the authentication method directly into the Invoke-ASCmd and now its ok with that


Interview code editor

https://github.com/judge0/judge0 candidate for cude execution that we can host on our infra


Emphasize deprecated config fields in the doc

What this PR does / why we need it:
Which issue(s) this PR fixes:
Ref https://github.com/pipe-cd/pipe/pull/3016#discussion_r782015163
Does this PR introduce a user-facing change?:

NONE

Nice!
/lgtm

/approve

/changelog


performance isuue

Hi @HuguesTHOMAS :
Thanks for sharing the code, in order to get the performance reported in the paper, (iou s3dis area5), I change the self.validation_split = 4 in S3DIS.py. But I cann't get the performance reported in the paper (miou 66). Do you have any suggestion? I haven't finished training, but the miou seems not going up.
Step 00089533 L_out=0.049 L_reg=0.033 L_p=0.000 Acc=0.98 ---  709.37 ms/batch (Averaged)
Step 00089535 L_out=0.061 L_reg=0.033 L_p=0.000 Acc=0.98 ---  711.77 ms/batch (Averaged)
Step 00089537 L_out=0.043 L_reg=0.033 L_p=0.000 Acc=0.98 ---  717.27 ms/batch (Averaged)
Step 00089539 L_out=0.058 L_reg=0.033 L_p=0.000 Acc=0.98 ---  721.15 ms/batch (Averaged)
Validation : 0.0% (timings : 165.89 6.77)
Validation : 6.0% (timings : 276.87 20.58)
Validation : 10.0% (timings : 301.69 28.65)
Validation : 16.0% (timings : 306.19 33.44)
Validation : 22.0% (timings : 313.93 38.35)
Validation : 26.0% (timings : 333.55 41.70)
Validation : 30.0% (timings : 350.38 45.12)
Validation : 32.0% (timings : 383.41 46.56)
Validation : 38.0% (timings : 379.15 50.89)
Validation : 42.0% (timings : 389.80 52.16)
Validation : 46.0% (timings : 404.30 56.77)
Validation : 48.0% (timings : 447.05 57.91)
Validation : 54.0% (timings : 432.56 60.22)
Validation : 60.0% (timings : 424.93 60.28)
Validation : 66.0% (timings : 414.28 59.36)
Validation : 72.0% (timings : 399.32 57.45)
S3DIS mean IoU = 56.9%

Hi @tonghe90 ,
Actually, the value reported in the console does not correpond to the real validation score. This value (56.9%) is the "network output validation score".
If you report to the paper (Section 4.2, "Pipeline for real scene segmentation"), you see that the network is used on small spheres randomly chosen across the scene. Therefore, the validation score can be measured in two ways:

"network output validation score": stack the predictions of the spheres chosen for this validation step, and computing confusion of this subset of points
"dataset validation score": reproject the predictions of each sphere on the dataset (using a probability voting scheme), and computing confusion on the whole dataset

As you can see the first measure is not the real score, as it is not computed on the dataset points. It is an average score of the network output. However it would be too long too compute the whole dataset confusion at every epoch, so we use this network output value to see the convergence.
To see the real "dataset validation score", you can look at the log folder. You will find the whole dataset predictions at different epochs in folders called val_preds_XXX. The most convenient way to visualize the scores is to use the plot_convergence.py script. The network output validation is plotted as dashed line, and the real score as solid line.

Hi, @HuguesTHOMAS
I tried to use your test code on S3DIS Area 5 after 120k training steps (corresponding to around 300 epochs). I noticed that the "network output validation score" is similar to "dataset validation score". Both values are around 60%.
From my understanding, the first value is calculated only with points in the KDTree (i.e. subsampled using grid sampling with a grid size of 0.04 meters) and the second value is calculated by projecting all the points within one grid to the same label. Is that understanding correct? And should the results be very similar?

Thanks a lot for your reply~

Best,
Ken

@kentangSJTU,
Their is a difference between what happens in the validation and what happens in the test.

In validation we have the score computed directly on the input spheres, and the score computed on the reprojections (which correspond to the Confusion on full clouds in the test script). These two scores are described in my last message.

In test we do not compute the score on the input spheres (it is quite useless during test, as it was only usefull to see the convergence during validation). We only keep track of the reprojected score, and your understanding is correct. The Confusion on sub clouds is computed on the points of the KDTree and the Confusion on full clouds is interpolated (nearest interpolation) to the full clouds.

For your second question, it is expected that the two test scores are similar, because the density of points in S3DIS is quite homogeneous, so the scores computed on the subsampled cloud are close to the scores computed on the whole cloud. Only the scores on the input spheres in the validation are expected to be very different.
In the end the only score that matters is the Confusion on full clouds. Whether you look at the one from the validation or from the test, it is the only one that can be compared to other methods.

@kentangSJTU,
Their is a difference between what happens in the validation and what happens in the test.

In validation we have the score computed directly on the input spheres, and the score computed on the reprojections (which correspond to the Confusion on full clouds in the test script). These two scores are described in my last message.
In test we do not compute the score on the input spheres (it is quite useless during test, as it was only usefull to see the convergence during validation). We only keep track of the reprojected score, and your understanding is correct. The Confusion on sub clouds is computed on the points of the KDTree and the Confusion on full clouds is interpolated (nearest interpolation) to the full clouds.

For your second question, it is expected that the two test scores are similar, because the density of points in S3DIS is quite homogeneous, so the scores computed on the subsampled cloud are close to the scores computed on the whole cloud. Only the scores on the input spheres in the validation are expected to be very different.
In the end the only score that matters is the Confusion on full clouds. Whether you look at the one from the validation or from the test, it is the only one that can be compared to other methods.

Hi @HuguesTHOMAS,
Thanks a lot for your clear answers. I think I am clear about my questions. I will try to get the results after all training steps and compare with the reported results in your paper. BTW, is the provided architecture for S3DIS the one used in your experiments to produce the best results? Thanks for reply~
Best,
Ken

Yes, the architecture and the parameters defined in training_S3DIS are the one I used for my experiments with rigid kernels. If you want deformable kernels, you just have to change the name of the layers in the architecture list (use "resnetb_deformable" and "resnetb_deformable_strided").
You can use the script called plot_convergence to show the validation scores, it can be run during training to see how things are going. You should see the score reprojected on the full clouds as a solid line and the score on validation spheres as a dashed line. The first one is only computed once every 50 epochs (so you won't see it at the beginning of the training), and the second one at each epoch.

Yes, the architecture and the parameters defined in training_S3DIS are the one I used for my experiments with rigid kernels. If you want deformable kernels, you just have to change the name of the layers in the architecture list (use "resnetb_deformable" and "resnetb_deformable_strided").
You can use the script called plot_convergence to show the validation scores, it can be run during training to see how things are going. You should see the score reprojected on the full clouds as a solid line and the score on validation spheres as a dashed line. The first one is only computed once every 50 epochs (so you won't see it at the beginning of the training), and the second one at each epoch.

Thanks a lot for your reply~


Recognize .pyt files in Python extension

.pyt files are a file type used by the ESRI ArcGIS software to describe Python toolboxes. ArcGIS is a commonly used, commercial GIS (Geographic Information Systems) software. One way of extending this software is by using custom tools, which can be contained in native (.tbx) or Python (.pyt) toolboxes.
Python toolboxes are text files containing regular Python code, but use the .pyt extension to allow ArcGIS to identify them. It would be great if the .pyt file extension could be included as one used by the VSCode Python extension.
This PR adds the .pyt extension to the list of supported file types for the VS Code Python Extension.
This PR fixes #133545

Thanks!


Return error response in case of errors

Wonder if we are doing right think on error case :thinking:
func (r *routes) query(w http.ResponseWriter, req *http.Request) {
	expr, err := parser.ParseExpr(req.FormValue("query"))
	if err != nil {
		return
	}

	e := NewEnforcer([]*labels.Matcher{
		{
			Name:  r.label,
			Type:  labels.MatchEqual,
			Value: mustLabelValue(req.Context()),
		},
	}...)
	if err := e.EnforceNode(expr); err != nil {
		return
	}

	q := req.URL.Query()
	q.Set("query", expr.String())
	req.URL.RawQuery = q.Encode()

	r.handler.ServeHTTP(w, req)
}

Shouldn't we do some http.Error at least? :thinking:

I thought the same while reviewing your PR. Maybe @brancz @s-urbaniak have more insights?

I believe I stumbled across this quite some time ago and I agree it is non obvious what happens, but effectively currently a parser failure will:

return http status code 200 (debatable)
will return an empty body (debatable)
will not execute an upstream query (good)

We could return StatusBadRequest (400) instead, wdyt?
But somehow I have a dejavu as I am sure I asked this question OOB to @brancz :smile:

Error on parsing should be a 400, error on enforcing should be a 500 I think.

Does #67 (at least partially) address this?


Official Apache-1.1 license text is not being matched correctly by LicenseCompareHelper.matchingStandardLicenseIdsWithinText()

When org.spdx.utility.compare.LicenseCompareHelper.matchingStandardLicenseIdsWithinText() is run on the official Apache-1.1 license text, it fails to find any matches, and I believe I've narrowed down the problem to the Clause5 alternative text tag in the template; if I remove the example header from the license text, and run org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense().getDifferenceMessage() on it, I get:
Variable text rule combined-bullet-Clause5 did not match the compare text starting at line #31 column #1 "5" while processing rule var: combined-bullet-Clause5

When I manually converted that <alt> tag into a Java regex, and bullet 5 from the Apache 1.1 license text is manually cleansed of comment characters and newlines, I do get a match, so I'm pretty confident the problem is in the library rather than the template.  Beyond that I'm not really sure what the root cause might be - whether it has to do with comment character handling, regexification of that particular <alt> tag, or something else entirely.
This was reproduced with Spdx-Java-Library v1.11 and SPDX license list v3.23.

It it's helpful, I'm also seeing similar failures with the official Apache-1.0 license text too, though I haven't troubleshooted that to the same level of detail is I did with Apache-1.1.


grafana table is broken

https://docs.teamhephy.info/managing-workflow/tuning-component-settings/#grafana

I just playtested this with a local docker image build.  It solved the issue at this link ^
Fixing up the commit message title to conform with standards

We'll still have to resolve the automation to redeploy docs.teamhephy.info and docs.teamhephy.com (and teamhephy.info/docs)
I like the idea of serving those all from one root, too, but maybe it's better to keep them now as separately CD'd from the same source-of-truth


refactor the default navigation options guide

thanks to @mkonicek for writing this!

Looks good to me, but will leave this up to @mkonicek as he has a better perspective here.

Thanks for taking my comment into account and updating the guide! 👍

Whoop, forgot to ask - does it render nicely on the website? I just typed the text in the GitHub editor. Hope we didn't break the formatting on the website.


Upgrade dwn-sdk-js to v0.2.4

Codecov Report

Merging #8 (99bf088) into main (efee72a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   80.02%   80.02%
=======================================
  Files          10       10
  Lines         956      956
  Branches      140      140
=======================================
  Hits          765      765
  Misses        191      191


Scroll to top button added in the footer.ejs file.

send the video showing its working

Yes sure , in a bit

send the video showing its working

screen-capture.webm

send the video showing its working

screen-capture (1).webm

add it to the secrets page not to the home page

But there doesnt seem to be a secrets page yet , so i added it to the footer so that it appears on every webpage that opens up(including the register and login page)

After login and register , secrets page can be accessed and only on secrets page it is required, not on any other page

screen-capture (2).webm

will check and do the changes if required and let you know by tomorrow

Okay Kritika , thank you !

@dikshapadi you can start working now!

@dikshapadi Are u working on this?


Watch for changes to content

Implements https://github.com/alphagov/digitalmarketplace-utils/pull/193
Adds https://pypi.python.org/pypi/watchdog as a requirement to make watching for file changes use system events, which is faster

Have flask init init the manager
Depends on and implements alphagov/digitalmarketplace-utils#195

Bring in 11.1.1 of utils
To allow us to use the version of init_manager which returns a Manager instance.

:+1:


ouster: 0.1.7-0 in 'melodic/distribution.yaml' [bloom]

Increasing version of package(s) in repository ouster to 0.1.7-0:

upstream repository: https://github.com/CPFL/ouster.git
release repository: https://github.com/CPFL/ouster-release.git
distro file: melodic/distribution.yaml
bloom version: 0.7.2
previous version for package: 0.1.6-0

ouster_driver
* Sensor model and firmware version validation
* Added sensor model and firmware version validation. The driver currently only works for OS-1-64 and on firmware version 1.10 some configuration parameters disappeared.
* Parameter validation and new pointcloud types
* Added parameter validation to avoid reinitializing the LiDAR. Added new pointcloud types XYZIRF and XYZIRFN. Changed pulse_mode parameter from integer to string for readability. Updated the readme file.
* Contributors: Alexander Carballo, alexandrx

Holding for sync


Add ability to add the onsubmit field to a form.

The formbuilder is missing a way to set the onsubmit parameter. See this link for more information.

Hi there, thanks for this PR! Unfortunately the approach in this PR won't work, since you're editing generated files - what we need to do is fix the code generator to support this. It'd be interesting to know whether we're failing to parse the spec, or whether we're losing some data later on in the pipeline.

It looks like in the xtasks, html_bindgen::scrape::scrape_webidls creates the definition resources/scraped/webidls/GlobalEventHandlers.webidl, containing the definition for onsubmit, onclick, and various other handlers (which is what I need to interface with javascript and wasm).
html_bindgen::parse::parse_webidls looks like it ignores any webidls that don't start with HTML for some reason.


Lost my config

Hi @zsviczian
I have a problem. My Excalibrain configuration suddenly break and I can't figure out why. I still have my old excalibrain.md file that I saved but I can't get my config back.
Could you tell me if this is possible? I need my ontology 😿

I am so sorry... This has also happened to me, but I haven't had the time/energy to debug the root cause.
I am using obsidian sync which provides a backup for settings. If you use Obsidian sync you can open the sync settings page and restore plugin settings.
If you make backups of your vault, the ontology lives in the YOUR VAULT/.obsidian/plugins/excalibrain/data.json file. Note that .obsidian is a hidden folder, you may need to enable hidden folders on your device to view this folder.

Hi @zsviczian
Thanks for the tip. I've never had to restore configuration settings before with "sync". I've got it all back. 👍🏼
I don't know if this helps but I had the impression (without being able to reproduce it) that my config broke after I mistakenly closed the main obsidian window without first closing the excalibrain pop-up window. 🤔

That could be a reason.
I did a bit of cleanup of settings save in 0.2.0, hopefully, it will do the trick, and you won't lose your ontology again.

So far, it hasn't happened again. I'll let you know if it does. Thanks again for everything you develop.


unfork shapeless, unfork scodec-bits

https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-community-build/101/console shows this passing, so I'm going to go ahead and merge


fix(tunes): use correct endpoint for tuning methods

Status
READY
Description
This fix sets the correct endpoint for tune_methods method.
Impacted Areas in Library
TuneManager
Which issue(s) does this pull-request fix?
Closes: #160
Any special notes for your reviewer?

Checklist

[ ] Automated tests exist
[ ] Updated Package Requirements (if required, and with maintainers' approval)
[ ] Local unit tests performed
[ ] Documentation exists link
[ ] Local pre-commit hooks performed
[ ] Desired commit message set as PR title and description set above
[ ] Link to relevant GitHub issue provided

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

3 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 96.868%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2196

Relevant Lines:
2267

💛  - Coveralls


CSV-Header generation depended of arg order

When using -M csv,html I get no CSV header, when using -M html,csv the CSV-ouput contains the headers.
Is this by intention?

Hi @gregorschulz, thanks for the heads up. It is not intentional and has to be fixed.

Hey @gregorschulz this is now fixed, check it out in branch 2.5.1. Thanks.


[MER-867] Add default PR title from commit subject

This also moves a lot of the code that was in ./cmd/av/pr.go into a new folder:
./internal/actions. The reason for this is to be able to extract out certain
things that we'll need to do in multiple contexts (in this case, I want to be
able to implement an av stack submit command, which will involve opening a PR
for every branch in the stack).
That code is mostly unchanged, except for the bit where we now read the subject
and body from the commit in order to populate the PR title/body. I'm going to
submit this PR using this strategy, so... wish me luck! 🤞

^ It worked!
The newlines on GitHub are a touch weird, but probably not blocking.


feat: add toast with error message if tx is reverted

User description
resolves #450

Type
enhancement, bug_fix

Description

Added support for displaying toast notifications using react-toastify.
Implemented error handling in system calls and Eternum provider methods to display error messages as toast notifications.
Cleaned up unused code and imports in the World component.
Added react-toastify to dependencies for toast notifications.

Changes walkthrough
Relevant filesEnhancement

App.tsxAdd Toast Notifications Support to App Component

client/src/App.tsx
Imported CSS for react-toastify.  Added ToastContainer component with a custom style.

+3/-0

createSystemCalls.tsImplement Error Handling with Toast Notifications in System Calls

client/src/dojo/createSystemCalls.ts
Removed unused imports.  Added toast notifications for error handling in system calls.  Wrapped system calls with error handling to display toast notifications on errors.

+22/-9

index.tsAdd Transaction Error Handling in Eternum Provider

sdk/packages/eternum/src/provider/index.ts
Added waitForTransactionWithCheck method to handle transaction errors.  Refactored transaction waiting to use the new method for error checking.

+53/-115

Miscellaneous

World.tsxCleanup World Component Code

client/src/layouts/World.tsx

Removed commented-out code and unused imports.

+0/-9

Dependencies

package.jsonAdd react-toastify Package Dependency

client/package.json

Added react-toastify package to dependencies.

+1/-0

pnpm-lock.yamlUpdate Lock File with New Dependencies

pnpm-lock.yaml

Updated lock file with react-toastify and its dependencies.

+19/-0

✨ PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

nice addition!


Blank support tickets

We are currently working to improve our analytics of the support functions. One area I am looking for your input is related to blank tickets received (here is an example to better understand what I mean).  I don't really understand how those are triggered and looking for advice on how to treat them going forward (what category we tag them? how those are closed? etc.). At the moment there is no consistency around how different agents address those and it would be good to have a better process in place.

@alinamanko the idea was to help people submit issues when they get an error. However, this hasn't proven much useful, few people are using it properly. And it's likely most of the reports we get are generated from robots not humans. It's why they are blank.
We're now having the same kind of functionality but automated (via a tool named Sentry), so I think moving forward:

we can ignore these reports if it seems to come from a robot, or if the user didn't made the effort to provide additional context by filling the blanks
we should think about disabling this functionality because we can rely on automated reporting (via Sentry) for the future

If we are not using this function for anything important, I think we should disable it. It takes up our time to process all these blank support tickets (each ticket must be dealt with as none can be ignored in Freshdesk).

@alanna I'm not aware of these reports sent to Freshdesk, they're only appearing in GitHub, ie: https://github.com/opencollective/opencollective/issues?utf8=✓&q=is%3Aissue+is%3Aclosed+Unexpected+error+when
Are talking about the same thing?

Hmm no I don't think that's the same. We're talking about the large number of blank emails sent to<EMAIL_ADDRESS>- we get them all the time.
Here's how they look in Freshdesk:

It seems to me I don't have all the settings available in Freshdesk, I would like to check if we can add some automation to tackle that. @alanna can you check if I can get more rights?

I made you admin @znarf

@alanna Thanks. In FreshDesk, there is no way to filter based on an empty subject :-/

@znarf if you go to the reporting section and look into the ticket metrics report, by clicking on the column of "tickets received" you get an option to export the file as csv with the option of looking into the subject field.
Have a go at this - hopefully it helps

@alinamanko that doesn't help for automation within FreshDesk unfortunately


Check that exports are correct

https://github.com/strawberry-graphql/strawberry/pull/803#pullrequestreview-627237504

@patrick91 is this still relevant?

Let's close it! With Bryce we prepared a document on updating the internal structure, that will help with this too


fix: update config file and chat ctx while serving model

Changes
Updates logic in serve and chat to use the config.yaml to determine model name to be displayed in the chat window
Which issue is resolved by this Pull Request:
Resolves #
Description of your changes:
use model path provided to serve, identify model name from given path, update chat.model field in config.yaml, read the chat.model field and populate the chat ctx before displaying the name during ilab chat

I will review this -- related to #935 that I was reviewing earlier

closing since https://github.com/instructlab/instructlab/pull/935 was merged


Adds support for HTTPBody during testing when using NSURLSession

This addresses the issue described in https://github.com/AliSoftware/OHHTTPStubs/wiki/Testing-for-the-request-body-in-your-stubs and #52
It also avoids unnecessary changes to the code under test as the setter and getter for HTTPBody can still be used without change in behavior (as far as one can tell).
The new getter -[NSURLRequest OHHTTPStubs_HTTPBody] can be used in your [OHHTTPStubs stubRequestsPassingTest:withStubResponse:] to test the HTTPBody.
One known issue is that if you set the HTTPBody and later reset it to nil (for whatever reason),OHHTTPStubs_HTTPBody will still return the last non-nil value.
Thanks to @shagedorn for the help on method swizzling.

Cool, looks interesting !
Don't forget to add an entry in the CHANGELOG to credit yourself.
I'm going on vacation for two weeks so I won't have time to check that PR until I return.

Thanks for getting back so quickly! Enjoy your vacation, we will improve this PR in the meantime.

If merged, you'd probably want to...

[ ]  Adjust the Wiki entry
[ ]  Post to issue #52
[ ]  Adjust the version number in the changelog as appropriate

Finally had time to check that PR :nada:
Please address the above comments, then rebase the branch on top of master — because as master has evolved since your PR, your branch is now in conflict (probably only because of the CHANGELOG entry, so not a complex conflict to fix :wink:)
Otherwise I'm 👍

[ ] Adjust the version number in the changelog as appropriate

FYI, in general I use a special ## Master entry for that (instead of the 5.x you created), so that we can add more and more entries and only specify what the exact version number it should be (according to semver) when releasing a new version only :wink:
So when you'll be rebasing, you'll see that ## Master entry is now already existing on master (since I already merged other PRs that had it), so just put your changelog entry below the others of that section and I'll take care of changing ## Master to the proper version when I decide to do a release :wink:

Ping @felixLam ?

[ ] Remove OHHTTPStubsMethodSwizzling.h from the public headers in the podspec
[ ] Rebase

Sorry about the delay, we had a busy week and @felixLam was on holidays. We'll tackle it next week!

np, thx

@AliSoftware I made the requested changes and rebased on master

Thx  :+1:
(I don't know what's wrong with travis not reporting the test results on this PR suddenly… will investigate and merge once ok)

@AliSoftware there was a "minor" outage on GitHub today.

@felixLam Ah good point that was probably it. Tested locally and force-merged onto master, (let wait for travis to check master now just to be sure… :wink:)

@felixLam In an effort to try and follow Moya's Contributor Guidelines, and to thank your for your recent contribution to OHHTTPStubs, I just added you as contributor to OHHTTPStubs so that you can now merge PRs and manage issues!
(Note: master is locked against direct commits, in order to force us to make PRs pass tests before we can merge any new code to master)

@AliSoftware Thank you very much. Credit where credit is due: @shagedorn did most of the heavy lifting here with the method swizzling.

Right, added @shagedorn as a contributor as well just now :wink:

How should we #import the ability to utilize this new code? I can't seem to build it with just #include <OHHTTPStubs/OHHTTPStubs.h>
Note, I'm not using cocoapods to install. I'm dragging the xcodeproj into a frameworks group in my own xcode project. that's how I've always used OHHTTPStubs.
Thanks in advance

@mikelupo The should not require any changes in your end as far as I remember and should just magically work.

Thanks for the quick reply.
Looks like its my problem. It's mainly because of the way that I integrate.
When I removed the existing OHHTTPStubs.xcodeproj from my workspace, it also removed references to it from my build phases where I was building/linking it into my bundle.  So of course it would not find it.
:)
Now that I've resolved that, it still won't build unless I import:
#import <OHHTTPStubs/NSMutableURLRequest+HTTPBodyTesting.h>
In my test, I'm using the new method call like this:
NSData *myData = [request OHHTTPStubs_HTTPBody];
Mike
-----Original Message-----
From: Felix Lamouroux<EMAIL_ADDRESS>To: AliSoftware/OHHTTPStubs<EMAIL_ADDRESS>Cc: mikelupo<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Sent: Wed, Jun 1, 2016 1:53 pm
Subject: Re: [AliSoftware/OHHTTPStubs] Adds support for HTTPBody during testing when using NSURLSession (#166)
@mikelupo The should not require any changes in your end as far as I remember and should just magically work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@felixLam @shagedorn while doing the 5.1.0 release, I just realized that maybe I merged that PR too soon. I mean, it should work, but:

[ ] It's missing Unit Tests. We should add at least one unit test for this feature, ensuring that the code works and that there won't be any regression later
[ ] The file where you added the category is called NSMutableURLRequest+HTTPBodyTesting.h/m but is in fact an extension on NSURLRequest, not NSMutableURLRequest, so for consistency's sake we should probably rename it

That doesn't seem much work to do and make it right, do you think you'd be able to throw a quick PR to add that soon, so I can include it properly in the upcoming 5.1.0 release?
Thx!

Absolutely. Will look at this tomorrow.

Am 02.06.2016 um 20:05 schrieb AliSoftware<EMAIL_ADDRESS>@felixLam @shagedorn while doing the 5.1.0 release, I just realized that maybe I merged that PR too soon. I mean, it should work, but:
It's missing Unit Tests. We should add at least one unit test for this feature, ensuring that the code works and that there won't be any regression later
The file where you added the category is called NSMutableURLRequest+HTTPBodyTesting.h/m but is in fact an extension on NSURLRequest, not NSMutableURLRequest, so for consistency's sake we should probably rename it
That doesn't seem much work to do and make it right, do you think you'd be able to throw a quick PR to add that soon, so I can include it properly in the upcoming 5.1.0 release?
Thx!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Cool Thx 👍

ping @felixLam ?

@mikelupo the OHHTTPStubs.h file only includes the bare minimum of imports, which I assume is intentional ( @AliSoftware ?). To get everything, import OHHTTPStubsUmbrella.h, or use the modular import using @import OHHTTPStubs;, which will use the umbrella header.
I'm working on the remaining issues (rename & tests) right now and will submit a PR later today.

the OHHTTPStubs.h file only includes the bare minimum of imports, which I assume is intentional

That's sadly a legacy issue, because when I created OHHTTPStubs years ago, I didn't think it would grow that much, and I only had one public class, named OHHTTPStubs, which have the same name as the pod/framework itself.
Now that OHHTTPStubs has grown a lot, OHHTTPStubs.h remains the header of only the OHHTTPStubs main class (like every other Foo class has its dedicated Foo.h header).
I can't use OHHTTPStubs.h itself as the umbrella header as well (because of cross-import reasons — I can't import every .h in OHHTTPStubs.h because some of those headers needs the OHHTTPStubs class to be defined first — and for subspecs reasons — especially, the headers we need to import depend on the subspecs people opt-in in their Podfile). I tried in some branches to improve that and make OHHTTPStubs.h the umbrella header but sadly it always led to complex problems and incompatibility with modular imports and all.
That's because of all these reasons that the umbrella header being OHHTTPStubsUmbrella.h and not OHHTTPStubs.h
But anyway, using the modular import @import OHHTTPStubs; is indeed the way to import modules nowadays, which thanks to the .modulemap I wrote automatically import the right umbrella header for you.

Looking fwd to your PR @shagedorn so that we can release the next version 👍

@AliSoftware Sorry for not following through with my promise on Friday. We had an unscheduled workload due to a rejection ;)

np I know those situations 😉


how to add more middleware?

It seems like isomorphic-relay-router hides for us the render function passed to Router, however I want to use https://github.com/taion/react-router-scroll react router middleware, is there a way I can use that? Maybe the middleware render should be overridable?

From browsing the issues it looks like this was added in #48; and usage is something like:
import {Router, applyRouterMiddleware} from 'react-router';
import IsomorphicRouter from 'isomorphic-relay-router';
import {useScroll} from 'react-router-scroll';
...
const renderWithMiddleware = applyRouterMiddleware(IsomorphicRouter.useIsoRelay, useScroll());
...
const render = (props) => {
  ReactDOM.render(
    <Router
      {...props}
      render={renderWithMiddleware}
    />
  );
};

oh great! i'll try that


Bug report, easy 1 line fix.

filename: tensorflow/python/framework/ops.py
def set_shapes_for_outputs(op):
"""Uses the registered shape functions to set the shapes for op's outputs."""
try:
shape_func = _shape_registry.lookup(op.type)
except LookupError:
try:
shape_func = _default_shape_function_registry.lookup(op.type)
except LookupError:
raise RuntimeError("No shape function registered for standard op: %s"
% op.type)
shapes = shape_func(op)
if len(op.outputs) != len(shapes):
raise RuntimeError(
"Shape function for op %s returned %g shapes but expecting %g" %
(op, len(op.outputs), len(shapes)))
for output, s in zip(op.outputs, shapes):
output.set_shape(s)
The call of "Shape function for op %s returned %g shapes but expecting %g" %" is reversed, should be (op, len(op.shapes), len(outputs)); (i swapped the shapes and outputs) ... took me awhile to debug an unrelated bug because i was getting the wrong debug message ;)

Submit a pull request?


Moved scripts

Moved scripts to root folder.

It's Very good work but i am sorry i can not merge this pull request because you didn't assigned to work on this next time you give patch for any repo please comment on issue...
Thanks and really sorry for this😞

well if you want to work on this repo let me know i have one issue in mind😊

I forgot right now but i'll let you know when it comes to my mind😁

I need to change the readme description of facebook posing bot
link
add this line - If you want to understand this code you can visit here.

iF you are working on this let me know

I'll work on it.

Let me know when you're ready to commit. Also happy to add a script if desired.

I am always ready you just have to submit pr for this😊


Can't decode str8 string

msgpack ruby gem was not using str 8 at all up to version 0.5, but since 0.6 it has started to use it. New users will get a failure.
msgpack 0.6:
2.1.2 :004 > MessagePack.pack(' ' * 255)
=> "\xD9\xFF                                                                                "
msgpack 0.5.11:
2.1.2 :002 > MessagePack.pack(' ' * 255)
=> "\xDA\x00\xFF

Yes, basically this library implements the old MessagePack v4 spec with specific extensions for compatibility with msgpack-js. I may or may not switch to MessagePack v5 (if I do it will break compatibility with the types added by @creationix in msgpack-js).
Like I say in the README, if you can, you should use this library instead. It is pure Lua and it implements the v5 spec.

I will never switch to v5. I no longer use LuaJIT so I have no interest in improving this library. I suggest you use lua-MessagePack instead.


Unable to render the stream from server or convert to base64 like for image rendering

I have used Grid fs for saving my file on server side  like below :
var gfs = Grid(conn.db);
            var writestream = gfs.createWriteStream({
                  filename: newFilename
            });
            stream.pipe(writestream);
            writestream.on('close', function (file) {
                  //console.log(file.filename + ' Written To DB');
                  var streamGen = ss.createStream();
                  var readstream = gfs.createReadStream({
                        filename: newFilename
                  });
                  readstream.pipe(streamGen);
                  ss(socket).emit('receiveFile', streamGen, {name: newFilename});
            });

And on client side :
ss(socket).on('receiveFile', function(stream, data) {
         console.log(stream);
 })

But i am unable to parse the stream, any suggestion

I have got the solution, so closing the issue.
Thanks.


Create advertising payload in userland

#855 in tock changes the way ble advertising payload is constructed. Previously, it was constructed in the BLE-capsule. In the current implementation of the C-userland of tock it is constructed in userland making the current implementation in libtock incompatible with the latest tock version.
Minor changes are also necessary for the passive scanning driver.

@alevy  @niklasad1 Does it make sense to work on this at the moment? tock/tock#915 promises more (very welcome) changes but I cannot estimate when it will be merged.

I think it is worthwhile. The new PR is gonna be a bit, and also it is unlikely to change the interface for _advertising_substantially (system call numbers might be different, but high level interface is likely to stay mostly the same)


SELECT COUNT(DISTINCT field) results wrong

Hey guys,
we found an issue with SELECT DISTINCT(field) where 1,000 single inserts with unique values result into slightly different counts (in 3 repeated tests between 0.4% and 1.2%).
The following test scenario we have:
CREATE STREAM events_heartbeat (
  product_id VARCHAR(24),
  unique_user_id VARCHAR(24),
  insert_date TIMESTAMP WITH TIME ZONE
);

from which we create the following continuous view:
CREATE CONTINUOUS VIEW
  statistics__user_activity__hourly
AS SELECT
  product_id::VARCHAR(24) AS value__product_id,
  DATE_TRUNC('hour', insert_date) AS date__year_month_day_hour,
  COUNT(DISTINCT unique_user_id) AS count_distinct__unique_users,
  COUNT(*) AS value__unique_users_events
FROM
  events_heartbeat
GROUP BY
  value__product_id,
  date__year_month_day_hour;

We did 1,000 insert operations:
PreparedStatement stmt = connection.prepareStatement("INSERT INTO events_heartbeat (product_id, unique_user_id, insert_date) VALUS (?, ?, ?)");
stmt.setString(1, event.getProductId());
stmt.setString(2, event.getUniqueUserId());
stmt.setTimestamp(3, new Timestamp(event.getTimestamp().getTime()));
stmt.execute();

We ensured that the value for unique_user_id are 1,000 unique values.
We got the following results (from 2 different runs):
# select * from statistics__user_activity__aggregation_hourly;
    value__product_id     | date__year_month_day_hour | count_distinct__unique_users | value__unique_users_events
--------------------------+---------------------------+------------------------------+----------------------------
 55f1e4ee9ac25e7b037b23c7 | 2015-09-21 09:00:00+00    |                         1004 |                       1000
(1 row)

# select * from statistics__user_activity__aggregation_hourly;
    value__product_id     | date__year_month_day_hour | count_distinct__unique_users | value__unique_users_events
--------------------------+---------------------------+------------------------------+----------------------------
 55f1e4ee9ac25e7b037b23c7 | 2015-09-21 10:00:00+00    |                          990 |                       1000

Before testing the database server was restarted and the database freshly initialized.
We're using Ubuntu 14.04.3 LTS, for pipelinedb we use the packagecloud.io repository and the latest version (today morning freshly installed):
# dpkg -s pipelinedb
Package: pipelinedb
Status: install ok installed
Priority: optional
Section: database
Installed-Size: 84055
Maintainer: PipelineDB<EMAIL_ADDRESS>Architecture: amd64
Version: 0.8.1-1
Depends: libc6 (>= 2.17), libgcc1 (>= 1:4.1.1), libreadline6 (>= 6.0), libstdc++6 (>= 4.6), libxml2 (>= 2.7.4), zlib1g (>= 1:1.2.2)
Description: streaming SQL database
 PipelineDB is a streaming SQL database that runs SQL queries continuously
 on streams, incrementally storing the results in tables.
Homepage: http://pipelinedb.com

Is that an expected behavior and/or a configuration problem on our side or is that a bug?
Best,
Sebastian

You mean SELECT count(DISTINCT ...)?

Hi @Degola,
COUNT(DISTINCT ...) internally uses HyperLogLog, which is expected to have a small margin of error. Are the inputs you're using across different test runs identical? If they are different in any way, then a slightly different margin would be expected.

@usmanm: sorry, yes, of course, I meant SELECT COUNT(DISTINCT ...).
@derekjn: I missed that part in the documentation. We experienced different results but 0.2% error rate was the best we achieved, right now we get around 1% error rate with 1,000 values. is there a way to decrease the error rate by pipeline configuration?

The error rate should converge on about 0.2% as the number of unique values seen increases. Do you expect to never add more than 1,000 unique values?
We've been thinking of adding an exact_distinct function for this use case.

Actually @Degola the error rate will converge on about 0.8%, so 99.2% accurate.

Hey, the exact_distinct function sounds great and would be lovely to have that.
The problem with COUNT(DISTINCT *) is, that we also using grouping with it, e.g. how many unique users spent revenue in within the last 7 days by country and marketing partner where this inaccuracy can become misleading.

Thanks for the feedback @Degola. I've created an issue for this: https://github.com/pipelinedb/pipelinedb/issues/1201
Any further feedback or input would be greatly appreciated!


The multiple_keys API should build the section_hierarchy

The section hierarchy is missing from the multiples_keys API which is causing a less optimal rendering method. This will force the section_hierarchy to be generated.

@cccs-sgaron  is the build supposed to pass at the moment?

@cccs-sgaron  is the build supposed to pass at the moment?

It was supposed to pass yes but base was broken ... I fixed both.

It was supposed to pass yes but base was broken ... I fixed both.


PHP Version issue?

Hi James,
thanks again for your library. This helped a lot! I've implemented all functions we need to process events.
All works very well on our staging system (PHP5.6). Now i copied all classes/scripts on the production-system (PHP5.3) and it breaks by making the client request. Are there any known issues in conjunction to that php-version? I'm waiting for error logs of the provider. If i have more details, i'll attach them.
Here are the system information:
Version (e.g. 1.0, dev-master):
PHP version: 5.3
Microsoft Exchange version: 2016
Thanks in advance,
André

PHP 5.4 or greater is required...

The dependencies clearly define PHP 5.4 as the minimum supported version. 5.3 reached end of life in August, 2014, I recommend using 5.6 or newer.


[Bug]: Test mock URL formatting broken?

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Just forked the repo to do an unrelated bug fix (first time contributor) and the pytest tests are not working - no changes made on my end.
I found that the API URLs end up looking like BaseURL.TRADING_PAPER/v2/corporate_actions/announcements which are then being rejected by requests_mock with the error message:

requests_mock.exceptions.NoMockAddress: No mock address: GET <address>

This makes sense since the URL does not match the expected one for the given request. Note the BaseURL.TRADING_PAPER enum is not formatted to the actual value.
Expected Behavior
The tests should pass upon cloning since it is being pulled directly from master which should be tested properly.
The issue (I think) is that when formatting the mock request the URL is formatted like below:
...
    reqmock.get(
        f"{BaseURL.TRADING_PAPER}/v2/corporate_actions/announcements",
        text="""
...

where BaseURL.TRADING_PAPER is an enum. To get an enum's value, however, you must call BaseURL.TRADING_PAPER.value in this case. After adding the .value the tests worked without any other changes.
I am wondering if I am being dumb and missing something or if the tests just don't work. I can't imagine I'm the first person to realize this since the tests are run as a commit git hook.
SDK Version I encountered this issue in
0.8.2
Steps To Reproduce
1. Fork repo
2. Clone to machine
3. Install environment
  - `poetry install`
  - `poetry run pre-commit install`
4. Run tests
  - `poetry run pytest`

Filled out the Steps to Reproduce section?

[x] I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?
Example test failure:

Related: #271

Looks like this is just a python 3.11 issue. Closing for now but will be an issue in the future.


build: use eslint directly when linting

Issue or need
ng-lint-staged is used to run linting on the staged files with lint-staged. However, ng lint purpose is to lint an Angular CLI's project.

Proposed changes
Use directly eslint when having to lint specific files. This way, we can avoid that dependency indeed.
Also simplifies the lint-staged config. No need to specify which ts files to lint. As we want to lint all the ones to be comitted.

Quick reminders

🤝 I will follow Code of Conduct
✅ No existing pull request already does almost same changes
👁 Contributing docs are something I've taken a look at
📝 Commit messages convention has been followed
💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
⚙ API Report has been updated if API surface is altered.

#1030  👈
main

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

Join @davidlj95 and the rest of your teammates on  Graphite


OpenSSL 1.1.1j - Unit tests fail randomly with no-asm option

All unit tests were passing in OpenSSL 1.1.1d with no-asm option.
Upon using 1.1.1j (or 1.1.1i - same results), unit tests fail randomly E.g., 20-test_enc.t, 15-test_genec.t, and 70-test_packet.t tests pass randomly in one attempt while they fail in another attempt.
However, all unit tests pass consistently upon removing no-asm option and using NASM assembler version 2.15.05
From the OpenSSL email distribution group, it seems someone might have updated these unit tests or a different section of code after 1.1.1d to pass them in one scenario but might not have validated with no-asm scenario.
Am attaching two files - One without VERBOSE and one with. The file is a large one but you may search with "failed" keyword in order to go to the location of the failed tests. Alternatively, you can search with below test names which are the failed ones:
a. 15-test_genec.t
b. 20-test_enc_more.t
c. 90-test_store.t
You can find the overall failure report at the end of the log file.
One other observation is using VERBOSE is not raising an error when the test fails so we're seeing success towards the end of the log file with VERBOSE enabled but it seems errors are still logged.
I added details to my best but if am missing something, please let me know so that I will add or try them too.

I am expecting:
a. All Unit tests to pass on using no-asm configuration and that too consistently.
b. Can someone take a moment to add your 2-cents what changes can I expect when using OpenSSL APIs built without assembler vs the ones built with assembler (I know C functions are called instead of assembly routines when no-asm is set but I would like to know what difference it would make)
NT-VS15_WITH_VERBOSE.log
NT-VS15_WITHOUT_VERBOSE.log
Windows Batch File - Command Details (Only extracted major portion - rest might not be relevant for your investigation):
```
call RSSet OPENSSL_COMMON_CFG_FLAGS=no-asm no-rc5 no-idea no-cast no-whirlpool no-camellia no-seed no-md2 no-md4 no-ripemd no-mdc2 no-hw no-srp no-ssl2 no-ssl3 no-sctp
perl configure --prefix=%~dp0Intermediate\prefix\NT-VS15 --openssldir=%CURRENT_SDKS_PATH%\OpenSSL%BuildVersion% VC-WIN32 %OPENSSL_COMMON_CFG_FLAGS%
nmake
nmake test
nmake install
```
Build Platform Details:

NASM assembler version - 2.15.05 (Passing when used this)
Operating System - Windows 10
Build Platform - VC-WIN32
nmake.exe - C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
Perl Version - Tried Strawberry versions of <IP_ADDRESS>-64 and <IP_ADDRESS>-64 and an ActiveState Perl and it did not make a difference.
Windows SDK Version - 10.0.10586.0

Sorry, it seems a false observation that using assembler is passing the unit tests. I just ran
NT-VS15_WithVerbose_WITH_ASM.log
NT-VS15_WithoutVerbose.log
without "no-asm" flag and tests still fail. Attached are the files with and without Verbose.

Actually apparently the runs with verbose output pass correctly. You can see some errors in the verbose output but those are just expected errors in negative test cases. Is the only difference between the verbose and non-verbose build the verbose flag? Could you add the perl configdata.pm --dump to the build script to see the difference between the configure options?
Also I see you're applying some nontrivial patch at the beginning of the build, could you please try building unpatched sources to see whether it behaves in the same way?

I capture the config data both with Verbose and without Verbose and I did not see any difference except some address of RanLIb code, which seems to be changing on each build attempt configuration. Am attaching both the configurations and also an additional configuration, which corresponds to the build without applying any of the patches, and that still fails. (You may try using a beyond compare for easily comparison)
PerlConfigDump_Fail_WithoutPatch.log
PerlConfigDump_Fail_WithPatch.log
PerlConfigDump_Pass_WithPatchandVerbose.log
Also, am attaching the logs again for the build
NT-VS15_FailWithoutPatch.log
NT-VS15_FailWithPatch.log
NT-VS15_PassVerbose.log

@levitte could it be some perl issue? I really cannot see why there should be any difference between the tests running in verbose and non-verbose mode.

Hello
I am now facing this sporadic issue again - Last year, the build passed and when I am trying to build now, the tests are failing now. Nothing changed.  Can you please look at the attached files (pass and fail one) and provide your inputs?
build_fail.txt
build_pass.txt
@t8m @mattcaswell

The version 1.1.1 is not supported anymore. Closing. If this is still an issue with currently supported releases, please open a new issue.


schema: initial Response type

Codecov Report

Merging #16 into develop will increase coverage by 3.86%.
The diff coverage is 88.57%.

@@             Coverage Diff             @@
##           develop      #16      +/-   ##
===========================================
+ Coverage     72.8%   76.66%   +3.86%
===========================================
  Files            3        4       +1
  Lines          125      180      +55
===========================================
+ Hits            91      138      +47
- Misses          34       42       +8

Impacted Files
Coverage Δ

schema/src/provision.rs
85.52% <100%> (+6.28%)
:arrow_up:

schema/src/public_key.rs
58.33% <100%> (-1.13%)
:arrow_down:

schema/src/request.rs
76.47% <100%> (-0.68%)
:arrow_down:

schema/src/response.rs
76.47% <76.47%> (ø)

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 593afd4...de2b756. Read the comment docs.


katautils: check config factory/template and vsock

Vsock conflicts with factory, when both of them are enabled,
kata will try to create a new vm template which is useless,
thus it's better to disable template to save a lot of time.
Fixes: #1055
Signed-off-by: fupan<EMAIL_ADDRESS>

LGTM! Thanks @lifupan !

lgtm


prompt save note before selecting another note

Describe the bug
When you try to select another note after creating a new note and it's not save, but it's edited. it's not saved and your content is deleted.
To Reproduce
Steps to reproduce the behavior:

Firstly, Add and save a new note
Add another new note and add some text
Select the other note

Expected behavior
Prompt save note modal before selecting another note and get user response, process it then select the other note.

I would like to work on this if that's ok. I am new to oss but have worked with React. I will fork the repo and start looking at the code.

Hello Natalie,
Welcome to Deer and you are welcome to work on this issue. You can also read our documentation, join us on Gitter to ask, inquire about anything you need to know, or get helped.

Hello Natalie (@nwyll) ,
Welcome to Deer and you are welcome to work on this issue. You can also read Our Docs, join us on Gitter to ask, inquire about anything you need to know, or get helped.

Are you still in need of help with this? If so I am willing to take a look at it and see what I can figure out?

Hello Luke(@brickmaker17),
Firstly, welcome to Deer and we appreciate your desire for help, but it seems @nwyll still working on it. Deer always needs your help and contribution, so feel free to pick, report, suggest an issue and work on it or ping us on Gitter

@nwyll Hey! Can you confirm that you are still working with this... Otherwise, someone else might be able to work on this or even give you some help if you are stuck. Just ping me and I can guide you if needed.

I'm taking this issue since no report of progress has been made.


[Bug]: Incompatible with huggingface PEFT: Segmentation fault (core dumped)

Describe the bug
I want to use LoRa tuning to fine-tune Whisper, but after I installed peft (parameter-efficient finetuning), it comes to a segmentation fault for each speechbrain process (even I didn't import it).
I uninstalled peft, and the code runs normally again.
I have no idea whether this bug derives from Speechbrain or peft, is there anyone meets the same bug?
Expected behaviour
I expected I could import speechbrain and peft simultaneously.
To Reproduce
import speechbrain as sb
from peft import LoraConfig, get_peft_model

Versions
speechbrain version is 0.5.14
peft version: I tried 0.2.0, 0.4.0, and both of them do not work.
Relevant log output
Segmentation fault (core dumped)

Additional context
No response

Hello @caidongqi, is the issue still up? I believe this is coming from peft as everything is working on my side.

Hello, I tried to install them both but it still fails. I guess it is related to my python environment. I will reinstall it later.
By the way, I have manually realized lora in the root code of whisper, which is the father class of speechbrain's WhisperLayer. Anyone interested in it or encountered the same question could refer to lora implementation.


good reason for UTC (rather than local) timestamp?

I'm assuming having the archive names contain the timestamp relative to UTC time rather than local time was a design decision.  I find the behavior slightly disorienting (my local time is 10 hours ahead of UTC, so typically even the date is off).  Wouldn't local time be more generally useful?

Yeah, it was a deliberate decision. In commercial settings, I think system
infrastructure should assume UTC. There's some more background on the topic
here:
http://serverfault.com/questions/191331/should-servers-have-their-timezone-set-to-gmt-utc
But I do accept not everyone runs their personal infrastructure in such a
way :-)
If you're interested, I would accept a patch to change acts behaviour. The
patch would add an option (disabled by default) to use system local time
rather than UTC.
On Sun., 27 Nov. 2016, 8:48 am Alex Ghitza<EMAIL_ADDRESS>wrote:

I'm assuming having the archive names contain the timestamp relative to
UTC time rather than local time was a design decision. I find the behavior
slightly disorienting (my local time is 10 hours ahead of UTC, so typically
even the date is off). Wouldn't local time be more generally useful?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/alexjurkiewicz/acts/issues/17, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXKdbE_U5ijD8uyr2E506ld4macnSk3ks5rCKlDgaJpZM4K8__o
.

OK, I've taken a shot at it.


Failed. Image selected is not available! Error msg: Image was not found on Scaleway database!

I can't create a server, I get an error Failed. Image selected is not available! Error msg: Image was not found on Scaleway database!
screenshot http://joxi.ru/MAjn89S4BJ7vAe.png, http://joxi.ru/gmvMQ9hLKVNera.png

Have you checked the module log?
Utilities > Log > Modules Log > Enable Debug Logging.
Then post logs here...

Just tested now and seems to work fine!
 Have you tried with other images, locations?

I tried, but still not working
I manually activated the order, entered in field Server ID created on a Scaleway the server and saved.
After that it worked and the password was changed.
The button "create" is not working.
screenshot http://joxi.ru/VrwG59sO0MRprX.png


Dependency & import cleanup

Makes Jupyter installation optional (removed from req, recommended in docs)
Simplify Ipython kernel check, now just returns the map object if not run in ipython
Minor improvements to required imports

LGTM


cannot set image

how can i set image in app?
I am giving path(src/client/assests/images/image.png) to image source but its not taking it.
any suggestion??

You would want to reference 'assets/images/image.png'


vectorarrow shouldn't be bold italic

According to "ISO 80000-2:2019 Quantities and units — Part 2: Mathematics" the vector notation should be either bold italic or non-bold italic accented by a right arrow. The bold italic style was applied even with the vectorarrow function.

Hi - thanks for the contribution! Could you run the typst binary and update the manual pdf? Once the PDF's diff is in this PR I can merge it.


Quick PR to transfer workflow from Yojoa to ROSS RS mini tools

Hey Katie!
There are two adds here:

the espa bulk downloads directions (espa_download/ESPA_bulkDownload_howto.Rmd)- there's no real code here, just directions for downloading requests from the website via code.

a workflow I'm transferring from the Yojoa project (https://github.com/rossyndicate/ROSS_RS_mini_tools/compare/main...steeleb:ROSS_RS_mini_tools:main?expand=1#diff-78494bd3bf4c95440f4454cf987d357c82d7d3d51e4e4466a4c4962cf1c5c4fd). This ended up not working for Yojoa, but may be useful for future you at some point. This workflow is a draft to download GLDAS/NLDAS/MERRA data via the data rods approach. This is really cool, because prior to data rods, gathering a timeseries from any of these was a TOTAL PITA and also super time consuming. Feel free to play/comment, but mostly this is just a move so no one re-creates the wheel and has a draft to start from.

You're awesome. There's no rush on this PR.

@kathryn-willi, no rush, but wanted to ping you on this stale PR!


export a handle style decorator

I'm using handle (async def handle(request) -> Response) in my aiohttp application.
it looks like currently it only support class based view, not request.
I try a code snippet to make it work:
(most of code are copied from inner)
from asyncio import iscoroutinefunction
from functools import update_wrapper
from typing import Callable, Iterable

from aiohttp import web
from aiohttp.web_response import json_response, StreamResponse
from aiohttp_pydantic.injectors import (
    CONTEXT, AbstractInjector, _parse_func_signature, MatchInfoGetter, BodyGetter, QueryGetter, HeadersGetter,
)
from pydantic import ValidationError

async def on_validation_error(exception: ValidationError, context: CONTEXT) -> StreamResponse:
    """
    This method is a hook to intercept ValidationError.

    This hook can be redefined to return a custom HTTP response error.
    The exception is a pydantic.ValidationError and the context is "body",
    "headers", "path" or "query string"
    """
    errors = exception.errors()
    for error in errors:
        error["in"] = context

    return json_response(data=errors, status=400)

def parse_func_signature(func: Callable) -> Iterable[AbstractInjector]:
    path_args, body_args, qs_args, header_args, defaults = _parse_func_signature(func)
    injectors = []

    def default_value(args: dict) -> dict:
        """
        Returns the default values of args.
        """
        return {name: defaults[name] for name in args if name in defaults}

    if path_args:
        injectors.append(MatchInfoGetter(path_args, default_value(path_args)))
    if body_args:
        injectors.append(BodyGetter(body_args, default_value(body_args)))
    if qs_args:
        injectors.append(QueryGetter(qs_args, default_value(qs_args)))
    if header_args:
        injectors.append(HeadersGetter(header_args, default_value(header_args)))
    return injectors

def decorator(handler):
    """
    Decorator to unpack the query string, route path, body and http header in
    the parameters of the web handler regarding annotations.
    """

    injectors = parse_func_signature(handler)

    async def wrapped_handler(request):
        args = []
        kwargs = {}
        for injector in injectors:
            try:
                if iscoroutinefunction(injector.inject):
                    await injector.inject(request, args, kwargs)
                else:
                    injector.inject(request, args, kwargs)
            except ValidationError as error:
                return await on_validation_error(error, injector.context)

        return await handler(*args, **kwargs)

    update_wrapper(wrapped_handler, handler)
    return wrapped_handler

@decorator
async def get(id: int = None, /, with_comments: bool = False, *, user_agent: str = None):
    return web.json_response(
        {
            'id': id,
            'UA': user_agent,
            'with_comments': with_comments,
        }
    )

app = web.Application()
app.router.add_get('/{id}', get)

if __name__ == '__main__':
    web.run_app(app, port=9092)

there is another sugestion:
all *Getter.inject can be asynchronous function, and just call await injector.inject(request, args, kwargs) without iscoroutinefunction call. ( and put BodyGetter at last )

Good job! Have a decorator for HTTP handler function is a great feature but the handler decorator should works with aiohttp_pydantic.oas.view.generate_oas(). and the decorator should take the on_validation_error hook in optional parameter.
Do you want to try to create a Pull requests ?

Sorry to say that, but I'm lazy to create a PR for this...
And I don't use this OAS feature.

No problem, I try to do that the next week. Thanks for your message it's always good to know how people use aiohttp-pydantic or what's it need.

No problem, I try to do that the next week.

@Maillol Is it now possible to use decorator instead of class based view?

You can try this branch.
https://github.com/Maillol/aiohttp-pydantic/tree/add-decorator-to-use-with-web-handler-fonction
from aiohttp_pydantic.decorator import inject_params

@inject_params
async def get(request, name: str = "") -> r200[list[Friend]]:

# request parameter is optional

@inject_params
async def get(name: str = "") -> r200[list[Friend]]:

# You can add custom on_validation_error function

async def on_validation_error(exception: ValidationError, context: CONTEXT) -> StreamResponse:
    ...

@inject_params(on_validation_error=on_validation_error)
async def get(name: str = "") -> r200[list[Friend]]:
    ...

Released https://pypi.org/project/aiohttp-pydantic/2.3.0/ !


encapsulate noise formatting

replace format *compiler-noise* with format-noise which includes check to see if defined.
format-noise includes fresh line.

Oh, and don't forget to take stylewarning's suggestion here and time the test suite before and after so you can brag about those sweet sweet speedups (or cry if it didn't do anything :D).
For example, in slime repl
(ql:quickload :cl-quil-tests)
(time (cl-quil-tests:run-cl-quil-tests))

Context: 2919 Lambda Quad: Linux lambda-quad 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
SBCL <IP_ADDRESS>-b8ee8710a
erichulburd:enhancement/compiler_noise_macro_ii
(#<test-run of CL-QUIL-TESTS: 212 tests, 40098 assertions, 0 failures in 541.085 sec>)
master
(#<test-run of CL-QUIL-TESTS: 212 tests, 40098 assertions, 0 failures in 589.467 sec>)

40 sec, not too shabby!

40 sec, not too shabby!

unless the stddev is +/- 60s :)