Reolink Doorbell with two-way audio?! (no issue, just  info request)

Hi!
Anyone have manage to achieve the two-way audio with a reolink doorbell without problems?
If yes, can you please share the code of the card.
Thank you!

I would also be very interested... I tried several configs and  didn't get it to work. On top I  don't have any sound now from the stream -.-
using this atm:
`type: custom:webrtc-camera
ui: true
streams:

url: rtsp://HomA:Infakt66!@<IP_ADDRESS>:554/h264Preview_01_sub
name: 😶
background: false
muted: false
mic: false
mode: webrtc
url: rtsp://HomA:Infakt66!@<IP_ADDRESS>:554/h264Preview_01_sub
name: 🎙
background: false
muted: false
mic: true

media: video,audio,microphone ### or do i need this line?
mode: webrtc
`

I would also be very interested... I tried several configs and didn't get it to work. On top I don't have any sound now from the stream -.-
using this atm:
type: custom:webrtc-camera
ui: true
streams:
  - url: rtsp://USER:PW@IP:554/h264Preview_01_sub
    name: 😶
    background: false
    muted: false
    mic: false
    mode: webrtc
  - url: rtsp://USER:PW@IP:554/h264Preview_01_sub
    name: 🎙
    background: false
    muted: false
    mic: true
    ### media: video,audio,microphone ### or do i need this line?
    mode: webrtc

Yeah, i guess i got it.
type: custom:webrtc-camera
server: https://go2rtc.example.com/
streams:
  - url: reolink
    mode: webrtc
    media: video,audio
    name: 🔇
  - url: reolink
    mode: webrtc
    media: video,audio,microphone
    name: 🔈
ui: true
muted: false

go2rtc:
streams:
  reolink:
    - rtsp://admin:password@<IP_ADDRESS>:554/Preview_01_sub
    - "ffmpeg:reolink#audio=opus#audio=volume#async"

ffmpeg:
  bin: ffmpeg
  volume: "-af \"volume=25dB\""

reverse proxy:
server {
    server_name go2rtc.example.com;

    listen 80;

    if ($scheme = http) {
        return 301 https://$server_name$request_uri;
    }

    ssl_session_timeout 1d;
    ssl_session_cache shared:MozSSL:10m;
    ssl_session_tickets off;
    ssl_certificate /ssl/fullchain.pem;
    ssl_certificate_key /ssl/privkey.pem;

    ssl_dhparam /data/dhparams.pem;

    listen 443 ssl http2;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

    proxy_buffering off;

    location / {
        proxy_pass http://homeassistant.local:1984;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
}

@daxcore  Hi! Can you please explain what you wrote there, like you would explain it to a noob? :-D
I only understand the first code which represents a webrtc-camera card, but what about the next two codes? What are, how, where? :-)
Thank you in advance!

If everything else works for you you just need the first part:
type: custom:webrtc-camera
server: https://go2rtc.example.com/
streams:
  - url: reolink
    mode: webrtc
    media: video,audio
    name: 🔇
  - url: reolink
    mode: webrtc
    media: video,audio,microphone
    name: 🔈
ui: true
muted: false

This part should somehow similar already be in your go2rtc.yaml, but not needed if you add the url directly into the card, like I did in my previous post:
streams:
  reolink:
    - rtsp://admin:password@<IP_ADDRESS>:554/Preview_01_sub
    - "ffmpeg:reolink#audio=opus#audio=volume#async"

ffmpeg:
  bin: ffmpeg
  volume: "-af \"volume=25dB\""

So the trick seems to be this line media: video,audio,microphone, no need for mic: true. The mic is working, evertheless it seems that I  don't have any sound coming back -.-

Thank you, I will try it today <3

Still... I am asking myself... for this Two-Way thing, why you need two streams? Ok, ok, I understand that one is with microphone and the other is not, but would not be easier if you use only one stream, but you have a button to turn on/off the microphone? Like the speaker... click Mute/click UnMute, could not this microphone have a similar usability?
@AlexxIT  ? Is this not possible? Sorry if maybe I transform a "question" post into a "feature request", first I just ask to know more.
Thanks

Two separate streams is good design because you take and release mic not only on browser, but also on camera

lets have a look to the readme.md file:

Two-way audio

Only for supported sources in go2rtc
Only for Hass with HTTPS access, this limitation is from the browsers
Only for WebRTC mode
HTTPS is also important for Hass Mobile App!

You should add microphone to media param. You can use two streams: one with mic, second without:
type: 'custom:webrtc-camera'
streams:
  - url: go2rtc_stream
  - url: go2rtc_stream
    mode: webrtc
    media: video,audio,microphone

for 2-way audio, https is the key. that's why, i posted my nginx reverse proxy configuration. i guess, if the server: https://go2rtc.example.com/ in your card code will not refer to https url, it will not work!

This is what I try to use in my card
type: custom:webrtc-camera
ui: true
muted: false
streams:
  - url: rtsp://admin:Acountinx123H@<IP_ADDRESS>:554/h264Preview_01_sub
    mode: webrtc
    media: video,audio
    name: 🔇
  - url: rtsp://admin:Acountinx123H@<IP_ADDRESS>:554/h264Preview_01_sub
    mode: webrtc
    media: video,audio,microphone
    name: 🔈

The go2rtc I think it is already installed in HA, no need for external server.
HA it is configured to use HTTPS only accessed from outside, from LAN, it is accesed through HTTP...

This is what I try to use in my card
type: custom:webrtc-camera
ui: true
muted: false
streams:
  - url: rtsp://admin:pass@<IP_ADDRESS>:554/h264Preview_01_sub
    mode: webrtc
    media: video,audio
    name: 🔇
  - url: rtsp://admin:pass@<IP_ADDRESS>:554/h264Preview_01_sub
    mode: webrtc
    media: video,audio,microphone
    name: 🔈

after I added this stuff after and before "-->" to my go2rtc.yaml sound seems to work now
streams:
  reolink:
    - rtsp://admin:password@<IP_ADDRESS>:554/Preview_01_sub
    - "ffmpeg:reolink#audio=opus. --> #audio=volume#async"

ffmpeg:
  bin: ffmpeg
  volume: "-af \"volume=25dB\""
<--

Where can I find this file go2rtc.yaml ? I don't have it in my HA

I search but nothing... There is no file like this

Ok, maybe we missed to ask at the very beginning if you have go2rtc installed in your HomeAssistent. If so, you can also create the file and paste the stuff above


Aimbot is broken

I was doing a setup and when I noticed the aimbot wasn't pulling to the target on every shot so the other shots going to where your aim is, I'm using the latest version of fedoraware
video below
vvvvvvvvvv
https://www.youtube.com/watch?v=Or55ufP-_7A
^^^^^^^

looks like its because of your fps.

my friend has the same problem and plays at 144 fps

i do not experience this issue even when locked at 33 fps so im unsure whats causing it for you

do you want me to send the config for you to test? I don't know if it could be the config

sure

https://www.mediafire.com/file/jecip812u021bfa/SCOUT_DT.fw/file

pro tip for next time, you can change the extension from .fw to .txt and upload it directly to this issue post.

I can't recreate this w/ fps locked to 33 as well as fps unlocked & while using your unchanged config.

so what could be the reason my aimbot is like this

No clue, I can't recreate it on my or your config, so I'm not going to put time into it.


Segfault when parsing with TOML_EXCEPTIONS=0

A very simple case, once again: parsing "#\xf1\x63" when disabling exceptions. The crash occurs in parser::parse_document when trying to continue parsing after reader.read_next() returns nullptr.
I'm not entirely sure why it happens; it looks like consume_comment should return false on advance_and_return_if_error({}), but somehow it does return true instead.

Interesting. The test suite does run builds with TOML_EXCEPTIONS=0, so I need more information. Environment, compiler flags, etc.
(the bug report template does ask for these things)

Oh, you know what, scratch that! I see what the issue is immediately. The core parse look doesn't account for the possibility of a comment terminating directly at EOF. Should be easy to fix, thanks.

Another input resulting in a null pointer dereference: "1= 0x6cA#+\xf1". This one fails when setting the error string, in to_sv(*cp) with a null cp.

Fixed, thanks @sneves!
Since you seem to enjoy digging a little bit, I'll explain what was actually happening here.

The string contained a malformed utf8 byte sequence so the stream reader's read_next() captured an error and returned a null codepoint
consume_comment() was detecting the error state and returning false (which is the intended behaviour; an error while consuming something is a failure to consume it)
parse_document() was assuming the only false results here meant "nothing to consume", not taking into account the possibility for an error at this level.

Adding a single return_if_error_or_eof() to parse_document() was sufficient to handle the error propagation.
Worth noting that all this complexity evaporates if the library is built with exceptions, so if you can use them I highly recommend it (especially since all the explicit error-handling code dissapearing means the parser is a decent bit faster).
There's now a unit test to catch this, too: https://github.com/marzer/tomlplusplus/blob/6255dd765cef54654a11c48a1339095d90e494d8/tests/user_feedback.cpp#L91-L102

Another input resulting in a null pointer dereference: "1= 0x6cA#+\xf1". This one fails when setting the error string, in to_sv(*cp) with a null cp.

Yup, that will be the same issue. \xf1 is in-and-of-itself not a complete utf8 byte sequence.

I should mentioned that this happens after applying the 6255dd7 fix.

Oh 😓

These are pretty weird inputs @sneves; out of curiosity, where are you getting them from?

Alright, should be good now. I also audited the rest of the to_sv(*cp) callsites for the possibility of cp being nullptr in the event of a stream error, and added a null-safe version instead.
This is good stuff, keep it coming!

Ah, makes sense. Fuzzing has been on my to-do list for a while; next time I get a batch of more serious toml++ time (beyond basic bugfixes) I'd like to add a fuzzer to the CI.

