Fix development code reload

RoR not hot-reloading code changes is a HUGE PITA.
I'd want to gather what we know about why it doesn't work and, hopefully, fix it.
cc @rafatower @Kartones @xavijam @javisantana

1st step is deleting Visualization backend. Probably was disabled because of it ("to make it faster"), so getting rid of it or removing all its explicit requires if that's what makes RoR not automatically detecting changes (apart from adding folders to the autoload list) should be at least a good beginning.

I recall that I also experienced this, which reminded me, I think it got changed some while back when @xavijam had trouble with Rails being incredibly slow in the VM, see https://github.com/CartoDB/cartodb/commit/1618abb30b40281110aef639f59a37e1ddbe5d1a#diff-a2f09e1db7a47eb67c5849478a97f3d7

Regarding that changeset and slowness, we can measure disk access and determine if that's really a problem for development. It might be, specially if sharing directories (very dependent on virtualbox implementation and host/guest config).
Not everyone needs auto-reload, so we can toggle/untoggle it for development to avoid the speed problem.
An article relevant to the discussion: http://www.williambharding.com/blog/technology/rails-3-autoload-modules-and-classes-in-production/
According to the article, namespaces and file naming matters, sometimes an explicit require is required, etc. So please take a look.
HTH

I did have a huge performance bottleneck when running the stack from Vbox. The solution was to use NFS for shared folders.

There has been no activity on this issue for more several months. We are closing it. If you think this still needs to be addressed please open a new issue.


Upgrade to Electron Packager 10

Description of the Change
Hi there, I'm the maintainer of Electron Packager. I just released version 9.0.0, and thought that I could help upgrade a bunch of the projects that depend on it.
Alternate Designs
N/A
Why Should This Be In Core?
This already packages Atom :smile:
Benefits
There's so many more features in 9 than 7.3.0, but the most notable ones are that version 8 added armv7l support, and 9 added arm64 support, so whenever you're ready to start officially supporting those platforms, Packager's ready to help!
Possible Drawbacks
As with any upgrade of a module, there might be some bugs that crept in, but hopefully this whole exercise will help find them.
Applicable Issues
None that I'm aware of.

/

/cc @Leroix in case you're still looking at the electron-packager upgrade.

@50Wliu thanks, yea @malept and I spoke about this in the electron channel. Unfortunately, it didn't solve my electron 1.7 upgrade issue.

I attempted to build Atom on my ARM system (Acer Chromebook 13) using this pull request and it failed at the following point:
Running electron-packager on /home/alarm/git/atom/out/app with app name "atom"
Error: Unsupported arch=arm (string); must be a string matching: ia32, x64, armv7l, arm64
  at unsupportedListOption (/home/alarm/git/atom/script/node_modules/electron-packager/targets.js:49:10)
  at Object.validateListFromOptions (/home/alarm/git/atom/script/node_modules/electron-packager/targets.js:128:16)
  at packagerPromise (/home/alarm/git/atom/script/node_modules/electron-packager/index.js:151:25)
  at packager (/home/alarm/git/atom/script/node_modules/electron-packager/index.js:179:18)
  at runPackager (/home/alarm/git/atom/script/lib/package-application.js:126:10)
  at module.exports (/home/alarm/git/atom/script/lib/package-application.js:17:10)
  at <anonymous>:null:null

uname -a: Linux alarm 3.10.18-24-ARCH #1 SMP Sun Sep 17 21:03:56 CEST 2017 armv7l GNU/Linux

@mathuin Hmm, that should map to something. What are the values of process.arch and process.config.variables?

How do I find out what those values are?  I don't know much Javascript but I am willing to learn!

@malept I don't believe @mathuin will have access to those variables given that he can't install Atom.

@mathuin If you can run node in a terminal on your Chromebook, that'll start up the Node REPL. Just type process.arch and hit enter, then process.config.variables and hit enter.

alarm@alarm:~$ node
> process.arch
'arm'
> process.config.variables
{ arm_float_abi: 'hard',
  arm_fpu: 'vfpv3-d16',
  arm_thumb: 0,
  arm_version: '7',
  asan: 0,
  coverage: false,
  debug_devtools: 'node',
  debug_http2: false,
  debug_nghttp2: false,
  force_dynamic_crt: 0,
  host_arch: 'arm',
  icu_gyp_path: 'tools/icu/icu-system.gyp',
  icu_small: false,
  node_byteorder: 'little',
  node_enable_d8: false,
  node_enable_v8_vtunejit: false,
  node_install_npm: false,
  node_module_version: 59,
  node_no_browser_globals: false,
  node_prefix: '/usr',
  node_release_urlbase: '',
  node_shared: false,
  node_shared_cares: true,
  node_shared_http_parser: true,
  node_shared_libuv: true,
  node_shared_openssl: true,
  node_shared_zlib: true,
  node_tag: '',
  node_use_bundled_v8: true,
  node_use_dtrace: false,
  node_use_etw: false,
  node_use_lttng: false,
  node_use_openssl: true,
  node_use_perfctr: false,
  node_use_v8_platform: true,
  node_without_node_options: false,
  openssl_fips: '',
  openssl_no_asm: 0,
  shlib_suffix: 'so.59',
  target_arch: 'arm',
  uv_parent_path: '/deps/uv/',
  uv_use_dtrace: false,
  v8_enable_gdbjit: 0,
  v8_enable_i18n_support: 1,
  v8_enable_inspector: 1,
  v8_no_strict_aliasing: 1,
  v8_optimized_debug: 0,
  v8_promise_internal_field_count: 1,
  v8_random_seed: 0,
  v8_trace_maps: 0,
  v8_use_snapshot: true,
  want_separate_host_toolset: 0 }
>

Hmmm, that should have triggered automatically setting the arch to armv7l. I'll have to go look to see what's happening there.

I did some console.log() debugging on the function, and I think I understand the issue.
In targets.js there is a function validateListFromOptions which takes two arguments: opts and name.  This code is called twice from packagePromise in index.js:  once with name equal to arch, and once with name equal to platform.  The opts object is the same in both cases, a collection of key-value pairs with two particularly interesting pairs:  arch: 'arm' and platform: 'linux'.
When name is equal to arch, list gets the value arm.  Because list has a value, the automatic trigger you mention above in hostArch() is never called.  I do not know the language, I do not understand all the ramifications of changing this code, but it may be worth rearranging lines 105-114 in targets.js to move the name === 'arch' check before assigning opts[name] to list.  When I made that change, the packaging step succeeded.  I will submit a PR to your branch in a few minutes.
For what it's worth, the Atom build failed later on because electron-mksnapshot/bin/mksnapshot is an ELF 32-bit LSB shared object for Intel 80386, but that's a different matter. :-)

I figured out why the script here didn't automatically set the arch correctly - it always set the arch itself instead of relying on Electron Packager to set it. As a workaround, I made it use the hostArch() function that Electron Packager defines instead of process.arch.

I attempted to build Atom from the latest commit on this branch, and got the exact same error that I got before.  I can confirm that git grep hostArch brings up the two lines added to script/lib/package-application.js in the most recent commit.

@mathuin please run export DEBUG=electron-packager, rerun the build script, and post the output here.

Running electron-packager on /home/alarm/git/atom/out/app with app name "atom"
  electron-packager Electron Packager 10.1.0 +0ms
  electron-packager Node v6.10.2 +2ms
  electron-packager Host Operating system: linux (arm) +1ms
  electron-packager Packager Options: {"appBundleId":"com.github.atom","appCopyright":"Copyright ?? 2014-2017 GitHub, Inc. All rights reserved.","appVersion":"1.25.0-dev-db4586c78","arch":"arm","asar":{"unpack":"{*.node,ctags-config,ctags-darwin,ctags-linux,ctags-win32.exe,**/node_modules/spellchecker/**,**/node_modules/dugite/git/**,**/node_modules/github/bin/**,**/resources/atom.png}"},"buildVersion":"1.25.0-dev-db4586c78","download":{"cache":"/home/alarm/git/atom/electron"},"dir":"/home/alarm/git/atom/out/app","electronVersion":"1.6.15","extendInfo":"/home/alarm/git/atom/resources/mac/atom-Info.plist","helperBundleId":"com.github.atom.helper","icon":"/home/alarm/git/atom/resources/app-icons/dev/atom","name":"atom","out":"/home/alarm/git/atom/out","overwrite":true,"platform":"linux","prune":false,"win32metadata":{"CompanyName":"GitHub, Inc.","FileDescription":"Atom","ProductName":"Atom"}} +1ms
Error: Unsupported arch=arm (string); must be a string matching: ia32, x64, armv7l, arm64
  at unsupportedListOption (/home/alarm/git/atom/script/node_modules/electron-packager/targets.js:49:10)
  at Object.validateListFromOptions (/home/alarm/git/atom/script/node_modules/electron-packager/targets.js:128:16)
  at packagerPromise (/home/alarm/git/atom/script/node_modules/electron-packager/index.js:151:25)
  at packager (/home/alarm/git/atom/script/node_modules/electron-packager/index.js:179:18)
  at runPackager (/home/alarm/git/atom/script/lib/package-application.js:128:10)
  at module.exports (/home/alarm/git/atom/script/lib/package-application.js:19:10)
  at process._tickCallback (internal/process/next_tick.js:109:7)

(malept-electron-packager-9 %=) alarm@alarm:~/git/atom$ exit

I found something interesting about armv7l builds of Node, see https://github.com/electron-userland/electron-packager/pull/783 and the linked Node.js issue. Not sure whether that helps the Chromebook use case though. (I ran into it when I was testing on my Raspberry Pi 3.)

The PR has been updated to Electron Packager 11, which has support for mips64el arches in Electron >= 1.8.2.

Superseded by #19318.


Please remove 'rdfs:Literal' declarations

I ran a search and there are six declarations that some value is an 'rdfs:Literal'. I would like to confirm with you that this is a bug, and request that these declarations be removed.
Example1:
cco:ActOfCargoTransportation rdfs:label "Act of Cargo Transportation"^^rdfs:Literal
Example2:
cco:MeasurementUnitOfGeocoordinate   cco:definition "A Measurement Unit specifying the geospatial coordinates of a location."^^rdfs:Literal

That's a bug. Will fix asap.

Fixed with d4ea051


Cannot cast from PullToRefreshListView to ListView

I've tried to implement your PulltoRefreshListView in my app, but i can't cast it to a normal ListView.
Without casting it to ListView it's not possible to use methods like ".setHeaderView" or ".setAdapter".
I've tried to modify your library to implement casting PullToRefreshListView to ListView, but I failed.

Use getRefreshableView() to get the ListView, no need to cast.


Disable date parsing?

Tried setting Ln.~ 43360 supportedInputTypes.date = false but if I paste content in, the data is still parsed as a date if the col header is date
Is this set somewhere else?
Thanks!

