dynamic_rnn is much slower then manually using while_loop

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
TensorFlow installed from (source or binary): Source
TensorFlow version (use command below): 1.6.0-rc1
Python version: 3.5.2
Bazel version (if compiling from source): 0.11.1
GCC/Compiler version (if compiling from source): 5.4.0
CUDA/cuDNN version: 9.0/
GPU model and memory: NVIDIA 1080 TI
Exact command to reproduce: (see below)

python benchmark_lstm.py -d 512 -b 60 -t 380 -n 512  -w 20 -i 40
Describe the problem
Tensorflow dynamic_rnn is over twice as slow as static_rnn and using a simple application of tf.while_loop.
I noticed while doing some profiling that dynamic_rnn was much slower than static_rnn. At first I assumed this was because of something inherently slow about using dynamic length, but then I also noticed naively using tf.while_loop with rnn cell was also much faster and performed comparably to static_rnn.
I am not sure if there is some special cases dynamic_rnn needs to handle that causes it to be slower, or if there something not equivalent between my while_loop and the dynamic_rnn that I am missing. However a 2x performance change is a big deal and I wanted to report this just in case it points to a possible implementation improvement.
Source code / logs
Benchmark used:
import tensorflow as tf
import argparse
import numpy as np

from tqdm import tqdm

def while_loop_rnn(rnn_cell, x):
    initial_state = rnn_cell.zero_state(tf.shape(x)[0], tf.float32)
    x_t = tf.transpose(x, [1, 0, 2])

    def compute(i, cur_state, out):
        output, cur_state = rnn_cell(x_t[i], cur_state)
        return i+1, cur_state, out.write(i, output)

    time = tf.shape(x_t)[0]

    _, cur_state, out = tf.while_loop(
        lambda a, b, c: a < time,
        compute,
        (0, initial_state, tf.TensorArray(tf.float32, time))
    )
    return tf.transpose(out.stack(), [1, 0, 2]), cur_state

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("-d", "--dim", required=True, type=int)
    parser.add_argument("-b", "--batch", required=True, type=int)
    parser.add_argument("-t", "--time", required=True, type=int)
    parser.add_argument("-n", "--hidden", required=True, type=int)
    parser.add_argument("-w", "--warm_up", type=int, default=20)
    parser.add_argument("-i", "--iterations", type=int, default=20)
    args = parser.parse_args()

    cell = tf.nn.rnn_cell.LSTMCell(args.hidden)
    x = tf.constant(np.random.normal(scale=2, size=(args.batch, args.time, args.dim)).astype(np.float32))

    dynamic = tf.nn.dynamic_rnn(cell, x, dtype=tf.float32)[0]
    static = tf.stack(tf.nn.static_rnn(cell, tf.unstack(x, args.time, axis=1), dtype=tf.float32)[0], axis=1)
    while_loop = while_loop_rnn(cell, x)[0]

    sess = tf.Session()
    sess.run(tf.global_variables_initializer())

    print("Checking equivalence...")
    dynamic_out, static_out, while_out = sess.run([dynamic, static, while_loop])

    if not np.allclose(dynamic_out, static_out):
        raise RuntimeError()
    if not np.allclose(dynamic_out, while_out):
        raise RuntimeError()

    for name, op in zip(["dynamic", "static", "while"], [dynamic, static, while_loop]):
        print("Testing %s" % name)
        print("Warming up...")
        for _ in range(args.warm_up):
            sess.run(op)

        for _ in tqdm(range(args.iterations), "run", ncols=80):
            sess.run(op)

if __name__ == "__main__":
    main()

Nagging Assignee @ebrevdo: It has been 21 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @ebrevdo: It has been 36 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @ebrevdo: It has been 66 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

With TF 1.9 CPU version
On Dell XPS13 with i5-6200U
Running this benchmark via PyCharm, with the suggested parameters:
-d 512 -b 60 -t 380 -n 512 -w 20 -i 40
Yields:
Dynamic: 3.15 seconds / iteration
Static: 2.77 s/it
While-loop: 3.17 s/it

Nagging Assignee @ebrevdo: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Sounds like the numbers are in line now?
On Sat, Aug 4, 2018, 11:39 AM Alfred Sorten Wolf<EMAIL_ADDRESS>wrote:

Nagging Assignee @ebrevdo https://github.com/ebrevdo: It has been 14
days with no activity and this issue has an assignee. Please update the
label and/or status accordingly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/18705#issuecomment-410469245,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtim48e3S1JbWRIGNFRDxHi7xI_llYhks5uNepNgaJpZM4Tcb9R
.

In my case, yes. @chrisc36 , it could be interesting to see if a rerun with TF1.9 on your configuration gives a similar result, if you find it interesting.

Nagging Assignee @ebrevdo: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @ebrevdo: It has been 29 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Closing, please reopen if you see a reason t

@RanFeldesh Was your benchmarking run with GPU support? The problem I encountered is, bidirectioanl_dynamic_rnn is executed unreasonably slow even though setting tf.device("/device:GPU") and allow_soft_placement=True.

@XilunWu No GPU

I confirm.
Using tensorflow 1.10.0 installed with miniconda (python 3.6.6) on a Linux machine.
Tested on a word+char level GRU-based classifier with tf.nn.dynamic_rnn and without using a simple for loop. There were two GRU cells (GRU(200), GRU(20)) for word level and char level accordingly.
With tf.nn_dynamic_rnn the epoch processing time takes 80 sec. Using simple for loop takes 50 sec.


DS3231 v3

Changes since #167  :
Fix typo in comment.

Changes since #166  :
Use enums instead of defines.
Add license string in the ds3231 driver.

Hi @bhuvanchandra,
Thanks for these changes, looks good. The only other change, as mentioned in the other PR, is to change tabs to spaces (I missed this when looking at the original PR.) There are some coding guidelines here: https://github.com/SuperHouse/esp-open-rtos/#coding-style
Also, thanks for re-squashing your commits to keep the history clean & logical. You don't need to start a new PR each time, though. You can force push (git push -f) to the old PR branch and the PR will automatically update. I know it's considered a bad habit to force push, but for "your" PR branches it's OK. :)
Angus

Hi @projectgus,
Fixed the tab indents and force pushed the changes.
--
Bhuvan

Hi @projectgus,
Also pushed the changes as per @sheinz comments.
--
Bhuvan

Started testing this and it looks ok so far. It seems fine to merge it.
One request is to change ds3231_getTempInteger to return a uint16_t and include all the 12 bits available rather than truncating to 8 bits. Then ds3231_getTempFloat could reuse the same code, or perhaps even be removed leaving it to the caller to convert to a float if they need to.

The casting '(signed)data[0]' in ds3231_getTempFloat might not be correct. Here's a suggestion that also returns all 12 bits for the integer version which could be used for the float version too:
bool ds3231_getTempInteger(int16_t *temp)
{
    uint8_t data[2];

    data[0] = DS3231_ADDR_TEMP;
    if (ds3231_send(data, 1) && ds3231_recv(data, 2)) {
        *temp = (int16_t)(int8_t)data[0] << 2 | data[1] >> 6;
        return true;
    }
    return false;
}

I agree with @ourairquality that (signed)data[0] is not correct. But it will work nevertheless as *temp is int8.
With suggested by @ourairquality code I would suggest multiply the result by 25 and specify in the comment that function returns temperature in hundredth of a °C, for example 2525 is 25.25°C.
From the datasheet:

Temperature is represented as a 10-bit code with a
resolution of 0.25°C and is accessible at location 11h and
12h. The temperature is encoded in two’s complement
format. The upper 8 bits, the integer portion, are at location
11h and the lower 2 bits, the fractional portion, are in
the upper nibble at location 12h. For example, 00011001
01b = +25.25°C.

@bhuvanchandra Have you tested the negative temperature values? I'm not sure if the temperature in a register is a signed integer. It might just flip the sign bit without inverting the data bits. I haven't found information in the datasheet.

@ourairquality and @sheinz, thanks! for your feedback and suggestions.
@ourairquality, agreed, will update it accordingly.
@sheinz i didn't test at negative temperature, i guess it will flip the sign bit for negative values. The only clue we have is that the temperature value(10-bit) is encoded in 2's complement.
How about this snippet:
bool ds3231_getTemperature(int16_t *temp)
{
    uint8_t data[2];

    data[0] = DS3231_ADDR_TEMP;

    if (ds3231_send(data, 1) && ds3231_recv(data, 2)) {
        /* Check the sign bit */
        if (data[0] >> 7) {
            *temp = (int16_t) ((((data[0] & 0x7F) << 2) | ((data[1] & 0XC0) >> 6)) - 1024) * 25;
            return true;
        }

        *temp = (int16_t) ((data[0] << 2) | ((data[1] & 0XC0) >> 6)) * 25;
        return true;
    }
    return false;
}

@sheinz Could an API that returns the binary fixed point representation generated by the device please be included as a minimum. Multiplying by 25 just frustrates most callers, causes premature overflow and loss of precision in subsequent integer computation. Personally I would not even include the *25 and float API, but just request the binary fixed point API from which the other two variants can easily reuse.
@bhuvanchandra The encoding of the sign appears to be twos-complement (but I shall try to test) and the suggested code did work on some examples and is much simple. It's not necessary to mask out the low bits before the right shifts etc, lots of unnecessary code. I think the C standard guarantees that int16_t has a two's complement representation, but not certain, but it seems fine to me to assume all target devices use two's complement.

Just to be sure on the negative temperatures, put it in the freezer and with the above suggested code it made a clean transition below zero and back above zero which is consistent with it being two's complement and supports my code suggestion above.

Could an API that returns the binary fixed point representation generated by the device please be included as a minimum. Multiplying by 25 just frustrates most callers, causes premature overflow and loss of precision in subsequent integer computation. Personally I would not even include the *25 and float API, but just request the binary fixed point API from which the other two variants can easily reuse.

Then provide additional function, that might be named something like ds3231_getRawTemperature which would return pure data from the registers.
In my opinion having those three function would cover all the users needs for the temperature:
ds3231_getRawTemperature - will return pure register data(shifted)
ds3231_getIntegerTemperature  -  will return only integer part of the temperature
ds3231_getFloatTemperature

names are just for reference, feel free to name it as you see appropriate

Supplying those three options sounds ideal to me. I can see different use cases for each.