Against the latest master, the following input crashes in consume_comment: "p=06:06:06#\x0b\xff"

Ah, thanks. I'm heading out for the night but will have a look into this tomorrow (that and any other broken inputs you find).

A couple more cases:

"''''d' 't' '+o\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\r\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0cop1\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c' 'ml'\n\n%\x87" causes an infinite loop in parse_literal_string. This is actually caught with a debug assert, so I fixed it as

-                                       assert_not_error();
+                                       return_if_error({});

"bwit = [ 9,2, 3, "four", 5.0 ]\n  t =[ 9, 2, 1,"r",<PHONE_NUMBER>999999999999999999999999999999999999999999999999999995.0 ]" results in a stack overflow in parse_float, with chars[64] getting written to. I fixed this by moving the length check to immediately before the writing:

@@ -9911,10 +9912,6 @@ TOML_IMPL_NAMESPACE_START
                                                else if (!is_match(*prev, U'e', U'E'))
                                                        set_error_and_return_default("expected exponent digit, saw '"sv, to_sv(*cp), "'"sv);
                                        }
-                                       else if (length == sizeof(chars))
-                                               set_error_and_return_default(
-                                                       "exceeds maximum length of "sv, static_cast<uint64_t>(sizeof(chars)), " characters"sv
-                                               );
                                        else if (is_decimal_digit(*cp))
                                        {
                                                if (!seen_decimal)
@@ -9928,6 +9925,11 @@ TOML_IMPL_NAMESPACE_START
                                        else
                                                set_error_and_return_default("expected decimal digit, saw '"sv, to_sv(*cp), "'"sv);

+                                       if (length == sizeof(chars))
+                                               set_error_and_return_default(
+                                                       "exceeds maximum length of "sv, static_cast<uint64_t>(sizeof(chars)), " characters"sv
+                                               );
+
                                        chars[length++] = static_cast<char>(cp->bytes[0]);
                                        prev = cp;
                                        advance_and_return_if_error({});

Other than this, nothing's popped up for quite a while, so I think the low-hanging fruit could be over..

Fantastic, thanks @sneves! I've applied fixes for these in master.

As before, I can't swear by the correctness of these fixes, only that they made the immediate problem go away.

Your fixes are sound. The parser is deliberately procedural and "C-like" so there's not a lot of hidden voodoo that goes into fixes and modifications.


gulp shows the error "The command line is too long"

Hi, I'm now puzzling because of gulp-typedoc shows this error"The command line is too long".
tsSource = ['myproject/src/**/*.ts'];
gulp.task('doc', function() {
  return gulp.src(tsSource).pipe(typedoc({
    module: 'commonjs',
    out: './ci/docs' + branch,
    name: 'myproject',
    target: 'es5',
    includeDeclarations: true,
    json: './ci/docs/' + branch + 'doc.json',
    mode: 'modules'
  }));
});

This is gulpfile.coffee of my project. Does anyone know any solution for this problem?
Thank you for reading. :laughing:

I'm sorry I found the solution in readme... :cry:
var child_process = require("child_process");

gulp.task("typedoc", function(cb) {
    child_process.exec("typedoc --out ./doc --module commonjs --target es5 --name MyProject ./my_code_directory/", cb);
});


Change all syntaxes for the new format: .sublime-syntax

Hi,
This PR replace old .tmLanguage syntaxes by .sublime-syntax using the converting tool provided by Sublime (in Tools > New Syntax from xxx.tmLanguage)
I didn't modify any scope but I plan to bring some improvements in the future.
In particular I feel that the scopes name doesn't respect conventions but has been chosen to be nice on a given Theme but doesn't generalize well. (For example comments are often in italic which brokes alignement with vertical '|')
Also commit hash aren't always  bearing the same scope.
But theses changes will be in another PR.

Btw, thanks for this awesome plugin !

I read the release note to 3103 and say the new type of syntax files. I like the new format of them. If this get merged. We wil longer support older versions of sublime. This may not be a problem for some of GitSavvy.
This is up to @divmain.
(I just wanted to make the note so it doesn't hit us later)

Do we need to update places where we set the syntax?
like: github/commands/pull_request.py#L124)

Good catch.
I tested it without further modification and it was working. Maybe Sublime
was catching this 'error'.
My impression is that when there is a  'foo.sublime-syntax' next to a
'foo.tmLanguage', Sublime will load the first one.
But it would be cleaner to load explicitly the sublime-syntax.

I would ship both the .sublime-syntax as well as .tmLanguage files. Just do what Jon did for the default packages.
https://forum.sublimetext.com/t/dev-build-3084/14887/15

If I read correctly the thread linked by @pradyunsg, both systems are supported and there is no automatic selection (in fact, if you ship syntax with both formats, the suggestion is to add a hide tag to avoid duplicate items listed in syntax menu).
However, since GitSavvy uses scope/name and explicit references, I suggest to experiment with keeping both formats, and test on current and older ST versions to see we don't break anything.

ok, I didn't think about people using older version of Sublime. I'll make another PR with both files.
But it's not anymore the behavior adopted by Sublime Packages which only ships the .sublime-syntax.

Well, Sublime Text Packages is meant for the latest versions.

Also, you night as well just re-add those files. And put a hide=True key into them. And squash all the current commits into one.

I'm not 100% sure hide=True would mean anything in GitSavvy, since we don't need to hide the syntax file from a selection menu, but rather choose the newest supported format to render a view with.
There is also the question of maintaining 2 source files (for backward compat.), so @divmain would have to decide on that.

@asfaltboy Well, if you look at the sources, it's already being done. (I believe for all syntaxes)
Also, it makes sense because these syntaxes are highly specific to GitSavvy.
As to the question of maintaining 2 source files, I see no reason to add the .sublime-syntax files in GitSavvy.
The status quo works and the only compelling reason to adopt the new format is to use the greater control over the lexer stack, something not needed by GitSavvy. And the added complexity in the codebase of maintaining/choosing between the two formats.
Of course, @divmain has the deciding powers, not me.

My main motivation was to improve the syntaxes, and it's really more easy to edit .sublime-syntax than .tmLanguage
This PR doesn't include any modification but I was hoping to do more in the future.
The improvements I think of are:

uniformized scope between different view
improve scopes for 'blame' page: the author name should be highlighted
fix error in 'graph' syntax highlighting parenthesis inside commit as 'branch'
improve scope for 'status' page: the current branch should be highlighted

One possibility is to add the new syntax, providing improved experience for users on ST3, and not disturbing people on ST2 (which are likely people who don't like to be disturbed)

@gwenzek I forgot that GitSavvy is a ST3-only plugin.

Hey everybody!  Sorry for the radio silence - lots going on in real life the last couple of weeks.
Since this is a ST3-only plugin, it has long been my position to only support the latest v3 beta and onward.  Most people will want to be updating anyway, users without licenses can be on these buidls, and the releases may include bug fixes for things related to GitSavvy - one example is nested scope highlighting in the inline diff view.
For that reason, I'm comfortable moving to the new syntax format.  I do, however, want to ensure that all the programatic view syntax changes work properly, and no other functionality is effected.  I agree that the YAML format is much easier to work with :)
So @gwenzek, if you are willing to go hunting for view syntax changes and include in this PR, I'll merge it!

Hi @divmain thanks for your input.
I replaced all references to '.tmLanguage' file by references to '.sublime-syntax' in 2b171925b
The plugin is still working for me without error message in the console.
I also included the change to the blame syntax (in 160f645d2dcfe79b0c47372415d861b99bb84fd1)

I make a new branch called sublime_syntax. And I will use that one for the next week.
I will do something with the diff syntax to work with git diff and it's options.
If you have something more you want to push into this branch you can make a PR directly to this branch so we can merge and test i.

Thanks @stoivo, I added a few improvements in #362.

How does this look @gwenzek and @stoivo?  If you've been using it with no issues, we should merge this in soon.  It may result in a major-revision bump of GitSavvy's version number, since this will be a breaking change for older ST3 versions.  But if it is working, let's move it into master.

I think we are where we want to be. I think there is now bug here. But I  don't use the rebase and tag dashboard more than I do for GitSavvy. So only a few times.
I will have a PR from sublime_syntax to master.


BUG REPORT for location of the job

ENVIROMENT: production
URL: https://scrapers.peviitor.ro/src/continentalhotels/
Browser: Chrome
Device: laptop
OS: Windows 10
STEPS TO REPRODUCE:

Open URL in browser
Type the name of the company in the search bar
Click on the button "Cauta"
Click on the link below the company logo
Open the careers section of the company website
Check the locations of the avalailable jobs

EXPECTED RESULTS:
The location of the jobs posted on the URL for the company should be the same like the location of the jobs posted on the company website on the career sections. The location should appears correctly.
ACTUAL RESULTS:
The location for the jobs : Camerista and Ospatar appears with an error like "Targu Mures is not a city in Romania"

@DeedeeDL am rezolvat bug-ul. te rog retesteaza. nu stiu de ce nu pot adauga label-ul FIXED

All good now ! Nu a mai aparut la retestare


The Explanation of the iCAN's implementation in tab. 4

I'm sorry to interrupt, but I noticed that the paper tab. 4 makes use of iCAN, and I'd like to ask about the implementation details.
Since the transformer-base methods use the Hungarian matching algorithm, how can the results of iCAN be introduced for assistance?
Also could you provide the corresponding code ideas, Thank you.

The transformer-based methods use the Hungarian matching algorithm only for training, not testing. Instead, in our setting, iCAN is only used to evaluate the quality of the detected boxes in the test set.
To be specific:
For the two-stage method iCAN, it is fed with {(b(h), b(o))}_{i=1}^{N} for each image in the test set, and outputs {p_{hoi}}_{i=1}^{N}. Here N is the number of candidate H-O pairs in the image, and b(h), b(o), p_{hoi} is human bbox, object bbox, hoi prediction.
Originally, {(b(h), b(o))}_{i=1}^{N} is from Fast-RCNN detection and exhaustive pairing. In Tab.4, we replace it with the output of our one-stage method, and N is fixed as query size. In the implementation, we save the output of our models and feed it into iCAN via their open-source code.
For the results in Tab.4:
The performance is better than the original iCAN because of the improved quality of H-O pairing. It is worse than the one-stage method because iCAN is not exactly trained via one-stage DETR. However, with higher-quality H-O boxes, iCAN will perform better. Thus, it can measure the quality of one-stage H-O pairing.
Hope it helps.


Inquiry on how to make a custom macro

Hi all! I am currently working on a project involving Clickhouse and Grafana, and using this plugin a lot to help display metrics from Clickhouse in Grafana. All parts of the functionality are working great, I can seamlessly write queries and seamlessly check on my processes as well. However, one subsectionn of the SQL queries that I am writing requires hashing a few variables, leading to a very long hashing section addition to each of my SQL queries. Knowing that there are macros that can also perform tasks on parameters (like $unescape), how could I go about adding a new macro of my own to perform this on a fork of this repo? I'm a bit of a beginner in relation to typescript and plugins in general, so any guidance on files/areas to focus on for my changes would be greatly appreciated!

look to https://github.com/Altinity/clickhouse-grafana/pull/541/files
for example how new marco function implementing
you also need implements unit tests in typescript and golang


Add possibility to clear with an sRGB color

cc @eddyb

Did you consider instead to introduce an enum Color with RGB and SRGB variants ?

There are other functions that will need a dinstinction between RGB and sRGB, for example reading from the color buffer or reading/writing to a texture. These functions will take as parameter or return a Vec<(f32, f32, f32)>.
I think it would be too annoying to manipulate a Vec<Srgb> or a SrgbVec<(f32, f32, f32, 32)> or something similar, so I think it's better to name them read_rgb and read_srgb for example.
Therefore for consistency I wrote the clear_color API to be similar to these.

With implementations for From and From<(f32, f32, f32, f32)>, it would be easier to manipulate.


Final change to title

I think this is a duplicate PR. If it isn't be sure to raise another one!

yaa sure


Translate heading and subheading of  setup/cluster-large/ in Japanese

This is a...

[x]  Feature Request
[ ]  Bug Report

Problem:
No heading and subheading setup/cluster-large/ in Japanese.
Proposed Solution:
Translate heading and subheading setup/cluster-large/ in Japanese.
Copy from en content and Update content/ja/docs/setup/cluster-large.md.
Page to Update:
https://kubernetes.io/ja/setup/cluster-large/

/remove-lifecycle stale

/assign

/close


Roll Flutter Engine from f445898c1a28 to 2500c9df9d4f (2 revisions)

https://github.com/flutter/engine/compare/f445898c1a28...2500c9df9d4f
2022-10-24<EMAIL_ADDRESS>Roll Fuchsia Mac SDK from hfPQ4xGuyeo3i6dMF... to NoR1tj-8OO1r5-vz3... (flutter/engine#36972)
2022-10-24<EMAIL_ADDRESS>Roll Skia from 045af56e8f96 to 9e5a04656443 (5 revisions) (flutter/engine#36969)
Also rolling transitive DEPS:
fuchsia/sdk/core/mac-amd64 from hfPQ4xGuyeo3 to NoR1tj-8OO1r
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Updated the meshkit error for performance_profiles_handler and provider_handler

Signed-off-by: Shreyas220<EMAIL_ADDRESS>Description
Updated the meshkit error for performance_profiles_handler and provider_handler
This PR fixes #3304
Signed commits

[x] Yes, I signed my commits.

@sayantan1413

Codecov Report

Merging #3397 (e4d2031) into master (05cda78) will increase coverage by 0.52%.
The diff coverage is 2.01%.

@@            Coverage Diff            @@
##           master   #3397      +/-   ##
=========================================
+ Coverage    7.02%   7.55%   +0.52%
=========================================
  Files          23      35      +12
  Lines        1409    2754    +1345
=========================================
+ Hits           99     208     +109
- Misses       1303    2499    +1196
- Partials        7      47      +40

Flag
Coverage Δ

e2etests
∅ <ø> (?)

gointegrationtests
2.90% <2.01%> (?)

integrationtests
∅ <ø> (∅)

unittests
6.24% <0.28%> (-0.79%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

mesheryctl/internal/cli/root/config/config.go
1.11% <0.00%> (-1.12%)
:arrow_down:

mesheryctl/internal/cli/root/perf/perf.go
50.00% <ø> (ø)

mesheryctl/internal/cli/root/system/restart.go
2.50% <0.00%> (-0.54%)
:arrow_down:

mesheryctl/internal/cli/root/system/start.go
1.50% <0.00%> (-0.04%)
:arrow_down:

mesheryctl/internal/cli/root/system/status.go
0.00% <0.00%> (ø)

mesheryctl/internal/cli/root/system/stop.go
1.08% <0.00%> (-0.07%)
:arrow_down:

mesheryctl/pkg/utils/auth.go
0.00% <0.00%> (ø)

mesheryctl/pkg/utils/error.go
0.00% <0.00%> (ø)

mesheryctl/pkg/utils/formatter.go
0.00% <0.00%> (ø)

mesheryctl/pkg/utils/healthcheck.go
18.75% <0.00%> (ø)

... and 18 more

Continue to review full report at Codecov.

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

Hey @Shreyas220 consider updating the component_info.json file by updaing the next_error_code to 2048.  Rest it looks good to me. 😊

@sayantan1413 ,Why shift it to 2048 ¿
I see no conflicting error

Hey @Shreyas220 according to your latest change in the handler/error.go the last int code used here is "2047" and as you have manually numbered the error codes so you need to update the next_error_code to "2048" . Now whenever there will be new error code it will get automatically replaced by "2048" when you run the command make error. Actually the next_error_code denotes the latest int code that should be used as the next error code.

@DelusionalOptimist I wonder how we might avoid merge conflicts between PRs for error codes. // @mgfeller

@DelusionalOptimist I wonder how we might avoid merge conflicts between PRs for error codes. // @mgfeller

Can't visualize the merge conflict you're referring to?
Not sure whether it is related, but the sequence of entries in lists (like DuplicateNames) in the summary output will be sorted in the next version of errorutil.

Oh, @mgfeller, it seems @Shreyas220 is quickly (very good) eliminated the merge conflict. There’s another open PR with error analysis conflict. I’ll find it…

Hey @mgfeller like suppose if two of us are working together and making the changes in the error.go file. Then like if I mentioned a error code ErrMe and after running make error I get the int code of ErrMe as "1000" in line number 1 and again the other person working in the same file defined a error like ErrProgram and he also got the errror code as "1000" . in line number 1 After making the changes both of us pushed the code. If suppose my code merges first then the other contributor will get a huge set of merge conflict in the three JSON files as well as the component_info.json and the error.go file.

Hey @sayantan1413 yes, absolutely, makes sense. The json files could just be recreated by running errorutil (analyze / update). Conflicting / duplicate codes are probably new ones (i.e. not yet published), and one of them could be replaced by "replace_me", then updated using the errorutil. next_error_code might need to be handled manually, the next version of errorutil will issue an error if it is lower than the highest code.
My impression is that it is not often that several contributors are working in the same package though, but I have no statistics here :-)
We could observe a bit more and discuss possible measures in a while?

A temporary solution would be creating a common docs for errors, where everyone, before making a PR request, would update the error code and name so we could check if a particular error code is being used ?

A temporary solution would be creating a common docs for errors, where everyone, before making a PR request, would update the error code and name so we could check if a particular error code is being used ?

Hm yes, however, one of the objectives was to avoid centralized handling of error codes, automating everything. Also, this might stick and be difficult to get rid of. I think incorporating in the CI as discussed here on Slack is best, and educate us contributors to not set error codes but use strings.

@Shreyas220 @mgfeller @sayantan1413, the "how to use the MeshKit Errors function" is currently a light write-up, and would benefit from some of your additional perspectives, I'm sure - https://docs.meshery.io/project/contributing-error. Please indulge by expanding on any particulars.
Mind you, "How the MeshKit Error Code Utility works" is a separately documented topic and not intended for the "contributing-error" page, per say. We keep that doc separate because the vast majority of contributors need to know how to use the library, not how it works. That separate doc expects the reader to have at least a Masters-level comprehension of programming languages or a long, gray beard.

@Shreyas220 @mgfeller @sayantan1413, the "how to use the MeshKit Errors function" is currently a light write-up, and would benefit from some of your additional perspectives, I'm sure - https://docs.meshery.io/project/contributing-error. Please indulge by expanding on any particulars.
Mind you, "How the MeshKit Error Code Utility works" is a separately documented topic and not intended for the "contributing-error" page, per say. We keep that doc separate because the vast majority of contributors need to know how to use the library, not how it works. That separate doc expects the reader to have at least a Masters-level comprehension of programming languages or a long, gray beard.

yes @leecalcote ofcourse
i found an issue related to updating the eroror docs(3029), ill continue there 😄

also @sayantan1413  @kumarabd, I think we can merge this branch ??😅


Problem

Analyzer Feedback from IntelliJ
Version information

IDEA AI-191.8<IP_ADDRESS>10548
unknown
AI-191.8<IP_ADDRESS>10548, JRE 1.8.0_202-release-1483-b03x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1366x768

Exception
Dart analysis server, SDK version unknown, server version 1.27.4, error: Bad state: No dart:core, sdk: {
  "runtimeType": "FolderBasedDartSdk",
  "libraryMap": {},
  "directory": "C:\\Program Files\\Dart\\dart-sdk"
}
#0      PluginWatcher._getSdkPath (package:analysis_server/src/plugin/plugin_watcher.dart:111:9)
#1      PluginWatcher.addedDriver (package:analysis_server/src/plugin/plugin_watcher.dart:56:49)
#2      AnalysisDriverScheduler.add (package:analyzer/src/dart/analysis/driver.dart:1846:22)
#3      new AnalysisDriver (package:analyzer/src/dart/analysis/driver.dart:297:16)
#4      ContextBuilder.buildDriver (package:analyzer/src/context/builder.dart:167:33)
#5      ServerContextManagerCallbacks.addAnalysisDriver (package:analysis_server/src/analysis_server.dart:775:48)
#6      ContextManagerImpl._createContext (package:analysis_server/src/context_manager.dart:1189:19)
#7      ContextManagerImpl._createContexts (package:analysis_server/src/context_manager.dart:1251:16)
#8      ContextManagerImpl.setRoots (package:analysis_server/src/context_manager.dart:791:9)
#9      AnalysisServer.setAnalysisRoots (package:analysis_server/src/analysis_server.dart:496:22)
#10     AnalysisDomainHandler.setAnalysisRoots (package:analysis_server/src/domain_analysis.dart:385:14)
#11     AnalysisDomainHandler.handleRequest (package:analysis_server/src/domain_analysis.dart:319:16)
#12     AnalysisServer.handleR

Thanks for the report! Do you know if you are running any analysis server plugins (one you've written, or, if you're working on an AngularDart project)?

This text - Bad state: No dart:core - might mean that your sdk is corrupt; do regular dart commands work? You might try upgrading to a later dart sdk version.

I had the same issue. The problem was that I had installed Flutter and Dart both individually, as Flutter already has Dart in the bin/cache/dart-sdk, I also had added both to environment variables path. My fix was to remove Dart (Standalone Installed One) and also remove it from environment variables path. Finally add the Flutter bin/cache/dart-sdk to my environment variable path.


set channel comand should take discord formattted link to channel

Currently it just expects a string, but it should also be able to parse and use a discord formatted link. See attached photo for failure that should not happen.

Closing because no longer using channels in bot, instead relying on new bot-specific channels in server settings.


Support for more package managers (pnpm & yarn)

Added AddPnpmApp(...) and AddYarnApp(...)
They all run the same underling code so adding a generic method (like bellow) could also be an option
AddGenericNodeApp(string name, string workingDirectory, string packageManager = "npm", string scriptName = "start", string[]? args = null)
public static IResourceBuilder<NodeAppResource> AddGenericNodeApp(this IDistributedApplicationBuilder builder, string name, string workingDirectory, string packageManager = "npm", string scriptName = "start", string[]? args = null)
    {
        string[] allArgs = args is { Length: > 0 }
            ? ["run", scriptName, "--", .. args]
            : ["run", scriptName];

        workingDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, workingDirectory));
        var resource = new NodeAppResource(name, packageManager, workingDirectory, allArgs);

        return builder.AddResource(resource)
                      .WithNodeDefaults();
    }

If this generic method is the approach that the team prefers, I can also submit a PR with this instead
Microsoft Reviewers: Open in CodeFlow

@dotnet-policy-service agree

@davidfowl @DamianEdwards thoughts about taking these in 8.1?

Needs a do over now that we moved everything to packages but I'm fine with it.

@adamtrip did you want to have a go at moving the extension methods over into the Aspire.Hosting.NodeJs package?

Yeah, I can have a go at this

@mitchdenny how do you intend to approach this? David mentioned here https://github.com/dotnet/aspire/issues/2332#issuecomment-2044293585 the possibility of having multiple extensions/packages for each possible scenario.
should these methods be added to Hosting.NodeJs?
I believe that having, npm, pnpm & yarn since they are the most common ones (I think) but also having a generic one where it allows for any command to be used

@adamtrip For your tests can you move them out of the manifest testprogram and instead move them into a folder called Node?

We should also consider changing/removing AddNodeApp since it's pretty much the same as AddGenericNodeApp. Maybe AddGenericNodeApp needs to tweaked to work with node as an executor because of the run flag.

Actually I'd prefer to leave AddNodeApp as is. We'd like to see AddYarnApp
And add PnpmApp.

I've added three methods (already in this PR):

AddGenericNodeApp: It's a general method that allows to use a custom command as an executor: {comand} run start for instance
AddYarnApp: calls AddGenericNodeApp with yarn as node executor
AddPnpmApp: calls AddGenericNodeApp with pnpm as node executor

the reason for creating AddGenericNodeApp is to allow extra flexibility to users that might use some different executor and also to prevent duplicate code. I don't quite know if this kind of flexibility is wanted here.

I believe tests are failing because of pnpm/yarn

I don't think we can ant the flexibility. For people wanting to run arbitrary commands (which is what the generic method amounts to) they should just use AddExecutable(...).

@mitchdenny committed a change to make the method private

I believe tests are failing because of pnpm/yarn

what do you want to do regarding the failing unit tests? from what I could see, it's because pnpm is not installed on the system that runs the tests. to be honest, the pnpm/yarn tests may even be removed because of the similarity with npm. however, that's your call 😄

that makes sense, I'll revert the changes on existing tests and create a new one to check these params.


Hyprland crashing on launch with linux kernel 6.11

Regression?
Yes
System Info and Version
 System/Version info
Hyprland, built from branch  at commit 918d8340afd652b011b937d29d5eea0be08467f5  (flake.lock: update).
Date: Tue Jun 25 12:06:02 2024
Tag: v0.41.2, commits: 4886

flags: (if any)

System Information:
System name: Linux
Node name: fedoraland
Release: 6.10.0-64.fc41.x86_64
Version: #1 SMP PREEMPT_DYNAMIC Mon Jul 15 15:28:59 UTC 2024

GPU information:
05:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3060 Ti] [10de:2486] (rev a1) (prog-if 00 [VGA controller])

os-release: NAME="Fedora Linux"
VERSION="41 (Workstation Edition Prerelease)"
ID=fedora
VERSION_ID=41
VERSION_CODENAME=""
PLATFORM_ID="platform:f41"
PRETTY_NAME="Fedora Linux 41 (Workstation Edition Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:41"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
SUPPORT_END=2025-05-13
VARIANT="Workstation Edition"
VARIANT_ID=workstation

plugins:

======Config-Start======

Config File: /home/srikar/.config/hypr/hyprland.conf: Read Succeeded

# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################

#autogenerated = 1 # remove this line to remove the warning

# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/

# Please note not all available settings / options are set here.
# For a full list, see the wiki

# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia

cursor{
	no_hardware_cursors = true
}

################
### MONITORS ###
################

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-2,2560x1440@180,0x0,1
monitor=DP-1,1920x1080@240,2560x0,1

###################
### MY PROGRAMS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/

# Set programs that you use
$terminal = kitty
$fileManager = thunar
$menu = rofi -show drun -click-to-exit -kb-cancel "Escape,MouseSecondary"

#################
### AUTOSTART ###
#################

# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:

exec-once = waybar & dunst & hyprpaper
exec-once =[workspace 2 silent] $terminal
exec-once =[workspace 1] google-chrome
exec-once =[silent] Discord
#exec-once = hyprctl dispatch focusmonitor DP-2
#exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
#exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox

#############################
### ENVIRONMENT VARIABLES ###
#############################

# See https://wiki.hyprland.org/Configuring/Environment-variables/

env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24

#####################
### LOOK AND FEEL ###
#####################

# Refer to https://wiki.hyprland.org/Configuring/Variables/

# https://wiki.hyprland.org/Configuring/Variables/#general
general {
    gaps_in = 2
    gaps_out = 6

    border_size = 2

    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    # Set to true enable resizing windows by clicking and dragging on borders and gaps
    resize_on_border = true

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false

    layout = dwindle
}

# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
    rounding = 4
    # Change transparency of focused and unfocused windows
    active_opacity = 1.0
    inactive_opacity = 1.0

    drop_shadow = true
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)

    # https://wiki.hyprland.org/Configuring/Variables/#blur
    blur {
        enabled = true
        size = 3
        passes = 1

        vibrancy = 0.1696
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
    enabled = true

    # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
    pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = true # You probably want this
}

# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
    new_status = master
}

# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
    force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
    disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
}

#############
### INPUT ###
#############

# https://wiki.hyprland.org/Configuring/Variables/#input
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.

    touchpad {
        natural_scroll = false
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
    workspace_swipe = false
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}

debug {
    disable_logs = false
    enable_stdout_logs = true
}

####################
### KEYBINDINGSS ###
####################

# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, pkill rofi || $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

##############################
### WINDOWS AND WORKSPACES ###
##############################

# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules

# Example windowrule v1
# windowrule = float, ^(kitty)$

# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.

windowrule = workspace 3 silent, discord

workspace = 1, monitor:DP-2, default:true
workspace = 3, monitor:DP-2, default:true
workspace = 5, monitor:DP-2, default:true
workspace = 7, monitor:DP-2, default:true
workspace = 9, monitor:DP-2, default:true
workspace = 2, monitor:DP-1, default:true
workspace = 4, monitor:DP-1, default:true
workspace = 6, monitor:DP-1, default:true
workspace = 8, monitor:DP-1, default:true
workspace = 10, monitor:DP-1, default:true

======Config-End========

Description
Hyprland crashes when launched with 6.11 linux kernel, booting back into 6.10 kernel allows hyprland to launch again.
How to reproduce
Update to the latest linux kernel and try to launch hyprland.
Crash reports, logs, images, videos
hyprlandCrashReport237.txt

