steam_online: steam.api.HTTPError: Server connection failed: Too Many Requests (429)

Home Assistant release with the issue: 0.92.2
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io
Component/platform: steam_online
Description of problem:
steam_online performs checks too often, which results in a permanent block. By default, the component should poll not as often, or alternatively, let the user specify a custom timeout.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: steam_online # https://www.home-assistant.io/components/steam_online/
  api_key: !secret steam_key
  accounts:
  -<PHONE_NUMBER>1984661 # nowaker

Traceback (if applicable):
2019-05-12 00:43:42 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.steam_76561197961984661 fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 153, in download
    timeout=self._timeout)
  File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/steam_online/sensor.py", line 76, in update
    self._game = self._get_current_game()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/steam_online/sensor.py", line 92, in _get_current_game
    game_id = self._profile.current_game[0]
  File "/usr/local/lib/python3.7/site-packages/steam/user.py", line 171, in current_game
    obj = self._prof
  File "/usr/local/lib/python3.7/site-packages/steam/user.py", line 197, in _prof
    res = self._api["response"]["players"]
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 220, in __getitem__
    return self.__handle_accessor("__getitem__", *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 200, in __handle_accessor
    self.call()
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 242, in call
    data = self._downloader.download()
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 171, in download
    raise HTTPError("Server connection failed: {0} ({1})".format(reason, code))
steam.api.HTTPError: Server connection failed: Too Many Requests (429)

Additional information: N/A
Thanks!

Can probably fix this issue.

I looked at the documentation for this, and couldn't find any mention of a limit on number of queries per day. Do you know what the limit might be?

Never mind, found it, 100,000 calls. Gosh that's a lot!

OK, the scan interval is 15 seconds, so every scan must be using more than 17 calls to the API.
How many accounts and apps do you have registered, and how long does it last until it fails?

@Swamp-Ig I generated the Steam API key solely for HA. I don't use it for anything else. And the HA config is as described in the original post.
I don't know how long it lasts before it breaks. After initial configuration, it worked for me for some time, but a day or two later, it was hitting the limits. I checked the logs and it's still the same:
  File "/usr/local/lib/python3.7/site-packages/steam/api.py", line 171, in download
    raise HTTPError("Server connection failed: {0} ({1})".format(reason, code))
steam.api.HTTPError: Server connection failed: Too Many Requests (429)

Maybe if we cut the scan interval down to 60 seconds and see if that works. That should keep it under the threshold hopefully. You probably don't really need to update it every 15 seconds anyhow.
I will make the diff, register it myself, and get you to check out a copy to see if it works for you.

Absolutely, I'll patch it on my end and give it a try. Thanks!

OK I think this should have fixed it. Get the updated file here and test it locally, just copy it over your existing homeassistant/components/steam_online/sensor.py file

@nowaker Can you please patch things at your end and see if that fixes the issue? The PR is basically ready to go when you've done this.

@Swamp-Ig Hey, sorry for a delay. I couldn't figure out how to patch Hass.io. Can you point me to a doc or something on how to overwrite a file?

Just copy the updated file from the above link, and overwrite the existing file in your hass installation. If you're using the docker image do something like:
$ docker exec -it hass_container_name bash
hass$ cat > homeassistant/components/steam_online/sensor.py
<paste the file contents into the terminal>
^C
hass$ exit

Alternatively what I do is copy the file into the config directory, then copy it over the existing file:
$ <copy file to docker config dir>
$ docker exec hass_container_name mv /config/sensor.py homeassistant/components/steam_online/sensor.py

Then restart hass.

Have you had a chance to test this yet? I'm lothe to merge it without a positive test that it's fixed.

@Swamp-Ig I apologize for a delay. I've been busy with life.
I use hass.io. Which of these containers does the HA live?
# docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS                NAMES
113e8b0339ce        hassioaddons/log-viewer-armv7              "/init"                  33 hours ago        Up 33 hours                              addon_a0d7b954_logviewer
5df1e9098580        homeassistant/armv7-addon-configurator     "/run.sh"                33 hours ago        Up 33 hours                              addon_core_configurator
93671e09b735        homeassistant/armv7-addon-ssh              "/run.sh"                34 hours ago        Up 34 hours         <IP_ADDRESS>:22->22/tcp   addon_core_ssh
e92ecfb2cd17        hassioaddons/glances-armv7                 "/init"                  34 hours ago        Up 34 hours                              addon_a0d7b954_glances
d46b3cb4619f        hassioaddons/aircast-armv7                 "/init"                  34 hours ago        Up 34 hours                              addon_a0d7b954_aircast
21e9b10161f2        homeassistant/armv7-hassio-supervisor      "python3 -m hassio"      35 hours ago        Up 34 hours                              hassos_supervisor
16fa1540ddb5        homeassistant/raspberrypi3-homeassistant   "/bin/entry.sh pytho…"   11 days ago         Up 34 hours                              homeassistant

I think it's probably: 16fa1540ddb5        . I don't use hass.io though. Just do the docker exec thing until you find the one that it's in.

I checked 16fa1540ddb5 first, it seems to be the Hass.io config and that's it. Hass.io hides stuff from you. I suspect the files might be stored in the root, while Docker containers mount them as volumes. Unfortunately, for DOCKER in $(docker ps -q); do echo $DOCKER; docker inspect -f '{{ .Mounts }}' "$DOCKER"; echo '---'; done, doesn't provide any hints. And the root OS (called HassOS) doesn't even have find so it's hard to locate steam_online/sensor.py. Unfortunately, the typical approach for HassOS on official forums is "don't even dare to touch this yourself", so it's extremely hard to come by some actual instructions on where things are in HassOS. I'll find a way, for sure... Trying sshfs so I can use whatever userland tools I need to do my stuff. Will keep you updated. Thanks for your contribution and sorry for a delay.

Huh, Hass.io uses /usr/sbin/hassos-cli as the default shell. sshfs won't work with it, unless I change it to a normal shell. I tried editing /etc/passwd but it won't let me. '/etc/passwd' Read-only file system. I tried mount / -o remount,rw but still /etc/passwd isn't writable.
# mount -o remount,rw /dev/mmcblk0p3 /
# mount |grep '/ '
/dev/mmcblk0p3 on / type squashfs (ro,relatime)

At this point, I don't really know what to do next, at least directly with the Raspberry Pi. I will probably mount the Hass.io ISO locally and then find where the damn steam_online/sensor.py is. But that's for next time...


[Task]: getting started - Hop GUI page is not up-to-date

What needs to happen?
Update the screenshots and content here https://hop.apache.org/manual/latest/getting-started/hop-gui.html
Issue Priority
Priority: 3
Issue Component
Component: Documentation

.take-issue


Password Reset Login Screen not working in public network

I recently configure SSPR Windows Login Screen for all test environment client devices. All windows are windows 10 1803 and above. During our testing, most of the users reported positive results. In fact, there are still some gaps while testing the 'Reset Password' button:

Loading time slightly longer.
Page failed to load and showed "Something went wrong" error message when connected to a public network. (Few devices reported, one of it is my laptop).
(Resolved) Page failed to load and showed "Something went wrong" error message when connected to the corporate network.
Do not know where to troubleshoot. (Where is the event log location?)

I need some guidance and support for my issues above. I hope that I can understand how the reset password works, where is the event log location, how to improve loading time, why reset password page not load successfully and etc.

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

ID: c2015c6c-60c7-bb74-469c-e9320301d08a
Version Independent ID: 0ff19de6-c892-10ff-5fe8-f6a70abfa3f5
Content: Self-service password reset for Windows - Azure Active Directory
Content Source: articles/active-directory/authentication/howto-sspr-windows.md
Service: active-directory
Sub-service: authentication
GitHub Login: @iainfoulds
Microsoft Alias: iainfou

@junztan Thank you for the question. In order to best address your question, could you provide us with the URL of the MS Doc that you were following, if any?

@BhargaviAnnadevara-MSFT  https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-sspr-windows

@junztan Thank you for the response! I've routed this to the appropriate Team to investigate and update.

@junztan This seems to be an intermittent issue with some of your devices. We would need to have a closer look at your environment. Suggest you to open a Technical Support Ticket with us so that our engineers can work with you on the same.


Add a way to test log.critical()

Too hacky and not really reliable, could silence important errors


After ajax request how do i trigger confirm button

Sorry I want to ask you a question.
When the page is loaded after ajax request. How do I trigger confirm button?
I don't know how to integrate jquery delegate with bootstrap-confirm-button.

Simple, yoou must build confirm-button after the dom element is created!


[QUESTION]: Does this library or will this library get a LICENSE

We are working on documenting the versions and licenses of all our dependencies. This project does not have a LICENSE and I fear we may not be able to continue using this project without a license. Might I recommend an MIT license?

We are using the bower-license node module which looks in the bower.json for a license key. So this is most important change for me during this request. Please reference this file.
Thanks!

I will look into this one tomorrow

Close with commit 53bcafcd663f2359f33fdd4d693108ccb7556a54

This is perfect! Thank you for being so quick to get the license added.


Support de-vendoring for installs.

Now that pex vendors setuptools and wheel, we build / install sdists with
potentially fragile import semantics for these two distributions. In
particular, we trip up against this when trying to build cryptography.
Robustify installs by de-vendoring setuptools and wheel when used in an
install context. In order to support de-vendoring make the method of
import conditional on an environment variable instead of attempting to
re-write vendored imports at runtime.
Fixes #661

NB: not for review yet - initial CI burn only.
A commit will be pushed with an integration test to check the cryptography case this fixes.

Reviewers: the 3 commits can bew reviewed seperately and the 1st commit was automatically generated via tox -evendor so can generally be ignored.

Alright - hands-off from me with the last cleanup commit. Ignoring the 1st machine-generated commit things stand at:
$ git diff --shortstat HEAD~3
 12 files changed, 209 insertions(+), 225 deletions(-)


Support for GC Milestone 3

It look like that WASP implements currently milestone 2. This partly incompatible with milestone 3.
https://docs.google.com/document/d/1DklC3qVuOdLHSXB5UXghM_syCh-4cMinQ50ICiXnK3Q/edit#heading=h.9dwoku9340md

I see. I'll see about implementing milestone 3 soon. Here's the link to the PR with changes: https://github.com/WebAssembly/gc/commit/f9f8ffa445c2c0fe4ac284a1d12a8c5477da4457

We are also very close to having milestone 3 support in Binaryen. That's
currently our priority ("we" being Chrome's wasm tools team) so you might
also check that out.
On Tue, Feb 23, 2021 at 5:43 PM Ben Smith<EMAIL_ADDRESS>wrote:

I see. I'll see about implementing milestone 3 soon. Here's the link to
the PR with changes: WebAssembly/gc@f9f8ffa
https://github.com/WebAssembly/gc/commit/f9f8ffa445c2c0fe4ac284a1d12a8c5477da4457
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/WebAssembly/wasp/issues/61#issuecomment-784671050,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAISEKF3LHPBHDVLBIW6TWDTARKVPANCNFSM4XVEXXIA
.


Mulitple documentation improvements

This incorporates most of the feedback from @sirmarcel on the documentation, except for a couple of points we'll need to discuss in person. Many thanks for this feedback, it was very detailed and useful!
Contributor (creator of pull-request) checklist

[ ] ~Tests updated (for new features and bugfixes)?~
[x] Documentation updated (for new features)?
[ ] ~Issue referenced (for PRs that solve an issue)?~

Reviewer checklist

[ ] CHANGELOG updated with public API or any other important changes?

📚 Documentation preview 📚: https://metatensor--550.org.readthedocs.build/en/550/

[ ] TODO: find where the conventions should live and add the corresponding documentation

The installation page mentions that no wheels exist, this information is outdated. (Note however that the current wheels don't supporter current torch==2.3.0.)

The installation page mentions that no wheels exist, this information is outdated. (Note however that the current wheels don't supporter current torch==2.3.0.)

Actually, this was updated in the mean time and not reflected on this PR build: https://lab-cosmo.github.io/metatensor/latest/installation.html#install-torch

We provide pre-compiled wheels on PyPI that are compatible with all the supported torch versions at the time of metatensor-torch release. Currently PyTorch version 1.12 and above is supported.


Get/Delete a single cookie

Hi,
Any chance add the ability to get/delete a single cookie? Right now it's either getAll or deleteAll.
Thanks a bunch!

+1

https://github.com/joeferraro/react-native-cookies/pull/11

These changes don't allow for deleting a cookie by name.


New section for DocBlock + a couple of new standards

New standards:

single-line & multi-line class variable blocks
array of things

Needs some links to what tags are actually valid (how about this?), and what are required on a method.
I'd assume param, returns, throws, what else?
What about {@inheritDoc} usage?
I'd say we should recommend having a distinction between a short and long description on a method, kinda like git.
What about the formatting of the (long) description? I'm cool with markdown, but maybe tools better support html.

@sjparkinson @return and @param are the only required ones, isn't it clear from https://github.com/graze/standards/pull/21/files#diff-04c6e90faac2675aa89e2176d2eec7d8R66 ?

@sjparkinson thinking about @inheritdoc (and learning that it only really inherits the description) led me to this thought: should classes that inherit the exact same documentation even HAVE a DocBlock?

I've been thinking about @inheritdoc and I'm currently thinking that we shouldn't use it and we should explicitly define the doc block for sub-methods.

@sjparkinson I haven't come across methods with a description verbose enough that I had to consider a special format for it. Is it an issue in our Open Source projects?

@sjparkinson @return and @param are the only required ones, isn't it clear from https://github.com/graze/standards/pull/21/files#diff-04c6e90faac2675aa89e2176d2eec7d8R66 ?

Yes, after re-reading it. Being totally honest I found a lot of these verbose and just skimmed them.

@sjparkinson thinking about @inheritdoc (and learning that it only really inherits the description) led me to this thought: should classes that inherit the exact same documentation even HAVE a DocBlock?

Yes, return values can change, and I've never seen otherwise elsewhere.

@sjparkinson I haven't come across methods with a description verbose enough that I had to consider a special format for it. Is it an issue in our Open Source projects?

Something to consider another time.

Closed to create a new PR as #25.


Add CMK Enterprise Policies scripts

The code in this PR:

adds the new scripts for Enterprise Policies setup
adds the new script for CMK Enterprise Policy operations

@sokashya Sent you email about this PR.


Set up Danger integration

Set up Danger to run on every PR. A good first rule would be that the PR has to include a changelog entry.

Eh, I don't want to have to deal with a separate bot account right now. Will consider reopening if other folks start contributing.


DRILL-7157: Wrap SchemaParsingException into UserException when creating schema

Jira - DRILL-7157

@vvysotskyi please review.


awaitRace does not really race()

The currently implementation of awaitRace($promises) essentially works like this:
awaitOne(Promise\any($promises))

The naming implies this might call the equivalent of this:
awaitOne(Promise\race($promises))

IMO both have valid use cases and might be worth implementing.
See also #5 for some background on the functional API.
At the very least, this needs some documentation. A better method name would also be appreciated.

A better method name would also be appreciated.

PR #5 simply renames this method to reflect what it actually does: awaitAny()

FWIW: We should eventually also provide a real awaitRace() function. This will likely be postponed until after #5 is ready.


New flutter app fails to run on iOS device, "Timeout while attempting to retrieve Uri for Observatory"

Created a new flutter app via flutter create. Attempted to run it on my iOS device with flutter run. App never started on my device. Saw this error on the console:
~/tmp/foobar $ flutter run
Launching lib/main.dart on flutter 6s in debug mode...
Traceback (most recent call last):
  File "/tmp/fruitstrap_d83d5bc53967baa0ee18626ba87b6254b2ab5418.py", line 35, in run_command
    lldb.target.Launch(lldb.SBLaunchInfo(shlex.split(args[1] and args[1] or '--enable-dart-profiling --enable-checked-mode')), error)
IndexError: list index out of range
Exception from flutter run: Exception: Timeout while attempting to retrieve Uri for Observatory
package:flutter_tools/src/base/common.dart 30         throwToolExit
package:flutter_tools/src/protocol_discovery.dart 55  ProtocolDiscovery.nextUri.<async>.<fn>
===== asynchronous gap ===========================
dart:async                                            _Future.timeout
package:flutter_tools/src/protocol_discovery.dart 53  ProtocolDiscovery.nextUri.<async>
===== asynchronous gap ===========================
dart:async                                            Future.Future.microtask
package:flutter_tools/src/protocol_discovery.dart     ProtocolDiscovery.nextUri
package:flutter_tools/src/ios/devices.dart 271        IOSDevice.startApp.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/ios/mac.dart 180            buildXcodeProject.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/base/process.dart 145       runAsync.<async>
===== asynchronous gap ===========================
dart:async                                            _asyncThenWrapperHelper
package:flutter_tools/src/ios/devices.dart            IOSDevice.startApp
package:flutter_tools/src/run_hot.dart 161            HotRunner._run.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/resident_runner.dart 156    ResidentRunner.startEchoingDeviceLog.<async>
===== asynchronous gap ===========================
dart:async                                            _asyncThenWrapperHelper
package:flutter_tools/src/run_hot.dart                HotRunner._run
package:flutter_tools/src/run_hot.dart 78             HotRunner.run.<fn>
package:stack_trace                                   Chain.capture
package:flutter_tools/src/run_hot.dart 77             HotRunner.run
package:flutter_tools/src/commands/run.dart 278       RunCommand.runCommand.<async>

Exception from flutter run: Exception: Timeout while attempting to retrieve Uri for Diagnostic server
package:flutter_tools/src/base/common.dart 30         throwToolExit
package:flutter_tools/src/protocol_discovery.dart 55  ProtocolDiscovery.nextUri.<async>.<fn>
===== asynchronous gap ===========================
dart:async                                            _Future.timeout
package:flutter_tools/src/protocol_discovery.dart 53  ProtocolDiscovery.nextUri.<async>
===== asynchronous gap ===========================
dart:async                                            Future.Future.microtask
package:flutter_tools/src/protocol_discovery.dart     ProtocolDiscovery.nextUri
package:flutter_tools/src/ios/devices.dart 274        IOSDevice.startApp.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/ios/mac.dart 180            buildXcodeProject.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/base/process.dart 145       runAsync.<async>
===== asynchronous gap ===========================
dart:async                                            _asyncThenWrapperHelper
package:flutter_tools/src/ios/devices.dart            IOSDevice.startApp
package:flutter_tools/src/run_hot.dart 161            HotRunner._run.<async>
dart:async                                            _SyncCompleter.complete
package:flutter_tools/src/resident_runner.dart 156    ResidentRunner.startEchoingDeviceLog.<async>
===== asynchronous gap ===========================
dart:async                                            _asyncThenWrapperHelper
package:flutter_tools/src/run_hot.dart                HotRunner._run
package:flutter_tools/src/run_hot.dart 78             HotRunner.run.<fn>
package:stack_trace                                   Chain.capture
package:flutter_tools/src/run_hot.dart 77             HotRunner.run
package:flutter_tools/src/commands/run.dart 278       RunCommand.runCommand.<async>

Version:
~/tmp/foobar $ flutter --version
Flutter • channel master • git@github.com:flutter/flutter.git
Framework • revision a0f0c42fe3 (2 hours ago) • 2017-01-31 14:48:48
Engine • revision 2d54edf0f9
Tools • Dart 1.22.0-dev.9.1

Bumped to "today". I feel like this is a regression that we want to address? @cbracken can repro this, too.

That looks like a CocoaPods error?  @collinjackson?
I was able to run flutter_gallery on a Google-dev-cert-using iPod Touch from XCode just now.  I'm also not able to run from flutter run due to some (likely different and possibly google-mac specific) python error.

@cbracken @xster and @chinmaygarde are our iOS ninjas.

I could be wrong. I don't know what fruitstrap is.  I assumed it was part of cocoapods?

TIL about Fruitstrap: https://github.com/ghughes/fruitstrap
Also, and here's a weird thing. No matter what flutter project I try to run for iOS device, it always fails with the same tmp file /tmp/fruitstrap_d83d5bc53967baa0ee18626ba87b6254b2ab5418.py
I find it weird that all my flutter projects try to run what looks to be a generated tmp file. Maybe that's a clue?

This is my error https://gist.github.com/eseidelGoogle/66ac11d769945730c40f16d7ccde4cd2

Taking a look at this right now.

My error looks like this: https://forum.ionicframework.com/t/ionic-run-ios-python-error/58760

Just to clarify, the error I was able to repro yesterday was from #7766. Having trouble repro-ing this one.
Can you confirm the repro steps you took were:

flutter create foobar
cd foobar
flutter run (no simulator open and an iOS device connected)

When I run those I get a code signing error:
https://gist.github.com/cbracken/57513b082d9f0915ccbf091439b96c5b
which is expected, but which we should definitely follow up with more useful instructions on how to remedy.
If I then open ios/Runner.xcodeproj, select the project manager in the sidebar, click Runner, then set a team under General in the project settings, followed by another flutter run, I get a correct launch.
Can you provide the output of a flutter doctor run?
In my case:
[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/cbracken/src/flutter/flutter
    • Framework revision 3a43fc88b6 (10 hours ago), 2017-01-31 23:32:10
    • Engine revision 2d54edf0f9
    • Tools Dart version 1.22.0-dev.9.1

[✓] Android toolchain - develop for Android devices (Android SDK 23.0.2)
    • Android SDK at /Users/cbracken/Library/Android/sdk
    • Platform android-23, build-tools 23.0.2
    • Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
    • XCode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.2.1, Build version 8C1002

[-] IntelliJ IDEA Community Edition (version 2016.3.1)
    • Dart plugin not installed; this adds Dart specific functionality.
    • Flutter plugin not installed; this adds Flutter specific functionality.
    • For information about managing plugins, see
      https://www.jetbrains.com/help/idea/2016.2/managing-plugins.html

[✓] Connected devices
    • the Doom Melon •<PHONE_NUMBER>00126a7f5aaf03cbd5fbc18ac75e65 • ios • iOS 10.2.1 (14D27)

@cbracken so, you don't see something like
Launching lib/main.dart on flutter 6s in debug mode...
Traceback (most recent call last):
  File "/tmp/fruitstrap_d83d5bc53967baa0ee18626ba87b6254b2ab5418.py", line 35, in run_command
    lldb.target.Launch(lldb.SBLaunchInfo(shlex.split(args[1] and args[1] or '--enable-dart-profiling --enable-checked-mode')), error)
IndexError: list index out of range

?
Do we know who/what creates that /tmp/fruitstrap_d83d5bc53967baa0ee18626ba87b6254b2ab5418.py file? I'm wondering if that's stale for some reason.

~/tmp/foobar $ flutter doctor
[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/sethladd/Code/flutter
    • Framework revision a0f0c42fe3 (19 hours ago), 2017-01-31 14:48:48
    • Engine revision 2d54edf0f9
    • Tools Dart version 1.22.0-dev.9.1

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.0)
    • Android SDK at /Users/sethladd/Library/Android/sdk
    • Platform android-25, build-tools 25.0.0
    • Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
    • XCode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.2.1, Build version 8C1002

[✓] IntelliJ IDEA Community Edition (version 2016.3.1)
    • Dart plugin version 163.9166.22
    • Flutter plugin version 0.1.4

[✓] Connected devices
    • flutter 6s • d83d5bc53967baa0ee18626ba87b6254b2ab5418 • ios • iOS 10.2.1 (14D27)

Looks like the hash in the /tmp/fruitstrap_HASH.py name is your device id.  Hence why it's shared between projects.

@sethladd correct; not seeing the fruitstrap error.
Looks like this is created by ios-deploy:
% strings ios-deploy|grep fruit
    connect_url = internal_dict['fruitstrap_connect_url']
    device_app = internal_dict['fruitstrap_device_app']
    script fruitstrap_device_app="{device_app}"
    script fruitstrap_connect_url="connect://<IP_ADDRESS>:{device_port}"
/tmp/%@/fruitstrap_
fruitstrap_
/tmp/%@/fruitstrap-lldb-prep-cmds-

~/Code/hello_cupertino[master*] $ ios-deploy --version
1.7.0

Do we need to add this check to flutter doctor ?

Can you run a brew update brew upgrade and let me know if moving to 1.9.1 fixes it for you? And yet, a min version check in doctor sounds in order.

No problem. (/me is now recompiling ffmpeg, so stand by... :)

I had ios-deploy 1.9.0 and also can't reproduce this fruitstrap error

My ios-deploy is 1.7.0.  I'm seeing a fruitstrap error, not sure if we have more than one. :)

With @cbracken 's help, we upgraded my ios-deploy to 1.9.1 and I can launch apps now! woohoo!
My ios-deploy was in some stuck state, and brew was telling me a very weird message:
~/Code/hello_cupertino[master*] $ brew upgrade ios-deploy
Error: flutter/flutter/ios-deploy 888621 already installed

So, I did this:
brew uninstall ios-deploy
brew install ios-deploy
ios-deploy --version   # 1.9.1

If both @eseidelGoogle and I were seeing errors with 1.7.0, I suggest we update flutter doctor to inform our users to go grab 1.9.0+ of ios-deploy.

@eseidelGoogle can you dump the info of brew info ios-deploy for the record?

I'm going to close this with a resolution of: "Please upgrade your ios-deploy to 1.9.0+" and I'll open a new issue to ask flutter doctor to error if you have < 1.9.0 installed.
Thank you all for your help!!

We used to have our own brew for ios deploy: https://github.com/flutter/homebrew-flutter/blob/master/ios-deploy.rb  I wonder if I installed that and that's related to this in any way?

Yeah, looks like I have ios-deploy installed in /usr/local/bin/ios-deploy but not via brew.  I wonder if I got it in some funny way.  Updating via brew now.

Mine is still busted, (likely due to missing python's six module), but it's probably a separate bug.

Yup, sudo easy_install six fixed my issue.  Unclear if that's needed for flutter doctor too.

Did you not have "six" installed, or was it out of date?
(if "six" is a direct dependency from our tools, we probably do want to prompt users to upgrade it via flutter doctor)

I did not have python's six installed it seems.  I've definitely installed it before, so it may have been some quirk of Google macs.  Unclear if we'll need to check for that dependency ourselves.

It just so happens I've got a non-Google mac sitting right beside me. Will take a quick look.

I suspect I hit this: https://bugs.swift.org/browse/SR-1061 by accidentally installing a custom python at some point (or maybe my Google mac did).  Six is presumably a slightly non-standard package which apple ships as part of their llvm dependencies and their tools assume are installed, but for my flavor of python it wasn't.  This could be command-line only if my PATH is set to include my local python but my Xcode environment isn't.  At least that's my theory.

For record I hit this today on a non-Google machine with a non-Google physical phone.
ios-deploy and six were both up to date.
Doing flutter upgrade gave
[✓] Flutter (on Mac OS X 10.12.3 16D32, channel mountainview)
    • Flutter at /Users/xiao/Development/flutter
    • Framework revision 8306afb797 (56 minutes ago), 2017-03-30 11:24:10
    • Engine revision 61fc1d6e31
    • Tools Dart version 1.23.0-dev.9.0

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at /Users/xiao/Library/Android/sdk
    • Platform android-25, build-tools 25.0.2
    • ANDROID_HOME = /Users/xiao/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[-] iOS toolchain - develop for iOS devices (Xcode 8.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.3, Build version 8E162
    • ios-deploy 1.9.1
    ✗ libimobiledevice is incompatible with the installed Xcode version. To update, run:
      brew update
      brew uninstall --ignore-dependencies libimobiledevice
      brew install --HEAD libimobiledevice
    • CocoaPods version 1.2.0

[✓] Android Studio (version 2.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Gradle version 3.2
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.8651
    • Flutter plugin version 0.1.5

[✓] Connected devices
    •  • ca81e3fe859531cba8c9c769947d269ce48dcae7 • ios • iOS  ()

Running the given instructions got things working again. Yay for the doctor.

sudo easy_install six

Work for me .lol


add SafeEncoder.encode() method for complete encoding

issue #2213

@gkorland any news on this one, it will be needed to close JRediSearch issue 100

@tague I did some minor cleanup, I think it's ready to be merged but the CI is failing.

@sazzad16 I think the SafeEncoder is the natural place for, since all the other encoders are here too

@tague please notice that encodeCompleteResponse failed

@gkorland
it is weird, when I run the test, on Redis 6.0.5 or 6.0.6 -what I did before pushing the code- I do not see this error.
# Server
redis_version:6.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:c2b8bbb973e432ff

INFO SERVER
# Server
redis_version:6.0.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:3a5f6f10a5f74539

No issue with my test:
Failed tests:
  SSLJedisClusterTest.connectByIpAddressFailsWithSSLParameters:160 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterTest.connectWithEmptyTrustStore:232 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterWithCompleteCredentialsTest.connectByIpAddressFailsWithSSLParameters:159 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterWithCompleteCredentialsTest.connectWithCustomHostNameVerifier:193 The code did not throw the expected NullPointerException.
  SSLJedisClusterWithCompleteCredentialsTest.connectWithEmptyTrustStore:231 The code did not throw the expected JedisConnectionException.
Tests in error:
  SSLJedisClusterTest>JedisClusterTest.testClusterForgetNode:385 » Jedis Node re...
  SSLJedisClusterTest>JedisClusterTest.testMigrateToNewNode:295 » JedisData ERR ...

Tests run: 736, Failures: 5, Errors: 2, Skipped: 0

But when I use the same branch as Travis ( unstable hmm) I have the error, as you can see here:
Redis Version
# Server
redis_version:999.999.999
redis_git_sha1:3941a275

Failed tests:
  SSLJedisClusterTest.connectByIpAddressFailsWithSSLParameters:160 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterTest.connectWithEmptyTrustStore:232 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterWithCompleteCredentialsTest.connectByIpAddressFailsWithSSLParameters:159 The code did not throw the expected JedisConnectionException.
  SSLJedisClusterWithCompleteCredentialsTest.connectWithCustomHostNameVerifier:193 The code did not throw the expected NullPointerException.
  SSLJedisClusterWithCompleteCredentialsTest.connectWithEmptyTrustStore:231 The code did not throw the expected JedisConnectionException.
  AllKindOfValuesCommandsTest.encodeCompleteResponse:902 expected:<foo[]> but was:<foo[2]>
Tests in error:
  SSLJedisClusterTest>JedisClusterTest.testClusterForgetNode:385 » Jedis Node re...
  SSLJedisClusterTest>JedisClusterTest.testMigrateToNewNode:295 » JedisData ERR ...

Tests run: 736, Failures: 6, Errors: 2, Skipped: 0


always add geocoder to Rack::Request if defined

Ever since the code change in #1061, if a Rack application loads both Rails and Sinatra simultaneously (e.g., both are included in the same middleware stack for handling different routes), then only ActionDispatch::Request will be enhanced with geocoder methods and not Rack::Request, causing request#location to be undefined in the Sinatra route. (My use-case is currently Rails 4.2, but presumably affects Rails 5 as well.)
The fix in this PR changes the if ... elsif conditional to instead use two separate conditionals.

Thanks for this!
I don't think that including in both with cause an issue.


alter page labels

Hi,
I have a pdf from a scan where the page number of the file start with one. As the scanned (graphical) page number do not start with one, I would like to make an offset to the file page numbers as well.
Is this possible with qpdf?
Or is there any other possibility?
Thanks,
Femi

Solution can be found here:
https://superuser.com/questions/232553/how-to-change-internal-page-numbers-in-the-meta-data-of-a-pdf
in detail:
add
    /PageLabels <<
      /Nums [
        0 << /S /D /St 77 >>
      ]
    >>

behind   /Type /Catalog in the pdf file

to add an offset of 77 (e.g.)

I think it would be useful to have library or cli options to do this directly with qpdf. This type of question comes up from time to time. I'm glad you've found a solution to your specific case.

This can be done now with qpdf JSON, but I plan to implement the proposal in #939. I'm going to close this in favor of that issue. Please feel free to subscribe to that issue if you want to follow progress. Thanks!

A solution to this issue will be in qpdf 11.8.0. See #939 for details.


Epic: Plan to improve Submariner metrics

Basic metric support is in place in the operator (https://github.com/submariner-io/submariner-operator/pull/549) and in the engine (https://github.com/submariner-io/submariner/pull/843). To make all this usable and maintainable, we need to:

[x] add metric tests outside the operator (see https://github.com/submariner-io/submariner-operator/pull/627 for an example);

[x] (skitt) ensure all the metrics we provide are automatically configured as far as possible, for integration into a running Prometheus instance (OpenShift’s or any other) — https://github.com/submariner-io/submariner-operator/issues/905;

[ ] (maayanf24) add relevant internal metrics, useful to track the health of the containers we use (see https://github.com/submariner-io/submariner/pull/845 for an example);

[x] (maayanf24) add relevant operational metrics, as discussed in https://github.com/submariner-io/submariner/issues/678 (see https://github.com/submariner-io/submariner/pull/846 for a Libreswan example);

[x] (skitt) check the CoreDNS metrics: https://github.com/submariner-io/lighthouse/issues/276.

[x] (maayanf24, P2) Active Gateway for the cluster and its uptime — the operator should already track the gateway, we need to add the uptime: https://github.com/submariner-io/submariner-operator/pull/994

[x] (P3) How many clusters are under control

[x] (maayanf24, p4) Globalnet https://github.com/submariner-io/submariner/issues/890

[ ] (p5) Lighthouse https://github.com/submariner-io/lighthouse/issues/349

[ ] (p6) Broker https://github.com/submariner-io/admiral/issues/136
For the operational metrics, we need some design work; the main questions to answer are:

Should metrics be part of an internal API, or should we instead agree on metric names and types (including labels etc.), and leave the implementation to each metric provider?
We’re providing a shared API: see https://github.com/submariner-io/submariner/pull/923

What metrics do we want, and how should they appear?
See https://github.com/submariner-io/submariner/issues/678 for a list. See https://github.com/submariner-io/submariner/pull/899 for a number of these; support needs to be added to the shared API.

What log messages should we turn into metrics so that they can easily be turned into alerts?

See also https://github.com/submariner-io/submariner-operator/issues/532.

@maayanf24 can you please close this epic and track individual items we want to see improved?


Add ES6 String.prototype.codePointAt()

Add support for String.prototype.codePointAt(). Also revises duk_char_code_at() and String.charCodeAt() behavior for decode error: instead of an error, a U+FFFD is returned. This behavior only affects non-standard strings so it has no compliance effect.
I'll add String.fromCodePoint() in a separate pull, it's a counterpart to this function. The quite useful for-of iteration for strings won't be supported yet because there's no iterator or for-of support in general.

[x] Add binding
[x] Testcase updates
[x] Migration notes
[x] Releases entry

This binding isn't conditional to any config option for now. I'm not sure what to do with individual bindings like these yet w.r.t. config, entire built-ins (like Reflect) are easier from a config perspective.

IMO it's probably not worth it to have config options for individual methods.  Maybe we could have some kind of a catch-all option for "post-ES5 support" and then all the ES6/7/etc. options would depend on that.

I'm leaning towards some kind of catch-all approach for small features that are version dependent but unlikely to be enabled/disabled individually. One simple approach is what you propose:

A config option for enabling post-ES5 support.

Another is to just provide generic defines for each release, e.g.:

DUK_USE_ES6: enable all ES6 functionality not controlled by other config options
DUK_USE_ES7: enable all ES7 functionality not controlled by other config options
Etc.

That's better in some ways, e.g. it's easier to see where feature were introduced which may be sometimes interesting.
But then, with yearly specification releases that's unlikely to matter very much at least beyond ES7.
Right now ES5 is a useful baseline for low memory targets but going forward a few years it may be that one would like to have e.g. Symbols even in such a target (and perhaps remove some ES5 functionality). So a "pure ES5" configuration is most likely going to become less and less useful as a starting point over time.
Ponder.

By the way, the problem with adding a lot of individual defines is not really the defines themselves, at least in my view. The current tooling handles that pretty transparently, and up-to-date example YAML config files provide relatively stable logical starting points for different environments so that one doesn't need to deal with all the individual options in general.
The most important practical issue is the #ifdefs in the code base, and there specifically the proper conditions for including or excluding some shared helper which often gets an interesting multipart condition.
That, in itself, is not really an issue except for compiler warnings. Modern compilers will strip out any unnecessary functions (at least if you tell them to). But it's still a bit awkward to maintain, and many users (rightly or wrongly) want to treat all warnings as errors.

Added DUK_USE_ES6 for generic, uncategorized options for now.

The most important practical issue is the #ifdefs in the code base, and there specifically the proper conditions for including or excluding some shared helper which often gets an interesting multipart condition.

Agreed, the tooling wasn't my concern either, it was the necessary manual maintenance of #ifdefs which could get out of hand fast if there's a lot of them and/or too many complicated conditions to keep track of.  ES7 exponentiation being a good example - it turned out that it needed to pull in pow() which previously was only needed for the Math builtin.

For the pow() case a "post-ES5" define would have had the same issue BTW :)

I know, I was just using it as an example, in other words, "take this case and extrapolate out to hundreds of such options" :)  A catch-all "post-ES5" define seems to me like it would make for fewer maintenance cost in the long term vs. a whole bunch of granular ones.

That said, I do think it's worthwhile to continue adding individual defines for entire builtins like Reflect.  It's nice to be able to opt in and out of individual components, like some kind of JS ala carte. 😄

A catch-all "post-ES5" define seems to me like it would make for fewer maintenance cost in the long term vs. a whole bunch of granular ones.

I agree with that, it's certainly less maintenance to have fewer options. In fact, without low memory targets it'd be quite logical to have essentially no feature options (at least as far as built-ins, operators, etc are concerned): you can just compile them in, and initialization code can delete the bindings if they're not wanted.
So granular config options really serve the low memory targets where it's maybe not possible to include all bindings. When that's the case, it's preferable, all other things being equal, to be able to control with precision what gets compiled in. The downside to that is maintenance, testing configuration combinations (must be automated in practice), documentation, and so on.
The easy solution which produces pretty good compiled results (with modern compilers) is to just not worry about #ifdefing helpers: they'll be left out at link stage if they're not needed. The only hitch is that it generates compiler warnings, and many users won't be happy with that.
I merged that DUK_USE_ES6 catch-all into master for now - I don't mean it to be final. There should be one round of config option cleanup for 2.0 release, so it can be changed easily up until that point.

Off-topic, it'd annoy me to have the compiler warn me about dead code.  IMO that's not the compiler's job (beyond simple things anyway; warnings for e.g. unreachable code within a function do make sense) - if one needs to find dead functions then some kind of static analysis tool is called for.


Add logging to cloud front function

It's pretty simple to add logging to the cloud front function which rewrites registry URIs, and would be greatly valuable for debugging issues.
Logging output goes to a CloudWatch log group w/ the function name.

@jimmie is this still something that needs to be done? and what is the urgency for this would you say? is this something we should really have in place before any data or more services go online?

This is not terribly urgent, just a nice to have to help diagnose request routing problems as they arise. There are other ways to accomplish this however.

@jimmie can you chat with @viviant100 or post what you were thinking for this?

Currently, the cloud front function doesn't output anything regarding requests received, errors in the requests, etc. This makes it a bit difficult to diagnose issues, although we haven't had any in a while. It would be good to hook up Cloudwatch logs by inserting various console.log() statements throughout.
More details here: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-logs.html

thanks @jimmie! we will take a look

@jimmie @viviant100 do we have any status on this?

Did some research. We can start with hooking up CloudWatch with CloudFront.  @jimmie - Is this something we can do ourselves or need SA to setup?   On a separate note, are you using edge functions?

PR registry-api 264


-fno-exceptions fails to link on MacOS

Using boost 1.83 and MacOS Ventura.  This also fails on boost 1.79 though there are a number of other warnings that appear for that version.  My understanding is that the JSON code should build with -fno-exceptions replacing throw with abort().  Is this not true?
gcc --version
Apple clang version 14.0.3 (clang-14<IP_ADDRESS>.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

#include <boost/json/src.hpp>
using namespace boost::json;

#if defined (TEST_BJ)

// g++ -std=c++20 -fno-exceptions -I ext/boost/boost -DTEST_BJ -o bj bj.cc

#include <stdio.h>
#include <stdlib.h>
#include "unix/file.h"

void decode (void const* pv, size_t cb) {
  auto sv = std::string_view (reinterpret_cast<char const*>(pv), cb);
  ::printf ("# source %p %p\n", sv.begin (), sv.end ());

  error_code ec;
  value jv = parse (sv, ec);
  ::printf ("# parse {%s]\n", ec.message ().c_str ());
  auto o = jv.if_object ();
  if (o) {
    for (auto it = o->begin (); it != o->end  (); ++it){
      auto sKey = it->key ();
      auto& value = it->value ();
      ::printf ("# '%.*s':\n", int (sKey.size ()), sKey.begin ());
      ::printf ("# key %p %p\n", sKey.begin (), sKey.end ());
      auto sValue = value.if_string ();
      if (sValue)
        ::printf ("# value %p %p\n", sValue->begin (), sValue->end ());
    }
  }
}

int main (int argc, char** argv) {

  if (argc < 2) {
    printf ("#*ER file argument required\n");
    return 1; }

  auto f = File::map_ro (argv[1]);  // mmap file helper

  decode (f.begin (), f.size ());

  return 0;
}

The compiler session
g++ -std=c++20 -fno-exceptions -I glow/ext/boost/boost -DTEST_BJ -o bj bj.cc
Undefined symbols for architecture arm64:
  "boost::throw_exception(std::exception const&, boost::source_location const&)", referenced from:
      boost::json::detail::throw_system_error(boost::json::error, boost::source_location const*) in bj-815140.o
      boost::json::detail::throw_system_error(boost::system::error_code const&, boost::source_location const&) in bj-815140.o
      boost::json::static_resource::do_allocate(unsigned long, unsigned long) in bj-815140.o
      boost::json::detail::null_resource::do_allocate(unsigned long, unsigned long) in bj-815140.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

That's actually the intended behaviour. You need to provide your own definition, so that your program does something instead of throwing an exception.
https://www.boost.org/doc/libs/1_83_0/libs/throw_exception/doc/html/throw_exception.html

Fair enough.  I found a reference to the fact that GCC should replace a throw with abort when -fno-exceptions is present.  There is also this:
Supports -fno-exceptions, detected automatically
in the JSON documentation.  It suggests, to me, that the component will not require me to do anything other than setting -fno-exceptions to disable their use.  That appears not to be the case.

Yeah, I agree. It should be more clear on what the user needs to do.

Fixed in 5328819e63df809322e4443b2ad880a8d8f45e9b


Cache mangled names for constant QNames

Multiname#getMangledName shows up in profiles quite prominently. With this patch, it's just gone.
r? @mbebenita.

/botio reftest

/botio test


TODO: add support for --wrap=COL option

Add support for --wrap=COL option, where a newline is inserted in the encoded output, after every COL number of characters. It makes the textual output look more presentable.

Fix provided in #3. Closing the issue.


sys: add wl_listener and wl_signal

cc #116

This is an attempt at implementing the wl_signal_* fucntions from wayland-server's headers in rust.
We need to make sure:

offset_of!(..) is not UB, and if it is, can we work around it?
the functions are correctly implemented, according to the reference impl of wayland-server

@Timidger it looks like you are interested in this, your eyes would be welcome!

I appreciate this, this stuff is super helpful for my wlroots wrapper.
Haven't had a chance to double check the implementation against the reference, but a quick glance the macros at least look right.
In regards to the safety of offset_of!, it should be safe so long as the struct is #[repr(C)]. Without that, Rust can reorder the struct ordering as an optimization.
Either way though this will rely on the internal memory representation of Rust structs. Making them use the C model means that shouldn't change.

My wary regarding offset_of!() is that we are kind-of dereferencing a null pointer, isn't that UB?

According to this stackoverflow answer (which is where I got that particular snippet), this is a simplification on the solution posted by the questioner. The original is a little more explicit and is definitely not UB because he just does straight pointer arithmetic.
You're correct though that this does seem kind of suspect...I understand the logic done though. I played around with it my self, and I think the magic is that we immediantly convert the field to a pointer, so that Rust is smart enough to not actually dereference the pointer ever actually. It is able to see (even with no optimizations turned on) that we aren't asking for the value of the struct at memory address 0, we are asking for the memory address of the field of the struct that resides at memory address 0. That way, we are just doing basic pointer arithmetic.
Here is me playing around with it on the playground. Note the cases where UB can be invoked, but with the code as-is it works because we aren't ever actually de referencing null pointers (even though it looks like we are).

Okay, in this case I'll merge this and release a new version.
I hope if there is any bug in this, it won't be too hard to hunt... I've tried to follow closely the C code, though, so it should be ok I guess.

I'll be making heavy use if it, so if I notice anything strange I'll be sure to report it here, and try to provide a fix

Coverage decreased (-0.08%) to 14.469% when pulling 6f7956445d49dffb2097a1d03afcee5f0a5bb411 on vberger:wl_listener into 7e6537adb2bb289eaa7a43c7ff4fedec5a9851e8 on Smithay:master.


StorageClass CSI compatible

Hello,
Thanks for work.
Is there a way to provider a CSI storageclass compatible with local-path ?
Aim goal is to support Snapshots (for Velero full backups since Restic mode is KO with local-path provisionner and hostPath mode)
I've already install snapshot-controller, build velero with right CSI conf.
Unfortunately, all my k3s PVC are related to local-path storageclass with is not  a CSI-one compatible. Is to possible to use local-path + CSI ?
Thanks

For the backup with velero, you can refer to https://github.com/rancher/local-path-provisioner/issues/85.
I will check it when I am free. :)

@derekbit possibly can be closed due to #260?

@AnthonyEnr1quez
Yes.
Close it. Feel free to open it if there is any issue. Thank you.


[fix][#2882] fixed to jump to link when clicking on slide show

Coverage decreased (-9.4%) to 74.007% when pulling 536834e2d781c068a5554749705140927840db8a on HiraiY:issue#2882 into daee091b44e92986d01e18a2e57c1034efe2d954 on shirasagi:master.


How to use with playframework

At first: Thanks for your efforts in this project.
I've setup a playframework-scala-js project as shown in vmunier/play-with-scalajs-example. angulate2 works fine as long as I manually copy the generated xxx-sjsx.js file to the server's resource directory. But I cannot find a way to provide it automatically whenever it is generated. Any ideas?
BTW: In the README.md for angulate2 below the first code example you write:

Important: Don't forget to load the file target/scala-2.11/annotations.js after the JS files generated by Scala.js!

It took me some time to figure out, that the needed file isn't called annotations.js but sjsx.js.

I've been checking out this project over the last few days, and found that a solution is to link the file to Play's asset directory, by including
unmanagedResources in Assets += baseDirectory.value / "client/target/scala-2.11/client-sjsx.js"
in the sbt settings declaration for the Play project. Then you can write
<script src='@routes.Assets.versioned("client-sjsx.js")'></client>
in your main.scala.html file.

Sorry for the late response - I've recently moved, started a new job, and I'm still without fast internet access... :(
Anyway, due to some fundamental changes in Angular2 introduced with the switch to RC0 and a new backend for generation of the annotations file, I'm currently refactoring angulate2; hence the README is outdated. The Angulate2 API + sbt plugin will possibly see major changes over the next few weeks.
I don't use the play framework myself, but I would be happy to include a link to a seed project or howto documentation for angulate2 + play.

I'm currently working on a skeleton of angulate2 and play2.5. what kind of refactoring are you looking at and what's the timeline? I'm presenting in this at a local conference and so I'd like to stay as up to date as possible :)

@AugustNagro: Thanks for the pragmatic tip. For me it partly works with a slight modification:
unmanagedResources in Assets += baseDirectory.value / "../client/target/scala-2.11/client-sjsx.js"

Partly, because changes to the client-sjsx.js may not be updated immediately after they changed. E.g. if I rename a component class, the original client-sjsx.js is updated if I reload the page in the browser, but the related resource in web/public/main of the server is only updated the next time something in the scala-js code changes.
@gregghz: Any tip how to reliably publish the client-sjsx.js from the client project as an asset in the server project?

@svenwiegand nothing yet. I'm just barely getting it set up. I know with https://github.com/greencatsoft/scalajs-angular it worked fine and I didn't have to set anything up. I could just use @routes.Assets.versioned no problem. But that one doesn't use an sbt plugin like Angulate2. I'll keep digging for a bit though.

Does anyone know what's copying *-fastopt.js to web/public/main?

@svenwiegand I think I've solved your problem. In addition to the unmanagedResources setting, if I also add:
compile in Compile <<= (compile in Compile) dependsOn (fastOptJS in (client, Compile))

changes in angular components seem to re-trigger the generation of client-sjsx.js. Try it out and let me know if it works for you. I Haven't tested it a ton yet.
Here's a gist of my full build.sbt (I plan on publishing the full project as a play + angulate2 sample eventually): https://gist.github.com/gregghz/0086cd6b82eb2680a41b356e07b296ca

@svenwiegand I was using sbt-play-scalajs in my demo project to run fastOptJS in dev mode, and fullOptJS when in Prod mode. The author has also provided play-scalajs-scripts, which select the correct JS file depending on the environment (Note: I used @playscalajs.html.selectScript(), not @playscalajs.html.scripts() which is detailed in the documentation).
Ideally (when this project is stable), someone will make a sbt-play-angulate2 plugin that simplifies the build process. Possibly an activator template as well.
Once I set up the build, I tried creating a simple app that uses an @RouteConfig for navigation, and reads + displays a JSON array of "todos" from the server. I followed both the "router" and "angelolite" example projects. I noticed quite a few problems with both the generated SJSX and fastOptJS file. I corrected the errors manually and was able to get it somewhat functional.
@jokade, I'd recommend putting a simple "out of date" message on the main and example repo's readme files. Once you've refactored to your satisfaction, I'd be happy to contribute some ScalaJS facades and/or make some example projects. And good luck finding internet 😎

@gregghz Your task dependency seems to do the trick. Thanks for sharing!

@svenwiegand I've publish an example working with the latest angular2 release: https://github.com/gregghz/angulate2-play-example
Right now it depends on a fork of angulate2 but I hope to get my changes cleaned up and organized and merged upstream eventually.
This also uses compile time DI in play instead of the runtime Guice based DI play typically favors. It shouldn't matter too much inside play, you can switch to a more standard play project no problem I think.

@gregghz Thanks a lot. Looks great.
As Angular 2 is currently still in very early and bad documented stage I'm currently evaluating vue.js which is powerful, very straightforward and well documented...

FWIW
these three PRs: https://github.com/jokade/angulate2/pull/28, https://github.com/jokade/angulate2/pull/27, https://github.com/jokade/angulate2/pull/26 should get angulate2 up to date enough to support all of the angular tutorial app except the Http stuff in the last section (although that could be done using js.Dynamic now).

@gregghz I cloned from your project but its not working, I have logged an issue here https://github.com/gregghz/angulate2-play-example/issues/1


YARN-11303. Upgrade jquery ui to 1.13.2 to mitigate CVE-2022-31160

Description of PR
Upgrade jquery ui to 1.13.2 to mitigate CVE-2022-31160 for branch-3.3
JIRA - YARN-11303
cherry-picked - https://github.com/apache/hadoop/commit/a134628d1b2e4d01e5ad9b5b4ca1ff0d7cb75402
For code changes:

[X] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
[ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 42s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+0 :ok:
detsecrets
0m  0s

detect-secrets was not available.

+0 :ok:
xmllint
0m  0s

xmllint was not available.

+0 :ok:
jshint
0m  0s

jshint was not available.

+1 :green_heart:
@author
0m  1s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m  0s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ branch-3.3 Compile Tests _

+1 :green_heart:
mvninstall
37m  9s

branch-3.3 passed

+1 :green_heart:
compile
0m 58s

branch-3.3 passed

+1 :green_heart:
checkstyle
0m 48s

branch-3.3 passed

+1 :green_heart:
mvnsite
1m  2s

branch-3.3 passed

+1 :green_heart:
javadoc
1m 11s

branch-3.3 passed

+1 :green_heart:
spotbugs
2m 23s

branch-3.3 passed

+1 :green_heart:
shadedclient
26m 46s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 47s

the patch passed

+1 :green_heart:
compile
0m 44s

the patch passed

+1 :green_heart:
javac
0m 44s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
0m 30s

the patch passed

+1 :green_heart:
mvnsite
0m 47s

the patch passed

+1 :green_heart:
javadoc
0m 49s

the patch passed

+1 :green_heart:
spotbugs
2m  6s

the patch passed

+1 :green_heart:
shadedclient
25m 26s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
4m 54s

hadoop-yarn-common in the patch passed.

+1 :green_heart:
asflicense
0m 46s

The patch does not generate ASF License warnings.

106m 49s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4930/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/4930

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle jshint

uname
Linux 3d5b36f7e1e0 4.15.0-191-generic #202-Ubuntu SMP Thu Aug 4 01:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
branch-3.3 / 6bdfa9035719a188f78a8a7e9eda5cb177fc3042

Default Java
Private Build-1.8.0_342-8u342-b07-0ubuntu1~18.04-b07

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4930/1/testReport/

Max. process+thread count
756 (vs. ulimit of 5500)

modules
C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4930/1/console

versions
git=2.17.1 maven=3.6.0 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.


Can’t mention people from Minecraft

I have the setting on for mentions but it doesn’t work I’m not sure if I’m understanding it correctly or if there is a specific syntax I have to do I have I have tried @DiscordUser and @MinecraftUser both didn’t work
Again not sure if this is a bug or if I’m doing it incorrectly

Thank You! I got it Working!
👍

Finally added this to the documentation :)
https://sdlink.fdd-docs.com/features/client-mentions/


where is " [LSEP]" located in?

When running the command of "Model Evaluation",my generated resulet only  contains "".  Could you help me find  the relevant code about " [LSEP]".Thank you very much.

Hi, I used the '[unused5]' token to represent '[LSEP]' in BERT dictionary, hence the id of '[LSEP]' should be "5" in the model.
This modification don't need code change in model architecture, I directly modified data file to construct the training data.
However, it is required to distinguish the position of the '[LSEP]' token during inference stage, this part of code is in the file  "src/models/predictor.py".

Hi, thanks for asking!
My implementation is pretty personal and perhaps not elegant enough.
For the NCLS+MS scenario, since Presumm used the sharded_compute_loss trick and it's hard to modify it, I directly concat the two outputs of the monolingual decoder and the cross-lingual decoder into one tensor. This part of code is in L291 model_builder.py (produce the monolingual output), and L271 in trainer.py (concatenate the outputs).
For the MCLAS loss, the output is S^A + S^B, the ground truth label is also S^A + S^B, so calculating the normal NLLloss between them is just fine.
Hope this can help you!


feat: support optimization.removeEmptyChunks config

The optimization.removeEmptyChunks config is documented but not implemented, this PR adds the implementation.
https://www.rspack.dev/config/optimization.html#optimizationremoveemptychunks

Summary

🤖 Generated by Copilot at 0c942bb
This pull request adds a new optimization option, remove_empty_chunks, to the rspack tool and its related crates. This option allows the user to control whether empty chunks are removed from the output bundle or not. It updates the configuration file parser, schema, adapter, and defaults, as well as the core and testing crates, and the sass loader test fixture.

Walkthrough

🤖 Generated by Copilot at 0c942bb

Add remove_empty_chunks option to control whether empty chunks are removed by the plugin (link, link, link, link, link, link, link, link)
Push RemoveEmptyChunksPlugin to plugins array only if remove_empty_chunks is true in options/mod.rs (link)
Set remove_empty_chunks to true in test fixture for rspack_loader_sass in fixtures.rs (link)
Add remove_empty_chunks to TestConfig and RawOptimization structs for rspack_testing in test_config.rs (link, link)

should update schema.js too

should update schema.js too

Yes, it is already updated:
https://github.com/web-infra-dev/rspack/pull/3076/files#diff-d7e2c50a4845569f35f387513dc5a6e542e9d5dde107294fd55c5ff4e8a72c88R852


Fix Kafka Indexing task pause forever if no events in taskDuration (#5656)

If the endOffset is same as startOffset, still let the task resume instead of returning
endOffsets early which causes the tasks to pause forever and ultimately fail on timeout

@surekhasaharan The test failure seems legit:
testIncrementalHandOff[isIncrementalHandoffSupported = true](io.druid.indexing.kafka.KafkaIndexTaskTest)  Time elapsed: 2.147 sec  <<< FAILURE!
java.lang.AssertionError: expected:<SUCCESS> but was:<FAILED>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at io.druid.indexing.kafka.KafkaIndexTaskTest.testIncrementalHandOff(KafkaIndexTaskTest.java:517)

All tests in KafkaIndexTaskTest seem to pass locally.

@surekhasaharan Ah okay cool - I restarted it and it passed.


Fix code style

The delegates are properties, not methods, so they must be accessed
using dot notation.

I signed it!

Thanks!

This needs to be updated in the documentation too.


add artifact signing

This resolves #28

In order to verify that the signing artifacts make it into sonatype, I'm going to force this through myself.


istioctl get multitypes resoures

make istioctl can get multitypes resoures
for examples:
istioctl get gateway,destinationrule
----
DESTINATION-RULE NAME   HOST                                             SUBSETS   NAMESPACE      AGE
istio-policy            istio-policy.istio-system.svc.cluster.local                istio-system   2h
istio-telemetry         istio-telemetry.istio-system.svc.cluster.local             istio-system   2h

GATEWAY NAME                      HOSTS     NAMESPACE      AGE
istio-autogenerated-k8s-ingress   *         istio-system   2h

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: fisherxu
If they are not already assigned, you can assign the PR to them by writing /assign @fisherxu in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

istioctl/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Hi @knightXun. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@stewart-yu can you trigger the rest of tests for me？

istioctl {create,delete,replace,get} commands have been deprecated. We shouldn't add any new features at this point.

/hold

istioctl {create,delete,replace,get} commands have been deprecated. We shouldn't add any new features at this point.

+1
@knightXun If you will, can add comments in head of file like  Please don't make effort to add new features here. :)

@fisherxu ok, i agree.


Crash when entering ".00" in number input

Describe the bug
Received a bug report that when entering income, if you put $5000.00 (with decimals,) you get an error, but entering $5000 without decimals was fine
To Reproduce
Steps to reproduce the behavior:

Start an application
Enter income with a decimal (i.e. $5000.000)
See error

Expected behavior
No error message when using decimanls
Screenshots

Reproducing / comments:

Creating a new program that has a number question

Try 500 => no problem

Try 500. => no problem, saved as 500

Try 500.1 => form can't be submitted, error message shown saying "Please enter a valid value -- nearest are 500 and 501"

Try 500.0 => get error

Try 500.00 => same thing

So we handle every floating-point value besides .0, .00, .000, etc. just fine. We only run into trouble with someone enters these zeroes.  My guess is that our frontend validation code sees that the inputted value is exactly equal to an integer and therefore allows it, but our backend tries parsing these things and fails because it sees that it's formatted as a float.

If anyone is working on this, please let me know. Planning to take a look today.

Testing:

Create new program with a number input
Publish program
Log in as guest applicant
Try entering some numbers and seeing what happens

32: ok
32.5: anything after the decimal point is auto-removed from the input field
32.: ok (saved as plain 32)
-32: negative number input not allowed (that should be OK, nobody needs to put in a negative number)
1,234: comma auto-removed, which is ok
3e2: the e auto-deletes everything in the field!
53-: the - auto-deletes everything in the field!

This bug is fixed but I'll raise another one for the e and - wipings. That is probably due to a quirk of parseInt().


@privateinclude@ not defined in cups-directories.m4 file

We are using @privateinclude@ in makedefs.in file for creating makedefs file but its not defined there. So upon generating Makedefs file we are getting privateinclude	=	@privateinclude@ on line no 218, which I guess is a weird behaviour.
Also on line no 239 we have PRIVATEINCLUDE	=	$(BUILDROOT<EMAIL_ADDRESS>I guess this is a typo. Perhaps right side PRIVATEINCLUDE must be lowercase.
Do correct me if I am missing out something.
Thanks

I'm dropping the private include functionality - it was used at Apple to allow some developers to access private APIs (that change randomly) but that isn't a good way forward for OpenPrinting. I just forgot to remove the private includes.

[master 40ca30488] Remove private include functionality (Issue #119)


Running multiple instances of CDP with headless-shell

First of all, great package! I was using PhantomJS and getting random issues, its good to find an alternative.
The error i'm running into looks like this could not create handler for 2a6cb825-dd55-49d4-bfbb-d5d4d8ac667b (``): malformed ws or wss URL. This could be from my lack of understanding the package, but I have put in some time trying to fix this, and I can't figure it out. I'm using the headless shell example and the docker headless-chrome instance. Here's what my code looks like, and keep in mind this is getting called multiple times and fails on cdp.New inside of AddTarget for every one after the first:
This creates my cdp instance. (context is declared above)
func createHeadless() *cdp.CDP {
		cl := client.New()
		tgts := cl.WatchPageTargets(ctxt)
		// create chrome
		c, err := cdp.New(ctxt, cdp.WithTargets(tgts))
		if err != nil {
			log.Fatal(err)
		}
		return c
}

this is where it is used.
func (batchReport BatchReportInfo) callHeadless(path string, token string) string {
	lock.Lock()
	defer lock.Unlock()
	c := createHeadless()
	// run task list
	var res string
	err := c.Run(ctxt, batchReport.getReportTasks(path, &res, token))

	return res
}

I'm not really clear why you're trying to instantiate the targets directly? Sure the WatchPageTargets API is available to use, but if you haven't read the code closely, I would not suggest using that. The reason that API is public is because client.Target is an interface, so that it is possible to use the CDP type with non chromedp/client based Targets. It looks like you're using the default client / path, so why not just use chromedp.New()? Are you trying to use this with something other than Chrome?

It actually works great with chrome when I'm using it on Windows without targets. The issue is that I need to run with Amazon linux so I can't actually get chrome. If you have any solution that would work with Amazon linux that can be called more than once that would solve my problem. I appriciate the quick feedback

Thanks for the help, for anyone that has amazon linux that was having trouble with this and was trying to use the precompiled headless shell with targets, don't. Instead I just got chrome 58 on my machine (since chrome 59 and greater is not supported on CentOS derivatives) and used chromedp.New() like was suggested above.


Change "path" parameter type to take ReadonlyArray<string> instead of string[]

This allows callers to pass a read-only version of an array path to set/push/...
This is okay because all these methods don't mutate the path parameter (only call the immutable slice() operation).
Further note that the ReadonlyArray<T> type is supported since TS 2.0 (2016).

Coverage remained the same at 98.982% when pulling 431ccda0ff6bedf62e515de69e7caf23680a4545 on ulrichb:ReadonlyPathArray into ed50e9ca8ca69c57ba4f43a5b1d1b3b081f77e21 on mariocasciaro:master.

Thanks

Thanks for merging!


44 fix routing rules

This is a open branch on upstream. Do we need this or should we work on it @DasSkelett ?

Given that the diff is pretty unusable because the branch is heavily outdated, how about you go hunt down the origin of the branch and what the commits were supposed to change? Based on that we can decide whether we need it, and whether to go through the effort of rebasing the commits and fixing conflicts, or just to just rewrite it from scratch.


CORS issue with client-side usage (header ‘user-agent’ is not allowed)

Hi,
I'm trying to use this library on a client-side project. I've followed the Client Side guide and white-listed my domain, however, I'm getting the following CORS error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://logs.logdna.com/logs/ingest?now=xxxxxxxxxx&hostname=xxx.xxx.xxx&mac=&ip=&tags=. (Reason: header ‘user-agent’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).
The user agent included in the request headers is @logdna/logger/1.3.2.
Is there something I'm missing?
Thanks a lot

Hi, thanks for notifying us.  A fix will be up shortly.

We will get this fix into the next release cycle. I'm reopening this issue until that is complete. Stay tuned. Thanks.

The server-side fix for this has been deployed.  Please check again to see if it works for you now.  Thanks!

Hi Darin,
I can confirm it is working now.
Thanks a lot!


ArgumentError :time_zone_not_found with native DateTime function

Steps to reproduce
Environment:

Elixir v1.10.3-otp-22
Timex 3.7.5
tzdata 1.1.0

Simple test case to reproduce:
Calendar.put_time_zone_database(Tzdata.TimeZoneDatabase)
dt = Timex.parse!("2021-04-22T04:56:00-04:00", "{ISO:Extended}")
DateTime.add(dt, 10)

     ** (ArgumentError) cannot add 10 second to #DateTime<2021-04-22 04:56:00-04:00 -04 Etc/UTC-4> (with time zone database Tzdata.TimeZoneDatabase), reason: :time_zone_not_found
     code: assert DateTime.add(dt, 10)
     stacktrace:
       (elixir 1.10.3) lib/calendar/datetime.ex:1076: DateTime.add/4
       test/engine/scheduled_headways_test.exs:423: (test)

If I inspect the Map.from_struct(dt) I see:
%{
  calendar: Calendar.ISO,
  day: 22,
  hour: 4,
  microsecond: {0, 0},
  minute: 56,
  month: 4,
  second: 0,
  std_offset: 0,
  time_zone: "Etc/UTC-4",
  utc_offset: -14400,
  year: 2021,
  zone_abbr: "-04"
}

It seems related to #645 but is still occurring on Timex 3.7.5. Unlike #663 there's no trailing whitespace on the time zone.
I believe the issue is that the time zone is parsed as Etc/UTC-4, which is not a valid timezone according to the tzdata DB that Timex uses. I see that my input string has -04:00 at the end. I would expect the time zone to be Etc/UTC and the utc_offset to be -14400 (as it is).
I'm aware that Timex has a shift function that does the same as my DateTime.add here, and that function does work, However, our large codebase with multiple developers has accrued a mix of Timex and native DateTime functions. I would expect that they should interoperate through the defined DateTime.t() interface and shared timezone database.
Similarly, it looks like this is a problem only when using the TzData.TimeZoneDatabase. If I set it to Timex.Timezone.Database then the DateTime.add/2 works.
So I guess the question is how interoperable Timex tries to be with the ecosystem. If you only support staying with "Timex land" and this is working as intended, feel free to close the issue, and we can work around it.

Looking into this more, I think per the docs an Elixir Calendar.TimeZoneDatabase is supposed to work with Calendar.time_zone() which is defined as:

The time zone ID according to the IANA tz database (for example, Europe/Zurich)

Pulling up the latest IANA data, Etc/UTC-4 is not a valid time zone ID, but Etc/GMT-4 is, and in fact, if I update my datetime from above:
dt2 = %{dt | time_zone: "Etc/GMT-4"}
DateTime.add(dt2, 10)
# => works

then the native functions work with the TzData.TimeZoneDatabase again.

@losvedir The problem is the use of Calendar.put_time_zone_database/1, which overrides Timex's timezone database which understands an expanded set of timezones:
# Without
iex> dt = Timex.parse!("2021-04-22T04:56:00-04:00", "{ISO:Extended}")
#DateTime<2021-04-22 04:56:00-04:00 -04 Etc/UTC-4>
...> DateTime.add(dt, 10)
#DateTime<2021-04-22 04:56:10-04:00 -04 Etc/UTC-4>

# With
iex> Calendar.put_time_zone_database(Tzdata.TimeZoneDatabase)
:ok
...> dt = Timex.parse!("2021-04-22T04:56:00-04:00", "{ISO:Extended}")
#DateTime<2021-04-22 04:56:00-04:00 -04 Etc/UTC-4>
...> DateTime.add(dt, 10)
** (ArgumentError) cannot add 10 second to #DateTime<2021-04-22 04:56:00-04:00 -04 Etc/UTC-4> (with time zone database Tzdata.TimeZoneDatabase), reason: :time_zone_not_found
    (elixir 1.12.1) lib/calendar/datetime.ex:1391: DateTime.add/4

If you use the following, you can use Timex's instead, which will do the correct thing (even with libraries not aware of Timex):
iex(7)> Calendar.put_time_zone_database(Timex.Timezone.Database)
:ok
iex(8)> dt = Timex.parse!("2021-04-22T04:56:00-04:00", "{ISO:Extended}")
#DateTime<2021-04-22 04:56:00-04:00 -04 Etc/UTC-4>
iex(9)> DateTime.add(dt, 10)
#DateTime<2021-04-22 04:56:10-04:00 -04 Etc/UTC-4>
iex(10)>


[x264] build failure

Host Environment

OS: Mac
Compiler: Apple clang version 13.0.0 (clang-13<IP_ADDRESS>)

To Reproduce
Steps to reproduce the behavior:
./vcpkg install
{
  "name": "test",
  "version-string": "0.0.1",
  "dependencies": [
    {
      "name": "ffmpeg",
      "default-features": true,
      "features": [
        "x264"
      ]
    }
  ]
}

Failure logs
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:128 (message):
    Command failed: /bin/bash -c "V=1 ./../src/f21da01154-d285e80d59.clean/configure  \"--enable-strip\" \"--disable-lavf\" \"--disable-swscale\" \"--disable-avs\" \"--disable-ffms\" \"--disable-gpac\" \"--disable-lsmash\" \"--enable-debug\" \"--disable-silent-rules\" \"--verbose\" \"--disable-shared\" \"--enable-static\" \"--prefix=/Users/xxx/yyy/cmake-build-debug/vcpkg_installed/arm64-osx/debug\""
    Working Directory: /Users/xxx/yyy/third_party/vcpkg/buildtrees/x264/arm64-osx-dbg
    Error code: 126
    See logs for more information:
      /Users/xxx/yyy/third_party/vcpkg/buildtrees/x264/config-arm64-osx-dbg-err.log

Additional context
config-arm64-osx-dbg-err.log

Error message: /bin/bash: ./../src/f21da01154-d285e80d59.clean/configure: Permission denied. please check the permission.

$ ls -lh configure
-rw-r--r--  1 dulongshan  staff    53K Apr  2 14:14 configure

The permission is incorrect, because it is not executable.

The file permission should be chanaged to be executable when packaging

This file is in the tar. I cannot modify it. Hope its permission can be change when packaging

The portfile could change the bits with file(CHMOD ...).

@Adela0814 I have tried to change the permission of configure with file(CHMOD ...) and it can be installed on Mac M1 now.
file(CHMOD "${SOURCE_PATH}/configure" FILE_PERMISSIONS
    OWNER_READ OWNER_WRITE OWNER_EXECUTE
    GROUP_READ
    WORLD_READ
)

I assume this was a purely local issue. I don't see this elsewhere (linux, x64-osx).

I have digged into this issue to some extent, and find that the permission of the file configure is changed when applied the patch of ports/x264/uwp-cflags.patch in function z_vcpkg_apply_patches. The function calling chain is vcpkg_from_github -> vcpkg_extract_source_archive_ex -> vcpkg_extract_source_archive -> z_vcpkg_apply_patches. In z_vcpkg_apply_patches, for every path the function vcpkg_execute_in_download_mode will be called with the following parameter:
COMMAND "${GIT}" -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply "${absolute_patch}" --ignore-whitespace --whitespace=nowarn --verbose

which for this x264 port is:
 git -c core.longpaths=true -c core.autocrlf=false --work-tree=. --git-dir=.git apply ~/Work/opensource/CodecLabs/QCello/third_party/vcpkg/ports/x264/uwp-cflags.patch --ignore-whitespace --whitespace=nowarn --verbose

After this command is applied, the permission of the file configure is changed from 755 to 644.
And with some expermients, I fond that it is related to the parameters "--work-tree=." and "--git-dir=.git". If remove these two parameters and rerun it again, the patch can be applied successifully and keeps the permission of the file configure unchanged:
 git -c core.longpaths=true -c core.autocrlf=false apply ~/Work/opensource/CodecLabs/QCello/third_party/vcpkg/ports/x264/uwp-cflags.patch --ignore-whitespace --whitespace=nowarn --verbose

I have read the manual of git and googled it, but cannot find the reason behand it or solution to it.
Hope this additional information can help to resolve this issue.

That's really interesting. I still think it is a local issue because the patch is applied in the same way in vcpkg CI, and in our local machines, without problem. Which git is executed on your machine? Maybe it is some wrapper?

Any update?

Any update?

You closed this issue & now you are still having issues?

I deleted PATCHES part of x264/portfile.cmake mannually, so I can install x264. But it is just a workaround. This issue still exists.

vcpkg@VCPKGMM-12 vcpkg % sw_vers
ProductName:    macOS
ProductVersion: 11.5.2
BuildVersion:   20G95

I have not reproduced your issue, the environment is as above; and I think this is a local issue, because nothing similar to yours has occurred.
Sorry, since there is no new progress on this issue for more than 3 months and no feedback from other users, I will close this issue, sorry again.


Use best practices in i18n

I applaud your attempt at internationalizing OpenRefine, however you did not read the manual. As you know other languages have their own grammar and using the English grammar on all languages is obviously not going to work:
https://github.com/OpenRefine/OpenRefine/blob/e5fdf48680a6f810c84706671344dc93d9a4fb75/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js#L245
The jquery.i18n library has a lot of awesome features inherited from gettext such as string interpolation (and even custom plurals). This is not the only location in the code where messages are made up from pieces using concatenation, please use interpolation instead so that languages that use a different word order don't look broken.
Other example:
https://github.com/OpenRefine/OpenRefine/blob/e5fdf48680a6f810c84706671344dc93d9a4fb75/main/webapp/modules/core/scripts/preferences.js#L86
Please just use a construct like:
if (window.confirm($.i18n('confirm-delete-key', key))) {

It also seems that you added sections in your translation JSON, placing JSON objects where messages should be, which is probably going to break all the machinery (and is responsible for the awkward i18n(...)[...]). Please read library's manuals or at least their repository's README before proceeding.

@remram44 I completely agree! Pull requests are more than welcome.

Fixing this would mean all translation files have to be adapted (though I suspect the program is not very usable in non-English locales anyway), so a commitment from the project leads is necessary before work can happen here.

@remram44 The project leads (if there is such a thing) do not master all the languages that we currently support, so we cannot fix these translations ourselves… So I don't really see what you mean! What "commitment from project leads" do you expect? The people who wrote the code that you quoted are not active in OpenRefine anymore.
Feel free to invalidate existing translations, people will go to Weblate to fix them if they use the translation.

Feel free to invalidate existing translations, people will go to Weblate to fix them if they use the translation.

Sounds good! I just don't want to do work to then hear that "that would break translations" and have the patch rejected. I will see if I can do that but I'm short on time at the moment, so if somebody else wants to grab this go ahead.

It doesn't look like you are using jquery.i18n (from wikipedia) but recurser/jquery-i18n. Commit is 817c6cc8d4468c5bf8e776cbe2f384385e74bf69, doesn't mention the source.
Furthermore, although the whole source is reproduced, no attribution is done to Dave Perrett, the author; this violates the terms of the MIT license (quite a feat...)

@remram44 thanks for noting the missing licence - now submitted a PR to add this in and correct this oversight

@remram44 Thanks for the suggestion. Just one question, do you see any drawback of the form $.i18n._('core-index')["delete-key"] except the complexity

It is a bit long to type, but the issue here is that this returns a single string, and you get no string interpolation or custom plural machinery, necessary for proper i18n.
For example this is problematic:
https://github.com/OpenRefine/OpenRefine/blob/e5fdf48680a6f810c84706671344dc93d9a4fb75/main/webapp/modules/core/scripts/dialogs/clustering-dialog.js#L246
Using jquery.i18n, gettext or another state-of-the-art i18n library, you do $.i18n('core-clusters-filtered', clusters.length, this._clusters.length) or similar instead of concatenations, allowing the translator to see the full sentence in one go, reorder the inserted values if appropriate, and properly pluralize words in the translation.


Fix en-us translation

Good catch! I think I changed that to test sending diacritical characters to Telegram and forgot to revert before checking in the code.


allow dots in projects and tags

reference to https://github.com/DavidBadura/doThings/issues/37

should I also add some tests for tags including dots?

@DavidBadura done

thank you!


Support deserialising user classes

We encountered the same issue #3 as we have few services where we need to keep custom POJO classes in the session to fix it we followed steps mentioned #3.

Hi - Can you please let me if you have any update on this pull request?

Hi, this seems to work for Tomcat 7 but doesn't for Tomcat 8. Just FYI.

@rama78 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


Modlishka reverse proxy like

can you add a feature like https://github.com/drk1wi/Modlishka that reverse proxy a website and in phishlets we have to put only the input id to be captured?
or even better in command line arg
that will be a great feature

What ID? Can you post more details and some examples?

in evilginx capturing creds is like this in conf file:
credentials:
username:
key: 'email'
search: '(.)'
type: 'post'
password:
key: 'password'
search: '(.)'
type: 'post'
we have to set the input name and a general regex to capture it like '(.*)'
it will be more easy if that will be the same here and with command line arg and in conf file if you can do it without the base64 encoding of corse.
and it will be better of you use xpath insteade of regex because it is more easy


Admin: Scaffolding for metrics project integration for autoscaling

This is a prototype PR that makes the admin service capable of querying custom APIs on the https://github.com/rilldata/rill-cloud-metrics project.
This enables dogfooding Rill for various analytics use cases, such as autoscaling, health checks, quota enforcement, usage-based billing, etc.
Setting a metrics project is optional. If not set, the admin service will still work (to avoid circular dependencies!).
You can provide a metrics project by setting the following environment variable:
RILL_ADMIN_METRICS_PROJECT=rilldata/internal-rill-cloud-metrics

The PR includes an initial integration with a prototype autoscaler-slots-recommendations custom API and adds scaffolding for an autoscaling job that leverages those recommendations (not actually implemented).
Todo for a complete autoscaling solution:

[ ] Implement autoscaling logic in admin/worker/run_autoscaler.go
[ ] Set the RILL_ADMIN_METRICS_PROJECT environment variable in our different environments
[ ] Test it :)

@nishantmonu51 @himadrisingh To keep pace with the sprint, I'm going to merge this PR and continue with the remaining TODOs in the code. It has already been peer-reviewed by @kaspersjo, and we both agree that it's a good start with the design and implementation. Planned next step:

// TODO: Add autoscaling logic based on the recommendation here.
// Consider checking rec.UpdatedOn to avoid making autoscaling decision on stale data!

Merge this PR to partially resolve https://github.com/rilldata/rill-private-issues/issues/143


Bindings error

Summary of Problem
I'm trying to read input from USB port in a Vue app.  Just requiring SerialPort causes the following error:
bindings.js?dfc1:29 Uncaught TypeError: Cannot read property 'modules' of undefined     at Object.eval (bindings.js?dfc1:29)     at eval (bindings.js:223)     at Object../node_modules/bindings/bindings.js (chunk-vendors.js:232)     at __webpack_require__ (app.js:786)     at fn (app.js:151)     at eval (linux.js?88eb:2)     at<EMAIL_ADDRESS>(chunk-vendors.js:65)     at __webpack_require__ (app.js:786)     at fn (app.js:151)     at Object.eval (index.js?c888:14)
Code to Reproduce the Issue
Spin up the default Vue CLI 'hello world' starter project and add the following to HelloWorld.vue:
const SerialPort = require('serialport')

I've also tried defining Serialport as an external module for webpack:
module.exports = {
    pluginOptions: {

        electronBuilder: {
            externals: ['serialport']
        }
    }
}

Versions, Operating System and Hardware

SerialPort@? - 8.0.7
Node.js v? - 10.13.0
Windows? Linux? Mac? - Mac
Hardware and chipset? (Prolific/FTDI/Other)

We're getting the same error on trying to use the usb module. Any ideas?

Why is this issue closed ? how did you resolved it  please ?

I re-initiated the project using https://github.com/SimulatedGREG/electron-vue, which apparently includes some kind of wizardry, and it worked beautifully.

@melissapott just for information: https://github.com/SimulatedGREG/electron-vue author is excluding all dependencies by adding them into externals
https://github.com/SimulatedGREG/electron-vue/blob/45a3e224e7bb8fc71909021ccfdcfec0f461f634/template/.electron-vue/webpack.main.config.js#L16

@melissapott just for information: https://github.com/SimulatedGREG/electron-vue author is excluding all dependencies by adding them into externals

shouldn't that be the same as adding serialport as external in vue.config.js as melissapott did?
module.exports = {
  pluginOptions: {
    electronBuilder: {
      externals: ['serialport']
    }
  }
}

I'm experiencing the same problem, I might go with that boilerplate from SimulatedGREG, but I rather fix it on my existing project to learn more about it.
any ideas?

shouldn't that be the same as adding serialport as external in vue.config.js as melissapott did?

No, it's not enough. To make it work you need to (documentation):

Set app.allowRendererProcessReuse = false.
Configure webpack to ignore import serialport from 'serialport' and make it available as an external dependency.
Set nodeIntegration = true & contextIsolation = false.

For 2 & 3 use vue.config.js:
const { IgnorePlugin } = require('webpack')

module.exports = {
  pluginOptions: {
    plugins: [
      new IgnorePlugin({
        resourceRegExp: /serialport/
      })
    ],
    electronBuilder: {
      nodeIntegration: true,
      externals: [
        'serialport'
      ]
    }
  }
}

shouldn't that be the same as adding serialport as external in vue.config.js as melissapott did?

No, it's not enough. To make it work you need to (documentation):

Set app.allowRendererProcessReuse = false.
Configure webpack to ignore import serialport from 'serialport' and make it available as an external dependency.
Set nodeIntegration = true & contextIsolation = false.

For 2 & 3 use vue.config.js:
const { IgnorePlugin } = require('webpack')

module.exports = {
  pluginOptions: {
    plugins: [
      new IgnorePlugin({
        resourceRegExp: /serialport/
      })
    ],
    electronBuilder: {
      nodeIntegration: true,
      externals: [
        'serialport'
      ]
    }
  }
}

This here is the best solutions and the only solution for me. Great!. You deserve my utmost appreciation. Thanks once again.


Doesn't work with Adafruit BMP390?

I'm trying to turn on/off the Adafruit BMP390 breakout using the power switch. Turning off works fine, but when I try to turn it on again, the microcontroller will hang. I repeated multiple times using Arduino Mega. Other sensors seem to work fine with the switch. Any ideas what the problem may be?

Hi @jvoermans ,
Curious... It sounds like the power is momentarily glitching or "browning out" when you turn the power switch on?
The BME390 itself draws very little current. Large capacitors can draw a big gulp of current as they charge up - the "in-rush". Looking at the Adafruit schematic, the board has a couple of 10uF capacitors. I wouldn't call those especially 'large'.
Maybe it has something to do with the 5V to 3.3V voltage regulation and level-shifting circuitry on the Adafruit boards? Have you tried a different Adafruit sensor (with the same voltage regulation and level-shifting circuitry)? Do you see the same thing?
Best wishes,
Paul

Closing… Please reopen if you need more help with this.

Hi @jvoermans ,
Apologies for the time this has taken... I believe I have seen the same issue - and have resolved it in version 1.0.1. Please see: https://github.com/sparkfun/SparkFun_Qwiic_Power_Switch_Arduino_Library/issues/1#issuecomment-2437286353
Best wishes,
Paul


docs: clarify CAS/CAD do not work on directories

As noted in #4075. There are numerous style issues with this document
but I don't want to go down that rabbit hole so this is an attempt at a
minimally invasive clarification.

Thanks for fixing this @jonboulle. LGTM!


User reports significant data usage by app

Any tips on how to limit data usage by the app? w/ latest update, it's using ~3 MB per trip for me

https://twitter.com/knothead02/status/827455676351787008

I can't reproduce this, unfortunately.