Move testHook to its own pacakge

It seems to be causing a lot of confusion for people and we definitely don't want application developers using it to "unit test" their hooks. Putting it into another package would make it easier for us to call out its true purpose and reduce the chance of misuse.
Thoughts?

I'm all for this
https://twitter.com/donavon/status/1096061809499561984
react-hooks-testing-library?

You make it, and I'll make this happen

Yeah 🤸

I have some family obligations today, but will get on this as soon as I can. But go out and grab the npm name

Um... https://www.npmjs.com/package/react-hooks-testing-library

Oh cool! Could you give it a look and open an issue for anything that's lacking/different and see if the maintainer is interested in doing/accepting what we need?

Putting it into another package would make it easier for us to call out its true purpose and reduce the chance of misuse.

Well, we also pulled a Webpack and released with no docs. I think this is pretty prominently explained in the docs PR for testHook: https://github.com/alexkrolick/testing-library-docs/pull/32
The linked package seems pretty close in API.

Hey, author of react-hooks-testing-library here.
I started out with a "what would react-testing-library do" mentality so I'm not surprised that API is pretty close.
As I said in the other issue, it started out as a proof-of-concept from my perspective and I only updated it recently to match the stable hooks API in case anyone was actually using it.  I've had a few thoughts on how the API could be improved, but nothing nailed down.  I'm more than happy to accept PRs bringing it inline with any features offered by testHook (at a quick glance it's pretty much on par), or even for large breaking changes.

Just wanted to let you all know that I have published a testHook compatible version of react-hooks-testing-library (v0.3.2 is the current version in NPM).

Awesome. I think we're ready to make this happen. Anyone want to make the PR too remove testHook?

I can handle this. :)

:tada: This issue has been resolved in version 6.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

Oh wow, that was fast. Just a couple of days I was contributing to testHook and now it's gone elsewhere 😮
Can someone please enlighten me why it happened? Yes, I see the tweet and I still don't get it :)
When someone puts an effort into separating logic into a custom hook, I don't see why it should be bad being able to test it. It has a name and a clear purpose.
I am kinda sad there wasn't more discussion about this.

It has a name and a clear purpose.

You may think that its purpose is clear, but in the few days it existed we already saw people mistreating it. Custom hooks are implementation details 95% of the time.
It's not all that hard for library authors to install react-hook-testing-library.

It's not all that hard for library authors to install react-hook-testing-library.

I know it's not hard. And that's why I am wondering how will that stop the actual "mistreat" of hooks? :) Feels like you have just dropped a slight detour on the road, but the destination is still the same ;)

Trust me, the detour is enough.

Well, sure, trust is a nice thing :) But for me, I am going to install that detour to the app (not library) and just use it because it's helpful. I don't think it's correct to say, that all hooks are an implementation detail. I have plenty of hooks that are reusable just within the app code.

not found
package 'react-hook-testing-library' not found
https://www.npmjs.com/package/react-hook-testing-library

@smmoosavi  It was just a missing 's'.
https://www.npmjs.com/package/react-hooks-testing-library

Same mistake in release page
https://github.com/kentcdodds/react-testing-library/releases/tag/v6.0.0

Btw, how will library authors find out about that package? Is it going to be in the docs? I don't expect people studying release notes :) However, in that case, how is it going to prevent the claimed misuse by other people? If it's not going to be anywhere, library authors will just stitch together some custom solution.
I don't know, it's a strangely controversial decision. Instead of teaching people how to do things properly we try to hide things from them and hope for the best. No, I don't see it, really.

@FredyC I'd hope we coule move these WIP docs and examples onto an ecosystem page like user-event and jest-dom:
https://github.com/alexkrolick/testing-library-docs/pull/32
cc @mpeyper

@alexkrolick Ok sure, but I am still kinda missing a whole reason why this was done. If it's going to be documented in official docs, how is that going to prevent anyone from abusing it? The focus should be really on teaching correct patterns and not moving things around just to make it interesting 😄
@kentcdodds It's like it's going to get reverted, I get that. I just kinda want to learn how hiding, but not really hiding things can achieve smarter tests 🤔

It's all got to do with inertia. when doing the wrong thing is really easy then more people do the wrong thing. But when it takes even a little bit extra effort to do the wrong thing then the only people willing to put forth the effort are the people who actually are doing it because it's the right thing to do.

I see, thanks. Although in this case, it feels like that much bigger inertia comes with testing hooks without any utility than installing an extra package 😎

@donavon When you get a chance, you should update your blog post Intro to React Hooks to reflect this move.

Is it possible to move react-hooks-testing-library under the @testing-library scope? I think it would be more appealing and discoverable.

There's an open issue on that repo to do this. I want it 👍

@kentcdodds I'm all for moving react-hooks-testing-library to @testing-library/react-hooks 👍
How do we make this happen?  I'm assuming this means moving the repo from mpeyper to the testing-library org, renaming the package and publishing it to the @testing-library npm scope, but I'm unsure how permissions and things work for all these things as I've never not owned the orgs/scopes myself for my libraries before.

Hey @mpeyper! That's great! I'll get you all the permissions set up. You'll need to accept the invitations which will be sent to you shortly.
If it's helpful, you can watch me do this for react,dom,cypress-testing-library on the video linked here: https://github.com/testing-library/dom-testing-library/issues/260#issuecomment-497407055
Thanks!

I thought this issue existed already, but it didn't. I apologize for not send you this earlier. Good luck! https://github.com/mpeyper/react-hooks-testing-library/issues/99


Update dependencies for tz-offset

There's<EMAIL_ADDRESS>available but dependencies section in package.json is not updated yet.

yes, i think should change to moment timezone. It has many options for you to choose from there.

moving to moment-timezone #248


feat(page): add quiz hub page

Adds in the Quiz hub page with minor refactoring.
Also updates the logic for the quiz widget.
Currently does not include:

Accounting for added quizzes or questions
bundling QuizWidget, QuizzesStats, and QuizzesList into a reusable component QuizManager

@pettinarip per private conversation, I've set this ready for review, but does not include reusable QuizManager component nor accounting for adding a quiz or question to the data within local storage.

Awesome @TylerAPfledderer, thanks! I'll review this soon, probably tomorrow.

@pettinarip per private conversation, I've set this ready for review, but does not include reusable QuizManager component nor accounting for adding a quiz or question to the data within local storage.

Just to clarify, you would like to do those things in a separate PR or in this PR?

@pettinarip for the time constraint in getting this migration over the line, I believe these modifications do need to be in a separate PR.

@pettinarip for the time constraint in getting this migration over the line, I believe these modifications do need to be in a separate PR.

Makes sense, thanks.

@TylerAPfledderer patched the translations and updated the branch.
I think the only thing left is to add the Hero section. Would you like to do that in this PR or a new one?

@pettinarip figured out the issue in my local and pushed the hub hero here 👍🏼


Do not chmod files when no files exist

High-level description
The Telegraf migration script fails if there are no containers in the legacy directory. Handel this case correctly.
Corresponding DC/OS tickets (required)

D2IQ-64507 COPS-5868: Unable to launch UCR containers after upgrade from 1.11->1.13

Related tickets (optional)

D2IQ-ID JIRA title / short description.

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[ ] Change log from the last version integrated (this should be a link to commits for easy verification and review): example
[ ] Included a test which will fail if code is reverted but test is not. If there is no test please explain.
[ ] Test Results: [link to CI job test results for component]
[ ] Code Coverage (if available): [link to code coverage report]

@mesosphere-mergebot backport 2.0 1.13

@mesosphere-mergebot label Ready For Review


(2 + 3) * 5 is not 17

https://clcalc.net/help.html#quickstart

(2 + 3) * 5
17

It should be 25, not 17 😊

Wow, not only it is wrong but this is also very first example... Good catch, and thank you for reporting!
The calculation work correctly, this is just a mistake in documentation (it used to have different example). This should be fixed now.


IdleClientDisconnect appears to be broken

I haven't had a chance to create a minimum test scenario. I apologize, I've been swamped. But I Imagine this will be pretty easy to track down.
I set the IdleClientTimeoutSeconds property when I create a TcpServer instance and get the following result:
A client connects.
The TimeoutSeconds time passes.
The server reports that the client disconnected... Reason: Timeout.
It behaves as if data received from the client is not resetting the timeout timer (which is probably exactly what the bug is).

James

Hi @pha3z - ouch!  Thanks for letting me know.  I was able to reproduce, looking at it now.  Cheers

Hi @pha3z thanks for finding this, just published a fix!
NuGet: https://www.nuget.org/packages/SuperSimpleTcp/1.1.7
Commit: https://github.com/jchristn/SimpleTcp/commit/6d3e8345d8d03e5050f37420ed6ad6cdb8211306

Its fixed!  Thank you!!! :)


Provide DroidKaigi 2021 theme

Kind (Required)

Other

Overview (Required)

I would like to apply a Theme to suit the following designs.

I would like to make it with a name such as DroidKaigi2021Theme.

Themes can be adapted in duplicate, so I'm thinking of adopting them on the TimetableScreen.

https://www.figma.com/file/IFlrbfmBSdYvUz7VmSzfLV/DroidKaigi_2021_official_app

This feature is required by 9/19.

Links

Provided in https://github.com/DroidKaigi/conference-app-2021/pull/619


PrismJS is on npm now

If we switch to the npm version, that means we can simplify stuff by nuking debowerify.

Just FYI, I've submitted a PR for this

Hi @strugee and @lbearl.
I'm closing this issue. You can find more explanations in #34 and see that we will address this problem in the new version of the generator in #36.
Thanks for your time :smile:.


=> ERROR [6/6] RUN python code-fix.py

0.185 Traceback (most recent call last):
0.185   File "code-fix.py", line 27, in
0.185     save_file(basicsr_utils_misc, fix_version_check(read_file(basicsr_utils_misc)))
0.185   File "code-fix.py", line 4, in read_file
0.185     file = open(filepath, "r")
0.185 FileNotFoundError: [Errno 2] No such file or directory: 'basicsr/utils/misc.py'

Traceback (most recent call last):
File "app.py", line 11, in
from basicsr.archs.rrdbnet_arch import RRDBNet
ModuleNotFoundError: No module named 'basicsr'


MGMT-17388: Log string literal format shown with "special" characters

https://issues.redhat.com/browse/MGMT-17388

Replacing \n with a space is probably the best we can do here.

Did you consider splitting the message in the new line and creating a div / li per item?

