SILKIT-1529 Harmonize CLI of commandline utilities

Subject

Commandline utilities Registry, Monitor and System Controller behaved differently for the user:

Not all used OS signals to shutdown the tool, some required the user to press Enter to shutdown.
Some utilities by default waited for an additional Enter to terminate after shutdown.

Description

Changes:

Commandline utilities Registry, Monitor also use an OS signal handler to detect termination requests.
Users can now terminate via Ctrl-C instead of Enter key. This behavior was already implemented for the System Controller.
System Controller option '--non-interactive' is deprecated and enabled by default.
Registry option '-s, --use-signal-handler' is deprecated and enabled by default if not started as '--windows-service'.
An interactive mode '-i' can be used to ask user for Enter key to end process after shut down.

Instructions for review / testing

Things to check

Testing: Run demo e.g. Demos/Can, including a Monitor with  LogFromRemotes: true and participants logging to it via Remote sink.

Show help via -h of System Controller, Monitor and Registry: Same as on the updated page of our documentation? None of the deprecated options --non-interactive and --signal-handler listed?
Terminate System Controller, Monitor and Registry via [Ctrl-C]: Should work
Run Monitor and Registry with and without -i: When active, is there a prompt on start to press [Ctrl-C] to shutdown, and another prompt to press [Enter] after shutdown, allowing to read all text? Does [Enter] terminate the process?
(Note: Monitor keeps forwarding remote log even after termination)
Try deprecated options: Are sil-kit-system-controller --non-interactive and sil-kit-registry --signal-handler still accepted but ignored when used?

Code review

Developer checklist (address before review)

[X] Changelog.md updated
[ ] Prepared update for depending repositories
[X] Documentation updated (public API changes only)
[ ] API docstrings updated (public API changes only)
[ ] Rebase → commit history clean
[ ] Squash and merge → proper PR title

As suggested by @VDanielEdwards, an alternative to introduce option `--interactive'  is to deploy a Windows batch script which  pauses our utilities after execution, for example:
run-and-pause.cmd
@echo off

if ["%~1"]==[""] goto usage
%* && pause || pause
exit /b %errorlevel%
goto :eof

:usage
@echo Execute a command line program and then prompt the user to press a key.
@echo Usage: run-and-pause ^<executable^> ^[^<argument1^> ^[^<argument2^> ...^]^]
exit /b 1

Downside: When the user uses [Ctrl+C] to signal the executed tool to shutdown, the signal is subsequently forwarded to Windows cmd, which asks to Terminate batch job (Y/N)?. This behavior cannot be suppressed to my knowledge.


Add authentication and S2IT's email validation

I added the authentication controller in order to prevent unauthenticated users to access the main page.
I also added an e-mail validation, so that only emails with the domain of S2IT (s2it.com.br) can register. I think in the future we can improve it by making a check of user existence in the domain of S2IT.
I am open to any change that is needed in this PR.

I added the VALID_EMAIL_DOMAIN_REGEX and changed the validation error message.

You can setup the devise to connect on the LDAP server too.. S2IT has one..

@duduribeiro Thank you for your insights! I'll consider this when I get back to work on this project. But, in the meantime, feel free to contribute. :smile:


Update: Introduce mutation tracking query helper

This updates #92 for latest master

User should be able to convert Mut<'a, T> into &'a mut T, which is now impossible as there's only DerefMut which returns mutable reference with lifetime limited by Mut value itself.

Exactly

Closing in favor of https://github.com/Ralith/hecs/pull/366, which is more ergonomic and should perform better in most cases.

It would be prudent to close this after #366 is merged.


yurthub: stop renew node lease when kubelet's heartbeat is stopped

What type of PR is this?
/kind bug

Uncomment only one  /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage
/sig storage

What this PR does / why we need it:
yurthub: stop renew node lease when kubelet's heartbeat is stopped
Which issue(s) this PR fixes:

Fixes #420
Special notes for your reviewer:

/assign @rambohe-ch @Fei-Guo
Does this PR introduce a user-facing change?

yurthub: improve the healthy check mechanism when kubelet's heartbeat stopped

other Note

@SataQiu please fix the conflicting files.

Thanks @rambohe-ch @Fei-Guo
Updated!


Is GitStorage ready to use?

I've tried to set PORTIA_STORAGE_BACKEND as 'storage.backends.GitStorage', but end up an error :
`
File "/app/portia_server/storage/backends.py", line 72, in get_projects

dirs, _ = cls('').listdir('')

File "/app/portia_server/storage/backends.py", line 295, in listdir

for p in self._working_tree:

AttributeError: 'GitStorage' object has no attribute '_working_tree'

