Improving Instance::new experience

I think this is a large enough proposal and change that I'd like to split this off of https://github.com/bytecodealliance/wasmtime/issues/708. This issue is specifically about improving the experience of using Instance::new, which currently looks like this:
impl Instance {
    pub fn new(
        store: &HostRef<Store>,
        module: &HostRef<Module>,
        externs: &[Extern]
    ) -> Result<Instance>;
}

After #708 that will instead look like:
impl Instance {
    pub fn new(module: &Module, externs: &[Extern]) -> Result<Instance>;
}

Somewhat radically, I would propose that this is actually what we want on Instance! The idea here is that the list of externs is the same length of the list in module.imports(), and externs line up 1:1 with module.imports().
Now that being said this is a pretty bad API to use, and doesn't help instantiating things like WASI or dealing with name resolution at all. I think instead I think we should provide an API similar to the following (bikeshedding everything of course):
impl Instance {
    fn builder(module: &Module) -> InstanceBuilder;
    // ...
}

struct InstanceBuilder { ... }

impl InstanceBuilder {
    // Provide an import by module/name, panics if `module` or `name` is taken
    fn provide(&mut self, module: &str, name: &str, item: impl Into<Extern>) -> &mut Self;

    // Hook up an entire instance under the name `module`. Panics if `module` already used
    fn provide_instance(&mut self, module: &str, instance: &Instance) -> &mut Self;

    // Provides `wasi_unstable` module
    fn provide_wasi_snapshot0(&mut self, config: &WasiSnapshot0Config) -> &mut Self;

    // Provides `wasi_snapshot_preview1` module
    fn provide_wasi_snapshot1(&mut self, config: &WasiSnapshot1Config) -> &mut Self;

    // Does all the name resolution.
    fn build(&mut self) -> Result<Instance>;
}

Generally the idea here is that we keep Instance::new as the "low level" API of instantiating a module. That's for use when name resolution won't cut it for one reason or another. Something like InstanceBuilder will allow providing lots of extensions, as necessary, for hooking into name resolution and such. That way usage might look like:
let module = ...;
let instance = Instance::builder(&module)
    .provide_wasi_snapshot0(&Default::default())
    .provide("my-custom-api", "add", |a: i32, b: i32| a + b)
    .build()?;
// ...

The Into<Extern> part may be pretty tricky and still take some frobbing to get right. Super-long term I think it'd be awesome to do something like:
#[wasmtime::host_module]
trait MyWasmHostModule {
    fn function1(&self);
    fn function2(&self, input: &str) -> String;
}

// generates ...
// trait MyWasmHostModuleExt { ... }
// impl MyWasmHostModuleExt for wasmtime::InstanceBuilder {
//    fn provide_my_wasm_host_module(&mut self, instance: impl MyWasmHostModule)
//       ...
//    }
// }

impl MyWasmHostModule for MyStruct {
    // ...
}

Instace::builder(&module)
    .provide_my_wasm_host_module(&MyStruct)
    .build()?;