@ourairquality yes, your code suggestion works nicely at negative temperatures also. I also tested it at my end today.
@sheinz, @projectgus, will add the three options.
--
Bhuvan

Pushed the changes.

Thanks @bhuvanchandra, this looks good so I'll go ahead and merge it.


replace ciso8601  with speedate?

https://github.com/developmentseed/tipg/blob/12a5e544259e32809f981b9d83f9b04eff6ba0d6/tipg/collections.py#L11C22-L11C35
https://github.com/pydantic/speedate

I can work on it

that would be lovely @krishnaglodha 🙏

On it
Thank you,
Krishna G. Lodha
Personal email : @.***
Office email : @.***
On 15 Jul 2023 at 21:42 +0530, Vincent Sarago @.***>, wrote:

that would be lovely @krishnaglodha 🙏
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

Hi , speedate is rust package? am I missing some link ?

@krishnaglodha 🤦 yes it is, I was assuming they published the python bindings but no 😓

@vincentsarago , let me know if you need me anywhere else .
GIS | PYTHON | DOCUMENTATION


Squashed image is different from original

I am new to docker so I may be doing something wrong here, but as far as I can tell, something is being lost in the squashing process.
I am squashing an image based in python:2.7 and after the squash python is broken.
The difference between the two images seems to be that the squashed image is missing the python2.7 dir in /usr/local/lib/
Steps to reproduce:
# setup
docker pull python:2.7

# squash
docker save `docker inspect --format '{{ .Id }}' python:2.7` | sudo docker-squash -verbose -t python:squash | docker load

# make sure it works pre-squash
docker run -it python:2.7 python -c 'print "it works"'

# show it fails post-squash
docker run -it python:squash python -c 'print "it works"'

# good one has /usr/local/lib/python2.7
docker run -it python:2.7 ls -alh /usr/local/lib/

# squashed one doesn't
docker run -it python:squash ls -alh /usr/local/lib/

Hey Tristan.  That python:2.7 image has a apt-get purge python.* line in it's history.  That is removing /usr/local/lib/python2.7. Later on, it has a pip install virtualenv line which re-install python2.7 in the same location.
There seems to be an issue where the previous delete is overwriting a newer writes to the same location.  Deletes in docker images don't really delete anything an just hide the in later layers.  I think how docker-squash is deleting whiteouts is not quite right in this case.  It should only delete files that have modification date older than the whiteout files date.

I think that I'm running into something similar. I have an image deletes some files in /etc/yum.repos.d/ as one of the earlier steps in the Dockerfile. When I run it through docker-squash, those files are back. I double-checked that they do NOT exist in the source image.

+1 on this as well. it seems that when certain packages are installed ( such as vim ) the vim binary goes missing inside of the container after a squash.

I'm investigating how docker squashing works , and understanding the docker layer format. I was curious about deletions and did some tests. In short, the way this project manages deletions is incorrect.
@jwilder you're correct to say that

I think how docker-squash is deleting whiteouts is not quite right in this case.

However, you then say...

It should only delete files that have modification date older than the whiteout files date.