`
After reading the code, I realized that when initialized with an empty string,  'GitStorage' object return without assignment of quite a few attributes. I wonder whether this feature is ready or not , if ready, what should I do to implement it. Sorry for my poor  English. @ruairif

@SimeonZhang You can try using this PR and report any issues you find https://github.com/scrapinghub/portia/pull/823

@ruairif Thanks for your support. I've tried it and everything seems okay except that when publishing the project I got the response data with its key 'meta' missing.
It seems that I should get something like:
 {"data": {...},"included":{...},"meta":{...}}
but this is what I've gotten:
 {"data": {...},"included":{...}}


Cell-level caching

Context
I work with notebooks that are hard to compute.
If I change one code cell at the end of the notebook, I do not expect that its entire cache will be invalidated and the notebook will be needed to be recomputed.
I want only the dependent cells to be changed.
Proposal
Assumption: Notebooks are executed from top to bottom (I come from Quarto). If we work directly with Jupyter notebooks, imho we don't need caching like this. Jupyter does it pretty well on its own. I don't know if this package attempts to cover this case as well.
I'd propose a cell-level cache.
We would remember each cell individually.
If its source code or output of that cell changes, we would only recompute the changed cell and all cells that came after.
This would greatly improve performance when prototyping a notebook because we would only recompute dependent cells.
I assume there is like 100 problems that I don't see. If you see any, please fill me in. It's also possible that this is a problem of Quarto and I missjudgedmisjudged the scope of this project.
Tasks and updates
Later if the proposed solution is viable.

Heya, Well the key problem (and for https://github.com/jupyter/nbclient/issues/248) is what would you cache?
You can't start execution half way through a notebook unless you cached the entire state of the kernel, e.g. say you have three cells
a = 1

b = 2

c = a + b

You can't run from cell 3, unless you've cached (and reloaded) the variables a and b
I don't know of an easy way to do this robustly?

Ye, sorry for the (duplicate?) issue. I looked into nbclient and it seemed like it might be something needed to be done in nbclient, though I'm not totally sure. I didn't see a method to skip the cache execution.
Ye that's true. I gave it a thought today and it might be done by serializing the entire kernel by dill. It has a function for that: dill.dump_module (previously dump_session). It supports all serialization of all base objects except for frame, generator, traceback. Works for pandas etc.. However, if some object that was used in the notebook wasn't supported by dill, it is always possible to use the current implementation of caching.
To make the caching efficient, we could make something like a check-point system: a checkpoint could be made after nth cell that would serialize the entire state. Each checkpoint would have a hash made of cell's source codes up to this cell. If any of the source codes changed, the cache could be invalidated.
Further optimization could be made to prevent cache from being so memory hungry, such as:

Developer usually modifies e.g. last 10 cells. The previous checkpoints could be much sparser and thus save the memory.
We could measure, which cells take the most of the execution time (threshold or statistics based on the previous executions) and we could make the cache right after that cell and drop some of the others.
Drop some of the caches with time with strategy like LFU? (Least Frequently Used) It would locate the checkpoints that weren't used for a long time and delete them on the next run.
... ?

The main things that need to be imo tested:

Dill and some libraries people tend to use in their books / reports. Pandas (already tested), numpy, scipy, tensorflow, matplotlib, plotly etc.
Dill's performance for big objects, such as large pandas dataframe or large numpy (large numpy should be ok based on this SO post.

I'm very interested in your opinion about these suggestions. I could also potentially help with some of the tasks.

@chrisjsewell Will you accept PR if someone manages to come up with a good solution? (probably taking some inspiration from knitr)

Heya yeh definitely interested thanks


Release package

This is being blocked by game_controller_spl_interfaces package not being available in the ros2 testing repos yet. This should be resolved in a few days, once the game_controller_spl releases are merged in rosdistro.
Release status

[ ] rolling

[x] generate changelog
[x] prepare release (bump major, 4.0.0)
[ ] release

[ ] iron

[ ] generate changelog
[ ] prepare release (bump minor, 3.1.0)
[ ] release

[ ] humble

[ ] generate changelog
[ ] prepare release (bump minor, 2.1.0)
[ ] release

Closing, as completed


Updated FeatureDefinitions, tests and Description

FEATURE DEFINITIONS:

FeatureDefinitions.md updated to have new descriptions from the tremor paper

TESTS:

test_utils updated for window_signal
test_get_tapping_features, now includes test for depress_threshold parameter

DESCRIPTION:
Added the following line to Description
Encoding: UTF-8
to get rid off the following warning
roxygen2 requires Encoding: UTF-8

rxoygenized the package

Addresses issues:

#76 (look at issue for detailed comment)
#83
#84
#85 (look at issue for detailed comment)

The 10 failing tests on Travis are due to #103 . Only one test failed running devtools::test() in my local environment.

@th1vairam,
I agree with @philerooski on this.
I also got one test failure on my computer when I run devtools::test(), and it is the one regarding the tag_outlier_windows_, i.e #85

@philerooski can you download and run devtools::test() on your local branch now?
I have updated the PR regarding #85

Major changes to test_utils  …

Almost all tests now have a hardcoded(HC) example, the data for these is stored in R/sysdata.rda, unexposed to the user(i.e ::: instead of ::)
The ones that do not have a HC, have been mentioned in issues


BabylonJS Editor not working

Hi there,
I'm working on a scene exported from Unity 5, and I'm having an issue with the online editor located here : http://www.babylonjs.com/editor/
I'm trying to find an easy way to edit the .babylon file (as the scene is not correctly exported and looks really ugly).
I can successfully import my scene there : http://www.babylonjs.com/sandbox/
But I can't import it in the editor, as it's throwing me something about babylon.js, saying that "isInFrustrum" can not be read on an undefined object...
Before you ask, I can't share the .babylon file.

Hello,
It will be difficult to investigate without the babylon file... But I can already say that if it's working in the sandbox, the editor is the problem here. The Unity exporter uses the last version of Babylon, and I'm sure the editor is not using the same.
Can you at least share the whole stacktrace of the error you have in the console ?
Thanks.

The editor is using a very old version of the framework. This is probably a bug that was already fixed.

I'm going to try to update the editor to use the last version of babylon.js. The problem is that it could break the editor itself as it has some dependencies on the previous version of babylon.js as far as I remember. Will test that today and let you know.

Little update, I tried exporting my scene from Blender, as the exporter is a lot better with Blender and allows me to craft my scene, do some texturing and great materials, and export them as they look in Blender to BabylonJS. However, I still have some small issues, like a light not displaying specular on objects around it (I can't get both a shadow and a specular map, and I would like to see in the editor how this light is configured once loaded, as it seems to be properly configured in the .babylon file)...
Now when I try to import my scene to the Editor, it's throwing me a 404 error, saying it couldn't find http://www.babylonjs.com/editor/null (but it could be related to the ongoing update ?), it's also telling me that undefined is not a function on line 2895 in Babylon.js.

I've just updated the editor by referencing v1.13 (we're currently 2.2beta) as this is the only version that seems to not break everything in the editor.
You can now drag'n'drop a Unity scene into the Editor.
Please note that this Editor was a project created by one of our intern and it's not maintained anymore. Please rather use our official sandbox tool with the debug layer, it's much more stable & upt to date.

I won't support this editor anymore. But you can still use this one if you want: https://github.com/BabylonJS/Editor

Or use directly http://reath.free.fr/babylon to use the editor Deltakosh mentionned


v0.11.1 release plan

PRs nearing readiness for merge:

[x] #2055
[x] #2170
[ ] #2190
[x] #2191
[x] #2192
[x] #2206
[x] #2213
[x] #2215
[x] #2217
[x] #2219
[x] #2222

Let's plan to finalize and tag the release by the end of this week.

#2192 if reviewers have time. Should be a fairly straightforward one

#1708? Noticed it when randomly browsing PRs, at quick look over it looks complete save for the whatsnew entry?

#1708? Noticed it when randomly browsing PRs, at quick look over it looks complete save for the whatsnew entry?

Not ready. I don't know how to retract an approval.


Fix rare case where the file info poller will re-process old files

We found a case where on devnet, the reward indexer would re-process old files after cleaning out the files processed table. This is due to the offset being further back in time than the oldest file in the files processed table due to a burst of files. This PR fixes that by checking for a full files processed table, and if it is full limiting the offset to be at most the oldest timestamp in the table.

This PR still exhibits a bug that could occur when the cleaner runs 12 hours after boot.  Closing in favor a solution to only modifies the cleaning algorithm.


Check that clients for all scalers are correctly closed

Check all scalers and inspect the parts of the code where there is the client connecting to the target event source. It is usually in GetMetrics(). Check that the client opened to get the metrics and data is then properly closed, either in the same part of the code where it has been opened or in theClose() (this is preferred) call.
For reference check this PR for GCP PubSub that is closing a client: https://github.com/kedacore/keda/pull/1087
As part of the issue, we should check all scalers and confirm that the clients are properly closed, if there are some that needs to be closed a PR with the fix should be opened.

Hi @zroubalik, I would like to take this issue. This seems an interesting issue and a good place to start with development. Secondly while looking at the code, I found other possible bug areas related to clients. For example, in keda/pkg/scalers/artemis_scaler.go:166 we are creating a new http.Client again and again. This is not a standard practice. As per thehttp.Clientdocumentation itself, The Client's Transport typically has internal state (cached TCP  connections), so Clients should be reused instead of created as needed. Clients are safe for concurrent use by multiple goroutines.. This problem seems to have migrated to all scalers clients. I would like to take this also. Since I am new to this codebase, I might be missing a thing or two. Do let me know If I am moving in the wrong direction.

@aman-bansal hi, thanks, that's great. Yeah I am aware of the problem of recreating the clients and that it is not ideal. But as you have mentioned, this applies to the all scalers and it was originally designed this way. To change this a bigger code change and broader discussion is required as it is not that simple.
I'd recommend to split those efforts into a separate issues. So please go ahead with this issue and I will create another one, where we can discuss the next approach.

Sounds good and reasonable. Thank you so much :+1: . I will start right away.

Hi @zroubalik, I have raised the PR. There were two scalers whose client connections were not closed properly. I have fixed that. Keeping things consistent I have take inspiration from other implementations of scaler's like redis_streams_scaler. This PR along with #1087 should fix scaler's connection close issue. Please review it once.

how we can trigger a single workflow after all other workflows are completed in github actions?


Please consider dual-licensing under MIT/Apache

The Apache 2.0 license is incompatible with GPL version 2, which means programs under that license can't use the filebuffer crate.  Most of the Rust ecosystem uses a dual-license of MIT and Apache 2.0, rather than just Apache 2.0, for the specific reason of providing such compatibility.  Would you consider using the same dual-license for filebuffer?

There is a note about GPLv2 in the readme. I am not a lawyer and I prefer a licensing situation that I think I understand over one that I do not fully understand the implications of. For thread-id I made an exception because there is hardly anything worthy of copyright in there.
Do you have an actual use case for this crate where this is a problem?

@ruuda I'm not a lawyer either, though I do work professionally with FOSS licensing.
One of the reasons people commonly prefer Apache 2.0 is that when someone submits a patch, they're granting a patent license.  Dual-licensing under Apache 2.0 and MIT provides the same benefit, because when developers submit patches, they're doing so under both licenses (which you can state in the README).  See, for instance, the license and contribution note at the bottom of the README for https://github.com/serde-rs/serde .
For practical issues, see for instance https://github.com/jameysharp/static-ldd#license .
Other practical use cases: writing a virtual machine in userspace, using filebuffer to mount disk devices, and borrowing code from the Linux kernel or QEMU (both GPLv2) as part of writing their virtual drivers.

If you want to use Filebuffer in your GPLv2-licensed software, you can add an exception to your copyright notice.

IANAL, but to my best knowledge, adding an exception to your copyright notice is basically a change of licensing terms and therefore requires the consent of all contributors. And this is nearly impossible for many (L)GPLv2 projects that have amassed a number of contributors, like the Linux kernel or QEMU.

I have thought about this for a few days, and I have decided to not change the license.


The returned result is HTML. How can I get the JSON containing the image address

The returned result is HTML. How can I get the JSON containing the image address

Hi @ents1008,
Please follow the documentation mentioned in the README here.
The endpoint you need to call to get the JSON response for a random image would be like so -
GET https://foodish-api.herokuapp.com/api
To get a JSON response for a specific category (say, pizza) would be -
GET https://foodish-api.herokuapp.com/api/images/pizza


feat: auth

based on #26, merged master and moving into main repo to make development easier.

Design plan:
When first visiting the page:

checks if there is a valid token stored

if so, attempt to connect to soss using the token, show a loading "page" while this is going on

if connection successful, start downloading building map (don't show the dashboard yet)
if all successful, show the dashboard
if connection fail, show an error message and go to the login page

if no token is saved, go to login page

login page:

instead of presenting a user/password form, present a button to login with rmf
clicking the button will redirect to rmf's oauth login page
if authentication is successful, redirect to the landing page, javascript stores the token in local storage

Mock ups:
login page:

landing page:

changed branch


resources required for training with 72b language models

Hi, thanks for your great work. I was wondering the how many gpus are needed to training llava-next with 72b llm.

minimal 128 gpus with 80g each (h100/800 or a100/800).

Thanks for your answer! However, I guess we will also need model parallelisation even with 80G GPUs. This is not set in the training code, should we add device_map='auto' when loading the model?

Thanks for your answer! However, I guess we will also need model parallelisation even with 80G GPUs. This is not set in the training code, should we add device_map='auto' when loading the model?

You dont need to set this, since deepspeed zero3 already handled this.


Fix inline nesting

Currently this:
.row: .col-lg-12: p Hello World

gets compiled into:

<col-lg-12>p Hello World</col-lg-12>

With this PR it becomes:

Hello World

Hi, @feymartynov, thanks for your PR! Could you please add end-to-end rendering test case for this bug?

Sure, will do it.
I also missed mixed nesting case which is more close to real life:
.wrap: .row: .col-lg-12
  .box: p One
  .box: p Two
p Three

=>

One

Two

Three

That's a bit more tricky but I'll try.

@Rakoth check it out please.


DUPLO-13029: Correcting document

Task linked: DUPLO-13029 TF:Doc: duplocloud_tenant reference is wrong in gcp_scheduler_job


Improve Jira integration's "commented" event notification.

Currently, our Jira integration supports comment-related events. However, when a comment includes a mention of other users, the webhook payload does not include the display name of the mentioned user. As a result, it is formatted using the account ID.
The comment in Jira:

The notification in Zulip:

The payload for the notification above:

{
  "timestamp":<PHONE_NUMBER>985,
  "webhookEvent": "comment_created",
  "comment": {
    "self": "https://peteririri.atlassian.net/rest/api/2/issue/10002/comment/10003",
    "id": "10003",
    "author": {
      "self": "https://peteririri.atlassian.net/rest/api/2/user?accountId=619a4432ebce470067f20384",
      "accountId": "619a4432ebce470067f20384",
      "avatarUrls": {
        "48x48": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "24x24": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "16x16": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "32x32": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png"
      },
      "displayName": "Peter",
      "active": true,
      "timeZone": "Asia/Jakarta",
      "accountType": "atlassian"
    },
    "body": "[~accountid:619a4432ebce470067f20384] [~accountid:63a22fb348b367d78a14c15b] ",
    "updateAuthor": {
      "self": "https://peteririri.atlassian.net/rest/api/2/user?accountId=619a4432ebce470067f20384",
      "accountId": "619a4432ebce470067f20384",
      "avatarUrls": {
        "48x48": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "24x24": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "16x16": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png",
        "32x32": "https://secure.gravatar.com/avatar/338c91613dac07cd4bd32682a494fe66?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-5.png"
      },
      "displayName": "Peter",
      "active": true,
      "timeZone": "Asia/Jakarta",
      "accountType": "atlassian"
    },
    "created": "2024-07-31T14:38:13.985+0700",
    "updated": "2024-07-31T14:38:13.985+0700",
    "jsdPublic": true
  },
  "issue": {
    "id": "10002",
    "self": "https://peteririri.atlassian.net/rest/api/2/10002",
    "key": "SB-1",
    "fields": {
      "summary": "asdasd",
      "issuetype": {
        "self": "https://peteririri.atlassian.net/rest/api/2/issuetype/10002",
        "id": "10002",
        "description": "Functionality or a feature expressed as a user goal.",
        "iconUrl": "https://peteririri.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium",
        "name": "Story",
        "subtask": false,
        "avatarId": 10315,
        "hierarchyLevel": 0
      },
      "project": {
        "self": "https://peteririri.atlassian.net/rest/api/2/project/10001",
        "id": "10001",
        "key": "SB",
        "name": "scrum board",
        "projectTypeKey": "software",
        "simplified": false,
        "avatarUrls": {
          "48x48": "https://peteririri.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10401",
          "24x24": "https://peteririri.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10401?size=small",
          "16x16": "https://peteririri.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10401?size=xsmall",
          "32x32": "https://peteririri.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10401?size=medium"
        }
      },
      "assignee": null,
      "priority": {
        "self": "https://peteririri.atlassian.net/rest/api/2/priority/3",
        "iconUrl": "https://peteririri.atlassian.net/images/icons/priorities/medium.svg",
        "name": "Medium",
        "id": "3"
      },
      "status": {
        "self": "https://peteririri.atlassian.net/rest/api/2/status/10007",
        "description": "",
        "iconUrl": "https://peteririri.atlassian.net/",
        "name": "To Do",
        "id": "10007",
        "statusCategory": {
          "self": "https://peteririri.atlassian.net/rest/api/2/statuscategory/2",
          "id": 2,
          "key": "new",
          "colorName": "blue-gray",
          "name": "To Do"
        }
      }
    }
  },
  "eventType": "primaryAction"
}

To improve notification for this event, we want to do a callback to this Jira API to fetch the display name of the mentioned user.
Other resource:

Generate API token for Jira user

CZO thread

@zulipbot add "area: integrations"

@zulipbot claim

Hey @ZetaSpark, it seems you might have missed that this issue is already assigned to me, and I’ve been actively working on it. I’ve already resolved it and will open a PR soon (currently tied up with uni exams). also good effort but it seems your approach isn’t generic enough. To save time, please focus on unclaimed issues—working on already assigned ones doesn’t make sense. You can refer to the Guidelines for more details. Thanks!

Hey @ZetaSpark, it seems you might have missed that this issue is already assigned to me, and I’ve been actively working on it. To avoid overlapping efforts, you can tag the assignee to check if they're actively working on it. You can also refer to the Guidelines for more details. Thanks!

@zulipbot claim


Lost in contributing...

Something goes wrong all the time :-(
So decided to upload et.json translation here, maybe it works this way until I sort out what is going wrong :-)
Best and TIA, JR
et.zip

Thanks!


Add a connection to a local MongoDB instance through a separate file

Include erorr handling in that file for connection failures

I can do this.......


[IOS] react-native-permissions: NativeModule.RNPermissions is null

Bug summary
Error: react-native-permissions: NativeModule.RNPermissions is null. To fix this issue try these steps:
• If you are using CocoaPods on iOS, run pod install in the ios directory and then clean, rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
• If you are getting this error while unit testing you need to mock the native module. You can use this to get started: https://github.com/react-native-community/react-native-permissions/blob/master/mock.js
If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-permissions.
I try pod install and re-run but it not working.
Library version
3.6.1
Environment info
"react": "17.0.1",
"react-native": "0.64.0",
"react-native-permissions": "^3.6.1",

Steps to reproduce

pod install
run by X Code

Reproducible sample code
permissions_path = '../node_modules/react-native-permissions/ios'

 pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
 pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
 pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
 pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"

I have this error on android help

I managed to solve it by dowgrading to version 3.3.1

I managed to solve it by dowgrading to version 3.3.1

It is work. Thanks you.

Locking the version / removing the ^ worked for me. Currently using 3.6.1.
"react-native-permissions" : "3.6.1"

Duplicate https://github.com/zoontek/react-native-permissions/issues?q=is%3Aissue+RNPermissions+is+null

I managed to solve it by dowgrading to version 3.3.1

This worked for me too, thanks!


inconsistent VMM builds

Description of problem
Seems there are some inconsistencies on how we build the VMMs, and in particular QEMU for snap versus static tarball versus packages.
Expected result
They should use the same settings for ./configure, as well as the same kconfig options
Actual result
Only snap uses kconfig

Julio, since you added the Kconfig snap, I'm hopeful that this'll be easy for you to look at.  Can you help?
/assign @devimc

This issue is being automatically closed as Kata Containers 1.x has now reached EOL (End of Life). This means it is no longer being maintained.

Important:
All users should switch to the latest Kata Containers 2.x release to ensure they are using a maintained release that contains the latest security fixes, performance improvements and new features.

This decision was discussed by the @kata-containers/architecture-committee and has been announced via the Kata Containers mailing list:

http://lists.katacontainers.io/pipermail/kata-dev/2020-November/001601.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-April/001843.html
http://lists.katacontainers.io/pipermail/kata-dev/2021-May/001896.html

If you believe this issue still applies to Kata Containers 2.x, please open an issue against the Kata Containers 2.x repository, pointing to this one, providing details to allow us to migrate it.


[ENH] Remove HC2 flag save_component_probas

Describe the feature or idea you want to propose
HC2 has the constructor option of whether to store components
        if self.save_component_probas:
            self.component_probas = {
                "STC": stc_probas,
                "DrCIF": drcif_probas,
                "Arsenal": arsenal_probas,
                "TDE": tde_probas,
            }

I dont really see the need for this option, unless there is a reason I am missing.
Describe your proposed solution
remove the parameter save_component_probas and always store in self.component_probas_ instead
Describe alternatives you've considered, if relevant
No response
Additional context
No response

oh hang on, component probas is not what I had assumed it to be


Address situation when getBaseVersion() must wait for state to persist

Resolves: https://jira.duraspace.org/browse/FCREPO-2053

Note: Ideally this PR should be verified by @dchandekstark before being merged with master.

Is this still waiting on a response from @dchandekstark?

We are no longer experiencing the problem, so I don't have a strong opinion about merging the PR.

Closing as "can not reproduce".


Update mocks to allow for more UI to appear

Description of the changes:

Currently the community cannot access a lot of the features for the Graphing UI because most equations will return as errors, this change fleshes out the mocks so that more of the UI can be accessed (analyzer, equation colors, variables).
Would be nice in the future to add mock data to the analyzer for a full view instead of an error page

How changes were validated:

Manual tests

The code looks good. Testing it, I wasn't expected the variables UI with my equation. You might want to add a section to the readme to describe the mock behavior.

There actually already is a section referencing the mock implementation!


[BUG] RewardSum not working with ParallelEnv

Describe the bug
When using the RewardSum transform within a ParallelEnv, cumulative reward is not computed; instead, the ('next', 'episore_reward') key contains the instantaneous reward.
To Reproduce
Script to reproduce observed behaviour:
from torchrl.envs.libs.gym import GymEnv
from torchrl.envs import TransformedEnv, ParallelEnv
from torchrl.envs.transforms import RewardSum

def make_env():
	e = GymEnv("CartPole-v1")
	e = TransformedEnv(e, RewardSum())
	return e

if __name__ == '__main__':
	e = make_env()
	print(e.rollout(100)['next', 'episode_reward'])

	pe = ParallelEnv(2, make_env)
	print(pe.rollout(100)['next', 'episode_reward'])

tensor([[ 1.],
        [ 2.],
        [ 3.],
        [ 4.],
        [ 5.],
        [ 6.],
        [ 7.],
        [ 8.],
        [ 9.],
        [10.],
        [11.],
        [12.],
        [13.],
        [14.],
        [15.],
        [16.],
        [17.],
        [18.],
        [19.],
        [20.],
        [21.],
        [22.],
        [23.],
        [24.],
        [25.],
        [26.]])

tensor([[[1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.]],

        [[1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.],
         [1.]]])

Expected behavior
The ('next', 'episore_reward') key in the rollout tensordict returned by ParallelEnv should contain the cumulative reward.
System info

Python 3.10.12
torch 2.0.1

import torchrl, numpy, sys
print(torchrl.__version__, numpy.__version__, sys.version, sys.platform)

0.1.1 1.25.1 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] linux

Additional context
The issue seems to not affect the SerialEnv class.
Checklist

[x] I have checked that there is no similar issue in the repo (required)
[x] I have read the documentation (required)
[x] I have provided a minimal working example to reproduce the bug (required)

Can you have a look at #1454?

For some reason I am unable to run the code.
When cloning the fix branch and trying to execute the code with the updated transform, I get ImportError: cannot import name 'unravel_key' from 'tensordict'.
Also, I tried to subclass RewardSum (from current torchrl pip release) and adding only the new method implemented in #1454, but I get KeyError: '_state_spec'.

You need the latest version of tensordict too. You can install it via a clone of the GitHub repo or tensordict-nighlty on pypi.

You need the latest version of tensordict too. You can install it via a clone of the GitHub repo or tensordict-nighlty on pypi.

Hello! I had the same issue about the unravel_key from tensordict and followed your instructions to install tensordict using the GitHub repo. I am now getting a new error:
    from tensordict import PYTREE_REGISTERED_TDS, TensorDict
ImportError: cannot import name 'PYTREE_REGISTERED_TDS' from 'tensordict' (unknown location)

Would anyone happen to know what's wrong? For context, I am running on an M1 Macbook

You need the latest version of tensordict too. You can install it via a clone of the GitHub repo or tensordict-nighlty on pypi.

Hello! I had the same issue about the unravel_key from tensordict and followed your instructions to install tensordict using the GitHub repo. I am now getting a new error:
    from tensordict import PYTREE_REGISTERED_TDS, TensorDict
ImportError: cannot import name 'PYTREE_REGISTERED_TDS' from 'tensordict' (unknown location)

Would anyone happen to know what's wrong? For context, I am running on an M1 Macbook

You could try to make sure you don't clone the repo to a directory named 'tensordict'. It confuses pythons module lookup.

You need the latest version of tensordict too. You can install it via a clone of the GitHub repo or tensordict-nighlty on pypi.

Okay, I confirm that with the latest tensordict version the bug is gone.

Would anyone happen to know what's wrong? For context, I am running on an M1 Macbook.

I had a similar import error when installing tensordict-nightly via pip, but installing with pip install git+https://github.com/pytorch-labs/tensordict.git solved the issue.

Could be that you did not uninstall the other tensordict. One is named tensordict-nightly and the other tensordict and I think importlib gets the latter by default.


Support Rolling Upgrades for the cockroachdb installed through helm chart

Rolling Upgrade for cockroach db statefulset:
Every pod of statefulset should be upgraded one by one and it should wait for the cockroach db cluster to be ready state before upgrading to the new cluster.
Currently, helm chart will upgrade the statefulset in rolling upgrade but it doesn't wait for cockroach cluster to be ready before it upgrades to the next replica.
Proposed Solution:
We already have self-signer utility for certificate management, we can expand that utility to do rolling start as well. This utility will have a sub command of rolling-restart and this will upgrade the statefulset into rolling restart fashion and wait for cockroach db cluster to be ready before upgrading the next pod. We are already doing this for the cockroach operator
This utility will be invoked as pre-upgrade command and can be enabled or disable through the values.yaml.

@udnay Please share your thoughts on this

This approach seems fine to me, @chrisseto @pseudomuto anything totally off with this before @prafull01 writes up a more detailed RFC?


grpc: Allow user defined grpc status

Description: This fix is a branch of issue #8053. User defined grpc-status is allow on grpc specification so that it is truly handled on envoy grpc-json transcoding
Risk Level: Low
Testing: Unit Test
Docs Changes: none
Release Notes: none
[Optional Fixes #8053]
[Optional Deprecated:]

@Shikugawa can you merge master and resolve conflicts?


[bug] gulp vscode-win32-zip failed

TypeError: electron.zfsdest is not a function.
https://github.com/Microsoft/vscode/blob/master/build/gulpfile.vscode.js#L242
electron.zfsdest has removed
https://github.com/joaomoreno/gulp-atom-electron/commit/b04fd5829b5ddff7e81f105c6d6ffb0a406583c9
@joaomoreno

Removed those targets.

Verified that those targets are gone.


Read

Useful links found in the book

TransformersLibrary

references

Hands-On Machine Learning with Scikit-Learn and TensorFlow, by Aurélien Géron (O’Reilly) Deep Learning for Coders with fastai and PyTorch
Deep Learning for Coders with fastai and PyTorch, by Jeremy Howard and Sylvain Gugger (O’Reilly)

github code run
Transformers Notebooks
This repository contains the example code from our O'Reilly book Natural Language Processing with Transformers:

Getting started
You can run these notebooks on cloud platforms like Google Colab or your local machine. Note that most chapters require a GPU to run in a reasonable amount of time, so we recommend one of the cloud platforms as they come pre-installed with CUDA.
Running on a cloud platform
To run these notebooks on a cloud platform, just click on one of the badges in the table below:

Chapter
Colab
Kaggle
Gradient
Studio Lab

Introduction

Text Classification

Transformer Anatomy

Multilingual Named Entity Recognition

Text Generation

Summarization

Question Answering

Making Transformers Efficient in Production

Dealing with Few to No Labels

Training Transformers from Scratch

Future Directions

Nowadays, the GPUs on Colab tend to be K80s (which have limited memory), so we recommend using Kaggle, Gradient, or SageMaker Studio Lab. These platforms tend to provide more performant GPUs like P100s, all for free!

Note: some cloud platforms like Kaggle require you to restart the notebook after installing new packages.

Running on your machine
To run the notebooks on your own machine, first clone the repository and navigate to it:
$ git clone https://github.com/nlp-with-transformers/notebooks.git
$ cd notebooks

Next, run the following command to create a conda virtual environment that contains all the libraries needed to run the notebooks:
$ conda env create -f environment.yml

Note: You'll need a GPU that supports NVIDIA's CUDA Toolkit to build the environment. Currently, this means you cannot build locally on Apple silicon 😢.

Chapter 7 (Question Answering) has a special set of dependencies, so to run that chapter you'll need a separate environment:
$ conda env create -f environment-chapter7.yml

Once you've installed the dependencies, you can activate the conda environment and spin up the notebooks as follows:
$ conda activate book # or conda activate book-chapter7
$ jupyter notebook

FAQ
When trying to clone the notebooks on Kaggle I get a message that I am unable to access the book's Github repository. How can I solve this issue?
This issue is likely due to a missing internet connection. When running your first notebook on Kaggle you need to enable internet access in the settings menu on the right side.
How do you select a GPU on Kaggle?
You can enable GPU usage by selecting GPU as Accelerator in the settings menu on the right side.
Citations
If you'd like to cite this book, you can use the following BibTeX entry:
@book{tunstall2022natural,
  title={Natural Language Processing with Transformers: Building Language Applications with Hugging Face},
  author={Tunstall, Lewis and von Werra, Leandro and Wolf, Thomas},
  isbn={1098103246},
  url={https://books.google.ch/books?id=7hhyzgEACAAJ},
  year={2022},
  publisher={O'Reilly Media, Incorporated}
}


added a new dp problem and working solution. Please review it and merge it

Hello @gantavyamalviya , May I know why this submission is invalid? Please let me know, so I could make required changes and make a new PR.
Thank you

@Eswari-Priya You file in empty, pls check on your end.

Ok, I'm extremely sorry about that, I just added the working code. Please review it and merge it. Thank you @gantavyamalviya

@Eswari-Priya Thanks for your contribution


Tests fail for optional prophet forecasting functionality

Without the installed prophet python package, the integration tests for prophet forecasting functionality (introduced in https://github.com/apache/superset/pull/10324) will be skipped. After installing the optional dependency [prophet] their tests will run but fail.
Upgrading to latest prophet version does not fix the issue.
How to reproduce the bug

pip install "prophet>=1.0.1, <1.1"  "pystan<3.0"
scripts/tests/run.sh --module tests/integration_tests/charts/data/api_tests.py

Expected results
integration tests pass
Actual results
======================================================================================================================= FAILURES =======================================================================================================================
_____________________________________________________________________________________________________ TestPostChartDataApi.test_chart_data_prophet _____________________________________________________________________________________________________

self = <tests.integration_tests.charts.data.api_tests.TestPostChartDataApi testMethod=test_chart_data_prophet>

    def test_chart_data_prophet(self):
        """
        Chart data API: Ensure prophet post transformation works
        """
        pytest.importorskip("prophet")
        time_grain = "P1Y"
        self.query_context_payload["queries"][0]["is_timeseries"] = True
        self.query_context_payload["queries"][0]["groupby"] = []
        self.query_context_payload["queries"][0]["extras"] = {
            "time_grain_sqla": time_grain
        }
        self.query_context_payload["queries"][0]["granularity"] = "ds"
        self.query_context_payload["queries"][0]["post_processing"] = [
            {
                "operation": "prophet",
                "options": {
                    "time_grain": time_grain,
                    "periods": 3,
                    "confidence_interval": 0.9,
                },
            }
        ]
        rv = self.post_assert_metric(CHART_DATA_URI, self.query_context_payload, "data")
>       self.assertEqual(rv.status_code, 200)
E       AssertionError: 400 != 200

tests/integration_tests/charts/data/api_tests.py:470: AssertionError

=============================================================================================================== short test summary info ================================================================================================================
FAILED tests/integration_tests/charts/data/api_tests.py::TestPostChartDataApi::test_chart_data_prophet - AssertionError: 400 != 200
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================ 1 failed, 8 passed, 1 skipped, 6558 warnings in 13.50s ================================================================================================

Environment

superset version: latest master
python version: 3.9

Checklist
Make sure to follow these steps before submitting your issue - thank you!

[x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[x] I have reproduced the issue with at least the latest released version of superset.
[x] I have checked the issue tracker for the same issue and I haven't found one similar.

@john-bodley Can we close this issue given #24129?


[BUG] 'npm test' times out

Description
'npm test' times out, and with a 60000ms timeout time still times out, this is an issue with the repo, as it freezes on the mergePixels test.
Expected Behavior
The test should succeed
Actual Behavior
The test times out.
Steps to Reproduce

Make a fork and clone that fork into a local directory.
run 'npm test'

Context
Trying to make a pull request with a new pixel at 53, 0 [XY] with the correct name and all.
Notes
All other tests succeed.

Hey, I've created a pixel today at (y=4,x=10), tested it & pushed it to remote repo also. @ProjectHSI Assign me this issue or you can try for yourself with different value and make sure that they're unique.

lmao i didn't care about this repo in the first place
i just did it for twilioquest
the only """useful""" thing i did with this was make the pixel art display on a cozmo, and even that doesn't count as anything
useful (that's why i put it in quotes)

also this isn't the pull request, this an issue related with the jest testing suite lol

Stale keeper - not closed by admin

pixel at 7x,8y = npm test timeout.   It worked before that.   I think it has something to do with the repo being out of sync,  try to merge, or delete, create, merge your open commits/PRs whatever.   (also just doing for video I'm making for my daughter of me playing twilio quest.  :P )

A

pixel at 7x,8y = npm test timeout.   It worked before that.   I think it has something to do with the repo being out of sync,  try to merge, or delete, create, merge your open commits/PRs whatever.   (also just doing for video I'm making for my daughter of me playing twilio quest.  :P )

While it'd be great if we could merge it, only admins of the org / those that have write access can merge with the remote repo. Creating or deleting won't do any thing.
Is this repo abandoned?

@brianjpatterson


Suggestion to add sth to identify that labels are generating.

Suggestion for client part: Add a message/progress bar to show that the labels are generating.

Agree, this has been on our backlog for a while, this may be useful:  https://pythonprogramming.net/progress-bar-pyqt-tutorial/


fix sofa rpc log config

Motivation:
to make sofa rpc log can be configured by application.properties
Modification:
in com.alipay.sofa.rpc.boot.SofaBootRpcInitializer
I add a method named initRpcCoreLog which use
com.alipay.sofa.rpc.log.factory.RpcLoggerFactory#RPC_LOG_SPACE

Result:
Fixes https://github.com/alipay/sofa-rpc-boot-projects/issues/37

Any test case?

@khotyn I just tested in local machine. I will try if there has some method could check the logger level.

Codecov Report

Merging #38 into master will not change coverage.
The diff coverage is 0%.

@@          Coverage Diff          @@
##           master    #38   +/-   ##
=====================================
  Coverage       0%     0%
=====================================
  Files          45     45
  Lines        1268   1272    +4
  Branches      210    210
=====================================
- Misses       1268   1272    +4

Impacted Files
Coverage Δ

...m/alipay/sofa/rpc/boot/SofaBootRpcInitializer.java
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 859ef3d...9d50bed. Read the comment docs.

com.alipay.sofa.rpc.test.shutdown.RpcShutdownTest#testRpcGracefulShutdown may close too slow.
sometimes this case will fail. I will add try 3 times after
        ((ConfigurableApplicationContext) applicationContext).close();


Drawer Injects items to DrawerItems ?

💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent<TestNavigationDrawerProps> = ({
  navigation: { navigate },
  state: { routes },
}) => {
  // some code to get props from state

  return (
    <Drawer selectedIndex={new IndexPath(currentIndex)}>
      {questions.map((question) => (
        <QuestionDrawerItem
          correct={question.correct}
          selected={question.selected}
          index={question.index}
          key={question.id}
          navigate={navigate}
          finished={finished}
        />
      ))}
    </Drawer>
  );
};

const QuestionDrawerItem = React.memo<QuestionDrawerItemProps>(
  ({ correct, selected, finished, index, navigate }) => (
    <DrawerItem
      accessoryLeft={(props) => (
        <QuestionStateIcon
          {...props}
          finished={finished}
          selected={selected}
          correct={correct}
        />
      )}
      title={`Question ${index + 1}`}
      onPress={() => navigate("Question", { questionIndex: index })}
    />
  ),
  (prevProps, oldProps) => {
    if (prevProps.index === 0) {
      console.log(`\n\nEntry number ${prevProps.index}`);
      Object.keys(prevProps).map(key => {
        console.log(key, prevProps[key] === oldProps[key]);
      })
    }
    return false;
  }
);

with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true

descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
  "groupIndices": undefined,
  "index": IndexPath {
    "equals": [Function anonymous],
    "row": 0,
    "section": undefined,
  },
}

For now i fixed the issue with this memoization props checking function:
  (prevProps, oldProps) =>
      (prevProps.correct === oldProps.correct) &&
      (prevProps.selected === oldProps.selected) &&
      (prevProps.finished === oldProps.finished) &&
      (prevProps.index === oldProps.index) &&
      (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?

Is it safe to ignore in the memoization?
Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version

Package
Version

@eva-design/eva
2.0.0

@ui-kitten/components
5.0.0

Didn't took me long to realize that yes, it has some problems. The automatic highlighting of the current selected item is gone.
I ended slightly modifying the code to this:
type QuestionDrawerItemProps = {
  correct: string;
  questionSelected?: string;
  finished: boolean;
  index: number;
  navigate: TestNavigationDrawerProps["navigation"]["navigate"];
} & MenuItemProps;

const QuestionDrawerItem = React.memo<QuestionDrawerItemProps>(
  ({ correct, questionSelected, finished, index, navigate, ...menuItemProps }) => (
    <DrawerItem
      {...menuItemProps}
      accessoryLeft={(props) => (
        <QuestionStateIcon
          {...props}
          finished={finished}
          selected={questionSelected}
          correct={correct}
        />
      )}
      title={`Question ${index + 1}`}
      onPress={() => navigate("Question", { questionIndex: index })}
    />
  ),
  (prevProps, nextProps) =>
    prevProps.questionSelected === nextProps.questionSelected &&
    prevProps.correct === nextProps.correct &&
    prevProps.selected === nextProps.selected &&
    prevProps.finished === nextProps.finished &&
    prevProps.index === nextProps.index &&
    prevProps.navigate === nextProps.navigate
);

I don't see a way around this memoization, and i question if it would be possible to have it directly in the MenuItem component.
And to answer my other question, yes this behaviour is document in code. The children of Drawer should be of type ChildrenWithProps<MenuItemProps>.
I hope this monologue helps someone else in the future.

The code of conduct was taken out and the private policy needs to be add the I'd is link master in stead of master change to find the separate trans. Of the writing as well the issue
Powered by Cricket Wireless
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PupoSDC @.>
Sent: Monday, April 5, 2021 1:47:27 PM
To: akveo/react-native-ui-kitten @.>
Cc: Subscribed @.***>
Subject: [akveo/react-native-ui-kitten] Drawer Injects items to DrawerItems ? (#1395)
💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent = ({
navigation: { navigate },
state: { routes },
}) => {
// some code to get props from state
return (
<Drawer selectedIndex={new IndexPath(currentIndex)}>

  {questions.map((question) => (

    <QuestionDrawerItem

      correct={question.correct}

      selected={question.selected}

      index={question.index}

      key={question.id}

      navigate={navigate}

      finished={finished}

    />

  ))}

</Drawer>

);
};
const QuestionDrawerItem = React.memo(
({ correct, selected, finished, index, navigate }) => (
<DrawerItem

  accessoryLeft={(props) => (

    <QuestionStateIcon

      {...props}

      finished={finished}

      selected={selected}

      correct={correct}

    />

  )}

  title={`Question ${index + 1}`}

  onPress={() => navigate("Question", { questionIndex: index })}

/>

),
(prevProps, oldProps) => {
if (prevProps.index === 0) {

  console.log(`\n\nEntry number ${prevProps.index}`);

  Object.keys(prevProps).map(key => {

    console.log(key, prevProps[key] === oldProps[key]);

  })

}

return false;

}
);
with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true
descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
"groupIndices": undefined,
"index": IndexPath {
"equals": [Function anonymous],

"row": 0,

"section": undefined,

},
}
For now i fixed the issue with this memoization props checking function:
(prevProps, oldProps) =>
  (prevProps.correct === oldProps.correct) &&

  (prevProps.selected === oldProps.selected) &&

  (prevProps.finished === oldProps.finished) &&

  (prevProps.index === oldProps.index) &&

  (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?
*   Is it safe to ignore in the memoization?
*   Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version
Package Version
@eva-design/eva 2.0.0
@ui-kitten/components   5.0.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakveo%2Freact-native-ui-kitten%2Fissues%2F1395&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497594981|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=4YbezepePD89qs%2FMVcrOOJIZSvf1D8XZTxDBBkydRuo%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASXJQ5U5BOFJHXIBKCCHTTDTHIAT7ANCNFSM42NIRRCA&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497604942|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=NWK4lcXlpSUZJOMOlz6A1vlNTHth9XCGBq1iQquWdo0%3D&reserved=0.

Found in luling tx area taken from houston tx from kitten prior to the absence.of her presents.
Powered by Cricket Wireless
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PupoSDC @.>
Sent: Monday, April 5, 2021 1:47:27 PM
To: akveo/react-native-ui-kitten @.>
Cc: Subscribed @.***>
Subject: [akveo/react-native-ui-kitten] Drawer Injects items to DrawerItems ? (#1395)
💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent = ({
navigation: { navigate },
state: { routes },
}) => {
// some code to get props from state
return (
<Drawer selectedIndex={new IndexPath(currentIndex)}>

  {questions.map((question) => (

    <QuestionDrawerItem

      correct={question.correct}

      selected={question.selected}

      index={question.index}

      key={question.id}

      navigate={navigate}

      finished={finished}

    />

  ))}

</Drawer>

);
};
const QuestionDrawerItem = React.memo(
({ correct, selected, finished, index, navigate }) => (
<DrawerItem

  accessoryLeft={(props) => (

    <QuestionStateIcon

      {...props}

      finished={finished}

      selected={selected}

      correct={correct}

    />

  )}

  title={`Question ${index + 1}`}

  onPress={() => navigate("Question", { questionIndex: index })}

/>

),
(prevProps, oldProps) => {
if (prevProps.index === 0) {

  console.log(`\n\nEntry number ${prevProps.index}`);

  Object.keys(prevProps).map(key => {

    console.log(key, prevProps[key] === oldProps[key]);

  })

}

return false;

}
);
with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true
descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
"groupIndices": undefined,
"index": IndexPath {
"equals": [Function anonymous],

"row": 0,

"section": undefined,

},
}
For now i fixed the issue with this memoization props checking function:
(prevProps, oldProps) =>
  (prevProps.correct === oldProps.correct) &&

  (prevProps.selected === oldProps.selected) &&

  (prevProps.finished === oldProps.finished) &&

  (prevProps.index === oldProps.index) &&

  (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?
*   Is it safe to ignore in the memoization?
*   Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version
Package Version
@eva-design/eva 2.0.0
@ui-kitten/components   5.0.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakveo%2Freact-native-ui-kitten%2Fissues%2F1395&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497594981|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=4YbezepePD89qs%2FMVcrOOJIZSvf1D8XZTxDBBkydRuo%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASXJQ5U5BOFJHXIBKCCHTTDTHIAT7ANCNFSM42NIRRCA&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497604942|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=NWK4lcXlpSUZJOMOlz6A1vlNTHth9XCGBq1iQquWdo0%3D&reserved=0.

Yes I found this in my files as well as someone else applying to them. It was to his or they were taking something. I opened it to find out who it is.
Powered by Cricket Wireless
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PupoSDC @.>
Sent: Monday, April 5, 2021 1:47:27 PM
To: akveo/react-native-ui-kitten @.>
Cc: Subscribed @.***>
Subject: [akveo/react-native-ui-kitten] Drawer Injects items to DrawerItems ? (#1395)
💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent = ({
navigation: { navigate },
state: { routes },
}) => {
// some code to get props from state
return (
<Drawer selectedIndex={new IndexPath(currentIndex)}>

  {questions.map((question) => (

    <QuestionDrawerItem

      correct={question.correct}

      selected={question.selected}

      index={question.index}

      key={question.id}

      navigate={navigate}

      finished={finished}

    />

  ))}

</Drawer>

);
};
const QuestionDrawerItem = React.memo(
({ correct, selected, finished, index, navigate }) => (
<DrawerItem

  accessoryLeft={(props) => (

    <QuestionStateIcon

      {...props}

      finished={finished}

      selected={selected}

      correct={correct}

    />

  )}

  title={`Question ${index + 1}`}

  onPress={() => navigate("Question", { questionIndex: index })}

/>

),
(prevProps, oldProps) => {
if (prevProps.index === 0) {

  console.log(`\n\nEntry number ${prevProps.index}`);

  Object.keys(prevProps).map(key => {

    console.log(key, prevProps[key] === oldProps[key]);

  })

}

return false;

}
);
with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true
descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
"groupIndices": undefined,
"index": IndexPath {
"equals": [Function anonymous],

"row": 0,

"section": undefined,

},
}
For now i fixed the issue with this memoization props checking function:
(prevProps, oldProps) =>
  (prevProps.correct === oldProps.correct) &&

  (prevProps.selected === oldProps.selected) &&

  (prevProps.finished === oldProps.finished) &&

  (prevProps.index === oldProps.index) &&

  (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?
*   Is it safe to ignore in the memoization?
*   Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version
Package Version
@eva-design/eva 2.0.0
@ui-kitten/components   5.0.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakveo%2Freact-native-ui-kitten%2Fissues%2F1395&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497594981|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=4YbezepePD89qs%2FMVcrOOJIZSvf1D8XZTxDBBkydRuo%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASXJQ5U5BOFJHXIBKCCHTTDTHIAT7ANCNFSM42NIRRCA&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497604942|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=NWK4lcXlpSUZJOMOlz6A1vlNTHth9XCGBq1iQquWdo0%3D&reserved=0.

I also have people going in my files but there was one years ago that has came back to my files.
Powered by Cricket Wireless
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PupoSDC @.>
Sent: Monday, April 5, 2021 1:47:27 PM
To: akveo/react-native-ui-kitten @.>
Cc: Subscribed @.***>
Subject: [akveo/react-native-ui-kitten] Drawer Injects items to DrawerItems ? (#1395)
💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent = ({
navigation: { navigate },
state: { routes },
}) => {
// some code to get props from state
return (
<Drawer selectedIndex={new IndexPath(currentIndex)}>

  {questions.map((question) => (

    <QuestionDrawerItem

      correct={question.correct}

      selected={question.selected}

      index={question.index}

      key={question.id}

      navigate={navigate}

      finished={finished}

    />

  ))}

</Drawer>

);
};
const QuestionDrawerItem = React.memo(
({ correct, selected, finished, index, navigate }) => (
<DrawerItem

  accessoryLeft={(props) => (

    <QuestionStateIcon

      {...props}

      finished={finished}

      selected={selected}

      correct={correct}

    />

  )}

  title={`Question ${index + 1}`}

  onPress={() => navigate("Question", { questionIndex: index })}

/>

),
(prevProps, oldProps) => {
if (prevProps.index === 0) {

  console.log(`\n\nEntry number ${prevProps.index}`);

  Object.keys(prevProps).map(key => {

    console.log(key, prevProps[key] === oldProps[key]);

  })

}

return false;

}
);
with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true
descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
"groupIndices": undefined,
"index": IndexPath {
"equals": [Function anonymous],

"row": 0,

"section": undefined,

},
}
For now i fixed the issue with this memoization props checking function:
(prevProps, oldProps) =>
  (prevProps.correct === oldProps.correct) &&

  (prevProps.selected === oldProps.selected) &&

  (prevProps.finished === oldProps.finished) &&

  (prevProps.index === oldProps.index) &&

  (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?
*   Is it safe to ignore in the memoization?
*   Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version
Package Version
@eva-design/eva 2.0.0
@ui-kitten/components   5.0.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakveo%2Freact-native-ui-kitten%2Fissues%2F1395&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497594981|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=4YbezepePD89qs%2FMVcrOOJIZSvf1D8XZTxDBBkydRuo%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASXJQ5U5BOFJHXIBKCCHTTDTHIAT7ANCNFSM42NIRRCA&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497604942|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=NWK4lcXlpSUZJOMOlz6A1vlNTHth9XCGBq1iQquWdo0%3D&reserved=0.

They took my gmail before and now they have tried taking lynda.com subscription and my some of my files as well they are trying to use my stuff to learn off of and did not make a profile they use files against me that I had. While i still learn. This happened recently when I stayed my families house. In luling tx
Powered by Cricket Wireless
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: PupoSDC @.>
Sent: Monday, April 5, 2021 1:47:27 PM
To: akveo/react-native-ui-kitten @.>
Cc: Subscribed @.***>
Subject: [akveo/react-native-ui-kitten] Drawer Injects items to DrawerItems ? (#1395)
💬 Question
When profiling my application I realised that my navigation DrawerItems where taking some 200ms to render, and due to application design, they need to be rendered quite frequently. So I decided to memoize them, but it just wouldn't work.
the reason appears to be a mysterious "descriptor" prop being passed to all my DrawerNavigator container. Here is some code
export const TestNavigationDrawer: React.FunctionComponent = ({
navigation: { navigate },
state: { routes },
}) => {
// some code to get props from state
return (
<Drawer selectedIndex={new IndexPath(currentIndex)}>

  {questions.map((question) => (

    <QuestionDrawerItem

      correct={question.correct}

      selected={question.selected}

      index={question.index}

      key={question.id}

      navigate={navigate}

      finished={finished}

    />

  ))}

</Drawer>

);
};
const QuestionDrawerItem = React.memo(
({ correct, selected, finished, index, navigate }) => (
<DrawerItem

  accessoryLeft={(props) => (

    <QuestionStateIcon

      {...props}

      finished={finished}

      selected={selected}

      correct={correct}

    />

  )}

  title={`Question ${index + 1}`}

  onPress={() => navigate("Question", { questionIndex: index })}

/>

),
(prevProps, oldProps) => {
if (prevProps.index === 0) {

  console.log(`\n\nEntry number ${prevProps.index}`);

  Object.keys(prevProps).map(key => {

    console.log(key, prevProps[key] === oldProps[key]);

  })

}

return false;

}
);
with this i can see
Entry number 0
correct true
selected true
index true
navigate true
finished true
descriptor false
onPress true
children true
descriptor changes with every render, invalidating the memoization. The contents of this prop are:
Object {
"groupIndices": undefined,
"index": IndexPath {
"equals": [Function anonymous],

"row": 0,

"section": undefined,

},
}
For now i fixed the issue with this memoization props checking function:
(prevProps, oldProps) =>
  (prevProps.correct === oldProps.correct) &&

  (prevProps.selected === oldProps.selected) &&

  (prevProps.finished === oldProps.finished) &&

  (prevProps.index === oldProps.index) &&

  (prevProps.navigate === oldProps.navigate),

So, down to my questions:

Why is this prop passed down to Drawer children?
*   Is it safe to ignore in the memoization?
*   Is this behaviour documented somewhere and i missed it?

Thank you all for your work in this project!
UI Kitten and Eva version
Package Version
@eva-design/eva 2.0.0
@ui-kitten/components   5.0.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fakveo%2Freact-native-ui-kitten%2Fissues%2F1395&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497594981|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=4YbezepePD89qs%2FMVcrOOJIZSvf1D8XZTxDBBkydRuo%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASXJQ5U5BOFJHXIBKCCHTTDTHIAT7ANCNFSM42NIRRCA&data=04|01||1adb6e0874cf49e26c1f08d8f863434a|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637532452497604942|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=NWK4lcXlpSUZJOMOlz6A1vlNTHth9XCGBq1iQquWdo0%3D&reserved=0.


Add support for specifying the TCP/UDP port rsyslog listens on

This pull request adds support for setting the TCP and UDP port numbers when enabling TCP and UDP listening. The default port remains 514.
This is particularly useful for receiving log messages when running the rsyslog daemon in unprivileged mode.

@imjustmatthew Merged. Again, thanks for the contribution.


UIE-153 Code Sharing - error.ts type-flow improvements

to prepare for Storybook stories with complex Environments component, we need to decouple notifications, which also touches errors.ts utility methods.  Before doing the main work, these changes improve error.ts first.
errors.ts no longer uses curried functions for greatly improved type flow.  All functions that are function augmentors now take args as needed, and return function-agumentor types similar to (fn: F) => F to let the caller provided function type flow through unmodified.
these functions are no longer curried, which means callers must always provide the expected arguments, and THEN use the returned function-augmentor.
no callers were using currying in a meaningful way other than to leave off the last fn arg. Many callers, including _.flow() usages are unchanged.
main impact is callers that were calling previous implementations with full args, which must now break that up to give the last (fn) call using the returned function-augmentor.

Jira Ticket: https://broadworkbench.atlassian.net/browse/UIE-153

Summary of changes:

What

TypeScript type-flow improvements by removing currying from error.ts utility methods.
No intended functional changes.

Why

general code ergonomics benefit, and ease further improvements needed for notifications decoupling work required for Storybook story mounting of Environments component.  Difficulty mounting a component in Storybook is also a great smell that it needs that difficulty removed to allow easy code reuse.

Testing strategy

[ ] Run Unit tests
[ ] Basic smoke test

Now that I see the full diff, I don't like this change for the error reporting functions...
By requiring withErrorReporting to be called with one argument, we're keeping usage in _.flow ergonomic but making other usages more cumbersome/inefficient. But if we're trying to discourage _.flow, I think that's the opposite of what we should be doing: we should be prioritizing the API when used outside of _.flow.
I think I'd rather improve the types for the curried version, which could be done as in #4647.

Now that I see the full diff, I don't like this change for the error reporting functions...
By requiring withErrorReporting to be called with one argument, we're keeping usage in _.flow ergonomic but making other usages more cumbersome/inefficient. But if we're trying to discourage _.flow, I think that's the opposite of what we should be doing: we should be prioritizing the API when used outside of _.flow.
I think I'd rather improve the types for the curried version, which could be done as in #4647.

The idea is to strike a balance for firmer function contracts, and compatibility with existing and very broad use of _.flow()... or withHandlers() helper.  Having the consistency of the return always been a single argument pass-thru HoF (higher order function) agumentor means they can be chained... and optional args on the HoF creator are also easier to allow.
It also removes some of our reliance on currying, which remains an added friction for newcomers to the code-base.

My argument is that this:
const doThing = withErrorReporting('Error message')(async () => { ... });

is less clear than
const doThing = withErrorReporting('Error message', async () => { ... });

It's added syntax, there's a function that returned and immediately called. We're claiming that FP style (including flow, etc) is a hindrance for new comers. But this actually leans further into FP style.
Thinking ahead, this pattern is very common:
const doThing = _.flow(
  withErrorReporting('ErrorMessage'),
  withBusyState(setBusy)
)(async() { ... });

As is, we could write this without flow as:
const doThing = withBusyState(setBusy, withErrorReporting('Error message', async() { ... }));

If we continue the pattern proposed in this PR, it would be:
const doThing = withBusyState(setBusy)(withErrorReporting('Error message')(async () { ... }));

I claim that's much more difficult to read than the flow version. Thus, I think this pattern actually encourages use of flow.

const doThing = withBusyState(setBusy)(withErrorReporting('Error message')(async () { ... }));

I claim that's much more difficult to read than the flow version. Thus, I think this pattern actually encourages use of flow.

First, I'm not sure we are aggressively discouraging the use of flow... baby steps... withHandlers was an attempt to give the structure/style benefits of flow but with better types...
withHandlers([
  withBusyState(setBusy),
  withErrorReporting('Something bad happened'),
], async (myArg1: string): Promise<Runtimes[]> => {
  // do things
})

These changes are compatible with this... and could enable an improved withHandlers.

Hi @msilva-broad - sorry for the delay on this (big review and needed to carve out the time to get through it).
There was one nuance I found re: withErrorReportingInModal(...) vs all the other versions. I was trying to discern the "why" behind that difference. If my logic is incorrect, please feel free to let know. (Intersted in learning on this front)
For withErrorReportingInModal(...), we want to explicitly pass in an "onDismiss(...)" handler (which is only relevant for modals), and the result of making that call is the "withErrorReporting(...)" call which takes the async method (think method-constructors).
Anyway, hope this helps. Otherwise, looks good.

let me reach out in slack to make sure I understand the question...


⚠ ClamAV has degraded performance

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

HTTP code: 200
Response time: 475 ms

Resolved: ClamAV performance has improved in b0c22f4.


Watchlist and Signin method

We use Watchlist in our JS app but we don't find any documentation about it into this library for iOS.
There is no method "Pusher.signin()" in this library and there is authorization only per channel, not for user.
Is watchlist feature available for iOS?

Hi, unfortunately watchlist hasn't been implemented in our swift library yet. I will add this request to our list for our product team to prioritize however. We're keen to get it added to our mobile libraries but we can't commit to an eta yet.

Hi @benjamin-tang-pusher, are there any updates on this issue?


Rpc example (work in progress)

Added an example app to test the work on the new RPC API.
Includes addition of urlencoding to the dev-dependencies so that we can embed simple test pages in the examples using data: URLs.
Very much work in progress but would like to get this merged now so rebasing is not too painful, cheers!

@tmpfs I'm going to turn this into a draft. After you feel comfortable about it, you can turn it back to PR and I'll start reviewing it.
You only need to implement it on Linux. It's fine to ignore other platforms for now.

Hi @wusyong, just replied to the original issue and I think there is enough here for you to review.
Would be great to get this merged if you approve!
Thanks! :+1:

Hi @wusyong I am keen to get this completed. If you could merge this as is I will start work on clean up and removing all the obsolete stuff like RPC, °Callback, FuncCalletc. I would also like to move the RPC handling code to a function that can be shared across the different platforms, it could just take the js string and theRpcHandlerreference and return aStringto be run as javascript. There is also a small bug where we need to ensure the promise is deleted when the RPC handler returnsNoneif the request contains anid`.
Thanks for your time and looking forward to getting this feature stable :+1:

Thanks @wusyong, that's create! Yeh, I am starting on a cleanup and improvement in a new branch.
Unfortunately, it looks like MacOS will require an &'static reference so we can get the rpc handler into the fn did_receive(). Going to do the clean up and then will migrate RpcHandler to use OnceCell for MacOS support.


Support custom request headers

Summary
Can amplitude SDK support custom request headers? Like
amplitude.getInstance().init(APIKEY, null, {
  headers: {     // <- new attribute in option
     'x-session-id': appToken
  }
});

// or

 amplitude.getInstance().init(APIKEY, null, {
  headers: function() {     // <- new attribute in option
    return {
       'x-session-id': appToken
    };
  }
});

Motivations
Our frontend events require to flow into our backend and then to amplitude (frontend -> backend -> amplitude). We are doing so because we want to massage (by adding user information based on the x-session-id) the frontend events a little and then use a centralized forwarder to send events to amplitude.
We still want to keep using the amplitude frontend SDK to collect the metadata information (like device ID) and queue feature. But need a way to pass our backend the auth token.
Is this possible or is there any workaround? Thanks.

Please please add this. I filed this as a support ticket a while back, & have mentioned it directly to our Amplitude reps a couple times.
Our use case is exactly the same as jshao-scw's—we use a custom endpoint & need to send authorization tokens.
We worked around the limitation the same way—by passing our auth tokens in the event properties.
But we just discovered a further issue—Identify calls. When we use amp.setUserGroup() or amp.setUserProperties(), the request body is different and event_properties is empty. There are no great solutions for this. Those I can think of are:

Have our private endpoint search for auth tokens in either event_properties or user_properties (and then strip them before sending to Amplitude). Augment user properties with our auth tokens any time we set user properties.
Roll our own setUserProperties util function. Under the hood, this would actually use ampClient.logEvent, but would set user_properties manually. This would be brittle if the user_properties schema changed, & would probably fail to update cookies accordingly.
Monkeypatch setUserProperties to add our auth tokens to event_properties.

Allowing custom headers is the much cleaner, canonical way to handle this, & should be supported if Amplitude supports custom endpoints.

I should mention that we currently generate a unique auth hash  for every network request. We might be able to relax this, but I'm not certain. T
herefore, rather (or in addition to) a headers option, I would love to see a getCustomHeaders option that takes a function which would be called for every network request.


ionic transition is not smooth

I'm working with ionic2 to build app for ios, but the page transition is not smooth.

Are you building in AOT mode?
ionic run build:ios --prod

Hello! While we appreciate you opening an issue with us i am going to close this issue and ask that you open a new one that has the issue template filled out please. Thanks for using Ionic!


feat(doge): CW-19851 add network parameter in payment parsing

Checklist:

README.md includes:

[ ] The details of signing data and transaction data, this includes parameters.
[ ] Official docs or white paper.
[ ] Website or api can query assets and broadcast transaction.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Task linked: CW-19851 Dogecoin SDK