(but that's naturally much further in the future)

That builder looks pretty nice.  The order you call each provides function will matter, since earlier calls take precedence over later calls.
What if you wanted to load in an entire module (like a wasi module), but then override a specific import?    Maybe we could let later calls to provide() override earlier calls?  So you could do something like:
let instance = Instance::builder(&module)
    .provide_wasi_snapshot1(&Default::default())
    .provide("wasi_snapshot_preview1", "environ_get", my_environ_get)
    .build()?;

Maybe a use case for this would be if you wanted to customize what data gets provided to the module (so in this example with environ_get, maybe you want to write a custom version that filters out potentially sensitive envvars).
If this behavior isn't wanted, perhaps all of the checking for duplicates could be deferred until build(), which could also take a config option to indicate if overriding is allowed:
impl InstanceBuilder {
   // Does all the name resolution.
   fn build(&mut self, allow_overrides: bool) -> Result<Instance>;
}

let instance = Instance::builder(&module)
    .provide("env", "add", |a: i32, b: i32| a + b)
    .provide("env", "add", |a: i32, b: i32| a + b)
    .build(false)?; // returns `Err`

Yeah that was one case I was worried about, and I was thinking we'd just panic for now to be conservative if any imports look like they overlap one way or another.

I really like this proposal! This would substantially simplify embedding and providing functions, both by taking all the necessary information from the function itself, and by automatically handling type mismatches in arguments. (We'll need some more advanced approaches to create an Export that let you provide functions that can handle different sets of arguments, but this handles the common case beautifully.)
Regarding duplicates, in the short term I'd suggest returning an error for duplicate exports, and perhaps providing a function to explicitly delete or replace an export by name if you want to intentionally override one.

To address @eminence 's question about being able to override individual syscalls, what about the concept of middleware? In other words,  inside the builder you can add a middleware trait object and it will get invoked before and potentially after each call (in either direction). This way we could choose to completely override/block a syscall, or we could add additional functionality, logging, tracing, etc.
Maybe...
let instance = Instance::builder()
  .foo()
  .something()
  .with_middleware(FileBlocker::new())
  .build()?;

Sometimes, it is useful to have an escape hatch for resolving imports when instantiating modules.
For example, wasm allows a module to import several functions with the same signature. I.e. something like this:
(import "env" "print" (param i32))
(import "env" "print" (param i32 i32))

Another example, is that sometimes you want to have full control over resolving of imports. Basically, having something like Resolver. The latest example I bumped into is when I need to resolve non-existent functions to some stub.

I've posted a draft of this to https://github.com/bytecodealliance/wasmtime/pull/1384


Add more ergonomic zio stubbing

Before submitting pull request:

[x] Check if the project compiles by running sbt compile
[x] Verify docs compilation by running sbt compileDocs
[x] Check if tests pass by running sbt test
[x] Format code by running sbt scalafmt

This PR adds a more ergonomic subbing syntax to the ZIO backend. This allows the stubbing to be composed in a for comprehension, example in the tests.

Thanks! Looks nice 👍
I've tried making the code more generic and moving it to the zio module so that similar functionality could be added to the httpclient implementation fo the zio backend, but so far failed. As a backup plan there's always the possibility to copy code, but I'd like to avoid that if possible.
Could you maybe add some short mention in the docs that this is available? Over here: https://github.com/softwaremill/sttp/blob/master/docs/backends/zio.md
Also I see that following the ZIO convention the send method should be a package method, not wrapped in the SttpClient object. Probably something to fix in v3, if I'm right :)

Ok, I think I managed to add the same code to httpclient as well. Let me know what you think :)

Ah looks nice! Tbh I didn't realize there was a second backend implementation of it because we always use the AsyncHttpBackend implementations.
I'll add some tests for the httpclient one as well and update the docs

Also I see that following the ZIO convention the send method should be a package method

Yeah but not a deal breaker since send is a little ambiguous in code anyway, but yeah something for v3. Speaking of which, with the upcoming release already in RC will you forward port this into it? Or will it need a redesign at that point?

Released in 2.2.8, thanks!
I'll migrate to v3


Configure health probe status code from YAML file

Please add the ability when using kubernetes.io/ingress.class: azure/application-gateway to configure the health probe status code match directly from the YAML.

Code change to support this has been merged.
https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/annotations.md#health-probe-status-codes
This change has been released officially.

Thank you for the update.


AZCopy finishes successfully, although an AuthorizationFailure and a Cancelled job status were reported.

Which version of the AzCopy was used?
AZCopy version 10.19.0 - 10.26.0
Note: The version is visible when running AzCopy without any argument
Which platform are you using? (ex: Windows, Mac, Linux)
phusion/baseimage-docker:focal-1.2.0
What command did you run?
Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.
We are running the following command through cronjob from kube to upload a file to an Azure storage.
I obscured the url and tokens for security reasons. (I put parameters "<?>" instead of actual details)
azcopy copy $file "<AZURE_URL>/<FOLDER_NAME>?<SAS_TOKEN>"

What problem was encountered?
We are getting an authorization failure in the logs and the AZCopy Job Status of Cancelled. But the AZCopy command finishes successfully. This causes the pipeline to finish successfully, although the files were not uploaded properly to the destination folder. The expectation is that the AZCopy should finish with an error and cause the whole pipeline to report a failure, instead of silently not copy the
files.

How can we reproduce the problem in the simplest way?
I don't think there is a simple way to reproduce, but you need to have an Azure storage account created with a folder and a proper SAS token. Wait for the token expiration or remove write permission on it.
Have you found a mitigation/solution?
No

Hi, yes i'm talking about exit code.
Thanks for this migration, this bug has been reported few months ago. This is any plan to fix it ?
It seems to be a really bad bug.

Appropriate PR which solves the issue is linked.


Handle returned Promises

Webpack 2 supports returning a Promise from the config function.
https://webpack.js.org/configuration/configuration-types/#exporting-a-promise
This currently isn't supported by webpack-merge.

How would you expect this case to work? Can you give an example of where you are using it?

Currently, I'm performing an async request for a GraphQL schema when generating my base webpack config.
Ideally the sub-configs would just wait for the promise to resolve and then be merged, similar to function-based resolving. Rough sketch:
function merge (baseConfig, childConfig) {
  if (baseConfig instanceof Function) {
    const resolved = baseConfig()
    if (resolved instanceof Promise) {
      return resolved.then((result) => merge(result, childConfig))
    } else {
      return merge(resolved, childConfig)
    }
  } else {
    // etc
  }
}

Alright. I could accept a PR for the feature. Please write nice tests. 👍

Any further updates?

No updates. Still waiting for a PR to review.

My need for this went away. We decided to make graph inspection it's own step so the changes appear in PRs, thus I don't need my webpack config to be async. I'm not likely to submit a PR.

At the very least, add better messaging if this happens.  I spent countless hours trying to figure out the cryptic error message only to find out I was using webpack-merge with a promise.
Current cryptic message:
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.

Hash: 5257bb310847f73aa6a9
Version: webpack 4.16.0
Time: 55ms
Built at: 2019-02-22 12:56:40

ERROR in Entry module not found: Error: Can't resolve './src' in '/git/delete-me/console'

I have found a solution that does not require webpack-merge to support promises:
This does not work:
module.exports = merge(someConfig, async () => ({
  prop: await someFunc()
}));

This does work:
module.exports = async () => {
  const value = await someFunc();
  return merge(someConfig, { prop: value });
};

I am not sure if this solves every problem out there. But it solved mine.

I will throw an error in this case at v5 (#135). It's likely best to wrap merge within a Promise at the user space as that avoids complexity though I can still accept a PR at a later time.


"Down" error when locking/unlocking

Error message "This Lockitron is currently down" when issuing a lock or unlock request.

Would using no-block make a difference?

Is this the same error you're getting or different?
{"status":"error","message":"This Bridge is currently offline. Please connect to lock directly via Bluetooth."}

@jcbriones Bridge wouldn't have exisiated at the time this was written, so the issue would have been limited to the Lockitron v2.

That's what i actually thought in the first place that this won't work on lockitron bolt.


TopologySpreadConstraint to fall back to KubeSchedulerConfiguration if Pod Topology Spread is not defined

Is your feature request related to a problem? Please describe.

Currently, RemovePodsViolatingTopologySpreadConstraint requires PodTopologySpread to be defined on every Pod. This can be challenging for organizations that already have thousands of workloads, especially given that PodTopologySpread was recently introduced in k8s 1.18.
We have defined our default KubeSchedulerConfiguration to be spread across a topology with maxSkew of 1 as a default cluster-level constraint without having to define it for every workload.
Describe the solution you'd like

A param in the RemovePodsViolatingTopologySpreadConstraint policy that instructs the strategy to fall back to the default KubeSchedulerConfiguration.
Describe alternatives you've considered

Admission webhook to mutate the Pod object and include the PodTopologySpread, if not defined.
What version of descheduler are you using?
descheduler version: v0.21.0
Additional context

https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#cluster-level-default-constraints
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
profiles:
  - pluginConfig:
      - name: PodTopologySpread
        args:
          defaultConstraints:
            - maxSkew: 1
              topologyKey: topology.kubernetes.io/zone
              whenUnsatisfiable: ScheduleAnyway
          defaultingType: List

This might be difficult because the KubeSchedulerConfiguration as passed to the scheduler isn't really a standard API object in the cluster (it can be mounted as a configmap, or a file on the host, or not even exist). So we don't have something that we can assume to fall back on.
We would need to consider different options on how to instruct the descheduler as to where that config is defined. This could be useful for other strategies that pair up with different scheduler plugins.

/remove-lifecycle stale
@damemi thoughts on a new param for RemovePodsViolatingTopologySpreadConstraint strategy such as below:
...
kind: "DeschedulerPolicy"
strategies:
  "RemovePodsViolatingTopologySpreadConstraint":
     params:
       topologySpreadConstraint: # new struct
         defaultConstraints:     # list of constraints to use when Pod hasn't defined any
         - maxSkew: 1
           topologyKey: topology.kubernetes.io/zone
           whenUnsatisfiable: DoNotSchedule

If the Pod does not have any TopologySpreadConstraints defined, we can fall back to the Descheduler configuration (if defined).
cc: @jklaw90

/reopen
/remove-lifecycle rotten

@a7i I think that's a fine suggestions, but we should document that it should be used with a matching default topology spread constraint (like you used in your example). Otherwise, makes sense to me

/close
Ad described in the PR:

There's a possibility to get eviction loops since Scheduler will not have the PodTopologySpread definition. Moreover, if the KubeSchedulerConfiguration and descheduler default policy ever get out of sync, we will see unexpected eviction loops.
Combination of components such as Scheduler, cluster-autoscaler, and Descheduler not being in sync can lead to unexpected behaviors, mostly leading to unnecessary evictions.


Pure Localization Option

When TRAJECTORY_BUILDER.pure_localization = true is set in the lua file, as stated here, the cartographer_node dies at startup. The error provided is the following:
[FATAL] [1532423911.518104549]: F0724 11:18:31.000000  5704 lua_parameter_dictionary.cc:410] Check failed: 1 == reference_counts_.count(key) (1 vs. 0) Key 'pure_localization' was used the wrong number of times.
Has this feature been disabled?
I'm using the cartographer a08037dc47d544d697261940727b934fefd8dfb9 (Jul 13)
and cartographer_ros 3cb7ef (Jun 8).
The whole config.lua is available here.

The format of the lua config (and the protobuf options) has changed to support more generic trimmers.
Do not set pure_localization = true, this was the old format.
Instead, set only
TRAJECTORY_BUILDER.pure_localization_trimmer = {
  max_submaps_to_keep = 3,
}

Examples are backpack_2/3d_localization.lua in cartographer_ros/configuration_files.

Ok thank you!


Why were these JMX Beans removed from the Kafka broker check?

I am updating our Datadog conf files. When I diff our old file (which was copy/pasted from the old default in the dd-agent repo) with the current default, I see two bean names were removed without a replacement added:
#
# Aggregate cluster stats
#
-    - include:
-        domain: 'kafka.server'
-        bean_regex: 'kafka\.server:type=BrokerTopicMetrics,name=MessagesInPerSec,topic=.*'
-        attribute:
-          Count:
-            metric_type: rate
-            alias: kafka.messages_in.topic.rate
- include:
    domain: 'kafka.server'
    bean: 'kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec'
@@ -414,11 +407,3 @@ init_config:
      Count:
        metric_type: rate
        alias: kafka.log.flush_rate.rate
-
-    - include:
-        domain: 'kafka.network'
-        bean: 'kafka.network:type=RequestChannel,name=RequestQueueSize'
-        attribute:
-          Value:
-            metric_type: gauge
-            alias: kafka.request.queue.size

Why was this done? I don't see a commit removing these, it appeared to happen during the migration of the file to the integrations-core repo... compare:
https://github.com/DataDog/dd-agent/commits/master/conf.d/kafka.yaml.example
with
https://github.com/DataDog/integrations-core/blob/master/kafka/conf.yaml.example
@truthbk it looks like you did the port, do you remember why you removed these bean names?

@jeffwidman My guess is those metrics are not part of the catalog so they might have been removed to avoid sending them as custom metrics.

By catalog, do you mean Datadog's internal whitelist of standard kafka metrics?
If so, shouldn't it be the other way around that they should have been added to the catalog rather than removed from the check?
I haven't researched them in detail, but at least looking at their names they look useful...

Exactly, by catalog I mean the metadata.csv files that now live in this repo and contain the whitelisted names.
About the opportunity of doing the other way around during the port to integrations-core, I don't have any clue...
If you think they're useful, we could add them back in a dedicated PR, updating the config file and the catalog.
Paging @truthbk for his 2c.

The beans list was deeply changed since then, closing for now feel free to open a new one if somethings is still off.


refactor(helper): replace .getState() by .state

Since https://github.com/algolia/algoliasearch-helper-js/pull/707 getState is the same as fetching state, we decided we want to get rid of it. This makes sure InstantSearch will be ready for that change

To avoid later confusions we can rename the helper instances in this file to voiceSearchHelper (same with getHelper to getVoiceSearchHelper) because it exposes a getState method.

yes, was also confused by why it broke a test first

As discussed, the type definition can stay as the one on DefinitelyTyped for now, we can see how we fix this the easiest once we start releasing


Use .subsections_via_symbols to support dead_strip.

On macOS/iOS, the linker requires .subsections_via_symbols in order to enable
-dead_strip to remove assembly code. See the .subsections_via_symbols documentation
for more details:
https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#//apple_ref/doc/uid/TP30000823-SW13

If .subsections_via_symbols is not specified, assembly code that is only included via dead code will not be stripped with -dead_strip; the result can be a large amount of unwanted code (e.g. unused hashes, unused bignum or ECC routines) included in the final binary. In extreme cases this can save up to 100KB of space in a final binary.
To test, compile the library with
./Configure darwin64-x86_64-cc no-shared no-dso no-engine no-autoalginit

to avoid automatic inclusion of algorithms, then compile the following test program:
#include <openssl/rsa.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
    RSA *rsa_pubkey = RSA_new();
    unsigned char key[32];
    unsigned char enckey[RSA_size(rsa_pubkey)];
    if((int)sizeof(enckey) != RSA_public_encrypt(sizeof(key), (unsigned char *)&key, enckey, rsa_pubkey, RSA_PKCS1_OAEP_PADDING))
        return 1;

    return 0;
}

using
cc test.c -lcrypto -o test -Wl,-dead_strip

With nm without this patch, the result will contain functions like _sha256_block_data_order even though SHA-256 is not used for OAEP. With this patch, those functions disappear, and only _sha1_block_data_order (and related methods) are present.

I have submitted a CLA form; presumably it is being processed.

Just force-pushed a no-op change to get the cla-check to rerun.

This is cool, but it seems to me that it needs more careful consideration. More specifically it's not clear to me how does it interact with run-time switch and private constant tables. I mean question is what kind of ideas does linker get about alternative processor-specific code paths or tables that are not referred to from outside...

The linker splits on any symbol that doesn't start with L (i.e. anything that isn't a private label). The ASM translators already add L to all private labels for macOS/iOS targets.
For private tables, as long as the table is referenced by name in a function, it won't be dead stripped. Splitting subsections for private (static) tables is OK, because they'll be referenced. The only case where things could break is if a non-local symbol is referred to indirectly, e.g. via code fall-through or hardcoded offset, but neither are present in normal assembly (you usually only ever fall through local labels, and offsets are usually computed by the assembler using labels rather than hardcoding numbers).
What's the specific concern you have about the macOS or iOS linkers?

If I take sha256-x86_64.s, add the directive and link it with main(){sha256_block_data_order();} with and without -Wl,-dead_strip, I get different amount of symbols in resulting binary. It doesn't seem that it omitted anything, but it's not clear that it won't ever do. At least the example on the page is not exactly reassuring. It might happen that adding the directive might also require adjustment of coding "convention" that would ensure that nothing is omitted...
But I don't quite understand, why does it pull in _sha256_block_data_order? Does it unconditionally take in all object modules from .a-file that are not .subsections_via_symbols-ed?

When you compile a binary with static OpenSSL, it can pull in a lot of stuff indirectly, which is actually only referenced from unused code. The reason is that the linker by default operates at object file granularity - if anything from an object file is referenced, then the entire object file is pulled in. So, for example, if you compile
int main() { EVP_sha1(); }

without -dead_strip (resp. --gc-sections on Linux), then you will get a 1+ MiB executable with most of OpenSSL included, because m_sha1.o refers to EVP_MD_CTX_md_data, which is in evp_lib.o, and this drags in all of EVP and eventually most of libcrypto (even though EVP_MD_CTX_md_data is an entirely trivial function).
So, -dead_strip is a really important option. If you use it with the above program, you will get ~300 KiB executable, because the assembly routines for ECC, RSA, SHA256, AES, etc. are all still included - -dead_strip won't strip any object file resulting from an assembly routine that isn't subsectioned.
You're right in that we should ensure that every label in the assembly file is correctly formatted (either as a local "L" label or as a global label), but as I noted the translators are already doing that. If we just make every non-global symbol into an L label, that should be sufficient (assuming that isn't happening already).