try on git and if doesnt work then give a debug log  of git with AQ_TRACE=1 HYPRLAND_TRACE=1 Hyprland

I have the same bug, after updating can't login in my session anymore (in another DE it's work)

what do you mean 6.11, I've heard about 6.10 only recently 💀

@DADA30000 just look at the log
	Release: 6.11.0-0.rc0.20240719git720261cfc732.7.fc41.x86_64

try on git and if doesnt work then give a debug log of git with AQ_TRACE=1 HYPRLAND_TRACE=1 Hyprland

hyprland-git package does not crash but launches with artifacting issues.

try on git and if doesnt work then give a debug log of git with AQ_TRACE=1 HYPRLAND_TRACE=1 Hyprland

hyprland-git package does not crash but launches with artifacting issues.

like
https://github.com/hyprwm/Hyprland/issues/6994
or like that?
https://github.com/hyprwm/Hyprland/issues/6830

Neither, moving the mouse completely lags and shows random white dots where the mouse path would be and then a second later the mouse properly appears in the spot where it was moved to. If I move the mouse very quickly back and forth there is a lot of white and black dots where the mouse path would be and then after I stop moving it gets fixed after a second.

uuuuh can you try on 6.10 to make sure it isnt the kernel
if it still happens then post a video with debug:damage_blink (btw dont if epilepsy) set to true
and also the hyprland.log