qa_crowbarsetup.sh has too many sleeps

qa_crowbarsetup.sh has loads of sleep calls.  This is unreliable and also typically results in everything taking longer than it should.  They should all be replaced with busy waits.

We totally agree :)
Most sleeps are actually meaning "FIXME, I have to be replaced by a proper query if the needed ressource is available". But we never had the time to replace them.

I think some progress has been made on this, but there are still 12 sleep calls left.

The remaining sleep calls are now:

[ ] sleep 1 in resize_partition
[ ] Three sleeps in reboot_nodes_via_ipmi
[ ] sleep 10 in onadmin_crowbar_register
[ ] sleep 10 in update_one_proposal
[ ] sleep 5 in a loop oncontroller_testsetup waiting for the newly uploaded glance image to appear (should use wait_for instead)
[ ] sleep 60 in onadmin_cloudupgrade_reboot_and_redeploy_clients

one sleep (not in qa_crowbarsetub, but in freshadminvm) is removed by https://github.com/SUSE-Cloud/automation/pull/2564 :-)


Not work in latest chrome/chromium

https://github.com/MeiK2333/pyppeteer_stealth/blob/4fb81a910c2806b689b2244736d0d74adc8ced4d/pyppeteer_stealth/js/navigator.webdriver.js#L4
no longer works in latest Chrome.