supportedInputTypes is not a Chartbuilder setting, it's something used by an imported module.
If you want to disable that functionality you'll have to remove this line https://github.com/Quartz/Chartbuilder/blob/e1954d4e4a66a256c682ac0929fe5eae79da6462/src/js/util/parse-utils.js#L2

aha! parseDelimInput that makes sense but you never know the syntax. Thanks for helping find that! Exactly what was needed!


Alternate endpoint not working

When using the alternate endpoint, calling validate will result in nothing. Validate method is also not working. Nothing is logged.
It seems that js script provided by the alternate endpoint is different from that provided by the normal endpoint? Maybe a bug from Google?

Hi @mmlmml1 things seem normal on my end. Could you provide more info on what's going on? Maybe some logs and error messages being thrown?

Tried for several times, still no output.
I will try to set breakpoints to check it later


[Feature Request]: making an e-commerce website for AgroTech...basic template of agro tech ai e-commerce site

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
Having our own e-commerce is good.
Use Case
Useful for consumers
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

Want to create one such ecommerce app for agricultural related products


Difference between evancz/elm-http and elm-lang/http

When i was trying to get some documentation about elm-lang/http google took me here: http://package.elm-lang.org/packages/evancz/elm-http/latest instead of http://package.elm-lang.org/packages/elm-lang/http/latest/Http
For me as begginner it looked same. I don't exactly understand difference between this and elm-lang/http, but it really confused me. Can you please explain differences between this two libraries? preferably in readme :) thx

@infi-pc according to 0.17 -> 0.18 upgrading guide, this repo just moved to elm-lang/http - https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.18.md


Fix private metadata handling

This change introduces handling dataclasses in resolve_object_with_metadata_type

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Closing in favor of #8737 as agreed with @stnatic.


Inconsistency in XLA Compiled Model with tf.add, tf.experimental.numpy.triu, tf.math.reduce_max and Additional Transpose Output on GPU

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
source
TensorFlow version
2.15.0
Custom code
Yes
OS platform and distribution
Ubuntu 22.04.3 LTS
Mobile device
No response
Python version
3.10
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
cuda : 12.2 / cudnn 8.9.04
GPU model and memory
Tesla V100S-PCIE-32GB
Current behavior?
A combination of tf.add, tf.experimental.numpy.triu, and tf.math.reduce_max, with an additional transpose output results in inconsistent outputs under XLA compilation. Interestingly, this inconsistency is not triggered when altering the composition of these operations or changing the data type from int8.
This behavior is only seen on gpu.(Tesla V100)
Standalone code to reproduce the issue
import tensorflow as tf
import numpy as np
class Model1(tf.keras.Model):
    @tf.function(jit_compile=True)
    def __call__(self, inp1, inp2):
        # Forward pass logic using TensorFlow operations
        # inp1: [13, 1] : int8
        # inp2: [13, 60] : int8
        add = tf.add(inp2, inp1)
        triu = tf.experimental.numpy.triu(add, k=0)
        reduce_max = tf.math.reduce_max(triu, axis=1)
        return triu, reduce_max,

class Model2(tf.keras.Model):
    @tf.function(jit_compile=True)
    def __call__(self, inp1, inp2):
        # Forward pass logic using TensorFlow operations
        # inp1: [13, 1] : int8
        # inp2: [13, 60] : int8
        add = tf.add(inp2, inp1)
        transpose = tf.transpose(add, perm=[1, 0])
        triu = tf.experimental.numpy.triu(add, k=0)
        reduce_max = tf.math.reduce_max(triu, axis=1)
        return triu, reduce_max, transpose

inputs = [
tf.cast(tf.random.uniform(shape=[13, 1], minval=-128, maxval=128, dtype=tf.int32), tf.int8),
tf.cast(tf.random.uniform(shape=[13, 60], minval=-128, maxval=128, dtype=tf.int32), tf.int8),
]
model1 = Model1()
model2 = Model2()
device = "gpu"
with tf.device(device):
    tf.config.run_functions_eagerly(True)
    out1 = model1(*inputs)
    out2 = model2(*inputs)
    print(f'=========eager_output(version:{tf.__version__})================')
    try :
        for i in range(min(len(out1),len(out2))):
            np.testing.assert_allclose(out1[i].numpy(), out2[i].numpy(), rtol=0.001, atol=0.001, err_msg=f'at checking {i}th')
        print("XLA_eager does not trigger assertion")
    except AssertionError as e:
        print("XLA_eager triggers assertion")
        print(e)
    tf.config.run_functions_eagerly(False)
    out1 = model1(*inputs)
    out2 = model2(*inputs)
    print(f'=========compiled_output(version:{tf.__version__})================')
    try :
        for i in range(min(len(out1),len(out2))):
            np.testing.assert_allclose(out1[i].numpy(), out2[i].numpy(), rtol=0.001, atol=0.001, err_msg=f'at checking {i}th')
        print("XLA_complie does not trigger assertion")
    except AssertionError as e:
        print("XLA_complie triggers assertion")
        print(e)

Relevant log output
=========eager_output(version:2.15.0)================
XLA_eager does not trigger assertion
2023-12-01 16:14:42.359231: I external/local_xla/xla/service/service.cc:168] XLA service 0x5621a8b5fae0 initialized for platform CUDA (this does not guarantee that XLA will be used).
=========compiled_output(version:2.15.0)================
XLA_complie triggers assertion

Not equal to tolerance rtol=0.001, atol=0.001
at checking 1th
Mismatched elements: 12 / 13 (92.3%)
Max absolute difference: 126
Max relative difference: 18.
 x: array([119, 126, 126, 123, 127, 127, 120, 127, 127, 107, 127, 126, 109],
      dtype=int8)
 y: array([ -7, -10, 114, 114,  86, 125, 117, 120, 127,  86,  56, 114, 108],
      dtype=int8)

Hi @GwiHwan-Go ,
The issue does not replicable in TF2.14v and TF2.15 GPU package not installable on colab now. Could you please confirm the behaviour with TF2.14v also.With Tf2.15 and CPU the code works fine. Attached gist for reference.
Thanks!

Hi @SuryanarayanaY ,
We executed above code using Tf2.14v with same environment and encountered no errors. However, when we ran the refered behavior on Tf2.15v.

@GwiHwan-Go ,
Thanks for clarification. Then it seems a regression issue.

Hi @Gwihwan-Go,
I reproduced an error using Tf2.15v on gpu (Tesla V100). But didn't encounter any error using Tensorflow latest version(Tf2.18.0). Getting error only Tf2.15v because the issue likely arises due to differences in internal implementations or breaking changes introduced in Tf 2.15v. TensorFlow versions often include updates, bug fixes, optimizations, or even changes in API behavior, which can affect code execution. But there is no error in Tensorflow latest version(Tf2.18.0).
Thank you.


feat(generate-chnagelog): add generate-changelog-json

Description

This PR enables to generate JSON changelog.
It won't change the current generate-changelog behavior.
Also I've updated

the version of kenji-miyake/setup-git-cliff

It specifies the git-cliff version because only that version works at that time.

the multiple line output

Note that "Show result" is only for markdown changelog, not for JSON changelog.
This is because when we create a large JSON changelog and try to echo it, it says "Argument list too long" and CI is failed.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

I will test this with my CI test system.
I will share the result later and ask Hans to review.

I've tested this PR with my CI system and it works as I expected.


Resource file from library

There is a case similar to the previously opened issue https://github.com/spring-projects-experimental/spring-native/issues/782. If I put the file in resource, I can't access it. If I move the file to the core project without making any changes to the code, there will be no problem. I also updated the relevant project https://github.com/furkansavsatli/Sample-Spring-Native.

Hi @furkansavsatli
I tried your project.
First, there is a typo in SampleService in your SampleLibrary.
It tries to read files.txt, but it should be file.txt.
Then, in pom.xml in SampleCore, change the -H:IncludeResources='.*/file.txt$' to -H:IncludeResources=file.txt(exact filename without single quote). It worked.
I tried a couple of regex but couldn't make it work. It worked for me if it was the exact filename.
I think the regex is more for the native-image-maven-plugin side issue and not for the spring-native.

There was a typo error while preparing the github project in another computer, sorry. I tried the second part you said and it worked. Thank you. however this kind of usage is a bit diffucult. It would be nice if we didn't need IncludeResources.

The spring-aot plugin automatically adds files under src/main/resources directory to the resource-config.json.
So, if the resource file is in the main module(SampleCore), it is automatically added and discoverable at run time.
However, resource files in the dependent libraries(e.g. SampleLibrary jar) would not automatically exposed.
If it automatically exposes all resources in the dependent libraries, I guess it would increase the size of the final image unnecessary.

@ttddyy Thanks for your help on this.


Your message is not signed with DKIM

on https://www.mail-tester.com/ i have this:
**Your message is not signed with DKIM**
DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message.

Howto solve?
Thanks.

