flutter linux desktop with embedded jvm loaded isn't rendering text with standard java.awt ui/ux

I have a java library that I'm trying to interface with from flutter on a Linux desktop. I using a native plugin to host the jvm. When doing some test cases with user-interfaces using the java.awt libraries I noticed the java based ui/ux aren't rendering any text (everything else seemingly works though).
Steps to Reproduce
This problem is reproducible.  I can reproduce this problem consistently. Here's minimum example: https://github.com/phr34k/flutter_jvm_interop - This is just a very basic quick example, it has a couple of (hard coded-) paths in linux/CMakeLists.txt and windows/CMakeLists.txt to resolve and link against the openjdk.
# The following line is optional due personal development environment - (redirect the display to xserver on windows)
export DISPLAY=$(grep nameserver /etc/resolv.conf | awk '{print $2}'):0.0
sudo apt install openjdk-16-jdk
git clone https://github.com/phr34k/flutter_jvm_interop
cd flutter_jvm_interop/example
export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.16.0-openjdk-amd64/lib/server:/usr/lib/jvm/java-1.16.0-openjdk-amd64/lib
/:$LD_LIBRARY_PATH
flutter -v run -d linux

I'm running this under wsl/2 with ubuntu. On Windows I setup an xserver on windows using vcxsrv, hence the display environment variable. This behavior is also there when I activate software rendering e.g. LIBGL_ALWAYS_SOFTWARE=1 flutter -v run -d linux
Expected results:

Screenshot from Linux - using the java code directly
Actual results:
To clarify the flutter side draws correctly, as expected. It's the java.awt test widgets aren't displaying/rendering fonts, like in the image below, the buttons and text-edit box aren't displaying their respective labels/placeholders.

Screenshot from Linux - using the java code indirectly from flutter
Environment:
$ flutter --version
Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision fb57da5f94 (3 weeks ago) • 2022-05-19 15:50:29 -0700
Engine • revision caaafc5604
Tools • Dart 2.17.1 • DevTools 2.12.2

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on Ubuntu 20.04.3 LTS <IP_ADDRESS>-microsoft-standard-WSL2, locale C.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

! Doctor found issues in 3 categories.

Personal attempts:

Verified that the user-interface in renders as expected outside of a flutter application host e.g. when the java code is run directly outside of flutter everything works as intended
Verified that system font's are available from the java side when embedded in flutter
Verified that manually loading font also doesn't render/display
Verified that other aspects of the user-interface are working as intended e.g. event handlers, button presses, typing (just the text isn't displayed/measured).
Attached loggers to that are outlined in this document https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/awt001.html but I didn't see anything of warning/error.

Additional:
To me it looks like it's some kind of presentation issue. It looks like java's font/text -rendering somehow is (silently) being affected by flutter. To my understanding the desktop version of flutter are using glfw for window handling and opengl context initialization. I have a hunch it could be related to this. As flutter initializes before java side.
I'm familiar with opengl but not experienced enough with java (awt) or the internals of flutter to fully comprehend what is causing this issue. I could understand that maybe there's some kind internal device/context conflict e.g. different versions or even abi changes- but I would have expected this to trigger errors/warnings/exceptions.
I'd love to get some pointers in general.  I have been stuck on this a couple of weeks without progress and haven't been able to find a solution in the respective dedicated communities. Is there somebody of the flutter team who could give me some additional insights in this problem?

Hi @phr34k, thanks for filing the issue. I tried to run the example and it seems to fail with below error. Let me know if I am missing anything. I am using flutter stable 3.0.2
mahesh@mahesh:~/Desktop/flutter_jvm_interop/example$ flutter run -d linux
Running "flutter pub get" in example...                             6.3s
Launching lib/main.dart on Linux in debug mode...
JVM_LIB-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/mahesh/Desktop/flutter_jvm_interop/example/linux/flutter/ephemeral/.plugin_symlinks/native_jvm/linux/JNI_INCLUDE_PATH
   used as include directory in directory /home/mahesh/Desktop/flutter_jvm_interop/example/linux/flutter/ephemeral/.plugin_symlinks/native_jvm/linux

Building Linux application...
Exception: Unable to generate build files

@maheshmnj judging by your console output it has some trouble finding your java installation https://github.com/phr34k/flutter_jvm_interop/blob/master/linux/CMakeLists.txt - like your paths are different from mine, easiest way would be changes the paths there.

Thanks for the info @phr34k, I am having trouble understanding where exactly JNI_INCLUDE_PATH  is pointing, I guessed it $JAVA_HOME does have lib/server, I tried  replacing
JNI_INCLUDE_PATH}/../lib/server

with
JAVA_HOME/lib/server

But looks like I am wrong considering JNI_INCLUDE_PATH is also being used further  here
https://github.com/phr34k/flutter_jvm_interop/blob/8c45b0d2633152f9e6edd348c15a3c4047675e8a/linux/CMakeLists.txt#L47

@maheshmnj so JNI_INCLUDE_PATH is pointing to the include directory in your java system where it can find jni.h, and JVM_LIB is pointing to directory where it can resolve the libjvm.so files. See below for shell output.
The folder that contains jni.h should have a platform specific folder called linux that's why both the include and linux folders are included.
# This is the root installation of java for me
$ ls /usr/lib/jvm/java-1.16.0-openjdk-amd64/
bin  conf  docs  include  jmods  legal  lib  man  release

# this is what JNI_INCLUDE_PATH  should resolve to (the folder with jni.h)
$ ls /usr/lib/jvm/java-1.16.0-openjdk-amd64/include/
classfile_constants.h  jawt.h  jdwpTransport.h  jni.h  jvmti.h  jvmticmlr.h  linux

# this is what JVM_LIB should resolve to (the folder with libjvm.so)
$ ls /usr/lib/jvm/java-1.16.0-openjdk-amd64/lib/server
classes.jsa  classes_nocoops.jsa  libjsig.so  libjvm.so

# this is the secondary path derived from JNI_INCLUDE_PATH
$ ls /usr/lib/jvm/java-1.16.0-openjdk-amd64/include/linux/
jawt_md.h  jni_md.h

# this is the secondary path derived from JVM_LIB
$ ls /usr/lib/jvm/java-1.16.0-openjdk-amd64/lib/
classlist   jfr           jvm.cfg-default    libawt_headless.so  libfontmanager.so  libj2pkcs11.so  libjawt.so    libjsig.so        libmanagement_agent.so  libnio.so     libsctp.so          modules               server
ct.sym      jrt-fs.jar    libatk-wrapper.so  libawt_xawt.so      libinstrument.so   libjaas.so      libjdwp.so    libjsound.so      libmanagement_ext.so    libprefs.so   libsplashscreen.so  psfont.properties.ja  src.zip
jar.binfmt  jspawnhelper  libattach.so       libdt_socket.so     libj2gss.so        libjava.so      libjimage.so  liblcms.so        libmlib_image.so        librmi.so     libverify.so        psfontj2d.properties  tzdb.dat
jexec       jvm.cfg       libawt.so          libextnet.so        libj2pcsc.so       libjavajpeg.so  libjli.so     libmanagement.so  libnet.so               libsaproc.so  libzip.so           security

Taking my local paths as a reference what you want cmake to do, is basically this:
target_include_directories(${PLUGIN_NAME} PRIVATE "/usr/lib/jvm/java-1.16.0-openjdk-amd64/include/;/usr/lib/jvm/java-1.16.0-openjdk-amd64/include/linux")
target_link_directories(${PLUGIN_NAME} PRIVATE "/usr/lib/jvm/java-1.16.0-openjdk-amd64/lib/server;/usr/lib/jvm/java-1.16.0-openjdk-amd64/lib")

Thanks for the info @phr34k,I finally managed to run the app, the include folder was missing, reinstalling the jdk fixed it.
Coming back to the original issue, I ran the app and I see the interop fetched the device info, Was this supposed to launch a native linux window?

I see some failure logs in the cosole.
mahesh@mahesh:~/Desktop/flutter_jvm_interop/example$ flutter run -d linux
Launching lib/main.dart on Linux in debug mode...
/usr/lib/jvm/java-1.11.0-openjdk-amd64/lib/server
Building Linux application...
started
Syncing files to device Linux...                                   113ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on Linux is available at: http://<IP_ADDRESS>:41987/PlQhTeikfcU=/
start
The Flutter DevTools debugger and profiler on Linux is available at: http://<IP_ADDRESS>:9100?uri=http://<IP_ADDRESS>:41987/PlQhTeikfcU=/
loading -Djava.class.path=/home/mahesh/Desktop/flutter_jvm_interop/example/../java
Failed to find class
getPlatformVersion

