Plex activity sensor is to annoying when Plex server is down

Home Assistant release with the issue: 0.77.3
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.): hassbian
Component/platform: https://www.home-assistant.io/components/sensor.plex/
Description of problem:
Plex activity sensor is working fine, as long the Plex server is running and reachable.
But when I turn the server off, this Sensor flood the log and the info tab in HA with errors.
It also seems to fill up the HTTPConnectionPool ("Max retries exceeded with url").
In the Traceback bellow you can see a short (~1 minute) of the 168 lines log file.
When I turn on the plex server again, all is fine again.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
sensor:
  - platform: plex
    name: "Plex Activity"
    host: "<IP_ADDRESS>"
    token: "xxx"
    ssl: "false"

Traceback (if applicable):
2018-09-16 20:15:15 ERROR (Thread-6) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x555189d0>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:18 ERROR (Thread-6) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e36c390>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:26 ERROR (Thread-5) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e36c790>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:29 ERROR (Thread-5) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e3b85f0>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:32 ERROR (Thread-7) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x554c8950>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:36 ERROR (Thread-21) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e3b8210>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:39 ERROR (Thread-21) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e3b8790>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:39 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.klopferplex_activity fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 171, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 79, in create_connection
    raise err
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 69, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 196, in connect
    conn = self._new_conn()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 180, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x5e329410>: Failed to establish a new connection: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e329410>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
    yield from self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 353, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/plex.py", line 114, in update
    sessions = self._server.sessions()
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/server.py", line 380, in sessions
    return self.fetchItems('/status/sessions')
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/base.py", line 146, in fetchItems
    data = self._server.query(ekey)
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/server.py", line 341, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 525, in get
    return self.request('GET', url, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e329410>: Failed to establish a new connection: [Errno 113] No route to host',))
2018-09-16 20:15:48 ERROR (Thread-13) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e5494d0>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:51 ERROR (Thread-13) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e36c390>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:15:59 ERROR (Thread-10) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e3b8270>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:16:02 ERROR (Thread-10) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e549790>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:16:10 ERROR (Thread-9) [homeassistant.components.media_player.plex] Could not connect to plex server at http://<IP_ADDRESS>:32400 (HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /clients (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x554b4b10>: Failed to establish a new connection: [Errno 113] No route to host',)))
2018-09-16 20:16:10 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.klopferplex_activity fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 171, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 79, in create_connection
    raise err
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/connection.py", line 69, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 196, in connect
    conn = self._new_conn()
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 180, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x5e36c9b0>: Failed to establish a new connection: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 445, in send
    timeout=timeout
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e36c9b0>: Failed to establish a new connection: [Errno 113] No route to host',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
    yield from self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 353, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
    result = method(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/plex.py", line 114, in update
    sessions = self._server.sessions()
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/server.py", line 380, in sessions
    return self.fetchItems('/status/sessions')
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/base.py", line 146, in fetchItems
    data = self._server.query(ekey)
  File "/srv/homeassistant/lib/python3.5/site-packages/plexapi/server.py", line 341, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 525, in get
    return self.request('GET', url, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=32400): Max retries exceeded with url: /status/sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x5e36c9b0>: Failed to establish a new connection: [Errno 113] No route to host',))

I have exactly the same problem with media_player.plex
https://www.home-assistant.io/components/media_player.plex/


Rename keybase revoke to keybase remove-key

It's scary to call it revoking when we're not generating a PGP revocation certificate.  See keybase/keybase-issues#133 for an example of a confusion here.

I'm working on this but before I push I want to make sure I didn't break any tests.
I run npm test in the root directory and get the following output:
$ npm test

><EMAIL_ADDRESS>test /Users/{myUser}/Desktop/node-client
> make test

(cd test && ../node_modules/.bin/iced run.iced)
warn: No config file given, and none found in ~/.node_client_test.json; using defaults
info: Alice wasn't found!
✔ 0_alice.iced: generate
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: This socket is closed.
  at Socket._writeGeneric (net.js:647:19)
  at Socket._write (net.js:700:8)
  at doWrite (_stream_writable.js:301:12)
  at writeOrBuffer (_stream_writable.js:288:5)
  at Socket.Writable.write (_stream_writable.js:217:11)
  at Socket.write (net.js:625:40)
  at BufferInStream.ondata (_stream_readable.js:540:20)
  at BufferInStream.emit (events.js:107:17)
  at BufferInStream.Readable.read (_stream_readable.js:373:10)
  at flow (_stream_readable.js:750:26)
  at resume_ (_stream_readable.js:730:3)
  at _stream_readable.js:717:7
  at process._tickCallback (node.js:355:11)

make: *** [test] Error 1
npm ERR! Test failed.  See above for more details.

The same error occurs on both my edited branch and an unedited branch.

Okay I updated revoke.iced to alias to remove as well as changed the dialogue to DANGER ZONE! Really remove your key and cancel all signatures [y/N] (as well as the test function in user.iced).  But all of this (prompt and cmd alias) is done in revoke.iced would it make sense to change the file to remove.iced then?

:construction_worker:  @maxtaco


Check if a LinkedList is palindrome or not

💥 Proposal
Greetings sir/Mam,
I would like to contribute the code for this issue in C++/CPP.
The code is ready. I have added the code , along with proper explanation of the algorithm , test cases , time complexity and space complexity of the same, as per the guidelines.
Kindly assign it to me.
This is regarding GSSOC'21.
Regards,
Hitain Kakkar

/assign


Update 0.142 release notes

Also added Sphinx label in SELECT documentation to make referencing
the complex grouping operations section more easily.

Looks good


Listing reorg

bump cairo version
reorg listings and file names
update the  ''✅ Compiles'' in the module chapter

This change is

@enitrat  ready for review
this concerns chapter 1 to 7.
Will do others in another PR.

Also updated find_value_iterative function in Enum chapter to use while let now it is available

Also updated find_value_iterative function in Enum chapter to use while let now it is available

No


Handler for newpractitioner

This PR pacthes Medplum codebase with a new http handler to allow free signup for a new Practitioner.
Mostly it is a copy of new patient handler. A a design decision, I had to add a defaultPractitionerAccessPolicy same as defaultPatientAccessPolicy.

Hi @bsoneca thanks for submitting!
First, I 100% support the need for the ability to "add a Practitioner user without sending an email".
I have a few questions about the best way forward.

Do we need both "/admin/invite" and "/auth/newpractitioner"?
Do we need "defaultPractitionerAccessPolicy"?

Do we need both "/admin/invite" and "/auth/newpractitioner"?
The "/admin/invite" endpoint already exists for this use case. But, as you pointed out in Discord, it sends unwanted emails.
My first impression is that the more surgical solution is to add an extra parameter to the "/admin/invite" endpoint to prevent sending the invitation emails.  Would that be sufficient for your use case?
For some additional context, we have an open ticket in our internal ticket system to also add resourceType as a parameter to the "/admin/invite" endpoint which would accept "Practitioner", "Patient", "RelatedPerson", or "Person", which are the valid resource types for SMART-on-FHIR authentication.  So I also want to be mindful of the API endpoint patterns that would be required for that future.  For example, should we also add "/auth/newperson" and "/auth/newrelatedperson"?  Or can we use a single code path for all?
Do we need "defaultPractitionerAccessPolicy"?
I assume that your PR is modeled after "/auth/newpatient" which uses defaultPatientAccessPolicy.  The reason for defaultPatientAccessPolicy is to allow "open patient registration", such that patients can self-register without intervention from an administrator.
Is your intent to enable self-registration for practitioners?  If so, what would be the use case?
Thank you again for your submission.  As I mentioned, I 100% support the need for the ability to "add a Practitioner user without sending an email", and we will make sure certainly make sure that happens.

Update:
With the updated "invite" flow, you can now create a Patient, Practitioner, or RelatedPerson.  This is a single API that handles configuring AccessPolicy and UserConfiguration.
The API is available at /admin/invite

Docs: https://www.medplum.com/docs/tutorials/app/invite
PR: https://github.com/medplum/medplum/pull/1057


Added Protein Translation exercise

See: https://github.com/exercism/x-common/blob/master/protein-translation.md

:+1:


Bump carbon deployment version

$Subject
Relates to https://github.com/wso2/product-is/issues/14289

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2691547666

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2691547666
Status: failure

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2694926105

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2695643689

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2694926105
Status: failure

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2696667304

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2696667304
Status: success


Processed SOP and In-Shop dataset

Hi, @bnu-wangxun
Thanks for your great work.
Could you kindly provide the processed SOP and In-Shop, or the pre-processing codes?

Sorry, I donot have the processed datasets any more.  I think you can write a script to process the original SOP and In shop like the processed CUB and car datasets.


Move baseFonts and RoutedLink to @storybook/components

This is the first brick in the major task of themability. I'd prefer to get it merged as soon as it's reviewed and approved, so that there would be no need for manual syncing between branches.

reviewing

@Hypnosphi don't you want to use this file https://github.com/storybooks/storybook/pull/1360/files#diff-c97e3db45802bdd9004e71e9875e3dfe
it already includes baseFonts?

@UsulPro yes I want, as soon as it's merged


Show author of reply requests (article comments)

We should show author of reply requests, as depicted in figma.
Mobile

Desktop

I would like to try to complete this pull request.

has this issue been completed?

@mojoee ,
Since there has been no response, the issue has not yet begun.

I'm not clear which part in the figma we are referring to. Where should the author of the reply requests been shown?

Sorry for the confusion. Here are the figma links to the section:
Mobile: https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?type=design&node-id=1236-1275&mode=design&t=1pfTEpeMi9zgygTz-4
Desktop: https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?type=design&node-id=890-294&mode=design&t=1pfTEpeMi9zgygTz-4


Revert to latest scipy release once 1.8 is released

To make the CI happy I am using the RC version, it should be reverted back to just "scipy" in requirements.txt

fixed in https://github.com/networkx/nx-guides/pull/62/


Misleading description?

It may be a misleading description here at https://docs.microsoft.com/en-us/azure/active-directory/develop/sample-v2-code#mobile
The following samples show public client mobile applications that access the Microsoft Graph API, or your own web API in the name of the user. These client applications use the Microsoft Authentication Library (MSAL).
I have checked all individual pages and there is no mention of "your own web api" scenario. I believe there is no non-MS Graph web api call in mobile samples.

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

ID: b90331e5-cca5-b157-eaa1-6f8f90003b32
Version Independent ID: 4b1b803d-e30d-10b2-90a1-3f0ccd8d7d44
Content: Code samples for Microsoft identity platform authentication and authorization - Microsoft Entra
Content Source: articles/active-directory/develop/sample-v2-code.md
Service: active-directory
Sub-service: develop
GitHub Login: @mmacy
Microsoft Alias: marsma

@OwenRichards1 Another for you - thanks!
#reassign:OwenRichards1


Master -> Live

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

File
Status
Preview URL
Details

mixed-reality-docs/mixedrealityspatialdatapackager.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Robot- Verify GAU Expenditure on Paid Disbursement

Critical Changes
Changes
Issues Closed
New Metadata
Deleted Metadata
Definition of Done
Refer to Definition of Done to see any additional details for the items below:

[ ] Any net new LWC work has JEST test coverage 50% or above
[ ] Default Sa11y tests pass for all LWC components
[ ] 🔒 Secure both Front-end (LWC) & back-end (Apex) as necessary
[ ] 🔑 Grant users access in Permission Sets (Object, Field, Apex Class) as necessary
[ ] Link the pull request and work item by PR comment and Chatter post respectively, e.g. GUS: W-0000000: Work Name
[ ] Make sure that ACs are updated (if any gaps)
[ ] All acceptance criteria have been met

[ ] Developer
[ ] Code Reviewer

[ ] Pull Request contains draft release notes
[ ] Labels, help text, and customer facing messages are reviewed by Docs
[ ] QE story level testing completed

https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07AH0000009PvfYAE/view


Update documentation

Documentation needs to be added like https://metacpan.org/pod/Browser::Open

Where ? In the README file ?


Implement HTTP server for PWD

Implement simple HTTP server inspired by python -mSimpleHTTPServer.
Serve files in current working directory on next free port, on localhost.

You will also need a new repo listed in github.com/foxygoat/foxygo.at

ok, updated foxygo.at config:
https://github.com/foxygoat/foxygo.at/pull/8


enable io.LimitReader on the server

We should add an io.LimitReader to the tcp connection reader, with a configurable limit.
The websocket package will (soon) have this capability built-in which we can start to leverage.
https://github.com/golang/go/issues/5082

UPDATE the websocket library was updated and now has MaxPayloadBytes which defaults to 32mb. Update the vendored websocket library and provide a way to configure this value
https://godoc.org/golang.org/x/net/websocket#Conn


[Tessera] Could not commit JPA transaction : cannot read h2 db file with large content

Tessera Version : 0.9
Quorum Version : 2.2.3
Expected Behaviour :
Tessera should be able to perform private transactions after restart and store in h2 db file of large size (5000 blocks)
Actual Behaviour :
08:13:49.853 [qtp1685470793-28] WARN  eclipselink.logging.all - Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseExceptionInternal Exception: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: Reading from nio:/quorum/tessera/state.mv.db failed; file length 499712 read length 1536 at 2058395 [1.4.197/1]"; SQL statement:INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?) [50000-197]Error Code: 50000Call: INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?)        bind => [3 parameters bound]Query: InsertObjectQuery(com.quorum.tessera.transaction.model.EncryptedTransaction@b382cbe1)

Steps to reproduce :

Start 2 tessera nodes
Perform 5000 private for all transaction between the nodes
The h2 db file should be mounted so that all the private transactions are stored there
Restart the tessera nodes so that they refer to their same respective h2 db files
Perform 5000 more private for all transaction between the nodes
The transaction will start failing with the error mentioned above

Error Log :
2019-05-22 08:13:49,854 DEBG 'privacy_manager' stdout output:
08:13:49.853 [qtp1685470793-28] WARN  eclipselink.logging.all - Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseExceptionInternal Exception: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: Reading from nio:/quorum/tessera/state.mv.db failed; file length 499712 read length 1536 at 2058395 [1.4.197/1]"; SQL statement:INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?) [50000-197]Error Code: 50000Call: INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?)        bind => [3 parameters bound]Query: InsertObjectQuery(com.quorum.tessera.transaction.model.EncryptedTransaction@b382cbe1)

2019-05-22 08:13:49,854 DEBG 'privacy_manager' stdout output:
08:13:49.854 [qtp1685470793-28] ERROR c.q.t.a.e.DefaultExceptionMapper - Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseExceptionInternal Exception: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: Reading from nio:/quorum/tessera/state.mv.db failed; file length 499712 read length 1536 at 2058395 [1.4.197/1]"; SQL statement:INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?) [50000-197]Error Code: 50000Call: INSERT INTO ENCRYPTED_TRANSACTION (ENCODED_PAYLOAD, TIMESTAMP, HASH) VALUES (?, ?, ?)    bind => [3 parameters bound]Query: InsertObjectQuery(com.quorum.tessera.transaction.model.EncryptedTransaction@b382cbe1)

2019-05-22 08:13:49,854 DEBG 'privacy_manager' stdout output:
08:13:49.854 [qtp1685470793-28] INFO  c.q.tessera.api.filter.LoggingFilter - Exit Request : POST : /sendraw
08:13:49.854 [qtp1685470793-28] INFO  c.q.tessera.api.filter.LoggingFilter - Response for sendraw : 500 Internal Server Error

2019-05-22 08:13:49,865 DEBG 'privacy_manager' stdout output:
08:13:49.865 [qtp1685470793-32] INFO  c.q.tessera.api.filter.LoggingFilter - Enter Request : POST : /sendraw

2019-05-22 08:13:49,879 DEBG 'privacy_manager' stdout output:
08:13:49.878 [qtp1685470793-32] INFO  c.q.t.t.EncryptedTransactionDAOImpl - Stored transaction UbKliQNPuj+XHGCqILsyVxMzCXg6S3yCtPPpxLRBFRIcXzehyYy+f5XLjLD+wqUd/x0AA635+nAJZ/gUMmrjhA==
08:13:49.879 [qtp1685470793-32] INFO  c.q.t.t.PayloadPublisherImpl - Publishing message to http://<IP_ADDRESS>:9001/

hi. when you say mounted? do you mean local file system or some form of NAS or SAN? I'm not sure it matters I just want to get some insight into your setup.

Its a simple docker setup with mounted local directories

ok thanks.. and step 4. How to you restart tessera? a kill? or something else?

just docker-compose down and then docker-compose up -d

ok cool.. have you tried to replicate in a non containerised environment? sorry for all the questions.

no, have not tried to replicate it in a non containerised environment

Preet - we have been running with H2 will millions of transactions in our local setup and it is strange you are facing this for 500 blocks. Could you try to replicate in non-container platform and confirm you are still facing this before we could investigate any further.

Hey @Krish1979 @melowe I have tried replicating it in a non-containerised environment and have not been able to do so. Closing the issue for now. Will open once I reach the root of this.

Worth noting that by default Docker will kill any process after 10 seconds when shutting down. Try increasing the timeout and see if that helps.


Allow plugins to specify / in their entry names

Currently, entries cannot have /es in their names, since / is the path separator. This is restricting since some APIs could return entry names with /es in them or have a hierarchical way of representing paths like //foo. For example in S3, //foo is modeled as /:/:foo (where : is the path separator).
Both the API and FUSE do not allow paths like //foo. However, we can fix the API to recognize these paths. For FUSE, we can indicate in a KNOWN ISSUES section that paths like //foo won't work, and that people should use the Wash commands ls, find when writing their scripts.

We can live without FUSE, but I'd like to understand more how API calls would refer to a path, and how that would affect plugin development.

Yeah, I'll work on exploring this next once the caching stuff's done + the core plugin docs.

@MikaelSmith I'm starting to agree with your earlier suggestion on addressing this if it becomes annoying for plugin authors. However I do think we should remove storing the API key in xattr and just compute it ourselves. This way, we don't have to depend on FUSE to retrieve that information.

Not relying on FUSE for the API key is probably a good move. Some optimizations will be hard if we first have to query the filesystem.

I think there's a pretty easy way to solve this. If we require plugin names to conform to some regex, e.g. like [A-Za-z_]+, then in findEntry, if we strip the /<plugin_name>/ part of the path (which we can do since our Regex guarantees that the plugin name won't contain a /), then notice that our path will be of the form (using psuedo-regex notation):
<entry_name>(<sep><entry_name>)*

where <sep> is some arbitrary path separator. Using this, if we change the matching algorithm to something like
curGroup = pluginRoot
curEntry = pluginRoot
while path is not empty
  if curGroup is not a Group
    error
  end

  entries = curGroup.List
  for entry in entries do
    if entry.Name().IsPrefixOf(path)
      curGroup = entry
      curEntry = entry
      path = path.StripPrefix(entry.Name()).StripSingleChar
      continue
    end
  end

  return error
end

return curEntry

^ The above algorithm isn't quite correct b/c there could be some ambiguity. In the K8 context case, we'd start with
(myproject/127-0-0-1:8443/developer)#<namespace>/pods/pod

(the parentheses are meant to de-limit the entry's name, they're not a part of the path).
If we have contexts named myproject or myproject/127-0-0-1:8443/developer, for example, then the choice would be ambiguous. However, if we re-thought our psuedo-regex as
<sep><entry_name><sep>

instead, then if we restricted the <sep> to conform to some regex, we could extract the <entry_name> as-is and do an equality check.

We could also always include / as a path separator and make PathSeparators() optional -- if they do define it, the separators for that plugin would be / + whatever's returned by PathSeparators().

I kind of like the longest name approach better. When implementing find, we could insert our own path separator on a per-entry basis (e.g. if we had k8 contexts like myproject and myproject/foo, find could return /kubernetes/myproject and /kubernetes:myproject/foo:, respectively) (and probably generalize "outputting" a given entry's path to insert the right separator depending on its name).

We could maybe go with <sep><entry_name><sep> and configure it s.t. when Wash encounters <sep>, it looks for the matching <sep> at the end and strips out the <entry_name> for you (idea being that <sep> probably won't change). If it can't find a matching <sep>, it errors.

Ok, after discussing this with @MikaelSmith, the approach we're going to take is to transform any /'es in entry names to # (# was chosen because it seems less common than : -- if it is also common, we can choose a different character [e.g. %]). If group.List returns two entries with the same name, Wash will log a warning and omit one of them from the returned array.
This is a temporary fix until we own the shell. Once we own the shell, then we can revisit the / => # transformation and take a different approach. One possible approach is to let plugin authors specify their own path separators.


RISC-V MIV SoC clock rate is specified 100x too slow

The hardware clock rate on the RISC-V MIV platforms is off by a factor of 100.  This simple tool simply writes two bytes (".\n") every 100ms:
#include <zephyr.h>
#include <sys/printk.h>

/* 100ms in hardware cycles */
#define CYC_100MS (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 10)h

void main(void)
{
	/* Spin forever printing a "." line at 10 Hz */
	while(1) {
		uint32_t t0 = k_cycle_get_32();

		while((k_cycle_get_32() - t0) < CYC_100MS) {
		}

		printk(".\n");
	}
}

When run on renode using current Zephyr, the output looks like this:
6:40:23.0691 [INFO] uart: [+0.32s host +0s virt 0s virt from start] *** Booting Zephyr OS build v2.5.0-rc1-104-g4ab6dd003ed0  ***
16:40:23.1144 [INFO] uart: [+45.31ms host +1ms virt 1ms virt from start]   .
16:40:23.1609 [INFO] uart: [+46.45ms host +1ms virt 2ms virt from start]   .
16:40:23.2007 [INFO] uart: [+39.86ms host +1ms virt 3ms virt from start]   .
16:40:23.2435 [INFO] uart: [+42.81ms host +1ms virt 4ms virt from start]   .
...

Note that the virtual/simulated time is 1ms between messages, not the expected 100ms.
The root cause is the CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC value, which is specified as 660000 (660 kHz) in the SoC config when clearly the emulator is configured to be a 66 MHz board.
This patch fixes the problem and results in the correct output below:
--- a/soc/riscv/riscv-privilege/miv/Kconfig.defconfig.series
+++ b/soc/riscv/riscv-privilege/miv/Kconfig.defconfig.series
@@ -6,7 +6,7 @@ config SOC_SERIES
        default "miv"

 config SYS_CLOCK_HW_CYCLES_PER_SEC
-       default 660000
+       default 66000000

 config RISCV_SOC_INTERRUPT_INIT
        default y

16:45:29.5103 [INFO] uart: [+0.32s host +0s virt 0s virt from start] *** Booting Zephyr OS build v2.5.0-rc1-104-g4ab6dd003ed0  ***
16:45:33.4725 [INFO] uart: [+3.96s host +0.1s virt 0.1s virt from start]   .
16:45:37.2405 [INFO] uart: [+3.77s host +0.1s virt 0.2s virt from start]   .
16:45:40.9539 [INFO] uart: [+3.71s host +0.1s virt 0.3s virt from start]   .
16:45:45.1195 [INFO] uart: [+4.17s host +0.1s virt 0.4s virt from start]   .
...

This turns out to be the root cause to the failures we see on this platform in CI.  The schedule_api and lifo_usage tests simply have too much work to complete for a 660 kHz CPU.
Unfortunately, making that change in isolation results in more test failures, as the emulating the 66 MHz rate results in tests taking multiple minutes to complete (e.g. my development machine is about 40x slower than real time when spinning).
Someone needs to find a middle ground.  I tried a 6.6 MHz rate as an experiment and got passing results from the two tests I was looking at.  That seems like it should be acceptable, but it should be matched with a change to the emulator configuration that produces a correct clock rate.

@nashif @andyross  we're looking into this, will try to address it soon

@nashif @andyross  we're looking into this, will try to address it soon

I was curious if there's any implication of the renode version we have in CI.  We currently have 1.8.2.

I was curious if there's any implication of the renode version we have in CI.  We currently have 1.8.2.

@galak we should be able to adjust things without modifying the version (I'm about 90% sure).
Just switching to the most recent one (1.11) would not affect this situation.

@galak we should be able to adjust things without modifying the version (I'm about 90% sure).
Just switching to the most recent one (1.11) would not affect this situation.

FWIW: playing with this everything passes with a 6.6MHz setting (even though the VM output timestamps are technically wrong) except the tickless_concept test, which oddly works at 660 kHz but not at any frequencies higher than 703999 Hz (yes, exactly!  704000 fails).
This actually looks like it's exercising an edge case in @ceolin's timeslicing fix, as reverting that recovers this one test (but obviously introduces the old bug elsewhere).  Somehow it's ending up in a situation where the new code is suppressing a timeout from being set when no timer interrupt is actually scheduled.  I'm working this part separately.
But beyond that, an ideal fix here would change the simulator clock rate to somewhere around 4-8 MHz and adjust the kconfig to match.

FWIW: playing with this everything passes with a 6.6MHz setting (even though the VM output timestamps are technically wrong) except the tickless_concept test, which oddly works at 660 kHz but not at any frequencies higher than 703999 Hz (yes, exactly!  704000 fails).
This actually looks like it's exercising an edge case in @ceolin's timeslicing fix, as reverting that recovers this one test (but obviously introduces the old bug elsewhere).  Somehow it's ending up in a situation where the new code is suppressing a timeout from being set when no timer interrupt is actually scheduled.  I'm working this part separately.
But beyond that, an ideal fix here would change the simulator clock rate to somewhere around 4-8 MHz and adjust the kconfig to match.

@andyross Changing the frequency in the kconfig fixes the time because in Renode the frequency in the prepared MI-V platform is 66 MHz indeed. I'm not sure however whether you're right about these testing failures after using 66 Mhz in Kconfig.
Can you please write down what real vs virtual time ratio you have for the 6.6 MHz setting (for 66 MHz you wrote "40x slower")?
From what I've tested it seems that it's quite similar to the one for 66 MHz. At least on my machine both of these settings needed about 3.1s to write each subsequent dot by the binary built using your code. The current frequency of 660 kHz had the ratio about 33x on the other hand so it's not a linear relationship. If the ratio for 6.6 MHz and 66 MHz almost equals, then it shouldn't cause any big rise of failures in testing.

@andyross Changing the frequency in the kconfig fixes the time because in Renode the frequency in the prepared MI-V platform is 66 MHz indeed. I'm not sure however whether you're right about these testing failures after using 66 Mhz in Kconfig.
Can you please write down what real vs virtual time ratio you have for the 6.6 MHz setting (for 66 MHz you wrote "40x slower")?
From what I've tested it seems that it's quite similar to the one for 66 MHz. At least on my machine both of these settings needed about 3.1s to write each subsequent dot by the binary built using your code. The current frequency of 660 kHz had the ratio about 33x on the other hand so it's not a linear relationship. If the ratio for 6.6 MHz and 66 MHz almost equals, then it shouldn't cause any big rise of failures in testing.

There is a workaround now in #31841 that works to make all tests on this platform pass.  It uses 4 MHz as the clock rate, but as mentioned changes only the Zephyr kconfig because I don't know how to change the clock rate in renode.
@ajelinski You can set the value to 66000000 yourself and run the tests using twister.  Lots and lots fail with timeouts, they simply take too long.  The reason is that lots of our tests do busy waiting or other spinning tasks that take up some fixed (not dependent on clock rate) amount of simulated time.  And at the full clock rate that's simply too slow.

@ajelinski You can set the value to 66000000 yourself and run the tests using twister. Lots and lots fail with timeouts, they simply take too long. The reason is that lots of our tests do busy waiting or other spinning tasks that take up some fixed (not dependent on clock rate) amount of simulated time. And at the full clock rate that's simply too slow.

Is there not some mode or option to have renode deal with simulated time differently?  Feels like most simulators have something along those lines, so you can have the software set the time to match real hardware, but have simulated time be something sane.

Sorry for the delay. We've been discussing your problems internally in the Renode team. From what we understand it seems that the test timeouts set require having faster simulation, especially when there's any busy waiting involved.
There is such a speed up currently because of using different frequency – 660 kHz vs 66 MHz set in the Renode's MI-V platform description (renode/platforms/cpus/miv.repl loaded by boards/riscv/m2gl025_miv/support/m2gl025_miv.resc).
This is the root cause of the problem from this GH issue description (1ms wait in virtual time vs expected 100ms).
It can be solved simply by using matching frequency in both places. We think it makes sense to do so. If it's really necessary to use some other frequency than 66 MHz (like the proposed 4 MHz) then we can put a custom platform description alongside the m2gl025_miv.resc file.
To boost the waiting speed it's best to manipulate the PerformanceInMips value from the RESC file: https://github.com/zephyrproject-rtos/zephyr/blob/76ebe71fcbf40fd876edcc0cd3eb9d3d6855a754/boards/riscv/m2gl025_miv/support/m2gl025_miv.resc#L11 . Setting it, e.g., to 4 or 8 can give quite a significant boost. This seems to be the proper solution. I'll create a respective WIP PR to find settings that'll solve this issue without causing Twister failures.

That's curious, all tests passed with 66 MHz in MI-V's Kconfig.defconfig.series without any more changes: https://github.com/zephyrproject-rtos/zephyr/pull/32036
Are all tests for m2gl025_miv run by buildkite in CI?

Are all tests for m2gl025_miv run by buildkite in CI @andyross?

based on your change, no. Add this change to force testing on the platform:
diff --git a/boards/riscv/m2gl025_miv/m2gl025_miv.yaml b/boards/riscv/m2gl025_miv/m2gl025_miv.yaml
index ff41948899..00e67f6450 100644
--- a/boards/riscv/m2gl025_miv/m2gl025_miv.yaml
+++ b/boards/riscv/m2gl025_miv/m2gl025_miv.yaml
@@ -7,6 +7,7 @@ toolchain:
 ram: 64
 simulation: renode
 testing:
+  default: true
   ignore_tags:
     - net
     - bluetooth

Thanks @nashif, I'll try that.


Fix build for time>=1.5 and base<4.8

@larskuhtz Would you like to be a maintainer for this project?


Add hint that wrapping  is required

Maybe this helps other users to get started. I only found the explanation on the  after reading https://github.com/FormidableLabs/redux-little-router/issues/74.

Current coverage is 98.26% (diff: 100%)

Merging #135 into master will not change coverage

@@             master       #135   diff @@
==========================================
  Files            19         19
  Lines           231        231
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            227        227
  Misses            4          4
  Partials          0          0

Powered by Codecov. Last update 05ec969...3471f60

<RouterProvider> is dead in the v14 alphas (official release coming today), so as long as you have a <Provider> at all, everything should work out of the box 🎉


Example usage from README.md always returns { diff: 0, cumulatedDiff: 0, hash: 0 }

Here is my code and my test data:
const fs = require('fs');
const fastPng = require("fast-png");
const { diff } = require("./dist/index.js");

// Read and decode baseline and candidate pngs
const pngBaseline = fastPng.decode(fs.readFileSync("./desktop-collapsed.png"));
const pngCandidate = fastPng.decode(fs.readFileSync("./desktop-expanded.png"));

// Get necessary properties
const { width, height } = pngBaseline;

// Create diff ImageData: 3x wider to get side by side diff
const diffImageData = {
  width,
  height,
  data: new Uint8ClampedArray(3 * width * height * 4)
};

// Diff images with 1% threshold and minimap overlay to spot isolated changes
const result = diff(
  pngBaseline.data,
  pngCandidate.data,
  diffImageData.data,
  width,
  height,
  {
    threshold: 0.01,
    enableMinimap: true
  });

// Output the result
console.log({...result});

// Save the diff if the cumulated delta is significant
if (result.cumulatedDiff > 0) {
  fs.writeFileSync("diff.png", fastPng.encode(diffPng));
}

Oh! 🙊 Thank you for the issue.
I fixed the typos in the example in a39e7d8776abc53ceed8db4959cf9009766422ac and the scale of the cumulatedDiff in d167473d9936f258a41ff63c2ad9d79bd51f14ca which is now published to NPM in the version 1.2.1


Add Boilerplate Bot Code 🤖

Added the boilerplate bot code from following the guide on the Discord repo.

i get u

woop 🕺


IO: DSYNC WAL writes and fdatasync the rest on checkpoint.

We currently open the database file with O_DSYNC (along with O_DIRECT) which makes all writes ensure the data (not file metadata) is flushed to disk before completing. While this is important for the Write-Ahead-Log (WAL), it may not be necessary for other writes given we have an explicit checkpoint() to flush changes to Storage.
@cb22 made the observation that we could apply O_DSYNC to individual writes using pwritev2 and RWF_DSYNC. io_uring supports the RWF flags using the standard IORING_OP_WRITEV using sqe.rw_flags so it was doable.
This PR makes WAL writes use DSYNC for its data integrity and uses fdatasync after a checkpoint (but before its callback) for data integrity of other writes. The f(data)sync portion is only implemented for linux ATM as this is currently exploratory work.
Pre-merge checklist
Performance:

[x] Compare zig build benchmark on linux before and after this pr.# benchmark results before
1224 batches in 84.66 s
load offered = 1000000 tx/s
load accepted = 118113 tx/s
batch latency p00 = 0 ms
batch latency p10 = 23 ms
batch latency p20 = 24 ms
batch latency p30 = 25 ms
batch latency p40 = 26 ms
batch latency p50 = 28 ms
batch latency p60 = 28 ms
batch latency p70 = 29 ms
batch latency p80 = 30 ms
batch latency p90 = 31 ms
batch latency p100 = 4305 ms
transfer latency p00 = 0 ms
transfer latency p10 = 3644 ms
transfer latency p20 = 7668 ms
transfer latency p30 = 14368 ms
transfer latency p40 = 22154 ms
transfer latency p50 = 31379 ms
transfer latency p60 = 40727 ms
transfer latency p70 = 50935 ms
transfer latency p80 = 60691 ms
transfer latency p90 = 68430 ms
transfer latency p100 = 74678 ms

# benchmark results after
1225 batches in 57.92 s
load offered = 1000000 tx/s
load accepted = 172637 tx/s
batch latency p00 = 0 ms
batch latency p10 = 23 ms
batch latency p20 = 23 ms
batch latency p30 = 24 ms
batch latency p40 = 25 ms
batch latency p50 = 26 ms
batch latency p60 = 28 ms
batch latency p70 = 28 ms
batch latency p80 = 29 ms
batch latency p90 = 30 ms
batch latency p100 = 1724 ms
transfer latency p00 = 0 ms
transfer latency p10 = 2986 ms
transfer latency p20 = 5948 ms
transfer latency p30 = 10091 ms
transfer latency p40 = 14713 ms
transfer latency p50 = 19815 ms
transfer latency p60 = 25335 ms
transfer latency p70 = 30870 ms
transfer latency p80 = 36533 ms
transfer latency p90 = 42163 ms
transfer latency p100 = 47937 ms

Let's close this, as it is a bit too old at this point. My overall understanding is that

for now, we just dsync all writes, its a simple mental model!
in the future, if we find that our writes are the bottleneck, we can experiment with syncing grid when checkpointing (or maybe even integrating sync into compaction pacing?)


Hide the pointer when the game window is active

[x] it should be possible to hide pointer when the application window is active
[ ] it should be possible to set custom cursor pointer
[x] it should be possible to enable fullscreen mode
[x] in fullscreen mode, we should be able to deal with mouse delta even running out of the screen. To be able to scroll, move screen etc.

Please observe Window Service with example #62
Everything except custom mouse cursor is done.
Check dotrix\examples\window\camera.rs in example
when RMB is pressed: cursor is hidden and camera starts moving
when RMB is released: cursor is shown and is returned to position when it was before hiding

Custom cursor pointer implementation is postponed due to low priority.


Example website generation parameters?

For your example, it would be interesting to know what parameters you have set for generation for each query if they are the same, to compare?
e.g. I have some different or failures with the defaults.

Other difference I guess could be the particular Llama 7B applied to the delta?

Are you using one that you applied for from Meta/Hugging Face - or something else?

Also, FYI
https://github.com/RichardScottOZ/k2/tree/main/generation
https://github.com/CalculatedContent/WeightWatcher/tree/master

Other difference I guess could be the particular Llama 7B applied to the delta?

Despite of further pretraining, we also use LoRA to supervised fine-tuneon via GeoSignal. Consequently, we should adapt the delta weights and add up the adapter weights.

Yeah, am looking at that - and the generic Llama base model I used.  I will upload those.

I have added delta = k2_fp_delta and the base llama

Then you should use adapter model to do the generation, here is the parameters we have set for generation:
generation_config = GenerationConfig(
    temperature=0.1,
    top_p=0.75,
    top_k=40,
    num_beams=4,
    no_repeat_ngram_size=2,
    max_length=1000,
)

and we set a stopping criteria for online application, which we consider it as an engineering subject.


If the same "Events_ClientConnected" is connected in multi-server expansion, can you add the information to which IpPort address it is connected to?

Hello,
I need to create server in different ports in my project. Example; <IP_ADDRESS>:20, <IP_ADDRESS>:21,<IP_ADDRESS>:22 .
Instead of creating a new "Events_ClientConnected" function for each server, I want to assign them all to one function. The same is true for Events_ClientDisconnected. Knowing which server port these events occur for will greatly reduce the number of lines of code to be written.
Is it possible to add such a feature?

Hi @saklanmaz
It should already be doing this for both connection events (see https://github.com/jchristn/SuperSimpleTcp/blob/772870baa0ed9757deaa934e8f33dc8c6693d5cb/SimpleTcp/SimpleTcpClient.cs#L322) and disconnection events (see https://github.com/jchristn/SuperSimpleTcp/blob/772870baa0ed9757deaa934e8f33dc8c6693d5cb/SimpleTcp/SimpleTcpClient.cs#L686).
Are you seeing the ClientConnected or ClientDisconnected events fire without args.IpPort being set?  If so under which conditions?

Thank you for answer. I'm confused on how to implement it. Can you please help?
The function I created the link is as follows.
public bool Connect(SimpleTcpServer simpleTcpServer)
        {
            try
            {
                simpleTcpServer.Events.ClientConnected += Events_ClientConnected;
                simpleTcpServer.Events.ClientDisconnected += Events_ClientDisconnected;
                simpleTcpServer.Events.DataReceived += Events_DataReceived;
                simpleTcpServer.Start();

                return simpleTcpServer.IsListening;
            }
            catch
            {
                return false;
            }
        }

I am sharing the sample function for ClientConnected.

Here I can access the IP and Port of the connected Client address. What server IpPort the Client I want to access is connected to.

private void Events_ClientConnected(object sender, ClientConnectedEventArgs e)
{
            Console.WriteLine(e.IpPort);
}

The ClientConnected and ClientDisconnected event's EventArgs has a property called IpPort.  On client events, IpPort contains the IP:port of the server.  Is that not what you are experiencing?

e.IpPort is the IpPort of the connecting client, not the server?

e.IpPort is for the server when used in client events.

Client events:
        static void Connected(object sender, ClientConnectedEventArgs e)
        {
            Console.WriteLine("*** Server " + e.IpPort + " connected");
        }

        static void Disconnected(object sender, ClientDisconnectedEventArgs e)
        {
            Console.WriteLine("*** Server " + e.IpPort + " disconnected");
        }

I'm going to release v2.5 momentarily just for this - I think the comments/documentation on the event arguments object are misleading.  But, it is a small breaking change.  ClientConnectedEventArgs and ClientDisconnectedEventArgs will just become ConnectionEventArgs.

Please confirm that e.IpPort, when inside your client connect/disconnect event, is the IP:port of the server.  Thanks!

Thanks for be interested. So what can we do to access the IpPort of both the server and the client together? It will make more sense if I explain what I actually want to do.
I provide support for opening more than one server in the same user interface. I keep connecting clients in a list. I want to detect from which server the incoming data comes from the client. I show only that data according to the server and client that the user selects in the list. Therefore, accessing both server and client IpPort in the same interrupt will greatly increase my functionality.

I can expose IPEndPoint from SimpleTcpClient (see NuGet v<IP_ADDRESS> here) however I think that's not the right approach for your use case.
Instead of a list, I would use Dictionary<string, SimpleTcpClient>, where the key is the IP:port of the server.  You can then retrieve the client through dict["<IP_ADDRESS>"]; where <IP_ADDRESS> is the server IP.

I am currently using the way you mentioned. Knowing in cutting seemed to make things easier though. Thank you for the change.

I installed the nuget package. However, not in the way I expected. I think I'm explaining myself wrong.
private void Events_ClientDisconnected(object sender, ConnectionEventArgs e)
       {
           try
           {
               var serverIpPort  = e.ServerIpPort;
               var clientIpPort = e.ClientIpPort;
           }
           catch { }
       }

Actually, I'm wondering if something like this is possible in my application. Is it possible to access both the server IpPort and the IpPort of the clients that connect or want to disconnect in server interruptions?

The object sender is always SimpleTcpClient.  There's a public property you can access called IPEndPoint LocalEndpoint, and from within there, you can access the local port information.

Thank you @jchristn for answer. :)


Problem using translation in a separate module

Hi,
first of all, thank you very much for the great starter template. It really helped me to get into NgRx.
However, I have the problem that I have created a new module under "features" called "setup" which contains a component called "devices". I also want to use a separate translation file for the "setup" module that is located under "assets/i18n/setup".
Unfortunately the translation does not work. If I change the "isolate" property in the SetupModule I can use the root translation, but it does not load the module translation (it also does not try to load it via the webbrowser).
It works if I set the defaultLanguage in the module.
I already tried  a lot of things but made no progress. Any ideas what to change to get it working or where to look?
This is my setup module:
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';

import { HttpClient } from '@angular/common/http';
import { LazyElementsModule } from '@angular-extensions/elements';

import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { environment } from '../../../environments/environment';
import { SharedModule } from '../../shared/shared.module';

import { FEATURE_NAME, reducers } from './setup.state';
import { SetupRoutingModule } from './setup-routing.module';
import { DevicesComponent } from './devices/devices.component';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';

export function httpLoaderFactory(http: HttpClient) {
  return new TranslateHttpLoader(
    http,
    `${environment.i18nPrefix}/assets/i18n/setup/`,
    '.json'
  );
}

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  imports: [
    LazyElementsModule,
    SharedModule,
    SetupRoutingModule,
    StoreModule.forFeature(FEATURE_NAME, reducers),
    TranslateModule.forChild({
      loader: {
        provide: TranslateLoader,
        useFactory: (httpLoaderFactory),
        deps: [HttpClient]
      },
      isolate: true
    }),
    EffectsModule.forFeature([
      /* UserSettingsEffects, LoginEffects */
    ])
  ],
  declarations: [DevicesComponent]
})
export class SetupModule {}

This is my component:
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { Store } from '@ngrx/store';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';

import {
  NotificationService,
  ROUTE_ANIMATIONS_ELEMENTS
} from '../../../core/core.module';

@Component({
  selector: 'app-devices',
  templateUrl: './devices.component.html',
  styleUrls: ['./devices.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class DevicesComponent implements OnInit {
  routeAnimationsElements = ROUTE_ANIMATIONS_ELEMENTS;
  testTranslation: string;
  getState: Observable<any>;
  constructor(
    private store: Store,
    private translate: TranslateService,
    private notificationService: NotificationService
  ) {}

  ngOnInit(): void {
    this.testTranslation =
      this.translate.instant('app.setup.title') + ' class';
  }
}

I was just able to reproduce it with a clean starter template. I just added a new module under 'features' called 'setup' and put a component 'devices' in it. The result is attached below.
angular-ngrx-material-starter-master.zip

I was just able to reproduce it with a clean starter template. I just added a new module under 'features' called 'setup' and put a component 'devices' in it. The result is attached below.
angular-ngrx-material-starter-master.zip

@Octoate any luck with solution ?

My guess is this is because the core module is eagerly loaded at runtime. If you look at the docs you have to inject the HTTP module into the Translate module. Afaik there can only be one file loaded into translate at a time.
Thinking of ways around this... I would manually add my own prefix in the json that is already loaded by default and extend the translate pipe to work only within the module I specify, or probably the better option is to write your own loader, which is mentioned in the ngx-translate documentation as well.
Last but not least, which is most likely to solve your problem, the translator supports multiple plugins that are mostly pre-written loaders. I think the one you'd be most interested in is here
From what I've read, which isn't much, it seems to me that whatever loader is loaded first is treated as a singleton and will not be overwritten.


SQL Time Travel on Iceberg Tables

Feature request
Is your feature request related to a problem? Please describe.
Time travel SQL Syntax is not supported in Iceberg Connector
Describe the solution you'd like

Support the Spark SQL syntax for time travel queries in Iceberg via the StarRocks Iceberg Connector
-- time travel to October 26, 1986 at 01:21:00
SELECT * FROM prod.db.table TIMESTAMP AS OF '1986-10-26 01:21:00';

-- time travel to snapshot with id<PHONE_NUMBER>2873L
SELECT * FROM prod.db.table VERSION AS OF<PHONE_NUMBER>2873;

-- time travel to the head snapshot of audit-branch
SELECT * FROM prod.db.table VERSION AS OF 'audit-branch';

-- time travel to the snapshot referenced by the tag historical-snapshot
SELECT * FROM prod.db.table VERSION AS OF 'historical-snapshot';

Describe alternatives you've considered

This feature does not really have an alternative/workaround other than the MySQL Connector where time travel queries were implemented for Dolt by a Dolt Engineer
Additional context
Reference:  Iceberg Spark Queries

@chrisfw Have you already used StarRocks to query Apache Iceberg?

@imay , I have been working with @alberttwong to get the Iceberg query functionality working from my StarRocks installation as we have hit some hurdles.  My understanding is that the time travel functionality has not yet been implemented regardless.

Hi - any update on whether this is scheduled for a future release?  Having the ability to use native StarRocks storage for optimal performance while also enabling time travel (with a little slower performance) on specific tables is an incredible combination of options.

I am just wondering if this feature is anywhere on the 2024 roadmap?

I am just wondering if this feature is anywhere on the 2024 roadmap?

https://github.com/StarRocks/starrocks/pull/47997

@mrhamburg , thank you very much for the information.  That is great news!
Regards,
Chris


Drop Node@12, Node@14, Node@16 support

See node support https://github.com/nodejs/release#release-schedule
Node12 reached end of life a while back
Node14 reaches end of life 4/30/23, which should be close enough to our hopeful 4.0 release
Node16 reaches end of life later this yr, was moved up due to OpenSSL
- instead of dropping it later in another major (which we don't know when it will be) get ahead and do it now

[ ] Drop Node 12
[ ] Drop Node 14
[ ] Drop Node 16
[ ] drop custom core-bentley guid in favor of using crypto.randomUUID (available both in node & web) ?

Interesting note here, seems like the Node API is slightly different than the browser API... it would be good to keep this in mind when migrating:
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID#browser_compatibility

what is our support policy for browser versions? The browser API seems to be relatively new, let's make sure we support the versions we're promising to support.

@aruniverse Electron is still running on Node 16 (version table).

@aruniverse Electron is still running on Node 16 (version table).

Aww man. Thanks for letting me know. Hopefully they'll have it updated by the time we release 4.0. If not we will need to continue supporting 16 then :/
Gytis, mind making an issue for the 4.0 backlog to drop electron support for the version electron doesn't support/maintain anymore based on that table?

We should probably update our matrix of supported platforms in docs/learning/SupportedPlatforms.md to break it down by major release.
That information might also need to be made more visible, perhaps in api-support-policies.md.
Our README simply says "Node 18".

Should we also update our es target? right now we target es2019, but if we're saying we support node18+ then we could bump to es2021 or es2022. https://kangax.github.io/compat-table/es2016plus/

Should we also update our es target? right now we target es2019, but if we're saying we support node18+ then we could bump to es2021 or es2022. https://kangax.github.io/compat-table/es2016plus/

Upgrading to es2021 makes sense to me.
Not sure about es2022: es2022 compatibility seems to be a bit "spotty" at the moment.

when we start working on this task, id first drop 12 & 14, and then drop 16 a bit later

PR for dropping Node 12 and Node 14: https://github.com/iTwin/itwinjs-core/pull/5012.

PR for dropping Node 16: https://github.com/iTwin/itwinjs-core/pull/5077.


2nd empty instance of host trait?

Hi,
I have the .wit below:
package battalion:plugin

interface types {
  /// One of several types of values
  variant sample-value {
     analog(float64),
     binary(bool),
     counter(u64)
  }

  /// Single sample value and tag identifier
  record sample {
      tag-id: u32,
      value: sample-value,
  }

  /// Collection of samples with a device identifier
  record samples {
      device-id: u32,
      values: list<sample>,
  }

  /// 64-bit milliseconds since start
  record delay {
      millis: u64
  }
}

/// functions required for the plugin to implement
interface guest {
  use types.{delay}

  /// Retrieve the organization that created the plugin
  org: func() -> string

  /// Retrieve the name of the plugin
  name: func() -> string

  /// Wake the plugin
  wake: func() -> option<delay>
}

/// functions required for the host to implement
interface host {
  use types.{samples, delay}

  /// publish samples to the host
  publish: func(values: samples)
}

world plugin {
  import host
  export guest
}

When binding in wasmtime using bindgen!, there are two Host traits that I have to implement. One with the publish function, and another empty one:
bindgen!(in "../../logic/wit");

#[derive(Default)]
struct PluginState {
    published: Vec<Samples>
}

impl battalion::plugin::host::Host for PluginState {
    fn publish(&mut self, samples: Samples) -> wasmtime::Result<()> {
        self.published.push(samples);
        Ok(())
    }
}

// TODO - Why is there a second host??
impl battalion::plugin::types::Host for PluginState {

}

The requirement to implement both can be seen in Plugin::add_to_linker
impl Plugin
pub fn add_to_linker<T, U>(linker: &mut wasmtime :: component::Linker<T>, get: impl Fn (& mut T )-> & mut U + Send + Sync + Copy + 'static) -> wasmtime::Result<()> where     U: battalion :: plugin :: types::Host + battalion :: plugin :: host::Host

Question: Why is there a 2nd empty trait (battalion::plugin::types::Host)?
Is there a better way to define my WIT to avoid this?

The plugin/types interface is used transitively, so bindgen creates a trait for it, and there are no functions in that interface, so nthe trait has no members. Wit-bindgen could implement some logic to not generate those empty traits, but it does not at this time. It would probably be a good first feature to for a new contributor to implement.

Thanks @pchickey. That makes sense, although I'm new to WASM/WIT and still fumbling.
I guess the point of confusion for me was that both traits are called Host. I think if one had been called Host and the other called Types it might have been more obvious what was going on here.
My goal with having a separate interface called types was to have some common types I use both in the guest and host interface functions. Since types can only live inside of an interface, this seemed like the only way to do this? I

Thanks, makes sense.


Don't ask for confirmation for reverting change inline

VSCode Version: Code - Insiders 1.19.0-insider (d6fbdcf19716910b26ea81efc95724f2fabe5aa6, 2017-11-10T06:10:30.893Z)
OS Version: Darwin x64 16.7.0
Extensions: Some

This can be undone with Undo, no need for a confirmation dialog:

Unfortunately I'd rather keep it. I can see users not expecting undo to work and as soon as you close the tab or restart Code, the undo stack is gone...

Inline revert is a feature I've been using a lot in WebStorm, often to remove temporary test blocks. A confirmation dialog slows this process. Most IDEs don't implement a confirmation...
So it's a bit subjective. Couldn't there be an option to select of we want a confirmation box or not?

@degardinn Would you care enough to submit a PR for that configuration setting? 👍


Windows support

Confirm this runs on windows, and also add a windows validator

It works on Windows, I tested and also developed some of it on Windows. I'll add the windows validator.

Woot

Should we now avoid anything related to brew to preserve Windows operation?

No, I don't think so. If someone has a windows specific project that needs system validation, then the assumption would be thee would not have any brew packages in their engines. If they did have brew packages to validate, then I think it would be safe to assume they require OSX.

I guess the catch would be if someone had a cross platform project, and a dependency that needed validated was on both platforms, and happened to be installed via brew on OSX.

But in those cases, it might be installed in a way the validator coult now have brew commands (like a hit validator would). For both the brew checks now, since they are iOS development tests, I think we are ok.


EnableOAuth2Support with additionalQueryStringParams requires clientSecret

SwaggerUiConfig provides two signatures for EnableOAuth2Support():
EnableOAuth2Support(string clientId, string realm, string appName);
EnableOAuth2Support(string clientId, string clientSecret, string realm, string appName, string scopeSeperator = " ", Dictionary<string, string> additionalQueryStringParams = null);

Our service is authenticating against Azure Active Directory (AAD), so it needs an additional query parameter of resource, but authentication is using a native, multi-tenant app where individual service maintainers (e.g. tenants) should not have the client secret.
This also means that the authentication flow should not be redirecting back to a page provided by the service. Rather, after logging into their tenant, users should be directed back to the URL they started at to continue using the service.

Is it only me who is curious why scopeSeperator is not scopeSeparator?

Is it only me who is curious why scopeSeperator is not scopeSeparator?

Nope, noticed it myself and was going to report as a bug, but given the backlog seems unlikely anybody would fix...


Paperclip should not get into the business of handling response messages

I'm doing some proofs of concept involving Rocket and Actix, writing a simple REST API server.
I would like to document the API.
With Rocket, I've employed rocket_okapi and everything went well; I've spent little time to get everything working and I didn't find anything blocking me from achieving my intents.
However, with Actix and Paperclip, I've found difficulties involving the response messages, which caused me a lot of trouble and, honestly, imposed restrictions which I'm not willing to buy.
IMHO, Paperclip should not get into the business of handling response messages. It should let the user employ whatever the user finds necessary, for whatever reason the user may have.

What do you mean exactly by handling response messages?


feat: wes/runs prototype

Description
This PR is just to test the details component and prototype runs component.

@uniqueg and @git-anurag-hub can you comment on this way to render details. Note, this is not finished and some of the objects are being rendered as string, thats just a mapping issue. How all the data types will be rendered can be looked here.

This PR is just for prototype :)

PS: This way should also solve the compliance problem atleast the dataype one, all the app-author will have to do is pass the fields and their render data type like text, long-text, array (of string) etc which taking the element ans that should work without fail and by default it will render acc proWES till we reach full compliance.

#212


aas:Security

ass:Security-related attributes are twice in the ontology

solved with https://github.com/sebbader/AssetAdminShellOntology/commit/f5c52321c79d7b6d72090ff3fce24e69f58fc630


[FAQ] connection to the internet

Warning: For the app to run, you NEED to have a connection to the internet.
any reason why a bat file would ever require internet connetion ?

what files does it download and where do they go ?

@Teramanbr one month later..... still waiting for a reply brazuca !

You could just have clicked on the github src folder, it is an open source program...

I thought that was obvious and you figured it out after not asking anything again for 1 month.


fix Fix BE compile in Mac with no prefix Jemalloc

Proposed changes
compile jemalloc on mac have default prefix je_, so default use prefix jemalloc to ensure code uniformity.
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

comment run performance

run performance


Migrate to CSI

Found another dev that recently started a btrfs csi repo and I thought maybe connecting you can be fruitfull?
https://github.com/seungwoo-lee-518

@tbrasser thanks for letting me know! Unfortunately I was unable to find the btrfs CSI there, just this repository that doesn't seem to contain any code: https://github.com/seungwoo-lee-518/kubernetes-csi-btrfs/tree/feat/add-btrfs-functionality
Maybe I didn't search far enough.
This repository is currently more in a works-for-me state and I currently don't really have time to contribute to it. So should there be a working btrfs CSI somewhere I'd recommend rather use that. Otherwise I might still add CSI conformity to this project, but I cannot give an ETA.

Yeah sorry for not being clear, it's just the only other dev I found with seemingly similar intentions, not ready-to-use code. Probably notifying him about this repo would have made more sense.


use model as an API [Feature request]

feature
how to use the model as an API for production applications??

@haotian-liu Same any solutions?

I have a solution, add the code with flask (a web application package), so that the LLaVa model can be a server that can receive the post from any client, each time the model receives the post, it will process the image, and send back the language description to the client.

I have a solution, add the code with flask (a web application package), so that the LLaVa model can be a server that can receive the post from any client, each time the model receives the post, it will process the image, and send back the language description to the client.

feature
how to use the model as an API for production applications??

I have a solution, add the code with flask (a web application package), so that the LLaVa model can be a server that can receive the post from any client, each time the model receives the post, it will process the image, and send back the language description to the client.

@haotian-liu Same any solutions?

I have a solution, add the code with flask (a web application package), so that the LLaVa model can be a server that can receive the post from any client, each time the model receives the post, it will process the image, and send back the language description to the client.


Update setup-python to v5 in all GitHub actions #1192

Using v4 currently raises some warnings in the GitHub CI

Closed with 20fc028e07f59d409906f0257cb9e5899c9e5195


DragDrop shaders are broken

I thought it was my PR but turns out these are broken on master, NFI how long for.
Steps to repro:
Start dragging something and never get the out of range shader to show properly.

Functionally a duplicate of #12045, which should also be moved to engine.


Feature/manage community

The form doesn't currently work. I posted comments in discord. But it's starting to take shape. I'll move it into a component at some point I think. We can reuse it for the edit form, if we continue to go this route.
An alternative would be to not leave the community index page at all, and use this form in a modal.

@zberwaldt
./pages/community/[serverId]/edit.tsx:10:29
Type error: Cannot find name 'useSession'.


Make devel the default branch

In keeping with the Meteor convention, devel should be the default branch. The existing dev branch may need to be kept around for reference (just so existing contributors know where the split occurred).

[x] Create a devel branch from the most up-to-date dev branch
[x] Make devel the default branch

So far, I've at least made dev the default branch. Still ever-so-slightly on the fence about the devel naming convention.

I went ahead and created the devel branch. Once I remove the dev branch, any old links to it will be broken. I don't think there will be many, but I can't be sure. I can always revive the branch if it turns out to be an issue, but I really don't want both a dev and devel branch hanging around.


Create an extension that shows the datasets that a user is following

What does this PR do?
This PR creates the Followy extension which displays a Following tab on a user's profile and dashboard where the user can see all the datasets he/she is following.
Related Issue
https://github.com/CodeForAfricaLabs/ckanext-followy/issues/1
What does this change look like?
On dashboard

On profile

This looks good. Thank you. Could we remove the "Add dataset" button?

Sure @DavidLemayian . I've done that


Qingwei/spreads default issue

This will cause charts to throw warning, I'll submit a PR to address it

Coverage decreased (-0.06%) to 35.366% when pulling 6bf3c7a5eb8fa1e73e8f8d65e1d25f05800efe37 on qingweibinary:qingwei/spreads_default_issue into 61d06d9b3ca4873849b8a1eb57689983aac161ef on binary-com:master.

Coverage decreased (-0.06%) to 35.366% when pulling 6bf3c7a5eb8fa1e73e8f8d65e1d25f05800efe37 on qingweibinary:qingwei/spreads_default_issue into 61d06d9b3ca4873849b8a1eb57689983aac161ef on binary-com:master.

Coverage increased (+0.09%) to 35.51% when pulling 2ee8fd4327cae113e47cb5292ea77815c0a5c62c on qingweibinary:qingwei/spreads_default_issue into 61d06d9b3ca4873849b8a1eb57689983aac161ef on binary-com:master.


Save to Pocket - is it possible?

Pocket  is read it later service and they allow to put their buttons on web sites.
This is code for inserting button:

In order to support multiple buttons on a page, you place the button code anywhere you would like a Pocket button to appear. Then, for each button, you will need to simply add a data-save-url attribute to the  in your button code. The value of this attribute should be the url of the corresponding link that you are placing the button next to.

Pocket


go test does not work without CGO_ENABLED=1

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

$ go version
go version go1.12.5 linux/amd64

Dockerfile I'm running in:
FROM ubuntu:16.04

RUN apt-get update && \
    apt-get install -y git python curl make && \
    curl https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz | tar -xzC /usr/local && \
    apt-get clean

ENV PATH="/usr/local/go/bin:${PATH}"

Does this issue reproduce with the latest release?
Yes (1.12.5 is latest published version).
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build279503093=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ cd ~/go/path/to/program
$ go test ./pkg/...
# runtime/cgo
exec: "gcc": executable file not found in $PATH
FAIL path/to/program/pkg/subpkg [build failed]

Workaround

Running CGO_ENABLED=0 go test ./pkg/... works without issues

Notes
Running these same tests on go 1.10 works without issues (and I only found it when I upgraded to go 1.12). There seem to be several go 1.11 bugs filed about issues related to this.
I'm not explicitly using go modules at this point, but I do use dep + a vendor directory.
There must be something complex/subtle that is causing this error, as it's really difficult to create a minimal reproducible testcase for this. Unfortunately, the source I'm working with isn't public, and I'm having a really difficult time creating a reproducible testcase for this -- despite that it occurs without fail with my entire source tree. When I try removing large portions of the tree, it starts working, but it doesn't seem to be particularly deterministic.
Running with -x contains mostly 'mkdir $WORK/random', but one place has the following snippet which might explain why it's running into an error:
...
cd /usr/local/go/src/runtime/cgo
CGO_LDFLAGS='"-g" "-O2" "-lpthread"' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b067/ -importpath runtime/cgo -import_runtime_cgo=false -import_syscall=false -- -I $WORK/b067/ -g -O2 -Wall -Werror ./cgo.go
...

But I'm having difficulty determining why it has decided to use CGO (and not use it when it's disabled).
My hope is that even though I can't reproduce this error minimally, that someone else will find this issue and (a) be able to reproduce or at least (b) see my workaround and find it works for them.

Duplicate of #28065


Integration or association of binary and package

What would you like to be added:
This is proposal about any Integration or association of binary and package detection.
Merging record or add flag or something.
If syft will increase supporting binary type, or syft will equip more detection method, this proposal will be more important, I think.
Why is this needed:
As binary detection is very powerful, package installed file will be also detected as binary.
This will make some confusion for matching vulns or checking EOL.
For example, syft detects binary python and package python from python image.
Detected python binary (3.9.2) will be a part of python3.9-minimal package.
Some tool/operation may deal  package python as OS package.
Some tool/operation may deal binary python as NON OS package. This case will make confusion.
// I do not know detail, but grype will equip some special logic for such a case.
$ syft -q python | grep python
libpython3-stdlib             3.9.2-3                         deb
libpython3.9-minimal          3.9.2-1                         deb
libpython3.9-stdlib           3.9.2-1                         deb
mercurial                     5.6.1                           python
pip                           22.3.1                          python
python                        3.11.1                          binary
python                        3.9.2                           binary
python3                       3.9.2-3                         deb
python3-distutils             3.9.2-1                         deb
python3-lib2to3               3.9.2-1                         deb
python3-minimal               3.9.2-3                         deb
python3.9                     3.9.2-1                         deb
python3.9-minimal             3.9.2-1                         deb
setuptools                    65.5.0                          python
wheel                         0.38.4

$ syft -q python -o json | jq '.artifacts[] | select(.name == "python")'
{
  "id": "b145fc69239f97f6",
  "name": "python",
  "version": "3.11.1",
  "type": "binary",
  "foundBy": "binary-cataloger",
  "locations": [
    {
      "path": "/usr/local/include/python3.11/patchlevel.h",
      "layerID": "sha256:805f128a11fc54d86c4da602b12390edf234e67d82f45c0a4d1d4c939dc2ba85"
    },
    {
      "path": "/usr/local/lib/libpython3.11.so.1.0",
      "layerID": "sha256:805f128a11fc54d86c4da602b12390edf234e67d82f45c0a4d1d4c939dc2ba85"
    }
  ],
  "licenses": [],
  "language": "binary",
  "cpes": [
    "cpe:2.3:a:python:python:3.11.1:*:*:*:*:*:*:*"
  ],
  "purl": "",
  "metadataType": "BinaryMetadata",
  "metadata": {
    "classifier": "python-binary-lib",
    "realPath": "/usr/local/lib/libpython3.11.so.1.0",
    "virtualPath": "/usr/local/lib/libpython3.11.so"
  }
}
{
  "id": "88c7e3df2277ab53",
  "name": "python",
  "version": "3.9.2",
  "type": "binary",
  "foundBy": "binary-cataloger",
  "locations": [
    {
      "path": "/usr/bin/python3.9",
      "layerID": "sha256:b77487480ddb9d6808d99a147a199df289b14b675cfff8cea31ec14880a6aee9"
    }
  ],
  "licenses": [],
  "language": "binary",
  "cpes": [
    "cpe:2.3:a:python:python:3.9.2:*:*:*:*:*:*:*"
  ],
  "purl": "",
  "metadataType": "BinaryMetadata",
  "metadata": {
    "classifier": "python-binary",
    "realPath": "/usr/bin/python3.9",
    "virtualPath": "/usr/bin/python3.9"
  }
}

# apt-file search -F /usr/bin/python3.9
python3.9-minimal: /usr/bin/python3.9

Hi @witchcraze -- these overlaps are actually tracked with relationships in the Syft data model already -- if the package manager has a set of files that overlaps with what the binary cataloger finds, there is a relationship added.
Given the 2 packages you posted: python 3.11 (b145fc69239f97f6) and python 3.9 (19f60cb36732c9b6):
{
   "id": "19f60cb36732c9b6",
   "name": "python",
   "version": "3.9.2",
   "type": "binary",

you will also find the python 3.9 installed by dpkg, but not 3.11:
  {
   "id": "6068520cd08c8f05",
   "name": "python3.9-minimal",
   "version": "3.9.2-1",
   "type": "deb",
   "foundBy": "dpkgdb-cataloger",

If you look in the relationships section, you will find an entry like this:
  {
   "parent": "6068520cd08c8f05",
   "child": "19f60cb36732c9b6",
   "type": "ownership-by-file-overlap",
   "metadata": {
    "files": [
     "/usr/bin/python3.9"
    ]
   }
  },

Note the child points to the binary pacakge and the parent points to the deb pkg. This information is the association you are looking for if it's determined that the binary file is also owned by a package manager entry.

Thank you for your explanation.
I'll see relationships section to check if detected binary is a part of package or not.


After updating the old link title is in weird characters

[X] I've read the guidelines for Contributing to YOURLS Projects
[X] This request isn't a duplicate of an existing issue
[X] I've read the docs and followed them (if applicable)
[X] This is not a personal support request that should be posted on the YOURLS Discourse community

Describe the bug
After updating to the new version, all the new url titles working fine (Arabic characters) but all the old one are in weird characters, when I go back the old version they work fine.
To Reproduce
add Arabic url to the old version then update
Screenshots
https://watannetwork.gyazo.com/83f5a3f08b01e0f1dcfa840d11e337de
Versions
v 1.7.6

when I go back the old version

Which old version?

when I go back the old version

Which old version?

v 1.7.2

Maybe a cheap fix for this could a plugin to update all link descriptions (ie fetch all long URL, mark those missing as 404 to allow for deletion and update title accordingly when applicable)

Pinging @joshp23, maybe his plugin https://github.com/joshp23/YOURLS-Update-30X is just what is needed

Pinging @joshp23, maybe his plugin https://github.com/joshp23/YOURLS-Update-30X is just what is needed

The only problem that I'm not so advance with API :) and the plugin looks like it need api

I'm not so advance with API :)

Well, the good news is that getting started with curl to trigger an api call is pretty straightforward.
The Update-30X plugin checks existing long urls for redirects, storing the final destination. It also provides a list of unreachable links in the return call, which was intended to make adding 404 management trivial.
For title updating, you might take a look at this title re-fetch plugin I threw together.
If it's useful to you, I also make use of a URL-Health Check plugin which does what Update -30X does and more when links are initially submitted. It needs some work, particularly when determining reach-ability of links, but is reliable.
I like the idea of working these into a unified link-management / housekeeping plugin, periodically addressing 30X and 40X errors, and cleaning titles with a cron job. But in the meantime the title refetch plugin would be my suggestion in this case.

Anyone still following this discussion and having titles fucked up, and willing to try something?

This problem finds roots in the fact that for a long time I didn't really pay attention to character set, being myself a latin1 user. Apologies to all the Arabic, Chinese, etc.. friends with their funky character sets :) FWIW, the version of YOURLS I'm currently working on goes UTF8 all the way so this shouldn't be an issue ever again.
For people who have upgraded from an oldish YOURLS version (circa 1.7.2 / 1.7.3) the following might fix:

Find the date before which all your titles are borked, in Y/m/d format (eg "2016-10-16")
Run the following query (in something like phpMyAdmin) :

UPDATE yourls_url SET
    title=convert(cast(convert(title using  latin1) as binary) using utf8)
WHERE timestamp <= "2016-10-16"

Just to be sure, make a backup of your table before.

(removed a couple comments to keep only solutions and pinning this issue)