I tried sending an email from the domain to my gmail account.
This is the source of the message and there is no trace of DKIM.
`Delivered-To<EMAIL_ADDRESS>Received: by 2002:a05:7110:6182:b0:233:8e8d:a17d with SMTP id g2csp81348gec;
Tue, 23 Apr 2024 13:42:22 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEHXMfZRhy41N6ujPvhx4/9LTzS3kMUsUKqrH1CcuhbCvzVYiPBfC2mbUFPDz3EUtkMnEra
X-Received: by 2002:a7b:cb03:0:b0:419:f447:c323 with SMTP id u3-20020a7bcb03000000b00419f447c323mr221128wmj.27.1713904941920;
Tue, 23 Apr 2024 13:42:21 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1713904941; cv=none;
d=google.com; s=arc-20160816;
b=d5FMK+VVA4834tJs/n60EN6GHssx2a9aPzGtgtqzh/PAyeffti4BGm7L5Kf6JsCHLD
8bK0YPswW+h3kRX74+Srv7F94iAVrzgVSwI0c3qPkqJ7vGT8JPYtVlo7YkrhSSjseglf
dt4IgNZ/lsiwBgrtlffchNUEBtTEHykXyDc7bsH+Vz5u5v8xGQoyUa0o5judgv//JvbE
elHdjRNZsQQaGOJUFompxnA9O4gVYJ3SIQQbQntMDicEgBananzBpLLB0mEmGC452Pg9
wNWXVz/qUTAgKOhJ/sP+erHskodGtoFmzTvrXLvvUCepAuB4rT7H2JKCMzmG74r0Fz6z
r7Gw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=content-transfer-encoding:message-id:subject:to:from:date
:mime-version;
bh=hq0ouRkCzIGt5QC08xrVsrM3tli1NxHFqrpBAP6W7v8=;
fh=kCwNR7q8sCVgK/5jjauGQ9WbHTXbky8MM1QTx+CTeUU=;
b=tFNdFFHseYZxP3bfk9aTVhumg37EXB/pvbNOJuQxQEA5IQn9amlTpOe2gCHea+9q5O
u7Twq0kN+6WQnllNxVLZ609kqi9AjsefZ+T1CnFwIphCfFibKRChSXMa471gyUyznsjK
Joj4xMOdw8F56zXpPMsSzAj81/aHKZ4dOKLgfz7X+b9vnoAa0wjy/PgoHk9kabKiMM0I
p7yFfzGgMg0BL6tHLqkOFhs9ZP+1XVO/BTsuA6llQZDfD2HSjKQeLVDF97/JjE00dslQ
rbP0Oy1CIbh1no9UJtmEHTuqXKmmHA4B25oDnRdiRMycaW/tkMUzCWiB0wi8a3Mc+EEh
34iQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
spf=pass (google.com: domain of<EMAIL_ADDRESS>designates <IP_ADDRESS> as permitted sender<EMAIL_ADDRESS>dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nnxx.ninux.org
Return-Path<EMAIL_ADDRESS>Received: from mail.nnxx.ninux.org (mail.nnxx.ninux.org. [<IP_ADDRESS>])
by mx.google.com with ESMTPS id je3-20020a05600c1f8300b004163a478cf2si6877124wmb.71.2<IP_ADDRESS>.42.21
for<EMAIL_ADDRESS>(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 23 Apr 2024 13:42:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of<EMAIL_ADDRESS>designates <IP_ADDRESS> as permitted sender) client-ip=<IP_ADDRESS>;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of<EMAIL_ADDRESS>designates <IP_ADDRESS> as permitted sender<EMAIL_ADDRESS>dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nnxx.ninux.org
Received: from mail.nnxx.ninux.org (mail.nnxx.ninux.org [IPv6:2a07:7e81:3f1c::6])
by mail.nnxx.ninux.org (Postfix) with ESMTPSA id C74F73803AF
for<EMAIL_ADDRESS>Tue, 23 Apr 2024 22:42:20 +0200 (CEST)
MIME-Version: 1.0
Date: Tue, 23 Apr 2024 22:42:20 +0200
From<EMAIL_ADDRESS>To: Mikysal78<EMAIL_ADDRESS>Subject: ciccio
Message-ID<EMAIL_ADDRESS>X-Sender<EMAIL_ADDRESS>Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit
pippo
`

maybe I need to install the package "opendkim"
But the role ansible did not install

You need to have this file with the private key : /var/lib/rspamd/dkim/nnxx.ninux.org.mail.key

Yes

And /etc/rspamd/local.d/dkim_signing.conf contains
path = "/var/lib/rspamd/dkim/nnxx.ninux.org.mail.key/";
selector_map = "/etc/rspamd/dkim_selectors.map";

No, my is:
path = "/var/lib/rspamd/dkim/$domain.$selector.key";
selector_map = "/etc/rspamd/dkim_selectors.map";

And /etc/rspamd/dkim_selectors.map contains nnxx.ninux.org mail

Yes

Restart : systemctl restart rspamd
You haven't SSL certificate for nnxx.ninux.org.

Yes, i have let's with wildcard
Rspamd is running
root@mail:rspamd # systemctl status rspamd.service
● rspamd.service - rapid spam filtering system
     Loaded: loaded (/lib/systemd/system/rspamd.service; enabled; preset: enabled)
     Active: active (running) since Wed 2024-04-24 23:44:53 CEST; 13h ago
       Docs: https://rspamd.com/doc/
   Main PID: 19266 (rspamd)
      Tasks: 6 (limit: 4652)
     Memory: 188.3M
        CPU: 21.588s
     CGroup: /system.slice/rspamd.service
             ├─19266 "rspamd: main process"
             ├─19268 "rspamd: rspamd_proxy process (localhost:11332)"
             ├─19269 "rspamd: controller process (localhost:11334)"
             ├─19270 "rspamd: normal process (localhost:11333)"
             ├─19271 "rspamd: normal process (localhost:11333)"
             └─19272 "rspamd: hs_helper process"

apr 24 23:44:53 mail.nnxx.ninux.org systemd[1]: Started rspamd.service - rapid spam filtering system.
apr 24 23:44:53 mail.nnxx.ninux.org rspamd[19266]: 2024-04-24 23:44:53 #19266(main) <16460a>; main; main: rspamd 3.4 is loading configuration, build id: release
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sent signal SIGUSR1 to main process 19266 (rspamd) on client request.
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sending signal SIGUSR1 to process 19268 (rspamd) on client request.
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sending signal SIGUSR1 to process 19269 (rspamd) on client request.
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sending signal SIGUSR1 to process 19270 (rspamd) on client request.
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sending signal SIGUSR1 to process 19271 (rspamd) on client request.
apr 25 00:00:03 mail.nnxx.ninux.org systemd[1]: rspamd.service: Sending signal SIGUSR1 to process 19272 (rspamd) on client request.

I try to send emails from webmail or thunderbird.
They don't get signed

I found the problem:
the permissions under /var/lib/rspamd/dkim were root and not _rspamd
But the signature is wrong, it does not take the sub-domain, see:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ninux.org; s=mail;
	t=1714048612;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=WVSSz+To8f6E/EWnyFaJpXklEMFqfOahn9yABkb4mag=;
	b=U+tXJ9mXYnCrFGERwUFGZS8YnCzRp7/jjQFgDFgoOzxExUqDjjPm136VPfuIy3Yq/vfLdD
	j2RIJvARpRx1lsA8y3Ds++0zDLWgiY9zrGWm4jv5TXqu74Q05V3jqZJqxD2S/QKykkvtNf
	xKTphQjpf6cPno0XXxqRSe7tuqvGQKE=

I have 2 domain on server:
nnxx.ninux.org and basilicata.ninux.org
selector_map = "/etc/rspamd/dkim_selectors.map";

maybe after the dot switches to the selector, and this, perhaps, jumps the sub-domain
How can it be solved?

Solved with local.d/dkim_signing.conf
use_esld = false;
path = "/var/lib/rspamd/dkim/$domain.$selector.key";
selector_map = "/etc/rspamd/dkim_selectors.map";


Clarify RPO and RTO of Active-Active configuration

Please clarify the RPO and RTO of the Active-Active configuration:
The "Active-Active-Active" configuration specifies RTO and RPO of 0 hours, which I believe means that the recovery time is zero and the data loss is also zero.
However, the "Active-Active" configuration specified RTO and RPO of None, which seems to imply... that there is no objective at all? (?!)
This is confusing with regards to the other, lower-cost options which provide some RTO and RPO.
Current summary table looks as follows:

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

ID: c426719b-43df-8702-a573-9b1698439773
Version Independent ID: d33d9114-7292-8487-a4c3-a3491b23c212
Content: Azure Data Explorer and business continuity disaster recovery
Content Source: data-explorer/business-continuity-overview.md
Service: data-explorer
GitHub Login: @orspod
Microsoft Alias: orspodek

@Spoonbender
Thanks for your feedback! We will investigate and update as appropriate.

Hello @Spoonbender  ,
As mentioned in the same article ( i am pasting the text below ) that Active- Active is very similar to Active-active-active configuration with the exception that we have only two regions participating in Active- Active . I think for Active- Active also the RTO and RPO should be 0  , but i will let @orspod comment on the same .
Active-Active configuration
This configuration is identical to the active-active-active configuration, but only involves two Azure paired regions. Configure dual ingestion, processing, and curation. Users are routed to the nearest region. The cluster SKU must be the same across regions

Hi @Spoonbender thanks as usual for your excellent questions about our docs.
I've checked with @cosh and the RTO and RPO for the Active-Active configuration is indeed 0 hours. This is now being changed in the documentation.
Closing this issue now, please let me know if you have further questions.
#please-close


Organize Chinese docs

This PR does not add any new content to Chinese docs, but re-organize the docs.
Move the content of advanced/Time-to-Live.md into Caching.md
Move the content of contributor/Logging-Conventions.md into operation/Server-Logging.md
Move the content of storage/secure-HDFS.md into storage/HDFS.md
Rename ufs folder to storage
Move docs/cn/FAQ.md → docs/cn/overview/FAQ.md
Move docs/cn/Getting-Started.md → docs/cn/overview/Getting-Started.md

alluxio-bot, merge this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/7271/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/7275/
Test PASSed.


odh-notebook-sync workflow ignores the Pipfile.cpu and Pipfile.gpu files

Describe the Bug
The odh-notebook-sync.yml updates only Pipfile files and ignores the Pipfile.cpu and Pipfile.gpu files in the notebook repository, e.g. here and here.
I believe these should be updated too as the rest of the images are. The workflow needs to be amended so that it counts with these files too.
A clear and concise description of the bug.
Codeflare Stack Component Versions
Please specify the component versions in which you have encountered this bug.
Codeflare SDK:
MCAD:
Instascale:
Codeflare Operator:
Other:
Steps to Reproduce the Bug

Go to '...'
Click on '....'
Scroll down to '....'
See error

What Have You Already Tried to Debug the Issue?
Provide a clear and concise description of how you tried to debug this issue.
Expected Behavior
A clear and concise description of what you expected to happen instead.
Screenshots, Console Output, Logs, etc.
Add screenshots of UIs (like dashboards), etc. that help explain the issue.
Affected Releases
List any release versions, git commit hashes, or git tags, etc. that you know show the bug. If it is the latest HEAD on main, just put that.
Additional Context
Add as applicable and when known:

OS: 1) MacOS, 2) Linux, 3) Windows: [1 - 3]
OS Version: [e.g. RedHat Linux X.Y.Z, MacOS Monterey, ...]
Browser (UI issues): 1) Chrome, 2) Safari, 3) Firefox, 4) Other (describe):  [1 - 4 + description?]
Browser Version (UI issues): [e.g. Firefix 97.0]
Cloud: 1) AWS, 2) IBM Cloud, 3) Other (describe), or 4) on-premise: [1 - 4 + description?]
Kubernetes: 1) OpenShift, 2) Other K8s [1 - 2 + description]
OpenShift or K8s version: [e.g. 1.23.1]
Other relevant info

Add any other information you think might be useful here.

Closing this one in favor of https://issues.redhat.com/browse/RHOAIENG-11525


CSV File Data Dictionary

Hello,
i try to create and provide a PostgreSQL schema file (and a script to import the csv files into the database) for this repository. I did the following steps:

Clone the repo
Set 'exporter.csv.export = true'
Build the project and syntheasize 10 patients by  #run_synthea.bat -p 10
Created a PostgreSQL database according to the wiki article 'CSV File Data Dictionary'
Import 'patients.csv' which gives me the error that zip is not allowed to be null

It seems that the cause of this can be found here:
https://github.com/synthetichealth/synthea/blob/203625fa5962dda33edb6dee85169092d35eefd4/src/main/java/org/mitre/synthea/modules/LifecycleModule.java#L166
But zip is not allowed to be null according to the wiki page. I would like to fix that, but should the patients zip be optional or not?

Well... technically, location should not be null, but I'm not 100% certain that every "named place" within the United States has a zip code.
I'll try to debug it and see...