flutter doctor -v (Linux)
[✓] Flutter (Channel stable, 3.0.1, on Ubuntu 20.04.4 LTS 5.13.0-30-generic, locale en_GB.UTF-8)
    • Flutter version 3.0.1 at /home/mahesh/Development/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (5 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/mahesh/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio
    • Flutter plugin version 67.1.2
    • Dart plugin version 212.5744
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.66.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.4 LTS 5.13.0-30-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 100.0.4896.75

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Thanks for the info @phr34k, Upon running the app I received the same error, so I compiled and ran the native app using javac and I could see the native window running.

Then I rebuilt the flutter app using flutter run -d linux and I see the text getting rendered

flutter doctor -v (Linux)
[✓] Flutter (Channel stable, 3.0.1, on Ubuntu 20.04.4 LTS 5.13.0-30-generic, locale en_GB.UTF-8)
    • Flutter version 3.0.1 at /home/mahesh/Development/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (5 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/mahesh/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /home/mahesh/Downloads/android-studio-2<IP_ADDRESS>-linux/android-studio
    • Flutter plugin version 67.1.2
    • Dart plugin version 212.5744
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.66.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 20.04.4 LTS 5.13.0-30-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 100.0.4896.75

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@maheshmnj I think the only significant difference between our environments is that you run this on Ubuntu directly. I'm running flutter run -d linux on a wsl installation (ubuntu 20.04) and use x11 forwarding to display the ui on windows as I don't have a dedicated linux system.

Here's it side by side: left is java invoked directly and on the right with flutter run -d linux.
Both instances are using x11 forwarding. I repeated my tests against openjdk-11 (same version as you) to rule out it's due to different versions, and I used both VcXserv and xming to rule out an individual bad implementation of an x11-server. I'd try to see if you can recreate the issue in a similar setup, maybe try using an x11 forward to another machine.
What really stood out to me is that running under flutter somehow causes stringWidth to compute as 0. The focus rectangle (see highlights) is made me realize it can't measure the text for a reason. I don't really understand what measurement code does to get affected, most of the time they measure a string based on glyph/character information i.e. glyph advance, kerning.
What I could trace in java source code is that first time a user interface is initialized is that it tries to synchronize to some current state, and derive certain factors including scaling factors, and an affine transform. Some of the state looked to be local to java, but the some of the factors looked derived from the x11 context.
      JLabel j = new JLabel();
      java.awt.Font f = j.getFont();
      java.awt.FontMetrics m = j.getFontMetrics(f);
      System.out.println("font is " + f.toString());
      System.out.println("stringWidth of \"hello world\" " + String.valueOf(m.stringWidth("hello world")));

This is the code I used to measure the string with, but also individual character advances are all computed as zero.

Thanks for the info @phr34k, Unfortunately, I do not have another machine with wsl setup to investigate further. I am going to label this issue for further insights from the team.

@maheshmnj  Sure, thanks for all the help so far!
Just a thought. Trying out x11 forwarding though docker container might be worth a shot i.e. spin up a Ubuntu docker container to compile and run the code example and use x11 forwarding (e.g. export DISPLAY) to forward the ui over one of the internal eth interfaces to your desktop.
It's the closest analogy I can think of my wsl setup e.g. both are headless, both use x11 forwarding.  With some luck it might be similar enough to repro it that way.

@phr34k Thanks for letting us know that this might be an issue. Unfortunately, unless it's clear that Flutter is the cause, we really can't do much to fix this issue without a lot more information. (Desktop Triage)

@gspencergoog what type of additional information do you need/want for a triage? With the example I've provided I can reproduce this error on multiple machines e.g. both my desktop machine and laptop. I think there's enough context to establish flutter is the directly (or indirectly) the cause of the behavior.
Before I decided to report this, I've eliminated pretty much everything except for flutter. The clearest example is that m.stringWidth("hello world") from flutter or from java directly yield different results.  The java code embedded in flutter reports this always as 0, and doesn't actually give the correct results (pixels).
Were you able to establish a reproduction case using wsl or docker as an alternative? If not can you let me know if you need me to provide you more information?


InjectionToken Issue in lazy-maps-api-loader.d.ts

Hi Sebastian,
<EMAIL_ADDRESS>(1,10): Module '"node_modules/@angular/core/index"' has no exported member 'InjectionToken'.
i have installed agm
and I'm getting above error.
Please help.

@afrinnusrat Which Angular version are you using?

angular 2

after updating to angular 5.2.10 still the same issue persists.
and this error points at 'lazy-maps-api-loader.d.ts' present in XXX\node_modules@agm\core\services\maps-api-loader.
PFA Screen for the same.

Was this InjectionToken implemented in the latest version? Otherwise we can do like:
npm install @agm/core@

@afrinnusrat this is an angular version issue and not related to AGM. Please use https://cli.angular.io to setup a new project and then copy your sources from the app folder to your new project. Hope that helps

cheat man!


Require Python Interpreter

🎉 New feature
This PR refers to https://github.com/gazebosim/sdformat/pull/884 because the changes introduced there require a Python interpreter.
Checklist

[x] Signed all commits for DCO
[ ] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

this is a breaking change and would require sdformat14 to use gz-cmake4. I think it would be more straightforward to add a message(FATAL_ERROR "...") or message(SEND_ERROR "...") to the sdformat cmake code if Python3_EXECUTABLE is not found

this is a breaking change and would require sdformat14 to use gz-cmake4. I think it would be more straightforward to add a message(FATAL_ERROR "...") or message(SEND_ERROR "...") to the sdformat cmake code if Python3_EXECUTABLE is not found

+1 Please note that gz-cmake is not only being consumed by SDFormat but can be used from any other software out there so either we add an API option to make the REQUIRED optional or we leave up to the consumer of this module to check the return value and fail accordingly.
I'm with @scpeters, if you go with the second approach you don't need a new major release of gz-cmake (4.x does not have a timeframe yet).
Thanks for the contribution @Bi0T1N, I'm closing it but feel free to comment or reopen if you have more feedback.


BUG: The first object in splitTerminals will not run commands

In each terminal object, the first instance in splitTerminals will not insert or run commands, while the following instances will. If there is only one instance in splitTerminals, it will not run either as it is the first.
Also, I noticed if I add a second terminal under the Git Bash profile, it opens up in PowerShell.
Related to issue #27
"restoreTerminals.terminals": [
    {
        "profile": "Git Bash",
        "splitTerminals": [
            {
                "name": "Git"
            }
        ]
    },
    {
        "profile": "PowerShell",
        "splitTerminals": [
            {
                "name": "test",
                "commands": ["npm run test"],
                "shouldRunCommands": false
            },
            {
                "name": "Build",
                "commands": ["npm run build-dev"],
                "shouldRunCommands": false
            },
            {
                "name": "Start",
                "commands": ["npm run start-dev"],
                "shouldRunCommands": false
            }
        ]
    }
]

I can confirm having same issue with commands not being pasted or run in any first split. My configuration is the following:
"restoreTerminals.terminals": [
  {
    "profile": "Git Bash",
    "splitTerminals": [
      {
        "name": "api",
        "commands": ["cd api"]
      }
    ]
  },
  {
    "profile": "Git Bash",
    "splitTerminals": [
      {
        "name": "client",
        "commands": ["cd client"]
      }
    ]
  },
  {
    "profile": "Git Bash",
    "splitTerminals": [
      {
        "name": "docs",
        "commands": ["cd docs"]
      },
      {
        "name": "docs server",
        "commands": ["cd docs", "pipenv run mkdocs serve"],
        "shouldRunCommands": false
      }
    ]
  }
]

Only the docs server starts with pasted or executed commands (tried both), other terminals are just started blank regardless of the shouldRunCommands value or presence.


CHANGE: Change name to reflect that spreadsheet will also record blood pressure and pulse

Effective immediately, the name of this repository will be changed to reflect that the spreadsheet will also record blood pressure and pulse.

This repository shall be called "HealthRecordSpreadSheet".

Done. Closing Issue.


Eager load scores Dashboard and Scoreboard

When the scores are retrieved from the API, the JSON is parsed and stored in scores table.
To retrieve information from that table, the ideal scenario is to avoid N+1 queries (:smile:) by properly querying the table in the pages_controller to get nice Hash(es) that can be easily browsed for the stats we want to offer.

[x] Scoreboard page
[x] Dashboard stats
[ ] Dashboard calendar

To do:

List all the metrics we want to have
Write down the right Hash structure(s) considering all the stats we want
Build the appropriate queries

Database schema to date:

This was a valid issue for the 2021 edition. Future core revamps make this irrelevant.


no content for certain articles

[](https://www.scoopwhoop.com/ikea-my-son-ad/?ref=latest#.vb972dwi7)

[](http://newspaper-demo.herokuapp.com/articles/show?url_to_clean=https%3A%2F%2Fwww.scoopwhoop.com%2Fikea-my-son-ad%2F%3Fref%3Dlatest%23.vb972dwi7)

due to javascript


Add a link to useful-forks

The forks list page should have a button/link to a service that lists useful forks for the current project.
Feature location: https://github.com/sindresorhus/refined-github/network/members
Button URL: https://useful-forks.github.io?repository=sindresorhus/refined-github
This is a super easy feature, it just needs to create a link and position it somewhere on that page.
The button URL hasn't been implemented by https://github.com/useful-forks yet.

Simplified request from https://github.com/sindresorhus/refined-github/issues/3638

The button URL hasn't been implemented by https://github.com/useful-forks yet.

Done! :)
Try it out: https://useful-forks.github.io?repository=EsotericSoftware/kryonet

Feature location: https://github.com/sindresorhus/refined-github/network/members

You're making me wonder: maybe it could be a button positioned next to the Fork button all the time, instead of only within the Fork's page itself. Somewhere around there:

As I said previously, this is not something most people need most of the time, so it won't be added to every page on every repository. The forks list is where I'd expect this feature to be found, and maybe also: https://github.com/sindresorhus/refined-github/network
I'm imagining it in the top-right corner of each page (still not in the header) but exploration welcome

Okay, I might have some time to work on this. However, looking at the refined-github code-base is a bit daunting.
Can you point me toward a feature which would resemble what I'll be trying to achieve?

Something like this: https://github.com/sindresorhus/refined-github/blob/main/source/features/download-folder-button.tsx
Some context: The if is irrelevant in this case. GitHub change layout at some point so we still support the old one in some cases.

For the include: [ ... ], I can't seem to find a constant which points to the Insights -> Forks or Insights -> Network pages.
Am I the first one implementing a feature for those? If so, where/how should I add that constant?

You can add it inline for now. Before the PR is merged you can move it to https://github.com/fregante/github-url-detection
Refer to that module to see what those function look like.

You can add it inline for now.

You mean, like this?
void features.add(__filebasename, {
	init
});

I tried adding a console.log in the init function to see if that meant the feature would be activated everywhere, but it didn't seem to do much.
(Sorry for needing so much guidance.)

Make sure you’re also including that file in refined-github.ts and use import instead of require

use import instead of require

I tried that initially, but it would give me an error:

Any thoughts on this preliminary sneak-peek ?


Update the wiki (JavaScript Style Guide)

Since our conventions have changed, we should reflect this change onto the wiki page of javascript style guide.
Perhaps updating the content and/or referencing this repo.

Done. There has been added links in the wiki to this repo. Issue closed.


Add health and readiness endpoints.

Add standard go webserver with /healthz and /readyz endpoints. The port is changed from 80 to 8081 - default kubebuilder health port -- even if kubebuilder is not used, it is nice to have a standard default port IMO.
Addresses #16.
ON_HOLD: depends on #12 if we use webhooks then this PR is obsolete and standard controller manager can be used

while the situation with validation is unclear this can be merged and easily replaced with standard mgr health checks later.


Amount of fabric required calculator

Calculator Functions
This issue creates a calculator that uses an optimized method to calculate min amount of fabric required for a given set of garments, given the cutting frames.
Contribution Event
GSSOC22
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


[Memory Leak] StickyHeaderPositioner has uncleared GlobalLayoutListener

Hey there!
I'll start off with much fanfare and thanks for creating this lib. Tons of sticky libraries have come and gone, and to see this one be as successful and functional as it is already is awesome. Seriously, great stuff.
Anyway. I come with a leak report. It seems in StickyHeaderPositioner, the constructor has a new OnGlobalLayoutListener watching for visibility changes. Problem with that guy is that it's never unattached.
This doesn't seem too terrible; there's already an extended onAttachedToWindow in the StickyLayoutManager. Might be able to extend the onDetached counterpart and 'clean up' the Positioner's layout listener. If you're low on time what with the recent 0.5.0 release, I might be able to put together a PR if you've got a preferred way of handling things.
Thanks again for your time and the utility - have a good weekend!

Super late response--I'm sorry.
This didn't really cross my mind as I don't have a use case of removing a RecyclerView from a ViewGroup while continuing to use the ViewGroup.
If the RecyclerView has the same lifecycle as it's parent, this won't cause a leak (and even then, it will be just a temporary leak of the RecyclerView itself). The Context itself will never leak. Just wanted to clarify this for future readers (and give someone a chance to correct me if I'm wrong).
I'll be approving #90 after some minor changes to fix this.

Fixed by #90


Add record types and reduce shift/reduce conflicts.

Design decisions:

[ ] Parser should detect duplicate labels.
[ ] Syn.in turns the list into a dict.

Cool! I think that I remember you mentioning an idea before about trying to make sigma types a special case of this. I think that'd be cool, but I'll leave it up to you as to when to do that!
Do we know what the dynamics of hcom, coe should be for record types? (Probably it should be fairly straightforward based on sigma types, but I wasn't sure.)

@jonsterling Well, I intended the record types to be non-dependent. The only sharing part in my mind is the witnesses. The hcom and coe should be component-wise hcom and coe. @cangiuli

@favonia Ah, I see... Is the reason for non-dependent records that it's easier to get done now, or some other reason?
I'm ok with non-dependent records for now, but ultimately we would want to subsume them under a dependent record type.

@jonsterling Well, the fields in non-dependent ones can be reordered, but the ones in dependent ones cannot... once we decided the naming resolution convention then it is probably fine. Now my implementation is toward very extensional record types. We have to decide what to do with duplicate labels. By the way do you think the parser should detect duplicate labels?

@favonia The fields in a dependent record (witness) can certainly be re-ordered; it's only the type of a dependent record whose fields cannot be re-ordered.
I think that we shouldn't bother with trying to make the parser detect duplicate labels for now.

@jonsterling Maybe my question should be rephrased as "when should we report the error of duplicate fields?" Also I think a more reasonable way to do dependent records is to give up reordering altogether. It could be that a type mentioning x is equal to another type not mentioning x, and that our criterion would depend on which version you are using, which in my opinion is not so great.
I just tried Agda with duplicate labels. You can define such a type, but the projection and record{ } syntax is not really working...

@favonia

For duplicate field names, this could be part of the typing rule. I guess you could make it part of the parser, but it might be a little gnarly.

I don't understand what you're saying about reordering... There's no problem with having unordered maps as the program, and an ordered telescope as the type; this is because the dependency does not lie at all in the program, but in its type. (but maybe I am missing something important?)

@jonsterling Sorry I misread your previous post. Then I think the only corner case is when there are duplicate labels and you have to decide which one if they are allowed.
Alright I got a new idea---for non-dependent cases, how about allowing duplicate fields but require them to be equal?

@favonia Good question... We could allow duplicate fields in the way you suggest, but it seems like most cases of duplicated fields could be a mistake; do you have a use-case in mind?
I think the rules would be cleaner if we didn't have duplicate fields (consider how we would compute projections, if duplicate fields were possible!). So, maybe I'm coming around to your original idea, which is to rule it out in the parser.

@jonsterling With colons and another change in the syntax, there are no more parser conflicts. Now meta variables and custom operators share the same syntax.

Now maybe a special syntax for tuples and records... something like this?
(tuple [a -> 1] [b -> 2]) in (record [b -> int] [a -> int])
(! a (tuple [a -> 42])) = 42 in int

wow, amazing! Great job on fixing the parser. I'm so bad at parsers, as you no doubt can tell :)
Can you also look at the pretty printer and update anything that needs changing there? it is in pretty.sml I think. (Or, if you don't have time, I'm happy to do it!)

On Jul 6, 2017, at 12:55 PM, favonia (Sai-hong サイホン<EMAIL_ADDRESS>wrote:
@jonsterling With colons and another change in the syntax, there are no more parser conflicts. Now meta variables and custom operators share the same syntax.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

That looks good! My suggestions are as follows:

in the tuples, can we get rid of the arrows?
in the records, can we replace the arrows with colons?

looks fine anyway though.

On Jul 6, 2017, at 12:59 PM, favonia (Sai-hong サイホン<EMAIL_ADDRESS>wrote:
Now maybe a special syntax for tuples and records... something like this?
(tuple [a -> 1] [b -> 2]) in (record [b -> int] [a -> int])
(! a (tuple [a -> 42])) = 42 in int
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hmm. I am now wondering whether we should recycle the < x , y > notation. Actually, why do we want the middle comma at all? Maybe we could have <x y z w> or something like that.... like maybe the following would work?
<[a 1] [b 3]> in (* [b : int] [a : int])
(! a <[a 42]>) = 42 in int

@favonia I kind of prefer (tuple ...) for now, but maybe we can experiment in the future. My reasoning is that in the term language, I prefer to avoid a proliferation of different kinds of brackets, etc. But if in practice it seems a lot better, we could switch to it.

@jonsterling alright. there is still a question about why we want the comma at all, but I guess we can "fix" it in another PR.

@favonia the <t1,t2> notation is not part of the term language, but part of the tactic language. The tactic language doesn't use this sexpr discipline at the moment, so the comma makes sense there for now.
One day we may try to unify these notationally, but for now they are different.

@jonsterling It seems there was LANGLE term COMMA term RANGLE for term. Actually I am refactoring the grammar now and I can just remove the comma if we want...

@favonia Oh! I didn't realize that. I think that whole production can just be removed. I would like the witness for sigma types to use something like (pair m n) or maybe a special case of your tuples.

@jonsterling It turns out ,p is the only term that cannot be viewed as a tactic.

@jonsterling Since the entire term can almost be embedded into the tactic language, how about change ,p to 'p?

@favonia I'd rather leave ,p as-is, since there's an intuition that is being captured in a notation like this code:
`(pair ,x ,y)

@jonsterling Oh I meant maybe we can somehow completely blend exp into tac so that it would be (pair `x `y).

@favonia Ah, I see! I don't think I want to do at the moment that because terms and tactics are different sorts, and we would need to somehow insert implicit coercions somehow... For now, I think I prefer the distinction to be explicit, though maybe we will change our minds in the future 😄

@jonsterling Alright. Are you fine with the parser blending almost every term construct into the tactic language, then? I found some seemingly outdated code (probably because some copy-and-paste) and I hope it's more consistent now. However, I don't know the reason for the parser to recognize some forms of term as tactic, and so I don't know whether pouring almost everything into tactic is a good idea.

@favonia Generally, I'm fine merging things as far as you like within the parser so long as there is no ambiguity, since the sort checker takes care of the important stuff.
I think the reason things were separated the way they are was to avoid parsing conflicts/ambiguities, but since you've fixed that so beautifully, I see no problem with having these as merged as possible within the parser.

@jonsterling I am now running into a potential conflict, and thinking about it, perhaps we should change
hcom(...) [ ] [ ]

to
hcom(... [ ] [ ])

? The reason is that tuple [a 1] [a 2] m will probably be ambiguous; hcom is fine because of the equal sign.

@favonia Maybe we should change something, but I don't like the hcom(... [ ] [ ]); I'm trying to keep a coherent style of notation based on some extensions to sexprs...
What does (tuple [a 1] [a 2] m) mean? Doesn't every element need a label?

@jonsterling I mean that the expression
(a b c d tuple [e f] [g h] i j k)
can mean both
(a b c d (tuple [e f] [g h]) i j k)
and
(a b c d (tuple [e f]) ([g h] i) j k)

@favonia That would not be correct syntax, at least according to my intentions for how RedPRL's term notation is supposed to work. As I said before, it is based on sexprs, which means that the parentheses really are mandatory. Under that discipline, it is not ambiguous.
So, we should definitely not parse tuple ... as a term; only (tuple ...) should parse.

@jonsterling The additional parentheses on the second and the third lines are just to illustrate the problem. The issue is that (a tuple [b c] d) can be parsed as
(
  a
  tuple [b c]
  d
)

or
(
  a
  tuple
  [b c] d
)

@favonia Maybe I'm confused, but why are you using the word tuple here? Tuples only begin with a parenthesis.

Furthermore, I don't see how the first parse that you give is meaningful / correct. Certainly it does not represent a form of term that I am familiar with... I think I'm misunderstanding your examples.

Hmm. But tuple is not taking any expression arguments. Maybe I should say that if you want (tuple [b c]), then you might want to reconsider hcom(... [...] [...]) for consistency. This is actually why I brought up the issue about the hcom syntax.

Never mind I read the rules wrong.

So the hcom syntax is actually (hcom ... [...] [...]) and somehow I failed to read the rules. It seems to me that you want to change it? Or were you just correcting the typo hcom (...) where I put hcom outside the parentheses?

@favonia I'm having trouble parsing some of the comments 😉, but let me summarize how I think the syntax is (meant to be):
(hcom cap [tube1] [tube2] ...)

If it isn't like that now, then we should change it back to that; but if it is like that now, then that's fine 😄

Oops, I mean
    (hcom type cap [tube1] [tube2] ...)

But you get the idea

@jonsterling I'm stuck at writing out the eq rule for (! label x) and (! label y). I want to a new kind of MATCH which takes the "labelth" element which is not at a fixed position in ast.

@favonia Sorry for the delay in responding, I got sick unfortunately 😄
Could you write in "pseudo-paper-notation" the rule that you would like to have? (or show where you get stuck?) then I can more easily help.

 M = N in record{\vec{lbl_i -> ty_i}}
-----------------------------------------
 proj{lbl_i}(M) = proj{lbl_i}(N) in ty_i

This is similar to DProd.FstEq and DProd.SndEq, but I cannot write something like
val (goalTyA, holeTyA) = makeMatch (O.MONO O.DPROD, 0, holeTy, [], [])

because I do not know the position of lbl_i in \vec{lbl_i -> ty_i}.

@favonia Aha, I see what you're saying! 😄  It may be sensible to add a judgment for doing what you want, but another option would be to use the left/elim rule for record types.
If you want to add a judgment for this, analogous to MATCH, you are welcome to (if you think it will make the rules better behaved).

@jonsterling Hmm. I'm not so positive about how negative records should be...

@favonia I thought over it again, and I think that using the elim rule is too bureaucratic, so I like your idea of using this auxiliary judgment.


[snack-content] Split out code related to Snack project definitions into snack-content

Why
The Expo Snack server uses snack-sdk for some functions and type definitions, but it doesn't need client-side code like transports. I chose the name snack-content over snack-projects to avoid autocomplete conflicts with snack-proxies. Closes ENG-3910
Commit 1: Split out code into snack-content
Commit 2: Make snack-sdk use snack-content
Commit 3: GHA
How
The functions in sdk.ts and about half of the type definitions were moved from snack-sdk to a new package called snack-content, which is also a workspace package. I also changed the tsconfig target to ES2018 which assumes support for Object.assign and object rest spread syntax. GitHub is requiring ES2020, so ES2018 is relatively conservative for a developer-heavy userbase.
The public API functions copied over are: isModulePreloaded, getPreloadedModules, validateSDKVersion, getDeprecatedModule, getSupportedSDKVersions, isValidSemver, isFeatureSupported, standardizeDependencies. The public API types copied over are: SnackFile, SnackCodeFile, SnackAssetFile, SnackFiles, SnackDependencyVersions, SnackDependency, SnackDependencies, SnackMissingDependency, SnackMissingDependencies, SDKVersion, and SDKFeature.
The functions and types that moved to snack-content have been removed from snack-sdk, which now imports snack-content. There should be no API changes for snack-sdk except that it requires ES2018 (about four years old at this point).
Test Plan
Moved over the relevant unit tests from snack-sdk into snack-content. Added more unit tests for nearly full coverage. Unit tests for snack-content pass.

I'm working on updating the Dockerfiles. Using .dockerignore we can make it easier to copy workspace packages into the Docker image but we will still need to add a build step for each package.


Adjust Fabrication (I think that's the mod? I can't find the feature in the wiki for it though?) To enable hitting gaurdians with lightning to turn them into

@LlamaSageR thoughts on this? note the limited worldborder size, though we're expanding to 5k soonish

The change was added via Carpet. From testing, it appears none of them are enabled. Easily enabled though, can be done via command. There's a default file that can be added too, to automatically enable it on all worlds generated via the modpack. Seems that the rest of the Carpet changes also did not make it, so I'll see what I can do to fix that.

Fixed in #99


Low speed object tunneling

Low speed tunneling with godot-jolt. My setup is as follows:

C#
8000 1m*1m*1m falling cubes, managed by physics server
64m*8m*64m static body platform

I've attached a video and the minimal reproduction:
godot-jolt-tunneling.webm
godot-physics-benchmark-jolt-physics.zip

If you check Godot's Debugger output when the bodies start falling through the floor you'll see why:

Just bump up those limits in the project settings and things should work a lot better.


Remove note

Purpose of this pull request
This pull request (PR) removes a note about field order from this article, and adds a note that the name of the scheduled search will be the name of the signal:
https://help.sumologic.com/docs/alerts/scheduled-searches/generate-cse-signals/#scheduling-the-search
Issue number: #3047

Select the type of change:

[x] Minor Changes - Typos, formatting, slight revisions
[ ] Update Content - Revisions and updating sections
[ ] New Content - New features, sections, pages, tutorials
[ ] Site and Tools - Updates, maintenance, and new packages for the site, Gatsby, React, etc

Thanks, @kimsauce!


connection leaks

Hi,
In my usage, I'm delegating all database access to dropwizard-entitymanager and not managing database connectivity manually anywhere (I'm also using C3P0 for pooling) After running the app for a while, I saw a MySQLNonTransientConnectionException: Too many connections exceptions (log here: https://gist.github.com/bladecatcher/a297171f8fedbbadbcac50478fb91e79)
When I saw this for the first time, I realised that the mysql instance I was running could only accept a maximum of 66 connections (AWS RDS micro tier) and I had hibernate.c3p0.max_size set to 100. I then reduced the hibernate.c3p0.max_size to 10.
After running the new instance for a while, I now observe (upon taking a thread dump) that C3P0 hangs at
#2939 prio=5 os_prio=0 tid=0x00007f02e0086000 nid=0x5412 in Object.wait() [0x00007f02afcfa000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1414)
        at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:606)
        - locked <0x0000000083a8b600> (a com.mchange.v2.resourcepool.BasicResourcePool)
        at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:526)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:755)
        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:682)
        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
        at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:73)
        at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:386)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:84)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:109)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:227)
        at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:234)
        at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:214)
        at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:52)
        at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1525)
        at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:45)
        at com.scottescue.dropwizard.entitymanager.UnitOfWorkAspect.beginTransaction(UnitOfWorkAspect.java:90)
        at com.scottescue.dropwizard.entitymanager.UnitOfWorkAspect.beforeStart(UnitOfWorkAspect.java:47)
        at com.scottescue.dropwizard.entitymanager.UnitOfWorkAwareProxyFactory.lambda$create$0(UnitOfWorkAwareProxyFactory.java:81)
        at com.scottescue.dropwizard.entitymanager.UnitOfWorkAwareProxyFactory$$Lambda$33/2083925590.invoke(Unknown Source)

My hibernate configuration is as follows:
    hibernate.hbm2ddl.auto: validate
    hibernate.format_sql: true
    hibernate.use_sql_comments: true
    hibernate.dialect: org.hibernate.dialect.MySQLDialect
    hibernate.current_session_context_class: thread
    hibernate.cache_provider: org.hibernate.cache.NoCacheProvider
    hibernate.ejb.naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy
    hibernate.archive.autodetection: none

    hibernate.connection.provider_class: org.hibernate.connection.C3P0ConnectionProvider
    hibernate.connection.driver_class: com.mysql.jdbc.Driver

    hibernate.c3p0.max_size: 10
    hibernate.c3p0.min_size: 1
    hibernate.c3p0.acquire_increment: 1
    hibernate.c3p0.idle_test_period: 300
    hibernate.c3p0.max_statements: 0
    hibernate.c3p0.timeout: 3000

    hibernate.connection.isolation: 2
    hibernate.connection.url: <>
    hibernate.connection.username: <>
    hibernate.connection.password: <>

This seems to indicate a possible connection leak. Found this Stack Overflow link http://stackoverflow.com/questions/14105932/c3p0-hangs-in-awaitavailable-with-hibernate which discusses this error.

I've found something similar in one of my apps when running scheduled jobs that aren't triggered by a web request.
Are you using @UnitOfWork for transaction management?  Could you provide a simple example of how your app is using dropwizard-entitymanager?

Hello,
I just ran into a similar issue. I'm trying to multi thread queries therefore I'm using UnitOfWorkAwareProxyFactory to have access to an EntityManager on my runner threads. This leads to a connection leak. After debugging, it seems that the issue is because the afterEnd() method in UnitOfWorkAspect does not close the entityManager and therefore does not release the connection.
There is a comment indicating that the entityManager should not be closed in case the session is needed while serializing the response for lazy loading purposes. The reason why it does not leak on web requests is that the UnitOfWorkApplicationListener calls EntityManagerContext.unBindAll which closes all the entityManagers in the current thread context. UnitOfWorkAwareProxyFactory created proxies do not have the same behavior anf therefore never close the entityManagers.


pydgq_data.bin not found after pip3 install

When pydgq is installed under Python 3.6, both data files pydgq_data_27.bin (old, for Python 2.7) and pydgq_data_34.bin (compatible with 3.4 and later, tested also in 3.6) get installed under their own names, but the symlink (that should point to the correct version) fails to install.
Solution: drop Python 2.7 support in the next release, so we need only one universal data file for Python 3.x.
Workaround: meanwhile, go to your site-packages/pydgq in a terminal, and install the symlink manually. Assuming pydgq was installed with pip3 install pydgq --user under Python 3.6, the full path is ~/.local/lib/python3.6/site-packages/pydgq. Once there, ln -s pydgq_data_34.bin pydgq_data.bin. Or if using Windows, just copy the file.

May need to do this soon for an upcoming conference paper.
The new release could be 1.0, since pydgq is essentially feature-complete, works fine, and not much development is needed at the moment.


[Bug] Insomnia resolves .dev domains locally unless https:// is provided

Insomnia version 6.3.2
OS: Arch Linux (fully updated)
Details
Insomnia doesn't seem to understand .dev domains exist now and resolves locally unless an https:// is added at the beginning.
For example, hit vim.dev versus https://vim.dev
It is reasonable to assume this is actually default behavior (go local without http[s]://) but if you try to hit vim.org, it will not search locally, so I have to assume this is a bug.

Huh, it must have been. Everything works now. Sorry for bothering!


take over control not working when changing color temperature

Version 1.2.1
I have hue white ambiance bulbs setup with AL & take over control enabled.
When changing brightness of a certain bulb, it is added to the manual control list as expected.
When changing color temperature however (which also triggers a light.turn_on service call) it is not added to the manual control list hence AL changes it back after a few seconds.
I have 'debugged' this with Node red: the first service call is me manually changing the color temp, a couple of seconds later you can see AL is still updating the light.

This used to work and this problem arises because you send an update in Kelvin and Adaptive-lighting works with color_temp.
I believe that once https://github.com/basnijholt/adaptive-lighting/pull/375 is merged, it should work again.

Could you check whether 1.4.0 fixes the problem? https://github.com/basnijholt/adaptive-lighting/releases/tag/1.4.0

Just updated and tested, it sounds like it's working fine now.
(can see the manual_control attribute correctly updated when changing light temperature)
Thanks a lot :-)

Great! I’ll close this issue then.


Design Change to support CLF reader

All ops are currently private classes and any processing is using a generic interface. That’s a powerful design to enforce the use of op commonalities (i.e. by the optimization algorithms) and to hide the data behind a generic interface.
However, some ops have public a data public access. In the current design, the two LUTs already have a dedicated structure to keep the ‘raw’ data read from the file (refer to BuildFileOps() methods), and use it (without any copies) by the Ops (explaining the shared pointer). The CLF reader will extract a list of ops from a single file, so the code will need an equivalent of the LUT structures to hold all these data types (and avoid unnecessary copies). Following the current design, the CLF reader will need a data structure for the Matrix, Range, Lut1D, Inverse Lut1D, LUT 3D, and inverse LUT 3D.
Some coming operations (such as optimizations) require finer understanding of the op characteristics (is that a LUT? is that a half domain LUT?). That’s would only be possible by having a direct data access (read-only access is enough) from the op (i.e. not possible when using a generic interface).
To gain access to the Op data, two design changes could be done. One is to make public the existing ops (i.e. LogOp & Lut1DOp are public which removes the need of the LUT1D structure) and one to only make public the ‘raw’ data part of the existing ops (i.e. using the existing Lut1D, create a Log data structure/class). These two approaches have pros and cons.
For the CLF branch we propose to follow the current design by keeping private the ops and having a public data op structure/class. The approach enhances the current design while adding the new capabilities and it also avoids duplicated code between the transform and op classes. That’s clearly a long-term maintenance advantage.
Please let us know if you think the ‘make op public’ design is a better approach (i.e. change the current design).

I do think this approach is the most logical given the current constraints. What level of introspection an optimizer might need and what consitutes pubic vs private data will now fall on the library developers, as such, this is where concise documentation can help declare intent.

Here is the concrete example, I've added in the Op.h:
    // For example, one optimization is to remove from the color transformation
    // an identity Range (but still clamping) followed by any arbitrary LUT 1D
    // except if the LUT is a half domain one (i.e. the input domain is
    // all possible 16-bit floating-point values so there is not clamping).
    // It means that the methods Range::canCombineWith() and Range::combineWith()
    // have to question the LUT Op with a ‘not generic’ call (i.e. isInputHalfDomain()).

and what constitutes pubic vs private data will now fall on the library developer

The Op and OpData classes define pure virtual methods so it 'imposes' the implementation (i.e. where to add any specific behavior) restricting the library developer freedom.

Please let us know if you think the ‘make op public’ design is a better approach (i.e. change the current design).

'Making the Op internally public' would fix all the current limitations (e.g. from the optimization design to the code factorization between the transforms & the Ops). Any kind of Op's introspection would then be enabled (i.e. from OpOptimizers.cpp to XXOp::canCombineWith() & XXOp::combineWith()) and only one class will hold everything concerning an op type.
However, that's a major change to the library design explaining why we followed the existing design (i.e. Lut1D and Lut1DOp). Knowing the rationale behind the current design would help the final decision.
As the Op is currently doing so many different things (from GPU shader generation, CPU processing to optimization) delegating some parts to much more focused classes is a good software design. It helps 1) to avoid the 'God Class' anti-pattern (i.e. a class doing everything), and 2) to not have a 'several thousand lines' file.
The best solution would be to have all Ops being public, and delegate some behavior to specialized helper classes (for example: in the ops/xx directory, classes could be XXOp, XXOpData and XXOpCPU) depending on needs (i.e. OpData still exists to share code with transform classes) or on the number of lines to implement the Op (i.e. extract CPU path to reduce the number of lines if needed).


scout:import don't throwing errors when elastic return error (wrong format date or else)

Thanks for the feedback! Would you implement a minimal test case?

Unfortunately now there is absolutely no time. I encountered this “mistake” quite by accident.
If you specify an incorrect date format in the mapping. For example, like this:
'tags' => [
    'properties' => [
        'id' => [
            'type' => 'integer'
        ],
        'title' => [
            'type' => 'text'
        ],
        'created_at' => [
            'type' => 'date',
            'format' => "yyyy-MM-dd||epoch_millis"
        ]
    ]
],

And in laravel, as you know, timestamp fields format is yyyy-MM-dd HH: mm: ss
When I import all searchable models via scout:import, it succesfully imported, but elastic show 0 docs.
And if I dump this
dd($this->elasticsearch->bulk($params->toArray());

in update function of ElasticSearchEngine class, bulk function return elasticsearch errors.

That's enough to reproduce the bug. Thanks a lot!

Fixed


Accessibility issues with the Datepicker

Current Behavior
When using Mac OS Voice Over when you use the keyboard to navigate to the current Datepicker you get the previous month button announced correctly as below:

However when you tab to the month or year select controls it simply announces "group" so the user is left with no idea what the control actually is, see below:

If you then activate this control to select an option inside the select it doesn't announce that you are inside the list, which item is currently selected or which item is selected when you use the keyboard to change options as below:

Expected Behavior
Without the screen reader announcing the month and year or the dropdown option that you are navigating it is impossible for a sight impaired user to use this Datepicker.

Your Environment

Tech
Version

Base UI
v6.19.1

React

browser

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

I was unaware that you could use the overrides prop on StatefulCalendar to add a MonthSelect aria-label which fixes the issue above, closing issue.

Thanks for opening this Jon! would you be up for sending a PR fixing the issues mentioned above?

It seems the solution to this issue would require some extra thought 🤔
The dropdown list is rendered in a list inside a Popper. Because that Popper is appended to the body, tabbing doesn't take you to the list. You can try to combat this with a custom mountNode for the Popper that does allow you to tab into the Popper anchor. I was unable to tab into the list from there though.


CalendarHeatmap is not showing last 17 days of data

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Current behavior

CalendarHeatmap is not showing last 17 days
Expected behavior
Expecting the CalendarHeatmap to fully show the data
Minimal reproduction of the problem with instructions
      <CalendarHeatmap
        height={200}
        data={calendarData}
        series={
          <HeatmapSeries
            colorScheme={CALENDAR_COLOR_SCHEME}
            padding={0.3}
          />
        }
      />
    )}

STEPS TO REPRODUCE

Add the data below to the CalendarHeatmap

Environment
Windows 10
Google Chrome

Libs:
- react version: 18.2.0
- reaviz version: 15.15.6
- Node version: 20.15.0

Most recent version have this issue too

When I'm using import { heatmapCalendarData } from 'reaviz-data-utils'; as data everything works fine, but when I put the data below it's not showing the last 17 days

data.txt

Commenting for my own visibility here

Can you share the data you used to make this chart?

data (1).txt
Please wrap key inside new Date()


Renderig bug on 4K monitor with 150% scalling

Description
Recently I moved to 4K monitor. It makes me need to set the dpi scale in display settings to 150%.
After a system restart, DBeaver renders strangely, It renders a big frame (expected size), but DBeaver itself is rendered very small. In this case, the DBeaver menu is not operational.

Worth to mention that this white frame visible in the screenshot above in reality is rather black and constantly flashing.
What I can temporarily do is use a built-in notebook screen. I can move the DBeaver to the notebook screen - DBeaver looks correct here. Then move it back to the 4K main monitor. at this point, the DBeaver renders properly but asks for a restart (btw the requester is centered to the edge between 2 monitors, instead of the center of either screen)

After answering yes and the restart, DBeaver rendering is broken again.
Answering 'No' makes DBeaver remain properly rendered making it look sharp and crisp with the expected font size.
in
DBeaver Version
CE 23.0.0
Operating System
Fedora 37 (Wayland)
Database and driver
N/A
Steps to reproduce

use FullHD laptop and 4K monitor
set 4K monitor to 150% scaling and restart the system
set 4K monitor to the primary screen
run DBeaver - it should open on a 4K screen with a rendering artifact
move it to the laptop screen - it should get fixed
move to 4K screen again - it should ask for a restart in order to apply dpi scaling
use yes to break rendering or no to make proper rendering

Additional context
No response

Thank you for bug report. It sounds like a known issue, so, I'm closing it as a duplicate of #6581
If you think your issue is different from the one I mentioned, please, let me know.


Make it usable

This is the first step to setup this repo:

[x] reuse code from https://github.com/youngwookim/presto-db2
[x] install DB2 driver db2jcc from remote maven repo
[x] add some test code
[x] enable CI via Travis CI

Note: I would recommend using docker image shawnzhu/prestodb:latest where it packages both presto-server and this db2 connector


Code with syntax highlight block?

How would one go about using a syntax highlighter like Prism for code blocks? Pasting highlighted code blocks is also important, though that's a general case of preserving formatting when rich text is pasted.

Maybe take a look at the Tweet block: https://github.com/madebymany/sir-trevor-js/blob/master/src/blocks/tweet.js
It includes an external javascript file to render the tweet and a similar approach could be used with Prism for code highlighting.


feat(cli): add REPL wrapper with completion and history

Thank you for the contribution. I have plans to rewrite this app in Rust, which will bring completion and history automatically. Also, maintaining a bash file is not my cup of tea, I would rather put it in a FAQ section.


When Windows is in High Contrast theme, VSCode starts in High Contrast theme and then immediately switches to the right one

Issue Type: Bug
When Windows is in High Contrast theme, VSCode starts in High Contrast theme and then immediately switches to the right one
I didn't notice this issue before.

Steps to reproduce:

Set Windows theme to dark high contrast

Run VSCode

VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz (12 x 3298)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
31.91GB (23.58GB free)

Process Argv

Screen Reader
no

VM
33%

Extensions (1)

Extension
Author (truncated)
Version

csharp
ms-
1.21.18

This is a theme issue, not an accessibility issue, thus removing tag and myself.
I am not sure where we apply the High Contrast theme automaticallt. @aeschli might know more and provide a code pointer.

duplicate of #105489


[BUG] Volumes keeps crashing and can't create replicas. Large volumes, HDD, ARM

Describe the bug
Can'T create a replicat of a large volume on a slow cluster (Raspberry PIs)
To Reproduce
Steps to reproduce the behavior:

Create a volume with a single replicat
Fill the volume with ~30-40Gb
Increase the replicat minimum count to 2
Timeout while creating the replicat betweer 60 and 80% progression

Expected behavior
Complete a replicat reconstruction without crashing even if it takes time
Log
Failed rebuilding replica with Address <IP_ADDRESS>:10105:
Failed to add replica address='tcp://<IP_ADDRESS>:10105' to controller 'pvc-67d7f3c3-1823-4784-81fa-a604af28af14':
Failed to execute: /var/lib/longhorn/engine-binaries/rancher-mirrored-longhornio-longhorn-engine-v1.2.2/longhorn [--url <IP_ADDRESS>:10000 add tcp://<IP_ADDRESS>:10105], output , stderr, time="2021-11-03T00:58:07Z" level=info msg="Adding replica tcp://<IP_ADDRESS>:10105 in WO mode" time="2021-11-03T00:58:07Z" level=info msg="Using replica tcp://<IP_ADDRESS>:10030 as the source for rebuild " time="2021-11-03T00:58:07Z" level=info msg="Using replica tcp://<IP_ADDRESS>:10105 as the target for rebuild " time="2021-11-03T01:41:36Z" level=fatal msg="Error running add replica command:
Failed to sync files [{FromFileName:volume-snap-ea52892f-15bb-4756-be07-bd6c1229e8c6.img ToFileName:volume-snap-ea52892f-15bb-4756-be07-bd6c1229e8c6.img ActualSize:0} {FromFileName:volume-snap-ea52892f-15bb-4756-be07-bd6c1229e8c6.img.meta ToFileName:volume-snap-ea52892f-15bb-4756-be07-bd6c1229e8c6.img.meta ActualSize:0} {FromFileName:volume-snap-ce7c4aaa-949d-4c20-b404-ff46d2051e9b.img ToFileName:volume-snap-ce7c4aaa-949d-4c20-b404-ff46d2051e9b.img ActualSize:0} {FromFileName:volume-snap-ce7c4aaa-949d-4c20-b404-ff46d2051e9b.img.meta ToFileName:volume-snap-ce7c4aaa-949d-4c20-b404-ff46d2051e9b.img.meta ActualSize:0} {FromFileName:volume-snap-e662bda1-95f9-4129-814a-644b77b77026.img ToFileName:volume-snap-e662bda1-95f9-4129-814a-644b77b77026.img ActualSize:0} {FromFileName:volume-snap-e662bda1-95f9-4129-814a-644b77b77026.img.meta ToFileName:volume-snap-e662bda1-95f9-4129-814a-644b77b77026.img.meta ActualSize:0} {FromFileName:volume-snap-8aad593a-6629-498c-82d4-e5d518ff86f7.img ToFileName:volume-snap-8aad593a-6629-498c-82d4-e5d518ff86f7.img ActualSize:0} {FromFileName:volume-snap-8aad593a-6629-498c-82d4-e5d518ff86f7.img.meta ToFileName:volume-snap-8aad593a-6629-498c-82d4-e5d518ff86f7.img.meta ActualSize:0} {FromFileName:volume-snap-ba3328e9-ac8c-459c-9581-83e503b60ede.img ToFileName:volume-snap-ba3328e9-ac8c-459c-9581-83e503b60ede.img ActualSize:0} {FromFileName:volume-snap-ba3328e9-ac8c-459c-9581-83e503b60ede.img.meta ToFileName:volume-snap-ba3328e9-ac8c-459c-9581-83e503b60ede.img.meta ActualSize:0} {FromFileName:volume-snap-da244b64-20e7-457c-b19a-fba241a31dc0.img ToFileName:volume-snap-da244b64-20e7-457c-b19a-fba241a31dc0.img ActualSize:0} {FromFileName:volume-snap-da244b64-20e7-457c-b19a-fba241a31dc0.img.meta ToFileName:volume-snap-da244b64-20e7-457c-b19a-fba241a31dc0.img.meta ActualSize:0} {FromFileName:volume-snap-88caa3d7-388b-45d4-96a7-f91e1bc1aabb.img ToFileName:volume-snap-88caa3d7-388b-45d4-96a7-f91e1bc1aabb.img ActualSize:0} {FromFileName:volume-snap-88caa3d7-388b-45d4-96a7-f91e1bc1aabb.img.meta ToFileName:volume-snap-88caa3d7-388b-45d4-96a7-f91e1bc1aabb.img.meta ActualSize:0} {FromFileName:volume-snap-a5384b71-7ba4-442a-961b-ee36a081fba9.img ToFileName:volume-snap-a5384b71-7ba4-442a-961b-ee36a081fba9.img ActualSize:0} {FromFileName:volume-snap-a5384b71-7ba4-442a-961b-ee36a081fba9.img.meta ToFileName:volume-snap-a5384b71-7ba4-442a-961b-ee36a081fba9.img.meta ActualSize:0} {FromFileName:volume-snap-b26220be-e6da-451d-8081-db29021c2f7f.img ToFileName:volume-snap-b26220be-e6da-451d-8081-db29021c2f7f.img ActualSize:0} {FromFileName:volume-snap-b26220be-e6da-451d-8081-db29021c2f7f.img.meta ToFileName:volume-snap-b26220be-e6da-451d-8081-db29021c2f7f.img.meta ActualSize:0} {FromFileName:volume-snap-f0d5690c-f3f4-4a90-84e2-e9d1e5240584.img ToFileName:volume-snap-f0d5690c-f3f4-4a90-84e2-e9d1e5240584.img ActualSize:49631920128} {FromFileName:volume-snap-f0d5690c-f3f4-4a90-84e2-e9d1e5240584.img.meta ToFileName:volume-snap-f0d5690c-f3f4-4a90-84e2-e9d1e5240584.img.meta ActualSize:0} {FromFileName:volume-snap-cf628926-7bcb-4eea-bd9b-ae04a991074f.img ToFileName:volume-snap-cf628926-7bcb-4eea-bd9b-ae04a991074f.img ActualSize:0} {FromFileName:volume-snap-cf628926-7bcb-4eea-bd9b-ae04a991074f.img.meta ToFileName:volume-snap-cf628926-7bcb-4eea-bd9b-ae04a991074f.img.meta ActualSize:0} {FromFileName:volume-snap-85efd734-c5ae-4c08-a8bb-2a9d07f2c677.img ToFileName:volume-snap-85efd734-c5ae-4c08-a8bb-2a9d07f2c677.img ActualSize:0} {FromFileName:volume-snap-85efd734-c5ae-4c08-a8bb-2a9d07f2c677.img.meta ToFileName:volume-snap-85efd734-c5ae-4c08-a8bb-2a9d07f2c677.img.meta ActualSize:0} {FromFileName:volume-snap-d7a12923-c100-4a45-8c0f-bbb94f91a80d.img ToFileName:volume-snap-d7a12923-c100-4a45-8c0f-bbb94f91a80d.img ActualSize:0} {FromFileName:volume-snap-d7a12923-c100-4a45-8c0f-bbb94f91a80d.img.meta ToFileName:volume-snap-d7a12923-c100-4a45-8c0f-bbb94f91a80d.img.meta ActualSize:0} {FromFileName:volume-snap-e22bf94b-0db0-48fc-8c7a-612c95f5b902.img ToFileName:volume-snap-e22bf94b-0db0-48fc-8c7a-612c95f5b902.img ActualSize:0} {FromFileName:volume-snap-e22bf94b-0db0-48fc-8c7a-612c95f5b902.img.meta ToFileName:volume-snap-e22bf94b-0db0-48fc-8c7a-612c95f5b902.img.meta ActualSize:0} {FromFileName:volume-snap-495b89bc-2523-4635-891f-145da85fb2be.img ToFileName:volume-snap-495b89bc-2523-4635-891f-145da85fb2be.img ActualSize:0} {FromFileName:volume-snap-495b89bc-2523-4635-891f-145da85fb2be.img.meta ToFileName:volume-snap-495b89bc-2523-4635-891f-145da85fb2be.img.meta ActualSize:0} {FromFileName:volume-snap-cf0dc5f0-d1d5-4b0b-918a-a19eaf0f189f.img ToFileName:volume-snap-cf0dc5f0-d1d5-4b0b-918a-a19eaf0f189f.img ActualSize:0} {FromFileName:volume-snap-cf0dc5f0-d1d5-4b0b-918a-a19eaf0f189f.img.meta ToFileName:volume-snap-cf0dc5f0-d1d5-4b0b-918a-a19eaf0f189f.img.meta ActualSize:0} {FromFileName:volume-snap-8e9445cb-ba3e-42f3-a9c3-d6de099446d4.img ToFileName:volume-snap-8e9445cb-ba3e-42f3-a9c3-d6de099446d4.img ActualSize:0} {FromFileName:volume-snap-8e9445cb-ba3e-42f3-a9c3-d6de099446d4.img.meta ToFileName:volume-snap-8e9445cb-ba3e-42f3-a9c3-d6de099446d4.img.meta ActualSize:0} {FromFileName:volume-snap-5a83907e-8619-47eb-8bf9-f3dbc9a10070.img ToFileName:volume-snap-5a83907e-8619-47eb-8bf9-f3dbc9a10070.img ActualSize:0} {FromFileName:volume-snap-5a83907e-8619-47eb-8bf9-f3dbc9a10070.img.meta ToFileName:volume-snap-5a83907e-8619-47eb-8bf9-f3dbc9a10070.img.meta ActualSize:0} {FromFileName:volume-snap-7c4b009b-e2e0-4baf-a1b2-ed4cef7eb916.img ToFileName:volume-snap-7c4b009b-e2e0-4baf-a1b2-ed4cef7eb916.img ActualSize:0} {FromFileName:volume-snap-7c4b009b-e2e0-4baf-a1b2-ed4cef7eb916.img.meta ToFileName:volume-snap-7c4b009b-e2e0-4baf-a1b2-ed4cef7eb916.img.meta ActualSize:0}] from tcp://<IP_ADDRESS>:10030: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil" , error exit status 1

You can also attach a Support Bundle here. You can generate a Support Bundle using the link at the footer of the Longhorn UI.
Environment:

Longhorn version:1.2.2
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): Rancher Catalog (helm)
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version:K3s

Number of management node in the cluster:1
Number of worker node in the cluster:4

Node config

OS type and version: Raspbian Latest
CPU per node: 4
Memory per node: 8Gb
Disk type(e.g. SSD/NVMe): HDD
Network bandwidth between the nodes: 1GB same switch

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): Baremetal
Number of Longhorn volumes in the cluster: 17

Additional context
I am in the process of migrating data but the volumes keeps crashing when I transfer ~5Gb or more at the same time and the rebuild of the replicas keeps failing with volume with ~40Gb of data. I can't increase to more than 1 replicat because of that.

cc @keithalucas

I know I created an issue like this in the past and been told to wait for 1.2.2.
After upgrading to 1.2.2 it did made life easier for medium size volumes and better performance overall. But now my volumes are getting biggers and I am still adding large amount of data to the volumes but I can't transfer more than ~4-5Gb before the all the replicas crashes and restart the pods and recreate the replicas.
I might be using longhorn wrong or it is not made for slow environment such as ARM (Raspberry PI) and HDD

I can provide a full support bundle and I can reproduce anytime the issue for you if it can help

This is what happens when I transfer a large amount of files. The engine fails and restart

I've sent the support bundle by email to<EMAIL_ADDRESS>

Did a check on the support bundle, different cases that make the replica rebuilding fail. Let me summarize analyze results:

failed to send file volume-snap-48d5a6c7-f9ef-4124-a654-1bf5ef728df6.img to <IP_ADDRESS>:10175: failed to send file volume-snap-48d5a6c7-f9ef-4124-a654-1bf5ef728df6.img to <IP_ADDRESS>:10175: rpc error: code = Unknown desc = stat volume-snap-48d5a6c7-f9ef-4124-a654-1bf5ef728df6.img: no such file or directory: this is because the replica rebuild, the source file not found, we need to investigate during the replica rebuild, will the the snapshot purge/delete works? (we should block the snapshot purge/delete during replica rebuilding).

rpc error: code = Unknown desc = failed to SyncContent for source: volume-snap-e3381ffc-853c-4265-a023-867fe758b81a.img: syncDataInterval [12488704:12490752](2048) failed, err: failed to get checksums for client and server, server checksum error: getChecksum failed, err: Get \"http://<IP_ADDRESS>:10006/v1-ssync/getChecksum?begin=51154649088&end=51154780160\": context deadline exceeded (Client.Timeout exceeded while awaiting headers), client checksum error: <nil>": before do replication, longhorn will check is the sender/receiver data content exist and checksum matched. If yes, by pass it. According to the error message, the sender(client) can't get the receiver(server) checksum by HTTP RESTful API, and the default HTTP client timeout value is 5 seconds.

rpc error: code = Unavailable desc = transport is closing: this probably because the underlying network is unstable during the replica rebuild or the socket has gone/missing.

rpc error: code = Unknown desc = failed to SyncContent for source: volume-snap-74217e73-505e-4fae-b35f-337254924df1.img: syncDataInterval [ 7079936: 7081983](2047) failed, err: writeData failed, err: Post \"http://<IP_ADDRESS>:10141/v1-ssync/writeData?begin=29006626816&end=29006757888\": context deadline exceeded (Client.Timeout exceeded while awaiting headers): each data chunk (2mb) replication timeout value is 5 seconds. It means the data replication can't be finished within 5 seconds.

@vinid223
From the above 2-4, during the replica rebuilding, some of the HTTP/RPC operations can't be fulfilled within 5 seconds, so the replica keeps rebuilding failed.
Could you please check your underlying network is stable, and also consider removing the control plane node rpimaster from the Longhorn cluster to make the network reliable on kube-apiserver/longhorn control plane path. You could add taint to the control plane node. For example
kubectl taint nodes rpimaster node-role.kubernetes.io/controlplane=true:NoSchedule
kubectl taint nodes rpimaster node-role.kubernetes.io/etcd=true:NoExecute

Hello @jenting
Thank you for this amazing response.

I did notice during a dual rebuild process of the same volume to see in longhorn ui the delete process of snapshots. This certainly does not help for a slow environment
Probably the timeout is hit while rebuilding as well as clearing snapshots. This happens only on really large volumes while doing large amount of data transfer
This is probably an issue of using Raspberry Pi for each nodes

The network should not be impacted by the rest of the network since the PIs run on a dedicated switch unless the pods running on them do stuff. 3 of the Raspberry PI are on PoE and all of them are not using short patch cable which might not help since they are really close to each other. I'll try to change the cable for better one.
I will try the taint and get back to you in the weekend. I will do another try to migrate data.

we need to investigate during the replica rebuild, will the the snapshot purge/delete works?

Did a test during replica rebuild, delete the snapshot from the GUI, the Longhorn engine would block snapshot purge and delete if there is a replica in rebuilding.

I am guessing once the pi is busy (io/cpu) utilized heavily.
The checksum operation might take longer then 5 seconds as identified by @jenting the same might be true for the io storage operation. Generally I wouldn't expect a 2mb transfer to take longer then 5s.

I did try to remove the control-plane for longhorn and deployments but it broke everything and took me an hour to revive the pods manually after reverting the taint. The cattle-system pods kept crashing as well as longhorn could not be accessible.
After fixing all that, I did remove some replicas on a prometheus volume and an InfluxDB volume to remove some load and for now it seems to be better. I am still in the process of transfering my data.
I'll give an update after I am done with that.

Could be related to https://github.com/longhorn/longhorn/issues/3042

I've got this same issue with a 100G volume. The highest I saw it go was 42%.
Then randomly today, it succeeded. It was thrashing on the 1 Gbe nic for 12 hours straight. I had already reduced data locality to disabled and scaled replicas down to 1 then back up, but the only solution seemed to be just waiting.
The cronjob for checking snapshot integrity isn't due for 3 more weeks either so it wasn't that.


Add the ruletype severity when returning the list of evaluations

Extend ListRuleEvaluationsByProfileId to include severity
Add the ruletype severity when returning the list of evaluations

Summary
Add the ruletype severity when returning the list of evaluations
Instead of empty severity, let's return the one from the ruletype
Fixes: #2709
Change Type
Mark the type of change your PR introduces:

[x] Bug fix (resolves an issue without affecting existing features)
[ ] Feature (adds new functionality without breaking changes)
[ ] Breaking change (may impact existing functionalities or require documentation updates)
[ ] Documentation (updates or additions to documentation)
[ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing
curl  -H "Authorization: Bearer $MINDER_BEARER_TOKEN" 'http://localhost:8080/api/v1/results?context.project=8f701090-efb9-477e-983a-39a34cb73b42&context.provider=github' | jq

Review Checklist:

[x] Reviewed my own code for quality and clarity.
[ ] Added comments to complex or tricky code sections.
[ ] Updated any affected documentation.
[ ] Included tests that validate the fix or feature.
[ ] Checked that related changes are merged.

coverage: 46.442% (-0.01%) from 46.455%
when pulling 525e90bd22406c3d742fb35ba786755812d45d44 on jhrozek:severity
into 7b9a05a12bd5c27f310e1974d73d71ce889bd7f6 on stacklok:main.

The latest push should just hopefully fix the linter errors

rebased!


console

As i was thinking since the long time about new improved console so finally i try to find time and work on it.
Its new console, which support to register commands etc..
A simple hello world command may look like this
<?php

namespace App\Console\Commands;
use Zest\Console\Command;

class Hello extends Command
{
    protected $sign = "hello";
    protected $description = "Command to print hello message on screen";

    public function handle()
    {
        $this->write("<green>Hello World.</green>");
    }
}

In Zest Skeleton it should added to
App/Config/Console.php
<?php

namespace Config;
use Zest\Console\Commands as InternalCommands;

class Commands extends InternalCommands {
    protected $commands = [
        ['hello',  \App\Console\Commands\Hello::class],
    ];
}

It also have few internals commands
Here is snapshot of list command

@peter279k  and @Maikuolan  what do yo think about this approach?
The symfony console exists no matter, but i love to reinvent wheel, and the motive of Zest framework.

Your works are very similar with Symfony/Components.
I don't think it's not very necessary to rebuild a console....Why don't you build a console on top of above component :)?

Your works are very similar with Symfony/Components.
I don't think it's not very necessary to rebuild a console....Why don't you build a console on top of above component :)?

Because

The main purpose of Zest framework is to provide a very lightweight framework without any external dependencies except core and autoloader

Seems like an interesting idea. Would be a nice addition to Zest, I think. :-)

Just notice that the console about Laravel framework relies on the Symfony/Console.
My main suggestion is: We should consider using the lightweight PHP console to build the console Zest framework.
It should be easy to build and it can avoid "repeating yourself" :).

My main suggestion  is: We should consider using the lightweight PHP console to build the console Zest framework.

What do you mean by light weight php console
@peter279k

You can find the console via the packagist.org  site.

You can find the console via the packagist.org  site.

For now in this 'PR' I will continue a bit work the think about it. The proglen is that to include third party lib is violate term of Zest .

You can find the console via the packagist.org  site.

For now in this 'PR' I will continue a bit work the think about it. The proglen is that to include third party lib is violate term of Zest .

Agree. Go ahead with that.

TODO

[ ] Output List(s)
[ ]  Parsing arguments and flags.
[ ] Support Args and flag in commands.

After that this PRwill ready to merge.


Importing Foundation component as ES6 module includes the whole code and not only the code which is necessary for the component

Currently I'm updating our boilerplate project to 6.5.0-rc2. As i've read in #10864 it should now be possible to include a JavaScript component with this way:
import $ from 'jquery';
import { Reveal } from 'foundation-sites';

$(document).foundation();

What should happen?
Only the code which is necessary for the Reveal should be included in the bundle.
What happens instead?
The whole Foundation JavaScript gets included in the bundle.
Possible Solution

Use the "old" solution, as described here: https://github.com/zurb/foundation-zurb-template/blob/master/src/assets/js/lib/foundation-explicit-pieces.js
Test Case and/or Steps to Reproduce

Test Case:
See code example above, or the example:

Your Environment

Foundation version(s) used: 6.5.0.rc.2
Browser(s) name and version(s): Chrome
Operating System and version (desktop or mobile): MacOS

Checklist (all required):

[X] I have read and follow the CONTRIBUTING.md document.
[X] There are no other issues similar to this one.
[X] The issue title is descriptive.
[ ] The template is correctly filled.

I've added an example here:

https://codesandbox.io/s/5w114vn64k
Looking at the zurb template I usually use, this is what they do.
It's in js/lib/ docs need to be more explicit

Hello @marvinhuebner.
I seen your issue some days ago and planned to work on it this weekend. I watched at zurb/foundation-zurb-template:src/assets/js/lib/foundation-explicit-pieces.js and don't see how this would resolve the issue.
I'll make some tests to see how treeshaking is handled by most used builders.

Hi @marvinhuebner @mattbag. Could you take a look at https://github.com/zurb/foundation-sites/pull/11445 ? 😉

I've tested your PR, and have some question.
First I tested this:
import Accordion from 'foundation-sites/js/foundation.accordion';

$(document).foundation();

This seems not to work, i get Uncaught TypeError: (0 , _jquery2.default)(...).foundation is not a function.
To get the manual import working, i have to do the following:
import Foundation from 'foundation-sites/js/foundation';
import Accordion from 'foundation-sites/js/foundation.accordion';

var test = new Foundation.Accordion($('.accordion'));

So it seems i have to manually initialize my foundation components, and i have to import Foundation. I'm wrong with my examples or is this the way for doing it? If it is, maybe https://github.com/zurb/foundation-zurb-template/blob/master/src/assets/js/lib/foundation-explicit-pieces.js is the way to go, for solving this problem.
Maybe i have some time this week and can dig into this whole ES6 import/export topic and can contribute something to this.

I was under the impression this would be fixed in 6.5.0; it seems the problem remains.

Can you share your package.json and webpack config?

https://github.com/zurb/foundation-sites/pull/11445 was merged and released.
If there are new related issues please open a new issue with all relevant details.

This issue still remains. I actually have the exact same setup. I only use the Reveal plugin when it comes to Foundation JS. In v6.5.3, with Parceljs, using the same import it actually includes the full library, not just what's required for using Reveal.
Using the documented approach in the tree shaking section doesn't work either (the second part in that section).
The only way I think I've been able to get Reveal to work with defaults and to not include the full Foundation JS library is to do the following:
import { Foundation } from 'foundation-sites/js/foundation.core';
import { Reveal } from 'foundation-sites/js/foundation.reveal';
Foundation.addToJquery($);
Foundation.plugin(Reveal, 'Reveal');
$(document).foundation();

I'm not sure if that's expected or intentional. Another thing too is that even if this is what I have to do I don't know what else I'm missing if other behavior from that plugin doesn't work as expected.

Hi @javierjulio,
as mentioned in the docs it may depend on the config of your bundler.
The plugin itself resolves its dependencies.
See https://github.com/zurb/foundation-sites/blob/develop/js/foundation.reveal.js#L3-L10

@DanielRuf yes that's why I commented here. I expected it to resolve its dependencies since I know it does in the plugin file. I wasn't sure what's wrong. The thing is Parcel is zero config and uses webpack but if it doesn't resolve, what does any config have to be? If it would require config shouldn't it be documented?

I can not answer this as I do not use or know Parcel. You might want to ask in their communities (Gitter, Slack, GitHub, ...).

@javiercejudo I've only been working with Parcel for about 24H but so far I've noticed a lot of serious issues where I basically have to provide the path all the way back to the node_modules. I'm sure it's probably a configuration issue but Parcel is supposed to be zero-config...
@import 'settings';
@import 'node_modules/foundation-sites/scss/foundation';

.posthtmlrc.js
module.exports = {
  plugins:
    [
      require('posthtml-include')({ root: './src/' }),
      require('posthtml-expressions')(),
    ]
}

If you figure out a better way let me know because I'm been rewriting the zurb template with ParcelJS, scss and PostHtml to replace Panini. It's way faster and still works with the cli and building-blocks.

Regarding Sass, node-sass supports resolvement via config and ~packagename.

In this case please ask the ParcelJS creators and open an issue there. We can not provide support for other tools which are not maintained by us.

@WestMec200 all you need is a .sassrc file in the root directory of your project with the following contents:
{
  "includePaths": [ "node_modules" ]
}

That way in your SASS code you can change the import to be:
@import './foundation-sites/scss/foundation';

It should work fine from there.


Polygon<u8>

Seems like Polygon<u8> is not currently supported, even if you patch and add fixed_precision!(i8, u8, i16, u16), since PolygonScalar requires Neg

Yeah, rgeometry will probably never support unsigned numbers. Too many of the core primitives depend on signed values.


[Enhancement]: Fulfill Requests Page Improvements

What would you like us to improve?

Check links on this page
Add troubleshooting for common mistakes developers make on this page

How important it is?
Based on dev feedback

Hi,
I think we should add a part on how to handle errors, timeouts, retries that could happen during a HTTP call.
What do you think ?

This is the concerning page: https://docs.chain.link/docs/fulfilling-requests/

We need indeed to check corner cases with engineering team. There is no retry mechanism for the moment so we have to explain to the node operators what to do in this case
There is also a problem with the GET > Bytes32 job : we need to wait for this to be investigated https://github.com/smartcontractkit/chainlink/issues/6499


how can we create this ./mbasicHeaders.json file

can you pls provide a sample python script that work i tested using
from facebook_scraper import get_posts, _scraper import json for post in get_posts('nintendo', base_url="https://mbasic.facebook.com",                       start_url="https://mbasic.facebook.com/nintendo?v=timeline",                        pages=3, cookies='trollmcookies.txt'):     try:         print(post['text'][:20])         print(post)     except Exception as e:         print(f"Error processing post: {e}")
this code and it doesn't return anything

@Sarun1001 the mbasic headers file is a json file that you get from the developer tools. the steps are in the readME file but here are in more details :

open an mbasic facebook page in your browser
open the developer tools (options+command+i) and go to the network tab
on the same dev tools panel open the responsive mode and choose samsung S20 ultra as your device
Refresh the page you opened at first (command+r)
filter by "Doc" the request list and right click on the first page loaded -> click copy -> as cURL
got to https://curlconverter.com/ and paste, from there you can choose python as output and get the headers in a json format.
copy the headers into your repo and into the file that you then inject into your scraper instance

Thanks for sharing the steps.
Successfully scraped posts, but after a few minutes i get temporary block
 File "/home/ubuntu/.local/lib/python3.8/site-packages/facebook_scraper/facebook_scraper.py", line 944, in get     raise exceptions.TemporarilyBanned(title.text) facebook_scraper.exceptions.TemporarilyBanned: You’re Temporarily Blocked
is there any suggestion to avoid this ban, also now what ? do i need a new ip or new fb account to continue using this, nb: before getting banned i run the script without a cookie file.

@Sarun1001 , Do you have an example of how your headers turned out? It doesn't work for me even though I created the json file correctly.

@Sarun1001 I can't help you there really, just don't use it a lot in rapid succession.

@moda20 There are several headers that exist when copying like CURL, I don't know which headers you use, can you help me, please?

@Jowawis99  Reload the page at step 5 --> select 1st  item in 'Name' column --> right click --> copy --> copy as curl --> paste on to curlconverter.com --> select json --> there you ca see an object called header

I did everything above, but it returns nothing. My header looks like this:
{
'authority': 'mbasic.facebook.com',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7',
'accept-language': 'zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'cache-control': 'max-age=0',
'cookie': 'sb=rbAJZVCvEh8Q_09qlyWHTUMS; datr=rrAJZV9gFAn919FtNTDrVruN; c_user=100002607319714; ps_n=0; ps_l=0; dpr=1.5; wd=1280x559; presence=C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1709127707853%2C%22v%22%3A1%7D; xs=116%3ANBx7p68qbfFI0Q%3A2%3A1700836402%3A-1%3A11322%3A%3AAcXWxB1htPS7UjKQ6jWw7RJDJtOSzlOdKRXDk9Uy0tA; fr=1u3FkUasnpLa34xOQ.AWUs6AgQrE7dzqtOlIHC6gUhzlo.Bl30HX..AAA.0.0.Bl30HX.AWXvjSaIynQ; m_page_voice=100002607319714',
'dpr': '1.5',
'sec-ch-prefers-color-scheme': 'light',
'sec-ch-ua': '"Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"',
'sec-ch-ua-full-version-list': '"Not A(Brand";v="<IP_ADDRESS>", "Google Chrome";v="121.0.6167.185", "Chromium";v="121.0.6167.185"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-model': '"SM-G981B"',
'sec-ch-ua-platform': '"Android"',
'sec-ch-ua-platform-version': '"13"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'none',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Linux; Android 13; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Mobile Safari/537.36',
'viewport-width': '210'
}
and the code is:
with open('./nintendo.json', 'r') as file:
_scraper.mbasic_headers = json.load(file)
for post in get_posts('NintendoAmerica', base_url="https://mbasic.facebook.com", start_url="https://mbasic.facebook.com/NintendoAmerica?v=timeline", pages=10):
print(post['text'][:50])
Could someone please tell me what's wrong?

I did everything above, but it returns nothing. My header looks like this:
{
'authority': 'mbasic.facebook.com',
 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
 'accept-language': 'zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7',
 'cache-control': 'max-age=0',
 'cookie': 'sb=rbAJZVCvEh8Q_09qlyWHTUMS; datr=rrAJZV9gFAn919FtNTDrVruN; c_user=100002607319714; ps_n=0; ps_l=0; dpr=1.5; wd=1280x559; presence=C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1709127707853%2C%22v%22%3A1%7D; xs=116%3ANBx7p68qbfFI0Q%3A2%3A1700836402%3A-1%3A11322%3A%3AAcXWxB1htPS7UjKQ6jWw7RJDJtOSzlOdKRXDk9Uy0tA; fr=1u3FkUasnpLa34xOQ.AWUs6AgQrE7dzqtOlIHC6gUhzlo.Bl30HX..AAA.0.0.Bl30HX.AWXvjSaIynQ; m_page_voice=100002607319714',
 'dpr': '1.5',
 'sec-ch-prefers-color-scheme': 'light',
 'sec-ch-ua': '"Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"',
 'sec-ch-ua-full-version-list': '"Not A(Brand";v="<IP_ADDRESS>", "Google Chrome";v="121.0.6167.185", "Chromium";v="121.0.6167.185"',
 'sec-ch-ua-mobile': '?1',
 'sec-ch-ua-model': '"SM-G981B"',
 'sec-ch-ua-platform': '"Android"',
 'sec-ch-ua-platform-version': '"13"',
 'sec-fetch-dest': 'document',
 'sec-fetch-mode': 'navigate',
 'sec-fetch-site': 'none',
 'sec-fetch-user': '?1',
 'upgrade-insecure-requests': '1',
 'user-agent': 'Mozilla/5.0 (Linux; Android 13; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Mobile Safari/537.36',
 'viewport-width': '210'
}

and the code is:
with open('./nintendo.json', 'r') as file:
    _scraper.mbasic_headers = json.load(file)

for post in get_posts('NintendoAmerica', base_url="https://mbasic.facebook.com", start_url="https://mbasic.facebook.com/NintendoAmerica?v=timeline", pages=10):
    print(post['text'][:50])

Could someone please tell me what's wrong?

It is a very bad idea to post cookies on the Internet, you should change your Facebook password now


[+] add view actions for current group areas

Initial commit - includes group view actions

Still trying to get my head around this one. Is a 'Guest' a site user who hasn't joined the group yet?
If so I'm not sure if they should have the view actions? I think the idea was that they will be redirect to an about page so they won't be able to view any of the group content. I think the story description below is outdated and this was for when the idea was that they will see a 403 message or something instead of the redirect.
"As a group administrator of a restricted group when a non member views my group I want them to be able to select the forum, files, and members tabs but see a message rather than the contents of the tabs so that they can be encouraged to join my group."

Hey @andy-smith-cds. It will depend if the group is public or private I believe. If the group is public a Guest will have the ability to view. If it's private they will have the default actions which at the moment is just groups/{DefaultApiVerison}/join

Ahh gotcha, looks good to me then! Would it be a pain to add a generic /view action too for the group as a whole which obviously a non-member of a private group won't have?
Not particularly important if that would be difficult, just saves me chaining/checking all of the view permissions individually when triggering the redirect?

@andy-smith-cds no problem does this suit you?


Step 3 readme instructions not clear

in step 3 there is the method on the locationScene  processFrame(frame), i don't understand where the frame is coming from, where is the frame parameter coming from, i can only find the frametime
  ....

    if (locationScene != null) {
        locationScene.processFrame(frame);
    }

The frame can be recovered like so:
Frame frame = arSceneView.getArFrame();

oh sweet! thanks... first time using ARCore so pardon my dumb question 😆

Not a problem! The example project may be able to help if you encounter further issues: https://github.com/appoly/ARCore-Location/tree/master/examples/sceneform


Restrict bot commands to 1 command to every 2 seconds

I still think this is needed

Hi! Is the cooldown for all commands or per command? Maybe per user?

Hi @itsphaze, yes maybe per user is better

I agree, per user would be best and simpler 👍


Add mousetrap library and save and create shortcuts

Attempt to bring back the v1 shortcuts.
Can't use the same click action than in PR 264 because the logout submit is triggered.
I've also added a shortcut for the create action. Can't bind Cmd+N, so I suggest Cmd+O

Let's pass an id="form" to the <form> and using .submit() instead of targetting the button?

Let's pass an id="form" to the <form> and using .submit() instead of targetting the button?

Also we should install the NPM package and add it to our JS bundle instead of using the CDN

Hey @buzkall, have you committed all changes? I can't see any changes made to the app.js source file, only the file in dist.

Another thought, should we disable these by default and add an option to the config for the package to enable them and perhaps customise the shortcuts?

Hi @ryangjchandler, I've commited my changes now following your suggestion of adding it to the filament config file

Just had an even better idea (and sorry for wasting your time with previous suggestions), we could add this to the admin panel Action object.
Action::make('save')->keyBindings(['ctrl+s', 'command+s'])

Just had an even better idea (and sorry for wasting your time with previous suggestions), we could add this to the admin panel Action object.
Action::make('save')->keyBindings(['ctrl+s', 'command+s'])

That's nice, that way we can open modals using keybinding 😍

Hi @danharrin, I think that's a great idea. I've created a HasKeyBindings trait (not sure about the name) and moved the Alpine code to the button.blade.php file.
I'm not sure about my solution when the button is a link. What do you think?

I've had to completely refactor the actions implementation in #2057, so I'm gonna add this as a todo there. Thanks for your work!