I'd really advise against doing this, I feel like file-modification date is not reliable for detecting these cases. There's a better way, anyway:
The code currently unpacks every layer, in order, into a temporary directory, and then does a sweep at the end finding .wh. files ('whiteout
files, docker's internal marker for a deleted file) and deleting them if present.
This means that if you delete a file in layer N, then add it again in a later layer M, there will be a 'stale' .wh. file -- docker squash will delete the file that you re-added!
I can imagine this causing a ton of pain with things like package manager files :scream:
The solution, I think, is to sweep for .wh. files per-layer -- making sure that all .wh. are removed, before the next layer, even if they don't point to anything.

I'm having the same problem that the squashed image has files that are supposed to be deleted. As a result I had to stop squashing the image because I really needed one of those files to be gone.
I think a good sanity test for this utility would be to check that the files in the final squashed image are the same as that in the final original image!

I just got bit by this one. I had something along the lines of
RUN  mv /etc/foo /etc/foo.backup
COPY bar /etc/foo

but the final squashed image only had /etc/foo.bakcup, no /etc/foo.

@orls Went with you suggestion of removing whiteouts after extracting each layer.  Thanks!
@tescalada Thanks for the repro steps!

Works for me... :+1: Thank you!

@jwilder A file that I deleted in the Dockerfile actually came back in the squashed image. In fact, on the image that I squashed, the squashed image had a few hundred files more than the un-squashed one.
This happens even on v0.2.0.
Dockerfile:
from oraclelinux:6
run rm -vf /etc/yum.repos.d/public-yum-ol6.repo

build with docker build -t original .
squash original to squashed

Testing:
docker run --rm original ls /etc/yum.repos.d
docker run --rm squashed ls /etc/yum.repos.d

@chnrxn Try adding -from root to your squash step.

@jwilder that works, but then that also takes away the base layer, which I would really like to keep. Is there no way of ensuring that files stay removed without forcing a -from root?

@chnrxn In this case, you would need to squash the base image and use that as your base image. Squashing will only remove files added and removed after the base image unless you specify -from root.


Discussion

Hi, how are you?
I'm interested in this project?
Could we connect?

okay.
My name is Anthony. I'm full-stack & AI developer.
Could we chat on whatsapp or telegram?

This definitely seems a bit sketchy. This project is super old and I can't imagine what you'd want to talk about.

I have a client who wants this kind of project, so I'd like to discuss it in more detail.

A few details:

This was originally written back when GitLab didn't have a proper Slack integration.

Since I was writing one, I customized the output and tracking for our needs and workflows -- e.g. for the specific way we used labels.

In general, it's just a service that listens for requests representing outgoing webhooks from GitLab, processes them, and makes a request to an incoming webhook configured on Slack to post a customized message. The details are just in how that's processed and what it displays in Slack.

The code is MIT licensed, so there are no usage restrictions. That said, the code is not "modern" JS anymore ... 5 years is a long time in the JS world 😅. If I were writing something like this again, I would just start by setting up the HTTP server and verify the webhooks are coming in, then I'd just hook that up to make the requests to Slack to post some message. Then after that it's just building out the details.


back irradiance

I am comparing the model with data from our installation and I am always overestimating back irradiance, mostly on winter.
I am comparing qinc from the back of the pvrow to my reference cell data. Should I also consider reflection and iso?

I took the back irradiance from the surface element equivalent to the reference cell position.

Hi @tcapelle , thanks a lot for reaching out!
qinc is actually the sum of all the light components calculated in pvfactors (direct, isotropic, circumsolar, horizon, and reflection), so this is the right output to use: it's the calculated total irradiance incident on the back surface.
We have a paper that we presented at IEEE PVSC 46 coming up soon that show a validation and benchmark of pvfactors. Some important points to consider are the following:

edge effects: pvfactors (and other simple 2D view factor models) assume infinitely long PV rows, so this means that if you carry out measurements on a small PV system, the edge effects (ie the light coming from the sides of the PV systems) will have a lot of impact and pvfactors results will make less sense, and will very likely be lower. Since pvfactors is over-predicting here, this is probably not the issue.
racking: we also compared pvfactors predictions to measurements performed on a fixed tilt system that had a heavy racking system, with large concrete blocks on the ground. For that particular system, we saw that the racking system had a large effect on back-surface irradiance measurements, and we observed big discrepancies between measurements and calculated values especially during the winter, and less during the summer, most likely because the concrete footings cast long shadows on the ground during the winter, therefore decreasing the observed back-side irradiance on the systems. And simple 2D VF models like pvfactors are generally not accounting for complex racking systems like that, and so they can perform poorly. This could be what's happening in your case.
AOI losses: another point is that pvfactors doesn't apply any angle-of-incidence (AOI) losses to the calculated irradiance, so in general, pvfactors calculations will be closer to measurements performed with pyranometers (vs. ref cells) because these sensors are less sensitive to AOI effects. So this could contribute to higher calculated back-side irradiance.

Quick question: why is there such a drop in measured irradiance at the beginning of September 2017? (which doesn't seem to recover anytime onward) Does this happen on the front surface as well?

Thanks you for the detailed explanation.
My front irradiances are almost perfect:

Hi @tcapelle , this kind of capability doesn't exist in pvfactors at this moment (nor does it in bifacialvf or PVSyst as far as I know), but I don't think it would be impossible to implement, just difficult.
For more detailed simulations like that, people generally turn to 3D ray-tracing methods: bifacial_radiance is an open-source package that would allow you to do this. There is a bit of a learning curve, but I'm sure the maintainers would be happy to help!

I am already using bifacial_radiance.
It is far from being easy.

Thanks for the awesome feedback @tcapelle ! We've been putting a lot of effort into it and I really appreciate your contribution too.
I'm going to close this issue for now since it's been a while, but feel free to re-open it if you have additional questions.


NNNN-mets extension: use info.json archiver instead of ocfl archiver if available

within the mets file, the archiver provided by ocfl generation is used.
if there's a info file from NNNN-metafile extension, the archiver from this file should be used.

if available, info.json is used as archiver in json


IE: Issue with app.js bundle, when minify is set to "true" for systemjs builder

When opening production dist in IE11, you get syntax error in app.js.
Appears after migration from browserify to sustemjs builder.
Only happens when "minify" set to true for bundler options.
Please see the attachment for full snapshot of error log console from IE.
IE11,
npm 3.7.2
node 5.3.0
EXCEPTION: SyntaxError: Expected ')'
EXCEPTION: SyntaxError: Expected ')'
STACKTRACE:
SyntaxError: Expected ')'
at evalExpression (file:///C:/dev/git/angular2-seed/dist/prod/js/app.js?1455752277346:27:30172)
at TemplateCompiler.prototype._createViewFactoryRuntime (file:///C:/dev/git/angular2-seed/dist/prod/js/app.js?1455752277346:8:20302)
at Anonymous function (file:///C:/dev/git/angular2-seed/dist/prod/js/app.js?1455752277346:8:17949)
...

Just to add some information... on Microsoft Edge (aka IE 12) the problem does not occurs.

@dimarzionist I'll spin up a windows vm and take a look at this

@Bigous Can you tag this one, That's confirmed on Win10/IE 11

I'll see if I can run down the "why" portion

Could be related to this:
https://github.com/angular/angular/issues/6695

It is the compression version of the problem. it works if you just mangle it.

Removed the bug label - @dimarzionist is right.

Mangle the code can cause another issues in injector according to the same issue report.


feat: compatibility with the experimental API registerTimelineProvider

Types

[x] 🎉 New Features
[ ] 🐛 Bug Fixes
[ ] 📚 Documentation Changes
[ ] 💄 Code Style Changes
[ ] 💄 Style Changes
[ ] 🪚 Refactors
[ ] 🚀 Performance Improvements
[ ] 🏗 Build System
[ ] ⏱ Tests
[ ] 🧹 Chores
[ ] Other Changes

Background or solution
close https://github.com/opensumi/core/issues/2424
Changelog
compatibility with the experimental API vscode.workspace.registerTimelineProvider

@PerfectPan 感谢提交，将会在 2.23.0 发布该内容


[IT-832] Fix insertion

Apologies - doing some funky stuff on my fork and wanted to open a pr to my master branch 🙃


[Question] Open to receiving patches for Mainframe?

I'm working on a reasonably large body (> 1M lines) of mainframe Natural ; there's plenty in here the parser can't currently cope with, like e.g. the deprecated "not equals", but I'd love for your tools to be able to cope with it all because it will make a number of things easier.

Mainframe : ¬=
Unix : ^=

Is the project open to receiving patches inspired by rather old Mainframe code? Would you want things gated behind mode flags? Would diagnostics warning of Mainframe vs Unix compatibility issues be welcomed?

@Claes65 is using Natural on the mainframe while we use it on Linux.
We currently don't make any distinctions in the parser, so patches like these are welcome. Some mainframe specific stuff is already supported, as I understand, because Claes is adding it.
Our goal is not to be a compiler, so if the parser is happy with ¬= but the compiler is yelling at us, that's okay.
This might change in the future if there are differences that are bigger, but I can't see that coming around any time soon.
Another example is that we don't care about the parser settings (yet), so 1.5 and 1,5 are both seen as a floating point number, because the settings DecimalCharacter and ThousandSeparatorCharacter from Natural are not known to this project.
In this particular case, we can add support for ¬= and add diagnostics.
Code style diagnostics are gated behind flags in an .editorconfig file, as described here.
natls.style.comparisons with value sign will raise a diagnostic if you write #A EQ #B because it wants it to be #A = #B.

Would diagnostics warning of Mainframe vs Unix compatibility issues be welcomed?

Missed that. That could be a good idea and helpful if you migrate from mainframe to unix. Might also have to go behind a flag.

Closing as the question has been answered


Budget Section: Expenses Link Goes to Transactions Page

Describe the bug
It seems that there's a link in the budget section which says, "View all expenses" but when clicked on it goes to the transactions page instead.

Related discussion: https://opencollective.slack.com/archives/C6JTTA4SK/p1712159496076679

It's not a bug; the transaction link you end up at is pre-filtered on expenses (e.g., https://opencollective.com/babel/transactions?kind=EXPENSE). The rationale here was probably that you're looking at the budget section, and only paid expenses play a role in your budget.
It can definitely mislead users, so I would propose renaming the link to "View all paid expenses" to clear out the confusion.


Push latest docs down into a "latest" folder

Currently, the master-branch documents are generated daily and appear at http://docs.zephyrproject.org.  Tagged release branch documentation appear at http://docs.zephyrproject.org/1.11.0/ (for example).  Proposal is to move the master branch docs into http://docs.zephyrproject.org/latest to solve a problem with the CI systems not being able to properly sync the generated content folder because the tagged version docs are contained within the directory structure of the latest docs not as a sibling folder of the latest docs.

Duplicate of #5524


fix "Usage:" in help

current behavior:
kubelift --help
Usage: /usr/local/bin/kubelift [operation] [options...]

desired behavior:
kubelift --help
Usage: kubelift [operation] [options...]

fixed it:
kubelift --help
Usage: kubelift <operation> [options]


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:1: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:1: missing_python_build_tool: Python packages require a python build tool such as setuptools.
ERROR: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:1: missing_python: For pypi packages, python should be present in the host and run sections. Missing in host
ERROR: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:28: missing_pip_check: For pypi packages, pip check should be present in the test commands
INFO: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:31: invalid_url: https://www.github.com/locationlabs/mockredis : URL domain redirect www.github.com ->  github.com
ERROR: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:33: incorrect_license: The recipe's about/license key is not an SPDX compliant license or license exception, reference https://spdx.org/licenses/
INFO: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:36: invalid_url: https://www.github.com/locationlabs/mockredis : URL domain redirect www.github.com ->  github.com
INFO: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:37: invalid_url: https://www.github.com/locationlabs/mockredis : URL domain redirect www.github.com ->  github.com
WARNING: /tmp/abs_ffi1w6ks2p/clone/recipe/meta.yaml:37: missing_description: The recipe is missing a description
Errors were found


Fix end transitions not firing

Hey :-)
I couldn't get the closing events to trigger and had to convert the transition key to all lowercase for it to fire off as expected.
+ ontransitionend: onTransitionEnd
- onTransitionEnd: onTransitionEnd

Either way, I appreciate your work! 🥳 Transitions have always been a weak spot of mine and components like these makes life so much easier.

Hmm, odd. 🤔
The transitions within the component itself (i.e. close-end or close-start). In fact, the onTransitionEnd function in its entirety.
Some information about my setup which might be useful.
NPM: v7.10.0
Node: v15.14.0
Vue: v3.0.11
Webpack: v5.35.1
Doesn't trigger in either Chromium or Firefox.


File Extension Not Applied

When saving a new file, no file extension is added. It is unclear what file extension should be added. When opening files, none appear available because they have no file extensions.
I am running this on Ubuntu 18.04 with the Nautilus file browser.

Based on this the file extension should be ".json":
https://github.com/mike-goodwin/owasp-threat-dragon-desktop/blob/f94e1df4e1f5f881fc38b1b03aea36d1bdecf068/app/services/electron.js#L43
I'm not sure if a custom check should be written or if there is a native Node/Electron way of doing this.

Thanks @nstr10 - I have checked this on my debian Linux and see the same thing. On MacOS and Windows it prompts with 'Untitled.json' but not Linux.  If you can get a fix for this that would be great, otherwise I can have a look later in the week.

Hello @nstr10 , just committed a fix where  defaultPath: "new-model.json", is applied, so if you update your checkout and run it again it should work OK

@jgadsden that definitely helps a lot, but the behavior is still a bit unusual if you don't take the default filename. For example, if I save a file as test it doesn't get the .json extension and therefore the open dialog does not show it.
I'll do some research into Electron this weekend and try to make a pull request.

Thanks @nstr10 , you make a very good point. I have reopened this issue, and if you can get a fix then that would be great.

Submitted a workaround for the open dialog. It looks like the issue with the save dialog is being debated upstream: https://github.com/electron/electron/issues/21935


Frequent cache access error warnings on Win32

Bug description
The cache writing code frequently runs into WinError 32 warnings due to parallel access by different processes.
This might be due to the typical Windows Defender antivirus interfering with a create & rename operation. Files in use may not be renamed on windows.
Reproduction steps
Run pip-audit --local on a Windows machine with the default Defender Antivirus enabled.
Expected behavior
No warnings, at least one retry.
Screenshots and logs
DEBUG:pip_audit._cli:parsed arguments: Namespace(local=True, requirements=None, format=<OutputFormatChoice.Columns: 'columns'>, vulnerability_service=<VulnerabilityServiceChoice.Pypi: 'pypi'>, dry_run=False, strict=False, desc=<VulnerabilityDescriptionChoice.Auto: 'auto'>, cache_dir=WindowsPath('c:/temp/audit'), progress_spinner=<ProgressSpinnerChoice.On: 'on'>, timeout=15)
- Auditing zope.interface (5.4.0)
DEBUG:cachecontrol.controller:Looking up "https://pypi.org/pypi/alabaster/0.7.12/json" in the cache
DEBUG:cachecontrol.controller:No cache entry available
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /pypi/alabaster/0.7.12/json HTTP/1.1" 200 6108
DEBUG:cachecontrol.controller:Updating cache with response from "https://pypi.org/pypi/alabaster/0.7.12/json"
DEBUG:cachecontrol.controller:etag object cached for 1209600 seconds
DEBUG:cachecontrol.controller:Caching due to etag
WARNING:pip_audit._service.pypi:Failed to write to cache directory, performance may be degraded: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'c:\\temp\\audit\\8\\8\\c\\3\\c\\tmpfibz6hh_' -> 'c:\\temp\\audit\\8\\8\\c\\3\\c\\88c3c4038e9abf700f212a9b6a8b1294aca8991fc28f185b1fd2a782'
DEBUG:cachecontrol.controller:Looking up "https://pypi.org/pypi/argon2-cffi/21.1.0/json" in the cache
DEBUG:cachecontrol.controller:No cache entry available

Platform information

OS name and version:
pip-audit version (pip-audit -V): pip-audit 1.0.1
Python version (python -V or python3 -V): Python 3.9.7
pip version (pip -V or pip3 -V): pip 21.3.1

Additional context
Maybe using https://pypi.org/project/atomicwrites/ would help?

@schlenk What's the output of pip cache dir here?

Interesting that this is a problem -- we shouldn't be doing any parallel access, although I guess we do technically have nested serial access by virtue of running pip within pip-audit whenever we're in requirements mode. But the mode you specified (environment + --local) shouldn't be triggering that case.

It should not matter, as it also happens with --cache option.
The pip cache dir is in the typical user profile location:
c:\users\msc\appdata\local\pip\cache

The parallel access is probably from the outside (e.g. virus scanner), but as Windows Defender is default on by now, the code should handle that.
I would suspect that this code is vulnerable to a race condition:
`
with NamedTemporaryFile(delete=False, dir=os.path.dirname(name)) as io:
io.write(value)
        # NOTE(ww): Similar to what `pip` does in `adjacent_tmp_file`.
        io.flush()
        os.fsync(io.fileno())

        os.replace(io.name, name)

`
The os.fsync() might take long enough so the virus scanner notices the new file, then it races against the os.replace(). If any other process holds a file handle for the named temporary file, the os.replace() will fail and should be retried with a tiny delay like 50ms or so.

That makes sense, thanks for pointing that out. I'm a little bit hesitant to go with a hardcoded delay + retry loop, since it turns a failure mode into a potential deadlock (in the unlikely event that Windows Defender or whatever other AV refuses to give up the file handle.)
I'll see if there's a way we can introduce additional creation/access flags here to prevent Defender from trying to obtain access.

The retry loop should probably just retry 1 or 2 times and simply run in the error path afterwards. And yes, the deadlock happens otherwise.
It may be possible to avoid the issue by setting up some share mode like 0x0, but didn't try here. (https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea see dwShareMode ).

Yeah, in an ideal mode we'd use dwShareMode, but it looks like Python's (uniform) file APIs don't expose it yet.
We'll try the retry-with-error-path approach for now. I'll have a PR ready in a moment.

Yes, sadly https://bugs.python.org/issue15244 is still in limbo. And the SHARE_MODE seems to be the problem here, as the code tries to rename the file held open by the same process, which only works on Windows when the file is opened with SHARE_MODE_DELETE.


[Bug]: Can not use import.meta.dirname in rsbuild.config.ts

Version
System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (2) x64 AMD EPYC
    Memory: 1.77 GB / 4.01 GB
    Container: Yes
    Shell: Unknown
  npmPackages:
    @rsbuild/core: ^0.7.9 => 0.7.9
    @rsbuild/plugin-react: ^0.7.9 => 0.7.9

Details
I want to use import.meta.dirname API in rsbuild config file which is supportted in esm module since node v20.11.0
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";

console.log(import.meta.dirname);

export default defineConfig({
  plugins: [pluginReact()],
});

but it will throw a SyntaxError:

From the error stack, I learned that rsbuild loads the config file with jiti. After some attempts, I discovered that rsbuild precompiles an old version of jiti code which doesn't support import.meta.dirname in its distribution. This means I can't use methods like pnpm.overrides to change the installed jiti version, and only downgrade to fileURLToPath(import.meta.url)'s function call.
Is there any problem upgrading the jiti version? The import.meta.dirname API has supportted in v2.1.0 .It would be great if I could see this feature supported in the next version.
If not, could you explain why and if there's another way to use import.meta.dirname or plans to upgrade jiti?
Reproduce link
https://codesandbox.io/p/devbox/ts-config-esm-37nx8q
Reproduce Steps
run dev task

Currently import.meta.dirname is supported in the rsbuild.config.mjs file.
For rsbuild.config.ts, we need to upgrade jiti to add support for import.meta.dirname, I will try to do the upgrade this week. 😄

I have just discovered that we cannot upgrade to jiti v2 at the moment because postcss-load-config is using jiti v1.


Can not see banner web part

Hi Team,
I was trying to the webparts given in starter kit. but it looks like banner webpart is missing.
please note that other webparts are available.
Please have a look on attached image.

Steps to reproduce :
I added sharepoint-starter-kit.sppkg in my app catalog and i can see other webparts but banner webpart is missing.
Please suggest.

Hi Team,
Please let me know if did not properly explained the question.
I am waiting for a reply from several days
Thanks,

I have the same issue, but

Hi @mukeshhope, @DeanGross,
The Banner web part is not available with the current version of the solution. I'm not aware of the reasoning behind that.
If you have an ability to rebuild the solution by yourself, you can make it available by modifying the solution/src/webparts/banner/BannerWebPart.manifest.json file. You'd need to change the "hiddenFromToolbox": true, value from true to false.
Probably, @VesaJuvonen can comment more on that as he has committed that change https://github.com/SharePoint/sp-starter-kit/commit/1bd7600735bacfa96f838ca752f685593c744ce9#diff-bfcafc8f333e4d19dc74329b830a1b8d.

In addition to my previous comment:
I don't know the reason, but my guess is that the Banner web part has been deprecated. That is why it has been hidden.
The standard Image web part provides almost the same functionality. The Image web part lacks the parallax effect, but its look is more in line with the overall style of communication sites.
As a confirmation for this assumption, the current version of a home page that got provisioned contains 3 Image web parts at the bottom, where 3 custom Banner web parts were previously.
BTW, the same is with the custom Weather web part - it has been hidden as the standard Weather web part is now available.

Hi, yes the following contributions to this issue are correct. As mentioned, if you want to use this web part, you could set 'hiddenFromToolbox' to false.
Thanks!


New cop that check if find_by(*) works fine

I'd like to suggest a new cop, which detects misusing of find_by method (ie: find_by(some_id)) and points out it should be find_by(id: some_id)
I think it's really hard to find that misusing.
Note: I'm not sure if this is rubocop's business, so if it's not then tell me so please. Thanks :)

The idea is good, but it is very hard to do this without false positives in RuboCop, because the variable passed to #find_by could reference a hash, which is perfectly fine. 😕

Thank you for your replying.
I see... Can I try to add the cop and submit pull request? I'm thinking this cop will check if  argument is id: some_id or { id: some_id }.

Sure.

In Rails 5.0 and higher, giving an Integer object as an argument to find_by causes an error.
> Model.find_by(1)
ArgumentError: Unsupported argument type: 1 (Integer)

https://github.com/rails/rails/commit/b27fb2d8e76
Currently Rails 4.2 is released only for severe security maintenance, but it will soon be an EOL.
http://guides.rubyonrails.org/maintenance_policy.html
http://weblog.rubyonrails.org/2017/9/27/Rails-4-2-10-released
I thought about taking over this implementation of cop. However, it may be less useful in the near future and I canceled it. Perhaps it may be good to close this issue.

As mentioned above comment, this is not a problem if Rails is upgraded to 5.0 or higher. and I think that is the main solution.
And I think that minimum supported Rails version by Rails department will go up in the future. So this cop will be short in its life cycle. I'd like to close this issue If there is no objection.


Engineering: Integrate a pre-built kiwix-lib

Break the need to compile kiwix lib locally.

The project is stalled since many years and has not reached the v1.0. Archiving the project. Please contact @julianharty if you are interested to work on the project.

The project is stalled since many years and has not reached the v1.0. Archiving the project. Please contact @julianharty if you are interested to work on the project.


Added structure and psudocoded handlebar files.

Added some old css from a previous project to be refactored.

i guess


V1.0.0

First release
Copied from TWE and amended files picard bed, happy bed and multiqc config for CEN

Hello @Aisha-D! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file egg5_config.py:

Line 5:1: E402 module level import not at top of file
Line 11:19: E261 at least two spaces before inline comment
Line 28:80: E501 line too long (82 > 79 characters)
Line 31:80: E501 line too long (83 > 79 characters)
Line 37:80: E501 line too long (100 > 79 characters)
Line 82:74: W291 trailing whitespace
Line 133:80: E501 line too long (84 > 79 characters)
Line 135:80: E501 line too long (90 > 79 characters)
Line 141:80: E501 line too long (95 > 79 characters)
Line 143:80: E501 line too long (100 > 79 characters)
Line 151:80: E501 line too long (80 > 79 characters)
Line 192:80: E501 line too long (84 > 79 characters)
Line 194:80: E501 line too long (90 > 79 characters)
Line 200:80: E501 line too long (95 > 79 characters)
Line 202:80: E501 line too long (100 > 79 characters)


Preseed stop working after swapping ubuntu-16.04.4-server-amd64.iso by ubuntu-16.04.5-server-amd64.iso

Hello,
Any idea why simple swapping of ISO of ubuntu-16.04.4-desktop-amd64.iso by ubuntu-16.04.5-desktop-amd64.iso would break preseed.cfg??
This project doesn't seems much alive... Would like to contribute and help maintaining it but there is 7 pending pull request and I am experiencing weird issue while trying to use new ubuntu iso available which in another setup pass the preseed step and install... But even if the packer output says that it use the .5 iso and start working with this iso the box that get created at the end kind of get reverted to .4 iso which is pretty annoying... I have look all over the place to try to find where such behavior could come from in boxcutter files and can't find anything, that I haven't change that could lead to that out come...
I think I find some explanation that "apt update" and "apt upgrade" could lead to that out come...
Any insight are welcome so I stop pulling my hair...
Thanks

My version of virtual box was bit outdated, so it might be the reason I fall on this issue... I upgraded it and now I have been able to pass the preseed step... I keep report my progress...

It works... will submit a PR...

The commit wasn't include the "Close #152" keywords, so the issue didn't get close automatically at merge...


Items unobtainable

It's impossible to get items through commands or creative inventory, modid exists because the mod of something creative tab gets the correct name from en_us.lang

Hello? Anybody???

fixed problem, ITEMS has to be declared in SomethingModItems.java


Automatically run unknown commands in the web container

The Problem/Issue/Bug:
Currently to run a command in the web container a proper custom command has to be defined. It would be nice if unknown commands are just forwarded to the web container without the need of defining a custom command. If the command is not found it still can fail later.
How this PR Solves The Problem:
Unknown commands are simply forwarded to the web container and if found the exit code is properly returned.
If the command is not found an error is shown like it's done before.
Manual Testing Instructions:

run ddev ls, the content of var/www/html should be listed
run ddev invalid, an error should be shown

Automated Testing Overview:

Related Issue Link(s):
Release/Deployment notes:

You'll want to rebase when you get back to this, thanks.

Looking forward to seeing this see the light of day. The only issue is whether it can be predictable for people. How will help work? How will people know what anything does?

Do you think this has a future @gilbertsoft ? It's nice, but the ambiguity of what to expect is a little troublesome. Easy enough to fix the test failure.

Lets finish this one, will rebase later...

Tested now and works like expected. I'm currently restarting the failing tests which don't have real issues...

It turns out that buildkite tests are run with Drupal6 by default, meaning that TestCustomCommands starts out with Drupal6. Then when the test changes the config type to php, it doesn't restart the container, meaning drush is still in there, so the test detects drush in that circumstance. At least I think this was the issue. I pushed https://github.com/drud/ddev/pull/3695/commits/b5b4f6349a9a0d8b652296290ad3710b6f6b2a14 to try to fix this.

@cmuench @jonaseberle Would love it if you could review this and try it out. It's a slick enhancement, my only concern is that it could cause confusion because of the undefined nature of commands in the future.

I think it is conceptually in a tough spot:
For working inside a container we have ddev ssh, for executing commands there is ddev exec.
This feature works beautifully, but on the other hand it only saves the user from using ddev exec.
My opinion: Having 2 ways for the same thing should generally be avoided. It makes it more difficult to show a coherent usage in docs/blog posts/support channels. Some will love it because they need to type 5 characters less, others will not use it in examples because they don't like ambiguity. I am quite sure a Twitter post about it would get generally good responses, too.
My question is if the advantages outweigh.

Please see https://discord.com/channels/664580571770388500/950743021790576700 where this idea was born. I personally don't have a final opinion, it was just an idea so simlify things so I prepared this POC.

There are ddev exec, ddev ., and loads of shell-command wrappers. I think the confusion among all those things is in fact the real problem.
One dramatic option would be to put this on major-release track (v1.20) and at the same time remove the wrappers, like ddev php and ddev typo3, etc. I guess the issue with some of those is that the command is not necessarily in the $PATH.

Yeah, removing existing custom commands sounds like a good idea. But this also removes them from the command list which was always a nice feature, but well, personally could live with that. We could introduce here sth like done for pull and push for the less experienced users to get a hint on project specific commands maybe...
The $PATH should be set correctly as long as the user doesn't change the install structure. And if he does he also should take care of a proper $PATH override which I'm also doing for some special cases:
web_environment:
- PATH=/var/www/html/public/bin:$PATH

We also can enhance the exec command description and say explicit this is the default command and exec can be omitted.

We also can enhance the exec command description and say explicit this is the default command and exec can be omitted.

Interesting thinking @gilbertsoft - However, exec is still used for other services (db, add-on, etc). But still worthy thinking.

We also can enhance the exec command description and say explicit this is the default command and exec can be omitted.

Interesting thinking @gilbertsoft - However, exec is still used for other services (db, add-on, etc). But still worthy thinking.

I guess sth like ddev -s db ls should also work but not tested so far.

I'm still a little unsure about this change. There are pros and cons.
IMHO one of the advantages of ddev is that it provides such a simple way to add custom commands for developers which can be shared in a team. There is no other tool with that simple approach. We should do anything to keep custom commands.
Custom commands whould be listed if we see the command list.
If I type only "ddev", then we should see the command list.
On the other hand this change provides a way to deduce a lot of this one line proxy shell scripts.
Then we have ddev . which really less people know.

Rebased.

My 2 cents -

I like the separation between ddev <custom-ddev-command> and ddev . <any-command>.
I think this feature could be helpful - when you run ddev unknown_command and it's not found in custom commands, ddev could prompt - "Did you want to run unknown_command inside the container?", hitting y would run that command in the container for you.
I was sure I opened an issue about this before, but I guess I didn't 😅, in DrupalPod I added generic custom command exec_d that check your current directory, and runs the command in the same relative directory in the container
https://github.com/shaal/DrupalPod/blob/main/.ddev/commands/host/exec_dir

@rfay well, my PoC here showed it would work. But like others I'm also not sure if we should merge it at this point. So I suggest to close this PR until a real issue pops up and get back on it if really needed....

I do think it is brilliant, but the fact that we lose control of the commands, and don't have a way to provide help, and it's pretty disruptive. But I think there might be a way to provide a small bit of help for the most important commands, not sure. But probably you're right. It certainly can't go in until I start on non-minor-release candidate work.

I think we have a general consensus that we lose too much control of the user workflow with this approach. Closing.


Remove Visual Studio warnings about unresolvable references

Probably due to some recent breaking changes in the framework, VS started showing the MSB3245 compiler warnings. It warned that some of the framework assemblies were not found in their expected filesystem locations.
Although the exact cause is not known, trying to raise the TargetFramework to netstandard2.0 resolved the issue. The upgrade did not incur any code changes, only the .csproj and AssemblyInfo.cs were affected. All other code changes deal with comments in #115 .
I've also upgraded the dependencies to their newest versions.

@JanLenoch fix the failing builds pls

The comments from the review were incorporated via a new branch. The code runs correctly in local environments but not in AppVeyor. I'd need to consult it with someone versed with AV.

SDK tested in both an ASP.NET Core 2.1 app and an MVC 5 app (.NET Framework 4.5).


Provide links to the API

for each of the operations instead of adding the link to all at the end.

* Create a new prototype.
* Publish a prototype.
* Retrieve the schema for a prototype or model.
* Update/delete a prototype or model.

Please punctuate all items in a list as above.

Links added


DAPS removes import_certfile line from config

... which makes the config not usable in a new environment.
Reproduce:

create a new connector cert using the script
start the omejdn server
-> all lines starting with import_certfile are removed
Expected: import_certfile line stays in config.

If the config is stored in a repository every time it changes, then there is a serious danger that this change is checked in to the config repo, which  makes the config unusable for restoring an environment. Because if the line is missing the DAPS will not find the corresponding client cert.

The import_certfile option no longer exists. The correct place for the certificate for client client_id is now /keys/clients/${client_id}.cert
Closing this issue


import sc stats

num plays and comments

http://api.soundcloud.com/tracks/13158665?client_id=YOUR_CLIENT_ID

https://developers.soundcloud.com/docs/api/reference#tracks


HTTP trigger, look up ID from query string section - C# script code - errors

Is the 'HTTP trigger, look up ID from query string' / C# script code example up to date, or are there additional configuration steps needed that this document may not address? I have tried and checked this code multiple times and receive a '500 internal server error' response each time. The issue seems to be caused by casting the Cosmos Db binding to the ToDoItem type. Substituting IAsyncCollector as in the corresponding document for output bindings resolves the error, but no items are retrieved in that case (just tested that for troubleshooting).

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

ID: f9e3fe74-1d65-41eb-6a5e-0595e6d06029
Version Independent ID: 8933389b-f4c0-acbd-afe3-86f18738c1f9
Content: Azure Cosmos DB input binding for Functions 2.x
Content Source: articles/azure-functions/functions-bindings-cosmosdb-v2-input.md
Service: azure-functions
GitHub Login: @craigshoemaker
Microsoft Alias: cshoe

@tschaffler Thanks for the feedback! We are currently investigating and will update you shortly.

@tschaffler I have assigned this to content author for further review and update as appropriate.


Output of commands like /model are visible to the chatbot (as html?)

I forgot to use /clear and noticed the model kept repeating similar blocks of html:
Updated Model to xxxx-7b

maybe these system messages should be hidden from the bot?

Yes, I was planning on removing the system messages from the bot. Especially for local models. I will update this in the next release, thanks


Use thiserror to implement std::error::Error.

Beforehand the error enums did not implement the std::error::Error trait which makes the error handling awkward when interacting with this library, for example I could not use the ? operator to automatically return an anyhow::Error.

Looks like a good addition, approved!


add footer in home page

a website is not complete without a footer.
@iamrahulmahato please assign this task to me

@iamrahulmahato please assign this task to me

can you share the ui

@iamrahulmahato

expected ui

@iamrahulmahato  PLZ SEE TO THIS REQUEST AND ASSIGN ME
I HAVE A READY CODE NOW

@iamrahulmahato kindly assign me this task and labels as this is not reflecting in my hacktoberfest id.
kindly see to it and do the needed


can not restrict users to show dialog while users click outside dialog.

there is no method to restrict dialog to go hide while user click outside of dialog. i do not want to hide dialog when any user click outside of dialog.

on UtilsDisplay.java use this method :
.setPositiveButton(btnPositive, updateClickListener).setCancelable(false).show();

The method .setCancelable(boolean) has been added to AppUpdater v2.6.2 to make the dialog dismissable.
dependencies {
    compile 'com.github.javiersantos:AppUpdater:2.6.2'
}


Filtered PullReplication - Replication does not replicate documents.

I am using this method for filtered replicating a document which has "text" field's value "cblite". Here is the code.
private void startSync() {

		URL syncUrl;
		try {
			syncUrl = new URL(SYNC_URL);
		} catch (MalformedURLException e) {
			throw new RuntimeException(e);
		}

		Replication pullReplication = mDatabaseLocal
				.createPullReplication(syncUrl);

		//Temporarily setting filter.
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("text", "cblite");
		pullReplication.setFilterParams(map);
		pullReplication.setFilter("docFilter");
		pullReplication.setContinuous(true);

		Replication pushReplication = mDatabaseLocal
				.createPushReplication(syncUrl);
		pushReplication.setContinuous(true);

		pullReplication.start();
		pushReplication.start();

		pullReplication.addChangeListener(this);
		pushReplication.addChangeListener(this);
	}

But nothing is being replicated. If I remove the filter then replication works successfully, replicating all documents.
Also, I have tested my database if the filter is working or not. So running this Curl query, replication was successful.
curl -H 'Content-Type: application/json' -X POST http://localhost:5984/_replicator -d \
'{
  "source":"sync_gateway",
  "target":"http://localhost:5984/testreplication",
  "create_target":true,
  "continuous":true,
  "filter":"grocery-sync/docFilter",
  "query_params":{"text":"cblite"}
}'

and here is the filter
{
   "docFilter": "function(doc, req)  {if(doc.text == req.query.text){return true} else { return false}}"
}

Note: I am using CouchDB on the Server side.

Hi @tleyden
I have android LITE like above setup.
How do i deal with filters if i am using couchbase server.
Have created views and done some emit http://docs.couchbase.com/admin/admin/UI/ui-views-editor.html.
Is the the way the filters work if i am not using couchDB?if so how to set filters in lite.
Little puzzled help me out.
Thanks
Ntihin


Please address forced tunnel VPN with Isolate Machine and add recommendation for split tunneling for MDE

[Enter feedback here]
Please add disclaimer to Isolate Machine section (https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/respond-machine-alerts?view=o365-worldwide#isolate-devices-from-the-network)
IMPORTANT!
When isolating a device, only certain processes and destinations are allowed. Therefore, devices that are behind a full VPN tunnel won't be able to reach the Microsoft Defender for Endpoint Cloud service after the device is isolated. The recommendation is to use split-tunneling VPN for Microsoft Defender for Endpoint and Defender AV cloud-based protection related traffic

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

ID: 6efb7742-1171-00f4-ab40-6bcc479078ca
Version Independent ID: 9a79f573-5f20-0e4c-822e-8af4ebf65422
Content: Take response actions on a device in Microsoft Defender for Endpoint
Content Source: microsoft-365/security/defender-endpoint/respond-machine-alerts.md
Product: m365-security
Technology: mde
GitHub Login: @mjcaparas
Microsoft Alias: macapara

@vboyev-MSFT Thank you for your feedback. We have made changes to the document via PR#https://github.com/MicrosoftDocs/microsoft-365-docs/pull/4836
Thanks
Sri

@msbemba Thank you very much for the contribution and updating the documentation with PR. @vboyev-MSFT Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


[VS Incentives]: Revisit decision to export SetVolume for testing purposes

Background
For the sake of simplifying volume split incentive testing, setVolume was exported as a public keeper method in #6366. While this allowed us to avoid significant amounts of confusing test setup, exporting internal functions for testing purposes feels like code smell that should be revisited once the feature is complete.
Suggested Design

Consider creating a test helper that takes in a target volume amount and gets the pool to that state using only message level functions e.g. LPing and swaps

Acceptance Criteria

All existing tests pass and volume splitting functionality remains well tested

I think we are so deep into relying on this helper everywhere now, making the refactor be not worthwhile in terms of time


Mummer 4.0 on conda

Hi there,
I could not mummer 4.0 on conda channels. Would you help to upload it to conda?

It's available as mummer4 in the bioconda channel: https://bioconda.github.io/recipes/mummer4/README.html#package-mummer4


Add tests for DeleteCommand

Current DeleteCommandParser tests are not passing
Not enough DeleteCommandTests to test buyer, supplier and deliverer lists

Refactor DeleteCommandParser and DeleteCommandTest
Add TypicalDeliverers, TypicalSuppliers, TypicalPersonCategories etc.
Edit PersonBuilder, EditPersonDescriptionBuilder


fix should turn off parallel scan when do local finalize agg

Proposed changes
Issue Number: close #xxx
Problem summary

when we assume data distributed by distributed keys and do local one stage agg, we should turn off parallel scan.
fix unstable case in testAggQueryOnAggMV2

Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[ ] Has document been added or modified
[ ] Does it need to update dependencies
[ ] Is this PR support rollback (If NO, please explain WHY)

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...

run buildall

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.64 seconds
stream load tsv:          468 seconds loaded<PHONE_NUMBER>9 Bytes, about 152 MB/s
stream load json:         24 seconds loaded<PHONE_NUMBER> Bytes, about 93 MB/s
stream load orc:          75 seconds loaded<PHONE_NUMBER> Bytes, about 14 MB/s
stream load parquet:          33 seconds loaded 861443392 Bytes, about 24 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230320095402_clickbench_pr_117387.html

run buildall

run buildall


[WIP] Added support for adding custom arguments to tools.

Closes #500

@patriksvensson there seems to be something screwy going on here:

with the names of the files in this PR.
Any ideas?

@gep13 It's just a convention to name files containing generic classes using the CRef naming (i.e. T:TestNamespace.GenericClass1`). We hadn't had the need for it before since there are no classes with the same name that only differs by generic argument count. CoreFX for example uses the same conventions.
Can change it to something else if you want to, but I think we should have some convention for it.

@patriksvensson Gotcha!  No, no need to change it.  I just hadn't seen this before.  My initial thought was that something had gone wrong with a merge/rebase etc, and the file name had got mangled :smile: Makes sense now that you explain it.  Good to know, thanks!

I think this one is ready to be merged :+1:


30.1 - alternative for explicit types everywhere

The TypeScript ESLint rule that we use to enforce this actually recommends not using itself 😄

Note: requiring type annotations unnecessarily can be cumbersome to maintain and generally reduces code readability. TypeScript is often better at inferring types than easily written type annotations would allow.
Instead of enabling typedef, it is generally recommended to use the --noImplicitAny and --strictPropertyInitialization compiler options to enforce type annotations only when useful.

Although this affects other cases as well, I'm initally focusing on functions.
I agree with adding explicit type definitions on the parameters and of standalone functions, e.g.
export const foo = (bar: string, baz: number): boolean => { ...

And even though their return types can usually be inferred, declaring them explicitly tends to make type errors clearer and might also improve TypeScript performance.
However, explicit type annotations seem unnecessary and annoying to maintain when a function is part of a larger expression where the types are unambiguous from the context.
For example, if we have a function like this:
const registerHandler = (
  urlPattern: string,
  callback: (
    method: HttpMethod,
    urlParams: URLSearchParams,
    req: IncomingMessage,
    requestId: string,
  ) => Promise<HttpResponse | undefined>,
) => {
  ...
};

Then without requiring explicit types everywhere, we could do this:
registerHandler('/foo', async (method) => {
  ...
});

registerHandler('/bar/:id', async (method, params, req, res) => {
  ...
});

And the types of the params, as well as the expected return types would be safely inferred.
But with this rule, we're forced to do this instead:
registerHandler('/foo', async (method: HttpMethod): Promise<HttpResponse | undefined> => {
  ...
});

registerHandler('/bar/:id', async (
  method: HttpMethod,
  params: URLSearchParams,
  req: IncomingMessage,
  res: ServerResponse,
): Promise<HttpResponse | undefined> => {
  ...
});

Although there can be some benefits to this (similar to return types on standalone functions), in my opinion it hurts readability and productivity enough to outweigh them.
In addition to the recommended TypeScript settings, I recommend using the 'strict' option which enables these and several other rules that enforce code correctness.

I'm OK with relaxing this rule. Stricter type definitions can still be opt-in, if something somewhere is so important it is deemed necessary.
I think the main point for this rule is that inferring too many types throughout a codebase can make it too easy to make mistakes and mismatch types from real data. But I really haven't seen too much of this happening in real life scenarios.

There is one issue I've often run into when omitting return types from functions, but there's an ESLint plugin that can catch this specific case: https://github.com/bytescale/eslint-plugin-return-types-object-literals
In addition to excess property checking, return types are also needed in these cases to link the properties to their type definitions.
I will make a PR that recommends this rule instead of the typedef rule.


[Feature Request] Support configuring how MinutesPerDayAlarm treats missing data

Hi!  I didn't see a CONTRIBUTING.md, so my apologies if this surprise PR isn't in line with the project's etiquette.  Recently, we received a RunsOn alert email saying the MinutesPerDayAlarm had transitioned from INSUFFICIENT_DATA to OK.  My suspicion is that it occurred because we weren't using our CI over the weekend, which was three days long due to a US holiday.  In case it's helpful, here's a screenshot of our alarm's status over the past month:

This PR is only the first solution I could think of.  I was thinking if we could configure the alarm to ignore missing data, we wouldn't have to worry about false alarms like the one we received today.  But, it'd be even nicer if there was a way to make the alarm report "0 minutes" when there's no usage for a given day, instead of reporting no data at all.  That way, we could still be alerted if the alarm was missing data due to an actual bug.
Thanks for all the work you're doing with RunsOn!

Hi @chris9979, and thanks for that. Do you see any issue in forcing this to notBreaching by default, to avoid the need for an additional parameter?


Short solution needed: "ffmpeg pixel format" (ffmpeg)

Please help us write most modern and shortest code solution for this issue:
ffmpeg pixel format (technology: ffmpeg)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments explain solution.
Link to this issue in comments of pull request.

How to change video pixel format


Quantum and negative comparisons

As written in the documentation,
if ( process.env.NODE_ENV === "production" ){
    console.log("production")
} else {
    console.log("development")
}

will be "quantumed" into
console.log("production")

When using quantum along with VueComponentPlugin, this code will come to be processed by quantum :
        if (process.env.NODE_ENV !== "production") {
          var api = require('vue-hot-reload-api');

          process.env.vueHMR = process.env.vueHMR || {};

          if (!process.env.vueHMR['${scopeId}']) {
            process.env.vueHMR['${scopeId}'] = true;
            api.createRecord('${scopeId}', module.exports.default);
          }
        }

The whole if block is supposed to be eliminated (as process.env.NODE_ENV is "production") but it stays and produce quite a problematic code :
var api = require('vue-hot-reload-api');
undefined = undefined || {};
if (!undefined['null']) {
    undefined['null'] = true;
    api.createRecord('null', module.exports.default);
}

Note: The hack consisting in using replaceProcessEnv: false doesn't have any effect

Oh that’s a bug, thank you! We will take a look

@nchanged just to confirm - this is not an issue with VueComponentPlugin?

@Shepless as an immediate solution you could change the block
if ( process.env.NODE_ENV === "production" ){

And i will take a look a bit later

@nchanged rather than inverting the check (as it would make the logic a bit weird). Would Quantum work with:
if (process.env.NODE_ENV === 'development') {}

@Shepless yeah it should

@eddow can you reproduce it please?
https://github.com/fuse-box/fuse-box-vue-seed <-- all works here.
Besides,
https://github.com/fuse-box/fuse-box/blob/8aa91f80d25d27011613ad75c184ac45add1d9f1/src/quantum/tests/ProcessEnvDeadCode.test.ts#L6-L31

@eddow are you still facing this issue?

Hi, sorry, I am a bit unavailable nowadays, I will come back to you as these topics are starred but I cannot promise when.

Closing for now. Feel free to reopen if you still think this is an issue.


use tailwindcss?

I have been meaning to ask this question since I started looking at bartholomew. Leaving my imposter syndrome behind, I  thought i will ask this question anyways.
Is there a preference of css framework that we use?
tailwindcss is really popular these days  and I personally use it as well and love it.
is that something we want to consider changing in bartholomew or just leave it to users to use what they like?

sounds good. (My personal website is using bulma too, though all new ones uses tailwindcss).
thanks for taking out time to reply.

There was absolutely no reason that I chose Bootstrap other than that it was the first one I thought of on that day. I would be cool with changing to whatever others thought was good. I have no real attachment to Bootstrap.

Hi Matt, thanks for the feedback. tailwindcss is the cool kid in the town these days. i will do some poc with it and will see how it turns out. if everyone likes it, we will move to it, else it could just serve as a starter template with tailwindcss


Release v7.4.0 bug fixes

Codecov Report

Merging #493 into 7.x will increase coverage by 0.01%.
The diff coverage is 45.83%.

@@             Coverage Diff              @@
##                7.x     #493      +/-   ##
============================================
+ Coverage     52.96%   52.98%   +0.01%
- Complexity    13355    13389      +34
============================================
  Files          1779     1780       +1
  Lines         85373    85610     +237
  Branches      11223    11272      +49
============================================
+ Hits          45221    45358     +137
- Misses        35390    35488      +98
- Partials       4762     4764       +2

Impacted Files
Coverage Δ
Complexity Δ

...onal/snowowl/core/config/SnowOwlConfiguration.java
47.05% <ø> (-10.09%)
3 <0> (-2)

...id/assigner/DefaultNamespaceAndModuleAssigner.java
61.9% <ø> (+2.81%)
7 <0> (ø)
:arrow_down:

...ional/snowowl/core/commit/CommitInfoConverter.java
12.5% <0%> (ø)
3 <0> (ø)
:arrow_down:

...onal/snowowl/core/repository/RepositoryPlugin.java
86.77% <0%> (ø)
11 <0> (ø)
:arrow_down:

.../assigner/ExtensionNamespaceAndModuleAssigner.java
7.35% <0%> (-1.27%)
2 <0> (ø)

...ed/reasoner/request/ClassificationSaveRequest.java
84.74% <100%> (+0.81%)
13 <1> (+1)
:arrow_up:

...2international/index/revision/RevisionSegment.java
64.58% <100%> (+2.36%)
20 <2> (+2)
:arrow_up:

.../b2international/snowowl/identity/domain/User.java
33.33% <100%> (-12.5%)
4 <1> (-2)

...snomed/reasoner/request/SaveJobRequestBuilder.java
100% <100%> (ø)
11 <1> (+1)
:arrow_up:

...nternational/index/revision/RevisionBranchRef.java
64.47% <100%> (ø)
21 <1> (ø)
:arrow_down:

... and 20 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 a3bb597...6b76383. Read the comment docs.


[FEATURE] custom validation rules for buildDefinition & deploy

idea is that we offer an option to run a callback function (needs to be nicely encapsulated to not break mcdev) to offer full flexibility.
the hook should run

at the end of the preDeployTasks to basically allow adding your own preDeployTasks. If the custom script fails, it should block deployment.
in buildDefinition after all templating variables were applied. This way we  can show warnings

the method parameters:

metadata (or the code-json split version of it)
target BU (cred/bu)

the method may be async - we shall put an await in front of it for good measure and a try catch around it to format the error message.
it shall either return the (potentially adapted) object it received as parameter OR throw a descriptive error.
in preDeployTasks, that error will NOT be caught, preventing deployment
in buildTemplate it will be caught and displayed as a warning, allowing the file to be saved in the deploy folder
the callback-javascript file path can be set via a new option in .mcdevrc, relative to the project root

validation use cases:

confirm that type x items are never in root folder (e.g. dataExtensions)
confirm type y does not have a UUID as key (some types will always have that, e.g. journey, while most will not)
confirm asset keys end on specific suffix per environment
...


Import data and configuration in unitime

Dears
is it possible to import data or configurations to unitime in xml or csv i have already found in the link of xml interfaces that there are some features that can be imported like the academic session setup but can we do the same in the other features for example
room type located in Administration->other->Room Type is there an option to import data to it in csv or xml format
kindly check the attached file it contains some samples
Implementation sheets.xlsx
thanks & best regards

We currently do not have an XML to import room types and room features. These would have to be entered manually, or someone would have to write a script to import them from a custom format (which could be a CSV or an XML, for example).
The buildings and rooms can be imported using the Rooms XML format, including their type and (global) room features. Please note that the rooms do not get updated automatically with the import; once the file is imported, you must go to Administration > Academic Sessions > Buildings and press the Update Data.
Also, by default, it will only add rooms that do not exist in the current academic session. If you need the update to change the existing rooms, you need to set the unitime.external.room.update.existing application property (on the Administration > Defaults > Configuration page) to true.
Similarly, an update of existing room features can be enabled by setting the parameter unitime.external.room.update.existing.features to true. The room feature must already exist in UniTime (as a global room feature) with either the roomFeature.feature attribute matching the room feature abbreviation or the roomFeature.value matching the room feature name.


File Processing Tutorial Modifications

Added Sample

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Semi naive fix

Fixing the problem in issue#93, that in semi-naive eval, the change happens in the right-hand-side in set operation should affect the evaluation, but being ignored due to semi-naive. The fix was to add a new rule while meeting setting to a Call, add one more equal relation to the body part of the rule in the desugar_command phase, as well as let binding since they might bind variables in the Call.

Thanks for the PR! This looks great. I left some comments. Also see the suggestions from clippy.

It feels to me that #93 is a bug of semi-naive evaluation before anything semantical, since one would expect semi-naive and naive to produce the same result. So this PR is just to make sure semi-naive is sound with some program transformations.
(On lifting terms out of actions, I don't have much of an opinion, as long as we can keep the query executor pure (and leave the side effects to the eval_actions))

To follow up from today's meeting: this PR definitely feels like a step in the right direction, but I think we need to understand a little better what's going on. As @oflatt noted, this transformation feels awfully similar to the mythical (and somewhat misnamed) "demand transformation" that we have previously discussed.
In particular, why do we not do this when the lhs of a set has a nested call? And what about unions? I don't think we need it for unions, but I don't yet have a crisp understanding why.

@oflatt is this change going to break proofs? I recall we discussed something about that in the lab.


resize_window has no effect on save_screenshot

Hi,
I'm testing an app using modals (via Twitter Bootstrap) but I can't see al the modal on the page since the page height is too low. The resize_window method has no effect on the height.
Example: http://img29.imageshack.us/img29/6224/suggestedfixes.png
How can I change the size of the windows?
Thanks.

@mhoran, @jferris have there been changes related to this issue? Can it be closed?

There haven't been any updates here.
I think a few different bugs have been discussed, and there are some issues regarding Qt 4 vs Qt 5.
Given the age of the issue, the fact that Capybara doesn't really have a spec for exactly how screenshots should work, and that we're phasing out Qt 4, I think it makes the most sense to close this issue.
If anybody is still having trouble with the way screenshots work, please open a new issue for your particular bug.
I'm also open to pull requests that change the way this works if somebody thinks the current behavior is unintuitive.


Added basic instrumentation code & post-processor.

Description
EEMBC had a meeting with Arm (Dave Rodgman, Shebu Varghesekuriakose, and Hannes Tschofenig) and discussed adding instrumentation to (primarily) cryptoprimitive invocations in order to recreate the crypto load used during various ciphersuite handshakes. For example, this basic implementation will report SHA256, AES, GCM, CCM, ECDH, and ECDSA invocations, their contexts used, and payload sizes (if applicable). This data may be post-processed by a script named scripts/post-process.py that will create a grid indicating when each context was invoked.
Status
Request for Comment
Additional comments
Not all primitives have been instrumented, yet. EEMBC uses this information to construct benchmarks, but others may find it useful as well, and should be able to grow coverage as needed. Currently the methodology is rather loosely defined, and is mostly enforced by the post-processor. I expect this to evolve, especially since EEMBC will be instrumenting again for TLS1.3, ChaCha, Poly and Ed25519.
Steps to test or reproduce
First, prepare a build for a desktop OS. Define MBEDTLS_INST in the configuration. Then start the SSL server, and perform a client handshake, capturing the client's output to a file. Run the post-processor on the captured file, it will filter out the JSON instrumentation and reconstruct a 2D table: contexts vs. TLS stage.

For reference, it may be useful to look at the Chromium implementation of trace macros that I mentioned:
https://www.chromium.org/developers/how-tos/trace-event-profiling-tool/tracing-event-instrumentation
They are able to get very low-overhead high quality trace data with this approach (although obviously they don't run on embedded micros).

Thanks Dave. Also, I see several failing checks, but the detail links don't work. Not quite sure how to fix them? E..g, the first four fail links' "Details" go nowhere.

Travis logs are public, but Jenkins is only reachable in our corporate network. In addition to failures caused by problems also observed on Travis (pylint failure, source files missing a trailing newline which causes compilers to error out, ssl-opt.sh failing due to the new debug output ending up in weird places):
tests/scripts/all.sh test_valgrind_constant_flow is failing. I don't understand quite why it's failing. This test runs valgrind with instrumentation to detect timing side channels in some parts of the code. I don't know why it would complain about a memory allocation (the valgrind run with the basic instrumentation doesn't report a memory leak). I wonder if it's getting killed midway due to a timeout (although there's nothing about a timeout in the logs).
85/89 MemCheck #85: ssl-suite ..................................   Passed  1468.69 sec
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
CMakeFiles/memcheck.dir/build.make:57: recipe for target 'CMakeFiles/memcheck' failed
make[3]: *** [CMakeFiles/memcheck] Aborted (core dumped)
make[2]: *** [CMakeFiles/memcheck.dir/all] Error 2

tests/scripts/all.sh test_no_platform fails to build due to printf format misuse (this is a build where mbedtls_printf is a macro that expands to printf; in most other builds it's a function pointer that's set to printf by default).
In file included from ecdh.c:34:0:
ecdh.c: In function 'mbedtls_ecdh_init':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdh.c:177:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdh", "init", ctx);
     ^
ecdh.c: In function 'mbedtls_ecdh_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdh.c:269:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdh", "free", ctx );
     ^
ecdh.c: In function 'mbedtls_ecdh_calc_secret':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdh.c:703:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdh", "calc_secret", ctx );
     ^
In file included from ccm.c:36:0:
ccm.c: In function 'mbedtls_ccm_init':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ccm.c:64:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ccm", "init", ctx );
     ^
In file included from aes.c:36:0:
aes.c: In function 'mbedtls_aes_init':
ccm.c: In function 'mbedtls_ccm_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ccm.c:107:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ccm", "free", ctx );
     ^
ccm.c: In function 'mbedtls_ccm_star_encrypt_and_tag':
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ccm.c:329:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "ccm", "encrypt", ctx, length );
     ^
ccm.c: In function 'mbedtls_ccm_star_auth_decrypt':
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ccm.c:373:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "ccm", "decrypt", ctx, length );
     ^
In file included from sha256.c:32:0:
sha256.c: In function 'mbedtls_sha256_init':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
sha256.c:79:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "sha256", "init", ctx );
     ^
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
aes.c:516:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "aes", "init", ctx );
     ^
aes.c: In function 'mbedtls_aes_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
aes.c:524:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "aes", "free", ctx );
     ^
In file included from gcm.c:37:0:
gcm.c: In function 'mbedtls_gcm_init':
aes.c: In function 'mbedtls_internal_aes_encrypt':
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
aes.c:880:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "aes", "encrypt", ctx, 16 );
     ^