Turns out we don't have zip codes for all the demographic places. What can I say? The US Census Bureau and the US Postal Office are not aligned.
I just submitted a pull request (#422) to fill in some missing values, but this doesn't fix the problem entirely.
Therefore, I've changed the data dictionary to make zip code an optional field.

Might it be a solution to only allow to synthesize patients demographic places which are included in one of the available city -> zip mappings?

If only. If we did that, it turns out we'd be missing a large part of rural America. Which means we'd only really get the big cities and urban areas. Works for just "synthetic data in general" but not for modeling a representative population.
The correct solution would be to find out what all of those zip codes are, but so far, it has been a process to munge the two datasets together... the US Postal Service doesn't provide a zip code file, so we have to cobble them together from other data sources.


add gh-cli to actions-runner

I would like to install gh cli because I want to use it in some situations and I think it would be more convenient to use it, but if it is difficult due to other reasons, please reject it.

we should use aqua
see: https://quipper.slack.com/archives/C50FYM9BL/p1725343134367149?thread_ts=1725343113.192959&cid=C50FYM9BL

For long-term maintainability, it would be nice to avoid version management in this repository. Aqua would be a nice option 👍


Create automate bot

Bot added for automate greeting whenever issue/PR is made
Fixes #185
Type of change
Please give a X on it which is applicable

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Refactor Code
[ ] A documentation update
[ ] Others(mentioned in the issue number)

Screenshorts and Vedios:

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

@hustlerZzZ please the add the apt labels here also , as per the guidelines .


ARROW-8297: [FlightRPC][C++] Implement Flight DoExchange for C++

This is a draft implementation of DoExchange that I'm submitting as part of the mailing list discussion. A simple usage demo is in flight_test.cc and test_util.cc.
Overall, I've tried to share the implementation with DoGet/DoPut as much as possible, changing some classes to be templated. I've also taken the opportunity to clean up some things (e.g. the DoGet implementation on the client side now uses a peekable iterator instead of the messy circularly-dependent classes of before).

[x] Fix undefined behavior in zero-copy deserialization due to not handling "inlined" slices from gRPC
[x] Clean up the public API

[x] FlightDescriptor is not exposed to the server
[x] Unnecessary Begin/Open methods in some places
[x] API docs in Flight.proto

[x] More complete test suite to cover different usage patterns
[x] More comprehensive error handling/propagation of errors from the gRPC layer
[x] Fix not-yet-implemented parts of API
[ ] Look for other opportunities to share implementation between DoGet/DoPut/DoExchange

I've updated the PR. There's still a TODO about trying to share some logic with RecordBatchStreamImpl, but that is pull-based while this is push-based, so that may not be simple. Otherwise, this should be a complete implementation for C++; I'll follow up with Python and Java in separate PRs.

This should be ready now. The only issue I have is I could not figure out how to get GCC 4.8 to use the unique_ptr overload of a method instead of the shared_ptr overload.
https://github.com/apache/arrow/pull/6656/files#diff-34371f71b4b1eecc5f855dd3dbd3340cR207-R214

I've rebased and fixed the integration test. I also managed to fix the compilation failure on GCC 4.8.

Sorry for the delay on this (I have been heads down on the kernels project). I can take a look at this again in the next few days

No worries, that's what I figured :)

Also congrats on getting this working, not easy

Overall this looks OK to me, some of the fine details I'm unable to scrutinize super closely but I trust you and the test coverage certainly will help should refactoring be necessary. This will have to be rebased because of changes in arrow/ipc/dictionary.h but otherwise I'm fine with this being merged

Thanks for the review! I'm happy to answer any questions about the details/add comments where necessary if you are curious.

This change causes the build failure of arrow-flight on s390x at https://travis-ci.org/github/apache/arrow/jobs/691282162#L942

Sorry about that, for posterity this is being worked on in https://github.com/apache/arrow/pull/7277.


Randomly generate Request ID

Currently the request_id in the request envelope is hard coded when it should probably be a random value for each request. The only question is what range to use, aka how does the original app do it?

I was thinking someone prob fixed that already.. oh... ..
https://github.com/search?p=1&q=8145806132888207460&type=Code&utf8=✓

Does the server care what we send for this? I'd imagine we could start at 0 and count.

@renedx that's hilarious lol, I sometimes forget you can search github.
@Morgul the server does not seem to care, it's just an identifier for the request. But it is important to mimic the original app because this is one of many ways niantic can detect that you're not legit, aka a bot. Counting up won't do much good either since its too different from how the app does it.
We need to inspect what the normal app sends, set up a mitm server that logs all requests, play for a while on your phone while using it and see the range of the ids that have been used. Based on that we can figure out a function to generate something similar.

This issue may have just been timed perfect, as Niantic introduced API throttling. Wondering if Request ID has to do anything with it.
On the Java API it is now changed to an incremental counter:
https://github.com/Grover-c13/PokeGOAPI-Java/pull/328/files#diff-532a32906d5cefbfb9887e55df86246aR289

We have a pretty solid version in place now (randomize, then increase for each request). Only issue is that our randomizer sometimes produces shorter numbers than what the app uses. Would probably be an easy fix if someone wants to do it.

I'm highly against increase for each request to be honest, since this is NOT what the app does. It sends a random one each time.

Well that would be a pretty easy change :)


no examples using zlib inflate stream

I'm using beast 1.70.0 and I need to decompress/inflate the contents of the web socket stream, I noticed that there is a native beast inflate stream, I've never used zlib and could not find any examples, how is this inflate stream intended to be used when reading from the web socket stream?

wow its been a month, sorry for taking so long to reply, I have a private GitHub account for work and I wasn't signed in, I think if you use wss://real.OKEx.com:8443/ws/v3 this url and send this string {"op": "subscribe", "args": ["spot/depth:ETH-USDT"]} with the boost beast ssl websocket client with per message deflate set and it should stream compressed data.

Hi,
I ran into the same issue as haashirashraf trying to subscribe to the OKEx WebSocket stream. OKEx says this in the feed documentation:
All the messages returning from Websocket API are optimized by Deflate compression. Users are expected to decompress the messages by their own means(Compression and decompression through the inflate algorithm).

However, what they mean by this is not that they use the permessage-deflate extension; instead, they send normal WebSocket messages whose contents are compressed using DEFLATE.
This can be seen in the WebSocket upgrade response headers, which do not acknowledge permessage-deflate after we enable it:
HTTP/1.1 101 Switching Protocols
Date: Thu, 07 May 2020 19:19:40 GMT
Connection: upgrade
Set-Cookie: __cfduid=<redacted>; expires=Sat, 06-Jun-20 19:19:39 GMT; path=/; domain=.okex.com; HttpOnly; SameSite=Lax
upgrade: websocket
sec-websocket-accept: <redacted>
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 58fd4b3acafa99ea-EWR
cf-request-id: 02922d58bf000099eaff07a200000001

Like OP, I wound up using zlib and adding a dummy zlib header to the raw DEFLATE data.

OKEx is doing it wrong.

I agree. The wonders of crypto APIs.

@vinniefalco i dont see any examples of deflate extention support for http requests.
Beast doesent have that support?
I am looking for gz compression in HTTP REST requests.
If its supported, can you point me to some example usage?
Thanks.