So, -dead_strip is a really important option. If you use it with the above program, you will get ~300 KiB executable, because the assembly routines for ECC, RSA, SHA256, AES, etc. are all still included.

So that assertion is that it manages to remove the callers of these subroutines, but not complete no-longer[!]-referenced object modules. One can wonder if this can be classified as linker bug. I mean why should it matter whether or not any given object file is "subsectioned[?]" if all references to it we eliminated?
As for what translators do. Yes, they do things, but input still affects the output. And as already mentioned, example presented on the doc page is not very reassuring, because there are inter-block dependencies. You already partially counter-argued this with "offsets are usually computed by the assembler using labels rather than hardcoding numbers". Yes, but linker operates on object file with no local labels. It only sees non-local labels and relocations... As already mentioned, it might take formulation of kind of styling rules that would ensure that none of still referenced module is eliminated. That's the actual concern.

... ensure that none of still referenced module is eliminated. That's the actual concern.

Just to double-clarify. It would be acceptable to omit part of assembly module only if it's known that there are no interdependencies between its blocks. But there are interdependencies in some [if not most] modules and it's much simpler (from maintenance viewpoint) to aim for resisting the elimination of parts in all modules.

So that assertion is that it manages to remove the callers of these subroutines, but not complete no-longer[!]-referenced object modules. One can wonder if this can be classified as linker bug. I mean why should it matter whether or not any given object file is "subsectioned[?]" if all references to it were eliminated?

This is correct. Once an object module is included for any reason, -dead_strip will only remove it if it has the subsections_via_symbols flag set. Otherwise, it will be kept even if no live references remain. Although you may consider this a linker bug, it's documented behaviour and Apple is highly unlikely to change this for the foreseeable future. Therefore it falls to us to work around it. Note that clang will set .subsections_via_symbols on all assembly code that it generates.

As for what translators do. Yes, they do things, but input still affects the output. And as already mentioned, example presented on the doc page is not very reassuring, because there are inter-block dependencies.

The interblock dependencies exist because the sample code contains non-local labels which are only fallen-through but not referenced. They'll be subsectioned and removed. This is the case we need to avoid.

You already partially counter-argued this with "offsets are usually computed by the assembler using labels rather than hardcoding numbers". Yes, but linker operates on object file with no local labels.

Correct. As I noted, there's no problem with offsets to local labels because those will be stripped and not treated as split points.
Suppose that an assembly file has three top-level non-local labels A, B and C. If A jumps to a local label inside B, then B will be kept if A is kept since A refers to the B subsection. On the other hand, if A does not refer to C in any way, then C might be stripped if only A is referenced elsewhere. This should not be surprising.
So here's a case where things might break:
.globl _function
_function:
    movl %edi, %eax
    movl %esi, %ebx
loop: // note this is a non-local label
    cmpl %eax, %ebx
    jne endloop
    inc %eax
    jmp loop
endloop:
    retq

Because loop is non-local and only referred to within loop, calling _function alone will result in loop getting removed (leaving a broken _function behind). This is similar to the example from the documentation. If, however, loop and endloop are corrected to local labels (as the translator does), then they'll all be part of _function and not vulnerable to stripping.

The interblock dependencies exist because the sample code contains non-local labels which are only fallen-through but not referenced.

Sorry for not being clear. When I wrote "there are inter-block dependencies" I referred to OpenSSL assembly modules, not the sample. I mean there are inter-block dependencies in current module and the sample doesn't give impression that linker won't mutilate OpenSSL modules. That's why I written that it has to take more careful consideration.

Okay, can you give me an example of an interblock dependency? Most such dependencies will be handled just fine by the linker. Only some special cases, like those highlighted by the samples, will have problems.

Okay, can you give me an example of an interblock dependency?