See this: https://github.com/towry/n/issues/148

See this: https://github.com/towry/n/issues/148


Docker image ?

Is it imaginable to have a docker image for this app ?

Sure. You could put this app in a Docker container. But why?

Ease of deployment for every selfhoster :D

I'm open to it. Feel free to open a PR.


Update CentOS boot environment to 7.4

7.3 bootenv should still work, but I don't think it's preferable to keep it in community (given the bootenv for 7.3 would install packages newer than 7.4 release). I'll remove the second commit if you want to keep the 7.3 bootenv.

Nice PR and options.  I'm thinking about it.


404 issue with GCE example

I followed the GCE example but continually see logs like this in the kube-lego pod:
time="2016-08-14T16:50:19Z" level=debug msg="testing reachablity of http://foo.redacted.com/.well-known/acme-challenge/_selftest" context=acme host=foo.redacted.com
time="2016-08-14T16:50:19Z" level=warning msg="wrong status code '404'" context=acme host=foo.redacted.com

My DNS record is pointed at the Ingress external IP for foo.redcated.com. I can curl it via http, but only the html index is accessible: all of its css js and images 404.
Are there any suggested debugging steps? I previously had this working but wanted to try out the GCE solution.
Edit: I also see a bunch of wrong status code '502' logs after killing the kube-lego pod and watching the new one come up.
Edit 2: looks like the css/js/images issue was fixed by updating       - path: / to       - path: /* in my ingress object.

The GCE has probably still a few problems, can you provide me with this:

ingress yaml
kubectl describe of the ingress
a screenshot of the forwarding rule in gce console

Ingress
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: foo
  annotations:
    kubernetes.io/tls-acme: "true"
    kubernetes.io/ingress.class: "gce"
spec:
  tls:
  - secretName: foo-tls
    hosts:
    - foo.redacted.com
  rules:
  - host: foo.redacted.com
    http:
      paths:
      - path: /*
        backend:
          serviceName: foo
          servicePort: 80

kubectl describe
Name:			foo
Namespace:		default
Address:		130.x.x.x
Default backend:	default-http-backend:80 (<IP_ADDRESS>:8080)
TLS:
  foo-tls terminates foo.redacted.com
Rules:
  Host			Path	Backends
  ----			----	--------
  foo.redacted.com
    			/* 	foo:80 (<none>)
Annotations:
  backends:		{"k8s-be-30314--c2cd235f2196d4d5":"HEALTHY","k8s-be-31354--c2cd235f2196d4d5":"HEALTHY"}
  forwarding-rule:	k8s-fw-default-foo--c2cd235f2196d4d5
  target-proxy:		k8s-tp-default-foo--c2cd235f2196d4d5
  url-map:		k8s-um-default-foo--c2cd235f2196d4d5
No events.

Your screenshot shows the firewall rule and not the forwarding rule. Should be here: https://console.cloud.google.com/networking/loadbalancing/list
Another thing: if you could give me the output of kubectl get ingress/foo -o yaml instead of the one provided. It should contain a path with /.well-known/acme-challenge/*

It doesn't contain a path with .well-known/acme-challenge/* so I'm guessing that is the problem.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.kubernetes.io/backends: '{"k8s-be-30314--c2cd235f2196d4d5":"HEALTHY","k8s-be-31354--c2cd235f2196d4d5":"HEALTHY"}'
    ingress.kubernetes.io/forwarding-rule: k8s-fw-default-foo--c2cd235f2196d4d5
    ingress.kubernetes.io/target-proxy: k8s-tp-default-foo--c2cd235f2196d4d5
    ingress.kubernetes.io/url-map: k8s-um-default-foo--c2cd235f2196d4d5
    kubernetes.io/ingress.class: gce
    kubernetes.io/tls-acme: "true"
  creationTimestamp: 2016-08-14T16:59:07Z
  generation: 1
  name: foo
  namespace: default
  resourceVersion: "476436"
  selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/foo
  uid: 69e5e281-6240-11e6-bdc9-42010af00120
spec:
  rules:
  - host: foo.redacted.com
    http:
      paths:
      - backend:
          serviceName: foo
          servicePort: 80
        path: /*
  tls:
  - hosts:
    - foo.redacted.com
    secretName: foo-tls
status:
  loadBalancer:
    ingress:
    - ip: 130.x.x.x

That could be something really buggy in kube-lego. Can you give me the exact version of kube-lego. Should be in the log output:
$ kubectl logs --namespace kube-lego kube-lego-2628658575-3xejo | head -n1
time="2016-08-15T10:38:31Z" level=info msg="kube-lego 0.0.4-910cebed starting" context=kubelego

kubectl logs kube-lego-3701810767-k5qf3 | head -n1
time="2016-08-15T16:40:55Z" level=info msg="kube-lego 0.0.4-910cebed starting" context=kubelego

I found that when I add the kube-lego-svc back, things start to work right (nginx in my case).
it seems that the challenge forwarding rule needs the kube-lego-svc to route to.

You are both sure that you are using Version 0.1.0 of Kube-Lego? (Image tag in Kube-Lego Deployment)

I was using the latest example version (0.0.4)

That's the problem then can you try the 0.1.0 tag. I will fix the docs in a minute

confirming it works as expected with image tag 0.1.0 on an nginx controller
Thanks!
also, the logs still shows "kube-lego 0.0.4-de70b08f starting" with the 0.1.0 image. a little confusing...

Seems like I need a release script to not forget the necessary steps around automation :laughing:. I will release 0.1.1 later with both issues (wrong docs + wrong output) fixed

@ram-argus ok released 0.1.1 and pushed to docker hub. Thanks a lot for spotting this versioning issues. It is really a big blocker for new users.
time="2016-08-16T10:36:52Z" level=info msg="kube-lego 0.1.1-81604d11 starting" context=kubelego

Feel free to create new issues as soon you hit them! Cheers

@devth let me know if 0.1.1 works for you

@simonswine thanks, it works!
I had to delete my existing kube-lego deployment, the service it created, and my ingress. After re-creating I waited about 5 minutes, saw a bunch of 404 errors in the reachability attempt, then it started working.


Type of mergeAll() returns Subscribable instead of Observable

mergeAll() returns an Observable, but the typings say it returns a Subscribable. The typings are also a bit weird because they don't use ObservableInput. Observable<string>.mergeAll() returns string.
Actual:
export declare function mergeAll<T>(this: Observable<T>, concurrent?: number): T;
export declare function mergeAll<T, R>(this: Observable<T>, concurrent?: number): Subscribable<R>;

Expected:
export declare function mergeAll<T>(this: Observable<ObservableInput<T>>, concurrent?: number): Observable<T>;

Last time we tried this (granted that was a while ago!) we ran into issues where we couldn't add additional constraints to the type T in the Observable<T> interface.  I'm not sure if that problem still continues today, it's worth exploring again.

Well, right now the signature is completely broken:
let obs: Observable<string[]>
obs.mergeAll() // returns string, can't use any operators
obs.mergeAll<Observable<string>>() // error, Observable<string> is not assignable to string[]
obs.mergeAll<any>() // returns any, type safety lost even for operators
obs.mergeAll<any, string>() // returns Subscribable, can't use any operators

Even if this isn't possible I would prefer a return type of Observable<any> or Observable<T> where T is user-provided, because casting in an operator chain looks super ugly with the parenthesis.

I just saw the actual problem you're seeing with the subscribable... That is definitely a bug we need to fix asap.  I'll look at that shortly.

What is the status on getting this fixed?


include_contentsize is not working

I may be wrong, but using following code
fn main() -> std::io::Result<()> {
    let args = std::env::args().collect::<Vec<_>>();
    let source = &args[1];
    let destination = &args[2];

    let mut fsrc = std::fs::File::open(source)?;
    let fdst = std::fs::File::create(destination)?;

    let mut encoder = zstd::stream::Encoder::new(fdst, 0)?;
    encoder.include_contentsize(true)?;
    std::io::copy(&mut fsrc, &mut encoder)?;
    encoder.finish()?;

    Ok(())
}

doesn't produce output file with stored content size.
$ zstd -l example.txt.zst
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     0.02 KB                        None  example.txt.zst

While zstd command
$ zstd example.txt

works as expected
$ zstd -l example.txt.zst
Frames  Skips  Compressed  Uncompressed  Ratio  Check  Filename
     1      0     0.03 KB       0.01 KB  0.536  XXH64  example.txt.zst

According to RFC the header (where original size is present) is written few bytes after start.
see https://datatracker.ietf.org/doc/html/rfc8878#section-3.1.1
So in the stream mode. It would be necessary to "rewind" output stream back to start to write the original size to header.
And that doesn't make much sense. Especially for large files. So either there is some bug in the implementation or it doesn't make sense to sense to use include_contentsize function and it might be deleted, because it is useless.
Or I misinterpreted what include_contentsize should do.

Hi, and thanks for the report!
Writing the content size is already the default, so encoder.include_contentsize(true) should not have any effect.
As you mentioned though it's not possible when the content size is not known. This is currently only possible by "pledging" the size ahead of time, using set_pledged_src_size from zstd-safe. I realize now that this has not been made available in the high-level zstd crate, woops!

Super. set_pledged_src_size works perfectly. Thanks.