aes.c: In function 'mbedtls_internal_aes_decrypt':
sha256.c: In function 'mbedtls_sha256_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
sha256.c:87:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "sha256", "free", ctx );
     ^
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
aes.c:946:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "aes", "decrypt", ctx, 16 );
     ^
sha256.c: In function 'mbedtls_sha256_clone':
../include/mbedtls/inst.h:84:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
sha256.c:97:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_CTX'
     MBEDTLS_INST_PRIM_OP_CTX_CTX( "sha256", "clone", src, dst );
     ^
../include/mbedtls/inst.h:84:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
sha256.c:97:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_CTX'
     MBEDTLS_INST_PRIM_OP_CTX_CTX( "sha256", "clone", src, dst );
     ^
sha256.c: In function 'mbedtls_sha256_update':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
gcm.c:90:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "gcm", "init", ctx );
     ^
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
sha256.c:300:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "sha256", "update", ctx, ilen );
     ^
In file included from ctr_drbg.c:32:0:
ctr_drbg.c: In function 'block_cipher_df':
gcm.c: In function 'mbedtls_gcm_crypt_and_tag':
../include/mbedtls/inst.h:92:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
gcm.c:606:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX_BYTES'
     MBEDTLS_INST_PRIM_OP_CTX_BYTES( "gcm", "crypt_and_tag", ctx, length );
     ^