It's easier to give an example of a module that doesn't have inter-block dependencies, crypto/*cpuid* don't. Absolute majority of remaining modules choose execution path based on current processor's capabilities and it's customarily done by jumping to another block.

Switching and jumping on processor capabilities is totally ok. Those are
processed correctly by the linker - jumps introduce dependencies that will
keep the processor-specific blocks alive.
The only problematic case is falling through a non-local label.
On Fri, Aug 11, 2017 at 05:33 Andy Polyakov<EMAIL_ADDRESS>wrote:

Okay, can you give me an example of an interblock dependency?
It's easier to give an example of a module that doesn't have inter-block
dependencies, crypto/cpuid don't. Absolute majority of remaining modules
choose execution path based on current processor's capabilities and it's
customarily done by jumping to another block.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openssl/openssl/pull/4118#issuecomment-321768753, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAEmuWKwH4bNPxU5Z1a5pj15VnViDdFkks5sXB_egaJpZM4OxIyw
.

Switching and jumping on processor capabilities is totally ok.

"Totally"? Oh, that changes everything! :-) But on serious note. You have to recognize and accept that the last thing we want is to end up in situation when problem report comes in and it makes no sense, because piece of code was omitted by linker. We want to be sure that if assembly module works on platform of our daily-activity choice [a.k.a. Linux], it will work on other platform with same level of confidence. Even if some kind of styling rule(*) is formulated that ensures that no code is omitted by Apple linker (and all modules are double-checked that they don't violate it), what are guarantees that Apple won't change something in next release? In worst case, i.e. if this suggestion despite all is rejected, is it really a problem if it "costs" you some extra 100KB on essentially high-end system such as Apple's? I mean even their phones can't classify as resource-constrained platforms. Indeed, what's 100KB in comparison to single picture user takes without much of consideration? But understand me correctly, I do sympathize which the sentiment, it would be cool. Yet you can't really expect that everything turns out your way, as there are other factors that matter...
(*) You keep referring to local labels, but once again, linker sees no local labels, so it still leaves me wondering what is the actual mechanism/criteria for not omitting code [or private table].

(*) You keep referring to local labels, but once again, linker sees no local labels, so it still leaves me wondering what is the actual mechanism/criteria for not omitting code [or private table].

If there's a dependent local label inside a subsection defined by a non-local label, that subsection is considered referenced. As an example:
foo:
    jmp Lbar
bar:
    nop
Lbar:
    ret

Subsection defined by foo references local label Lbar which is in the subsection defined by bar, so therefore subsection foo depends on subsection bar. That's what the linker will see. The key here is that the local label Lbar does not create a new subsection - the code following Lbar is part of the bar subsection.

what are guarantees that Apple won't change something in next release?

Saying that you're afraid Apple will change something in the next release is basically FUD. The same argument could be used to avoid nearly any change. This is a documented assembler feature that works in conjunction with a documented linker feature. Yes, Apple can change stuff, but then again loads of OpenSSL already depends on Apple-specific features (why else do the assembly translators have switches for ios and macos?), and if those things change, we just have to follow suit. I am not a fan of this kind of generic scary argument.

But on serious note. You have to recognize and accept that the last thing we want is to end up in situation when problem report comes in and it makes no sense, because piece of code was omitted by linker.

I agree that we want to avoid introducing bugs. But, a large code size is also a bug. In an era where we are massively bloating applications, I think it is sensible to try to cut things down somewhat. Even if you think that a 160KB increase is not significant, can you try to multiply that by the number of binaries on a phone? Keep in mind that on iOS you really have to compile OpenSSL statically if you want to use it.
Anyway, I don't really feel like defending this patch if you are intent on killing it. Perhaps we could get a third opinion?

Keep plugging away. There are multiple interested parties. Andy is just trying to understand the limitations of the mechanism being used.
For some of the team members iOS is an important platform.

iOS

I want to remind that suggested changes affect both MacOS and iOS. Or should I say all four, as each is available in 32- and 64-bit flavours.

Saying that you're afraid Apple will change something in the next release is basically FUD.

Yes, but that's my fear, and I'm seeking for tangible information to address it. Relevant question in the context also is if it's grounded. Apple, as any other vendor, is formally obliged to only make their whole offering consistent with itself. But unlike other vendors Apple has record of effectively locking out independent software and being less open. Well, there are other vendors that do same, but Apple has taken it furthest and was most successful at it.

This is a documented assembler feature that works in conjunction with a documented linker feature.

Where does it say that all run-time switches in OpenSSL are [and will be] safe? Nowhere. It's our responsibility to ensure that they all are, current and future. And in order to do that I need to understand the mechanisms, recognize how fundamental they are, and go through all the switches. In my mind it would be quite irresponsible of me to do otherwise and just say "oh, cool."

multiply that by the number of binaries on a phone

No, not overall amount of binaries, but only those that got OpenSSL. And if we are going that alley you should also compare to say amount of storage taken by photos on same phone... But once again, I do sympathize with the sentiment, it's just that I don't want, even refuse to take it to an extreme, not without careful consideration, specifically if it might jeopardize our chances of maintaining certain level of confidence across multiple platforms. Life is compromise...

How would it handle something like this line here?
https://github.com/openssl/openssl/blob/master/crypto/modes/asm/ghash-armv4.pl#L174
That value is based on a reference to rem_4bit, but it doesn't actually use it symbolically. I assume all of that would need to be excised.

Ugh, I should have tested iOS more carefully. It looks like .subsections_via_symbols actually just breaks adr across subsection boundaries. Basically, I gather that "subsectioning" an assembly file gives the linker leeway to just rearrange the sections if need be, which would break a lot more stuff.
Honestly, I'm not a fan of the fact that we can only select between .subsections_via_symbols and no dead stripping at all. The clear preference is for entire object files to be discarded, because that's the safe and sane option, but there doesn't seem to be a clean way to do that unless an object file exports exactly one non-local symbol (in which case we'd declare that non-local symbol up-front and make everything else an L local label).
I'm not sure, therefore, that this patch has any legs - Andy's right in that it's a bit of a scary solution, and the fact that it just breaks a commonly-used iOS idiom is bad. Using this only on macOS isn't really an ideal solution.
Sorry for wasting folks' time on this.

The situation on ARM appears to be intensified by the fact that there no suitable mach-o relocation types that can be used with adr instruction. As for "commonly-used iOS idiom." No, it's commonly-used ARM thing. As already suggested, Apple is only obliged to make their offering consistent with itself, and compiler seems to adhere to pairs of adrp+add on ARMv8 (haven't checked on ARMv7), which do have corresponding mach-o relocation types. Formally speaking one can try to make all adr instructions #ifdef __APPLE__... "Try" in last sentence means that I'm [still] not convinced that it would be sufficient in all cases, more adjustments might be necessary. In other words, there is no trivial way to address this. Closing this for now...


New contig pipeline

Develop an alternative to contig_miner from idseq unmapped reads. Preliminary idea:

(Adapter trim all sequences)
Align raw fastq sequences to a reference made from mosquito and many species of mito genomes
Split results into bins: mosquito, mito, and other
Quality trim
Spades de novo assembly on Other bin

We can align the reads to the assemblies to check quality of each contig.
Probably run on a big machine to start.
Testing set:

2 samples with WNV spike-in from Kalani
CMS 040 (novel virus and ambiguous birds)
MOS002-10a-W-R1 Goose sample from CDC
Sample with a match to the 12k bunyavirus

Resolved to use idseq outputs.


1.1.x

Performing pull request to review all the conflicts.

You did it @openanthem-admin!
Thank you for signing the Anthem Opensource Software CLA.

Please personally resolve your Git Conflicts, and never leave a branch in this state where we're unable to perform a Pull request cleanly.


Please optimize PowerToys Run

PowerToys run feature is very slow. After i type one letter, the program freezes for about 2 seconds. Very annoying if using this frequently

Thank you for reporting it.
Right-click on the PowerToys icon in the tray menu and select Report Bug

Drag and drop report into a GitHub comment.

PowerToysReport_2021-07-05-13-07-25.zip
here

Thank you for reporting it.
Right-click on the PowerToys icon in the tray menu and select Report Bug

Drag and drop report into a GitHub comment.

PowerToysReport_2021-07-05-13-07-25.zip

Startup takes a lot of time
[2021-07-03 11:48:51.1781] [INFO] [S:\src\modules\launcher\Wox.Infrastructure\Stopwatch.cs::50]
App.OnStartup - Startup cost <213529ms>

Most of it takes win32 program indexing
[2021-07-03 11:48:49.8651] [INFO] [S:\src\modules\launcher\Wox.Infrastructure\Stopwatch.cs::50]
Microsoft.Plugin.Program.Main - Win32Program index cost <196681ms>

Also, searching takes a lot of time

Startup takes a lot of time
[2021-07-03 11:48:51.1781] [INFO] [S:\src\modules\launcher\Wox.Infrastructure\Stopwatch.cs::50]
App.OnStartup - Startup cost <213529ms>

Most of it takes win32 program indexing
[2021-07-03 11:48:49.8651] [INFO] [S:\src\modules\launcher\Wox.Infrastructure\Stopwatch.cs::50]
Microsoft.Plugin.Program.Main - Win32Program index cost <196681ms>

Also, searching takes a lot of time

so the problem is on my end?

so the problem is on my end?

It's hard to say so far. The Windows Search plugin shouldn't take so much time. Also, other plugins should be faster. Try to restart Windows and verify if it still persists.

so the problem is on my end?

It's hard to say so far. The Windows Search plugin shouldn't take so much time. Also, other plugins should be faster. Try to restart Windows and verify if it still persists.

I don't know, power toys greatly impacted my pc performance since i installed it, then uninstalled and the performance got back to normal

It freezes for me too, not sure exactly what causes it, but is there definitively a module that blocks the UI thread.
You can reproduce but just typing random stuff, deleting what you just typed, typing again, deleting, until it eventually freezes.
The issue is that it sometimes it freezes on first use and that's the annoying part.

Does 0.59.1 make this behavior better? Now it waits for more input for a bit before doing the search. /needinfo


--scope flag does not work in databricks

Hi team,
The flag --scope mentioned as needed to create a screts scope does not work in recent databricks CLI. I get an Error: unknown flag: --scope if I follow the documentation that says to enter a --scopes flag. Below my results.
veronica.gomes@JJTY9QWYLH terraform % databricks secrets create-scope --scope veronicagomes-
secrets
Error: unknown flag: --scope

Usage:
  databricks secrets create-scope SCOPE [flags]

Flags:
  -h, --help                                  help for create-scope
      --initial-manage-principal string       The principal that is initially granted MANAGE permission to the created scope.
      --json JSON                             either inline JSON string or @path/to/file.json with request body (default JSON (0 bytes))
      --scope-backend-type ScopeBackendType   The backend type the scope will be created with.

Global Flags:
  -e, --environment string       bundle environment to use (if applicable)
      --log-file file            file to write logs to (default stderr)
      --log-format type          log output format (text or json) (default text)
      --log-level format         log level (default disabled)
  -o, --output type              output type: text or json (default text)
  -p, --profile string           ~/.databrickscfg profile
      --progress-format format   format for progress logs (append, inplace, json) (default default)

veronica.gomes@JJTY9QWYLH terraform %

Removing the --scopes flag works:
veronica.gomes@JJTY9QWYLH terraform % databricks secrets create-scope veronicagomes-secrets
veronica.gomes@JJTY9QWYLH terraform %

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

ID: 810a218a-80a5-2da0-b540-26347f9ef908
Version Independent ID: 41c2a12f-99b6-0faa-500b-3e4308cd00de
Content: Secret scopes - Azure Databricks
Content Source: databricks/security/secrets/secret-scopes.md
Service: azure-databricks
GitHub Login: @mssaperla
Microsoft Alias: saperla

@veronicagomes-db
Thanks for your feedback! We will investigate and update as appropriate.

@veronicagomes-db
Thanks for reporting this! We have created a PR for this issue and the changes should go live soon.


[VideoConferenceMute] Display toolbar on ONLY second monitor

Pretty much the title, currently the only options are on primary or all, whilst most people probably want only secondary, if they have one...

can you assign this to me?

@OWL4C
thanks for the feedback, added to https://github.com/microsoft/PowerToys/issues/6374
@vanshaj7-hub
do you want to work on this?

Tracked in https://github.com/microsoft/PowerToys/issues/6374

This would indeed be amazing, I have 2 screens plugged in and exclusively use it just to enable the shortcut, and having this bar floating on my main external screen is rather annoying, it would be great if I could move it to the other one, but even better if it could be hidden entirely while still keeping the shortcuts. Or perhaps a tray icon?
Either way thanks a lot for your hard work guys, I love PowerToys!

Thanks for the feedback but VCM is moving to maintenance only in the 0.67 timeframe. Our team will only directly address critical bugs, security and accessibility issues.
We'll accept community PRs for enhancements.


Request: Option to Specify Anchors

Similar to Unity's DistanceJoint2D, an option to choose the anchors for where the joint is connected on each RigidBody would be great.
Description on Unity's docs: "Define where (in terms of x, y-coordinates on the Rigidbody 2D) the end point of the joint connects to this GameObject."

To clarify, you can specify a pivot node, but when you have two rigidbodies connected via "links", it will just grab the position of the rigidbodies. Whereas I would like to specify where they are connect to one another.

Unfortunately, with the current implementation, this is not an option. The implementation is modifying the velocity directly, instead of applying forces to the Rigidbody2D nodes.
I will leave the issue open if I decide to change the implementation and rely on the admittedly more correct method of adding forces to the bodies.


Typescript fix demo and shadow

Fixes #18 by looking at the shadowRoot host to retrieve internal state info.
Updates demo to use only Custom Elements V1 and ES modules instead of HTML Imports

Change looks good, but tests are now failing in the same way that I reported in https://github.com/PolymerLabs/blocking-elements/issues/17 (e.g. https://app.saucelabs.com/tests/0d211355b0754f178a5c5c900c8ac5c3#0)

Merging, since the test failures are flakes (note different browsers fail on pr and push, and all the videos show that 100% of tests actually passed).


Ruby style - constants should be frozen

By default constants in Ruby an be reassigned and mutated. Object#freeze
can be called on "CONSTANTS" to prevent any further modification.
It's also worth noting that  Ruby 2.1 includes a memory optimisation for
frozen strings whereby the same ummutable string object is always
returned, so as well as this being good practice it may also save
memory[0]
[0] - http://josephyi.com/freeze/

This is ok by me. Anyone else have any thoughts?

This is actually already enabled by default via the rubocop defaults.


Clean up npm and commits workflow

Right now we check-in both the .ts changes and the .js changes.  I think this is just for npm, but I could be wrong.  Maintaining both in the source repository means that our commits are bigger and more mentally taxing than necessary.
I'd like to propose that we add a new Grunt task like grunt npm to package up everything necessary to publish grunt-ts in a new publish folder.  That would be the new root for publishing to npm.  Then we could stop checking in the JS code.  It would also mean that we would be checking in only the deltas between published npm package versions to the emitted JS in the "publish" folder.
Any thoughts?

I think this is just for npm, but I could be wrong

Almost. Its also used in travis.

Any thoughts?

:+1: I've wanted to do this but didn't have the time. For reference @Bartvds has already done this for tsd : https://github.com/DefinitelyTyped/tsd/ Basically with:

git Ignoring /build : https://github.com/DefinitelyTyped/tsd/blob/dev/next/.gitignore#L7
a prepublish script : https://github.com/DefinitelyTyped/tsd/blob/dev/next/package.json#L45  does a build and then mocha : https://github.com/DefinitelyTyped/tsd/blob/dev/next/Gruntfile.js#L253-L257
travis runs npm test and that runs grunt test and that also does build and mocha https://github.com/DefinitelyTyped/tsd/blob/dev/next/Gruntfile.js#L285-L291

When you say you want to set it up with tooling - can you elaborate?  Is this some new alchemy?

set it up with tooling

Something like a project generator.


[📚] link to flutterfire ui is wrong

On this web page there is a link to flutterfire  UI that gives a 404 error
https://firebaseopensource.com/projects/firebase/flutterfire/
the link is
FlutterFire UI (beta)

Duplicate of https://github.com/firebase/flutterfire/issues/10459


Pods cannot reach each other by hostname when DNSH hostnames is enabled

Logs from pytorch example: [W socket.cpp:558] [c10d] The IPv6 network addresses of (pytorch-workers-0-0.pytorch-workers, 3389) cannot be retrieved (gai error: -2 - Name or service not known).
/kind bug

/assign

actually i think it is a false alarm.. i think that msg is spammed in logs while its waiting for other pods to be ready, but the successful training logging isn't shown because we removed the env vars for verbose log output

/close


Signout is not working

   logout(){
      var vm=this;
      this.msal.signOut().then((value)=>{
        console.log("value after user is logout",value)
        vm.sign_out="done";
      }).catch((error)=>{
        console.log("Error when user gets logout",error)
        vm.sign_out="error";
      })
    }

    login(){
      var vm=this;
      console.log("  vm.msal",  vm.msal)
      if(this.platform.is('android')==true){
        const options: any = {
          authorities: [
            {
              type: 'AAD',
              audience: 'AzureADMultipleOrgs',
              authorityUrl: "https://login.microsoftonline.com/organizations",
              default: true
            }
          ],
          scopes: ['User.Read']
        };

        vm.msal.msalInit(options).then((initResult) => {
            console.log("Success result:", initResult); // "OK"
            vm.value=initResult;
            return initResult;
          },
          (err) => {
            console.log("Error result:", err);
            vm.value=err;
          })
          .then((d) => {
            console.log("d value is",d)
            vm.value="success"
            return vm.msal.signInInteractive()
            .then((v)=>{
          console.log("value after user is signed in",v)
            }).catch((error)=>{
              console.log("error",error)
              vm.value="error"
            });
          })
          .then((jwt) => {
            console.log("Signin result:", jwt);
            vm.value=jwt;
          });
      }

    }

I am trying to logout from my signed up account, but it is still showing user as logged in on calling the second function named as login() shown above

Hi!
Signout means that the next call to acquireTokenSilent is not going to work. I.e. you'll need a user interaction to gain access to the application again. It is however possible that the account remains signed in to Azure AD, so you're not required to enter your password again. This would be good for people who may be logged into their email on outlook.com with the same account as your app. Signing out from your app should not log them out of their email.
Hope that helps!

Hi!
Signout means that the next call to acquireTokenSilent is not going to work. I.e. you'll need a user interaction to gain access to the application again. It is however possible that the account remains signed in to Azure AD, so you're not required to enter your password again. This would be good for people who may be logged into their email on outlook.com with the same account as your app. Signing out from your app should not log them out of their email.
Hope that helps!


GPU performance question

I noticed that training on CPU-only is much faster than on GPU. With GPU, usage is about 18% according to nvidia-smi.
Is this because it trains for each epoch, and has to send the data to the card? I see the fast-mode in the code, and it seems to be getting activated with the theano backend. I cannot figure out if Ive got something misconfigured.

Well, while gpu can compute things faster, when there is a lot of data loading/unloading cpus get the advantage.  qlearning4k is still the fastest implementation of the q learning algorithm in keras.

I did eventually realize that whenever memory_size < batch_size, the speed is insanely faster but  the loss goes to zero. Im going to study the code and papers more to understand what is going on here.


Ranking of exactness in arrays

Describe the bug
It seems that the ranking of the exactness isn't as high when the searched string is inside an array.
I've written a little tool that would help me map data from one website to data from another site.
For this i imported the data that should be searched from site A into Meili and then searched the index with the native title provided from site B. However as the data from site A didn't have any field only containing the main native title, i stored all titles for a work into an array (as seen in the screenshot). With some works' titles containing very few words the initially mentioned behaviour became noticeable.
As indicated by the scrollbar on the screenshot this resulted in absolute matches of the title not being on the very top of the results and instead some results where the search term was part of the title were on top.
I was asked to create this issue to discuss on whether this behaviour is actually a bug or working as intended.
To Reproduce
Steps to reproduce the behavior:

Build an index containing documents that have arrays of strings (ranging from one to several words)
Search the index for an exact match on one of those one-word strings
See the 100% match being ranked lower than results where searched term is only a part of the string

Expected behavior
Results that contain absolute matches in arrays should be ranked higher by default.
Screenshots

Meilisearch version:
v1.2.0

Hello @Koopzington, thank you for the report. I'd like to ask if any changes have been made to your ranking rule settings. If there were any modifications, could you please share the details with me? Thanks in advance 🙏

Well i can confirm that with the default ranking rules the search is working as expected when the string i'm searching for is stored in a single field.
However when searching for a string that's stored together with other strings in an array field the initially described behaviour does still happen.

For reference my current ranking rules are
[
  'native_title:asc',
  'other_titles:asc',
  'words',
  'exactness',
  'typo',
]

and i'm still seeing the same behaviour.
Another observation i just made is that despite having other_titles ranked so high i'm still getting results based on other matches on top:

It seems like ranking rules don't apply to arrays at all and the order of the fields take priority instead.

i just confirmed the previously mentioned observation by recreating the index and putting the native_title and other_titles fields in front of the others and Meili does now indeed rank the results like i expected them be ranked.

Hello @Koopzington. Thank you for sharing your findings. AFAIK, It seems that the issue could be related to the default attribute ranking. By default, documents are ranked based on the order they appear, with matches in the "native_title" field ranked higher than those in "other_title" fields, and "other_title" fields ranked higher than the "type" field, and so on.
However, I'm not certain if you have kept the same ranking settings as before excluding the attribute criterion. Could you please confirm if you have followed the same ranking settings as previously?
Thanks in advance.

@oluademola yes, my ranking rules still don't include attribute

Hi @Koopzington - I'm just taking a look at your issue here and from what I can see it's the exactness ranking rule that's tipping things for you. I have used the new scoreDetails feature in v1.3 to check out how the documents are being scored in your scenario. I'll give you the conclusion of what I've seen and then I'll tell you how I got there, it might be useful for your own further investigation and tweaking.
For the search where the term is a string ("native_title") the exactness score comes back as an exactMatch (score: 1.0). For the search where the term is a string that's inside an array ("other_title") the exactness score comes back as matchesStart (score: 0.6666666666666666). Which makes sense given it's part of an overall array and not an exactMatch as such. Given exactness is high on your ranking rules listing its likely what's causing what you see.
How I got there.. in v1.3 there is a new feature that will give you a breakdown of how documents are scored. You can try it out on the most recent Release Candidate. You enable the feature by calling the /experimental-feature patching in {"scoreDetails":true}. And then when you do a search query pass in these additional parameters with your query:
"showRankingScoreDetails": true,
"showRankingScore": true`

The returned result will show you a ranking score for the overall document  e.g.
 "_rankingScore": 0.9166666666666666, as well as a breakdown per ranking rule e.g.
  "_rankingScoreDetails": {
                "words": {
                    "order": 0,
                    "matchingWords": 8,
                    "maxMatchingWords": 8,
                    "score": 1.0
                },
                "exactness": {
                    "order": 1,
                    "matchType": "noExactMatch",
                    "matchingWords": 8,
                    "maxMatchingWords": 8,
                    "score": 0.3333333333333333
                },
                "native_title:asc": {
                    "order": 2,
                    "value": "the elven prophecy"
                },
                "other_titles:asc": {
                    "order": 3,
                    "value": "sword of destiny"
                },
                "typo": {
                    "order": 4,
                    "typoCount": 0,
                    "maxTypoCount": 5,
                    "score": 1.0
                }
            }

which I think will be super helpful for you to narrow down and tweak with.
Hopefully this helps!


pandas ,numpy

Type: Feature Request
issue while importing packages/modules like pandas,numpy etc in python version 3.5 and visual studio version 1.7  installed in ubuntu 16.04 ,please help to install this packages or do i need to install any alternative packages related to this
error showing as : (module) pandas
"pandas" is not accessedPylance
Import "pandas" could not be resolved from sourcePylancereportMissingModuleSource
VS Code version: Code 1.71.1 (e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb, 2022-09-08T19:41:12.369Z)
OS version: Linux x64 4.15.0-142-generic
Modes:
Sandboxed: No

It looks like this is caused by the Python extension. Please file the issue to the Python extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.
Happy Coding!


⚠ ClamAV has degraded performance

In 03a4100, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 228 ms

Resolved: ClamAV performance has improved in ee3a602 after 5 minutes.


Request for fork

hey @Deester4x4jr, a request for Fork has been submitted to our Repo: https://github.com/getgrav/grav/issues/1191
This basically asks for the GPM version to be pointed to the forked version.  Are you continuing to maintain and support this plugin?
Cheers!

Hey @rhukster long time!
Honestly, I would like to continue to support this, but I do not have the time at the moment.  Please feel free to point the GPM at the forked version. He has done a bunch with it already.
Thanks!
-Josh-


Difficult to find donate information

Hallo poedit devs
Upon installing poedit on a new machine I was met with a dialog asking me if I wanted to donate. When I pressed yes it took me to the front of the website, but I was unable to find any information there about how to do it (the word donate does not appear anywhere on the front page), except buying the pro version. I'm I looking in the wrong place or is buying pro the only way to donate? In that case, maybe the wording in the dialog should be a little more clear, so that I will know what to look for. If there actually is a option to simply donate an amount, I think it should be easier to find. (Or maybe I just missed it for some reason.)
Regards Kenneth

There are no donations. You are using some prehistorical version of Poedit. Please always check if you're using the latest version (and if you're not, update and re-check) before filing issues.

Oh wow, you are correct, 1.5.4 from 2012. I am using the latest packaged version in the Ubuntu (and I guess Debian) repositories. Sorry about the noise.


Allow 0s as a valid argument for !slowmode command

The proper way to remove a slowmode from a channel is to use !slowmode reset [channel]
However, many moderators often go for !slowmode [channel] 0s
It would be nice to allow this, as it's quite intuitive for most mods.
The current error:

Can I work on this issue?

Can I work on this issue?

Absolutely, Assigned!
Good luck! If you have any questions, don't hesitate to ask!


EnumToStringConverter value converter not being applied for BatchUpdate

Related to #241.
Issue seems to be back again.
BatchUpdate sets properties with EnumToStringConverter without converting them.
In DB we see "1" instead of converted value.
When reading, it's converted to value proper enum value, but when using Where statement, it doesn't work as db holds "1" instead of "Processing" which is expected enum value.

Version 3.2.5

Closing as we've managed to make it work.

Closing as we've managed to make it work.

What did you do to work around this?  I am having a similar issue with BulkInsert.  I've already created an issue (#438).

It is still not working in version 3.2.7. BatchUpdate stores enums values instead of names.

It is still not working in version 3.2.7. BatchUpdate stores enums values instead of names.

It is still not working in version 3.6.6.


FormsSample for UWP ?

Would be please possible to extend the FormsSample with a UWP version ?

@abrasat, I also need this urgently.
You can find one here Here
It didn't resolve my issue though, but it is working

Did you posted some link ?


Augment records with additional geospatial metadata

The following additional geospatial metadata should be displayed in search results; alternatively, these could be incorporated into a “faceted” search mechanism in the side-bar.
Dataset start/stop date
Dataset spatial resolution
Dataset temporal resolution
Data Format

This has been fixed already. Although the date formate has a bit problem, that's another issue.


Heap Out of Bounds Access (72839282)

Hello OpenEXR team,
As part of our fuzzing efforts at Google, we have identified an issue affecting
OpenEXR (tested with revision * develop 165dceaeee86e0f8ce1ed1db3e3030c609a49f17).
To reproduce, we are attaching a Dockerfile which compiles the project with
LLVM, taking advantage of the sanitizers that it offers. More information about
how to use the attached Dockerfile can be found here:
https://docs.docker.com/engine/reference/builder/
TL;DR instructions:

mkdir project
cp Dockerfile.OpenEXR /path/to/project/Dockerfile
docker build --no-cache /path/to/project
docker run -it image_id_from_docker_build

From another terminal, outside the container:
docker cp /path/to/attached/reproducer running_container_hostname:/fuzzing/reproducer
(reference: https://docs.docker.com/engine/reference/commandline/cp/)
And, back inside the container:
/fuzzing/repro.sh /fuzzing/reproducer
Alternatively, and depending on the bug, you could use gcc, valgrind or other
instrumentation tools to aid in the investigation.  Do let us know if you have any feedback surrounding the documentation.
A possible patch for this issue has been attached for your consideration.
Once you have reproduced the issue, we'd appreciate to learn your expected
timeline for an update to be released. With any fix, please attribute the report
to "Google Autofuzz project".
We are also pleased to inform you that your project is eligible for inclusion to
the OSS-Fuzz project, which can provide additional continuous fuzzing, and
encourage you to investigate integration options.
Don't hesitate to let us know if you have any questions!
Google AutoFuzz Team
artifacts_72839282.zip
72839282.txt

Same issue as #271 and fixed with PR #437


For robot type Jackal UGV:

麻烦打扰你，我是一名来自中国的ros初学者，我的英语很差，所以只能借助网上翻译器来给您写信。我最近学习您在github上发布的项目做仿真的时候（https://github.com/ROS2swarm/ROS2swarm）.我没有使用过gitlab，一部分代码似乎只向有关人员开放（start the jackal simulation: https://gitlab.iti.uni-luebeck.de/plattenteich/jackal-swarm-addition），不知道现在这部分代码可以开放吗？如果可以的话，这部分代码能否通过邮箱发给我？这是我的邮箱
Excuse me, I'm a beginner of ROS from China. My English is very poor, so I can only write to you with the help of an online translator. I recently learned how to simulate the project you published on github（ https://github.com/ROS2swarm/ROS2swarm ）. I have never used gitlab, and it seems that part of the code is only open to relevant personnel (start the jack simulation: https://gitlab.iti.uni-luebeck.de/plattenteich/jackal-swarm-addition ）, I wonder if this part of the code can be opened now? If possible, can I have this code sent to me via email? This is my email
<EMAIL_ADDRESS>

Thank you!😄


remove the COST_TERMINAL in Analysis that's still used (no_egg)

this is related to #147 because it's much easier to do when we've moved away from egraphs and have our own structural hasher and such.
For now there's a COST_TERMINAL used in the egraph Analysis itself that overrides the ProgramCost that's used everywhere else, which would be an issue if we actually tried changing ProgramCost

done in https://github.com/mlb2251/stitch/pull/152


cmd/go: cross-compiling a darwin plugin fails to link

What version of Go are you using (go version)?

$ go version
go version go1.13.5 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/karl/.cache/go-build"
GOENV="/home/karl/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/karl/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/karl/tmp/tgo/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build277086046=/tmp/go-build -gno-record-gcc-switches"

Description of problem
$ cat go.mod
module tgo

go 1.13
$ cat main.go
package main

func main() {
}
$ GOOS=linux GOARCH=amd64 go build -buildmode=plugin
$ GOOS=darwin GOARCH=amd64 go build -buildmode=plugin
# tgo
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: -f may not be used without -shared
collect2: error: ld returned 1 exit status

When cross-compiling a plugin to Darwin you must set the environment variable CC to a Darwin cross-compiler.  Building a plugin requires invoking the system linker.

OK... Where can I get information about this? https://github.com/golang/go/wiki/WindowsCrossCompiling says that I just set GOOS and GOARCH and everything will work.
What do I put in CC? What counts as a Darwin cross-compiler? Why does invoking the system linker change things? Why does it spit out an error that makes it look like go itself has a bug rather than an informative message?

That page needs an overhaul.  I added a few words.
Cross compiling a pure Go program works as described on that page.  But cross-compiling a program that uses cgo, or that uses the build modes c-shared, c-archive, shared, or plugin, requires a C cross-compiler.  A cross-compiler is a compiler that runs on your host system (in your case, GNU/Linux) and can compile a C program into a compiler that runs on your target system (in your case, macOS).
Invoking the system linker changes things because you need to use a linker that can produce an executable that runs on the target system.
I agree that the error message could likely be improved.  That is #16395.


zlib

var fetch = require('fetch')
Error: Cannot find module 'zlib'
at Function._resolveFilename (module.js:317:11)
at Function._load (module.js:262:25)
at require (module.js:346:19)
at Object. (/Users/jmonster/Desktop/transcoder.js/node_modules/fetch/lib/fetch.js:5:12)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at require (module.js:346:19)
at [object Context]:1:13

fix:  npm install fetch
add it to the list of dependencies?

although it's probably because I'm using node 0.4 instead of 0.5 :(

yeah, fetch is meant to be used with node 0.5+ and specifically 0.5.10+ since up to 0.5.9 zlib module had a bug in decompression function.
i think i have a bug in package.json which allows this to be installed in earlier versions of node, i should probably check on that.


Allow repetitions=0 in cirq.sample

Fixes #2154 and #2196.

I think the Windows failures were actually caused by my change from dtype=np.int64 to dtype=int:
E       AssertionError: Attributes are different
E
E       Attribute "dtype" are different
E       [left]:  int32
E       [right]: int64

This suggests that specifying int allows pandas to use 32-integers which our tests don't accept.
I switched back to dtype=np.int64 and added a comment explaining that pandas will use dtype=object when np.int64 turns out insufficient.


navigationConfig: Apostrophe in RawFilter causes error

If your filter attribute has a ' single quote in it, it breaks.

If your filter attribute has a ' single quote in it, it breaks.

Hey @jeffrey-slentz-algolia
Thanks a lot for spotting so many fixes and bugs ! Really apreciate your feedbacks. 😊
I can't replicate this issue. Do you have an example by any chance ?
Thanks !

    // For an uilisation of your own made filter
    {
      name: `Women's Shoes`,
      type: 'rawFilter',
      filter: '',
      rawFilter:
        "hierarchicalCategories.lvl1:`Shoes > Women's Shoes`",
      url: '/annafield',
    },

https://github.com/algolia/algolia-react-boilerplate/tree/apostrophe-bug-example
here's a replication

Hello @jeffrey-slentz-algolia , @wahba404
Thanks for expanded on that one 👆.
Just tried by escaping the character like so :
   // For an uilisation of your own made filter     {       name:Women's Shoes,       type: 'rawFilter',       filter: '',       rawFilter:         "hierarchicalCategories.lvl1:'Shoes > Women\'s Shoes'",       url: '/annafield',     },
It seems to work fine 😊.
Let me know how it goes on your side of things !

Hello @jeffrey-slentz-algolia , @wahba404
Thanks for expanded on that one 👆.
Just tried by using "´" as an apostrophe and the error seems to be gone :
    // For an uilisation of your own made filter
    {
      name: `Women's Shoes`,
      type: 'rawFilter',
      filter: '',
      rawFilter:
        "hierarchicalCategories.lvl1:'Shoes > Women´s Shoes'",
      url: '/annafield',
    }

Let me know how it goes on your side of things 😊 !


What are the prospects for this repo?

Hi,
I just tried to use this package and have noticed a couple of bugs, unresolved issues opened for several years, unaddressed opened pull requests also, and the last commit as of today was 18 months ago.
Do you plan on maintaining this repo or should the community fork it to keep it going?
Thank you!

Uncanny that I came here to ask this same question just 5 hours after you! @jamesweakley @dataders @comaraDOTcom a response would be greatly appreciated, thank you!

Hi @coisnepe and @bakerwho,
Totally agree that the repo has been gathering dust. I don't use the library personally anymore and to be honest it's been difficult to gauge the level of active community interest.
Since creating this, dbt have launched Python models. This means for Snowflake, BigQuery and Databricks users there's not a lot of benefit in this package anymore since you can just use skikit-learn directly.
That said, if there are still use cases where this package is relevant then I'm happy to add you both as maintainers so that you can contribute directly, and existing users can benefit.

Hey @jamesweakley, thanks for taking the time to reply. I'd be happy to give you whatever support I can, as a maintainer or otherwise. Would you still keep an oversight on the project just to make sure it doesn't veer in the "wrong" direction and stays true to what omnata-labs intended it to do?

Great! I've added you as a maintainer.
I'll certainly keep some oversight of the project.


Rewrite process_posthoc_cpx_depth_regenotyping.sh

This script is not scaling well in larger cohorts (>10K samples) and should be reimplemented in Python.
It is called from the ParseGenotypes tasks in GenotypeCpxCnvs.wdl (subworkflow call stack MakeCohortVcf.wdl -> GenotypeComplexVariants.wdl -> ScatterCpxGenotyping.wdl -> GenotypeCpxCnvs.wdl). Test data can be found in the cohort mode Terra workspace here.

@mwalker174 is this still a thing?

@vruano Very much so

Ok, assign it to me. I cannot do it myself.

@vruano Have you made any progress on this? We will need this soon and @VJalili is available to take over.

Some, I will try to put my code somewhere but I guess he may want to start from scratch. I reckon you know my last day as a broadie is tomorrow. Sorry I didn't contact you earlier.

I cannot push a branch into the repo (no permissions) so instead I will post my code to at least take a look and perhaps continue it/ reuse.
The obvious issue with the bash script, apart that is awful to read and understand, is the vast number of individual processes that are spun to do even the simplest task. The goal is to reduce the number of such processes to just a few; although is plausible to do it all in memory I think it is okay to keep generate some intermediary files.
As you may see in my code I also try to be more efficient indexing some of the input bed files that otherwise are scanned to process genotype and interval overlaps. Perhaps indexing is not required if the input file sizes and sample count are small but makes the code more robust without adding much complication at all. So far I also have done without sys-CLI calls to bedtools (avoid spinning the additional scanning bedtool execution) as the intersection criteria is rather simple to implement yourself.

@vruano Thank you for the tips!

@mwalker174 is there any good reference run for the performance evaluation? e.g., what was the largest cohort this script was run successfully and how long it took?


Сhange the size of the object along "Y" for visualizing the liquid in the tank

Hi Alex! can you help me I want to make a mini SCADA in the NODE RED environment. i liked your code. it almost works for me. but there was a problem in solving my tasks. I need to change the size of the object along "Y" for visualizations of the liquid in the tank. Thank you in advance for your help and sorry for the language, I use a translator. Because I'm from Ukraine
flows .txt

This sounds like a feature request. I'll keep this open and get to this once I can clearly understand the way to implement it.
In the meantime you can fix it with a simple hack. Under the tank create a square shape with the same colour as the background. The "liquid" in the tank need to be at the lower layer than the square. So if you move the "liquid" down it will be hidden under the square. Now you can use the move class to move the "liquid" along Y and it will appear as the tank gets full.

As I understood, the solution to this quest will not be the same for all objects. Because there are, as I noticed, two formats for recording points vertically and horizontally. 1. width="220" height="300" Or 2.d="M -1158.042 -715.812 L -1149.042 -687.812 L -1167.042 -687.812 L -1158.042 -715.812 Z"

Yes, to add this feature it will be needed to consider all ways an object can be transformed. I'll read a bit on this topic.

Hello Alex. I did as you told me, insert a picture so that my object hides behind the picture and there was an effect of changing the level in the tanker. Looks pretty good.


Fix logger integration

Changelog

Moved storage path into paths configuration
Fixed progress logger integration. It creates the storage folder since .cache folder inside node_modules may be missing and the package doesn't resolve this issue

I am hella confused, I thought this cache is defaulted to node_modules/.cache, why are we specifying it?

@jaredpalmer you are quicker than my typing 😭 I just created the PR
Before was doing
storagePath: path.join(__dirname, '.progress-estimator'),

__dirname would point to src therefor the path will src/.progress-estimator or the distribution folder.
Now
const cache = resolveApp('node_modules/.cache');

Since it is using resolveApp will be created in node_modules/.cache/.progress-estimator rather than node_modules/tsdx/dist/.progress-estimator.
I had to make sure that .cache the folder exists since progress-estimator doesn't deal with this.

nvm I will fix myself


How can I plot from smallest to the largest values?

Hello,
I am trying to plot the bottom 10 categories from my dataset. I am changing the sort attribute to 'asc' and then it just plots the top 10 categories in ascending order,
let's say we have 5 categories e.g.
Category  |  Value
category 1|     1
category 2|     2
category 3|     3
category 4|     4
category 5|     5
and I want to plot (animate) the bottom 3. If I change the sort to attribute to asc then the plot is like this:
category 3|     3
category 4|     4
category 5|     5
but it should have been
category 1|     1
category 2|     2
category 3|     3
Do you have any idea how to fix this?
Thanks a lot,
Andreas

Hey,
I had the same issue. I solved it by changing codes on the original package. I think you can download it, check it out, maybe it can help you!
https://github.com/bzimons/MCspeedrun

Hi,
Thank you for the prompt response. Can you, by any chance, point me out where to look in the code?
In any case, thanks a lot for your help.
Andreas

First you need to put the "bar_chart_race2" folder on the same folder that your project is.  The modified code is "_make_chart.py". There are  some '#' that indicates where in the code was modifyed.  But basicaly what I did was invert the way Data is shown on the plot, the "lower" bar stays on top.
The code that uses this modified library is "rsg_barplot.py "
It's important to import the library like: import bar_chart_race2 as bcr
The code "rsg_barplot.py " basically do a clean up to the date on the data.frame, put it as the index. and create the plot.
I'm not sure if it will work well with any data, and I forgot lot of what was done. But I hope if you look carefully through the code it can help you :)

Thanks a lot :)

Thank you Beatriz! There were a number of changes in your modified version of _make_chart.py. Most of them are related to formatting of labels. The change needed to fix this reported issue is just one line. Line 893 needs to change from:
<df_ranks = df_values.rank(axis=1, method='first', ascending=False).clip(upper=n_bars + 1)>
to:
<df_ranks = df_values.rank(axis=1, method='first', ascending=True).clip(upper=n_bars + 1)>
This worked perfectly on my data. Thanks again.


Selenium like features?

[X] I have checked that a similar feature request does not already exist.

Yes, It maybe similar to #399 but not completly

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes, automation via scrcpy.
Something exactly like selenium, but for mobile
Describe the solution you'd like
A clear and concise description of what you want to happen.
I need to automate some of my works which I should do via mobile. It would be awesome if we can get the events and send the events regarding the situation on the phone.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Selenium like solution which can get xml and do the job.
Additional context
Add any other context or screenshots about the feature request here.
First day using the scrcpy and pretty impressed, thank you.
Any kind of scripting is very helpful to my purpoe.

@rom1v any clue or solutions for this?

I would like to second this. In one of my masters courses, called Mobile Systems and Applications, the professor has our weekly assignment as the previous weekly assignment but incremented with more functionality (or sometimes different functionality but better in the eyes of Google). Part of our submission is to record a video of the app (in addition to a bunch of other stuff). Most times, given how it's really only the back-end of the code that changes and not the interfaces, it'd be nice to have a script on the shelf that I can write and just incrementally add to to demonstrate the new functionality. The reason the whole required demo-video thing is annoying, is figuring out the exact script of steps in what order to do them (lots of "aw @#$%, stop, reset, start again" lol) in so as to demonstrate all the functionality and keep the video length very short. If I have a script that I think captures the essence of all of what I need and only need to incrementally add to it, it would make things a LOT easier.
In the meantime, I'm almost thinking, maybe I can send keyboard keys or mouse clicks to the window; it shouldn't be too terribly difficult to do such a thing and if it's not, I'm thinking, I could probably just do a really stupid simple basic script language to send the input. I would probably only need mouse click (x,y), keyboard send string (text), and a wait. Functionality like if a window is already open etc would be nice but for  what I need, I feel like I could get away with a blanket wait timer...  It would be nice to have it built into scrcpy though


DigiKey barcode integration: Barcode matches existing item

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
Linking barcodes via purchase order from DigiKey (Receive line item button) leads to following error:

Barcode matches existing item

While checking already linked barcode identifiers via admin panel I have found out server responds with:
{
    "stockitem": {
        "pk": 54,
        "api_url": "/api/stock/54/",
        "web_url": "/stock/item/54/"
    },
    "plugin": "InvenTreeBarcode",
    "barcode_data": "[)>\u001e06\u001dP182\u001d1PS3B-PH-K-S\u001d30P455-1720-ND\u001dK\u001d1K87684816\u001d10K105867004\u001d9D2022-05\u001d1TS30784-17\u001d11K1\u001d4LMY\u001dQ2\u001d11ZPICK\u001d12Z926627\u001d13Z999999\u001d20Z00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\u001e\u0004",
    "barcode_hash": "41426d2aeca6432f71b14960f7a9fee5",
    "success": "Match found for barcode data"
}

41426d2aeca6432f71b14960f7a9fee5 belongs to existing stock component.
But... I can receive item without linking barcode, and then I can link the same barcode to the same component which I just received via Stock tab, and it shows barcode identifier as<PHONE_NUMBER>59f52c520d85e49d3737b7.
Surprisingly, seems like I cannot reproduce this bug on demo site, but there's a chance I haven't followed that exact sequence? Or maybe DigiKey plugin is configured?
Steps to Reproduce
Following plugin is enabled: Supplier Integration - DigiKey
Plugin has configured Supplier which points to DigiKey.
Just try to link barcodes to two different components (from the same order?) received from DigiKey.
Expected behaviour
InvenTree treats DigiKey barcodes as unique and successfully links to different stock components.
Deployment Method

[X] Docker
[ ] Package
[ ] Bare metal
[ ] Other - added info in Steps to Reproduce

Version Information
Version Information:
InvenTree-Version: 0.15.5
Django Version: 4.2.14
Commit Hash: cc45357
Commit Date: 2024-07-12
Database: sqlite3
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-3.10.108-x86_64-with
Installer: DOC
Please verify if you can reproduce this bug on the demo site.

[ ] I can reproduce this bug on the demo site.

Relevant log output
Component 1:

Hash: `41426d2aeca6432f71b14960f7a9fee5`

Data:

{
  "BarcodeFormat": 134217728,
  "BarcodeFormatString": "DATAMATRIX",
  "BarcodeFormat_2": 0,
  "BarcodeFormatString_2": "No Barcode Format in group 2",
  "BarcodeText": "[)>\u001e06\u001dP182\u001d1PS3B-PH-K-S\u001d30P455-1720-ND\u001dK\u001d1K87684816\u001d10K105867004\u001d9D2022-05\u001d1TS30784-17\u001d11K1\u001d4LMY\u001dQ2\u001d11ZPICK\u001d12Z926627\u001d13Z999999\u001d20Z00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\u001e\u0004",
  "BarcodeBytes": "5b 29 3e 1e 30 36 1d 50 31 38 32 1d 31 50 53 33 42 2d 50 48 2d 4b 2d 53 1d 33 30 50 34 35 35 2d 31 37 32 30 2d 4e 44 1d 4b 1d 31 4b 38 37 36 38 34 38 31 36 1d 31 30 4b 31 30 35 38 36 37 30 30 34 1d 39 44 32 30 32 32 2d 30 35 1d 31 54 53 33 30 37 38 34 2d 31 37 1d 31 31 4b 31 1d 34 4c 4d 59 1d 51 32 1d 31 31 5a 50 49 43 4b 1d 31 32 5a 39 32 36 36 32 37 1d 31 33 5a 39 39 39 39 39 39 1d 32 30 5a 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 1e 04",
  "LocalizationResult": {
    "TerminatePhase": 32,
    "BarcodeFormat": 134217728,
    "BarcodeFormatString": "DATAMATRIX",
    "BarcodeFormat_2": 0,
    "BarcodeFormatString_2": "No Barcode Format in group 2",
    "Angle": 0,
    "ResultPoints": [
      "520, 297",
      "647, 298",
      "646, 424",
      "519, 423"
    ],
    "ModuleSize": 3,
    "PageNumber": 0,
    "RegionName": "",
    "DocumentName": null,
    "ResultCoordinateType": 1,
    "AccompanyingTextBytes": null,
    "Confidence": 89,
    "TransformationMatrix": [
      1,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      1
    ]
  },
  "Exception": null,
  "IsDPM": 0,
  "IsMirrored": 0
}

Component 2:
Hash:<PHONE_NUMBER>59f52c520d85e49d3737b7
Data:
{
  "BarcodeFormat": 134217728,
  "BarcodeFormatString": "DATAMATRIX",
  "BarcodeFormat_2": 0,
  "BarcodeFormatString_2": "No Barcode Format in group 2",
  "BarcodeText": "[)>\u001e06\u001dP138\u001d1PFCR684208T\u001d30P4654-FCR684208T-ND\u001dK\u001d1K87684816\u001d10K105867004\u001d9D2340\u001d1TC093580\u001d11K1\u001d4LGB\u001dQ1\u001d11ZPICK\u001d12Z19110233\u001d13Z999999\u001d20Z0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\u001e\u0004",
  "BarcodeBytes": "5b 29 3e 1e 30 36 1d 50 31 33 38 1d 31 50 46 43 52 36 38 34 32 30 38 54 1d 33 30 50 34 36 35 34 2d 46 43 52 36 38 34 32 30 38 54 2d 4e 44 1d 4b 1d 31 4b 38 37 36 38 34 38 31 36 1d 31 30 4b 31 30 35 38 36 37 30 30 34 1d 39 44 32 33 34 30 1d 31 54 43 30 39 33 35 38 30 1d 31 31 4b 31 1d 34 4c 47 42 1d 51 31 1d 31 31 5a 50 49 43 4b 1d 31 32 5a 31 39 31 31 30 32 33 33 1d 31 33 5a 39 39 39 39 39 39 1d 32 30 5a 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 1e 04",
  "LocalizationResult": {
    "TerminatePhase": 32,
    "BarcodeFormat": 134217728,
    "BarcodeFormatString": "DATAMATRIX",
    "BarcodeFormat_2": 0,
    "BarcodeFormatString_2": "No Barcode Format in group 2",
    "Angle": 0,
    "ResultPoints": [
      "486, 279",
      "646, 276",
      "645, 443",
      "486, 441"
    ],
    "ModuleSize": 3,
    "PageNumber": 0,
    "RegionName": "",
    "DocumentName": null,
    "ResultCoordinateType": 1,
    "AccompanyingTextBytes": null,
    "Confidence": 93,
    "TransformationMatrix": [
      1,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      1
    ]
  },
  "Exception": null,
  "IsDPM": 0,
  "IsMirrored": 0
}

Looks like you are scanning two different barcodes:

DigiKey Part Number: 455-1720-ND
DigiKey Part Number: 4654-FCR684208T-ND
(This is from the barcode data).

Well, I tried my best to explain the issue, but seems like I failed.
To keep it simple:

I opened the package from DigiKey and tried to assign barcodes printed on bags via Scan Received Items
Received the error: Barcode matches existing item
Filed the issue with my analysis

Some more info:

There were no existing stock of these items
Database records of Supplier items shows that barcode* field are not set at all

I went with printing my own labels, but still think there's something blocking to assign DigiKey barcodes to stock items.

Ah okay, yeah sorry I might have skimmed over some parts. I don't have my own instance nor my InvenTree app updated to a somewhat recent version and this is kind of hard to debug without just trying it.

If required, I might be able to find these barcodes and attached them as images, along with supplier part info. Feel free to request.

@dieselburner please provide that info if you can, not sure how to reproduce the issue elsewise!

This seems to be largely identical with #7690 and also refers to the same area of code - @dieselburner do you think we can streamline discussions on either one and which would you prefer?

@matmair Yes, both this issue and that discussion (which @SchrodingersGat used to create issue you mentioned: https://github.com/inventree/InvenTree/issues/7690) was started by me.
While I have used this issue to provide technical information and described the problem that clearly exists, the discussion was originally about how turn off supplier barcode check. But then discussion went into direction which addresses this issue, which is not what I was expecting really.
In any case - I will find a bit of time sometime later to provide some more details, including barcode images along with supplier item data, which should be enough to reproduce the issue on your side.

@dieselburner I have since added a functionality that the server records scanned barcodes - to make debugging of scanning via the app much easier. Perhaps if you can update, enable barcode logging, and see what the scanned barcodes are reading as?

I've run into a similar issue on Inventree 0.16.9 paired with a relatively old version of the app (0.14.3), where I could not assign a (DigiKey) barcode because the app claims the barcode already exists.
In any case, server logs show the app only hits the /api/barcode endpoint - which looks like it would also return supplier items based on the (newish) behavior to do so. Obviously the (old) app expects the endpoint to have different semantics.
Updating the app has resolved my issues (judging by the code it now just calls the link barcode endpoint).
tl;dr ensure your app is up-to-date?


Document that install-egress-gateway-routes is specific to EKS

The install-egress-gateway-routes flag, aka the egressGateway.installRoutes Helm value, is needed on EKS's ENI mode to steer traffic through the proper interfaces.
It is documented in the egress gateway guide, but we never mention that it's only meant for ENI mode. We should fix that as it can break things on other setups (e.g., known to cause issues on GKE).

@pchaigno Can I take this up?

@deepeshaburse Sure, go ahead. Don't hesitate to ask in Slack #development if you need help.


[6.x] Check client’s originating ip address when in maintenance mode

When using load balancer or proxy server,
can’t allowed client’s originating ip address when in maintenance mode.
This PR improve check when in maintenance mode using a load balancer or proxy server.

sorry, I used laravel 5.7
The cause of this problem is the order in which the middleware was called.
https://github.com/laravel/laravel/pull/5055
so, I closed this PR


Checking if the input string while parsing the SAM header is not empty

Hi,
I've found some odds BAM files with a TAB at the end of the header lines. I added this check condition to avoid a segmentation fault.
Thanks,
Roberto

Good point. But the large diff because of additional indentation can be avoided by using continue like this:
if (tokenIter->empty()) {continue;}


getSpecRelativePath() returns invalid path on windows based hosts

In command.js, getSpecRelativePath() function there's a following snippet of code
function getSpecRelativePath() {
  const integrationFolder = getValueOrDefault(Cypress.env('INTEGRATION_FOLDER'), 'cypress/e2e');
  return Cypress.spec.relative.replace(integrationFolder, '');
}

The attempts function to replace base folder of a given test with an empty string. The problem is that on windows hosts, that directory ends up being cypress\e2e, and the replacement function fails. This prompts a further problem, where INTEGRATION_FOLDER environment variable must be system specific.
Finally, upon inspecting the deployed version to npm registry and the one provided by the repository I see that the command.js file does not match in content. How come?

Hey @Dragas, we are in the middle of a big release adding TS and refactoring some things, in the new release we don't have this function anymore.
You can check the new release under migration, to see if that meets your requirements.

So in new versions we should anyway have long path like snapshots/cypress/e2e/SomeModule/Some.spec.js ? And no options to remove this deeping path part cypress/e2e or other by tests location? Thank you.


Add feature HTTPS/SSL

Could you add the HTTPS/SSL feature to the Doku web server?

Any news on this?

I do not plan to add HTTPS/SSL support in the upcoming releases.
If you need this, please employ some HTTP server, for instance, Nginx or Traefik.

Ok, could you help me get it used in an nginx reverse proxy through a subpath?


Sharing from photo apps?

Just want to confirm that, at this time, you cant share an image from your photo app or any other app using this library, correct?

hey @noctivityinc, that's correct. If you need this, contributions are welcome

Hey @noctivityinc, support for sharing images from the Photos app is now supported! Feel free to check out the README for instructions


Pasted images don't obey embedded color profile

Images which are pasted in (thanks for doing #7130 !) don't have their color profile retained/respected, but images which are uploaded do.
Using a test image from this stack overflow which github also fails at.
This is how it will look if color profiles in the image aren't being pasted in/respected:

This is how it looks when they're kept attached to the image:

Here's how Zulip displays a pasted in image:

Here's how Zulip displays an uploaded image:

And for comparison, here's it working in hangouts:

This leads me to believe that the color profile information is available in the buffer, but getting thrown out when pasted in.
Tested on CentOS 7 with AppImage (2.5.0 beta) and the web app in Chrome. Will test pasting on OSX.

Huh, interesting.  This seems likely to be an issue ultimately with the jquery-filedrop library we're doing to manage this, but I can't be sure without someone digging into the code.  @punchagan has done some recent work in the file upload UX and might have ideas.

Sorry, didn't mean to close it!

This looks like a (Chrome/Chromium) browser specific bug to me, in the "Copy image" part of the workflow.

GitHub is also failing this test, and it's unlikely that they are using the same library for managing the pastes.
It works in Firefox for me when I copy the image and paste it in GitHub.
It also works for me when I copy the stackoverflow image from Firefox and paste it in GitHub in a Chromium GitHub tab.
It fails for me on Chromium when I copy the image in a Chromium tab, and paste it in a GitHub tab (either on Chromium/Firefox).

Ah, I missed the part about it working in Hangouts. So, may be they do the pastes differently. I don't have ideas right now, but I can try to dig further.

Looks like the bug is also triggered when pasting into Hangouts. But, the upload to Google Hangouts does some server side magic, which causes the bug to not manifest.
When I first paste the image the image does get pasted with inverted colors. But, in a paste there is also text/URL information, which Google is using. They use this URL to fetch the image on the server side (I have a request on my server with the User Agent "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)"), and replace the pasted image with an image from the Google Image Proxy.  I can also confirm this from the network requests being made on the Hangouts tab.

In the gif above, I paste the image and you can see the wrong colors for a short duration, then the new image gets replaced with the image from the Google Image Proxy.
The image uploaded to the Google Image Proxy seems to have the right colors, hence working around the problem.

Some seriously nice troubleshooting there. It looks to me like Safari and Firefox are baking the image to sRGB- either on display or on copy. Pasted pixels from Safari/Firefox are the colors they appear to be, and read as sRGB instead of wacked.icc.
Furthermore, pasting the test image into Photoshop loses the profile. So it looks to me like there's no color information present in the copy buffer for Zulip to obey. Chrome makes a decision to not convert the image to srgb, while the other browsers do. Zulip obeys color profiles from images which have them, so it's behaving correctly.
I'm in favor of closing out this ticket.

Yeah, sounds like we should close it (and if anyone feeling excited about this, they should report it upstream to Chrome)