Both hyprland and hyprland-git work fine on 6.10, just checked.

its probably a kernel bug then
i would keep this issue open until 6.11 is mainline and recheck then, just in case

as long as the kernel is not mainline, and it doesnt happen to many people, I'd consider this a non-issue

are you using by any chance the 560 nvidia driver?
this one is currently toast

as long as the kernel is not mainline, and it doesnt happen to many people, I'd consider this a non-issue

Prolly, makes sense to close, for now? If Hyprland isn't gonna work when 6.11 is mainline, we'll hear about that.

today is my last day of the business trip, I can test in the evening CEST, I am already on 6.11 but on
Tag: v0.41.2-48-gf642fb97, commits: 4934
for now

I just came home, recompiled aquamarine-git, hyprutils-git and hyprland-git from AUR
and I can start hyprland with 6.11 and executing hyprland from the tty.
Your logs seem to have an issue with the detection of your gpu driver / gpu, can you try to use your cpu internal GPU if you have any?
maybe related to  https://github.com/hyprwm/Hyprland/issues/6053 ?
~ ❯ yay -Q | grep hypr                                                                                21:08
hyprcursor-git 0.1.9.r9.g4493a972-1
hypridle-git 0.1.2.r10.ge5366d34-1
hyprland-git 0.41.2.r146.54896827-1
hyprlang-git 0.5.2.r8.gadbefbf4-1
hyprlock-git 0.4.1.r3.gcf0e975f-1
hyprutils-git 0.2.1.r0.g5dcbbc1e-1
hyprwayland-scanner-git 0.4.0.r4.ga048a6cb-1
~ ❯ inxi -G                                                                                21:08
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GP107GLM [Quadro P620] driver: nvidia v: 555.58.02
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB
  Display: wayland server: X.org v: <IP_ADDRESS> with: Xwayland v: 24.1.1
    compositor: Hyprland v: 0.41.2-146-g54896827 driver: X: loaded: intel,nvidia
    unloaded: modesetting,nouveau dri: i965 gpu: i915 resolution:
    1: 5120x2880~60Hz 2: 3840x2160~60Hz
  API: EGL v: 1.5 drivers: iris,nvidia,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.1.4-arch1.3
    renderer: Mesa Intel UHD Graphics (CML GT2)
  API: Vulkan v: 1.3.285 drivers: nvidia,intel surfaces: xcb,xlib,wayland
~ ❯ hyprctl version                                                                                2.202s 21:09
Hyprland, built from branch main at commit<PHONE_NUMBER>26a73d7ff19a9a185c977c50d56756  (internal: some minor fd/socket cleanups and make logging thread safe (7123)).
Date: Wed Jul 31 21:00:14 2024
Tag: v0.41.2-146-g54896827, commits: 5032

flags: (if any)

Closing , I stopped using the 6.11 kernel so I cant test the issue anymore.

It doesn't help that nixos decided that the latest kernel is 6.11.1 so imagine my surprise that a normal kernel update with no code change breaks hyprland, apps don't auto start and its just laggy as hell. at first I thought it was my nvidia drivers, but no, they seemed fine because I have a spare window manager to test this stuff.
I have no idea why this kernel update breaks hyprland, but I'd really love a warning somewhere in some rss feed I can read. Because This stuff makes me question everything ... and its scary. hardcoding the kernel version fixes the issue. I couldn't find any logs either that would indicate there was a problem.
I'll try AQ_TRACE=1 HYPRLAND_TRACE=1

I upgraded to 6.11.1 last night with pacman and ran into this same issue.  I downgraded to 6.10 and everything is working as expected.

Imho worth reopening/creating a new issue.

FWIW upgrading to 6.11.2 works great and solved my problem.

just tested it with 6.11.2 on nix (with nividia) and it is unusable, the whole interface is very slow
config for reference is pinned on the profile

I also just tested with 6.11.5 and I get the same as above, really laggy screen, completely unusable. This gained some urgency since 6.10 in nix is EOL'd.

After further testing, it works on current xanmod version available under nixpkgs. So... works for 6.6.58-xanmod1, works for 6.10.4, does not work for 6.11.5. It may be an Nvidia issue as well, as I read that there are some incompatibilities between the 6.11 kernel and Nvidia drivers...

error: linux 6.10 was removed because it has reached its end of life upstream
Okay. Looks like I'm out of options ...
I'm not sure that it is an nvidia problem @IronhandedLayman as it seems to work with other window managers.

https://forums.developer.nvidia.com/t/drm-fbdev-wayland-presentation-support-with-linux-kernel-6-11-and-above/307920/16
Will look through this after work and see if I can come up with a solution, maybe we need to provide a fix for hyprland or I can provide a nix specific fix

Used my lunchbreak for this:
    boot.kernelParams = [
      "nvidia_drm.fbdev=1"

      # TODO: remove after https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692
      # and similar are merged and build in nixpkgs-unstable.
      # WARNING: this disables tty output and thus hides boot logs.
      "initcall_blacklist=simpledrm_platform_driver_init"
    ];

please set up kde until you have enverthing running (or keep enough older generations around, since this makes it so you cannot recover using the tty afaik)

Should this issue be re-opened vaxerski , fufexan ?

No. Kernel policy is to NEVER break userspace. If a kernel update breaks Hyprland, it's not our fault. It's either you're using a weird ass kernel, a faulty kernel update that should be fixed soon, or your drivers broke (wait for an update)

I also just tested with 6.11.5 and I get the same as above, really laggy screen, completely unusable. This gained some urgency since 6.10 in nix is EOL'd.

I am experiencing the same issue.

Thanks to @Daholli as those kernel params have allowed me to run on 6.11 without issue. I would be surprised if the same settings would not work on other OSes outside of NixOS.


Add MAXAR_mesh_variants extension

@kring I finally opened this, it is just the auto-generated code and the improvements to the generator that you made. I had made an earlier attempt at creating a workaround in the generator by introducing the "manuallyDefined" option in the glTF.json. I used the new option in tools/generate-classes/index.json. If that option isn't necessary after your generator changes, feel free to remove it (or let me know and I'll remove it).

Thanks @nithinp7. Please update CHANGES.md in main to mention the new extension.


Avoid predicates on the left edge of lexer rules

https://github.com/davidbrownell/Common_SimpleSchemaGenerator/blob/889f4cc84c956af1e4a3c5491a75dd44d9e3f136/src/SimpleSchemaGenerator/Schema/Grammar/SimpleSchema.g4#L29-L30
Lexer predicates disable DFA edge caching, so you want to minimize the number of times the predicate is seen during lexing. The easiest way to do this is move the predicate from the beginning of the rule to the end of the rule, so it's only evaluated if the input sequence requires it.

Fixed - pending checkin.


docs.rs documentation build is broken for this package

The docs.rs page https://docs.rs/crate/async-graphql-extension-apollo-tracing/latest shows an build error.
See build logs

Fixed, thx :-)


jenkins: helm upgrade

Does Jenkins chart can handle upgrades ? I been trying to add plugins after installation, and it seems like nothing is happening nothing is added to jenkins, I also trying to update admin passowrd from values and nothing happened, am I missing someting ?
I tried: helm upgrade -f values.yaml release stable/jenkins

The values make it into the /var/jenkins_home/config.xml file, but aren't reflected (even after explicit reload).  This may be a jenkins limitation.

+1 seeing the same issue

Thanks for raising this. I will take a look over the next couple of days

It looks like the changed plugins.txt is not copied over because of a cp -n, I have opened a pr to fix this

After overwriting the config, you'd also need to do "Manage Jenkins -> Reload Configuration from Disk", or the Groovy script equivalent.


Reload browser in special conditions

Hi there! Thanks for this good plugin. I have a question about it.
I recently found out that webpack can't reload browser when I changed html file, and save HMR reloading for JS.
I think It can be reached with your plugin. We would write to watch html files for browser sync.
So reloading of JS, CSS is job for HMR, reloading of HTML is job for browser sync plugin.
Could we do that ??
Thanks, Max

hey yo!
for reloading on html changes, the easiest way would be to use html-webpack-plugin. instead of putting static html file in your dist, you use this plugin to render a template and put it to your dist folder automatically. besides other cool features, this just makes webpack watch for changes in the template

Thanks I'll try this out


1.21 update

title

Took a bit longer than I hoped, but released a few days ago! Modrinth | CurseForge


octoscan: init at 0-unstable-2024-08-25

Static vulnerability scanner for GitHub action workflows
https://github.com/synacktiv/octoscan
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 341841 run on x86_64-linux 1

1 package built:

octoscan


Slashes break file paths for certificates

Withdrawing - I don't have time I'm afraid - these were meant to have all been fixed up a while ago.

Ok, thanks @troykelly 👍

Superseded by #1359


Show the correct application deadline for closed briefs