There are no examples, because it is not supported. You need to handle that yourself. Beast provides the zlib code (in <boost/beast/zlib/*> for this purpose.

Okex V3 API requires websocket messages to be decompressed by the application. By the way, C example of decompression in Okex documentation is buggy - don't use it for production.
Okex V5 API, which became available recently, supports permessage-deflate: https://www.okex.com/academy/en/complete-guide-to-okex-api-v5-upgrade


1.19.4 PLEASE

PLEASE ADD THIS MOD FOR 1.19.4, I WANT IT TO PLAY WITH MY FRIENDS IN A MINECRAFT SERVER

are you on fabric because if so i can go ahead and port you a 1.19.4 version

@deadmeme8775 would you be able to port me a fabric 1.20.1 version, please?

@GrilledTaco https://github.com/Project-Alphaa/Improved-Animations/issues/12#issuecomment-1907517036

@deadmeme8775 Yo, do you still have the 1.19.4 version?

1.19.4 fabric PLEASE


Add attr_value support to shortcuts

Related discussion: https://github.com/ViewComponent/view_component/pull/677#issuecomment-817023300
NOTE: This is a quick & dirty test! It should be refactored and tested before opening a PR against upstream.
This creates an attr_value param for shortcuts. You can pass it a Proc that will be called when the tag is parsed.
Slim::Parser.options[:shortcut].update({
  '~' => { attr: "class", attr_value: ->(v) { "styles['#{v}']" } }
})

Then in your slim template you can do:
~text Lorem ipsum
/
Lorem ipsum

p~text.is-big LOREM IPSUM
/
LOREM IPSUM

Replaced by https://github.com/slim-template/slim/pull/903


[HOTFIX] increase interval and attempts - polling activations

List of Changes

refactoring in order to handle configuration in pipeline azure yml
update configuration for payment activations polling

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

JIRA TASK :IOPAY-469


Review design to dev delivery process that the workgroup has created

[x] Review Design Delivery process from the workgroup

[ ] Box folder

[ ] Identify crossover with component specs
[ ] Make suggestions for any additions we'd want for PAL component specs
[ ] Design Delivery doc will publish to C4IP website in L0 between Design kits and Contributing to IBM products with title 'Design Delivery' for this phase

John is currently working in VSCode building the 4 pages of content that will be called ‘Design Delivery’.  It will have subsections Overview; File preparation; Design review meeting; & Post delivery.  He has help to create and publish the PRs.  He said it should be all done this week, at the latest Monday.  It will live as guidance below ‘Design Kits’ in the current left nav at the same level of C4IP.
The original issue -> https://github.ibm.com/CDAI-design/pal/issues/1097

Design delivery has been published


API_GetGameExtended - The achievements object should return badgeURL

In order to save on multiple API requests per page, it would be beneficial to return the Achievement BadgeURL property on the Achievement object that is returned from the GameExtended endpoint.
Ideally API_GetGameInfoAndUserProgress would get this as well.
Is there a reason this is not included?

Now that I think about it, this issue may belong on the RAWeb repo.

Upon further inspection, BadgeURL can be created by doing something along the lines of /Badge/$(BadgeName).png

Yep, this would be something in RAWeb. We want to be sure in this library not to add any additional abstractions onto the native API calls, no matter how convenient they may be.


Error deploying java app to Elastic Beanstalk

When I executed pipeline I had a error with deploy java app:

I checked the beanstalk log (eb-engine.log) and I found this error:

These configuration was added in last commit https://github.com/aws-samples/devsecops-cicd/commit/d5e85bd1ea2edad6e5573c3bcbae9fd7ca2f84c1. It seems that "server_tokens" setting already exists in the initial NGINX setup in Beanstalk so there is no need to add this again. I removed this from custom.conf file in my project and this worked for me.

Were you able to resolve the issue ? I am facing the same issue.

Were you able to resolve the issue ? I am facing the same issue.

Yes. I did it.
Delete "server_tokens" line from your custom.conf file.


[Discussion] Compatibility on other micro-computers (non Raspberry Pi)

First of all hats-off for making this quality project OpenSource 👍
The main limitation I see in the Raspberry Pi is that it's only USB 2.0 compatible.
I've switched from Raspberry Pi to Odroid a few years ago and haven't looked back since. For example their model XU4 is quite powerful and only a bit more expensive. http://www.hardkernel.com/main/products/prdt_info.php
Do you think the processing speed would benefit from USB3.0 or is it not relevant (e.g. because the bottleneck is not the USB speed, but the processing speed)?
What would be required to install the project on an Odroid XU4 for example?

It should work pretty much out of the box if you install this module: https://github.com/CIRCL/PyCIRCLean
And the bash glue code in this repository (https://github.com/CIRCL/Circlean/tree/master/circlean_fs)


Variant: Rubics Go

Instead of placing a stone, a player may choose to rotate vertically or horizontally. To explain the mechanics of this, it will be easier to use a concrete example. If they choose to rotate vertically, they would choose a column and a number of rows to rotate by. Suppose they choose column C and 5 rows. Then all stones in column C and all the columns to the right of column C would be shifted down 5 rows. So a stone at D5 would move to D10. They loop around, so a stone at F18 would move to F4.
Ideally, the player would be able to use the arrow keys to view the results of a rotation as they consider their move, so they don't have to try to visualize the rotation in their head.

Seems like too much work for too few potential users to really consider.


Added hello-world app in NodeJS

Hi Shatakshi,
I have created pull request for hello world app. Please go through.
@psolarvi ,
Please take a look if you have time.
Thanks.

Hi Shatakshi,
I have created pull request for hello world app. Please go through.
@psolarvi , Please take a look if you have time.
Thanks.

Sure @somishraredhat

Hi @psolarvi ,
I added changes recommended by you. Please check and approve.
Thanks


Determine if connection coming in is SSL or not

How can I know at login time whether the user is coming in via a secure TLS connection or not? I would like to have access to this information in the on_login hook and know by user, by each connection doming in.
Thanks!

I know this is is from quite a while ago.. but...
@pyvotal-cguers I'm not sure if this will work, but there is a method you can call on the socket to get the version name.
self.socket.get_protocol_version_name()

This will return an Attribute Error if the user is connecting via clear text else it'll return the TLS version they are connecting by. I believe only TLS 1.2 is secure currently as known vulnerabilities have been found for the previous versions.

This was from a while ago, but I had not found a way of addressing it. I will give this a try. Thanks!!!

@pyvotal-cguers No problem. Let me know if it works for you.
Also, @giampaolo  mentioned to me that this is probably best going inside of the handle_ssl_established method. I am personally using it inside of a method called ftp_PASS myself.

Sorry for not replying to this but it totally slipped under my radar.
The safest way to check whether you're using a SSL connection is by checking the socket object instance. From anywhere withing the handler instance you just do:
from OpenSSL import SSL
isinstance(self.socket, SSL.Connection)


Min-hash at the category level

Problem Description
I have a column where each entry is a variable-length list or set.
for example, I have a table like:
user id, purchased product id

and I group by user_id. Thus I get for each user a list of all the products the user purchased. I want to extract features to describe that information.
One simple and potentially effective option is to use min-hash, but at the level of the entries in the list (ie in this case, each product id would get hashed and we would compute the min over all the product ids purchased by a user, for each hashing function) rather than character n-grams.
Feature Description
it could be built into the minhashencoder, where if the column values are arrow or python lists or arrays it switches to that behavior. it could also be built into the agg joiner somehow.
Alternative Solutions
No response
Additional Context
came up during euroscipy 2024 discussions

probably the easiest is to have a Hash (no min) transformer that hashes the full entry with several seeds, then this can be aggregated with the 'min' operation in the aggjoiner


neurom.iter_neurites should accept lists of trees

Currently neurom.iter_neurites can deal with individual neurite trees, neurons and neuron populations. It should be extended to deal with iterables of of neurite trees (e.g. lists or tuples.)

Fixed by #230.


Add LSP

There is now a Pkl LSP: https://github.com/apple/pkl-lsp
Fixes #8

Hi @jackkleeman! Thanks so much for creating this PR. It's fantastic that Pkl now has a pluggable LSP! Sorry for the delay in reviewing - I'll dive into the code and test it out this evening. I'll reach out with any thoughts or feedback.


Update the Helm chart to use latest stable version of anchore-engine

Is this a request for help?: NO

Is this a BUG REPORT or a FEATURE REQUEST? (choose one): FEATURE REQUEST
Version of Anchore Engine and Anchore CLI if applicable: N/A
What happened:
The Helm chart is still referencing Anchore 0.2.3, though version 0.2.4 is available for a few weeks.
What did you expect to happen:
The Helm chart should be updated with the latest stable version when it comes out

Hi @Karreg , thanks for filing this. We're working on an update and it should be released soon. If you want you can also set the image directly in invocation using: '--set image.tag=anchore/anchore-engine:v0.2.4' to try it out.
For bugs/issues with the chart itself, can you please file these in github.com/helm/charts so we can resolve them with PRs as things land? If you mention me in the issue I'll be sure to see it and you can track progress there.
Thanks!

Got it. I will create issues over there for the chart. Thanks!


Add support for registry without auth

Add support for a v1 registry without auth

Registries without auth can be utilized by leaving the docker login fields empty.


Prompt is rendering and causing warnings of history only supports one prompt

Version
5.1.2
Test Case
https://codesandbox.io/s/react-router-he65g
Steps to reproduce
The test case above isn't perfect as I tried to minimize what was needed to recreate. Here's the scenario:
I have a form that's in a modal. The form has multiple tabs, which cause a route change (each tab has a unique route). I have a Prompt in that component that checks to see if the form is dirty and hasn't been submitted and in order to keep the prompt from showing when browsing around in the tabs I use the function option on the message prop to provide logic to show the message only if the location is headed somewhere outside the form. This works well.
The challenge is that in some of the tabs there is the ability to add/edit items to a list. This adding happens in another modal, which itself has a Prompt in order to properly prompt the user if they leave the form. This prompt uses a simply when bool (if form is dirty and not submitted) but as soon as it becomes dirty AND if I've happened to make the top level form dirty as well I get a warning message that only one prompt is supported at a time.
The app functions as expected, only prompting if I attempt the close the form. However the warning is concerning and I wouldn't want to roll to production with it happening.
My provided test case doesn't show this exact scenario but instead shows a simplified version:

Click on about: No prompt is necessary due to function logic
Click on topics (a sub route of about): The top level prompt still shouldn't show as we're still in the context of about url, the Topics prompt also shouldn't show as we're now in topics, however we immediately get the warning of two prompts.
Click on about: I get prompted properly about leaving topics.

Expected Behavior
The bug, or my misunderstanding, lies in the fact that I have provided logic in my message prop that the prompt should not happen, thus I would expect that a warning shouldn't occur. I only have one active Prompt. I think it should not warn if the logic in my message function resolves to true and not an actual message.
My expectations are based on the fact that when I use the when prop I am able to achieve using nested Prompts in the way I describe above, however I'm unable to get access to the location (like I am inside the function option in the message prop). This means a potential solution is providing location in a function option for the when prop.
Actual Behavior
The warning of multiple prompts happens even if multiple prompts don't resolve to "prompting" per the message function.

You should be using the when prop to determine if the Prompt should be active or not.

That's the problem. The when prop doesn't have a way to check what location someone is trying to browse to so there is no way to use the when prop successfully for my scenario.


Provide Java 11 forward compatibility.

Prerequisite for #518.

Don't we want to bump java version to 11? It seems easy - in build.gradle:

sourceCompatibility = 11
targetCompatibility = 11

Then change the path of java in your execution environment to java 11. Also set the  environment variable JAVA_HOME to java 11.
Seems to work just out-of-the-box. Same with metafacture-fix, consuming the MF-core java 11 build.
What I've trouble with atm is to make it work with our play apps.

Sure, I'm all for it. That's just not what this pull request is doing.


Extend flip to allow option weights

Flip allows passing a list of options to pick from. Would be nice if weights could be provided as well. Welcome provides similar weighted picking functionality already through random.choice and random.choices.

Thanks @KarlKennerley


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 17:00:32 on 2023.04.27
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 1, errors out: 0
Original problem ID: 20109
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=20109

Problem has been resolved in 2m 57s at 17:03:29 on 2023.04.27
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 20109


Add missing Release support

Add missing Release support
https://docs.gitlab.com/ee/api/tags.html#create-a-new-release
example of usage:
$client->tags()->createRelease($projectId, urlencode($tagName), [      'description' => $description, ])
$client->tags()->updateRelease($projectId, urlencode($tagName), [       'description' => $description, ]);

Please add tests

Please add tests


Build failed Minimum supported Gradle version

D:\flutter\flortex_app>flutter build apk
Running "flutter pub get" in flortex_app...                         0.7s
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
WARNING: [Processor] Library 'C:\Users\vinoth.gradle\caches\modules-2\files-2.1\io.flutter\flutter_embedding_release\1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e\d16762b6784c6a5a7b5
da4ab52be9bd1ca53ba16\flutter_embedding_release-1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.jar' contains references to both AndroidX and old support library. This seems like the li
brary is partially migrated. Jetifier will try to rewrite the library anyway.
Example of androidX reference: 'androidx/annotation/NonNull'
Example of support library reference: 'android/support/annotation/NonNull'
Error: unable to find directory entry in pubspec.yaml: D:\flutter\flortex_app\assets\lottie
WARNING: [Processor] Library 'C:\Users\vinoth.gradle\caches\modules-2\files-2.1\io.flutter\flutter_embedding_debug\1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e\d766fe2feb740ead017d0
02eae7d82dd4f337a93\flutter_embedding_debug-1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.jar' contains references to both AndroidX and old support library. This seems like the librar
y is partially migrated. Jetifier will try to rewrite the library anyway.
Example of androidX reference: 'androidx/annotation/NonNull'
Example of support library reference: 'android/support/annotation/NonNull'
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for JetifyTransform: D:\flutter\flortex_app\build\app\intermediates\flutter\debug\libs.jar.
Transform's input file does not exist: D:\flutter\flortex_app\build\app\intermediates\flutter\debug\libs.jar. (See https://issuetracker.google.com/issues/158753935)

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1m 30s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      91.5s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin device_info...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done                    2.2s
FAILURE: Build failed with an exception.

Where:
Build file 'C:\flutter.pub-cache\hosted\pub.dartlang.org\device_info-1.0.0\android\build.gradle' line: 22

What went wrong:
A problem occurred evaluating root project 'device_info'.

Failed to apply plugin [id 'com.android.internal.version-check']
Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in C:\flutter.pub-cache\hosted\pub.dartlang.org
device_info-1.0.0\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.6.4-all.zip

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1s
The plugin device_info could not be built due to the issue above.

@basha97
can you please double-check that your app follows this

Checking

@iapicca
I checked androidx which you mentioned above.
now i am getting different error
D:\flutter\flortex_app>flutter build apk
Running "flutter pub get" in flortex_app...                         0.6s
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Error: unable to find directory entry in pubspec.yaml: D:\flutter\flortex_app\assets\lottie\
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for JetifyTransform: D:\flutter\flortex_app\build\app\intermediates\flutter\debug\libs.jar.
Transform's input file does not exist: D:\flutter\flortex_app\build\app\intermediates\flutter\debug\libs.jar. (See https://issuetracker.google.com/issues/158753935)

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 59s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      60.4s
Gradle task assembleRelease failed with exit code 1

@basha97
From your log, I see below:
Error: unable to find directory entry in pubspec.yaml: D:\flutter\flortex_app\assets\lottie\
It may be due to the way you have setup assets in your project. Double check if your assets implementation in pubspec.yaml is correct. Also check this similar issue and comment and see if it helps.

@darshankawar
the pubspec file issue is common and i had removed that folder.

@basha97
You seem to have open another duplicate issue, https://github.com/flutter/flutter/issues/72679 which has been closed based on your most latest comment in it.
I am going ahead and closing this based on that comment.


Update README to reflect unmaintained status

@github/js it looks like this repository is no longer being maintained. I'm going to make it explicit in the README.md and transfer the repository to @github-archive. Let me know if you have any reservations about that.

:+1:
This has been superseded by https://github.com/github/time-elements
I would also be OK with deleting the project entirely. It literally only has 2 commits and hasn't been maintained for 7 years. I don't think there's any legacy to archive here.


Userspace backend can't resolve DNS

When using the userspace backend, connections to IP addrs succeed as expected but using a domain name fails.
Repro steps:

IMAGE=kpng:test PULL=Never BACKEND=userspacelin ./kpng-local-up.sh
k run agnhost --image=gcr.io/kubernetes-e2e-test-images/agnhost:2.8
k create -f https://raw.githubusercontent.com/jayunit100/k8sprototypes/master/smoke-tests/nginx-pod-svc.yaml
k exec -it agnhost -- /bin/bash
Now from inside the pod, try connecting to the svc IP addr; this works:
nc -t -v -w 2 <IP_ADDRESS> 80
Now try connecting to it using the svc name; this doesn't work:
nc -t -v -w 2 nginx 80

/kind bug


Add logging libraries and basic debug logging

It's going to be a much bigger project to add logging to the linting flow, and should probably be paired with a modest refactor. Just introducing the libraries for now.
/cc @justinfagnani

LGTM


capture the maven artifacts created by a project

For projects that can do a successful clone, we can capture what artifacts are created. If we capture this, then we can create processes to clean up artifacts outside this project.
This can be done via command line like. We should put it into a standard maven format that matches dependency:tree or similar (below is an example, not the actual correct format)
mvn -q exec:exec -Dexec.executable='echo' -Dexec.args='${project.groupId} ${project.artifactId} ${project.version} ${project.packaging}'

I'm finding the maven commands a bit slow.
Another option might be to write our own plugin or put in a PR for the build helper or "help" plugins.
A quick work around is to parse the dependency tree file and look for artifacts that do not have a scope.
e.g.
find . -type f -name tree.txt  -exec grep -v -e "compile$" -e "provided$" -e "test$" {} \;

I made a change that captures the top level GAV's as part of the json report. This will allow us to tie a deployment (and dates) to the actual versions.


[SPARK-49583][SQL] Define the error sub-condition SECONDS_FRACTION for invalid seconds fraction pattern

What changes were proposed in this pull request?
In the PR, I propose new sub-condition SECONDS_FRACTION of the error condition INVALID_DATETIME_PATTERN in case when datetime pattern doesn't contain proper seconds fraction of variable length.
Why are the changes needed?
To fix the failure on internal assert. This change should improve user experience with Spark SQL.
Before the changes, Spark fails while parsing the datetime patterns like \nSSSS\r:
java.lang.AssertionError: assertion failed
	at scala.Predef$.assert(Predef.scala:264)
	at org.apache.spark.ErrorClassesJsonReader.getMessageTemplate(ErrorClassesJSONReader.scala:91)
	at org.apache.spark.ErrorClassesJsonReader.getErrorMessage(ErrorClassesJSONReader.scala:46)

Does this PR introduce any user-facing change?
Should not. Only if user's code depends on the format of error message.
After changes, users get the error:
org.apache.spark.SparkIllegalArgumentException: [INVALID_DATETIME_PATTERN.SECONDS_FRACTION] Unrecognized datetime pattern:
. Cannot detect a seconds fraction pattern of variable length. Please make sure the pattern contains 'S', and does not contain illegal characters. SQLSTATE: 22007

How was this patch tested?
By running new test suites:
$ build/sbt "test:testOnly *org.apache.spark.sql.catalyst.util.DateTimeFormatterHelperSuite"

Was this patch authored or co-authored using generative AI tooling?
No.

Merging to master. Thank you, @cloud-fan for review.


help: ComponentHarness - How to wait for a certain number of elements to exist

I am making use of ComponentHarness from @angular/cdk/testing and have a scenario in my protractor test suite where I need to wait for a number of elements to become visible.
I have a custom list component which displays a bunch of custom card components and contains a filter input for searching on these.
e.g.
My component harnesses are setup like so:
import { ComponentHarness, TestElement } from '@angular/cdk/testing';
import { browser } from 'protractor';

export class AcCardListHarness extends ComponentHarness {
    static hostSelector = 'ac-cardlist';

    getCardstackList = this.locatorFor('.ac-card-list .ac-list');
    getCardstackListItems = this.locatorForAll(AcBaseCardHarness);
    getCardstackSearchInput = this.locatorFor('.ac-search-input');

    async performTextFilter(searchTerm: string) {
        const input = await this.getCardstackSearchInput();
        return input.sendKeys(searchTerm);
    }

    async getCardStackListItem(index: number) {
        const items = await this.getCardstackListItems();
        return items[index];
    }

    public waitForPresenceOfNumberOfElements(elements: Promise<TestElement[]|ComponentHarness[]>, numberOfElements: number) {
        return browser.wait(async() => {
            const items = await elements;
            return items.length === numberOfElements;
        }, 60000, `Could not find exactly ${numberOfElements} elements on the page.`);
    }
}

export class AcBaseCardHarness extends ComponentHarness {
    static hostSelector = 'ac-basecard';
}

I am able to use these in my protractor test suite perfectly fine, apart from the waitForPresenceOfNumberOfElements method, which is meant to resolve when a specified number of elements for an array of TestElement or ComponentHarness instances are found.
The idea is that I am wanting to perform some filtering during my test and wait for the filter operation to complete in my component by checking the number of items that are displayed after calling the performTextFilter function in the AcCardListHarness.
it('should be able to find the item in the list view', async() => {
    harness = await harnessLoader.getHarness(AlCardstackHarness);
    await harness.performTextFilter('<serach_term_here>');
    await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1);
    const items = await harness.getCardstackListItems();
    expect(items.length).toEqual(1);
});

During the test run, I can see the text filter being interacted with and can see the list component (ac-cardlist) correctly filtering down to the number of items I expect to see (1), but the call to await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1); in my test spec never resolves, it just times out with my default error message in the browser.wait().
Before using ComponentHarness, I was using regular Protractor page objects and was using this helper method with ElementArrayFinder instances and works fine for me in that setup.
public static waitForPresenceOfNumberOfElements(elementArrayFinder: ElementArrayFinder, numberOfElements: number) {
        return browser.wait(() => {
            return elementArrayFinder.count().then((actualCount) => {
            return actualCount === numberOfElements;
            });
        }, 60000, `Could not find exactly ${numberOfElements} elements on the page`);
    }

What am I missing to get this same behaviour working with the ComponentHarness approach?

👌
Отправлено с iPhone

14 янв. 2021 г., в 03:58, Rob Parker<EMAIL_ADDRESS>написал(а):

I am making use of ComponentHarness from @angular/cdk/testing and have a scenario in my protractor test suite where I need to wait for a number of elements to become visible.
I have a custom list component which displays a bunch of custom card components and contains a filter input for searching on these.
e.g.
My component harnesses are setup like so:
import { ComponentHarness, TestElement } from '@angular/cdk/testing';
import { browser } from 'protractor';
export class AcCardListHarness extends ComponentHarness {
static hostSelector = 'ac-cardlist';
getCardstackList = this.locatorFor('.ac-card-list .ac-list');
getCardstackListItems = this.locatorForAll(AcBaseCardHarness);
getCardstackSearchInput = this.locatorFor('.ac-search-input');

async performTextFilter(searchTerm: string) {
    const input = await this.getCardstackSearchInput();
    return input.sendKeys(searchTerm);
}

async getCardStackListItem(index: number) {
    const items = await this.getCardstackListItems();
    return items[index];
}

public waitForPresenceOfNumberOfElements(elements: Promise<TestElement[]|ComponentHarness[]>, numberOfElements: number) {
    return browser.wait(async() => {
        const items = await elements;
        return items.length === numberOfElements;
    }, 60000, `Could not find exactly ${numberOfElements} elements on the page.`);
}

}
export class AcBaseCardHarness extends ComponentHarness {
static hostSelector = 'ac-basecard';
}
I am able to use these in my protractor test suite perfectly fine, apart from the waitForPresenceOfNumberOfElements method, which is meant to resolve when a specified number of elements for an array of TestElement or ComponentHarness instances are found.
The idea is that I am wanting to perform some filtering during my test and wait for the filter operation to complete in my component by checking the number of items that are displayed after calling the performTextFilter function in the AcCardListHarness.
it('should be able to find the item in the list view', async() => {
harness = await harnessLoader.getHarness(AlCardstackHarness);
await harness.performTextFilter('<serach_term_here>');
await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1);
const items = await harness.getCardstackListItems();
expect(items.length).toEqual(1);
});
During the test run, I can see the text filter being interacted with and can see the list component (ac-cardlist) correctly filtering down to the number of items I expect to see (1), but the call to await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1); in my test spec never resolves, it just times out with my default error message in the browser.wait().
Before using ComponentHarness, I was using regular Protractor page objects and was using this helper method with ElementArrayFinder instances and works fine for me in that setup.
public static waitForPresenceOfNumberOfElements(elementArrayFinder: ElementArrayFinder, numberOfElements: number) {
return browser.wait(() => {
return elementArrayFinder.count().then((actualCount) => {
return actualCount === numberOfElements;
});
}, 60000, Could not find exactly ${numberOfElements} elements on the page);
}
What am I missing to get this same behaviour working with the ComponentHarness approach?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

👌
Отправлено с iPhone

14 янв. 2021 г., в 03:58, Rob Parker<EMAIL_ADDRESS>написал(а):

I am making use of ComponentHarness from @angular/cdk/testing and have a scenario in my protractor test suite where I need to wait for a number of elements to become visible.
I have a custom list component which displays a bunch of custom card components and contains a filter input for searching on these.
e.g.
My component harnesses are setup like so:
import { ComponentHarness, TestElement } from '@angular/cdk/testing';
import { browser } from 'protractor';
export class AcCardListHarness extends ComponentHarness {
static hostSelector = 'ac-cardlist';
getCardstackList = this.locatorFor('.ac-card-list .ac-list');
getCardstackListItems = this.locatorForAll(AcBaseCardHarness);
getCardstackSearchInput = this.locatorFor('.ac-search-input');

async performTextFilter(searchTerm: string) {
    const input = await this.getCardstackSearchInput();
    return input.sendKeys(searchTerm);
}

async getCardStackListItem(index: number) {
    const items = await this.getCardstackListItems();
    return items[index];
}

public waitForPresenceOfNumberOfElements(elements: Promise<TestElement[]|ComponentHarness[]>, numberOfElements: number) {
    return browser.wait(async() => {
        const items = await elements;
        return items.length === numberOfElements;
    }, 60000, `Could not find exactly ${numberOfElements} elements on the page.`);
}

}
export class AcBaseCardHarness extends ComponentHarness {
static hostSelector = 'ac-basecard';
}
I am able to use these in my protractor test suite perfectly fine, apart from the waitForPresenceOfNumberOfElements method, which is meant to resolve when a specified number of elements for an array of TestElement or ComponentHarness instances are found.
The idea is that I am wanting to perform some filtering during my test and wait for the filter operation to complete in my component by checking the number of items that are displayed after calling the performTextFilter function in the AcCardListHarness.
it('should be able to find the item in the list view', async() => {
harness = await harnessLoader.getHarness(AlCardstackHarness);
await harness.performTextFilter('<serach_term_here>');
await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1);
const items = await harness.getCardstackListItems();
expect(items.length).toEqual(1);
});
During the test run, I can see the text filter being interacted with and can see the list component (ac-cardlist) correctly filtering down to the number of items I expect to see (1), but the call to await harness.waitForPresenceOfNumberOfElements(harness.getCardstackListItems(), 1); in my test spec never resolves, it just times out with my default error message in the browser.wait().
Before using ComponentHarness, I was using regular Protractor page objects and was using this helper method with ElementArrayFinder instances and works fine for me in that setup.
public static waitForPresenceOfNumberOfElements(elementArrayFinder: ElementArrayFinder, numberOfElements: number) {
return browser.wait(() => {
return elementArrayFinder.count().then((actualCount) => {
return actualCount === numberOfElements;
});
}, 60000, Could not find exactly ${numberOfElements} elements on the page);
}
What am I missing to get this same behaviour working with the ComponentHarness approach?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

We don't currently have the ability to wait for a number of elements to be in the DOM, because test harnesses are meant to be reused between unit tests and e2e tests and the DOM doesn't have an API similar to Protractor's browser.wait. We could probably simulate it by polling the DOM at particular intervals, but I'll leave it up to @mmalerba to determine whether it's a feature we'd want to implement.

We don't currently have the ability to wait for a number of elements to be in the DOM, because test harnesses are meant to be reused between unit tests and e2e tests and the DOM doesn't have an API similar to Protractor's browser.wait. We could probably simulate it by polling the DOM at particular intervals, but I'll leave it up to @mmalerba to determine whether it's a feature we'd want to implement.


This image is not available

git:main >> docker pull cimg/redis
Using default tag: latest
Error response from daemon: manifest for cimg/redis:latest not found: manifest unknown: manifest unknown

All docs point to this image being available but it's not.

@ahawkins Hi, we do not publish latest tags for any of the new cimg images. You will need specify a version to pull. The list of tags can be found on Dockerhub (these will be included in the CircleCI Developer Hub once the image reaches RC status)
https://hub.docker.com/r/cimg/redis/tags

I'll close this issue out, but feel free to re-open it if you have any issues pulling the tags listed in Dockerhub. Thanks!


Node ReferenceError: navigator is not defined

I'm running this code and it throws "ReferenceError: navigator is not defined"
var WebMidi = require('webmidi')
WebMidi.enable(function (err) {

  if (err) {
    console.log("WebMidi could not be enabled.", err);
  } else {
    console.log("WebMidi enabled!");
  }

});

@jahtalab Are you running the code in NodeJS? navigator should exist in the browser. I think this library is only available in Chrome (Chrome 43/Opera).

If you install the jazz-midi Node module in your project, it is supposed to work. I have not tested it, though. Let me know if it works for you.

Thanks for your reply, @jasonpang , @cotejp .
I'm running Node.js version 6.
I have installed web-midi-api. but it still throws that error. Do I have to do something for the library to use web-midi-api or does it automatically detect it.
dependencies:
  "dependencies": {
    "jazz-midi": "^1.5.3",
    "web-midi-api": "^1.4.4",
    "webmidi": "^2.0.0-rc.5"
  }

here is the code that I'm running:
require('jazz-midi')
require('web-midi-api')

var WebMidi = require('webmidi')
WebMidi.enable(function (err) {
  if (err) {
    console.log('WebMidi could not be enabled.', err)
  } else {
    console.log('WebMidi enabled!')
  }
})

Hey @jahtalab,
Can you try changing the second line to:
var navigator = require('web-midi-api');
Does that end up working for you?

I took a little time today to check it out. In WebMidi.js' current state, it should have been possible to plug the navigator object in the global namespace and make it work (global.navigator = require('web-midi-api');). However, it doesn't work.
The problem may be with the web-midi-api module (@jazz-soft). In Node v7.8.0, this module currently spits out an endless stream of weird messages to the console:
ref = 0x102501c60       1
ref = 0x102501c60       1
ref = 0x102501c60       1
ref = 0x102501c60       1
ref = 0x102501c60       1
ref = 0x102501c60       1

I don't have time to investigate further right now. I'll get back to you as soon as possible.

I filed issue #66 with the WebMIDIAPIShim team. Let's wait for their feedback.

It seems the issue in the jazz-midi module has been fixed. Can you install the latest version of the module and try it out @jahtalab ?
global.navigator = require('web-midi-api');
I'll give it a try myself as soon as I have a little time. By the way, which OS are you on ?

I made some progress. The code below will let you list input and output devices. It will also let you add listeners on inputs.
This is more of a proof-of-concept than anything else. Do not use WebMidi.js + Node in production!
// The `web-midi-api` module takes care of importing the `jazz-midi` module (which needs to be
// installed) and the WebMIDIAPI shim (which is already part of `web-midi-api`).
global.navigator = require('web-midi-api');

// WebMidi.js depends on the browser's performance.now() so we fake it with the `performance-now`
// Node module (which is installed as a dependency of `web-midi-api`).
if (!global.performance) global.performance = { now: require('performance-now') };

// To use WebMidi.js, you then simply need to require it.
var WebMidi = new require('webmidi');

// Usual stuff
WebMidi.enable(function (err) {

  if (err) return console.log("WebMidi could not be enabled.", err);
  console.log("WebMidi enabled!");

  console.log("*** Inputs:");

  WebMidi.inputs.forEach((o) => {
    console.log(o.name)

    o.addListener('noteon',  "all", (event) => {
      console.log(event.note)
    });

  });

  console.log("*** Outputs:");

  WebMidi.outputs.forEach( (o) => {
    console.log(o.name);
    // o.playNote("G3") // Does not work?!
  });

});

To use this code, you will need release 2.0.0-rc.7 of WebMidi.js which includes a tiny but important change.

This is great! Seems like I've got it working OK using the latest webmidi.js (2.0.4) on macOS High Sierra and Raspberry Pi. So far the only weirdness I've run into is that when I'm running Max/MSP on my Mac at the same time as the node app, I get the error "Segmentation fault: 11" on WebMidi.enable(). It works fine (well...most of the time...I do actually get that error every once in a while even without Max, but not too often) with my iConnectMIDI4+ (Mac and Pi) and Focusrite Scarlett 18i16 (only tried that on Mac), but whenever I try to run the Node app when Max is open it poops out. I tried disabling the MIDI ports (to/from Max 1/2) from within Max, but that didn't help. Note that the same thing happens if I just run a Node app with just the web-midi-api library, without webmidi.js, so the conflict lies there somewhere. Anyone have any ideas?
Thanks for this!

Note that the same thing happens if I just run a Node app with just the web-midi-api library, without webmidi.js, so the conflict lies there somewhere. Anyone have any ideas?

In this case, I guess you should contact JazzSoft to see if they can help you out.

Yeah, just trying to cast a wide net in hopes that someone else has seen it. Speaking of thing not directly related to webmidi.js - I too observe the high CPU usage on macOS (High Sierra) of MIDIserver that @belm0 reported. It's >60% with all my external interfaces (approximately a zillion ports), and >30% with no external MIDI devices connected. This too, however, seems to be related to web-midi-api library.

I'm closing this but I added a reference to it in the Enhancements section of the wiki.


Add repeat pydantic model

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 81.14%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2306

Relevant Lines:
2842

💛  - Coveralls


Fix ExecCommandWith for cmd.exe in Windows

Close #1018
Run the command as is in cmd.exe with no parsing and escaping.
Explicity set cmd.SysProcAttr so execCommand does not escape the command.
Technically, the command should be escaped with ^ for special characters, including ".
This allows cmd.exe commands to be chained together.
See https://github.com/neovim/neovim/pull/7343#issuecomment-333350201
However, this requires a new shellescape function that is specific to one of the following:

interactive prompt
batchfile
command name

fzf#shellescape in the Vim plugin can handle only the batchfile.

Thanks. First off, let's make it clear that fzf is a command-line program that can be used with or without Vim (many users of fzf do not even use Vim) and there is no way we can enforce anything on bind/preview expression users specify. The specifics of fzf#shellecape should be out of the discussion here.
Having said that, I have a few comments.

I see that you use "%s", so what happens if the command contains "s? Is it really okay? I'm specifically asking about this because placeholder expression {}  is currently replaced to double-quote string of the current line on Windows; see https://github.com/junegunn/fzf/blob/0.17.0/src/terminal.go#L1111-L1116
Should we create a temporary batch file inside Go code instead if we eventually can't avoid non-trivial escaping of the command?

I mentioned fzf#shellescape because it is tested already in Windows and I'm interested in the internal s:shellesc_cmd. I like to rewrite s:shellesc_cmd in Go such that it works for the interactive prompt but I'm haven't gotten to Go regex yet. What users specify is mostly what they get because I don't know how to escape all the backslashes.
As for your questions,

It's okay to have multiple, uneven " as long as it works in the interactive prompt. Problem is how cmd.exe parses a command in the prompt. From previous experience, double-quoting works only if there are no nested double quotes and the last character is not a backslash. What's actually required is a double escape, one for each token and another for the entire command when passing to cmd.exe.
Idea is to make it similar to sh -c 'user_command'.
Instead, it will be cmd.exe /s /c ^"escaped_user_command^"
Yes, but I don't think we'll get there yet. Unlike Vim, this is your project so we can adjust the escape code as we go.

What is "interactive prompt"?

I see what you mean now for the double-quoted string for the placeholder.
The entire command can break if there's another double quote after the placeholder.
This is a problem for piping and redirection if the placeholder is not the last token in the preview command.

Is there anything else that the placeholder string needs to be escaped correctly?

Is strings.replace in quoteEntry for shellwords.Parse? I thought strconv.Quote handled this already for " and \.

I kept strconv.Quote for convenience in quoteEntry but it should explicitly escape the placeholder now in a cmd.exe session.

I thought strconv.Quote handled this already for " and .

I think you're right. Also, it seems that it was a mistake to use strconv.Quote as it does more than just quoting the string.
According to https://golang.org/pkg/strconv/#Quote

The returned string uses Go escape sequences (\t, \n, \xFF, \u0100) for control characters and non-printable characters

I don't think we want this behavior in this context.

What about parsing FZF_DEFAULT_OPTS? https://github.com/junegunn/fzf/blob/f3177305d5572b26f135fc045481358b4eb1bf69/src/options.go#L270

What about it? I don't see how it's related to the current discussion.

The parser is incompatible with cmd.exe or powershell.exe for non-trivial parsing so the user must set it to work on sh.

Anyway, I can escape now in FZF_DEFAULT_COMMAND for cmd.exe. I couldn't customize it well for rg, sift, or powershell because of shellwords.Parse.

If there's no issues with the changes, then I will update the docs for --preview and FZF_DEFAULT_COMMAND.

The parser is incompatible with cmd.exe or powershell.exe for non-trivial parsing so the user must set it to work on sh.

Yes, I'd like to leave this as an open issue, since 1. I believe it's rare to have non-trivial options in $FZF_DEFAULT_OPTS, 2. and it's easy to come up with a sh-compatible version of it.

then I will update the docs for --preview and FZF_DEFAULT_COMMAND

What needs to be mentioned?

What needs to be mentioned?

The user has to do the escaping themselves because fzf will run their command as is on cmd.exe, not SHELL. Updating the README is enough but fzf --help could mention it in Windows.

The user has to do the escaping themselves

Can you give an example where escaping is needed?

their command as is on cmd.exe, not SHELL

Umm, is SHELL actually used on Windows? I didn't expect Windows users would think that fzf would ever use $SHELL.

Can you give an example where escaping is needed?

prompt (https://github.com/junegunn/fzf/pull/916#issuecomment-302292067)
FZF_DEFAULT_COMMAND for relative paths https://github.com/junegunn/fzf/wiki/Windows#relative-filepaths

if the command contains cmd.exe's FOR command, the user must escape it, especially for delayed variable expansion with !ENV_VAR! syntax (https://ss64.com/nt/delayedexpansion.html)

nested sh or powershell because each shell have their own escaping rules

scripting in powershell is disabled by default so users will likely call powershell from command line
sh has escape issues with nested double quotes

Format specifiers using % (https://github.com/junegunn/vim-plug/pull/681, GFiles?) because of %ENV_VAR%.
any commands that has 2+ doubles quotes because of cmd.exe dequoting

Umm, is SHELL actually used on Windows?

fzf unsets TERM to run in sh (aliased to bash). SHELL is set to /usr/bin/bash.

Thanks for the comment. But I was also curious how a command would look like after manual escaping. So the commands shown in https://github.com/junegunn/fzf/wiki/Windows#relative-filepaths will have to change?

fzf unsets TERM to run in sh (aliased to bash). SHELL is set to /usr/bin/bash.

This is the point I don't understand. /usr/bin/bash is not a valid path on Windows, is it? Is SHELL a thing on Windows?

Are we discussing Cygwin environment?

So the commands shown in https://github.com/junegunn/fzf/wiki/Windows#relative-filepaths will have to change?

For cmd.exe only for consistency with this PR (ie. add /s flag and wrap the command with double quotes)
The rest have little/no escaping so they're unaffected.

Is SHELL a thing on Windows?

No, COMSPEC (or ComSpec) is but its value is almost always the absolute path of cmd.exe.

Are we discussing Cygwin environment?

For SHELL or running fzf on sh or bash.

/usr/bin/bash is not a valid path on Windows, is it?

By default, no.
Forward slash is supported and the network drive is optional for paths within the current network drive.
If the user made a directory C:\usr\bin\, then cd /usr/bin is allowed.

Thanks for the clarification and for being patient with me. So for the users running fzf on cmd.exe, there's no confusion, but Cygwin or bash users should be aware that SHELL is not used by fzf and FZF_DEFAULT_COMMAND should be written for cmd.exe.
You can briefly mention this on the README page or we can just add a link to the Windows wiki page.

We can update the Windows wiki page and then add a link in the README and Cygwin wiki page to consolidate the explanation for why SHELL is ignored and how FZF_DEFAULT_COMMAND should be set.
I don't mind doing more work to clarify the changes introduced.

On second thought, !abc! must be escaped as ^!abc^!. The Vim plugin needs the update as well.
Test case is a prompt asking a user to define their prompt as follows:
cmd /v:ON /s /c "set /p my_prompt= & fzf --prompt !my_prompt!"

We should probably add terminal_test.go and implement test cases for the Windows version of quoteEntry.

Will it run on Travis? I thought util.IsWindows is defined on compile time in src/util/util_windows.go

util.IsWindows returns a static value, but we can extract the block as quoteEntryCmd and test it separately.
if util.IsWindows() {
  return quoteEntryCmd(entry)
}
return ...

Can you add a few test cases?

I can add unescaped commands from https://github.com/junegunn/fzf/wiki/Windows#relative-filepaths,  some shell commands I used in https://github.com/neovim/neovim/pull/7343, and basic statements in batchfiles and powershell scripts.
It helps if I can isolate these test cases into file so I can test with go run quote_test.go.
This is what I have on one file to test quoteEntry
package main

import (
	"fmt"
	"os/exec"
	"syscall"
	"strings"
	// "strconv"
	"regexp"
)

func main() {
	tests := [...]string{
		"\"",
		"\\",
		"\\\"",
		"\"\\\\\\\"",
		"&|<>()@^%!",
		"%USERPROFILE%",
		"C:\\Program Files (x86)\\",
	}

	for _, v := range tests {
		escaped := Escape(v)
		out, _ := ExecCommandWith("echo " + escaped).Output()
		out2, _ := ExecCommandWith("\"echo\" " + escaped).Output()
		fmt.Printf("%s\n%s\n%s%s\n", v, escaped, out, out2)
	}
}

func Escape(entry string) string {
	escaped := strings.Replace(entry, `\`, `\\`, -1)
	escaped = `"` + strings.Replace(escaped, `"`, `\"`, -1) + `"`
	r, _ := regexp.Compile(`[&|<>()@^%!"]`)
	return r.ReplaceAllStringFunc(escaped, func (match string) string {
		return "^" + match
	})
}

func ExecCommandWith(command string) *exec.Cmd {
	cmd := exec.Command("cmd")
	cmd.SysProcAttr = &syscall.SysProcAttr{
	    HideWindow: false,
	    CmdLine: fmt.Sprintf(` /s /c "%s"`, command),
	    CreationFlags: 0,
	}
	return cmd
}

Functional test cases for quoteEntry should suffice for now.
diff --git a/src/terminal.go b/src/terminal.go
index 1890a2a..98d837c 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -1103,14 +1103,18 @@ func keyMatch(key int, event tui.Event) bool {
 		event.Type == tui.Mouse && key == tui.DoubleClick && event.MouseEvent.Double
 }

+func quoteEntryCmd(entry string) string {
+	escaped := strings.Replace(entry, `\`, `\\`, -1)
+	escaped = `"` + strings.Replace(escaped, `"`, `\"`, -1) + `"`
+	r, _ := regexp.Compile(`[&|<>()@^%!"]`)
+	return r.ReplaceAllStringFunc(escaped, func(match string) string {
+		return "^" + match
+	})
+}
+
 func quoteEntry(entry string) string {
 	if util.IsWindows() {
-		escaped := strings.Replace(entry, `\`, `\\`, -1)
-		escaped = `"` + strings.Replace(escaped, `"`, `\"`, -1) + `"`
-		r, _ := regexp.Compile(`[&|<>()@^%!"]`)
-		return r.ReplaceAllStringFunc(escaped, func (match string) string {
-		    return "^" + match
-		})
+		return quoteEntryCmd(entry)
 	}
 	return "'" + strings.Replace(entry, "'", "'\\''", -1) + "'"
 }
diff --git a/src/terminal_test.go b/src/terminal_test.go
index d42d2b8..60f2b1a 100644
--- a/src/terminal_test.go
+++ b/src/terminal_test.go
@@ -91,3 +91,22 @@ func TestReplacePlaceholder(t *testing.T) {
 	result = replacePlaceholder("echo {}/{1}/{3}/{2..3}", true, Delimiter{regex: regex}, false, "query", items1)
 	check("echo '  foo'\\''bar baz'/'f'/'r b'/''\\''bar b'")
 }
+
+func TestQuoteEntryCmd(t *testing.T) {
+	tests := map[string]string{
+		`"`:                       `^"\^"^"`,
+		`\`:                       `^"\\^"`,
+		`\"`:                      `^"\\\^"^"`,
+		`"\\\"`:                   `^"\^"\\\\\\\^"^"`,
+		`&|<>()@^%!`:              `^"^&^|^<^>^(^)^@^^^%^!^"`,
+		`%USERPROFILE%`:           `^"^%USERPROFILE^%^"`,
+		`C:\Program Files (x86)\`: `^"C:\\Program Files ^(x86^)\\^"`,
+	}
+
+	for input, expected := range tests {
+		escaped := quoteEntryCmd(input)
+		if escaped != expected {
+			t.Errorf("Input: %s, expected: %s, actual %s", input, expected, escaped)
+		}
+	}
+}

Closed by c4185e8. I added the test cases to your commits and pushed to master. Let me know if there's anything else you want to address. Thanks!

I will send another PR to add more test cases from the wiki to the map. I was busy this week so I didn't have time to include your changes myself so thanks for closing this with your changes.
@junegunn can you update the README or wiki for me to mention SHELL issue for Bash/Cygwin users so they can set FZF_DEFAULT_COMMAND accordingly?

No hurries. I already did update the wiki page, so please take a look.
https://github.com/junegunn/fzf/wiki/Windows
I'll also add a link to the page on the README page.

That's fine. Thanks you.