gcm.c: In function 'mbedtls_gcm_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
gcm.c:675:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "gcm", "free", ctx );
     ^
../include/mbedtls/inst.h:60:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:192:13: note: in expansion of macro 'MBEDTLS_INST_OP_CTX'
             MBEDTLS_INST_OP_CTX( "block_cipher_df-1", &aes_ctx );
             ^
../include/mbedtls/inst.h:60:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:221:9: note: in expansion of macro 'MBEDTLS_INST_OP_CTX'
         MBEDTLS_INST_OP_CTX( "block_cipher_df-2", &aes_ctx );
         ^
ctr_drbg.c: In function 'ctr_drbg_update_internal':
../include/mbedtls/inst.h:68:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:280:9: note: in expansion of macro 'MBEDTLS_INST_OP_CTX_CTX'
         MBEDTLS_INST_OP_CTX_CTX( "ctr_drbg_update_internal", ctx,
         ^
../include/mbedtls/inst.h:68:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:280:9: note: in expansion of macro 'MBEDTLS_INST_OP_CTX_CTX'
         MBEDTLS_INST_OP_CTX_CTX( "ctr_drbg_update_internal", ctx,
         ^
ctr_drbg.c: In function 'mbedtls_ctr_drbg_random_with_add':
../include/mbedtls/inst.h:68:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:558:9: note: in expansion of macro 'MBEDTLS_INST_OP_CTX_CTX'
         MBEDTLS_INST_OP_CTX_CTX( "mbedtls_ctr_drbg_random_with_add", ctx,
         ^
../include/mbedtls/inst.h:68:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ctr_drbg.c:558:9: note: in expansion of macro 'MBEDTLS_INST_OP_CTX_CTX'
         MBEDTLS_INST_OP_CTX_CTX( "mbedtls_ctr_drbg_random_with_add", ctx,
         ^
In file included from ecdsa.c:49:0:
ecdsa.c: In function 'mbedtls_ecdsa_write_signature_restartable':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:725:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "write_signature-EXIT", ctx );
     ^
ecdsa.c: In function 'mbedtls_ecdsa_write_signature':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:740:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "write_signature", ctx );
     ^
ecdsa.c: In function 'mbedtls_ecdsa_read_signature':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:757:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "read_signature", ctx );
     ^
ecdsa.c: In function 'mbedtls_ecdsa_read_signature_restartable':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:826:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "read_signature-EXIT", ctx );
     ^