'This opportunity is closed' banner showed the supplier questions
deadline instead of the application deadline.
Also removes the use of | safe on the banner message, since it
shouldn't contain any HTML entities.

:+1:

👍


Add python==3.11.0 support

Hi, Is a python 3.11 support planned for the near future?

I find the current version seems to have compatibility issues with python 3.11. I was trying to install optax in a new conda environment with python 3.11 (using pip command) but I always get the following error message
In file included from /home/xxx/anaconda3/envs/test11/include/python3.11/Python.h:42,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/build/temp.linux-x86_64-cpython-311/_deps/pybind11-src/include/pybind11/detail/common.h:124,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/build/temp.linux-x86_64-cpython-311/_deps/pybind11-src/include/pybind11/pytypes.h:12,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/build/temp.linux-x86_64-cpython-311/_deps/pybind11-src/include/pybind11/cast.h:13,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/build/temp.linux-x86_64-cpython-311/_deps/pybind11-src/include/pybind11/attr.h:13,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/build/temp.linux-x86_64-cpython-311/_deps/pybind11-src/include/pybind11/pybind11.h:45,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/tree/tree.h:21,
                       from /tmp/pip-install-oa_p0aj5/dm-tree_f6a43b01ebba49709890a9c84578be40/tree/tree.cc:15:
      /home/xxx/anaconda3/envs/test11/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      gmake[2]: *** [CMakeFiles/_tree.dir/build.make:76: CMakeFiles/_tree.dir/tree.cc.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/_tree.dir/all] Error 2
      gmake: *** [Makefile:91: all] Error 2

.........................
.........................

File "/home/xxx/anaconda3/envs/test11/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '-j40', '--config', 'Release']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> dm-tree

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

while I installed optax in an environment with python 3.10, everything went well

See PR #91.

dm-tree 0.1.8 has been released (py311 wheels are also available).


Compound physics crash in Ammo when entity.setPosition is used every frame

Does not occur in v1.27.4.
Demo project: https://playcanvas.com/project/693422/overview/1280-physics-type-change (press Space)
By setting the position of the entity every frame, it's dirtying the world transform which in turn removes/adds shapes to the compound parent (in updateCompoundChildTransform)
I don't know why that causes an overflow in ammo stepsimulation and only if the rigidbody is dynamic, a compound and not moving/collision.
Calling entity.getPosition 'fixes' this by undirtying the world transform via sync() call in graphnode.

Related: https://forum.playcanvas.com/t/compound-collisions-maximum-call-stack-size-exceeded/15812/1

Thanks for the great repro project @dexterdeluxe88 - hopefully I can take a look sometime in the second half of next week.

@willeastcott did you have the chance to have a look?


Fix chat example

display actual port in instructions when starting server side.
make debug mode false by default, as otherwise the same peer ID is generated every time because the source of randomness is constant.
fix some typos and comments.

I think, removing addAddrToPeerstore  and using pstore.InfoFromP2pAddr instead of it would be a good idea. It will reduce the complexity of the example.

@upperwal makes sense! updated.

@bigs could you have a quick look, please? super simple.


N8N to use preexisting secrets? (handle env valueFrom)

Hi,
It looks like the chart is heavily reliant in using its own defined secret which is saved with the name of the chart, however my email credentials are already in a different secret.
After reading the chart I notice:
a. Env vars in extraEnv are key:value pairs only and translated into the deployment as an env array as:
env:
  - name: <key>
    value: <value>

b. Any value in extraSecretEnv are key:value pairs as well, in this case the pair is written as part of the chart secret and the value encoded as base64, so now way to read another secret in that way.
My suggestion would be to add an entry in values.yaml called rawEnv where we can write any env as raw Kubernetes list like:
rawEnv:
  - name: N8N_EMAIL_MODE
    value: smtp
  - name: N8N_SMTP_USER
    valueFrom:
       secretKeyRef:
          name: emailcredentials
          key: user
  - name: N8N_SMTP_PASS
    valueFrom:
       secretKeyRef:
          name: emailcredentials
          key: password

Then it can be added to the helpers.tpl as:
{{- define "n8n.env" -}}
env:
  {{- range $key, $value := .Values.extraEnv }}
  - name: {{ $key }}
    value: {{ $value | quote}}
  {{ end }}
  - name: "N8N_PORT" #! we better set the port once again as ENV Var, see: https://community.n8n.io/t/default-config-is-not-set-or-the-port-to-be-more-precise/3158/3?u=vad1mo
    value: {{ get .Values.config "port" | default "5678" | quote }}
  {{- if or .Values.config .Values.secret }}
  - name: "N8N_CONFIG_FILES"
    value: {{ include "n8n.configFiles" . | quote }}
  {{ end }}
  {{- toYaml .Values.rawEnv | nindent 2 }}    <<<<< RENDER ALL ENTRY AS-IS
envFrom:
  - secretRef:
      name: {{ include "n8n.fullname" . | quote }}
{{- end -}}

Of course it would be responsibility of the user to see the values are valid and correctly formatted.

@Spritekin I have clear ideas how to address this and ready to contribute, but my test PR #149 is just ignored :(


There seems to be an error in the comment in simple-add/src/CMakeLists.txt line 30

#
# SECTION 1
# This section defines rules to create a cpu-gpu make target
# This can safely be removed if your project is only targetting FPGAs
#

set(COMPILE_FLAGS "-fsycl -Wall ${WIN_FLAG}")
set(LINK_FLAGS "-fsycl")

# To compile in a single command:
#    icpx -fsycl <file>.cpp -o <file>.fpga_emu
# CMake executes:
#    [compile] icpx -fsycl -o <file>.cpp.o -c <file>.cpp
#    [link]    icpx -fsycl <file>.cpp.o -o <file>.fpga_emu
add_executable(${TARGET_NAME} ${SOURCE_FILE})
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
add_custom_target(cpu-gpu DEPENDS ${TARGET_NAME})

the single command to compile  is not   icpx -fsycl .cpp -o .fpga_emu, because fpga_emu was compile at SECTION 2.

OneSmpl_Team1 working on this


Add unit tests, cuke and implementation for selecting the next or p…

…revious cornerstone case

