Multi-device report sensors

Unique id for reports to manage the same sensors on several devices

Hmm good point ! Thanks for the PR.
Is the unit handled correctly in HA ?
What devices do you have to get the humidity ?

Yes, the humidity is correctly set in % in HA.
I have a MI PRO Sense (SRC 720f) for the floor and a SR 92f (??) for the upstairs radiators.
Yes the change is impactful as it generates the IDs differently. I have not found a solution to keep the old ones if there is no problem of duplication.
I use a MiLink v3 (SR 921). I still have some work to do before I can make a PR but I have made a lot of progress by taking over your "senso_app" branch from pymultiMATIC. The data collection works but I still have to work on program change orders.
When I'm done, I'll reorganize my commits and do the 2 PRs on the 2 projects ;) .
FYI :
https://github.com/xaviergriffon/vaillant-component/tree/Senso
https://github.com/xaviergriffon/pymultiMATIC/tree/senso_app

I just release a beta, see: https://github.com/thomasgermain/vaillant-component/releases/tag/1.13.0b0
Please note, you might have other breaking changes if you setup the integration with the serial number


Active Directory should be called as Azure Active Directory and/or Azure Active Directory Domain Services in the first row of the supported Tables for Basic Logs

[Enter feedback here]
Active Directory should be called as Azure Active Directory or Azure Active Directory Domain Services in the first row of the supported Tables for Basic Logs. There is no Active Directory related tables listed in the first row.
Thanks

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

ID: 19c4afbf-7154-d80e-b7f0-63b6bc0f3399
Version Independent ID: d22a7324-cb52-40aa-27fe-421fe3e70fba
Content: Set a table's log data plan to Basic Logs or Analytics Logs - Azure Monitor
Content Source: articles/azure-monitor/logs/basic-logs-configure.md
Service: azure-monitor
Sub-service: logs
GitHub Login: @guywi-ms
Microsoft Alias: guywild

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


Adding Enigma and CodeSaya

add with suitable description, is this good enough ?

Thanks too for merge my PR. I'll do it later in the next PR.
This is my first contribution in open source project :v:


Broken HIX loading animation when DeepL is enabled

Describe the Bug
When I open a page and the HIX widget is not loaded yet, it shows the message, that supposedly there was no content on my pages, which is not true. Usually this issue resolves itself as soon as the HIX widget is loaded, however when ever the HIX service is not available, this message stays for a while (ca. 30 seconds, before showing the error message, that HIX isn't available). This is not a huge probem, but it might cause some confusion.
Steps to Reproduce

Enable HIX in the region settings
Go to pages
Select a page
See error in HIX box (error resolves itself as soon as the widget is loaded)

Expected Behavior
Show an error message like "HIX widget is loading..." or something similar
Actual Behavior

Shows untrue error message "No content on page"
Additional Information

I think this only happens when DeepL is enabled, but I did not yet have a closer look to why that is...


[💪Bootcamp-Support]  Getting error running make setup and install requirements

I am using virtualenv and also pyenv.
My python version is 3.10.2 and I am using macOS.
I already updated the version of pip and the setuptools.
When I run pip install - r requirements I get this error, for all the packages that is in the requirement file:

When I run ``make setup``` I get this error:

Could you help me with this issue ?

Sure can @nicolasgabrielt!

Since you are in mac os, I assume you have brew, so you can just install exiv by doing brew install exiv
After you run make setup again (after installing exiv), paste the entire text here between three ` so I can see what's going on.

Thanks @heynemann , do you mean exiv2 ?

I installed exiv2 , because brew did not found exiv and I got this error:
ERROR: No .egg-info directory found in /private/var/folders/74/yccfzq0s6wg0yh1zwkdx5sph0000gn/T/pip-pip-egg-info-fbt66z6r

Can you please run make setup and put the entire log here? not just the error :) That'll help!

Sure it is here @heynemann :
❯ make setup
Obtaining file:///Users/nicolasgabriel/code/open-source/thumbor
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting statsd==3.*,>=3.3.0
  Using cached statsd-3.3.0-py2.py3-none-any.whl (11 kB)
Collecting colorful==0.*,>=0.5.4
  Using cached colorful-0.5.4-py2.py3-none-any.whl (201 kB)
Collecting socketfromfd>=0.2.0
  Using cached socketfromfd-0.2.0-py2.py3-none-any.whl (4.2 kB)
Collecting Pillow>=9.0.0
  Using cached Pillow-9.0.0-cp310-cp310-macosx_11_0_arm64.whl (2.7 MB)
Collecting libthumbor==2.*,>=2.0.0
  Using cached libthumbor-2.0.1-py3-none-any.whl (8.7 kB)
Collecting webcolors==1.*,>=1.10.0
  Using cached webcolors-1.11.1-py3-none-any.whl (9.9 kB)
Collecting tornado==6.*,>=6.0.3
  Using cached tornado-6.1.tar.gz (497 kB)
  Preparing metadata (setup.py) ... done
Collecting pytz>=2019.3.0
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting derpconf==0.*,>=0.8.3
  Using cached derpconf-0.8.3.tar.gz (6.0 kB)
  Preparing metadata (setup.py) ... done
Collecting pytest-tldr==0.*,>=0.2.1
  Using cached pytest_tldr-0.2.4-py3-none-any.whl (7.5 kB)
Collecting isort==4.*,>=4.3.21
  Using cached isort-4.3.21-py2.py3-none-any.whl (42 kB)
Collecting sentry-sdk==0.*,>=0.14.1
  Using cached sentry_sdk-0.20.3-py2.py3-none-any.whl (131 kB)
Collecting pytest-asyncio==0.*,>=0.10.0
  Using cached pytest_asyncio-0.17.2-py3-none-any.whl (16 kB)
Collecting py3exiv2!=0.7.2,!=0.8.0,!=0.9.3,==0.*,>=0.7.1
  Using cached py3exiv2-0.7.1.tar.gz (35 kB)
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /private/var/folders/74/yccfzq0s6wg0yh1zwkdx5sph0000gn/T/pip-pip-egg-info-fbt66z6r
make: *** [setup] Error 1

Sure it is here:
❯ make setup
Obtaining file:///code/open-source/thumbor
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting statsd==3.*,>=3.3.0
  Using cached statsd-3.3.0-py2.py3-none-any.whl (11 kB)
Collecting colorful==0.*,>=0.5.4
  Using cached colorful-0.5.4-py2.py3-none-any.whl (201 kB)
Collecting socketfromfd>=0.2.0
  Using cached socketfromfd-0.2.0-py2.py3-none-any.whl (4.2 kB)
Collecting Pillow>=9.0.0
  Using cached Pillow-9.0.0-cp310-cp310-macosx_11_0_arm64.whl (2.7 MB)
Collecting libthumbor==2.*,>=2.0.0
  Using cached libthumbor-2.0.1-py3-none-any.whl (8.7 kB)
Collecting webcolors==1.*,>=1.10.0
  Using cached webcolors-1.11.1-py3-none-any.whl (9.9 kB)
Collecting tornado==6.*,>=6.0.3
  Using cached tornado-6.1.tar.gz (497 kB)
  Preparing metadata (setup.py) ... done
Collecting pytz>=2019.3.0
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting derpconf==0.*,>=0.8.3
  Using cached derpconf-0.8.3.tar.gz (6.0 kB)
  Preparing metadata (setup.py) ... done
Collecting pytest-tldr==0.*,>=0.2.1
  Using cached pytest_tldr-0.2.4-py3-none-any.whl (7.5 kB)
Collecting isort==4.*,>=4.3.21
  Using cached isort-4.3.21-py2.py3-none-any.whl (42 kB)
Collecting sentry-sdk==0.*,>=0.14.1
  Using cached sentry_sdk-0.20.3-py2.py3-none-any.whl (131 kB)
Collecting pytest-asyncio==0.*,>=0.10.0
  Using cached pytest_asyncio-0.17.2-py3-none-any.whl (16 kB)
Collecting py3exiv2!=0.7.2,!=0.8.0,!=0.9.3,==0.*,>=0.7.1
  Using cached py3exiv2-0.7.1.tar.gz (35 kB)
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /private/var/folders/74/yccfzq0s6wg0yh1zwkdx5sph0000gn/T/pip-pip-egg-info-fbt66z6r
make: *** [setup] Error 1

Looks like py3exiv2 is the culprit here – unsurprisingly. I'd say that, at this stage, where you're getting to know Thumbor, having py3exiv2 available is not something super essential. You're likely not messing with it any soon. So I'd recommend skipping its installation.
To do so, please comment out the line that mentions py3exiv2 in setup.py, just so you get Thumbor and its other dependencies installed. Once you get past make setup, uncomment such line, and you should be ready to rock!

@scorphus thanks very much for the help, it worked !
Just a curiosity in which stage I will need py3exiv2 ?

You would need it if you were to change some aspect of Thumbor's support to image metadata. As it's somewhat specific – and there's some circumvention for py3exiv2 unavailability in place – you can ignore it for now.

@scorphus thanks a lot.


Dependabot alerts

What this PR does / why we need it:
Resolve dependabot alerts:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
https://github.com/kubevirt/kubevirt/security/dependabot/1
https://github.com/kubevirt/kubevirt/security/dependabot/3
https://github.com/kubevirt/kubevirt/security/dependabot/5
https://github.com/kubevirt/kubevirt/security/dependabot/6
https://github.com/kubevirt/kubevirt/security/dependabot/7
https://github.com/kubevirt/kubevirt/security/dependabot/8
Special notes for your reviewer:
Release note:

NONE

/cc @davidvossel
/cc @dhiller

/test all


Is there a Perforce version requirement

Does the integration requires minimum Perforce version or Perforce log level?

installed on my p4d 2018 and works fine.
Close issue.


tox requires raises KeyError: 'ignore_env_name_mismatch'