I did consider it. But given how rare \n appearing seems to be (I've only seen this one instance in this screenshot), I don't think it's worth it.


fix: remove FindFactorsByUser

What kind of change does this PR introduce?
Refactors the tests and removes FindFactorsByUser. There shouldn't be a need to call it as it's possible to directly load the Factors.
We note that there is significant opportunity for refactoring in this test this will be done later in the week  in the interest of time

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
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 58.316%

Totals

Change from base Build<PHONE_NUMBER>1:
0.0%

Covered Lines:
9193

Relevant Lines:
15764

💛  - Coveralls

Thanks!


No logging if ELK stack is not fully up

I was using a dockerhub image that is a self-contained ELK stack. I was trying to run the ELK stack and Logspout-Logstash from a single docker-compose.yml.
Seems that if the ELK stack is not FULLY up, Logspout-Logstash never starts logging.  Restarting the logspout container does correct it.  So, just noting that here, it would be nice if it would do re-tries or something. Unless perhaps it's an issue with my setup.
Here is my docker-compose file
elk:
  image: sebp/elk
  ports:
   - "5601:5601"
   - "9200:9200"
   - "5044:5044"
   - "5000:5000"
   - "5000:5000/udp"
  environment:
   - ES_HEAP_SIZE=12g
   - LS_HEAP_SIZE=12g
  volumes:
    - $HOME/dev/elk/logspout.conf:/etc/logstash/conf.d/logspout.conf
logspout:
  image: local/logspout
  container_name: logspout
  environment:
   - LOGSPOUT=ignore
   - ROUTE_URIS=logstash+tcp://<HOSTIP>:5000
  volumes:
   - /var/run/docker.sock:/tmp/docker.sock

Noticed the same thing (technically while running the dockerized version of this). Re-created a logstash container and had to restart this logspout container in order to make it work.
I'm also talking from logspout to logstash over UDP so I would expect those requests to just kind of fail if logstash wasn't running, then start working when logstash came back online. That is not the behavior I'm seeing though.

I would happily merge a PR if anyone wants to submit a fix for this.

I'm working on a change that lets logspout-logstash retry when starting (connecting for the first time) and when sending data.
Looks ok when the logspout-logstash is started and logstash isn't ready; it just waits and then starts logging.
The part I'm not sure about is retrying when sending - it recovers when using UDP and the target does not change. It doesn't recover when using TCP since the connection is broken, and it won't survive if the address of the log target changes.  Unfortunately if I understand the way logspout plugins work correctly, forcing a reconnect in that situation isn't possible.
In any case, log lines would be lost.
Any opinions or suggestions about that?

For completeness, my log:
logstash: could not write:write udp <IP_ADDRESS>:54914-><IP_ADDRESS>:5001: write: connection refused

@iljaweis: I think exiting the container would be a acceptable workaround until some real solution is found.
Some data loss is better than having it hang for a day or two unnoticed.

@luckydonald that's what I did in #48 which has been merged.

I’m not using the lib right now so a PR would be welcome!

Well I can replicate the problem easily but I can't pin-point the problem exactly. Its definitely a Logspout proper issue and not an issue with this plugin. Building logspout from the root of it's repository instead of the custom/ folder produces a version of logspout that doesn't have the issues the OP describes nor does it have my problems when the IP changes.


Process exit when I use "Pyinstaller" to package and run the Python demo code

when I use Pyinstaller to package and run the Python demo code,  The .exe process exit when
model = model.to('xpu')
There is no problem running the demo directly using Python.
anyone know how to do?

Sorry that we haven't tried Pyinstaller on XPU yet. Will notify you if we have verified this.

I encounter the same issue. The program exited within AutoModelForCausalLM without any error. I can observed that the progress bar of loading the weight is complete.
        self.model = AutoModelForCausalLM.from_pretrained(
            model_path, trust_remote_code=True
        ).to(self.device)
        ```


Local path folder name

Feature Request:
Default folder name on Local path from Github to GitHubPortable when clone or create repository.

The portable version only makes Github Desktop a portable application, it cannot add features such as changing the default folder
If you would like Github Desktop to add a feature you need, you can send this feature request at https://github.com/desktop/desktop/issues


Links lead to 404 on food101 dataset page

Whats Wrong?
The link of Homepage of Food101 on the Food101 page of the catalog section of tensorflow datasets doesnt work.
Link of the page: https://www.tensorflow.org/datasets/catalog/food101
Description
The link given for the Homepage of the Food-101 doesn't work

It leads to a 404 Page not found

Correct links
Link to the correct paper: https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/
Submit a pull request?
Are you planning to also submit a pull request to fix the issue? See the docs
contributor guide: https://www.tensorflow.org/community/contribute/docs,
docs API guide: https://www.tensorflow.org/community/contribute/docs_ref and the
docs style guide: https://www.tensorflow.org/community/contribute/docs_style

@shashwat9kumar
Thanks for pointing it out and the correct link for food 101 dataset is https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/
I can see that you have already submitted a PR for the same. Thanks!

This is fixed with https://github.com/tensorflow/datasets/commit/5d1d3c9ec95f8bf6c7d1a73befbd3e8b4458363d#diff-e36263420b0922ac75692057d52dd1a3bcfe57bafaeed330caffba97c16bdadc Thanks!


Set Checkpointed state to true in config file after checkpoint

This patch updates container config file so that checkpointed state is kept
after docker daemon restarted.
Docker-DCO-1.1-Signed-off-by: Hui Kang<EMAIL_ADDRESS>(github: huikang)

@boucher rebased. Please review it. Thanks.


13.0.0+ session_storage documentation wrong

Overview/summary
I was looking forward to the next release to fix some important but, but I see its been done in a breaking release with some significant session storage changes...
In trying to update, I now get errors about session storage, but the documentation is all unchanged.

The current documentation for session_storage appears to be outdated (I think this option no longer exists?)
https://github.com/Shopify/shopify-api-ruby/blob/fca16f181f528216a98edf8a4db8c572e2d82e7d/README.md?plain=1#L55

The Setup a Session Store section appears to be outdated and references things that no longer exist.

The linked session storage also appears to be outdated. https://github.com/Shopify/shopify-api-ruby/blob/fca16f181f528216a98edf8a4db8c572e2d82e7d/docs/usage/session_storage.md

if shopify_app is now required to do sessions, can you document how that works completely? Ideally also including people that just run this as a CLI or script kind of thing as mentioned in https://github.com/Shopify/shopify-api-ruby/issues/1084

is shopify_app now a hard dependency? If so, I'd like to see more documentation on that.
Personally, I'm using the shopify gem in a private app to run code just for our store. I don't need anything that shopify_app provides, so for me, this is not a good change. I was perfectly fine using the filesystem based session storage, I'd rather not make a new table and introduce all the session data there for no reason. Is there a way to do that?

@nelsonwittwer I've seen you on all the session storage PRs, are you the best one to document this?

I'll update the documentation, thanks for bringing this up!
There is no dependency on shopify_app, no. I'll clarify this in the docs when I update them here. The responsibility of session storage was something we wanted removed from scope of all of our api libraries as that responsibility typically is fulfilled by the web framework middleware, in this case Rails. The API libraries are meant to facilitate creating a session and making requests with those sessions to our APIs.
Totally see how this impacts your use case with only wanting file session storage. If you are interested in preserving this functionality, we'd be happy to promote a new gem that used the code that was dropped with the latest version if you or anyone else in the community wanted to take point on that :)


Enabler to make scripts loaded from CDN more secure

This adds the possibility to set an integrity hash for the script tag that is e.g. used by the mermaid plug. If properly used, this will prevent manipulated CDN sources from being loaded into silverbullet.

Nice!


Error load sciter-

I get the next error in Arch Linux with Sciter SDK 3 and Python 3.2:
I append the PATH and LD_LIBRARY_PATH as export
export PATH=$PATH:/opt/sciter-sdk-3/bin:/opt/sciter-sdk-3/bin.gtk

import sciter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/sciter/__init__.py", line 6, in <module>
    from .value import value as Value
  File "/usr/lib/python3.5/site-packages/sciter/value.py", line 15, in <module>
    _api = sciter.SciterAPI()
  File "/usr/lib/python3.5/site-packages/sciter/capi/scapi.py", line 478, in SciterAPI
    raise ImportError(SCITER_LOAD_ERROR)
ImportError: sciter-gtk-64.so was not found in PATH.
  Please verify that Sciter SDK is installed and its binaries (SDK/bin, bin.osx or bin.gtk) available at the path.

Try this:
sudo echo /opt/sciter-sdk-3/bin.gtk/sciter-gtk-64.so > /etc/ld.so.conf.d/sciter.conf
sudo ldconfig

Hi
I got the same error:
>>> import sciter Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/usr/local/lib/python3.4/dist-packages/sciter/__init__.py", line 21, in <module>     from .value import value as Value   File "/usr/local/lib/python3.4/dist-packages/sciter/value.py", line 15, in <module>     _api = sciter.SciterAPI()   File "/usr/local/lib/python3.4/dist-packages/sciter/capi/scapi.py", line 489, in SciterAPI     raise ImportError(SCITER_LOAD_ERROR) ImportError: libsciter-gtk-64.so was not found in PATH.   Please verify that Sciter SDK is installed and its binaries (SDK/bin, bin.osx or bin.gtk) available at the path.
My environment are:
root@eos:~# cat /proc/version Linux version 3.16.0-77-generic (buildd@lgw01-09) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #99~14.04.1-Ubuntu SMP Tue Jun 28 19:17:10 UTC 2016 root@eos:~# cat /etc/ld.so.conf.d/sciter.conf  /opt/sciter-sdk/bin.gtk/libsciter-gtk-64.so root@eos:~# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/sciter-sdk/bin:/opt/sciter-sdk/bin.gtk root@eos:~# echo $LD_LIBRARY_PATH /opt/sciter-sdk/bin:/opt/sciter-sdk/bin.gtk root@eos:~# python3 Python 3.4.3 (default, Nov 17 2016, 01:08:31)  [GCC 4.8.4] on linux

Hi, what's your sciter version? I haven't tried sciter 4 yet.

Yes, it is 4th
Thanks
I'll try to find 3rd and try with it

Okay, I'll look version 4 changes.

i downloaded ver <IP_ADDRESS> from sciter's github and got the same result

Hi
i found the root and fixed this issue at myself
my previous libstdc++.so.6 didnt support CXXABI_1.3.8
after update to new version all became ok
ealesid@loki:~$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI CXXABI_1.3 CXXABI_1.3.1 CXXABI_1.3.2 CXXABI_1.3.3 CXXABI_1.3.4 CXXABI_1.3.5 CXXABI_1.3.6 CXXABI_1.3.7 CXXABI_1.3.8 CXXABI_1.3.9 CXXABI_TM_1 CXXABI_FLOAT128

Okay then. I thought that you already checked Sciter SDK samples before using pysciter :)


[BUG] race condition in local rendezvous

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No
TensorFlow version
2.10, 2.12, doesn't really matter
Custom code
Yes
OS platform and distribution
ubuntu 20.04
Python version
3.8, 3.9
Bazel version
5.3.0
GCC/compiler version
9.4
Current behavior?
The story is kinda bit long and it took us months to debug this issue. I'll try to keep it short.
Background and what the problem is
We run the DLRM from NV DLE in our CI daily test.
Very rare, like once every few weeks, the daily test report such error.
W tensorflow/core/framework/op_kernel.cc:1874] OP_REQUIRES failed at strided_slice_op.cc:112 : INVALID_ARGUMENT: Expected begin, end, and strides to be 1D equal size tensors, but got shapes [65536], [1], and [1] instead.
The strided slice op validator isn't happy about the input parameters.
The problem is like a ghost. It appears once every 1 or 2 weeks which makes it very hard to debug. But one thing is for sure is that it's not a random dram bit flip caused by cosmic rays because the error systoms is stable: one of (begin, end, stride) tensor's shape is incorrectly set to [65535] instead of [1]
Evidence
I'll skip the lengthy debug process and jump to the last step.

We observed a malfunctioned SEND/RECV pair.
The item tensor in SENDOP has a shape of [1] but during the local rendezvous process the recevied tensor got a shape of [65536]. This tensor later flows to strided slice op and triggers the grumpy validator.

We grep the key hash (red highlighted 1632...9087) in the debug log.  There are two threads: 66787 and 63997. Most of the time the rendezvous runs in a SEND-RECV pattern within the same thread.
But in the green rectangle you can see two threads interleaved and a SEND-SEND-RECV-RECV pattern is observed. Soon after this the bomb exploded.
Analysis
It seems the root cause is a bug in the rendezvous mechanism. Two unrelated operations generated the same communication Rendezvous key.
Assuming there are 2 threads, when the CPU load is not heavy, in most cases the scheduling order is

THREAD A: SEND(KEY, VALUE_A)

THREAD A: RECV(KEY)

THREAD B: SEND(KEY, VALUE_B)

THREAD B: RECV(KEY)

In this way, everyone will be fine even if the keys are the same. It is equivalent to time-division multiplexing of the same KEY.
When the CPU load becomes heavy (which is the case in our daily test scenario), thread scheduling becomes unpredictable. It is possible that such a pattern may occur

THREAD A: SEND(KEY, VALUE_A)

THREAD B: SEND(KEY, VALUE_B)

THREAD A: RECV(KEY)

THREAD B: RECV(KEY)

This will cause THREAD A to incorrectly receive the data sent by THREAD B.
Related python code

Thread A is running the normal training loop.
Thread B is created for the RawBinaryDataset class. The pre-processing creates an asynchronous thread pool.
Thread A is running x = x[self.begin_idx:self.end_idx]. Translated into StridedSlice operation by eager runtime. begin_idx, end_idx and the implicit stride are all constant tensors on CPU, and StridedSlice is an device operator. So these three tensors need to be sent to the device side.
Thread B is running tensor = tf.expand_dims(tensor, axis=1). . Execute expand_dims. Similar to thread A, the expand_dims operator runs on the device side while the input is on CPU, and the tensor needs to be sent to the device. The shape of this tensor is [65536].
Due to the defect of Rendezous::CreateKey, the keys generated by these two operators in the eager runtime are exactly the same.
Multi-threading + HASH KEY collision + SEND-SEND-RECV-RECV, all three together, BOOOM.

FIX

The key string is
/job:localhost/replica:0/task:0/device:CPU:0;ea74dbce35f0ab7e;/job:localhost/replica:0/task:0/device:MLU:0;edge_2_input;0:0
The rendezvous key consists 5 parts.

src_device: /job:localhost/replica:0/task:0/device:CPU:0;
src_incarnation: ea74dbce35f0ab7e;
dst_device: /job:localhost/replica:0/task:0/device:MLU:0;
name: edge_2_input;
frame_inter: 0:0

In this case,  4 out of 5 (src_device, src_incarnation, dst_device_frame_iter) are naturely indistinguishable.
Unless we add new field in the key, the only field we can play with is name.
The creation of edge_2_input involes another few tons of code.

A quick fix for my current problem is simply add dst_name in the tensor_name_attr during graph partition. The names will become edge_2_input_strided_slice and edge_2_input_expand_dims thus my problem is solved.
diff --git a/tensorflow/core/graph/graph_partition.cc b/tensorflow/core/graph/graph_partition.cc
index a4f09383c63..57a4e919526 100644
--- a/tensorflow/core/graph/graph_partition.cc
+++ b/tensorflow/core/graph/graph_partition.cc
@@ -1147,7 +1147,8 @@ Status Partition(const PartitionOptions& opts, Graph* g,
         tensor_name_attr = opts.get_tensor_name_attr(edge);
       } else {
         tensor_name_attr =
-            strings::StrCat("edge_", edge->id(), "_", edge->src()->name());
+            strings::StrCat("edge_", edge->id(), "_", edge->src()->name(),
+            "_", edge->dst()->name());
       }

But a more approriate and generic fix might be to have a unique src node name. The source name will be like input_xxxxxx and input_yyyyyy. But this sounds like a fundamental change and I'm not sure if this would break too many things. And I'm not sure about the right place to make the change, like manipulating the input name a little bit here.
I'd like to hear your opinion on this problem and I'd like to file a PR if you could point me the right place to apply the fix.
Cheers
Hengwen
Standalone code to reproduce the issue
A minimum case derived from the DLRM from NV DLE
Click run all and you can reproduce the error in a few seconds.
https://colab.research.google.com/drive/1CUiyuG2Aob-Fj8xllrmbx2w3cNBXFYqU?usp=sharing

@sushreebarsa
It's not easy to do it with mutex during runtime. You'll have to create-then-grab a mutex for each parsed key at SendOp::Compute and release corresponding mutex when RecvOp::ComputeAsync is done.
Also it doens't smell right that SEND/RECV should clean the mess that eager runtime created.
Eager context should create tensors with unique tensor_name so that SEND/RECV should not worry about parsed key confliction but it will affect lots of things.
Another "fix" is to create unique parsed key at the ctor of SendOp and RecvOp so that no send/recv pairs has the same parsed key globally.
--- a/tensorflow/core/kernels/sendrecv_ops.cc
+++ b/tensorflow/core/kernels/sendrecv_ops.cc
@@ -57,6 +57,26 @@ static FrameAndIter GetFrameAndIter(OpKernelContext* ctx,
   }
 }

+static absl::flat_hash_map<std::string, int> key_prefix_map;
+static absl::Mutex key_prefix_map_mutex;
+
+static std::string UniqueKeyPrefix(const std::string& key_prefix) {
+  absl::MutexLock lock(&key_prefix_map_mutex);
+
+  auto it = key_prefix_map.find(key_prefix);
+  if (it != key_prefix_map.end()) {
+    it->second++;
+    // For each SEND/RECV pair we need to use same key prefix.
+    if (it->second == 1) {
+      return key_prefix;
+    }
+    return absl::StrCat(key_prefix, "_", it->second / 2);
+  } else {
+    key_prefix_map[key_prefix] = 0;
+    return key_prefix;
+  }
+}
+
 SendOp::SendOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
   string send_device;
   OP_REQUIRES_OK(ctx, ctx->GetAttr("send_device", &send_device));
@@ -70,6 +90,7 @@ SendOp::SendOp(OpKernelConstruction* ctx) : OpKernel(ctx) {
   OP_REQUIRES_OK(ctx, ctx->GetAttr("tensor_name", &tensor_name));
   key_prefix_ = GetRendezvousKeyPrefix(send_device, recv_device,
                                        send_device_incarnation, tensor_name);
+  key_prefix_ = UniqueKeyPrefix(key_prefix_);
   // The vast majority of Send nodes are outside any loop context, so
   // proactively cache the rendezvous key for the top-level.
   GetRendezvousKey(key_prefix_, {0, 0}, &parsed_key_.buf_);
@@ -151,6 +172,7 @@ RecvOp::RecvOp(OpKernelConstruction* ctx) : AsyncOpKernel(ctx) {
   OP_REQUIRES_OK(ctx, ctx->GetAttr("tensor_name", &tensor_name));
   key_prefix_ = GetRendezvousKeyPrefix(send_device, recv_device,
                                        send_device_incarnation, tensor_name);
+  key_prefix_ = UniqueKeyPrefix(key_prefix_);
   // The vast majority of Recv nodes are outside any loop context, so
   // proactively cache the rendezvous key for the top-level.
   GetRendezvousKey(key_prefix_, {0, 0}, &parsed_key_.buf_);
@@ -185,6 +207,8 @@ Rendezvous::DoneCallback make_recv_callback(OpKernelContext* ctx,
       // The runtime checks whether the tensor received here is
       // the same type.
       if (!is_dead) {
+        VLOG(1) << "make_recv_callback tensor ptr " << &val
+                << " shape " << val.shape().DebugString();
         ctx->set_output(0, val);
       }
     }

Still it makes send recv ops looks a little bit weird since it's clean someone else's mess but it has the minimal damage.
If this looks good to you I'll file a PR.
Thanks

@SuryanarayanaY @sushreebarsa
I filled a PR to avoid the key conflict.
https://github.com/tensorflow/tensorflow/pull/62568
Thanks

@SuryanarayanaY @rohan100jain
https://colab.research.google.com/drive/1CUiyuG2Aob-Fj8xllrmbx2w3cNBXFYqU?usp=sharing
Here is a minimum case derived from the DLRM from NV DLE
Click run all and you can reproduce the error in a few seconds.

We are currently using TF 2.13.0 and I can confirm a segfault due to a race condition in local rendezvous.
When inspecting the core file with gdb, this is the obtained stack trace:
(gdb) bt full
#0  0x00007f9441158cf0 in tensorflow::LocalRendezvous::~LocalRendezvous() () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#1  0x00007f94414dff89 in tensorflow::RefCountedIntraProcessRendezvous::~RefCountedIntraProcessRendezvous() () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#2  0x00007f94414e00d2 in tensorflow::RefCountedIntraProcessRendezvous::~RefCountedIntraProcessRendezvous() () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#3  0x00007f9441467808 in std::_Function_handler<void (absl::lts_20230125::Status const&), tensorflow::ProcessFunctionLibraryRuntime::ApplyCleanUpToDoneCallback(std::vector<std::unique_ptr<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem, std::default_delete<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem> >, std::allocator<std::unique_ptr<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem, std::default_delete<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem> > > >*, std::function<void (absl::lts_20230125::Status const&)>, tensorflow::FunctionLibraryRuntime::Options const&, tsl::core::RefCountPtr<tensorflow::Rendezvous>) const::{lambda(absl::lts_20230125::Status const&)#1}>::_M_invoke(std::_Any_data const&, absl::lts_20230125::Status const&) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#4  0x00007f94414600a3 in std::_Function_handler<void (absl::lts_20230125::Status const&), tensorflow::ProcessFunctionLibraryRuntime::Run(tensorflow::FunctionLibraryRuntime::Options const&, unsigned long, absl::lts_20230125::Span<tensorflow::Tensor const>, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*, std::function<void (absl::lts_20230125::Status const&)>) const::{lambda(absl::lts_20230125::Status const&)#1}>::_M_invoke(std::_Any_data const&, absl::lts_20230125::Status const&) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#5  0x00007f944145f7bc in tensorflow::ReffedStatusCallback::~ReffedStatusCallback() () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#6  0x00007f9441467f34 in tensorflow::ProcessFunctionLibraryRuntime::RunMultiDeviceAsync(tensorflow::FunctionLibraryRuntime::Options const&, unsigned long, std::vector<std::variant<tensorflow::Tensor, tensorflow::TensorShape>, std::allocator<std::variant<tensorflow::Tensor, tensorflow::TensorShape> > >*, std::vector<std::unique_ptr<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem, std::default_delete<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem> >, std::allocator<std::unique_ptr<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem, std::default_delete<tensorflow::ProcessFunctionLibraryRuntime::CleanUpItem> > > >*, std::function<void (absl::lts_20230125::Status const&)>, std::function<absl::lts_20230125::Status (tensorflow::ProcessFunctionLibraryRuntime::ComponentFunctionData const&, tensorflow::ProcessFunctionLibraryRuntime::InternalArgs*)>) const::{lambda(absl::lts_20230125::Status const&)#2}::operator()(absl::lts_20230125::Status const&) const () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#7  0x00007f9441461570 in std::_Function_handler<void (absl::lts_20230125::Status const&), tensorflow::(anonymous namespace)::TensorsToFunctionRetsDoneCallback(std::vector<std::variant<tensorflow::Tensor, tensorflow::TensorShape>, std::allocator<std::variant<tensorflow::Tensor, tensorflow::TensorShape> > >*, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*, std::function<void (absl::lts_20230125::Status const&)>)::{lambda(absl::lts_20230125::Status const&)#1}>::_M_invoke(std::_Any_data const&, absl::lts_20230125::Status const&) () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#8  0x00007f944144db50 in std::_Function_handler<void (absl::lts_20230125::Status const&), tensorflow::FunctionLibraryRuntimeImpl::Run(tensorflow::FunctionLibraryRuntime::Options const&, unsigned long, absl::lts_20230125::Span<tensorflow::Tensor const>, std::vector<tensorflow::Tensor, std::allocator<tensorflow::Tensor> >*, std::function<void (absl::lts_20230125::Status const&)>)::{lambda(absl::lts_20230125::Status const&)#3}>::_M_invoke(std::_Any_data const&, absl::lts_20230125::Status const&) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#9  0x00007f9441512455 in std::_Function_handler<void (), tensorflow::(anonymous namespace)::ExecutorState<tensorflow::PropagatorState>::Finish()::{lambda()#4}>::_M_invoke(std::_Any_data const&) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#10 0x00007f9441afe121 in std::_Function_handler<void (), std::_Bind<tensorflow::data::RunnerWithMaxParallelism(std::function<void (std::function<void ()>)>, int)::{lambda(std::function<void (std::function<void ()>)> const&, std::function<void ()>)#1}::operator()(std::function<void (std::function<void ()>)> const&, std::function<void ()>) const::{lambda(std::function<void ()> const&)#1} (std::function<void ()>)> >::_M_invoke(std::_Any_data const&) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#11 0x00007f94406eb645 in Eigen::ThreadPoolTempl<tsl::thread::EigenEnvironment>::WorkerLoop(int) () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#12 0x00007f94406ed2b8 in void absl::lts_20230125::internal_any_invocable::RemoteInvoker<false, void, tsl::thread::EigenEnvironment::CreateThread(std::function<void ()>)::{lambda()#1}&>(absl::lts_20230125::internal_any_invocable::TypeErasedState*) ()
   from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#13 0x00007f9441344fcf in tsl::(anonymous namespace)::PThread::ThreadFn(void*) () from /usr/local/lib/python3.10/dist-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2
No symbol table info available.
#14 0x00007f94ec8d4ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
        ret = <optimized out>
        pd = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140732530118736,<PHONE_NUMBER>181854869,<PHONE_NUMBER>16736, 0,<PHONE_NUMBER>69296,<PHONE_NUMBER>19088, -6031673960749836139, -6020192743340746603}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0,
              cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#15 0x00007f94ec965bf4 in epoll_wait (epfd=-699346607, events=0x7f88940327e0, maxevents=-938782704, timeout=-938782712) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
        __arg4 = -938782712
        __arg2 =<PHONE_NUMBER>14592
        _a3 = -938782704
        _a1 = -699346607
        resultvar = <optimized out>
        __arg3 = -938782704
        __arg1 = -699346607
        _a4 = 0
        _a2 =<PHONE_NUMBER>14592
        sc_ret = <optimized out>
        sc_ret = <optimized out>
#16 0x0000000000000000 in ?? ()
No symbol table info available.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.

LOL. I submitted the colab code that you can reproduce the bug in a few seconds and I submitted the patch a year ago.
You can find out whether the bug is fixed or not in the colab link and feel free to do whatever you want to this issue : - )


fix: QA card mobiledoc text color on dark surface backgrounds

Pull Request Test Coverage Report for Build 460951041

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 73.975%

Totals

Change from base Build 460857659:
0.01%

Covered Lines:
1654

Relevant Lines:
2038

💛  - Coveralls

Pull Request Test Coverage Report for Build 460951041

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 73.975%

Totals

Change from base Build 460857659:
0.01%

Covered Lines:
1654

Relevant Lines:
2038

💛  - Coveralls


localized strings

I review errors module.

ok, these strings could usefully be made i18n, as you do, however the exact trap which is first on the issue list to resolve has been fallen into: the word order is forced:
Don't break sentences up into fragments - please review the wiki to see how to address this.


Update README.md

redid the grammar that I... well redid 💀

This contribution is too minor to be integrated. If you feel like going through the docs and checking if the technical instructions (what really matters much) are up to date and fixing the problems there I will merge.


production to v0.6.8

You want to make a PR to Wrangle
Thanks so much :) First, please take a moment to carefully check through
the below items:
Sanity

[x] I'm aware of the implications of the proposed changes
[x] Code is PEP8
[ ] I'm making the PR to master

Docs

[ ] Docs are updated
[ ] Docs version is correct (index.html and _coverpage.md)

Tests

[ ] Changes have gone through actual use testing
[ ] All local tests have passed (run ./test.sh in /talos)
[ ] Tests have been updated to reflect the changes

Hello @mikkokotila! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file wrangle/df/df_print_values.py:

Line 2:1: W293 blank line contains whitespace
Line 5:1: W293 blank line contains whitespace
Line 11:1: W293 blank line contains whitespace
Line 14:1: W293 blank line contains whitespace


Add mTLS to metrics endpoint for nozzle

Addresses https://github.com/cloudfoundry/log-cache-release/issues/48 and possibly https://github.com/cloudfoundry/log-cache-release/issues/42 (though I'm not sure how to confirm that one).
Prom Scraper requires mTLS to work properly but the log-cache-nozzle job was never updated to provide the appropriate certs. This PR brings it in line with the other log-cache components. I've mostly just implemented the changes to log-cache from this commit for log-cache-nozzle.
This is a breaking change as deployment manifests will need to be updated to provide the certs. In my test env these operations were sufficient (metric_scraper_ca already exists in cf-deployment):
- type: replace
  path: /instance_groups/name=doppler/jobs/name=log-cache-nozzle/properties/metrics?
  value:
    ca_cert: ((log_cache_nozzle_metrics_tls.ca))
    cert: ((log_cache_nozzle_metrics_tls.certificate))
    key: ((log_cache_nozzle_metrics_tls.private_key))
    server_name: log_cache_nozzle_metrics

- type: replace
  path: /variables/name=log_cache_nozzle_metrics_tls?
  value:
    name: log_cache_nozzle_metrics_tls
    type: certificate
    update_mode: converge
    options:
      ca: metric_scraper_ca
      common_name: log_cache_nozzle_metrics
      alternative_names:
      - log_cache_nozzle_metrics
      extended_key_usage:
      - server_auth

I'm happy to open a PR to cf-deployment with these additions but I don't know how coordination works between new releases of log-cache-release and new releases of cf-deployment. Let me know what the best approach is.
Before the change:
$ cf log-meta
Source                                                   Source Type  Count  Expired  Cache Duration
...
log-cache                                                platform     1008   0        17m0s
log-cache-cf-auth-proxy                                  platform     810    0        17m0s
log-cache-gateway                                        platform     756    0        17m0s
...

After the change:
$ cf log-meta
Source                                                   Source Type  Count  Expired  Cache Duration
...
log-cache                                                platform     1008   0        17m0s
log-cache-cf-auth-proxy                                  platform     810    0        17m0s
log-cache-gateway                                        platform     756    0        17m0s
log-cache-nozzle                                         platform     322    0        5m59s
...

$ cf tail log-cache-nozzle -t counter
Retrieving logs for source log-cache-nozzle as $user...

   2021-09-30T15:57:51.62+0000 [log-cache-nozzle/7976f511-55ae-4702-82df-031d478c4100] COUNTER nozzle_egress:2505334
   2021-09-30T15:57:51.62+0000 [log-cache-nozzle/7976f511-55ae-4702-82df-031d478c4100] COUNTER nozzle_err:0
   2021-09-30T15:57:51.62+0000 [log-cache-nozzle/7976f511-55ae-4702-82df-031d478c4100] COUNTER nozzle_dropped:0
   2021-09-30T15:57:51.62+0000 [log-cache-nozzle/7976f511-55ae-4702-82df-031d478c4100] COUNTER nozzle_ingress:2505374

@crsimmons A lot of the tls stuff became optional(at the bosh release/binary level) when we started doing logging work. It'd be a lot easier for sequencing and pipelines if we did that here too. If you make that change, it'll be a lot easier for me to get this up and running and merged in.

@Benjamintf1 Sure, I can make it optional. Do you have an example of somewhere where this TLS stuff is optional so I can be consistent?
log-cache itself appears to require the flags to be present. bpm and templates leading to MetricsServer struct

@crsimmons and example I believe is here https://github.com/cloudfoundry/log-cache-release/blob/cb159881520db42a2e6d48f3a6adfea6080435ca/src/cmd/log-cache/main.go#L82-L89. The bpm and templates might be fine? Actually, I could approve and just see if it works, I see you might have accounted for it already?

(I may have over-indexed on the fact that you said it was a breaking check without looking. I'm sorry)

I believe there should be a way to have p() have a default if it's not a present property.

Yeah I remember adding the conditional in to only configure TLS if the CA is present but when I tested it BOSH complained because it couldn't template the cert files. I bet if you tried deploying any of the other jobs (i.e. log-cache or log-cache-gateway) without metrics certs they'd fail for the same reason.
As you said I think the solution is to allow the templating to succeed without certs either with default values or if_p. Then treat the default/empty value as the property not being set.
I'll take a stab at it tomorrow.

Yeah, jogging my memory a bit, none of the bosh specs are actually set up to have optional in this way, to be fair. All the kubernetes stuff happened without the bosh spec stuff.

I've made providing the metrics certs optional for the log-cache-nozzle job.
I also added rspec tests for the templating of the metrics files and bpm.yml to save myself from making multiple failed deploys while figuring out the correct approach. If you'd prefer these not be included I can omit that commit.
I've tested on my dev environment and it now deploys without providing the metrics ca, cert, or key. I chose to gate whether the env vars get set in bpm.yml based on the presence of the metrics ca property because that's what the Go code is doing.


i'm getting exception

raise Exception('Redirect Url not found')

Exception: Redirect Url not found

Hi, check if you can log without problems to your Facebook account. This exception happens when it logs in but asks for a security question.

In the latest commit the exception message explains that you need to log in desktop Facebook to restart your password. After that now you can log in again.


Why zipkin-dependencies tab show  nothing statistics information and how should  i  do ?

From @jahnkey on June 6, 2016 2:35
Dears,  let me talk about the  issue.

i  deployed zipkin server via docker and all server(collector、cassandra、query、web-UI) run  normally  ;
By the brave client sent log info to query service(the query default port is： 9411) ;
Then i can find the  tracer information on the zipkin-> web-UI  server 。
issues is：the dependencies tab  have nothing to show .  what should i do and then the dependencies tab will  show the  statistics info , thanks very much.

Copied from original issue: openzipkin/zipkin#1129

From @eirslett on June 6, 2016 5:13
You must run the zipkin-dependencies-spark job. It's a single jar file that you can execute.

From @rogeralsing on September 8, 2016 10:20
How do you do this when running Zipkin using the Docker image?

My 2 cents. make the dependency tab show some help information to start with.
That way, atleast people will not think it is broken.
e.g. using setup x, it will run every x min. use setup y to dun directly.


Index and Type inference

Hi,
Like the elasticsearch documentation says, don't repeat yourself !
Actually, you can't remove the inference of the index name and the type name for bulk operations even if you pass the index and the type name into FixedPath.
Am I wrong ? If no, it will be a good enhancement.
Have a nice day.

Hi @sterchelen can you elaborate a bit more on what you mean?

This is already possibly by setting Index and/or Type on IBulkRequest:
For instance
client.Bulk(b => {
    b.Index("foo");
    b.Type("bar");
    foreach (var doc in docs)
        b.Index<Foo>(i => i.Document(doc));
    return b;
});

Let me know if that helps.  Closing this for now as it's not an issue, but feel free to follow up here with any questions.

Well, I'm facing this problem on two apis (still using the v1 of NEST):
MultiGet and Bulk :
--> MultiGet:
Code:
var response = _client.MultiGet( m => m.FixedPath( indexName, "customerClip" ).GetMany<CustomerClip>( customerClipIds, ( a, b ) => a.Index( indexName ) ).SourceInclude( "clipSelections" ) );
Data send (thanks Fiddler):
Raw url ==> .clips-201609/customerClip/_mget?_source_include=clipSelections
Raw data:
{
  "docs": [
    {
      "_index": ".clips-201609",
      "_type": "customerClip",
      "_id": "FR268070_326113083"
    },
    {
      "_index": ".clips-201609",
      "_type": "customerClip",
      "_id": "FR89605_325643921"
    }
  ]
}

As you can see, even if I set the indexName and the type on the MultiGet api, NEST set the _index and _type variables... Whereas in the elastic documentation on the mget api we can read this :

The mget endpoint can also be used against an index (in which case it is not required in the body):

curl 'localhost:9200/test/_mget' -d '{
    "docs" : [
        {
            "_type" : "type",
            "_id" : "1"
        },
        {
            "_type" : "type",
            "_id" : "2"
        }
    ]
}'

And type:

curl 'localhost:9200/test/type/_mget' -d '{
    "docs" : [
        {
            "_id" : "1"
        },
        {
            "_id" : "2"
        }
    ]
}'

In which case, the ids element can directly be used to simplify the request:

curl 'localhost:9200/test/type/_mget' -d '{
    "ids" : ["1", "2"]
}'

Link to the doc
My goal is to have an output like the last request, just by setting the index and the type.
--> Bulk:
Code:
var bulkRequest = new BulkRequest()
			{
				Index = indexName,
				Type = "customerClip",

				Operations = new List<IBulkOperation>()
			};
			bulkRequest.Operations = new List<IBulkOperation>();

			foreach( var item in objs )
			{
				var bulkUpdateOperation = new BulkUpdateOperation<CustomerClip, object>( item._id );
				bulkUpdateOperation.Doc = item;
				bulkUpdateOperation.RetriesOnConflict = 5;
				bulkRequest.Operations.Add( bulkUpdateOperation );
			}

			var response = _client.BulkAsync( bulkRequest );

Data send:
Raw url ==> .clips-201609/customerClip/_bulk
Raw data:

{ "update" :  {"_type":"customerClip","_id":"FR268070_326113083","_retry_on_conflict":5} }
{"doc":{"clipSelections":[{"id":"140741","name":"- AAAA"},{"id":"3041","name":"- ECOLOGIE"}],"_id":"FR268070_326113083"}}
{ "update" :  {"_type":"customerClip","_id":"FR89605_325643921","_retry_on_conflict":5} }
{"doc":{"clipSelections":[{"id":"140741","name":"- AAAA"},{"id":"3041","name":"- ECOLOGIE"},{"id":"3043","name":"- MER"},{"id":"3042","name":"- TRANSPORTS"},{"id":"2996","name":"Energie"}],"_id":"FR89605_325643921"}}

For the bulk operation, just the _type field remains. I suspect the type inference on this "problem". I hope my explanation is clear.
Thank you for your time.


Squares ▪▫◻◼ and arrows ◀▶ reported with width 2 but only takes up 1 space

Squares ▪▫◻◼ and arrows ◀▶ reported with width 2 but only takes up 1 space in the terminal.
There are probably more cases like this. i Pressed the "Character viewer" on my mac and went to "Bullets and stars" to find these.

Emoji Regex related issue could be fired to emoji_regex.
<EMAIL_ADDRESS>use a copy of emoji_regex.dart temporarily and will remove it later

I wrote a test and found the Unicode character for the black square, which is in fact part of the emoji_regex and is replaced with two empty chars, gives 2 in width, but in the terminals i've tested in it only takes up one column space.
import 'package:string_width/string_width.dart';
import 'package:test/test.dart';

void main() {
  test('measure string width of ▪', () {
    expect(stringWidth('▪'), 1);
  });
}


PaginatableArray has Deprications in rails 3.2

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically.


Other basic stats

From a developer POV, it would be helpful to see basic stats, per-app, like:

Total downloads.
Average downloads per-day.

Having a global overall would be nice enough, but even better if it's filtered by the current selected time window.

Something like this?

Something like this?

Exactly like this, thanks! This information is invaluable.

I just added "download type filtering" as the old way of showing data, could be a bit misleading.


fix(Tree): Fix spacing for tree node icon

Closes #567
I needed to increase margin left to child icon, after switching from padding to margin for the icon itself.

Can you add a screenshot showing before/after? Because I don't really understand what this is solving.
The linked issue says "We use padding for some reason and if we pass into that place something like checkbox, it does not work" but it's not clear what doesn't work.

Can you add a screenshot showing before/after? Because I don't really understand what this is solving.
The linked issue says "We use padding for some reason and if we pass into that place something like checkbox, it does not work" but it's not clear what doesn't work.

Sure, sorry.
Before:

There are issues with inputs and applying padding on them

If you know some other fix, would be really good...
After:


[SR-1021] Don't export public symbols from static libraries by default

Previous ID
SR-1021

Radar
None

Original Reporter
@jckarter

Type
Bug

Additional Detail from JIRA

Votes
3

Component/s

Labels
Bug

Assignee
None

Priority
Medium

md5: 8df16971f82bdca1788af1569c947c46

relates to:

SR-521 Public symbols are never dead stripped

Issue Description:
When we statically link Swift libraries into executables, the public symbols from those libraries should not be exported from the result executable. This can be done at link time by passing --exclude-libs to GNU ld (I couldn't find an equivalent flag for ld64 at a glance), or we could do it at compile time by only emitting symbols with hidden visibility when we know we're building for a static library.
When we link static libraries into a dynamic library, it's a more interesting policy decision whether those libraries' symbols should be exported by the dynamic library. IMO we shouldn't by default, unless the dynamic library module explicitly reexports APIs from its static dependencies as its own public API. This would definitely require compiler support, though.

This is so relatable... I really wish there was a simple way to hide all public symbols in the resulting product from every single dependency this product depends on...

On the bright side, I believe we now know during compilation whether we're building for a static library or not (because @compnerd needed this info to deal with Windows' linkage model). Maybe we could use that information here too to switch over to hidden linkage for public symbols when we know we're building for an executable or static library target.

Yes, that should be possible.  This is effectively what happens with Windows - public symbols in a static library are marked as internal for the loader.  Note that this might cause some headache - people may be improperly expecting that the static library symbol to be available to external consumers as the import may not be marked as @_implementationOnly.

Well, it would be great to ban that too, since reexporting a static library dependency from a dynamic library is rarely a good idea (unless the static library itself was built to be part of the eventual dynamic library, in which case we could still build it as if for a dynamic library to begin with).

I agree with the basic premise of that.  I think that if the library is built statically to be exposed by an eventual dynamic library, we do need a way to clearly express that intent.  At least on Windows, this will require some amount of arrangement - the functions should be marked as __declspec(dllexport) but then used without __declspec(dllimport) which we do not currently support as we cannot identify that the library is meant to be exposed when built statically.  If there are ideas on how to express that intent, I would be rather interested in them.

Yeah, it probably requires more coordination with the build system to be able to tell the compiler what modules/packages are destined to be part of the same image or not.


Documentation Request: Include a complete, annotated implementation example

As someone who struggled to understand this library after reading it from top to bottom, word-for-word, I would've really appreciated a complete, back-to-front example of Roact-Rodux implementation. I wrote this script below to help anyone in the future that wants to poke and prod at a working example :) Please consider putting this in the documentation after peer reviewing my comments for accuracy!
--[[
This is a complete example of Roact-Rodux that will create a
TextButton that will increment its text when its .Activated event is fired!

1) Put Roact, Rodux and RoactRodux in ReplicatedStorage
2) Paste this script in a LocalScript
]]

--Init
local PlayerGui = game.Players.LocalPlayer.PlayerGui
local RS = game:GetService("ReplicatedStorage")
local Roact = require(RS:WaitForChild("Roact"))
local Rodux = require(RS:WaitForChild("Rodux"))
local RoactRodux = require(RS:WaitForChild("RoactRodux"))

--Rodux creates our store:
local function reducer(state, action)
	state = state or {
		value = 0,
	}
	if action.type == "increment" then
		return {
			value = state.value+1
		}
	end
	return state
end

local store = Rodux.Store.new(reducer)

--Roact creates our component:
local function MyComponent(props)
	--Roact.createElement(ClassName, {Class Properties}, [{Children}])
	return Roact.createElement("ScreenGui", {}, {
		Roact.createElement("TextButton", {
			Text = props.value,
			AnchorPoint = Vector2.new(0.5, 0.5),
			Position = UDim2.new(0.5, 0, 0.5, 0),
			Size = UDim2.new(0, 500, 0, 200),
			ZIndex = 0,

			[Roact.Event.Activated] = props.onClick,
		})
	})
end

--`RoactRodux.connect([mapStateToProps, [mapDispatchToProps]])` returns a function that we can pass our plain Roact component `MyComponent` created above as an argument, returning a new RoactRodux-connected component as our new `MyComponent` variable
MyComponent = RoactRodux.connect(
	function(state, props) 	--`mapStateToProps` accepts our store's state and returns props
		return {
			value = state.value,
		}
	end,
	function(dispatch) 		--`mapDispatchToProps` accepts a dispatch function and returns props
		print("RoactRodux mapDispatchToProps has run.")
		return {
			onClick = function()
				dispatch({
					type = "increment",
				})
			end,
		}
	end
)(MyComponent) --Here we are passing in our plain Roact component as an argument to RoactRodux.connect(...)
--`MyComponent` should now return a RoactRodux-connected component, which will update and re-render any time the store is changed.

--Here we will wrap a RoactRodux StoreProvider at the top of our Roact component tree. This will make our store readable to the elements & components below it via
local app = Roact.createElement(RoactRodux.StoreProvider, {
	store = store,
}, {
	Main = Roact.createElement(MyComponent), --Due to the limitations of Roact, we can only have ONE(1) child under a StoreProvider element, so we have to call MyComponent to get the rest of the children. The Store will be passed to MyComponent as arguments.
})

--Roact will now put our app on the screen
Roact.mount(app, PlayerGui, "My Test App")

Verified working in an isolated environment!

Hi, this looks like a great example! If you're interested, you could make a PR to the docs (we use mkdocs, which should be pretty easy to set up locally) and make a page for this example!
Alternatively, you could add this to an example folder and include a rojo project that sets it up as a place file that folks can build and run with rojo.
If you make it a docs page, you might consider breaking it up into sections with some of your comments as just normal text
outside of the snippets, and then including the full example at the end with more simplified comments.
Either way, make sure to wrap your comments, preferably at column 80!

Hi, this looks like a great example! If you're interested, you could make a PR to the docs (we use mkdocs, which should be pretty easy to set up locally) and make a page for this example!
Alternatively, you could add this to an example folder and include a rojo project that sets it up as a place file that folks can build and run with rojo.
If you make it a docs page, you might consider breaking it up into sections with some of your comments as just normal text
outside of the snippets, and then including the full example at the end with more simplified comments.
Either way, make sure to wrap your comments, preferably at column 80!

Thanks for the feedback, ZoteTheMighty. I'll take a look at capping comments to column 80. I'll be honest- I've never heard of mkdocs and it looks like a few hours of work that might be pushed back until after I reach a major milestone with my current project. I'll definitely be putting a pin in it though.

Hi. It's look like as react + redux.
I want to join in paid works.


Add support for string literal operators and label_join function

Promql engine does not have a support for string literals (it falls back to the old engine). Because it doesn't, functions like label_join and label_replace can't be implemented. This PR adds support for String literal operator and it also implement the code for label_join function.
Below is the label_join function operator tree:
[*functionOperator] label_join(http_requests_total, "label", "-", "pod", "series"):
├──[*coalesce]:
│  ├──[*concurrencyOperator(buff=2)]:
│  │  └──[*vectorSelector] {[__name__="http_requests_total"]} 0 mod 4
│  ├──[*concurrencyOperator(buff=2)]:
│  │  └──[*vectorSelector] {[__name__="http_requests_total"]} 1 mod 4
│  ├──[*concurrencyOperator(buff=2)]:
│  │  └──[*vectorSelector] {[__name__="http_requests_total"]} 2 mod 4
│  └──[*concurrencyOperator(buff=2)]:
│     └──[*vectorSelector] {[__name__="http_requests_total"]} 3 mod 4
├──[*stepInvariantOperator]:
│  └──[*stringLiteralSelector] label
├──[*stepInvariantOperator]:
│  └──[*stringLiteralSelector] -
├──[*stepInvariantOperator]:
│  └──[*stringLiteralSelector] pod
└──[*stepInvariantOperator]:
   └──[*stringLiteralSelector] series

I am just not completely sure we need an operator for string literals. Aren't they constant values that are always known and fixed before/during execution?

I also thought about it. But I think string operators would help us visualise the operator tree better for such functions and also, there would be no exceptions in the design of this engine (i.e. handling code for string as non-operator and handling code for other operators). Moreover, I was unsure if it (i.e. if string literals are not operators) would affect future function integrations that may require string literals as operators.
So I decided to make it as operator. I would love to hear your thoughts on this.

Can we measure it somehow? If the additional pointer is not that much of a problem this would help since we could also carry a slice for timestamps to implement the timestamp  function maybe.

It probably won't be a large regression (we can check the benchmarks), but I would really like to keep the step vector object small and focused. I am concerned that we can easily overload it with various nullable fields which can make things harder to debug or cause subtle bugs down the line.
We should try to infer as much information ahead of time and encode it as static parameters in the query plan instead of adding branching during execution. The latter also makes it harder to work on the engine.

Ah i understand now what was requested; using the parser here to get the argument is pretty cool; nice PR!

Hey @saswatamcode @fpetkovski , could you please approve the workflows?


Cleanup repo

Update dependencies
Add contributors to README.md

Thanks for the maintenance work! Updating and finishing this repo has been on my to-do list for a while, but other things keep popping up.
I hadn't heard of allcontributors yet, it looks useful for larger & more complex projects but I don't really see the benefit for a small npm package like this. What was your motivation to add it?

I prefer to give every contributor credits for what (s)he has done.
Even for small projects I see it being used a lot nowadays so that's why I added it.

Sounds good. I hadn't seen it used before, and I don't like just throwing additional tooling in a repository, but this seems harmless enough. And I agree that it's good practice to credit everyone who works on a project.


Non primitive types are not persisted

Kindly assist how do i persist this kindly of data using  this package
 `{
"first_name": "Benedict",
"last_name": "Mwanga",
"email"<EMAIL_ADDRESS>"slug": "6ce2cd243f96554fc0f40a25c46e8dd0"

}`

This is what the serializer option is for.

Hi :)
Any primitive type, and object containing primitive values will be serialized/deserialized properly. To work with non primitive types (such as Date), you can use the hooks (beforeRestore and afterRestore) or a customer serializer as suggested! :)
This is documented here pinia-plugin-persistedstate#references-do-not-persist
closing this


Bug: openim/openim-docker/scripts/lib/color.sh: line 23: conditional binary operator expected

What happened?

docker 部署
在mac 终端执行 make init 报错
openim/openim-docker/scripts/lib/color.sh: line 23: conditional binary operator expected
What did you expect to happen?
openim/openim-docker/scripts/lib/color.sh: line 23: conditional binary operator expected
How can we reproduce it (as minimally and precisely as possible)?
openim/openim-docker/scripts/lib/color.sh: line 23: conditional binary operator expected
Anything else we need to know?
No response
version

```console
$ {name} version
# paste output here
```

Cloud provider

OS version

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

Install tools

Maybe you can skip make init and just change your configuration file
You can check your Bash version by running the following command:
bash --version

-v is a unary operator introduced in bash 4.2 and later that checks whether a variable is set. In this code, if [[! -v COLOR_OPEN]]; The then line checks whether the COLOR_OPEN variable is set. If it is not set, then the line COLOR_OPEN=1 is run.
# shellcheck disable=SC2034
if [[ ! -v COLOR_OPEN ]]; then
    COLOR_OPEN=1
fi

https://github.com/openimsdk/open-im-server/blob/b72b72f74f20ba193635e9c5606215436552f69a/scripts/lib/color.sh#L22C1-L25C3

The issue has been resolved now.

The Docker deployment plan has been fully upgraded. Please refer to the README for the new scheme.
The new scheme is simpler to use and supports Linux, Windows, and Mac.


Hollow toString call breaks MS Edge

When you have a blobbed webworker that uses transferable method, the toString call raises String0: Invalid Calling Object.
When toString call is bound to Object.prototype, everything works as expected and MS Edge survives.

Thanks a ton.


Error with almost everything

Hello the only thing that works is creating channel. The bot dont send user message, any command dont work (dbTable not found), if you dm multiple times it just keep create new ticket

I get this when i DM bot

Also permissions broken

I can't help you: your pic is broken.
If you're not using repl.it, delete the replit.js file.

Also did you set correct role IDs?

Yes, everything correct. And i deleted that file

This pic is broken

Do you have discord? Will be easier for me

ReferenceError: dbTable is not defined
at Client. (/root/modmail/bot.js:110:17)
at Client.emit (events.js:388:22)
at MessageCreateAction.handle (/root/modmail/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/modmail/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/modmail/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/root/modmail/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/root/modmail/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/root/modmail/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (events.js:376:20)
at Receiver.receiverOnMessage (/root/modmail/node_modules/ws/lib/websocket.js:845:20)
this error shows every time when user sent a message on a channel that is NOT a support channel

Well, move the const to the top of the client.on function like you did

Okay i will try.

But i also have
ReferenceError: text is not defined

What line?

Line 94 -  client.channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`, {files: [message.attachments.first().url]})
Line 96 -  if(e) client.guilds.cache.get(config.guild).channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`, {files: [message.attachments.first().url]})
Line 100 - client.channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`);
Line 102 - if(e) client.guilds.cache.get(config.guild).channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`)

You didn't define text to anything, and therefore it's returning undefined.
And also, you defined msg to message content. Line 84 -      var msg = message.content;
But it was never used. Maybe by changing ${text} to ${msg}?

Should be fixed now.

Hey so this isnt working too great. It doesnt start for me, even if I put everything in pls help

Error: Cannot find module './config.json'
Require stack:

/home/runner/AE-Modmail/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
internal/fs/utils.js:269
throw err;
^

Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object. (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object. (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/AE-Modmail/index.js'
}


Are you using replit?
Download the index.js and config.json files again

I am using replit. When I download all the files again it starts the process then dies immediately.

And I did everything that you told replit users to do. What files do I need to remove exactly?

What is your discord because the one on your website doesnt work

What files do I need to remove exactly?
You have to remove the index.js. Then, replace index.js by replit.js in the package.json at lines 5 and 7.

What is your discord
this

node v12.16.1

Replit: Updating package configuration
--> npm init -y
Wrote to /home/runner/AE-Modmail/package.json:
{
"name": "AE-Modmail",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"chalk": "^4.1.1",
"cors": "^2.8.5",
"discord.js": "^12.5.3",
"discord.js-commando": "^0.12.3",
"express": "^4.17.1",
"helmet": "^4.6.0",
Server {
insecureHTTPParser: undefined,
_events: [Object: null prototype] {
request: [Function: app] EventEmitter {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
emit: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
init: [Function: init],
defaultConfiguration: [Function: defaultConfiguration],
lazyrouter: [Function: lazyrouter],
handle: [Function: handle],
use: [Function: use],
route: [Function: route],
engine: [Function: engine],
param: [Function: param],
set: [Function: set],
path: [Function: path],
enabled: [Function: enabled],
disabled: [Function: disabled],
enable: [Function: enable],
disable: [Function: disable],
acl: [Function],
bind: [Function],
checkout: [Function],
connect: [Function],
copy: [Function],
delete: [Function],
get: [Function],
head: [Function],
link: [Function],
lock: [Function],
'm-search': [Function],
merge: [Function],
mkactivity: [Function],
mkcalendar: [Function],
mkcol: [Function],
move: [Function],
notify: [Function],
options: [Function],
patch: [Function],
post: [Function],
pri: [Function],
propfind: [Function],
proppatch: [Function],
purge: [Function],
put: [Function],
rebind: [Function],
report: [Function],
search: [Function],
source: [Function],
subscribe: [Function],
trace: [Function],
unbind: [Function],
unlink: [Function],
unlock: [Function],
unsubscribe: [Function],
all: [Function: all],
del: [Function],
render: [Function: render],
listen: [Function: listen],
request: [IncomingMessage],
response: [ServerResponse],
cache: {},
engines: {},
settings: [Object],
locals: [Object: null prototype],
mountpath: '/',
_router: [Function]
},
connection: [Function: connectionListener],
listening: [Function: bound onceWrapper] { listener: [Function] }
},
_eventsCount: 3,
_maxListeners: undefined,
_connections: 0,
_handle: TCP {
reading: false,
onconnection: [Function: onconnection],
[Symbol(owner_symbol)]: [Circular]
},
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
Hint: hit control+c anytime to enter REPL.

Replit: Updating package configuration
--> npm init -y
Wrote to /home/runner/AE-Modmail/package.json:
{
"name": "AE-Modmail",
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object. (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/AE-Modmail/index.js'
}
this is the error I get when I run it

replace this
"main": "index.js",
with this
"main": "replit.js",

replace this
"main": "index.js",
with this
"main": "replit.js",

Yeah I did that.

What's the output?

these are my files

I'll ask you to cancel these changes and rename replit.js to index.js file.

I'll ask you to cancel these changes and rename replit.js to index.js file.

internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object. (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/AE-Modmail/index.js'
}


index.js doesn't exist on your side.

index.js doesn't exist on your side.

I renamed replit.js to index.js

In the package.json file, replace replit.js with index.js (there should be 2 occurences) and rename the main file to index.js.


NIFI-12887 Additional ways for handling Strings as binary in PutDatabaseRecord

Add option to treat Strings as hexadecimal character sequences or base64-encoded binary data when inserting into a binary type column.

Summary
NIFI-12887
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[x] Apache NiFi Jira issue created

Pull Request Tracking

[x] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[x] Pull Request based on current revision of the main branch
[x] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[ ] JDK 21

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

@tpalfy - I think the easiest is to keep this PR for support/1.x, and open another PR targeted at main that does not use Google library. I think it's safer compared to letting the merger do the changes. Happy to merge once we're on the same page.

@tpalfy - I think the easiest is to keep this PR for support/1.x, and open another PR targeted at main that does not use Google library. I think it's safer compared to letting the merger do the changes. Happy to merge once we're on the same page.

This PR is based on and is open against main already. So I'll need to change this one and open a new one against 1.x.

Yeah the option of opening another PR for 1.x is also OK :) As a FYI, from the Github UI, on the PR, you can change the branch against which the PR is submitted, that is why I suggested to use this one against 1.x and open a new one with the changes. But all good, the end result is the same ;)

The last item to address it the required() status for the new property. As mentioned in the comment, it can be set to true since the default value provided maintains compatibility with existing configuration.

Technically we could make it required, but we don't automatically do that in such cases. When a property is essential on a conceptual level, we make it required but leave it optional otherwise, even if it has a default value.
This is more about UX but it makes sense. This can't be considered a conceptually essential parameter, like 'Table Name' for example. Let's leave it optional.

The last item to address it the required() status for the new property. As mentioned in the comment, it can be set to true since the default value provided maintains compatibility with existing configuration.

Technically we could make it required, but we don't automatically do that in such cases. When a property is essential on a conceptual level, we make it required but leave it optional otherwise, even if it has a default value.
This is more about UX but it makes sense. This can't be considered a conceptually essential parameter, like 'Table Name' for example. Let's leave it optional.

Thanks for the reply.
Although use of the property is optional in one respect, in that it does not apply if the record does not relate to a binary column, it is required in terms of understanding the default behavior.
Right now, the default behavior is implicit, always using UTF-8 decoding. From another angle, making the property optional leaves the behavior ambiguous, because the property value could be an empty string. In that case, it could fall back to UTF-8, but that is less clear than marking the property as required.


left sidebar is pushed down

Something is pushing down the left sidebar (profile picture, Benny Carlsson, Software Developer, links)
So the links is not shown

i want to work on this

@ayushman2001 go ahead everything is free for all :)

#97 also fixed the profile being too far to the right

Hello @BennyCarlsson! Fixed left sidebar issue: #100

Great Work 👍


[ace[core]:x64-windows] LINK fatal error

Host Environment

OS: Windows 10 Pro 64-bit Version 2004 build 19041.508 with Windows Feature Experience Pack 120.2212.31.0
Compiler: Microsoft Visual Studio 2019 Version 16.7.3

To Reproduce
Steps to reproduce the behavior:
./vcpkg install ace[core]:x64-windows
Failure logs
Computing installation plan...
The following packages will be built and installed:
ace[core]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: ace:x64-windows
Building package ace[core]:x64-windows...
Could not locate cached archive: C:\Users\jimmy\AppData\Local\vcpkg\archives\f7\f75ffb5e780a99ce5c63b45a19502e9745e9c081.zip
-- Using cached F:/GitHub/vcpkg/downloads/ACE-src-6.5.11.zip
-- Cleaning sources at F:/GitHub/vcpkg/buildtrees/ace/src/ACE-src-6-7fdba7a39c.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/GitHub/vcpkg/downloads/ACE-src-6.5.11.zip
-- Using source at F:/GitHub/vcpkg/buildtrees/ace/src/ACE-src-6-7fdba7a39c.clean
-- Building ace/ace.sln for Release
-- Building ace/ace.sln for Debug
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:85 (message):
Command failed: msbuild F:/GitHub/vcpkg/buildtrees/ace/x64-windows-dbg/ACE-src-6-7fdba7a39c.clean/ace/ace.sln /p:Configuration=Debug /t:Rebuild /p:Platform=x64 /p:PlatformToolset=v142 /p:VCPkgLocalAppDataDisabled=true /p:UseIntelMKL=No /p:WindowsTargetPlatformVersion=10.0.18362.0 /p:VcpkgTriplet=x64-windows /p:VcpkgCurrentInstalledDir=F:/GitHub/vcpkg/installed/x64-windows /p:VcpkgManifestInstall=false /m /p:ForceImportBeforeCppTargets=F:/GitHub/vcpkg/scripts/buildsystems/msbuild/vcpkg.targets /p:VcpkgApplocalDeps=false
Working Directory: F:/GitHub/vcpkg/buildtrees/ace/x64-windows-dbg/ACE-src-6-7fdba7a39c.clean
Error code: 1
See logs for more information:
F:\GitHub\vcpkg\buildtrees\ace\build-x64-windows-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_install_msbuild.cmake:191 (vcpkg_execute_required_process)
ports/ace/portfile.cmake:123 (vcpkg_install_msbuild)
scripts/ports.cmake:79 (include)
Error: Building package ace:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: ace:x64-windows
Vcpkg version: 2020.06.15-nohash
Additionally, attach any relevant sections from the log files above.
Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.

Hi @Jimmy-Hu
Thanks for posting this issue.
This should be a series of issues for many ports not just for ace. So I suggest to track this issue in #13642.
So I'm closing this issue for now. Please comment #13462 if you have any ideas about this.
Thanks.


Functional specs guidance

Related Ticket(s)
https://github.com/carbon-design-system/carbon-for-ibm-dotcom/issues/6774
Description
This pull requests begins to add additional guidance and documentation around writing functional specs.
Changelog
New

wiki page

Let's wait and see if Jan has any feedback.

Let's wait and see if Jan has any feedback.

Thank you @shixiedesign! Yes, I'm going to do a quick review of the recording and then a read-through. More in a bit...


Patch release 0.32.1.

This is a patch release (nominally Cranelift, though also for Wasmtime due to process limitations at the moment) with cherry-picks of these three PRs: #3610, #3617, #3619. This fixes codegen bugs in Cranelift that prevented it from being used by cg_clif, and possible other consumers; any codegen bug is worthy of a patch release.
This is our first time using the patch release process; the PR merges the cherrypicked commits and a RELEASES.md update to a release-0.32.1 branch in the main repo, and then we can trigger the version-bump/release workflow from there.

Cool, running the version-bump job now with bump-patch as an argument, let's see if this works...

OK, that job failed; I filed #3621 for the issue. It's probably a relatively simple fix, but not a one-liner, and might need some more debugging or run into other issues later in the process. I need to context-switch away to some other things before leaving for two weeks; so this patch release will have to wait (sorry @bjorn3) -- since the known consumer of Cranelift that runs into the 8/16-bit issues can pin to an earlier version for now, I don't think it's security-issue-level urgent.

I understand. I will push a commit to cg_clif to revert back to the previous cranelift release.


Overworld rain causes sun to disappear in Time Noon dimension

RFTools 4.32 (1.7.10 FTB Infinity Evolved 2.50 normal mode)
I created a desert biome void dimension and included a Time Noon dimlet. While there is rain in the overworld, the sun disappears within the created dimension. It doesn't get dark enough to cause mob spawns, but solar panels stop generating power. When the rain stops (for instance when sleeping) the sun immediately reappears in the created dimension.
The dimension was not created with any weather dimlet, using black for sky, clouds and fog.

That's actually not a bug but this is normal behaviour. Only the time is controlled with Time Noon. You also need wather control to make sure it is always clear


TypeError: Unsloth: Your model already has LoRA adapters. No need to run this again!

Hi, I performed the CPT for my domain following the Continued Pretraining notebook. Now when I am trying to perform the fine-tuning and applying a different LoRA config, it gives me error TypeError: Unsloth: Your model already has LoRA adapters. No need to run this again!
For fine-tuning, I wanted to use different LoRA config(smaller r and different target_modules than pre-training) but I am not able to apply this config.
Currently, I changed the model_name to the checkpoint obtained after CPT for the fine-tuning. Below is the code for reference:-
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "/home/ec2-user/SageMaker/ES/ES-cpt-Phi-3-mini-4k-instruct/checkpoint-2550",
    max_seq_length = max_seq_length,
    dtype = dtype,
    load_in_4bit = load_in_4bit,
    cache_dir ='./hf_cache'
)

model = FastLanguageModel.get_peft_model(
    model,
    r = 8, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128
    target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
                      "gate_proj", "up_proj", "down_proj",],
    lora_alpha = 16,
    lora_dropout = 0, # Supports any, but = 0 is optimized
    bias = "none",    # Supports any, but = "none" is optimized
    # [NEW] "unsloth" uses 30% less VRAM, fits 2x larger batch sizes!
    use_gradient_checkpointing = "unsloth", # True or "unsloth" for very long context
    random_state = 3407,
    use_rslora = False,  # We support rank stabilized LoRA
    loftq_config = None, # And LoftQ
)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[12], line 1
----> 1 model = FastLanguageModel.get_peft_model(
      2     model,
      3     r = 8, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128
      4     target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
      5                       "gate_proj", "up_proj", "down_proj",],
      6     lora_alpha = 16,
      7     lora_dropout = 0, # Supports any, but = 0 is optimized
      8     bias = "none",    # Supports any, but = "none" is optimized
      9     # [NEW] "unsloth" uses 30% less VRAM, fits 2x larger batch sizes!
     10     use_gradient_checkpointing = "unsloth", # True or "unsloth" for very long context
     11     random_state = 3407,
     12     use_rslora = False,  # We support rank stabilized LoRA
     13     loftq_config = None, # And LoftQ
     14 )

File ~/anaconda3/envs/pytorch_p310/lib/python3.10/site-packages/unsloth/models/llama.py:1409, in FastLlamaModel.get_peft_model(model, r, target_modules, lora_alpha, lora_dropout, bias, layers_to_transform, layers_pattern, use_gradient_checkpointing, random_state, max_seq_length, use_rslora, modules_to_save, init_lora_weights, loftq_config, temporary_location, **kwargs)
   1406 transformers_set_seed(random_state)
   1408 if isinstance(model, PeftModelForCausalLM):
-> 1409     raise TypeError(
   1410         "Unsloth: Your model already has LoRA adapters. No need to run this again!"
   1411     )
   1412 pass
   1414 if loftq_config is None: loftq_config = {}

TypeError: Unsloth: Your model already has LoRA adapters. No need to run this again!

Can someone please suggest me what changes are required to perform fine-tuning with different LoRA config than the CPT?
Also, if I ignore applying new LoRA config and use the same applied during the pre-training, the loss doesnt seem to be converging at all.

Hmm I think it was a known issue actually on reloading runs - itll get NaNs - tbh im not sure why yet - my recent change today might have solved it, but unlikely - it'll be great if you could try it out :)
To update Unsloth:
pip uninstall unsloth -y
pip install --upgrade --force-reinstall --no-cache-dir git+https://github.com/unslothai/unsloth.git

is there any update on this issue?

@erkara Apologies on the delay - is there still an issue - would it be possible to open a new Github issue thanks


Redirect response on file download request

The Waterbutler API appears to have recently started sending redirect responses to file download requests. If we try to download a file in OpenSesame, which uses the QOpenScienceFramework library, we receive a response like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>

Redirecting...

You should be redirected automatically to target URL: https://accounts.osf.io/login?service=https://osf.io/download/y2rmh/.  If not click the link.
</DOCTYPE>
...

The QOpenScienceFramework library uses the download link provided by the data > links > download attribute of a file node (which for example looks like https://osf.io/download/570f7496594d9001e668da0c/), and is able to handle HTTP 301 and 302 redirect requests, which to my knowledge is the conventional way of redirecting. My hunch is that Waterbutler performs this redirect in a less conventional manner. I haven't been able to check this, but perhaps Waterbutler issues a normal HTTP 200 response to show the "You are being redirected" page, and then redirects to the download with a meta tag or javascript?
This error is also discussed at https://github.com/dschreij/QOpenScienceFramework/issues/13

Some new info:
I have checked the request/response process and found the following:
GET https://osf.io/download/y2rmh/
RESPONSE 302
Redirecting to https://accounts.osf.io/login?service=https://osf.io/download/y2rmh/
GET https://accounts.osf.io/login?service=https://osf.io/download/y2rmh/
RESPONSE 200

So, GET https://osf.io/download/y2rmh indeed results in a 302 REDIRECT response, which is correctly caught and handled by our application. It then does go to the redirect URL: GET https://accounts.osf.io/login?service=https://osf.io/download/y2rmh/ and receives a 200 OK response. This final response should contain the file data, but this isn't the case: I receive the contents as described in the issue above. If I open the same link in a browser, I do get the file. I can't really put my finger on what's going on here, but I still suspect the actual redirect is performed by the browser through some script or a `?