ecdsa.c: In function 'mbedtls_ecdsa_init':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:875:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "init", ctx );
     ^
ecdsa.c: In function 'mbedtls_ecdsa_free':
../include/mbedtls/inst.h:76:9: error: format '%p' expects argument of type 'vo
         "\ninst{" \
         ^
ecdsa.c:886:5: note: in expansion of macro 'MBEDTLS_INST_PRIM_OP_CTX'
     MBEDTLS_INST_PRIM_OP_CTX( "ecdsa", "free", ctx );
     ^
cc1: all warnings being treated as errors
Makefile:268: recipe for target 'ecdh.o' failed
make[1]: *** [ecdh.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
make[1]: *** [ccm.o] Error 1
Makefile:268: recipe for target 'ccm.o' failed
make[1]: *** [sha256.o] Error 1
Makefile:268: recipe for target 'sha256.o' failed
  CC    src/asn1_helpers.c
  CC    src/helpers.c
  CC    src/psa_crypto_helpers.c
  CC    src/psa_exercise_key.c
  CC    src/threading_helpers.c
  CC    src/random.c
  CC    src/fake_external_rng_for_test.c
  CC    src/certs.c
  CC    src/drivers/test_driver_size.c
  CC    src/drivers/test_driver_aead.c
  CC    src/drivers/test_driver_signature.c
  CC    src/drivers/test_driver_key_management.c
cc1: all warnings being treated as errors
  CC    src/drivers/test_driver_cipher.c
Makefile:268: recipe for target 'ecdsa.o' failed
make[1]: *** [ecdsa.o] Error 1
  CC    src/drivers/hash.c
  CC    src/drivers/test_driver_mac.c
  CC    src/drivers/platform_builtin_keys.c
cc1: all warnings being treated as errors
Makefile:268: recipe for target 'ctr_drbg.o' failed
make[1]: *** [ctr_drbg.o] Error 1
cc1: all warnings being treated as errors
make[1]: *** [gcm.o] Error 1
Makefile:268: recipe for target 'gcm.o' failed
cc1: all warnings being treated as errors
Makefile:268: recipe for target 'aes.o' failed
make[1]: *** [aes.o] Error 1
Makefile:18: recipe for target 'lib' failed
make: *** [lib] Error 2
^^^^test_no_platform: build: full config except platform/fsio/net, make, gcc, C

@daverodgman Hi Dave, I spent some time studying the Chromium trace infrastructure. While extensive, I think it is overkill at this point (and it is written in C++ and makes heavy use of templates, which makes the trace macros a bit more succinct). However, I think if interest in tracing mbedTLS became a popular feature, I would propose increasing the flexibility and robustness of the system. Unless there are specific points you think should be pulled in now? Giles has already made a number of review items that need updating, so please let me know.

Please don't mark conversations as resolved unless you initiated them. It's up to the reviewer to mark conversations as resolved after verifying that the issue has been resolved to the reviewer's satisfaction. We conventionally use the :rocket: reaction to keep track “I've handled this” (your choice of whether this means in your working copy, in your local branch, or pushed).

@daverodgman @hannestschofenig @gilles-peskine-arm,
I am withdrawing this Pull Request. After studying the tool Frida from a DefCon lecture, I have implemented all of this macro functionality using the dynamic parasitic tracer (and JavaScript). It is quite an amazing tool. Here is my implementation using an older version of mbedTLS. We will be updating to 3.0.x once TLS1.3 is supported in Q3/Q4. Gilles, thanks for the help, had I known about this years ago it would have saved everyone a lot of time.


struct Rav1dColorPrimaries: make a newtype wrapper

I believe this is the final enum/struct in headers.rs

fixed that typo, and yes it also does have the (seemingly) random values that are undefined by the spec.

this merges into https://github.com/memorysafety/rav1d/pull/892 (so, not main) so it's probably easier to merge that one first

Okay, that PR is merged.


feat(cache) prewarm some negative cache entries for plugins

This PR prewarms some cache entries for plugins, in addition to the default one (which was provided by kong.db.plugins:cache_key(plugin)).
This code is repetitive on purpose (it could be made terser with tables and loops) to make it fast - we want prewarm to be as quick as possible.

It took me so long to write this comment that by the time I hit "Send" the patch was outdated and the first problem I pointed out had already been fixed by switching to use safe_add. :)