Found a bug :(

There is a bug, but this can be fixed in another branch


MWPW-140738 - Add foreground gap on large marquees

At some point early on in the life of the marquee block, it must have made sense to remove the .foreground gap for large marquees. Now, however, the current design of all marquees requires it. This PR gives large marquees consistent spacing.

Resolves: MWPW-140738
Test URLs:

Before: https://main--cc--aishwaryamathuria.hlx.page/drafts/dmosier/block-exploration-pages/marquee-text-spacing?martech=off
After: https://main--cc--aishwaryamathuria.hlx.page/drafts/dmosier/block-exploration-pages/marquee-text-spacing?milolibs=ebartholomew-lg-marquee-gap&martech=off

@elan-tbx It looks like the AEM PSI check is having a hard time with your link?


Filtering & Ordering overhaul

Hello,
I would like to use this issue to discuss and hopefully agree on filtering and ordering changes and fixes that I am currently working on.
Filtering
Fix: Custom filter method on nested object missing prefix information
There is potential error or unexpected behaviour (filtering something different) when using custom filter method on nested filter - filtering on FruitConnection
@strawberry_django.filters.filter(models.Fruit, lookups=True)
class FruitFilter:
    id: auto
    name: auto
    color: ColorFilter

@strawberry_django.filters.filter(models.Color, lookups=True)
class ColorFilter:
    id: auto
    name: auto
    fruits: FruitFilter

    special: str

    def filter_special(self, queryset):
        # Incorrect -> Missing prefix information -> color__
        return queryset.filter(name=self.special)

    def filter_special_fixed(self, queryset, info, prefix):
        # Correct -> Prefix is passed in and used
        return queryset.filter(f"{prefix}name"=self.special)

Currently info argument can be ommited. Here I would change it, so all must be defined.
Change: Making all Filter fields optional automatically
I don't see use-case where would someone need mandatory filter field.
Bonus: This change would fix potentional recursion issues. Btw. current example project has it:
❌ Cannot reference Input Object 'FruitFilter' within itself through a series of non-null fields: 'color.fruits'.
Change: Ignoring lookups with None value
Since there is dedicated lookup is_null, lookups with None value would be skipped the same way as they are now if UNSET. This would not apply for custom filter methods.
This change would make usage of filters little friendlier and would get rid of errors when None cannot be used for lookup.
Ordering
Feature: Custom ordering methods
Fix: Ordering order being ignored Issue
The new API that I would suggest here is this:
The ordering argument would be list -> ordering: [FruitOrder!]
Each object in this list must have at most one leaf field otherwise runtime error is thrown.
{
  order_by_one: fruits(ordering: [{name: ASC}]) {
    name
  },
  order_by_one_short: fruits(ordering: {name: ASC}) {
    name
  },
  order_by_multiple: fruits(
    ordering: [{name: ASC}, {color: {name: ASC}}]
  ) {
    name
  }
  runtime_error: fruits(ordering: {name: ASC, color: {name: DESC}}) {
    name
  },
}

Even tho one can use order_by_one_short way to order and thus this might be backwards compatible, exept for the runtime error (that I think would actually be a good thing), probably new keyword ordering should be used and developed as ordering v2?

So here it is. @bellini666 what do you think?

Hello, I would like to use this issue to discuss and hopefully agree on filtering and ordering changes and fixes that I am currently working on.
Filtering
Fix: Custom filter method on nested object missing prefix information
There is potential error or unexpected behaviour (filtering something different) when using custom filter method on nested filter - filtering on FruitConnection
@strawberry_django.filters.filter(models.Fruit, lookups=True)
class FruitFilter:
    id: auto
    name: auto
    color: ColorFilter

@strawberry_django.filters.filter(models.Color, lookups=True)
class ColorFilter:
    id: auto
    name: auto
    fruits: FruitFilter

    special: str

    def filter_special(self, queryset):
        # Incorrect -> Missing prefix information -> color__
        return queryset.filter(name=self.special)

    def filter_special_fixed(self, queryset, info, prefix):
        # Correct -> Prefix is passed in and used
        return queryset.filter(f"{prefix}name"=self.special)

Currently info argument can be ommited. Here I would change it, so all must be defined.

Indeed this would be interesting.
I was already in a situation where I needed the prefix and it wasn't available for me.
The only issue I see with forcing it to be mandatory is that it is a breaking change. Maybe we can do that as long as we can validate the custom filter function at creation time? Because right now it would only be an issue at runtime, making it hard to fix. But if we can raise an issue when creating the filter class, the user can fix everything and ensure that it is working properly.
Another possibility here would be to define it like a custom strawberry field, and retrieve the type from the argument. e.g.
@strawberry_django.filter(SomeModel)
class SomeModelFilter:
    foo: auto

    @strawberry_django.filter_field
    def special(self, queryset, value: str, info, prefix):
        ...

In this case, the value's annotation would be used for the filter type itself, and now we can make info/prefix mandatory (or not).
What do you think?

Change: Making all Filter fields optional automatically
I don't see use-case where would someone need mandatory filter field. Bonus: This change would fix potentional recursion issues. Btw. current example project has it: ❌ Cannot reference Input Object 'FruitFilter' within itself through a series of non-null fields: 'color.fruits'.

They actually are when using auto. But when not using the annotations are respected no matter what.
I do understand that the use-cases for this are probably minimum, but I don't like going against the user's annotation when they choose to be explicit about it (instead of using auto)
Also, regarding the example project, I really need to fix it. It was written in the past and I should have fixed it after my major revamp on v0.10.0
For a more modern demo, there's this repo here which I'm planning on merging here.

Change: Ignoring lookups with None value
Since there is dedicated lookup is_null, lookups with None value would be skipped the same way as they are now if UNSET. This would not apply for custom filter methods. This change would make usage of filters little friendlier and would get rid of errors when None cannot be used for lookup.

For lookups this indeed make sense, but when not using lookups None can be valid in some situations.
Also, what kind of errors do you mean this change would get rid of?

Ordering
Feature: Custom ordering methods
Fix: Ordering order being ignored Issue
The new API that I would suggest here is this:
The ordering argument would be list -> ordering: [FruitOrder!] Each object in this list must have at most one leaf field otherwise runtime error is thrown.
{
  order_by_one: fruits(ordering: [{name: ASC}]) {
    name
  },
  order_by_one_short: fruits(ordering: {name: ASC}) {
    name
  },
  order_by_multiple: fruits(
    ordering: [{name: ASC}, {color: {name: ASC}}]
  ) {
    name
  }
  runtime_error: fruits(ordering: {name: ASC, color: {name: DESC}}) {
    name
  },
}

Even tho one can use order_by_one_short way to order and thus this might be backwards compatible, exept for the runtime error (that I think would actually be a good thing), probably new keyword ordering should be used and developed as ordering v2?
So here it is. @bellini666 what do you think?

I do think a list is the way to go here, but I don't think we can do {attr: ASC/DESC} unfortunately. I mean, if that is an object than it needs to be properly typed in the schema, and the only way to do that would be to create a type with all the possible columns in there, meaning we can't enforce a single column for each element in the list.
What we can do is something like: [{attr: NAME, direction: DESC}], and that attr would be an enum that we can automatically generate based on the available columns
What do you think?

Fix: Custom filter method on nested object missing prefix information
Currently info argument can be ommited. Here I would change it, so all must be defined.

Indeed this would be interesting.
I was already in a situation where I needed the prefix and it wasn't available for me.
The only issue I see with forcing it to be mandatory is that it is a breaking change. Maybe we can do that as long as we can validate the custom filter function at creation time? Because right now it would only be an issue at runtime, making it hard to fix. But if we can raise an issue when creating the filter class, the user can fix everything and ensure that it is working properly.

Reasonable middle groud, I like it.

Another possibility here would be to define it like a custom strawberry field, and retrieve the type from the argument. e.g.
@strawberry_django.filter(SomeModel)
class SomeModelFilter:
    foo: auto

    @strawberry_django.filter_field
    def special(self, queryset, value: str, info, prefix):
        ...

In this case, the value's annotation would be used for the filter type itself, and now we can make info/prefix mandatory (or not).
What do you think?

Yeah, I considered this and like the API more, however since it's even less backwards compatible I did not mentioned it.
I assume the way to go about this would obviously be to forbid any extra arguments for field. Additionally this "resolver" method would have prio and current way would be unchanged and deprecated with warnings?
Yeah I like this better TBH. prefix and info optional with prefix behaviour mentioned in docs would suffice too.

Change: Making all Filter fields optional automatically
I don't see use-case where would someone need mandatory filter field. Bonus: This change would fix potentional recursion issues. Btw. current example project has it: ❌ Cannot reference Input Object 'FruitFilter' within itself through a series of non-null fields: 'color.fruits'.

They actually are when using auto. But when not using the annotations are respected no matter what.
I do understand that the use-cases for this are probably minimum, but I don't like going against the user's annotation when they choose to be explicit about it (instead of using auto)

Yeah, I was overreaching here a bit, maybe have it as a @straberry_django.filter argument? Or just leave it since it's possible via custom Field class?

Change: Ignoring lookups with None value
Since there is dedicated lookup is_null, lookups with None value would be skipped the same way as they are now if UNSET. This would not apply for custom filter methods. This change would make usage of filters little friendlier and would get rid of errors when None cannot be used for lookup.

For lookups this indeed make sense, but when not using lookups None can be valid in some situations.

Completely forgot about non-lookup filters... Maybe use global settings for this or skip None if field has no method and is from FilterLookup class?

Also, what kind of errors do you mean this change would get rid of?

Django does not like None for some lookups
>>> from app.models import Color
>>> Color.objects.filter(name__icontains=None)
Traceback (most recent call last):
  File "/usr/lib/python3.10/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/query.py", line 1436, in filter
    return self._filter_or_exclude(False, args, kwargs)
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/query.py", line 1454, in _filter_or_exclude
    clone._filter_or_exclude_inplace(negate, args, kwargs)
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/query.py", line 1461, in _filter_or_exclude_inplace
    self._query.add_q(Q(*args, **kwargs))
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1545, in add_q
    clause, _ = self._add_q(q_object, self.used_aliases)
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1576, in _add_q
    child_clause, needed_inner = self.build_filter(
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1491, in build_filter
    condition = self.build_lookup(lookups, col, value)
  File "/home/kitefiko/.cache/pypoetry/virtualenvs/strawberry-graphql-django-k3aCGng--py3.12/lib/python3.10/site-packages/django/db/models/sql/query.py", line 1323, in build_lookup
    raise ValueError("Cannot use None as a query value")
ValueError: Cannot use None as a query value

Ordering
Feature: Custom ordering methods
The new API that I would suggest here is this:
The ordering argument would be list -> ordering: [FruitOrder!] Each object in this list must have at most one leaf field otherwise runtime error is thrown.

I do think a list is the way to go here, but I don't think we can do {attr: ASC/DESC} unfortunately. I mean, if that is an object than it needs to be properly typed in the schema, and the only way to do that would be to create a type with all the possible columns in there, meaning we can't enforce a single column for each element in the list.

Yes the object(s) used would be the same as now.
@strawberry_django.ordering.order(models.Fruit)
class FruitOrder:
    name: auto
    color: ColorOrder

@strawberry_django.ordering.order(models.Color)
class ColorOrder:
    name: auto
    fruit: FruitOrder

The enforcement of single value per list item would have to be at runtime.
✔ FruitOrder(name: ASC)
✔ FruitOrder(color: FruitOrder(name: DESC))
❌ FruitOrder(name: ASC, color: FruitOrder(name: ASC))
Advantages

same GQL api for filters and orders
Current solution and objects can be mostly used
Easier for development (recursion etc.) ?

Disadvantages

Runtime check - type is not completely strict

What we can do is something like: [{attr: NAME, direction: DESC}], and that attr would be an enum that we can automatically generate based on the available columns

I had this approach on graphene project, but direction was encoded in enum -> NAME_ASC
Advantages

Strict type

Disadvantages

Not as "clean" API IMO
Nested orders would most likery require explicit definition on enum and could not be "composed" as now

So the actual definition of the order would be pure enum that we would at most validate that is correct against model? What would that look like?
Order custom method "issue"
Since django does not support order_by chaining ( maybe could be done via internals?) would it be OK to require method to return queryset & field to order by (or list of them)?
Something like:
@strawberry_django.filter(User)
class SomeModelFilter:
    first_name: auto
    last_name: auto

    @strawberry_django.filter_field
    def full_name(self, queryset, value: str, info, prefix):
         queryset = queryset.alias(fullname=Concat("first_name", Value(" "), "last_name")
         return queryset, "fullname"

Django does not like None for some lookups

TBH, the current lookups implementation is non optimal for most cases. E.g. it allows one to use range for strings/bools
What I would like to do here is to refactor those to make sure that at least those more basic ones (str, int, date/datetime, bool, etc) have proper options.

The enforcement of single value per list item would have to be at runtime.

Although I can see this working, I'm get really worried with something that can only be validated at runtime, because the user that is going to use the API usually is not the same one that is writing it.
One other thing we can do here is to try to find a way to check for the order the arguments were provided.

Since django does not support order_by chaining ( maybe could be done via internals?) would it be OK to require method to return queryset & field to order by (or list of them)?

I like this idea! :)

First thing I would like to mention is current implementation of auto for bool field when lookups are enabled for Filter class. Currently type generated is bool not FilterLookup[bool] as one would expect. The issue here is that at least one usefull filter is missing - filter all null values out, boolean_field__isnull=False.

Oh, you are correct. I basically ignored that condition, even when I refactored that file.
And yeah, I agree with you. It is currently not possible to filter null from boolean fields.

Do we want to by default provide lookups that technically work or technically work AND make sense?

IMO provide something that work and make sense is the best option, while also leaving room for customization (i.e. the user can subclass the lookup for extra functionality)

For boolean range works, but really makes no sense.

👍🏼 ! For bools, IMO, we want to filter for True, False and None

For strings range works and in some cases even makes sense - user_name__range=("A", "D")

I like to think that I have a lot of experience with sql and django lookups in general, but TIL :)
Doing some tests here, gt/lt/ge/le also works for the same reason range does

For choice field we might want to discard more advanced CharField lookups (contains, startswith etc.) yet those, if used with base type (str, int), might be usefull too.

For choices, the first thing that comes to my mind is to only allow a subset of lookups that makes sense, like exact and in. But when I think of integer choices, gt/lt/etc can be also useful in some situations where those values have meanings (i.e. a weight)
Maybe we should keep those for choices as well?

Only "exact", "iexact" & "range" lookups support None as a value. How do we solve null here? You cant make field required. You might have custom method, but then the behaviour is not "unified"?

Don't know if that is solvable, due to how GraphQL works. You can't make a field not required that doesn't accept null.
This unfortunately falls into the "we can validate this at runtime only", unless the GraphQL spec evolves to allow a solution for this in the future.

After thinking a bit longer and Boolean being the only real outlier, something like this might be good start?

I like the idea here! :)
I would just call BooleanFilterLookup as BaseFilterLookup, as it seems to me that it is the best candidate for a base filter lookup that should work for basically all fields, including 3rd party ones.