try to run tox in the examples/ subdir on v0.2.0+
masen@asmbp21 examples % tox -vv
ROOT: 60 D setup logging to DEBUG on pid 7193 [tox/report.py:221]
ROOT: 81 W will run in automatically provisioned tox, host<EMAIL_ADDRESS>is missing [requires (has)]: tox-ignore-env-name-mismatch~=0.2.0 [tox/provision.py:124]
Traceback (most recent call last):
  File "/opt/homebrew/bin/tox", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/run.py", line 19, in run
    result = main(sys.argv[1:] if args is None else args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/run.py", line 41, in main
    result = provision(state)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/provision.py", line 125, in provision
    return run_provision(provision_tox_env, state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/provision.py", line 143, in run_provision
    tox_env: PythonRun = cast(PythonRun, state.envs[name])
                                         ~~~~~~~~~~^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 336, in __getitem__
    return self._defined_envs[item].env
           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 192, in _defined_envs
    run_env = self._build_run_env(name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 251, in _build_run_env
    runner = REGISTER.runner(cast(str, env_conf["runner"]))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/tox/tox_env/register.py", line 72, in runner
    return self._run_envs[name]
           ~~~~~~~~~~~~~~^^^^^^
KeyError: 'ignore_env_name_mismatch'

This could be considered an upstream bug, since the runner key is used to activate an alternate runner provided by a plugin, but the tox file cannot provision the plugin if runner contains invalid keys (that have yet to be registered)

tracking upstream issue https://github.com/tox-dev/tox/issues/2862

fixed upstream, readme updated in #7


Updated Instructions and POM

Updated pom for version 1.3.0 of the Azure Maven plugin. 1.3.0 requires the app name to be lowercase until the bug below is fixed. Updated README with SSH instructions on Windows and OSX/*nix.
upper case bug: https://github.com/Azure/azure-libraries-for-java/issues/546

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

@selvasingh Here are the updates to the README for Tomcat and Maven deployment.


Service: Consumption. Filter parameter does not work for Grain

I am using the consumption API version 2019-10-01.
My goal is to get yearly forecast data which I can use in a custom Power BI report.
When I add $filter = Grain eq 'Yearly' both in the example as well as in ADF, it only returns Daily grain. Same when providing Monthly in the filter.
I used amongst others:
https://docs.microsoft.com/en-us/rest/api/consumption/forecasts/list

Also, when using other filters, like usagedate, it does'nt seem to work

Thanks, @ms-premp!
And the best wishes for 2021 :)
Using /providers/Microsoft.Consumption/forecasts?$filter=properties/grain eq 'Yearly'&api-version=2019-10-01
I got a return with grain "Yearly"
However, this number exactly equals Monthly grain.
So it seems that when I request Yearly grain, I get Monthly grain only the text monthly replaced with yearly.
When I multiply it by 12 I also geta whole other number than in the portal UI. so it seems incorrect.
Is there something I am doing wrong?
Best regards,
Jeroen

Thanks, @ms-premp!
And the best wishes for 2021 :)
Using /providers/Microsoft.Consumption/forecasts?$filter=properties/grain eq 'Yearly'&api-version=2019-10-01
I got a return with grain "Yearly"
However, this number exactly equals Monthly grain.
So it seems that when I request Yearly grain, I get Monthly grain only the text monthly replaced with yearly.
When I multiply it by 12 I also geta whole other number than in the portal UI. so it seems incorrect.
Is there something I am doing wrong?
Best regards,
Jeroen

Hi @Jeroenvos this is an older version of our API that the portal has moved away. If you are looking for the API that the portal talks to, might I point you to the forecast API that has the filtering and aggregation capabilities, you can find more details of the API here
https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage

hello @jeroenvos please let us know if there is anything that you need, in addition to the above response our team has provided.

Closing this issue  please feel free to reopen as needed.


Cannot publish presence when having databaseConfig.redis.keyPrefix

I am working on multiple Laravel projects, denoted as "Project A" and "Project B".
I run laravel-echo-server for both projects.
Port 6001 for Project A
Port 6003 for Project B
Both have "databaseConfig.redis.publishPresence" enabled.
Authentication, joining and leaving channel, and Broadcasting (using Queue of Laravel) work totally fine.

However, whenever a user joins the echo server of Project A, both Project A and Project B show a "PresenceChannelUpdated" message (which I only want presence publishing from Project A solely), vice versa.
Channel: PresenceChannelUpdated
Event: [object Object]

To prevent this problem, I added keyPrefix to databaseConfig.redis for Project B.
"databaseConfig": {
       "redis": {
			"keyPrefix": "ProjectB_"
		},
		"publishPresence": true
	},
Then the echo-server does not publish presence anymore, same case for Project A.

Without databaseConfig.redis.keyPrefix, it works totally fine.

With the keyPrefix, the echo-server doesn't publish presence anymore.

I also tried to use Redis database (e.g. db 0 for Project A, db 2 for Project B), but no luck with it.
Is this a bug or I am doing wrong? Any help would be appreciated.

#516 seems to be a fix for my situation.
The keyPrefix is prepended to the presence-publishing event name.

please update fixes for master


Install 2023 version of pathplanner lib

I was unable to find a link to install older version of plathplanner library. Is there a way to do so?

Change the version in the PathPlannerLib.json file in your project to 2023.4.2

It works, thank you!


PIM doesn't support RBAC roles

In this document [link below], couple of rbac roles are not supported (e.g owner, contributor) and it is mentioned in the following way which is wrong and create misunderstanding.
"Owner
User Access Administrator
Contributor
Security Admin
Security Manager"
https://learn.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-resource-roles-assign-roles

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

ID: e87c5c36-7f4f-cb86-8835-85df5ae91269
Version Independent ID: 3e5c0cc6-a001-bd81-6bed-c4322fc11faa
Content: Assign Azure resource roles in Privileged Identity Management - Azure Active Directory - Microsoft Entra
Content Source: articles/active-directory/privileged-identity-management/pim-resource-roles-assign-roles.md
Service: active-directory
Sub-service: pim
GitHub Login: @amsliu
Microsoft Alias: amsliu

@aman-w-kumar
Thanks for your feedback! We will investigate and update as appropriate.

i did some investigate again. it seems PIM does support but with limited functionality

@aman-w-kumar
We are going to close this thread as resolved but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation


Update user guide

[x] Fix incorrect HTML tag parsing
[x] Remove undesired headers in ToC

Codecov Report
Base: 62.69% // Head: 62.69% // No change to project coverage :thumbsup:

Coverage data is based on head (657093e) compared to base (fd5c9a6).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #188   +/-   ##
=========================================
  Coverage     62.69%   62.69%
  Complexity      666      666
=========================================
  Files           118      118
  Lines          2356     2356
  Branches        295      295
=========================================
  Hits           1477     1477
  Misses          769      769
  Partials        110      110

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Projection transformation or option

This is a bit less important for the vega renderer but can be useful if you're using dataflow as a standalone data processing engine.
If this was added it would probably be best as a param on collect similar to the sort param. Only caveat here is you probably want to be able to project aliases as well so the straight up array of strings param wouldn't quite cut it.

Thanks for the request! @leibatt had a request for this as well. I think a new operator will likely be needed for this, particularly if aliasing support is included. I'll look into this.

Added in 954e136ebb92bcd3673f12733e7e52b3e0a40c7d and released with vega-transforms v1.1.0. The Project transform will also be included in the next Vega release.

LOVE IT


New component added, Carousel-Embla

Description
This pull request adds a new Carousel-Embla component to the library. Instead of modifying the current carousel component, I thought of making a new one. the previous one kind of limited a lot of controls. with this new component, all the controls will be given to the user so that he can create his own logic instead of limiting his controls over the Carousel.
Changes Made

Added Carousel-Embla component
Updated documentation
Modified route.ts to include new component
Installed new dependencies

Checklist

[x] Code has been tested locally
[x] Documentation has been updated

Dear @Ryneex,
Your work is very good. You are to be commended for that. But we want to give you some guidelines how to make your work more beautiful and comfortable.
We will use the embla-carousel library for the carousel component.
First we will create a wrapper on top of the embla carousel. From where the items of the carousel can be controlled. And the carousel will look exactly like the embla carousel examples.
For example:

Default Style
Loop
Slides To Scroll
Drag Free
ClassNames
Parallax
Scale
Lazy Load

You can put numbers in the carousel item, or use the pictures we have provided. It is completely up to you. Only the carousel should look like an instance of the embla carousel.
I hope you understand. Best of luck.
Thank you
Md Ariful Islam


Symbols included punctuation

I noticed that punctuation included in text/symbols.py, this means punctuation should be encoded. But

In TextGrid generated by mfa, there are no punctuation. So model will never get punctuation in training.
In synthesize.py, punctuations are all repalced by {sp}

So can you walk me through it?

Hi @phamlehuy53, in textgrid files generated by MFA tool, sp will be the silence.

Hi @phamlehuy53, in textgrid files generated by MFA tool, all punctuations will be modeled by sp.

Of course. So model just learns sp not punctuation ( punctuation in text.symbols though), this is worthless.
And in synthesizing, all punctuations are replace by sp, meanwhile some are not actually a sp like ()""@ so on

Because this repo depends on the MFA tool to get the duration of each phoneme, so the way to modeling punctuation will be affected by MFA, so I think you should ask the owner of MFA instead of FS2.
Btw, Tacotron is an example which can model all punctuations like you want to because it learns the alignment with unsupervised manner for each of encoded character. But in my opinion we should model frequent punctuations instead of all possible ones.

I am not sure if I am understand this right, but if we use only {sp} for all punctuations, silence duration of "," and "." will be the same right?
I have trained my own FS2 model using MFA tool to generate TG files, and sometime it skip punctuations. Anyone know the cause of this and how to fix it?

I am not sure if I am understand this right, but if we use only {sp} for all punctuations, silence duration of "," and "." will be the same right? I have trained my own FS2 model using MFA tool to generate TG files, and sometime it skip punctuations. Anyone know the cause of this and how to fix it?

For easy operating on my data, I ignored differences in duration of "," and ".". Of course, it should be modified if your data set needs.
I should read MFA change log carefully. In some recent versions, they remove {sp} in output

@EuphoriaCelestial In the MFA they don't use the punctuation to predict the silence, they will predict the silence by unsupervised manner. You can see your TextGrid files only contains the sp as the silence (except for sil at the beginning), so when using the MFA tool, you can remove the punctuation from from your input, for example: hello, world -> hello world.

@leminhnguyen @EuphoriaCelestial what is the relevance of having only alphabets (i.e i am not saying AH,IY. But i am saying tokens that is made from the list alphabets.)


Is it possible to do "Destination charges"?

Does this package provide features to do "Destination charges" ie when a purchase is made the payment is split into fees to my platform, the remaining payment to the seller(s)? Or is this something that Cashier's functionality provides?

You can do this through Cashier. This package is focused solely on adding the Connect features.

Hello, you can achieve this through Cashier.
$userMakingPayment = ;
$userReceivingPayment = ;
$userMakingPayment ->charge(100, $paymentMethod, [
'application_fee_amount => '123',
'transfer_data[destination]' => $userReceivingPayment->stripeAccountId(),
]);


RabbitMQ - Browser connection

This example demonstrates how a webbrowser can access messages published by RabbitMQ. The approach uses the MQTT protocoll and its respective websocket plugin

this PR also contains a restructuring of the repository

@chrismayer could you review and/or merge?


GEODE-3940: fix deadlock in backup messages

There are 3 separate commits in this PR. 1) reintroduce Nick's commit for GEODE-3801, 2) Lynn's fix for deadlock in backup messages, 3) prevent logger warnings when sender processes the backup messages.
commit d55e6d6cae348fedb9f1341a9abde2096be3bead (HEAD -> feature/GEODE-3940, origin/feature/GEODE-3940, kirklund-fork/feature/GEODE-3940)
Author: Kirk Lund<EMAIL_ADDRESS>Date:   Wed Nov 8 10:25:07 2017 -0800
GEODE-3940: prevent warning when processing message by sender

Prevents logging warning when processing these message types by sender:

* FinishBackupRequest, FlushToDiskRequest, PrepareBackupRequest

commit 81ff81da9fc121607b35aca15d99e24cf0783e7f
Author: Lynn Gallinat<EMAIL_ADDRESS>Date:   Fri Nov 3 17:09:42 2017 -0700
GEODE-3940: fix deadlock in backup messages

* introduce unit tests for backup messages
* add unit test for BackupLock

commit 080730b2df5c7ec0a17acd195a5b953dfc6a0d5c
Author: Nick Reich<EMAIL_ADDRESS>Date:   Tue Oct 24 08:24:42 2017 -0700
GEODE-3801: Use hardlinks for backup oplog files (#963)

* Oplog files that are backed up are read-only. For this reason,
  they can be transfered to the backup location through hard links,
  instead of copying the file. This change improves speed of backups.
  If the creation of a hard link fails, we revert to the existing copy
  behavior.
* During backups, the copying of the oplog's krf file was being done while
  that file could still be in the process of writing. This change ensures
  that if a krf is to be written, that it is finished and included in the
  backup
* cleanup existing oplog tests

Closing this PR as the code is now stale. We'll submit a new PR sometime this week.


Conditional tasks

I have a CI build and a separate nightly build. The nightly build has additional tasks such as Publish and others. Ideally I'd like there to be one but there is no way to disable a step linking it to the selected trigger.
Can this be done?
If not I don't mind looking at this via a pull request. I've never done one before so can anyone advise on the process?

This is on our backlog for the service.  It's a good ask.


Bug fix for TORCH_VERSION_AFTER_* importation

Bug fix for TORCH_VERSION_AFTER_* importation

Yeah unfortunate we don't run these scripts in CI

Yeah unfortunate we don't run these scripts in CI

No worries. Just trying to play with the repo a bit and understand more (can create some minor fix if any). Thanks for the super fast response!! Looking forward to the VC chat tmr.


Fix linting errors

Flake8 was updated and a bunch of new errors started showing up: https://travis-ci.org/opensistemas-hub/osbrain/jobs/452151480
Apparently we weren't using noqa correctly either. flake8: noqa would ignore warnings for the entire file, regardless of whether we used them in a single line or not. This behavior has been changed in the new version, and that uncovered a couple more errors.

Looks good to me. :+1:


Bug 1985697: Update the package-server-manager leader election configuration

Update the package-server-manager controller and update the leader
election intervals. This is in order to comply with the need for OCP
components to be able to withstand 60s of API server disruption on
SNO-enabled clusters.
For more information, see the following resources:

https://github.com/openshift/library-go/pull/1104#discussion_r649313822
https://bugzilla.redhat.com/show_bug.cgi?id=1985697

Alternative implementations include disabling leader election entirely
for SNO-enabled clusters. This implementation is centered around
dynamically querying for the Infrastructure/cluster singleton resource,
checking the HA/non-HA expectations being exposed, and setting leader
election properly. This implementation would still need to be careful
about how to handle transient errors and provide an escape hatch (e.g.
prefer enablement of leader election through a CLI flag, vs. the dynamic
value) that users can pass to the PSM deployment for failed upgrades.

/retest

/retest

/retest


Decaled normal maps

Hey, not really an issue but I wanted to be able to decal normal maps for bullet holes, I modified DecalableLit.shader to make that possible, it's not a huge change but it took me a while to figure out and it must be a common use-case so it might be useful to have it as a built-in example. Let me know if you're interested in a PR, I can clean up my changes and make sure it works in HDRP and URP as well (i am using the built-in pipeline). I could also add some convenience methods to PaintDecal.cs to allow for painting the color + normal decals in one call.

Oh yeah that sounds great, you don't have to go through the effort of making sure it supports all pipelines-- a simple example would be awesome!

Hey, not really an issue but I wanted to be able to decal normal maps for bullet holes, I modified DecalableLit.shader to make that possible, it's not a huge change but it took me a while to figure out and it must be a common use-case so it might be useful to have it as a built-in example. Let me know if you're interested in a PR, I can clean up my changes and make sure it works in HDRP and URP as well (i am using the built-in pipeline). I could also add some convenience methods to PaintDecal.cs to allow for painting the color + normal decals in one call.

@iatenothingbutriceforthreedays
hi!, I'm trying to do the same thing as you ... I'm trying to create a normal map with the texture of the decal, but I can't get it to look correctly on the character's mesh.
I would like to know what you did to get the decal to display correctly with normal maps.

Hi @iatenothingbutriceforthreedays , thanks for the change! I'll try it in the next few days! Thank you very much for answering!!


Fix 'too many open sockets' errors

After raid runs for a while or processes enough jobs (not sure), further jobs will fail because too many sockets are open. raid may somehow be leaving sockets open.

I think this is fixed


Fix blinking, stuttering, centers on resizing, and isn't smooth during resize

Fix blinking, stuttering, centers on resizing, and isn't smooth during resize.

Looks good, thanks for the contribution.


Adds an action to reset the simulators through xcrun

I saw that you already have a snapshot reset_simulators but this one is kind of "softer" and one can use it in the FastFile without calling snapshot.
As for the previous PR, don't know if you find it useful, but it was a quick one.

Thanks for the pull request. I'd much rather prefer having the code in one central place, which is snapshot.
Basically all that's needed:
        version = options.ios || Snapshot::LatestIosVersion.version
        require 'snapshot/reset_simulators'

        Snapshot::ResetSimulators.clear_everything!(version)

If you want, you can update the pull request, or I take it over and implement it :+1:

I see, but clear_everything is doing delete and create, not sure this is the same as erase?
Usage: simctl [--noxpc] [--set <set path>] <subcommand> ... | help [subcommand]
Command line utility to control the iOS Simulator

For subcommands that require a <device> argument, you may specify a device UDID
or the special "booted" string which will cause simctl to pick a booted device.
If multiple devices are booted when the "booted" device is selected, simctl
will choose one of them.

Subcommands:
    create        Create a new device.
    delete        Delete a device.
    erase         Erase a device's contents and settings.
    boot          Boot a device.
    shutdown      Shutdown a device.
    rename        Rename a device.
    getenv        Print an environment variable from a running device.
    openurl       Open a URL in a device.
    addphoto      Add a photo to the photo library of a device.
    install       Install an app on a device.
    uninstall     Uninstall an app from a device.
    launch        Launch an application by identifier on a device.
    spawn         Spawn a process on a device.
    list          List available devices, device types, or runtimes.
    notify_post   Post a darwin notification on a device.
    icloud_sync   Trigger iCloud sync on a device.
    help          Prints the usage for a given subcommand.

@vittoriom You're right, you only want to clear the content of all simulators. This should probably be built-in in snapshot still.
I'm not a big fan of this huge bash line
sh "xcrun simctl list devices | grep -v '^[-=]' | cut -d \"(\" -f2 | cut -d \")\" -f1 | xargs -I {} xcrun simctl erase \"{}\" || true"

I assume you copied it from somewhere? That's not something I look forward to maintain to be honest.
If this is implemented in Ruby and easier to read, I'd be willing to merge this into fastlane.
If that's too much hassle for now, I completely understand, feel free to close the pull request :+1:

Sorry, I wasn't home the whole day. If it's fine for you I'll work on this during the week and push by end of week? Should I also fork snapshot instead?
Thanks for your patience!

I guess this should be a snapshot action, maybe snapshot clear_simulators?

I'll close this pull request for now :+1:


Upstream python errors

This is probably a result of changes from a new release of python (3.11 has caused all sorts of issues for me), but things are not happy:
https://github.com/martinthomson/vrs/actions/runs/5407615091/jobs/9825822838

Hm, looks like something broke in urllib?  I'll grab a 3.11 build and run some tests.


normalize synonyms during indexation

fix #1135 #964

bors try

bors try

bors try

bors try

@LegendreM How Chinese synonyms are handled? Are they also deunidecoded? What about emojis and others?

@LegendreM How Chinese synonyms are handled? Are they also deunidecoded? What about emojis and others?

@LegendreM How Chinese synonyms are handled? Are they also deunidecoded? What about emojis and others?

After a discussion with @LegendreM, the only Latin based languages will be normalized.

bors merge


stream kafka support apache plusar ?

stream kafka whether to support apache plusar ?

@imbaq123 Can you please provide more context? It's not exactly clear what you are asking. There is no adapter or anything like that currently available (or in the roadmap) in the Kafka binder for Apache Pulsar.

Yahoo! Japan is using an in-house Spring Cloud Stream binder implementation for Pulsar (see here). We are trying to have them open-source it, though. Otherwise, we do not have any plans to add a Pulsar binder right now. Kafka Streams like functionality for Pulsar is entirely a different topic, too, and that's not in the scope of this project.

@sabbyanandan Any update on getting the binder implementation for Pulsar ?


Add Japanese Yen as display currency

Requested by community member from Japan. cc @dolcalmi

also, could we add the XPF (franc pacifique)

Morrocan Dirham (MAD) requested as well

updated


Support for Kotlin plugin

Support for Kotlin plugin Tasks, including KotlinCompile

Blocked: need documentation for the XML format for the kotlinc -Xbuild-file argument to solve an error


Add support for log broadcast endpoints

https://github.com/appium/java-client/pull/871 - iOS
https://github.com/appium/java-client/pull/858 - Android

@mykola-mokhnach , in C# I assume we will need to add Autofac.Web package in order to use ContainerProvider.
is that right?

No idea, I don't know much about C# implementation details.

@akinsolb FYI, I'm a bit stuck here. I have a draft ready , but i'm unable to complete the step of connecting to the appium WS logcat.
Do you have any familiarity with this?

@mykola-mokhnach, I'm still trying to work around the issue where the client can't get the message from the server via logcat.


Add Reftagger like Functionality

Story
As a content creator I'd like to hover over a Bible reference and get the text to pop up so that I don't have to look it up somewhere.
Notes
Potentially we can use https://reftagger.com/.  Not sure what version to use yet.

Any version would be helpful for the UBN/UBC teams
Particularly our cross-reference notation needs to be supported.

This would also be helpful for the UGL team as they have links to Scripture which they have to look up manually now, (e.g. https://git.door43.org/unfoldingWord/en_ugl/src/branch/master/content/G00020/01.md).


Added slot and overlay disappears when reloading asset

I've added a hair slot and overlay to a generated character, then saved it. When it's reloaded the hair is not in the recipe nor is the overlay. Both the Slot and Overlay are in the Slot library and Overlay library.
I've tried it with 2 separate characters with different slots/overlays and the result is the same.

Further note;
New overlays added to the recipe on the existing body get saved. Seems it's only the new slot that doesn't get saved.


Refreshing with latest d.ts file

Docs Build status updates of commit cc7c958:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/docs-ref-autogen/excel/excelscript/excelscript.autofilter.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.conditionalformat.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.documentproperties.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.filterpivothierarchy.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.nameditem.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.nameditemarrayvalues.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.pagelayout.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.pivotfield.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.pivothierarchy.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.pivottable.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.range.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.rangeareas.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.rowcolumnpivothierarchy.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.slicer.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.table.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.workbook.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.workbookrangeareas.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.worksheet.yml
:white_check_mark:Succeeded

docs/docs-ref-autogen/excel/excelscript/excelscript.worksheetfreezepanes.yml
:white_check_mark:Succeeded

generate-docs/api-extractor-inputs-excel/excel.d.ts
:white_check_mark:Succeeded

generate-docs/json/excel/ExcelScript.api.json
:white_check_mark:Succeeded

generate-docs/script-inputs/excel.d.ts
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Issue with D* lite

What are you trying to do?
Read the D* lite algorithm.
What did you do?
Looking over the code of the D* lite algorithm I noticed this:
https://github.com/gonum/gonum/blob/5d5638e6749a344a69611ea36989c7dcbdd2dc8d/graph/path/dynamic/dstarlite.go#L416
Unless I'm missing something, this doesn't look quite right :-)
What did you expect to happen?
I was trying to work out what this failure case was expected to be. Perhaps
	if k == badKey || other == badKey {

What actually happened?
N/A
What version of Go and Gonum are you using?
Master branch of Gonum.
Does this issue reproduce with the current master?
Yes

This is correct. I should add a //nolint line to that and the other place where that exists.
The dynamic.key type is [2]float64 which has NaN inequality behaviour.


Return exit code 1 when an error occurred

Right now when we have an error we just print it out with eprintln!(), but the exit code is still 0. Ideally we should show that an error occurred by having an error code >0 -- 1 is fine.
You can do this with process::exit(1) at the end of main. We should still continue anyway, but just indicate at the end that it failed with a >0 exit code.

done in feff455070a6dc1afac9d8018814f62885a3cac3


Get springboot module added to SPRING INITIALIZR

@vadeg ; do you how to get the springboot module added to the initializr? i did a quick google, and it wasn't obvious, but seems possible, as other non-spring tech has been added.

https://start.spring.io/

@garethahealy Never did it before, but I have found this doc which may be helpful.

Hi @garethahealy @vadeg ,
I want to submit PR for supporting dozer-spring-boot-starter in https://github.com/spring-io/initializr.
But current dozer-spring-boot-starter does not consist starter project of spring-boot. Hence I propose to fix to spring-boot starter project at first via #661.
WDYT?

Related with this, I've submitted PR to spring-boot project for introducing spring-boot-starter module as community starter.

I've submitted a PR for supporting dozer-spring-boot-starter in initializr service provided spring.io.

PR to springboot was declined, so closing this issue.


Finish off work for Beautify Touchpad (#3) issue.

PR continues work by @jjcrab: https://github.com/shubham1172/remote-play/pull/8
What this PR does:

Adds style.scss file used by Sass compiler, which also adds the proper CSS prefixes to improve browser compatibility.
Removes comments from index.html file.
Removes Bulma class names from index.html file.
Recreates Hero Bulma class using vanilla CSS.
Recreates Footer using vanilla CSS.
Fixes issue with buttons staying highlighted on mobile.
Added some margin between header + buttons + footer.

Screenshot:

@dbarrous can you please rebase this with main? Looks like this is a lot of commits behind.

Thanks for the PR, the high-level code changes LGTM and so does the new UI! 👍🏻

@shubham1172 Rebased :)

@shubham1172 Screenshot updated & Contributing doc updated with instructions on how to convert .scss files to .css.


health counter goes too fast sometimes

after loosing a level sometimes the health counter goes way too fast afterwards. no idea why

not reproducible in newer crafty versions, maybe fixed


Documentation proposal: Be upfront about limitations

While Traefik does do a bunch of cool and interesting stuff, I suggest adding a "limitations" section on the Readme.md which states what Traefik currently does not do and/or does in a limited fashion. This would quickly let users see if this the right tool for them and could save people a lot of time I think. Noting if work in that area is out of scope or PR's wanted would also be useful. E.g:
Limitations:

Traefik currently does not proxy TCP (see nginx, haproxy), PRs wanted, #10

Yes, I discovered it too late as well :) I use it anyway, but it should be documented

Yup... this became a show stopper for me as well. Great suggestion tho!


Change to CMake install rule for the include directory?

It seems like there are lots of missing headers in the install/include directory now. For example MachineIndependent seems to only come with Versions.h now, and is missing other useful headers such as iomapper.h.
SPIRV is missing SpvTools.h is another example of a useful header that's no longer copied.
Is there a new workflow to follow?

Ugh, wrong project here too

The pruning of headers was intentional, but it is possible that I may have been too enthusiastic with cutting things down and am certainly open to adding things back if someone complains that they need them. Mostly the goal was to avoid exposing all the private insides of the compiler as a public API because it would be impossible to maintain a stability guarantee there. I will take a look at those two headers and either add them back in or find some way for you to access the equivalent functionality.


release GHA: fix variable name for tag

Signed-off-by: Arko Dasgupta<EMAIL_ADDRESS>

should fix the error seen in https://github.com/envoyproxy/gateway/actions/runs/3160141583/jobs/5144242604#step:6:61


Meet about Wild/Crazy8s ideation

Description
We are beginning to develop wireframes for the tip site so that we actually have a form of front end to test. I'd like to meet with the team to discuss their thought process in the crazy8s sketching exercise last week.
Criteria

[x] Meet on zoom, talk about crazy8s
[ ] Django to synthesize takeaways in their document

Checked box "Meet on zoom, talk about crazy8s", as we did meet and discuss the Crazy8s exercise. @Globnartheexquisite did you "synthesize takeaways in their document"?

@Roseywinter yep all done, issue closed with this comment.


Commit batch ingest library for use in persistence modules

Feature Request
Description of Problem:
We are introducing a common library to handle batch ingestion logic. The initial focus is batch milestoning into relational databases. This library consolidates the implementation across multiple backend persistence implementations. It also provides an in-memory implementation that will be of use for fast testing.

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or add any comment to keep this open. Otherwise this will be closed in 5 days.

This issue was closed because it has been inactive for 35 days. Please re-open if this issue is still relevant.


EE: Codes for validation cycle 6

DCCs are signed with a DSC which is not on ACC
"ma" field in TEST may not be empty

DSC with ID 'made+MNhX6M=' is not on ACC yet


count=-1 will stop working for XPENDING (xpending_range)

Relevant method in redis-py: https://github.com/andymccurdy/redis-py/blob/d14f929ef024d62148b317f5e4197349d548e6a2/redis/client.py#L1925-L1926
Here's the Redis commit which changed this behavior:
https://github.com/antirez/redis/commit/edeaf85cab10b2d9bc151363779f70822d679472
Conversation here:
https://github.com/antirez/redis/pull/5459#issuecomment-433929399

fixed in 977e739e386b4085086c14d2cde4007761f36566

Thanks. Closing this since it was already fixed.


Audio Switcher Client Issue

Details:
Audio Switcher
Version: <IP_ADDRESS>
Operating System: Microsoft Windows NT 6.2.9200.0 64-bit
Administrator Privileges: False
User Comments:
unplugged a device i think
Stacktrace:
System.NullReferenceException: Object reference not set to an instance of an object.
   at AudioSwitcher.AudioApi.CoreAudio.CoreAudioDevice.get_FullName()
   at FortyOne.AudioSwitcher.AudioSwitcher.RefreshNotifyIconItems()
   at FortyOne.AudioSwitcher.AudioSwitcher.RefreshPlaybackDevices()

https://github.com/xenolightning/AudioSwitcher/issues/4


icu-benchmarks train raises pkg_resources.DistributionNotFound on osx-arm64

Stacktrace
(yaib) ~/code/YAIB [development] $ icu-benchmarks train -d data -n mimic -t Regression -tn KidneyFunction -m ElasticNet
Traceback (most recent call last):
  File "/Users/mlondschien/mambaforge/envs/yaib/bin/icu-benchmarks", line 33, in <module>
    sys.exit(load_entry_point('yaib', 'console_scripts', 'icu-benchmarks')())
  File "/Users/mlondschien/mambaforge/envs/yaib/bin/icu-benchmarks", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/mlondschien/code/YAIB/icu_benchmarks/run.py", line 13, in <module>
    from icu_benchmarks.tuning.hyperparameters import choose_and_bind_hyperparameters
  File "/Users/mlondschien/code/YAIB/icu_benchmarks/tuning/hyperparameters.py", line 10, in <module>
    from icu_benchmarks.models.utils import JsonResultLoggingEncoder, log_table_row, Align
  File "/Users/mlondschien/code/YAIB/icu_benchmarks/models/utils.py", line 12, in <module>
    from pytorch_lightning.loggers.logger import Logger
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 6, in <module>
    from lightning_utilities import module_available
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/lightning_utilities/__init__.py", line 6, in <module>
    from lightning_utilities.core.apply_func import apply_to_collection
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/lightning_utilities/core/__init__.py", line 4, in <module>
    from lightning_utilities.core.imports import compare_version, module_available
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/lightning_utilities/core/imports.py", line 13, in <module>
    import pkg_resources
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3328, in <module>
    def _initialize_master_working_set():
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3302, in _call_aside
    f(*args, **kwargs)
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 631, in _build_master
    ws.require(__requires__)
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
  File "/Users/mlondschien/mambaforge/envs/yaib/lib/python3.10/site-packages/pkg_resources/__init__.py", line 870, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pytorch-cuda==11.8' distribution was not found and is required by yaib

The issue lies here, where installation requirements are parsed from the environment.yml (not environment_mps.yml), which includes pytorch-cuda, that is unsatisfiable.
This could be solved by detecting whether the code is run on an x86/osx-arm64 machine and then parsing the corresponding environment file. Alternatively, one can also just comment out the offending line. IMO the latter is the much cleaner option. What is the benefit of enforcing exact requirements?

Thank you :)


[#1976] Fixed color contrast issues with links and prev/next diff buttons.

#1976
===

Previous / next diff buttons in bot state inspector are now theme-able
Also fixed a regression with link color contrast in explorer panels and welcome page for dark theme

Light:

Dark:

HC:

Coverage increased (+0.04%) to 68.795% when pulling 69733aa47f44ff38b245d0db72e92a26d9bb056a on toanzian/acc-#1976 into 9d8abf7ac2d8f7aacfa7ad2e70d4db337af4ac8b on master.


udev_monitor_enable_receiving returns EINVAL

Now that #758 is fixed, another error prevents running Electron apps (tested w/ hyperterm & atom):
arcanis@DESKTOP-819ATN1:~$ DISPLAY=localhost:0.0 atom
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[6186:0925/155804:FATAL:udev_linux.cc(29)] Check failed: 0 == ret (0 vs. -22)
#0 0x000001bfb0ae <unknown>
#1 0x000001c10f3b <unknown>
#2 0x0000026aceeb <unknown>
#3 0x000002404e95 <unknown>
#4 0x000001bfbd6f <unknown>
#5 0x000001c1764b <unknown>
#6 0x000001c17b8b <unknown>
#7 0x000001bf1209 <unknown>
#8 0x000001c2b660 <unknown>
#9 0x000001c16eaa <unknown>
#10 0x0000023dbfa6 <unknown>
#11 0x0000023dc0d7 <unknown>
#12 0x000001c4ba38 <unknown>
#13 0x000001c47d4d <unknown>
#14 0x7fc4984176fa start_thread
#15 0x7fc491d76b5d clone

I digged a bit, and apparently it's because of the udev_monitor_enable_receiving function returning -22, which appears to be EINVAL.

Yeah lol, udev doesn't even run at all.  Right now devfs is practically hardcoded in the init executable (this is actually the only Microsoft ELF64 file that gets dropped into
%localappdata%\lxss\rootfs
If you delete it, it gets regenerated.  I don't know what they're going to do about systemd and udev.  Right now all that stuff that gets set up by udev (devfs in /dev for example) is basically hardcoded into the init binary.  I don't even know how it's generated, or even which compiler and libc they're using to create it.  It's very mysterious, and it seems like a hack, but I have no idea, since I've never reverse engineered anything before.  I did hear that it actually does two different things right now, depending on what PID it's launched as.  If you run it as any PID other than PID 1, it is actually the mysterious /usr/bin/winrun (which is a symlink to /init).  Otherwise, it does something completely different, namely initializing the LX instance, setting up /dev and /proc and what have you.  Hopefully we'll hear more about it in the future.

/init is just a Linux ELF64 binary, just like any other. The only thing special about it is (a) it's written by Microsoft, (b) it talks to the Windows lxssmanager service though the IPC channel (/dev/lxss), a device which doesn't exist on native Linux.
Other than that:
/$ sudo file init
init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
    interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24,
    BuildID[sha1]=6bbae786cbf484441e892bd0b7cf48a787b98338, stripped
/$ sudo ldd init
        linux-vdso.so.1 =>  (0x00007fffd1599000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f69ad210000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f69ada00000)
ken@DESKTOP-P2D46NF:/$ ls /lib64/

It's even dynamically linked with gnulibc. Which is actually kind of ballsy - I thought it was traditional to statically link init.
As for electron, udev is relatively simple to configure away in the source. That's not what is critically blocking Atom or VS Code (which is just another way of saying 'Google Chrome') right now.

@therealkenc I dropped it into a hex editor, and init does a lot of stuff.  It's actually a weird kind of reverse console host.  The WSL TTYs are, weirdly, sort of like sockets on init, which is kind of like a daemon that marshals all of the TTY I/O through the bus (which it binds exclusively).  Makes sense, since the Windows kernel would never directly display a tty.

Don't get too hung up on udev or systemd. It's kind of a side-show really. The native Linux kernel proper technically doesn't care if udev exists either. It's a userspace library (libudev) that receives messages from the kernel over AF_NETLINK -- assuming anything is there to listen. It is this WSL kernel netlink surface that is missing. Other Linux distros like Android don't have systemd. That is, udev is a "Ubuntu etc thing" not a "Linux thing".
In fact because udevlib is just a userspace library, you can totally just stub it and make the rest of userspace happy. I just about did that for the Chrome port, but it turns out you can just configure it away (with some work) because Android. OS X, and embedded environments have never heard of it. The chromium content library annoyingly uses it to see if usb thumb drives, usb bluetooth headsets, and usb cameras have come and gone.
Sooner or later it seems to me they are going to have to get out of the way of 'real init' on PID 1 (where God intended it) if they want to remain distro-agnostic. But since right now 'real init' on Ubuntu means systemd, that's premature until enough of the kernel netlink protocol is implemented or stubbed enough to make systemd happy.

Atom now lights up with libudev-stub, which works around the udev_monitor_enable_receiving() error noted in the issue title. That's the good news. The bad news is that it has a problem with opening files. Which is kind of an important feature for an editor 😢.
The cause is likely trivial. Finding it is not, but someone familiar with the (huge) Atom source base could probably narrow down where it goes south. I am not sure at this point whether the problem originates in electron proper, or in some native-code node module used by Atom. Pretty screencap anyway.

The OP here was:
[6186:0925/155804:FATAL:udev_linux.cc(29)] Check failed: 0 == ret (0 vs. -22)

Which was addressed with the NETLINK_KOBJECT_UEVENT work in 16273.


CI not running on main

I thin not all CI is running on push to main.

#368 fixes iOS and Qt. We still need android. Should we just make android-ci-pull.yml run on main and maybe rename it? I recently tried to run android-ci.yml and it failed...

Here is the failing android ci run from one week ago: https://github.com/maplibre/maplibre-gl-native/runs/7178166688?check_suite_focus=true

It fails with something in firebase https://console.firebase.google.com/project/maptiler-gl-mobile/testlab/histories/bh.bde30741ce7189e7/matrices/4649740034883780922?pli=1 but I don't have access to that. I wonder if we should just get rid of firebase and other accounts where we don't know how the secrets are managed...


terraform_docs args throws unrecognized option error

- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.29.0
  hooks:
    - id: terraform_validate
    - id: terraform_fmt
    - id: terraform_docs
      args: ['--sort-by-required', '--no-providers']

is currently failing with the following error:
Terraform docs...........................................................Failed
- hook id: terraform_docs
- exit code: 1

getopt: unrecognized option '--sort-by-required'
getopt: unrecognized option '--no-providers'

# terraform-docs -v
terraform-docs version v0.0.0- v0.9.1 darwin/amd64

After a few failed attempts at digging in the scripts to figure out a fix, I am resorting to asking for competent help here.. :)

$ terraform-docs --help
A utility to generate documentation from Terraform modules in various output formats

Usage:
  terraform-docs [command]

Available Commands:
  completion  Generate autocomplete for terraform-docs
  help        Help about any command
  json        Generate JSON of inputs and outputs
  markdown    Generate Markdown of inputs and outputs
  pretty      Generate colorized pretty of inputs and outputs
  tfvars      Generate terraform.tfvars of inputs
  version     Print the version number of terraform-docs
  xml         Generate XML of inputs and outputs
  yaml        Generate YAML of inputs and outputs

Flags:
      --header-from string             relative path of a file to read header from (default "main.tf")
  -h, --help                           help for terraform-docs
      --no-header                      do not show module header
      --no-inputs                      do not show inputs
      --no-outputs                     do not show outputs
      --no-providers                   do not show providers
      --no-requirements                do not show module requirements
      --no-sort                        do no sort items
      --output-values                  inject output values into outputs
      --output-values-from string      inject output values from file into outputs
      --sort-by-required               sort items by name and print required ones first
      --sort-inputs-by-required        [deprecated] use '--sort-by-required' instead
  -v, --version                        version for terraform-docs
      --with-aggregate-type-defaults   [deprecated] print default values of aggregate types

Use "terraform-docs [command] --help" for more information about a command.

and
$ terraform-docs version
terraform-docs version v0.0.0- v0.9.1 darwin/amd64 BuildDate: 2020-04-03T02:30:49+0100

It likes this project is calling the deprecated options of terraform-docs, and not accepting their replacements.

So use --sort-inputs-by-required instead.

- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.29.0
  hooks:
    - id: terraform_validate
    - id: terraform_fmt
    - id: terraform_docs
      args: ['--sort-by-required', '--no-providers']

is currently failing with the following error:
Terraform docs...........................................................Failed
- hook id: terraform_docs
- exit code: 1

getopt: unrecognized option '--sort-by-required'
getopt: unrecognized option '--no-providers'

# terraform-docs -v
terraform-docs version v0.0.0- v0.9.1 darwin/amd64

After a few failed attempts at digging in the scripts to figure out a fix, I am resorting to asking for competent help here.. :)

This should work:
- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: v1.29.0
  hooks:
    - id: terraform_validate
    - id: terraform_fmt
    - id: terraform_docs
      args:
        - '--args=--sort-by-required --no-providers'

Unfortunately that does not work: +Error: unknown flag: --sort-by-required --no-providers.
Pretty sure that ends up as terraform-docs md "--sort-by-required --no-providers" instead of terraform-docs md --sort-by-required --no-providers because of the "$args" at https://github.com/antonbabenko/pre-commit-terraform/blob/master/terraform_docs.sh#L57

It does work, I just tried it exactly as I gave it.
Terraform validate.......................................................Passed
Terraform fmt............................................................Passed
Terraform docs...........................................................Passed

What version of terraform-docs do you have installed, and did you use exactly what I suggested?

Ah, sorry, my bad, I was running with an older rev. Works with v.1.3.0. Thank you :+1:

I also confirm it does work with v.1.29.0. Thanks you very much @snolan-uturn !


Question : Portal metadata and Geoportal Server

How to use metadata of Portal in Geoportal Server ?

I've understand that it's just the metadata editor of Geoportal that we can use in Portal for ArcGIS.
We can't use the metadata on Portal in Geoportal.

if you want to harvest Portal for ArcGIS items into Geoportal Server, you can use the ArcGIS Portal ATOM feed and register those.

Thanks for the idea ! Can you give me a link of the documentation ?

here you go: https://github.com/Esri/geoportal-server/wiki/How-to-Publish-Resources#atom

You can register Portal for ArcGIS items but you can't retrieve the metadata you create via editor. i would like to register metadata create frome GXE Editor in Portal for ArcGIS in Geoportal.


feat(card)!: refactors CardHeader to use only ReactNode

BEAKING CHANGE:

Refactors the CardHeader to use only ReactNode in order
to allow easier placement of the content without the need
for many confusing props.
Adds CardHeaderTypography component for the header text
Adds CardSubHeaderTypography component for the
subheader text
Adds examples in .mdx files for how to implelement
previous examples

Looks good! As you said in chat, please update cypress test as well.

@boilund thanks! I have updated Cypress test but now a Select test fails only in Firefox, now sure why.


Remove extraneous app.scss

File is unnecessary, as it is covered by
`blueprints/ember-cli-neat/files/app/styles/app.scss`

Again, thanks! Not sure why I didn't get an alert about these merge requests! Ill need to get that fixed.


An issue occured when unpacking qihoo apk

I compiled kisskiss successfully. But when I ran kisskiss, I got following error message.

I want to know what is problem and how to view error log.

Can you provide the sha1 or upload the file you're attempting to unpack?
Seems like it may have reprotected the memory region it's attempting to dump.

Following is a link of the application.
https://play.google.com/store/apps/details?id=com.ore.yorkfeng.comfortbase

same issue on different app with same qihoo target


Disconnect some event on Canvas destruction.

Extracted from https://github.com/napari/napari/pull/2612,
see some of the failing tests from the previous commits in above PRs.
Vispy seem to internally use weakrefs so that once the canvas is destroyed, event are not sent,
my guess is in above PR is likely keeping extra references around, leading to typical
error warnings that the C++ object have already been destroyed.
This seem to fix the errors on the action manager PRs, I'm unsure if
that would be the right fixes, but at least that should help to start
the discussion if something else keep those around.
In the Qt viewer I guess we could also set self.canvas to None is that's
desirable. I don't like accessing vispy private API either but have not
found any other ways.
I'm unsure how to test; as I'm unsure what does keep a reference
around in #2612.

If I don't do  on_theme_change = self.canvas._on_theme_change
        theme = self.viewer.events.theme
        theme.connect(self.canvas._on_theme_change)

        def disconnect():
            theme.disconnect(self.canvas._on_theme_change)

        self.canvas.destroyed.connect(disconnect)

then it trigger
CALL ERROR: Exceptions caught in Qt event loop:
  ________________________________________________________________________________
  Traceback (most recent call last):
    File "/home/runner/work/napari/napari/napari/_qt/qt_viewer.py", line 288, in disconnect
      theme.disconnect(self.canvas._on_theme_change)
    File "/home/runner/work/napari/napari/napari/_qt/qt_viewer.py", line 263, in __getattr__
      return object.__getattribute__(self, name)
  AttributeError: 'QtViewer' object has no attribute 'canvas'
  ________________________________________________________________________________
  ----------------------------- Captured stderr call -----------------------------
  Exceptions caught in Qt event loop:
  ________________________________________________________________________________
  Traceback (most recent call last):
    File "/home/runner/work/napari/napari/napari/_qt/qt_viewer.py", line 288, in disconnect
      theme.disconnect(self.canvas._on_theme_change)
    File "/home/runner/work/napari/napari/napari/_qt/qt_viewer.py", line 263, in __getattr__
      return object.__getattribute__(self, name)
  AttributeError: 'QtViewer' object has no attribute 'canvas'

Which make no sens to me, same theme = self.viewer.events.theme , but with has not attribute viewer.
Do you believe that modifying event.connect, to take kwarg like
event.connect(callback, disconnect_on_destruction=[self.canvas])

Would make sens ? That might be a bit too qt_specific.

Hmm ok, I'll be honest, I'm not quite sure whats going on here either. Maybe @tlambert03 can take a look when he's ready.

I'm struggling to find something I can reproduce locally at the moment (regardless of whether I comment out what's in thisPR or not).  If this PR accomplishes something that helps you, it's fine with me... or if you have a test that you've been using to test it, let me know

It triggers the error only on ghaction for me, and also only when I include changes in #2612 so also 🤷.
I'll include similar changes in https://github.com/napari/napari/blob/master/napari/_vispy/vispy_axes_visual.py (likely today), and we can leave it as amystery , or make it part of #2612


Error using Sublime Text to create shell scripts

This is a strange one.
When I create a new bash script using Sublime Text (in Bash Shell mode), it works fine until I create a conditional statement, in this case and IF statement.
The script will not work unless I create the first IF condition using vi on the command line. If I write the first conditional statement using vi on the command line, I can open the script in Sublime Text and write other conditional statements and it works fine.
If I write the following using Sublime text:
#!/bin/bash
echo "checking for the item file"
item="item.txt"
if [ -r $item ]
then
echo "The item file exists and is readable"
else
echo "The item file does not exist or is not readable"
fi_
The echo and variable assignment will run but when I add the IF statement, I get the following error:
user@machine:/mnt/c/scripts$ ./item_file.sh
checking for the item file
./item_file.sh: line 9: syntax error near unexpected token fi' ./item_file.sh: line 9: fi'
If I write the same script using vi on the command line:
#!/bin/bash
echo "checking for the item file with vi"
item="item.txt"
if [ -r $item ]
then
echo "The item file exists and is readable"
else
echo "The item file does not exist or is not readable"
fi
It will run fine:
user@machine:/mnt/c/scripts$ ./item_file_2.sh
checking for the item file with vi
The item file does not exist or is not readable
At this point, I can open the second file with Sublime text and add code and it will run fine:
user@machine:/mnt/c/scripts$ ./item_file_2.sh
checking for the item file with vi
The item file does not exist or is not readable
checking for the item2 file with Sublime Text
The item2 file does not exist or is not readable
I can continue to add code to the file, including conditional statements, using Sublime Text and it will continue to run fine.
I have tried several things in Sublime Text to be able to code the file in this tool from the beginning with the same result. It will fail until I write the first conditional statement in vi on the command line. Once I do that, I can open the script in Sublime Text and it will be fine to use.
Windows Build: Microsoft Windows [Version 10.0.15063]
strace.txt
Thanks for help,
Pat

I assume you are talking about Windows Sublime Text using interop in "bash mode". If so, this is probably a variation of #2318. Basically same as this. Check your end-of-line convention in Sublime. You want explicit Unix style. I speculate in your "continuing to add code" scenario, Sublime has kicked in some kind of auto-detection of EOL convention and goes with the flow thereon.
For a while now I have been wanting to share this old (and long addressed) VSCode github post for comedic value.

Thanks for the reply and yes, I do mean Windows Sublime Text. When I referred to "bash mode", I was referring to Sublime's default syntax for the session I was working in.  I certainly considered end-of-line conventions in Sublime so I tried different things to test for that but I could not identify it. The strange thing is that it only happened when writing the first conditional statement. If I do that in vi on the command line, I can reopen the file and write many other IF's without an issue.
You might be right about the Sublime's potential "auto-detection of Unix EOL conventions" but I would have thought I would see that with other statements.  I will take a look at #2318. Thanks.

I would have thought I would see that with other statements

"It's complicated". In Bash (as a scripting language), carriage return is syntactically correct in some contexts. This is a perfectly legal bash script:
$ printf "echo \"hello\"\r\necho \"world\"\r\n" > hello.sh
$ hexdump -C hello.sh
00000000  65 63 68 6f 20 22 68 65  6c 6c 6f 22 0d 0a 65 63  |echo "hello"..ec|
00000010  68 6f 20 22 77 6f 72 6c  64 22 0d 0a              |ho "world"..|
0000001c
$ bash hello.sh
hello
world

That script is outputting an invisible carriage return to stdout as well as the newline. But it is technically different output than a script without the carriage return.
At the end of the day, Cygwin's set -o igncr needs to be upstreamed. Or maybe someone who has pull with people at Canonical can get the patch included in Ubuntu's distro. But even that is basically a hack to work around the more fundamental problem. [Fighting words] Languages that are sensitive to whitespace are broken (looking at you too, Python).

Languages that are sensitive to whitespace are broken (looking at you too, Python).

I think even guido once said that if he were to change one thing about python, he would change this part. :)

The behaviour here was explained by CRLF problems that would manifest on Real Linux.


[Docs] Xcode 15 and User Script Sandboxing

Apps created with Xcode 15 have User Script Sandboxing = YES set by default which requires all referenced files to be specified in the run script inputs. The official docs don't state this yet: https://firebase.google.com/docs/crashlytics/get-started?platform=ios#set-up-dsym-uploading
Fix from @samedson is here: https://github.com/firebase/firebase-ios-sdk/pull/11463#issue-1767693978
I think if would make sense to add this to the in-repo docs to save people some time searching.

Thanks for the suggestion and PR. The team will take a look this coming week.

In case someone also runs into this, option 2 from here of setting the input file list to ${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist can break preview builds as they can have a BUILD_DIR like /Users/[user]/Library/Developer/Xcode/DerivedData/[project]-[hash]/Build/Intermediates.noindex/Previews/[project]/Products/Debug-iphonesimulator/ where ../../ wouldn't be enough to reach SourcePackages, so I think it's safer to go with option 1.


server-sent events how to with routing-controllers?

exploring ways to add to server-sent events(SSE) to routing-controllers based project.
Following code works with simple koa.
looking for help on how I can use PassThrough stream with routing-controllers
const Koa = require('koa');
const Router = require('koa-router');
var bodyParser = require('koa-bodyparser');
const events = require('events');
const cors  = require('kcors');

const PassThrough = require('stream').PassThrough;
const dispatcher = new events.EventEmitter();
const app = new Koa();
const router = new Router();

router.post('/send', bodyParser(), async (ctx) => {
  console.log('body', ctx.request.body);
  dispatcher.emit('message', ctx.request.body);
  ctx.response.set('Content-Type', 'text/plain;charset=utf-8');
  ctx.body = 'ok';
});

router.get('/subscribe', async (ctx) => {
  let stream = new PassThrough();

  let fn = (data, event) => {
    if(event) stream.write(`event: ${event}\n`);
    stream.write(`data: ${JSON.stringify(data)}\n\n`);
  }
  let finish = (e) => dispatcher.removeListener('message', fn);

  ctx.response.status = 200;
  ctx.response.type = 'text/event-stream;charset=utf-8';
  ctx.response.set('Cache-Control', 'no-cache');
  ctx.body = stream;

  stream.write(': open stream\n\n');
  dispatcher.on('message', fn);
  // ctx.req.on('close', ctx.res.end());
  ctx.req.on('close', finish);
  ctx.req.on('finish', finish);
  ctx.req.on('error', finish);
});

app
  .use(cors())
  .use(router.routes())
  .use(router.allowedMethods())
  .listen(process.env.PORT || 3001, process.env.IP || '<IP_ADDRESS>');

<html>
<head>
  <script>
    var source = new EventSource("http://localhost:3001/subscribe");
    source.addEventListener('message', function(e) {
      console.log('data', JSON.parse(e.data).aaa)
      if(JSON.parse(e.data).aaa === 0) {
        console.log('closing')
        source.close()
      }
    }, false);

    source.addEventListener('open', function(e) {
      console.log('Connection was opened.', e)
    }, false);

    source.addEventListener('error', function(e) {
      if (e.readyState === EventSource.CLOSED) {
        console.log('Connection was closed.');
      }
    }, false);

  </script>
</head>
<body>

</body>
</html>

Got some success with following code , except   for request.on.
    // request.on('close', finish);
    // request.on('finish', finish);
    // request.on('error', finish);

Working Code
import {Service} from 'typedi';
import {Request, Response} from 'koa';
import {Controller, Param, Body, Get, Post, Put, Delete, JsonController, Req, Res} from 'routing-controllers';
import * as events from 'events';

const PassThrough = require('stream').PassThrough;
const dispatcher = new events.EventEmitter();

@Service()
@JsonController()
export class StreamController {

  @Post('/stream/send')
  post(@Body() data: any) {
    console.log('data', data);
    dispatcher.emit('message', data);
    return {result: 'ok'};
  }

  @Get('/stream')
  async stream(@Req() request: any, @Res() response: Response) {
    response.status = 200;
    response.type = 'text/event-stream; charset=utf-8';
    response.set('Cache-Control', 'no-cache');

    const stream = new PassThrough();

    const fn = (data, event) => {
      if (event) {
        stream.write(`event: ${event}\n`);
      }
      stream.write(`data: ${JSON.stringify(data)}\n\n`);
    }
    const finish = (e) => dispatcher.removeListener('message', fn);

    response.body = stream;

    stream.write(': open stream\n\n');
    dispatcher.on('message', fn);
    // request.on('close', finish);
    // request.on('finish', finish);
    // request.on('error', finish);
  }
}

I don't see what exact problem with routing-controllers. Can you provide a simplified example what is working as expected with express/koa and don't work with routing-controllers?

in the HTML client about,  when client receives data   { aaa: 0 } ,  I am clousing EventSource on the client side. this triggers execution of  request.on('close', finish);  code on server-side and below  exception thrown.
Problem: with is the correct way to call  request.on in  routing-controllers environment?
when using koa without routing-controllers,  this works ctx.req.on('close', finish);
  @Get('/stream')
  async stream(@Req() request: any, @Res() response: Response) {
    try {
      response.status = 200;
      response.type = 'text/event-stream; charset=utf-8';
      response.set('Cache-Control', 'no-cache');

      const stream = new PassThrough();

      const fn = (data, event) => {
        if (event) {
          stream.write(`event: ${event}\n`);
        }
        stream.write(`data: ${JSON.stringify(data)}\n\n`);
      }
      const finish = (e) => dispatcher.removeListener('message', fn);

      response.body = stream;

      stream.write(': open stream\n\n');

      dispatcher.on('message', fn);
      request.on('close', finish);
      request.on('finish', finish);
      request.on('error', finish);
    } catch (e) {
      console.log(e)
    }
  }

error:
listening on port 3000
TypeError: request.on is not a function
    at StreamController.<anonymous> (/server/src/controllers/StreamController.ts:54:15)
    at Generator.next (<anonymous>)
    at /server/src/controllers/StreamController.ts:19:71
    at __awaiter (/server/src/controllers/StreamController.ts:15:12)
    at StreamController.stream (/server/src/controllers/StreamController.ts:64:16)
    at ActionMetadata.executeAction (/server/src/metadata/ActionMetadata.ts:250:62)
    at /server/src/RoutingControllerExecutor.ts:92:35
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)
GET /api/stream - 0ms
data { aaa: 10 }
POST /api/stream/send - 0ms
data { aaa: 0 }
POST /api/stream/send - 0ms

Ok. I am testing below  modified   code.
somehow the finish callback function never called :(
Expected : when browser's EventSource  client closes,  server-side finish callback function should be called.
import {Service} from 'typedi';
import {Request, Response} from 'koa';
import {Controller, Param, Body, Get, Post, Put, Delete, JsonController, Req, Res} from 'routing-controllers';
import * as events from 'events';

const PassThrough = require('stream').PassThrough;
const dispatcher = new events.EventEmitter();

@Service()
@JsonController()
export class StreamController {

  @Post('/stream/send')
  post(@Body() data: any) {
    console.log('data', data);
    dispatcher.emit('message', data);
    return {result: 'ok'};
  }

  @Get('/stream')
  async stream(@Req() request: Request, @Res() response: Response) {
    try {
      response.status = 200;
      response.type = 'text/event-stream; charset=utf-8';
      response.set('Cache-Control', 'no-cache');

      const stream = new PassThrough();

      const fn = (data, event) => {
        if (event) {
          stream.write(`event: ${event}\n`);
        }
        stream.write(`data: ${JSON.stringify(data)}\n\n`);
      }
      const finish = (e) => {
        console.log('finish...')
        dispatcher.removeListener('message', fn);
      }

      response.body = stream;

      stream.write(': open stream\n\n');

      dispatcher.on('message', fn);
      request.req.on('close', finish);
      request.req.on('finish', finish);
      request.req.on('error', finish);
    } catch (e) {
      console.log(e)
    }
  }
}

// ES https://localhost:3000/api/stream
// POST https://localhost:3000/api/stream/send
// Payload : {"aaa": 10} or {"aaa": 0}

@Req() request gives you object from context.request, so @Req() request === context.request, thats why you should not have problems with request. I see you are using context.req in your examples, not context.request, why? are you using koa v2?

where do you see I am using context.req?  yes I am using Koa 2.0 for both cases.
I have two examples here:

Pure Koa 2.0 example shown here: stream.js, stream.html. In this example, I am not using routing-controllers . This is working perfectly as expected.
StreamController.ts Implemented with routing-controllers and Koa 2.0 .  In this case : .on('close', finish),.on('finish', finish);.on('error', finish); are not working.

if your question is,  in Case2, why I am using request.req.on('close', finish); instead of request.on('close', finish); , I got error  request.on is not a function with request.on('close', finish);.
you can reproduce error easily with code provided in the links. steps to reproduce  :

start the server yarn run start
open client app i.e., stream.html
post below json payload to  https://localhost:3000/api/send/message via postman
payload:  {"aaa": 10}    should print 10 in browser console.
payload:  {"aaa": 0}    should print closing in browser console.   'finish...' should be printed on  the server-side   (which is not happening)

where do you see I am using context.req?

from your code example in first post
  ctx.req.on('close', finish);
  ctx.req.on('finish', finish);
  ctx.req.on('error', finish);
});

@Req() request provides you a Koa Request object, same if you do context.request. Looks like you need node request object, not koa. Also I didn't find in koa docs what is request.req, there is no such method in the docs.

In first example, I am not using @Req() request it is pure Koa 2.0 code based on koa sample here.  we don't need to worry on it as it is working 100% as expected.
I think the Koa Request is a wrapper to node request object. To get raw node request object we have to use ctx.req. I am concluding this base on this
My requirement is when using @JsonController()/@Req(),  I need to get access to raw node request which implement stream.Readable which in turn extends EventEmitter. So  raw node request  has .on() method.

I don't really understand xmlking requirements, @19majkel94 can you please help with this issue.

I don't know what is the problem. @xmlking Are you sure that ctx.request.req is exactly the same as ctx.req?
If you need ctx instead of request, just use @Ctx():
async stream(@Ctx() ctx: Context) {}

I would also like to get this to work.
Consider the following two pieces of code. First one works, second does not. Yet their contents are identical, the only difference is that the first one is setup as a middleware directly to expressJS, the second is instantiated by routing-controllers as a JsonController.
So far my deduction is that when the Response object is processed through routing-controllers, it is ultimately being terminated by calling res.end(), which is bad for a long-lived connection. When I run the first piece of code, the response is wrapped properly in the stream object, and lives on. However, I do need to continuously hammer my keepAlive method, otherwise my stream dies after between 30 seconds to 2 minutes time.
services/SSEController instantiated manually from my express server setup
import { Server } from '../';
import { Container, Service } from 'typedi';

import { Express, Request, Response } from 'express';
import { EventEmitter } from 'events';
import { PassThrough } from 'stream';

import { Logger } from '../utils/Logger';
const dispatcher = new EventEmitter();

/**
 * Singleton class serving as SSE event handler
 */
@Service()
export class SSEController {
  app: Express;

  constructor() {
    this.app = Container.get(Server).app; // My ExpressJS app object

    // Register the route this middleware should respond to
    this.app.use('/api/event', (req, res) => this.connect(req, res));

    // Register this class with the TypeDI engine, so we can hook up to the `publish` method here from
    // other places in our application.
    Container.set(SSEController, this);
  }

  /**
   * A Client connects and the response object is configured as a
   * long-lived connection
   *
   * @param req
   * @param res
   */
  public connect(req: Request, res: Response): void {
    req.socket.setTimeout(Number.MAX_VALUE);

    // Create the event stream
    const stream = new PassThrough();
    stream.pipe(res);

    // A handler function called each time something is to be published to our clients
    const handler = (data: any, event: any) => {
      if (event) {
        Logger.log.debug(`SSE Event received: ${event}`);
        stream.write(`event: ${event}\n`);
      }
      Logger.log.debug(`SSE Data published: ${JSON.stringify(data)}`);
      stream.write(`data: ${JSON.stringify(data)}\n\n`);
    }

    // Register the handler on our dispatcher
    dispatcher.on('message', handler);
    Logger.log.debug(`Client #${dispatcher.listenerCount('message')} connected!`);

    // The 'close' event is fired when a user closes their browser window.
    // Remove this client from our openConnections pool
    req.on('close', (err?: any) => this.closeConnection(handler, err));
    req.on('finish', (err?: any) => this.closeConnection(handler, err));
    req.on('error', (err?: any) => this.closeConnection(handler, err));

    // Return the response via our stream
    res.writeHead(200, {
      'Content-Type': 'text/event-stream',
      'Cache-Control': 'no-cache',
      'Connection': 'keep-alive'
    });
    stream.write(': open stream\n\n');
    this.keepAlive(stream);
  }

  /**
   * If we do not write to this stream once every variable 30sek - 2 minute intervals,
   * this connection will be terminated.
   *
   * @param stream the stream to keep alive
   */
  private keepAlive(stream: PassThrough) {
    setTimeout(() => {
      try {
        stream.write('\n');
        this.keepAlive(stream);
      } catch (ex) {
        Logger.log.debug(ex);
        this.closeConnection(stream);
      }
    }, 30 * 1000);
  }

  /**
   * Close the connection to one client
   * This is usually called as an event handler for one of three event states on the
   * request object: `close`, `finish` or `error`
   *
   * @param handler The client handler to close
   * @param err optionally an error object if the stream closes through an exception
   */
  private closeConnection(handler: any, err?: any) {
    if (err) { Logger.log.error(err); }

    Logger.log.debug(`SSE Client #${dispatcher.listenerCount('message')} disconnecting!`);
    dispatcher.removeListener('message', handler);
  }

  /**
   * Server publishing an event
   *
   * @param message any string. Can be a stringified JSON object
   */
  public publish(message: string) {
    Logger.log.debug(`SSE Publishing ${message} to ${dispatcher.listenerCount('message')} clients!`);
    dispatcher.emit('message', message);
    return {result: 'ok'};
  }
}

controllers/SSEController
import {Container, Service} from 'typedi';
import {Param, Body, Get, Post, JsonController, Req, Res} from 'routing-controllers';
import {Request, Response} from 'express';
import {EventEmitter} from 'events';
import {PassThrough} from 'stream';

import { Logger } from '../utils/Logger';

const dispatcher = new EventEmitter();

@Service()
@JsonController()
export class SSEController {
  openConnections: Response[] = [];

  /**
   * A Client connects and the response object is configured as a
   * long-lived connection
   *
   * @param req
   * @param res
   */
  @Get('/event')
  async connect(@Req() req: Request, @Res() res: Response) {
    req.socket.setTimeout(Number.MAX_VALUE);

    // Create the event stream
    const stream = new PassThrough();
    stream.pipe(res);

    // A handler function called each time something is to be published to our clients
    const handler = (data: any, event: any) => {
      if (event) {
        Logger.log.debug(`SSE Event received: ${event}`);
        stream.write(`event: ${event}\n`);
      }
      Logger.log.debug(`SSE Data published: ${JSON.stringify(data)}`);
      stream.write(`data: ${JSON.stringify(data)}\n\n`);
    }

    // Register the handler on our dispatcher
    dispatcher.on('message', handler);
    Logger.log.debug(`Client #${dispatcher.listenerCount('message')} connected!`);

    // The 'close' event is fired when a user closes their browser window.
    // Remove this client from our openConnections pool
    req.on('close', (err?: any) => this.closeConnection(handler, err));
    req.on('finish', (err?: any) => this.closeConnection(handler, err));
    req.on('error', (err?: any) => this.closeConnection(handler, err));

    res.writeHead(200, {
      'Content-Type': 'text/event-stream',
      'Cache-Control': 'no-cache',
      'Connection': 'keep-alive'
    });
    stream.write(': open stream\n\n');
    this.keepAlive(stream);
  }

  /**
   * If we do not write to this stream once every variable 30sek - 2 minute intervals,
   * this connection will be terminated.
   *
   * @param stream the stream to keep alive
   */
  private keepAlive(stream: PassThrough) {
    setTimeout(() => {
      try {
        stream.write('\n');
        this.keepAlive(stream);
      } catch (ex) {
        Logger.log.debug(ex);
        this.closeConnection(stream);
      }
    }, 30 * 1000);
  }

  /**
   * Close the connection to one client
   * This is usually called as an event handler for one of three event states on the
   * request object: `close`, `finish` or `error`
   *
   * @param handler The client handler to close
   * @param err optionally an error object if the stream closes through an exception
   */
  private closeConnection(handler: any, err?: any) {
    if (err) { Logger.log.error(err); }

    Logger.log.debug(`SSE Client #${dispatcher.listenerCount('message')} disconnecting!`);
    dispatcher.removeListener('message', handler);
  }

  /**
   * Server publishing an event
   *
   * @param message any string. Can be a stringified JSON object
   */
  @Post('/event')
  public publish(message: string) {
    Logger.log.debug(`SSE Publishing ${message} to ${dispatcher.listenerCount('message')} clients!`);
    dispatcher.emit('message', message);
    return {result: 'ok'};
  }
}

So, looks like we go to the conclusion - it wasn't problem with calling req.on, but:

So far my deduction is that when the Response object is processed through routing-controllers, it is ultimately being terminated by routing-controllers calling res.end(), which is bad for a long-lived connection.

Yes, this is an issue, I have some problems with streaming files. @pleerock if think we need to introduce a decorator to mark the method as routing-controller shouldn't handle the response, dev did this my himself. Or we can do breaking change and assume that when we inject res object, the response has been handled and we should handle response when the returned value from action method is undefined.

@19majkel94 i didnt worked with streams in express, can you provide a short example of code that reproduce the issue and reason why it causes this issue. And what do you mean by "shouldn't handle the response" ? Do you mean we should not call .send method?

Yes, for streaming we have to manually send headers and body, so when we finish using express api, we return undefined from action handler and routing-contollers is trying to send 404 response but it can't because of headers already sent.
But when someone don't return the promise but use callback api, he may have problem - first the undefined will be returned by action, then the response 404 send and then his callback called which would try to send headers/body manually using express api, which will fail.

Okay, so problem is here:

                if (action.isJsonTyped) {
                    options.response.json();
                } else {
                    options.response.send();
                }
                options.next();

Okay I think I understood the problem and looks like  a better solution is to create a new decorator.

So let's find a name - @ManualResponse? 😆

Sounds rude... And does not really explain things, we need something more descriptive like @PreventContentSend but more easy and elegant...

Or maybe as an option to @Res decorator?  Like @Res({ preventContentSend: true })?
Disabling automatic response is tightly coupled to the @Res, for koa it would be @Ctx.

No, too implicit. Decorator is better.

One possible way to 'detect' that an user wants to handle the response by him/herself is returning the response itself from the action. I've used this approach before, when I wrote a small "routing-controllers" myself (before I knew about this project).
So we can just test if the action result === the response object.
The action can be written as:
@Get("/users/direct")
getUsersDirectExpress(@Res() response: any): any {
  return response.status(201).contentType("custom/x-sample").send("hi, I was written directly to the response");
}

I've updated my PR #286 to include my proposal.

What is resolution on this issue? Can it be closed now?

I'm not sure, if 0.7.3 is released, we can ask @xmlking to check if the issue still exist when he return the response/ctx object.

Yes its released


Add KO locale

Sorry for not getting to this sooner, thanks a lot for contributing! I'll release this when the next update to Factory Planner happens :)


Poll: replies should say 'timer', not 'timeout'

"Timeout" is mostly a programming term; not something I want to show users. - Zarel

Updated

Re-updated


Upgrade maven-gpg-plugin 3.0.1 -> 3.2.4

This PR contains the following updates:

Package
Type
Update
Change

maven-gpg-plugin
build
minor
3.0.1 -> 3.2.4

[ ] If you want to rebase/retry this PR, check this box

Warning
Renovate's suggested commit message is being replaced with improved initial commits to enable automerging. As a side effect, these suggested commit messages might have changed. Consider comparing the initial commit message and this message to determine the most suitable one. Please leave feedback in #sys-renovate.

Suggested commit message:
Upgrade maven-gpg-plugin 3.0.1 -> 3.1.0

See https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0

Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠ Warning: custom changes will be lost.


Fix the Markdown rendering of some README links

For some reason, the normal (inline) syntax isn't rendering correctly here. So let's switch these two links to footnotes.

The problem is the line break between ] and (.

thank you!


Update version.py

Remove unnecessary # comment in Update version.py

This comment is intentional -- it makes the multi-paragraph block comment more readable.


Diego/formatting

Most of my changes are non-functional: linting, removing unnecessary comments and doc strings, etc. These changes are not exhaustive, meaning you should implement similar changes elsewhere. I also added TODO notes, missing libraries in the toml file, etc.

Hi DIego, thanks for your commits.


Delegate functions get their dependencies passed to them again.

Not sure if this is the best way to fix issue #92, but it looks like it works.

:+1:


feat: add preferred username resolver to oidc provider

Hey, I just made a Pull Request!

:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

Hey @Rugvip!
I read over the docs and it mentions in section 5.7 that "the sub (subject) and iss (issuer) Claims from the ID Token, used together, are the only Claims that an RP can rely upon as a stable identifier for the End-User". i.e. any other identifiers wouldn't be reliable.
By this logic, the current commonSignInResolvers that uses email to resolve users would also be considered unreliable. Imo in this case, adding this optional resolver which has similar downsides to the existing resolvers should be okay.
What do you think?

@JessicaJHee yep you're right, it's not quite as simple as following the spec completely here. What we have on our end in the end is a reflection of the current state in the catalog, that's what makes something like email reasonably safe to use since even though you might have different users with the same email over time, that'll be reflected in the catalog and in the end mapped to the correct user identities.
That said I'm just a bit uncertain at this point about the intention of the preferred_username claim. It sounds like something that could potentially be up to the end user to pick by themselves, but also in some systems essentially just be the plain username. It's a bit of a strange judgement call where the spec definitely has a strong opinion, but it's ultimately comes down to what implementations actually do. For the email claim I think it's safe to expect that users can not provide arbitrary emails, but is the same also true for preferred_username? on idea tbh 😐

@Rugvip I've updated the PR.


Reduce noise in deployment announcer

Put deployment notices on one line
Use less emoji
Make dashboard link assertive rather than suggestive

ITYM fewer emoji ;)
👍

Could we pls try:

the application - staging is being deployed
the application - production deployed