Hey @dschreij,
That file is private, meaning you need to provide credentials to download them.  I think either http basic auth or a personal access token should let you grab it.
Cheers,
Fitz

Hi @Fitz, Thanks for the reply.
I know the file is private, but I am logged into the system and possess a valid API token. At least, the QOSF module successfully pulls all other (private) information from the server, so it's only the file download where this problem occurs.

Hey @dschreij,
Apologies, I skimmed your example and thought that was a curl command.  I'm not sure what's going on here.  It looks like the OSF auth is failing so it's sending a login link instead of the link to waterbutler.  I'll poke the OSF devs and see if we changed anything with our auth recently that might have broken this.

It turns out the issue has already been reported, and there's a ticket to fix it here: https://github.com/CenterForOpenScience/osf.io/pull/8239  Since this doesn't involve WB directly, I'm going to close this issue, but I'll link this PR over on the QOSF issue.

Thanks for looking into this @felliott! I guess we'll just wait it out for while then if you guys are working on it.


Remove RSC mention and mention save

RSC is no longer needed so removing that. Also the step to save the changes was missing.

Thanks Dana. I had already updated the document.


Analyzing  blocks in spoon.

In class MEDAnalyzer, you just deal with method and constructor, but this analyzer cannot analyze  block which might appear in stack trace, e.g.,
 at org.apache.commons.codec.net.URLCodec.<clinit>(URLCodec.java:83)

the corresponding code is,
// Static initializer for www_form_url
static {
    // alpha characters
    for (int i = 'a'; i <= 'z'; i++) {
        WWW_FORM_URL.set(i);
    }
    for (int i = 'A'; i <= 'Z'; i++) {
        WWW_FORM_URL.set(i);
    }
    // numeric characters
    for (int i = '0'; i <= '9'; i++) {
        WWW_FORM_URL.set(i);  /*** LINE 83 ***/
    }
    // special chars
    WWW_FORM_URL.set('-');
    WWW_FORM_URL.set('_');
    WWW_FORM_URL.set('.');
    WWW_FORM_URL.set('*');
    // blank to be replaced with +
    WWW_FORM_URL.set(' ');
}

Interface CtAnonymousExecutable can analyze the static block (i.e., ) of code.

static block might appear in stack trace in the form of <clinit>. The solution of analyze these static block is using interface spoon.reflect.declaration.CtAnonymousExecutable in spoon. See apidocs in,

http://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/


Missing geo_data.csv and classifier.pickle.gzip missing in project

Read the "Disclaimer" section in README.md
It says that training data is not included in this repository.
We were not allowed to make it public.