Hi, in addition to the custom ordering field, it would be nice to add a way to manipulate the nulls_first and nulls_last parameters

I have quite a silly and naive proposal for ordering customization that covers most of the needs:

Possibility to annotate values whose logic may be hidden within the encapsulation
Sorting by several fields even if one is passed (sometimes a business requires quite complex ordering logic)
Ability to change set nulls_first and nulls_last parameters (WIP)

So for my current situation I use this solution:
def generate_order_args(
    order: WithStrawberryObjectDefinition,
    *,
    queryset: _QS,
    sequence: dict[str, _OrderSequence] | None = None,
    prefix: str = "",
    info: Info | None = None,
):
    sequence = sequence or {}
    args = []

    def sort_key(f: StrawberryField) -> int:
        if not (seq := sequence.get(f.name)):
            return 0
        return seq.seq

    for f in sorted(order.__strawberry_definition__.fields, key=sort_key):
        ordering = getattr(order, f.name, UNSET)
        if ordering is UNSET:
            continue

        ordering_method = getattr(order, f"order_{f.name}", None)
        if ordering_method:
            queryset, ordering_params = ordering_method(queryset=queryset, prefix=prefix, ordering=ordering, info=info)
            args.extend(ordering_params)
            continue

        if ordering == Ordering.ASC:
            args.append(f"{prefix}{f.name}")
        elif ordering == Ordering.DESC:
            args.append(f"-{prefix}{f.name}")
        else:
            queryset, subargs = generate_order_args(
                ordering,
                queryset=queryset,
                prefix=f"{prefix}{f.name}__",
                sequence=(seq := sequence.get(f.name)) and seq.children,
                info=info
            )
            args.extend(subargs)

    return queryset, args

def apply(
    order: WithStrawberryObjectDefinition | None,
    queryset: _QS,
    info: Info | None = None,
) -> _QS:
    if order in (None, strawberry.UNSET):
        return queryset

    sequence: dict[str, _OrderSequence] = {}
    if info is not None and info._raw_info.field_nodes:  # noqa: SLF001
        field_node = info._raw_info.field_nodes[0]  # noqa: SLF001
        for arg in field_node.arguments:
            if arg.name.value != ORDER_ARG or not isinstance(arg.value, ObjectValueNode):
                continue

            def parse_and_fill(field: ObjectValueNode, seq: dict[str, _OrderSequence]):
                for i, f in enumerate(field.fields):
                    f_sequence: dict[str, _OrderSequence] = {}
                    if isinstance(f.value, ObjectValueNode):
                        parse_and_fill(f.value, f_sequence)

                    seq[f.name.value] = _OrderSequence(seq=i, children=f_sequence)

            parse_and_fill(arg.value, sequence)

    queryset, args = generate_order_args(order, queryset=queryset, sequence=sequence, info=info)
    if not args:
        return queryset
    return queryset.order_by(*args)

This may look awkward but I'd love to hear comments.

Hello!
Thank you for the good discussion.

Another possibility here would be to define it like a custom strawberry field, and retrieve the type from the argument. e.g.
@strawberry_django.filter(SomeModel)
class SomeModelFilter:
foo: auto
@strawberry_django.filter_field
def special(self, queryset, value: str, info, prefix):
    ...

In this case, the value's annotation would be used for the filter type itself, and now we can make info/prefix mandatory (or not).
What do you think?

@strawberry_django.filters.filter(models.Fruit, lookups=True)
class FruitFilter:
    id: auto
    name: auto
    color: ColorFilter

@strawberry_django.filters.filter(models.Color, lookups=True)
class ColorFilter:
    id: auto
    name: auto
    fruits: FruitFilter

    def filter_special(self, queryset):
        # Incorrect -> Missing prefix information -> color__
        return queryset.filter(name=self.special)

    @strawberry_django.filter_field
    def special(self, queryset, value: str, info, prefix):
        return queryset.filter(f"{prefix}name"=self.special)

I like this idea.
But, i think this cannot solve nested filter problem with NOT, AND, OR
e.g.) i want to get color objects without special "red"
# this still not works
query getColors{
  colors(filters: {NOT: {special: "red"}}{
    ...
  }
}

Can you have Idea to solve this?
I don't think it's a good idea, but this API also seems necessary
    @strawberry_django.filter_field
    def special(self, queryset, value: str, info, prefix) -> Q:
        return Q(f"{prefix}name"=self.special)

Hello @bellini666,
found some time and created draft PR https://github.com/strawberry-graphql/strawberry-django/pull/478
I believe it solves a lot of current known problems to me - filter bugs, errors on null, custom filters & order methods, nulls ordering, filter methods using Q object, API enforcement
I would love you to take a look to verify overall direction (PR should be fully functional). Verify lookups, API design etc.
Few question

I made filter changes backwards compatible with and default set to new version, however I would love to rip them out completely due to their potential undefined behavior (not using prefix etc.)
Can I try to fixup the dependency hell situation or should that be separated issue?
Should I use one unified ordering enum instead of 2?

Fixed by https://github.com/strawberry-graphql/strawberry-django/pull/478


SVM

Make a contribution under SVM

Hi, Can I contribute to this issue?
Kindly assign this issue to me.

sure there you go ...

I did one contribution to this issue.


A question about GGen(λ)

Hi,
I'm a PhD student who read Dan's hash accumulator paper and I am very glad to find your source code. Thanks very much. I'd like to leverage your program for my application. But I have just one question. I wonder how you implemented generating the group of an unknown order: G = GGen(λ). I see you added "use accumulator::group::UnknownOrderGroup;". But is this an external library you use?

Hi @gogo9th, and thanks for the question!
The crate being referenced is actually here, and this repository is just a demo of how to use that crate. Please let me know if you have trouble finding anything further.

Hi whaatt,
Thanks very much for your quick and kind reply. I will look into that link. Have a nice day!


WIP: Create an F# implementation

This is a WIP for creating an F# implementation of message templates.
Tasks

[X] make F# + tests project and have the appveyor build work
[X] migrate tests to F#, running them against the C# impl. for confidence
[X] implement (mostly) based on Regex for experimentation / learning purposes
[x] implement the fast version

F# parser is just about there now!


feat(hints): add NewHint#32

Description
This PR adds the missing hint NewHint#32, now known as IS_ZERO_INT.

I'm not sure what's wrong with Pedersen but it's the third time it erratically reports becoming much slower only to normalize later. I'll review it later, but could you trigger the benchmarks before merging just in case?


storage: fix block rows not match when filter column is the first non-empty column in the block

What problem does this PR solve?
Issue Number: ref #9472
Problem Summary:
What is changed and how it works?
Try to fix #9472, failed to reproduce the issue. But when the filter column is the first non-empty column in the block, block.rows() = filter_column->size(), but filter_column is not filtered, so the rows may not match.
But filter_column is usually added to the back of the block, so it is kind of weird.
storage: fix block rows not match when filter column is the first non-empty column in the block

Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/retest

/test pull-integration-test

/test pull-integration-test

fullstack-test2/ddl/rename_table_across_databases.test

/retest


Generated by :no_entry_sign: Danger


what is this?

I select 3 but say me phone number
app/index.js have problem <3

create account first, make sure you use old telegram if you use session , or use query instead

after 3 day try, Now I realized that it does not work based on the session
just Query...

after 30 min query ids expire can made on session please?


Expose API to create worker (headless program)

First off -- thanks for Elm and the Navigation package!
It's great that Elm 0.18 no longer requires the view = always (Html.text "") boilerplate for workers, via Platform.program.
It would be really practical for that option to be available in Navigation programs too. Are there plans to add this? I have a number of "headless" Navigation programs that respond to URL changes but have no view.

Why would you want this? No view, but runs in a browser?

I'd want it to provide interactivity to a web app that's server rendered. (Without the "Single Page App" paradigm.)
It's en vogue to make every web app a SPA rendered by JavaScript, but not everyone is doing it. It's not the best option in every case.
I have a fully featured app doing this; I just get around it by mounting to a node that isn't attached to the DOM.

I've found headless programs are good way for React projects with many newbies to migrate to Elm. Put the biz logic in Elm keep the views in react. It working quite well, but now the desire is to take the next step and have Elm handle the navigation.