Yes, I was subconsciously going over it and at midnight I realized that there was a problem so I needed to add the safe_add.

That of course explodes in size real fast.

Not only in size - also in time. Just iterating over all those combinations, even if we don't spend memory on them, may be too much.

The "for every possible route" there starts to give an idea that this is not that much better.

Yes, exactly. Again, combinatory explosion. That's why I settled down with "filling the cache as much as I could without doing any extra db requests" on this PR.

We can probably get rid of it (the route + service combination).

I can give that a try. It would reduce the amount of negative caching used.

Closing this as we're exploring avenues on perf other than negative pre-caching


TS Server fatal error:  Debug Failure. False expression.

Type: Bug
❗❗❗ Please fill in the sections below to help us diagnose the issue ❗❗❗
TypeScript Version: 5.5.0-dev.20240501
Steps to reproduce crash

Global TypeScript Server Plugins
❗ Please test with extensions disabled. Extensions are the root cause of most TypeScript server crashes

@monodon/typescript-nx-imports-plugin contributed by the nrwl.angular-console extension
@vsintellicode/typescript-intellicode-plugin contributed by the VisualStudioExptTeam.vscodeintellicode extension
ms-vsintellicode-typescript contributed by the VisualStudioExptTeam.vscodeintellicode extension

TS Server Log
❗ Server logging disabled. To help us fix crashes like this, please enable logging by setting:
"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.
VS Code version: Code - Insiders 1.89.0-insider (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:05:10.904Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
15.82GB (4.33GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (20)

Extension
Author (truncated)
Version

ng-template
Ang
17.3.2

vscode-markdownlint
Dav
0.55.0

vscode-eslint
dba
2.4.4

githistory
don
0.6.20

gitlens
eam
14.9.1

EditorConfig
Edi
0.16.4

prettier-vscode
esb
10.4.0

output-colorizer
IBM
0.1.2

git-graph
mhu
1.30.0

vscode-scss
mrm
0.10.0

vscode-dotnet-runtime
ms-
2.0.3

live-server
ms-
0.4.13

vscode-typescript-next
ms-
5.5.20240501

angular-console
nrw
18.20.0

vscode-yaml
red
1.14.0

sonarlint-vscode
Son
4.5.0

code-spell-checker
str
3.0.1

vscode-stylelint
sty
1.4.0

vscodeintellicode
Vis
1.3.1

vscodeintellicode-completions
Vis
2.0.0

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!