mDNS service for OTBR

Possible Use Case
Thread mesh networks typically result in dynamic router tables and the intention of the self-forming and self-healing routing algorithm allows devices to pick up IP addresses as per availability. Border Routers being gateways, usually host important end-points and would benefit from publishing and discovering RCPs. For instance, I have a network with multiple RCP+OTBR and would like to be able to ping them as otbr1.local, otbr2.local, otbr3.local, etc. assuming their hostnames are otbr1, otbr2, etc.
Alternatives I have considered
I have tried configuring avahi to allow mdns through wpan0 but haven't succeeded. Is there something that needs to be added or is there something I'm doing incorrectly?

@vijayrao1988 Do you want to ping from Thread end devices or Wi-Fi/ethernet hosts?
For ping from Thread end devices, @abtink @simonlingoogle I believe the "ping otbr1.local (otbr1.default.service.arpa)" function can be implemented with the OpenThread DNS client and server.

I would like to ping from Thread end devices.
The Thread network is completely made up of [RCP + OTBR (Single Board Computer)] devices.

@abtink and @simonlingoogle, would you be able to point me in the right direction please with the DNS Client and Server that @wgtdkp mentioned? I would also like to see how much of an overhead this would generate.

@vijayrao1988 , take a look at our Thread Border Router - Bidirectional IPv6 Connectivity and DNS-Based Service Discovery Codelab.

To ping otbr from thread devices using domain names, I would suggest to use SRP instead of mDNS.

Each otbr should register a SRP service

srp client host name otbr1
srp client host address ML-EID
srp client service add otbr1 _br._udp <port>

Now, you can browse or resolve the services from any thread device:

dns config <srp-server-up>
dns browse _br._udp.default.service.arpa
dns service otbr1 _br._udp.default.service.arpa
dns resolve otbr1.default.service.arpa

Closing stale issue.

Thanks for your help!


Localization

Are there any services that do string translation? Could we just Google translate it?

So it's probably 100% overkill, but ages ago I used CrowdIn (free for open source) which has full support for iOS strings files etc
Provides a nice dashboard to see all the strings that need translating, interface for selecting all the different languages etc, as well as "machine recommended" (aka Google Translate) suggestions for easy translations
Found it very useful in past, but yeah maybe super overkill
(I should get sponsored by all these people I'm linking to 🤔)

Oh and IIRC they have a Fastlane integration to make sure translations are always up-to-date 😉
I know the way into your heart

I can translate to Dutch and probably find someone to translate to German 😇

Happy to translate in French!

I can get help to translate to Chinese simplified.
Sent with GitHawk

I am happy to review to @BasThomas Dutch translation :) At work we are using LocalizationKit which allows to change resource strings without recompiling. It's written by a work colleague of mine.

I'm in for danish translation 🚀

On longterm solutions: I was looking into making a script that would improve genstrings; instead of replacing, it would add new localizations and remove unused onces, while keeping the localizations already translated. Then I found this, a Python script that tries to do exactly that.
I don't know what services like the ones that @Sherlouk mentioned would do over that, but would definitely like to know more about that. Otherwise, I'll do some testing with said script and see how it works.

Some recommended services after reaching out to Twitter:

https://unbabel.com/
https://www.transifex.com/
https://poeditor.com/

Sent with GitHawk

You also have https://lokalise.co which seems to be targeted towards iOS and Android apps

@BasThomas so with my understanding of the tools, we'd actually want them both to work in harmony (although if I recall correctly CrowdIn and likely some of the ones Ryan linked would have it built-in).
The benefits of the web services is sort of the convenience factor? Essentially all the strings are (automatically) uploaded to their site, anybody (or certain people depending on the service) can then go in and add new translations, update translations, etc. So if new strings are added, it'll say "Dutch 90%, 5 new translations needed" then you can go in and provide the new translations.
Using a fastlane integration (or just command line) this will then pull down the new translated strings and put them into the bundle for releases.
So what does this really mean?

Once a PR is merged into master, if new strings were added that weren't localized then through the website anybody can go and populate the new fields
Anybody can comment on translations (nieuwe v nieuw) meaning reviews are much easier
New languages can be added super easily, one string at a time by the community over time
App Store metadata can be in the same place (#563)

All of the tools have minor differences, lokalise looks very good because you can upload screenshots for context. Most of them have "Clever translations" (where it tries to suggest translations).
For me it's making the process a bit simpler moving forward, I don't want to worry about adding new strings and then asking 10 people to provide translations in separate pull requests and having to manage all of that!
I may have missed a bunch of stuff so prompt if I'm not selling the idea enough 😂 (Had limited experience with it at work, was very helpful though!)

I'm convinced! Let's go with lokalise? Few questions:

Do we need to do anything impactful for which we want to hold off Dutch translation now?
If we go that route - and encourage others to contribute there - how do we "market" it?
Regarding the above, we should then add useful comments to the NSLocalizedStrings. I've actually been missing it during translation to Dutch, as sometimes I didn't have enough context to translate correctly - I'd suggest having an example here that would explain context.

So nothing should stop us from getting the Dutch translations in, most of the tools have an import option which will take the strings files and just populate all the fields!
I'd say we open up the dashboard so anybody can hop on and translate, or at least review (you can make it so certain "trusted" people have the final say) - Link it in the README/Web/Twitter etc like we do for other things but also maybe setup a new label for "Localization Requests" and then put down the languages we want to priortise? Can obviously link to the right page and get tagging people and 🤞
Definitely agree on comments!
Lokalise require messaging them for a free open-source account so it'd probably be up to Ryan to reach out and gain us access!

Great idea, I would happy to try to set it all up


Removed special scaling for throttle in HIL

Fixes #5787

Against which HIL interface did you test this?

Actually using Gazebo and piping messages with Mavros, so not one of the supported setups.  I'm not setup to check it with X-Plane; if someone else could that would be great.

I guess this will break HIL with x-plane. Will try to have a look at this tomorrow.

@bartslinger Could you test?

I was confused because of https://github.com/PX4/Firmware/issues/5787 and https://github.com/PX4/Firmware/pull/5716
I cannot test at this moment, but by looking at the code I can tell that it will not work correctly. Throttle in X-Plane is scaled 0:1. Actuators in X-Plane are scaled -1:1. It will need a fix here as well: https://github.com/mavlink/qgroundcontrol/blob/master/src/comm/QGCXPlaneLink.cc#L469


Radium seems to slow down framerates

Hi , i have made a simple test with react motion.
As soon as i add the @Radium decorator it slows down quite a lot.
The difference isn't really noticable on desktop, but on a mobile device it is a big difference.
please see the tests here : https://github.com/Aaike/react-motion-radium-test
There are links to 2 tests.
The only difference in the 2 demos is the addition of the @Radium decorator.
Please look at those tests with a chrome browser on a mobile device.
Do you have any suggestions to avoid this drop in performance ?

I experience the exact same thing, tested on Nexus 5 using chrome remote debugging and port forwarding.

@ianobermiller any idea of what could be happening ?

FYI, I just checked and the same thing is happening with Radium v0.14.2
Does anyone else using Radium on mobile app ? Because the issue should be obvious pretty fast if you do...

Try adding shouldComponentUpdate to Item. PureRenderMixin would probably work fine. We knew Radium's approach to walking and potentially cloning rendered elements could be slow, and it looks like are running into it here when you have dozens of items trying to render at 60fps. But, since the props to Item itself isn't changing, you shouldn't actually need to render it again.
Of course this doesn't work if your animated props are passed as styles that you want to pass to Radium, but I'll bet in most cases you can encapsulate the Radium component on its own, with shouldComponentUpdate, and avoid the perf hit.

So, I cloned the repo and looked into this more. Turns out that shouldComponentUpdate will probably help, though I didn't test on mobile, I did some profiling. Naive sCU with the shallowCompare addon is a bit slow, since it loops through both props and state. In this case, we know the props never change (assuming we fix onChange to not be a bound function, thus changing every time), so we can just use:
  shouldComponentUpdate(nextProps, nextState) {
    return this.state !== nextState;
  }

Profiling after adding sCU showed that almost no time was spend in Radium anymore, proportionally which makes sense, since Radium is only called on render.
Since the animations are smooth, searching for a single letter, "a", causes the list to rerender 80 times within a second or so.

I think we may need some documentation about this.

Would love to see some docs on how and when to avoid perf issues with Radium


Backport clustertemplates and services from develop

This matches the cookbooks in caskdata/coopr-provisioner#102

:+1: lgtm


Document security properties

There is a widespread belief that a cryptographicly secure hash is needed. See: https://github.com/rurban/smhasher/blob/master/README.md#security
Beyond what is already documented in https://github.com/tkaitchuck/aHash/wiki/Attacking-aHash-or-why-it's-good-enough-for-a-hashmap
There should a wiki page should be created to explain:

How DoS attacks on hashes actually work and why even 'strong' hashes are susceptible.
What properties are actually needed.
How aHash satisfies these.

Should explain why standing up to impossible differential crypto analysis is not actually required.
It would also be good to walk through differential crypto analysis to show why input cancelation does not work on aHash.

Done: https://github.com/tkaitchuck/aHash/wiki/How-aHash-is-resists-DOS-attacks


Publish for Maximum call stack #373

Not to nag, but been waiting for this to get published: https://github.com/nfl/react-helmet/issues/373
According to the last comment, it should have been released two weeks ago. npm says the last publish was about then, but there is no change in version. If there's no pending patch, I can switch libraries. Looking for clarity here so I can fix a critical bug we've had while away on holiday.

Hi, we published a beta build. Try running that?
https://www.npmjs.com/package/react-helmet
npm install<EMAIL_ADDRESS>should do it.

Okay, had a feeling the beta was the way to go, but was unsure about its stability. Thanks @tmbtech

Check the comments in https://github.com/nfl/react-helmet/pull/421 on the breaking change

Sorry for the lack of communication, it's playoff season and we are swamped. Looking forward to your feedback on the beta, it should be pretty stable.


java resources

Hello @rupali-codes , I have done with adding java resources from which I particularly learned java, not just resources added youtube channels also! Closes #703
So if you found it a valuable contribution, please accept it.
Thank you!

@P766-spec hey could you please reference the issue correctly? please add closes #703 in the description of your PR

Done!

I have done nothing with .vscode , could you please specify what exactly I got to do??

Okay got with .vscode wala , Donw with uncommit
now could you please review it and let me know if there is any other thing? @rupali-codes

Ouhhh okayyy Sorry!, will do it @rupali-codes @CBID2

Done with the suggested changes! @CBID2

@P766-spec please uncommit your changes under .vscode dir, other than that, looks good to me

I have done it already ?? didn't understood what exactly your are talking about

@P766-spec please uncommit your changes under .vscode dir, other than that, looks good to me

I have done it already ?? didn't understood what exactly your are talking about

I can still see that in filechanges. I'm asking you to remove that from the PR 😊

Okayyy sure will do it
On Sat, 3 Jun 2023, 19:38 Ujjawal Tyagi, @.***> wrote:

@.**** commented on this pull request.
@P766-spec https://github.com/P766-spec I don't think we have Java
sub-category in languages section. So you basically just added bunch of
resources to the database with no frontend to show those resources !

Try creating a new sub-category first if any category doesn't exist
Run and test things on your local system to see if your changes are
being reflected or not and ADD screenshots in the PR description as it will
save a lot of time while reviewing PR :)

—
Reply to this email directly, view it on GitHub
https://github.com/rupali-codes/LinksHub/pull/880#pullrequestreview-1459460719,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVR2T2XBTHTNPZW3PWNLMFLXJNAOFANCNFSM6AAAAAAYWYGCJM
.
You are receiving this because you were mentioned.Message ID:
@.***>

I am Sorry but could you please tell me how to remove it?

@P766-spec checkout this

@P766-spec checkout this

what shall I do now I am new to this revert one please tell


GC array.init_data requires the data count section

The array.init_data instruction from the GC proposal requires the data count section in the binary, just like array.new_data.
I have to say, this needs_data_count stuff seems fragile and expensive for very little gain. Is a scan of all instructions in the module really worth it to save, like, three bytes?

Thanks!
This isn't so much about saving three bytes as adding compatibility with parsers that don't support the data count section. When this was first added for example nothing supported the data count section in a stable fashion. Almost all engines now support it, though, but I don't know if folks are still trying to target MVP engines/targets or such. Until this is a problem I figure we may as well keep it, but when it becomes a problem I think it's best to remove it.


Global and class macros having precedence over methods

Global macro methods seem to get precedence over instance methods of the same name.
Example code (carc.in):
macro render(foo)
  {{ foo.downcase }}
end

class Foo
  def render
     render(nil)
  end

  def render(env)
  end
end

Foo.new.render

Compiler output:
Error in line 14: instantiating 'Foo#render()'

in line 7: expanding macro

in line 2: undefined macro method 'NilLiteral#downcase'

in line 7: undefined macro method 'NilLiteral#downcase'

The same happens when the macro is defined inside Foo.
In both cases this behaviour is highly unexpected and probably never really intended: If you try to call an instance method from within the scope of the same object, this should not at all trigger a macro instead. Neither from global nor from class scope. Especially when using libraries, they could not possibly take into account any macro that might be defined by an application.
I doubt that macro methods should be directly visible inside instance scope at all. It's easy to confuse them with instance methods. I'd expect their visibility to be equal to class methods, they can not be invoked from an instance method without scoping the call to the class (self.class.class_method or MyClass.class_method). To call a macro from inside an instance method, I think it should be prefixed with the class scope - or global scope (::) if it is a global macro - and not implicit.
A practical example of this isssue is described in kemalcr/kemal#359 . As already mentioned there, this issue can be worked around by adding an explicit scope: self.render(nil) in the sample code. The example for liquid.cr from @icyleaf is different, since tpl.render(ctx) has already an explicit scope but still invokes the global macro. I can't figure out why exactly this is failing but it also seems to be a naming conflict between instance method and macro method.
//cc @sdogruyol @jeromegn

Duplicate of #236

I fixed this. Now when macros are looked up and not found, but a method with the same name in the same scope is found, search doesn't continue up in the scope hierarchy. This should be much more intuitive and robust to program with.
It will be available in the next release.


License

Hi,
Thanks for releasing this node! Would you mind adding a license?
Thanks!

Good point, thanks, done.

Thanks!


unix: replace futimens with utimensat

futimens is not available in Android NDK before version 19:
https://stackoverflow.com/questions/19374749/how-to-work-around-absence-of-futimes-in-android-ndk
The reason is that bionic libc didn't implement this wrapper for
utimensat.
utimensat syscall was available before that, so it is more compatible.
Fixes #56

Just tested, ndk-build does not fail with this fix for me.

I feel like every few months this crate changes what exact syscalls are used for doing all these operations, and unfortunately at this point I can't really keep track of the changes. I have no idea at this point if this change will break on other platforms or not. I think that someone needs to go through the history of this crate to see if this will either work or not work, and if it won't work for other platforms then this should probably be android-specific rather than applying to all unix platforms.

@alexcrichton
I have just removed utimens.rs modification, it was not needed.
Now PR only modifies utimensat.rs. Previously utimensat.rs used both utimensat and futimens. Now it only uses utimensat. If utimensat.rs worked for some platform previously, it will continue to work, because I am not introducing any new dependencies, only removing one.

Ok looks good, thanks!

Hm actually, to confirm, have you tested this?
the man page has what seems like a scary warning about passing null as the path name:

   C library/kernel ABI differences
       On Linux, futimens() is a library function implemented on top of the
       utimensat() system call.  To support this, the Linux utimensat()
       system call implements a nonstandard feature: if pathname is NULL,
       then the call modifies the timestamps of the file referred to by the
       file descriptor dirfd (which may refer to any type of file).  Using
       this feature, the call futimens(fd, times) is implemented as:

           utimensat(fd, NULL, times, 0);

       Note, however, that the glibc wrapper for utimensat() disallows pass‐
       ing NULL as the value for pathname: the wrapper function returns the
       error EINVAL in this case.

Hm actually, to confirm, have you tested this?

I have tested it on android, which uses linux kernel and bionic libc.
However, this code is also used on freebsd/illumos etc., where I have not tested, chances are it will break:
https://github.com/alexcrichton/filetime/blob/7443ddc1cf57c567a84d442b5b4f53efd124df96/src/unix/mod.rs#L15
Will do a follow-up to use utimensat with NULL only on android then, thanks for noticing.


MUI TreeView rendering issues

Hello Team,
To display our results, we are using the most recent mui versions and the TreeView component. However, due to the large amount of nested data, MUI TreeView components become stuck during expand and collapse. Any workarounds or suggestions for resolving this issue would be greatly appreciated.
Thanks

Any suggestions?

Hi @smo043, could you please provide a repo with a reproduction that I could clone?

@samuelsycamore - It was on my actual project, I don't have a repo. But I can say, you can create deeply nested at least 4 levels in one parent. for example
{   "children": [     {       "id": "parent 1",       "children": [         {           "id": "child 1",           "children": [             {               "id": "child 1-1",               "children": [                 {                   "id": "child 1-1-1",                   "children": [                     {                       "id": "child 1-1-1-1",                       "children": [                         {                           "id": "child 1-1-1-1-1"                         }                       ]                     }                   ]                 }               ]             }           ]         }       ]     },     {       "id": "parent 2",       "children": [         {           "id": "child 2",           "children": [             {               "id": "child 2-1",               "children": [                 {                   "id": "child 2-1-1",                   "children": [                     {                       "id": "child 2-1-1-1",                       "children": [                         {                           "id": "child 2-1-1-1-1"                         }                       ]                     }                   ]                 }               ]             }           ]         }       ]     }   ] }

Tengo el mismo problema, ¿Hay algún avance sobre esto?

Duplicates https://github.com/mui/mui-x/issues/10300, closing this one


Read configuration to include widget or not

The config file has an option to disable the widget, but it's not read in the code.

Thanks, @buzkall ! I made a new rls v3.0.3


Threat Detected: Aborting Server Start

Get this every time i try to start the image, ive set the env variables correctly. Any assistance?

It means the variable ADMIN_PASSWORD in default.env hasn't been changed in the container. If you're using the docker-compose.yml, be sure to change the passwords in default.env


fix: FluentNavMenu jams

🐛 Bug Report
Initially closed FluentNavMenu can not open.
💻 Repro or Code Sample
https://github.com/ArturMichalak/MenuLatchReproduction
Commit with the problem case:
https://github.com/ArturMichalak/MenuLatchReproduction/commit/b46e54b783e4f2ba48d71d14b938ac05daf15698
🤔 Expected Behavior
Allow navigation to open when the expand button is clicked.
😯 Current Behavior
The navigation jams.
🔦 Context
It may be related to the empty SectionContent on the home page.
At this moment I made such a workaround:
protected override void OnAfterRender(bool firstRender)
{
    if (_isExpanded)
    {
        if (_isAfterFirstRender) // closing the menu can only be done on the second render, otherwise it gets stuck
        {
            _isExpanded = false;
             _isAfterFirstRender = false;
        }
        else _isAfterFirstRender = true;
        StateHasChanged();
    }
    base.OnAfterRender(firstRender);
}

🌍 Your Environment

OS & Device: Windows on PC
Browser Google Chrome 125.0.x.x
.NET and Fluent UI Blazor library Version 8.0.200 and 4.7.2

Hi,
It get stuck because you set _isExpanded to false in OnInitialized (in Nav.razor). The NavMenu operates under the assumption that it is initially expanded/visible.
If you remove that whole method the NavMenu works as expected.


ALL MAPS - Bus Interchange

Can you please place a label over the bus Interchange - the same or similar as current map
e.g.

Sorry Claire, you might have to zoom the screen shot out a little so I know where you are looking. These issues will either be something that GIS will have to solve, or its possible that this is part of the Google Maps component, which we don't have control over.  If you can give another screenshot zoomed out a little I'll be able to point the issue in the right direction.

Ignore - this one the image came up later on - may have just been a speed loading issue. But imagery is definitely there now.


Integration android aar

Android AAR Integration project with CI

Sorry for the delay, @CedricGuillemet, just getting to this. Yes, you can bundle .so and JS files into a JAR file, and it appears to be able to find everything as expected. I have a minimal demo where I bundled a Java class, a small C++ library, and a JS resource file into a single JAR and was able to use them all in an Android app by just drag-and-dropping them into my Android Studio project's libs directory.

No approval in 2 months. Closing.


consider not modifying the node exporter user if it already exists

Using the node_exporter role without fully checking all the steps (mea culpa), I was astonished to find out that it had reduced the user I wanted to run node-exporter as to a no-login, no-home, system user. This then caused other issues with other services running under this user's name and that very much expect to have a home directory of their own.
I think the role should check whether the user already exists and not modify the user if so.
The service file should then also not include ProtectHome=yes as this would effectively disable it from accessing its own home, where, in my case all the metrics prom files are written to.

No, we want our Ansible roles to be idempotent. We need to maintain all configurations in order for this policy to be maintained.
ProtectHome is a different issue, we can add a check like we do for mounts to not enable ProtectHome if the textfile path contains /home.

I'll still need to use a fork for my own purposes, but I understand that this may not work for all. The latter part is a sweet and rapid improvement :) cheers


add next-i18next

You can test by accessing /en/about and /ko/about.
https://github.com/isaachinman/next-i18next

Hi @JaeMeDev, thank you for creating this PR. This feature is indeed asked by several people: https://github.com/ixartz/Next-js-Boilerplate/issues/13
My concern is about next-i18next, it relies on Next.js Internationalized Routing: https://nextjs.org/docs/advanced-features/i18n-routing
And, this feature will break the support for next export.
Is it correct? I have never tried it.

Yes, you're right. It does break next export. It doesn't matter whether you use react-intl or next-i18next or any of the other packages, the base will always be the i18n stuff from next itself. And that will always break 😅
This has been a nextjs issue for years.

@harrybawsac, thank you for taking to share your experience. What about not to rely on next.js for i18n? Just rely on classic react i18n package.
Currently both are supported export and non export. So, you can still enjoy /api, image optimization and other things.

Seems a bit like a roundabout way when Next has i18n stuff already build in.
Also, I get this nasty feeling how everything within the i18next ecosystem is nudging developers towards using Locize.com.

Haha, I have exactly the same feeling with Next.js and Vercel: the latest Next.js release are more targeting Vercel users.


Clicking on deactivate does nothing

Version - master 3/18
Steps to Reproduce:

Authenticate using local auth
Go to Account and try to deactivate last admin account

Results: Nothing happens
Expected: Maybe an error message should pop up saying that you cannot deactivate last admin account. Or maybe the menu item should be disabled?

Version - master 3.20
Verified fixed


Physics2DDirectSpaceState.get_rest_info() returns incorrect collision results.

Godot version:
569e9c1d5
OS/device including version:
Win10 64-bit
Issue description:
The normal and collision points returned by get_rest_info() physics query in 2D are often wrong.  Test motions show the correct results, the problem here is there is no work around for when you want to do these queries against Area2Ds.

The expected result is in green, the result given by get_rest_info() in red.
Steps to reproduce:
Query motions with Physics2DDirectSpaceState.get_rest_info().
Minimal reproduction project:
Rest Query.zip

Not familiar with SAT algorithm, but traced through the circle collision test and it appears at least to be choosing the wrong best axis around this line:  https://github.com/godotengine/godot/blob/d711c57d767734887fbf0955a7b9902c54498a0d/servers/physics_2d/collision_solver_2d_sat.cpp#L296
Doubt this is the cause though, probably occurs between this point and what is passed into the collision solver: https://github.com/godotengine/godot/blob/d711c57d767734887fbf0955a7b9902c54498a0d/servers/physics_2d/space_2d_sw.cpp#L438

@madmiraal Maybe you might be interested in this one.

The SAT algorithm simply checks whether or not there is a collision by checking whether or not there is a space between two objects. It does this efficiently by only checking along specific directions or "axes". In objects created from lines, the axes are the edges of the object. In the case of two circles it uses the perpendicular of the line between the centres.
To check whether a specific motion will cause a collision, it stretches the moving object in the direction of motion. In your example, of two circles, it will effectively convert the moving circle into a capsule stretching from the "current" to the "future" positions. It then checks two additional axes: in the direction of motion (will it collide?) and its perpendicular (will it reach?).
The SAT algorithm is not used to calculate the normal. Instead, if there is a collision i.e. no gaps, it simply uses the perpendicular of the axis which resulted in the minimum overlap.
You see two different normals, because the move_and_collide() function also determines the maximum distance it can move without colliding and the minimum distance it can move and still collide, by doing a binary search; calling the SAT algorithm each time. it uses the minimum distance it can move and still collide to just overlap the two objects, and the normal is calculated using the perpendicular to this tiny overlap.
The get_rest_info() function does not do the binary search. In your example, the "final" position does not result in a collision, so the normal is calculated from the minimum overlap of the stretched (capsule) object only, and the minimum overlap is in the direction perpendicular to the motion. Since the overlap at the top and bottom are equal, it just happens to use the bottom.
If you reduce the test motion to 120, the "final" position is a collision, and both normals will be the same.

Many thanks for the detailed explanation.  I see now, I mixed this method up and also forgot it has this line in the docs the same as intersect_shape():

Note: This method does not take into account the motion property of the object. The returned object is a dictionary containing the following fields

Closing this, as it is working as described.  Been trying it as a work around since the PhysicsServer2D.body_test_motion() doesn't have an option to test against Area2Ds.


Use cupy to measure memory leak

While adding support for Python 3.12 in #773, we found a problem where GPUtil does not support Python 3.12 (#775).
This PR removes the dependency on GPUtil and replaces it with cupy, which is already a dependency.
Closes #775. Closes #776.

Thanks @bdice for fixing the issue!

/merge


Allow http-client 0.7

Tested to build fine here.

@felixonmars: Thank you! 🙂
I added a matching revision to Hackage


Can not access spaces in profile menu

What steps will reproduce the problem?  See spaces
What do you get instead? 'You are not permitted to access this section'
Additional info

Q
A

HumHub version
1.?

PHP version

Operating system

Note: Please use the [community](https://community.hu

mhub.com) site for any questions on customizing HumHub.
Note: Also provide the full error stacks from Administration --> Information --> Logging and errors from your browser console if possible.

closing it , old issue


Cannot get async await to work

I found this lib and it seems very promising. Promising leads me to my issue ;P I'd like to use async/await and cannot get it to work.
I got a Node api with express and typescript and I would like to use async/await for awaiting the data from my profile-service:
It works fine if I do not use async/await and use a callback instead. If I implement async/await it seems like my api just times out.
What I'd like to do is send an event profile:get, await the data and send the response to the user.
It seems like the issue is not the Profile service but lies in the api-service. I am sure that there is something simple that I am overseeing
Profile service
const { Responder } = require('cote');

new Responder({ name: 'Profile Service' })
    .on('profile:get', ({ payload }, cb) => {
        cb(`Hello from Profile! Payload: ${payload.id}`);
    });

Api routes:
This works:
app.get('/profile/:id', (req: Request, res: Response) => {
            client.send({
                type: 'profile:get',
                payload: { id: req.params.id }
            },
                (response) => {
                    res.send(response).status(OK);
                });
        });

This Doesn't work:
app.get('/profile/:id', async (req: Request, res: Response) => {
            const profile = await client.send({
                type: 'profile:get',
                payload: { id: '42' },
            });

            res.json({ profile }).status(OK);
        })

Hello 👋 the issue here is mixing and matching async/await with callbacks. If you use a promise in Profile service instead of a callback, it’s going to work. Let us know if this helps.

@dashersw Thanks a lot...
Changing my profile service to use a promise works.
I knew that there were something very simple that i'd didn't see :)
const { Responder } = require('cote');

new Responder({ name: 'Profile Service' })
    .on('profile:get', ({ payload }) => {
        return Promise.resolve(`Hello from Profile! Payload: ${payload.id}`);
    });


Reorganize apply_ufunc/map_blocks material

Could use some input here.

I like the idea of having apply_ufunc and map_blocks as dropdowns. Optimistically, we'll have 4-5 notebooks here, and the material is advanced enough that it's nice to break it up.

But we need some high-level intro as shown in the screenshot. Right now it looks funny on its own in the left sidebar. We cannot make it a top-level heading with apply_ufunc and map_blocks as subheadings because then we'd lose the ability to do 1.

Any ideas on how to resolve this? Alternatively maybe this type of intro should move to the narrative docs (docs.xarray.dev)

The other solution would be to duplicate this intro material in both apply_ufunc/apply_ufunc.md and map_blocks/map_blocks.md . Both these files just have tableofcontents for now.


test with OCaml 4.02.2

Here's one example of an unexpected failure:
$ cat a.ml
#use "topfind";;
#thread;;
#camlp4o;;
#require "core";;
#require "core.syntax";;
open Core_kernel.Std;;

$ oloop a.ml -silent-directives
(* part 0 *)
# #use "topfind";;

# #thread;;

# #camlp4o;;

# #require "core";;
Error: Reference to undefined global `Lazy'

# #require "core.syntax";;
Error: Reference to undefined global `Lazy'

# open Core_kernel.Std;;
Error: Unbound module Core_kernel

Compilation at commit fafa8c0 gives:
$ ./app.native -silent-directives /tmp/e.ml
(* part 0 *)
# #use "topfind";;

# #thread;;

# #camlp4o;;

# #require "core";;

# #require "core.syntax";;
Error: Reference to undefined global `Camlp4'

# open Core_kernel.Std;;

With commit 5708386, this becomes:
./app.native -silent-directives a.ml
(* part 0 *)
# #use "topfind";;

# #thread;;

# #camlp4o;;

# #require "core";;

# #require "core.syntax";;
Error: Reference to undefined global `Camlp4'

# open Core_kernel.Std;;

The above error is what happens when run in the Oloop directory because .ocamlinit gets picked up. If one runs in another directory or if ./app.native -silent-directives -noinit a.ml is used, everything seems OK.

I see. But there is still some oddity. I don't see why running the .ocamlinit file should cause any error, and utop gets this right but the normal ocaml toploop doesn't.
Within the working directory's root:
$ utop
utop # #use "a.ml";;
(* no errors *)

$ ocaml
# #use "tmp/a.ml";;
/Users/ashish/.opam/4.02.3/lib/fieldslib/pa_fields_conv.cma: loaded
File "tmp/a.ml", line 1:
Error: Reference to undefined global `Camlp4'

I guess this is not an oloop problem then, but any idea what's happening?


Create UI AWS User Roles Dashboard/Developers, Billing Viewers, Viewers, Security Auditors

add dashboards with admin aws-roles Developers, Billing Viewers, Viewers, Security Auditors to public use roles Tab
Definition of done:

[x] dashboard filled with current product Developers, Billing Viewers, Viewers, Security Auditors roles

UI has corresponding roles. The backend for them is KeyCloak instance itself.


filtering tasks could show number of matches

When you filter tasks in the tools side menu, each of the task lists could show the number of matching tasks (as well as the current number of all tasks on the list). This could be done in two possible places. First the filter match count could be included in the tools menu on the lines where visibility for a list can be triggered. It could also be that the task list headers on the board could show both the number of tasks in that list as well as how many match the current filter.

+1

I like this idea.  If you're interested, would you like to take a stab at coding it?

@piascikj I would be interested in giving it a shot, but will not be free to try until the holidays.

@jronallo I'm working on it now.  Better late than never right!  I'm implementing it now because I'm also adding a delete all visible tasks button and a replace feature.

This is in the latest release.


Add unsupported text to 8.1 link

8.1 is EOL since February: https://github.com/owncloud/core/wiki/Maintenance-and-Release-Schedule

goodbye, painful past! 👍


Stop filtering the wpull environment

All set environment variables will now be passed to wpull, including for example LD_LIBRARY_PATH and LD_PRELOAD and LANG.

Please squash and merge this


Tests?

Much of the code is covered in the examples, but perhaps this module would benefit from unit tests?

Sounds great! Thanks for volunteering. It might be hard to test user interaction using JSDOM, but I’d welcome a contribution in this area.

Closing to inactivity.


Deployment for Scalability and Reliability

Let's think about scaling and reliability as the elm language, and the home page gets more popular.
What's the best Haskell deployment option? I'm not super familiar with this myself.  It looks like some people are doing Docker containers on AWS Elastic Beanstalk. Do people think this is a good route?
https://www.reddit.com/r/haskell/comments/33s0vw/how_do_you_run_haskell_on_an_amazon_ec2_cluster/cqo36ee
Heroku also has Haskell buildpacks
https://haskellonheroku.com/

Snap has been fine. I used to use HAppStack and it leaked file handles until it crashed, so that was no good. I am not willing to switch to Yesod.
I'm not in love with Haskell for servers though, so maybe there is a better route. The nice things about it are:

To work on Elm you need to know Elm and Haskell. It'd be kind of lame to add more languages to that list, though maybe if they are super widely known it is a net win. That said, I'm not excited about having an untyped server...
It is nice because it can call the compiler directly, no shelling out to call elm-make. In theory, this should make the /try page snappier. It has all the necessary modules in memory, so there are no disk reads or anything, which is the slowest part of compilation.

The right answer may be to split out the "compiler-as-a-service" to a particular domain that just does this stuff in particular.
On start up, the Haskell server compiles all the necessary Elm files, then serves them itself. So we just need to change the second half of that. Maybe put the static files at elm-lang.github.io/elm-lang.org and make elm-lang.org point there. Not sure if that's 100% possible, but it sounds pretty straight-forward.

I like the idea of  moving the /try to try.elm-lang.org and having the rest of the site static.
Before then I'm happy to help with setting up monit on the current infrastructure. I will learn more about Snap before I comment on that.

I'd be happy to help move things to a static site generator if that is the direction that folks want to go.
Hugo is a great one that ships with static binaries so there isn't another language runtime to install.
https://gohugo.io/overview/installing/

No more actions to take here.

Some progress has been made on reliability. It may be worth adding the overall project here to https://github.com/elm-lang/projects so it can happen independent of me.


Added new SQL 2022 permission

@VanMSFT
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off

@AndreasWolter Please stop using #sign-off. I mean it.
Thanks.


[feat] Cluster Diff should show the timestamp of "Old"

What is "Old"? This requires the timestamp of when the "Old", and "New" were recorded.

@mhmdkrmabd we probably need to add some data to the JSON with the UTC timestamp of when it was taken (and then adjust to the users local TZ)

Also "Old" to "Previous"

@hshimizu good point for sure, "Previous" is more convenient than "Old" - it refers to the previous loaded metadata, where the right side is the "New" loaded one -

@mhmdkrmabd we probably need to add some data to the JSON with the UTC timestamp of when it was taken and then adjust to the users local TZ

Working on this feature

@millerjp @hshimizu
https://github.com/user-attachments/assets/ff4aae7e-360e-48c8-ba1f-f550a7bbe0b9


chore: Migrate to async/await

BREAKING CHANGE: Support for Node 6 deprecated, now minimum Node 8

@dwmkerr Could you take a first review at this? The node10 test failed as one of them went over 10 seconds strangely - if you kick it off again it should work

@dwmkerr Take another peek - removed the operations code smell, and added node eslint plugin - other refactoring opportunities should probably take place outside of this PR

@mindmelting looking great. Can you squash and re-push? That way you will appear as the author in the commit history. If I squash, it'll create a single commit with me as the author and I'd like to keep you in the history, so that I can auto-generate 'contributor' files in the future. TY for the comments too @tobiasbueschel. The failing test seems intermittent, it might just need a longer timeout for the one which works on adaptive icons...

@dwmkerr This should be squashed correctly now

Released as 0.12.0. Even though this a breaking change, I'm not bumping to 1.0.0 yet, I'll stay on a 0.X line as I still expect API changes in the near term. Once things are really settled I'll cut a genuine v1 release.
Thanks for the help @mindmelting - this will make future changes much easier


Add a LICENSE file

MIT License

Closed by https://github.com/3scale/webhook_multiplexer/commit/23b464ecceb4fa6213458f95b0084fedd103e213


Old highlighting system does not highlight types and variable declarations

Based on @matklad's guesss https://github.com/rust-analyzer/rust-analyzer/issues/3452#issuecomment-594628050

Note that types like HashMap, struct fields as well as variable declarations are no longer highlighted properly.
Revision 66ec6bd.

Looks like highlighting does not work for me even with new proposed API enabled.

The old highlighting is now completely removed.

@matklad, I've switched to new API but still I do not see highlighting of let bindings and types.  Is this intentional?

I'm expecting BitVector to be highlighted in cyan in the same manner as in popup. Also let bindings are not colored.

I think that means that the colors are just not set up in the theme. With Dark+ I get

With Pale fire:

Inspect tokens and scopes is a useful action for troubleshooting:

Some additional helpful debugging info can be found here: https://github.com/rust-analyzer/rust-analyzer/issues/3822

I think that means that the colors are just not set up in the theme. With Dark+ I get

:confused: Maybe I'm missing something but I use the very default Dark+ theme. The only changes I've made are these customizations in settings.json:
"workbench.colorCustomizations": {
    "editor.background": "#101010",
    "editor.foreground": "#e0e0e0",
},

Could you please elaborate on what do you mean by setting up colors?

I've installed Pale Fire theme and redid your text:

P. S.: rust-analyzer version: unreleased (642f3f4)

Do you have these settings enabled?
{
    "rust-analyzer.highlighting.semanticTokens": true,
    "editor.semanticHighlighting.enabled": true,
}

The latter setting wasn't set in my case, but it seems it still does not work even after I added the setting.

Hm, I guess my last guess is to try to reload VS Code and check if Inspect tokens and scopes shows semantic tokens.... Other than that, genuinely have no idea what might be the problem :(

Hm, I guess my last guess is to try to reload VS Code and check if Inspect tokens and scopes shows semantic tokens.... Other than that, genuinely have no idea what might be the problem :(

I think you should run vscode with
code-insiders --enable-proposed-api matklad.rust-analyzer

I think you should run vscode with
code-insiders --enable-proposed-api matklad.rust-analyzer

Yep, that fixed the issue :man_facepalming: On a side note, type aliases remain uncolored.

Unfortunately, the default theme may not support all the textmate scopes that we map our semantic tokens to. If you want, you can setup custom coloring semantic tokens directly.
Here are my overrides for the most part of available semantic tokens if this helps...

I wonder why do we need --enable-proposed-api matklad.rust-analyzer when the tokens are "stable" in the insiders build.


Use dprint's SQL plugin to format SQL files

Thoughts? dprint all the things!

Need to test whether or not sqlx uses a hash to check migrations in existing database. Let's hope not otherwise this will break stuff!

Ah yeah, that is what I was thinking:
Error: Db migrations failed

Caused by:
    migration<PHONE_NUMBER>0345 was previously applied but has been modified

I think we have 3 options here:

Don't use an SQL formatter, closing this PR.
Exclude existing migrations in dprint's config, only formatting future migrations.
Include a snippet to completely wipe the DB with the next release so the migrations can be reapplied.

Thoughts?

I'd vote for 3, because there's no users other than us yet and we could release before umbrel gets merged!
a different question: can we somehow tell dprint to try to format sql snippets in our rust files?

3 is the least clunky imo.

a different question: can we somehow tell dprint to try to format sql snippets in our rust files?

We can use https://docs.rs/sqlx/0.5.9/sqlx/macro.query_file.html instead! Now that we are no longer building on windows, the line-ending encoding issues might no longer affect us!

a different question: can we somehow tell dprint to try to format sql snippets in our rust files?

We can use docs.rs/sqlx/0.5.9/sqlx/macro.query_file.html instead! Now that we are no longer building on windows, the line-ending encoding issues might no longer affect us!

Actually, just reading the issue: Using .gitattributes, we would have been able to work around that!

@bonomat Would (3) be acceptable?

@bonomat Would (3) be acceptable?

If the next release includes the event-sourcing refactoring we will need to do this anyways right?

@bonomat Would (3) be acceptable?

If the next release includes the event-sourcing refactoring we will need to do this anyways right?

From a user-facing perspective yes. The technical implementation is different (dropping the tables vs nuking the DB file).

The easiest implementation would probably be to switch to a new name for the DB file, otherwise we have to build all kinds of trickery around detecting whether or not we have already deleted it in a prior run of the same release.

The easiest implementation would probably be to switch to a new name for the DB file, otherwise we have to build all kinds of trickery around detecting whether or not we have already deleted it in a prior run of the same release.

I think eitherway is fine. In general, the sooner we have a stable db the better. Right now there are not many users and it's easier to break things...

@luckysori @bonomat @klochowicz thoughts on 375ff65?

this solves one problem but creates another one - with this change we'd have a new db every release, even when there's no db changes. from user's pov it's almost the same an nuking the db. the fact that it's stored somewhere on disk or inside container it's hard to notice.
Perhaps we could use a custom env variable that only gets bumped when we have a breaking db change?

Well, I think by the looks of it, we will have breaking changes in the DB on every release anyway. I don't intend this to be a long term solution but it would do the trick for now?
To get around this particular problem, we could rename the DB if the migrations fail?

this solves one problem but creates another one - with this change we'd have a new db every release, even when there's no db changes. from user's pov it's almost the same an nuking the db. the fact that it's stored somewhere on disk or inside container it's hard to notice.
Perhaps we could use a custom env variable that only gets bumped when we have a breaking db change?

Well, I think by the looks of it, we will have breaking changes in the DB on every release anyway. I don't intend this to be a long term solution but it would do the trick for now?
To get around this particular problem, we could rename the DB if the migrations fail?

That is probably the best solution as it only is applied when we have to. Maybe we could rename it to maker_{$TIMESTAMP}.sqlite in case of failed migration, and tell user that they can still use the older version to access that info?

this solves one problem but creates another one - with this change we'd have a new db every release, even when there's no db changes. from user's pov it's almost the same an nuking the db. the fact that it's stored somewhere on disk or inside container it's hard to notice.
Perhaps we could use a custom env variable that only gets bumped when we have a breaking db change?

Well, I think by the looks of it, we will have breaking changes in the DB on every release anyway. I don't intend this to be a long term solution but it would do the trick for now?
To get around this particular problem, we could rename the DB if the migrations fail?

That is probably the best solution as it only is applied when we have to. Maybe we could rename it to maker_{$TIMESTAMP}.sqlite in case of failed migration, and tell user that they can still use the older version to access that info?

Yeah I am liking this solution as well. It bring 0 disruption for new users that don't have an existing DB and the restart-on-failure from docker compose means we will restart in a good state. This would also allow us to clean up our migration scripts at some point (if we want to).

this solves one problem but creates another one - with this change we'd have a new db every release, even when there's no db changes. from user's pov it's almost the same an nuking the db. the fact that it's stored somewhere on disk or inside container it's hard to notice.
Perhaps we could use a custom env variable that only gets bumped when we have a breaking db change?

Well, I think by the looks of it, we will have breaking changes in the DB on every release anyway. I don't intend this to be a long term solution but it would do the trick for now?
To get around this particular problem, we could rename the DB if the migrations fail?

That is probably the best solution as it only is applied when we have to. Maybe we could rename it to maker_{$TIMESTAMP}.sqlite in case of failed migration, and tell user that they can still use the older version to access that info?

Yeah I am liking this solution as well. It bring 0 disruption for new users that don't have an existing DB and the restart-on-failure from docker compose means we will restart immediately and be in a good state then. This would also allow us to clean up our migration scripts at some point (if we want to).

This is the log now:
2021-12-20 17:08:47  INFO daemon::logger: Initialized logger
2021-12-20 17:08:47  INFO maker: Running version: 0.3.1-139-gd21173b
2021-12-20 17:08:47  INFO maker: CFDs created with this release will settle after 24 hours
2021-12-20 17:08:49  INFO maker: Listening on <IP_ADDRESS>:9999
2021-12-20 17:08:49 ERROR daemon::db: Failed to run migrations: migration<PHONE_NUMBER>0345 was previously applied but has been modified
2021-12-20 17:08:49  INFO daemon::db: Backing up old database at /home/thomas/src/github.com/comit-network/hermes/testnet/maker.sqlite to /home/thomas/src/github.com/comit-network/hermes/testnet/maker.sqlite-1639980529-backup
2021-12-20 17:08:51 DEBUG daemon::oracle: Fetching announcement for /x/BitMEX/BXBT/2021-12-20T14:00:00.price?n=20
2021-12-20 17:08:51 DEBUG daemon::oracle: Fetching announcement for /x/BitMEX/BXBT/2021-12-20T17:00:00.price?n=20
2021-12-20 17:08:51 DEBUG daemon::oracle: Fetching announcement for /x/BitMEX/BXBT/2021-12-20T10:00:00.price?n=20
2021-12-20 17:08:51 DEBUG daemon::oracle: Fetching announcement for /x/BitMEX/BXBT/2021-12-20T18:00:00.price?n=20

I decided to not fail but just re-connect after the database has been moved so it also works if you are not running in a supervisor!

bors r+


Mod packaging for zone object changes

Mod packaging hasn't been implemented for rfgzone_pc files yet. This needs to be done for the map editor in v0.20.0

This is working in the latest v0.20.0 pre-releases.


bug: Mason plugin doesn't install mason-registry

Did you check docs and existing issues?

[X] I have read all the LazyVim docs
[X] I have updated the plugin to the latest version before submitting this issue
[X] I have searched the existing issues of LazyVim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
v0.10.0
Operating system/version
MacOS 14.5
Describe the bug
When LazyVim is installed and the Mason plugin is checked, no languages/linters/LSP etc appear in the list. It seems that the mason-registry is uninstalled. Additionally, when the :checkhealth command is executed, it gets stuck and displays the following error.
Attaching some screenshot for reference:

Steps To Reproduce

Install neovim with above defined version.
Follow the installation steps mentioned here: https://www.lazyvim.org/installation
Check the Mason plugin to see if the list of langauges/linters/formatters etc are available

Expected Behavior
Once LazyVim is installed and Mason plugin checked it should have installed the registries which entail shows the list of linters/languages etc available for installing.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    -- add any other plugins here
  },
})

It used to work earlier not sure why it doesn't work now.
Verified the same issue on Fedora 40

Can't reproduce. Following screencast with LazyVim default installation.
Screencast 2024-07-15 20:16:33.webm
My guess would be you either have an incompatible architecture or some trouble with Github possibly (maybe behind some proxy??). Try to install LazyVim from start and if the problem persists you should probably create an issue at Mason github repo.

I checked on arm and amd64 architecture. Getting same issue. Probably I will raise the same at Mason repo


Component refactor: migrate ReportSettingsPage to function component

Details

Migrate ReportSettingsPage to function component
Fixed Issues

$ https://github.com/Expensify/App/issues/16250
PROPOSAL: https://github.com/Expensify/App/issues/16250#issuecomment-1631338511
Tests

Open a room in any workspace
Click on room header to open room details
Go to room settings
Verify that report settings page appears
Verify that you can click notification settings

[ ] Verify that no errors appear in the JS console

Offline tests

QA Steps

Open a room in any workspace
Click on room header to open room details
Go to room settings
Verify that report settings page appears
Verify that you can click notification settings

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

Looks like @hungvu193 merged his PR before this one. I've applied changes accordingly - now shouldDisableRename logic is in ReportUtils.shouldDisableRename

@fedirjh @deetergp Looks like @hungvu193 merged his PR before this one. I've applied changes accordingly - now shouldDisableRename logic is in ReportUtils.shouldDisableRename

Updated after another PR merged - this was a fix for a bug reported after testing this PR

@s77rt It seems already fixed here. Do you mean to hold this PR until fix PR got merged?

@alexxxwork I think I was mistagged here?

@s77rt of course! Sorry :)

@fedirjh @deetergp The PR fixing the regression found in this PR had been merged

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.


Enum support

Enums are basically just fancy numbers and so conversion into the database will almost always be the same and so it makes sense to have support for them upstream in lowdb itself

I have come to the realization that this project does not actually have a devel branch!
Apologies for that!
Could you change the PR or reopen it to point to the devel branch I just created and add a note about the change to changelog.md?

Rebased on devel and switched PR to merge into there.
Added changelog entry, not too sure if I got the format right though


Auto Paging does not include master template on additional slides

When using gObjPptxMasters and auto paging with tables the new slides do not have the objects defined in the inMasters array of the original slide.
To give further context, when creating a new slide as follows:
var slide = pptx.addNewSlide( pptx.masters.MASTER_SLIDE );
slide.addTable( arrRows,
{
	slideMargin:  [ 1.2, 0.0, 1.18, 0.0 ],
	x:0.5,
	y:1.2,
	colW:[5.0,0.55],
	font_size:9,
	margin:1,
	border:{pt:'0.75', color:'E00000'}
	}
);

If the number of rows exceed the available height and a new slide is created to hold the remaining rows the new slide does not include the objects defined in the MASTER_SLIDE.

Hi @tb23911 ,
Thanks for reporting this issue!
Slide masters and inline options are now used in subsequent slides.
The output looks weird though due to Issue #64 (over-paging when using some options) which I will be fixing next.


Number

Is the default number of bridger three?

Why set it to three?

Yes. By default, the configuration is set to utilize three bridgers. This choice is primarily driven by the need to optimize computational efficiency and maintain performance. More details can be found in the ablation experiment section of the paper.


Add support for tf.repeat (equivalent to np.repeat)

This PR tries to address the feature request proposed in #8246 to add the support for tf.repeat that is equivalent to np.repeat.
This PR is just to pick up the work of #15224 which added tf.repeat but closed and didn't merge.

Nagging Assignee @jhseu: It has been 45 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

This change is fine for API review

Can this be implemented in terms of tf.tile or tf.contrib.framework.broadcast_to?

Nagging Assignee @jhseu: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

It has been 14 days with no activity and the awaiting response label was assigned. Is this PR still valid? Assigning the stalled label. Please comment to reassure me that this is still being worked on.

Closing since I think this can be implemented in terms of existing ops.

Wait, @alextp there are lots of tensorflow ops that can be implemented in terms of existing ops (e.g. expand_dims). But implementing repeat is a hassle, prone to errors, and not easily readable. Please clarify why this merge request is getting rejected?

I think you can just write the python code and get the same performance in
this case, without having to write new C++ kernels, which add to the
complexity, maintenance cost, and binary size of tensorflow.
On Thu, Jul 26, 2018 at 7:50 PM Ethan Brooks<EMAIL_ADDRESS>wrote:

Wait, @alextp https://github.com/alextp there are lots of tensorflow
ops that can be implemented in terms of existing ops (e.g. expand_dims).
But implementing repeat is a hassle, prone to errors, and not easily
readable. Please clarify why this merge request is getting rejected?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/18350#issuecomment-408295099,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxR3y0hXcKo_77csZnhYkyTCKVK2zks5uKn_agaJpZM4TM5ar
.

--

Alex

And by this I mean that if you send a PR which implements this in terms of
other ops I'll happily accept it.
On Fri, Jul 27, 2018 at 8:17 AM Alexandre Passos<EMAIL_ADDRESS>wrote:

I think you can just write the python code and get the same performance in
this case, without having to write new C++ kernels, which add to the
complexity, maintenance cost, and binary size of tensorflow.
On Thu, Jul 26, 2018 at 7:50 PM Ethan Brooks<EMAIL_ADDRESS>wrote:

Wait, @alextp https://github.com/alextp there are lots of tensorflow
ops that can be implemented in terms of existing ops (e.g. expand_dims).
But implementing repeat is a hassle, prone to errors, and not easily
readable. Please clarify why this merge request is getting rejected?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/18350#issuecomment-408295099,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxR3y0hXcKo_77csZnhYkyTCKVK2zks5uKn_agaJpZM4TM5ar
.

--

Alex

--

Alex


Removed need for an explicit syntax import

Not sure if this is a good idea or not -- it simplifies usage though, and I can't think of many downsides.
Review by @sbuzzard

Agree that the usage (at least as we have been using it to date) is so common that a syntax import is extraneous, and we don't include anything in the enrichment that I would think reasonably be surprising / unexpected to a client.


[yyjson] Update to v0.3.0

Describe the pull request

What does your PR fix?
N/A.

Which triplets are supported/not supported? Have you updated the CI baseline?
All. Yes.

Does your PR follow the maintainer guide?
Yes.

Yes.

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

Thanks for the update!


tree printing on windows console is not formatted correctly

see https://github.com/Textualize/rich/issues/2688#issuecomment-1356231732

looks good now running on powershell through pycharm terminal


Added some very basic tests for YamlHeader() extension method.

Simple test using .ToString() on YamlNode. This avoids a test proj dependency on YamlNode, but could also prove a brittle test.
Feel free to leave it unmerged.

More testing at this stage that demonstrates to others what Yaml Front Matter is, is a good thing.

@aeoth Understood. Wondering if it would be better to return our own type rather than a YamlNode so we have more control both in terms of our consuming code, and the tests? Might be able to keep the test the same / similar depending on final implementation.

@dtchepak  Yeah, you're probably right on that. At this stage I didn't want to spend too much time wrapping things up when we're still uncertain what the overall flow of the YAML sections are. Need to look at what potential values are being returned - we'll probably be needing most primitives and a list/array, so Dictionary<string, object> might still be the best way to return from the extension method - no reason it can't do some inspection and return the object properly rather than just returning YamlNode

An initial look at YamlNode suggests it just returns string (or array) regardless of the type, so we'd have to do a bunch of TryParse's. The only other hint I can see is if 'value' is YamlScalarNode or YamlSequenceNode

Could always return a String[] or IEnumerable? Will be one or more
strings; maybe don't need real dates or anything at this stage?
But I agree with you that we probably should defer this decision til we
have more info.
On Tue, Jan 31, 2012 at 10:27 PM, Paul Jenkins <
<EMAIL_ADDRESS>
wrote:

An initial look at YamlNode suggests it just returns string (or array)
regardless of the type, so we'd have to do a bunch of TryParse's. The
only other hint I can see is if 'value' is YamlScalarNode or
YamlSequenceNode

Reply to this email directly or view it on GitHub:
https://github.com/Code52/pretzel/pull/6#issuecomment-3737339


Feature/infer3

Type inference. While there is still work to do, all impala test cases work already.

Alright, so I did have a version where everything worked but porting the mem stuff is a bit more intrusive as loads/stores are built a lot in other phases/passes and there things are going south again. Anyway, in this current state I wouldn't merge anyway, I just wanted to have a discussion here, what exactly we want to do. So here is the problem:

Whenever, we need to infer sth, we create a nominal Infer node whose operand is nullptr.
The main magic happens when checking for alpha-equiv. If we have the situation that Infer ? should be equivalent to x, then we have Infer x.
Now we have those Infer x all over the place which is really annoying because everyone is just looking for x and fails with an error it sees Infer x instead.
For this reason, I added the Refer class that does this forwarding automatically. This works but is very intrusive.

So here is my proposal:

class Def becomes class Def_ (or does anyone has a better name)?.
You are not supposed to work directly with const Def_* anymore. For this reason, we have a class Def (like Refer) but even more tightly geared into Thorin. E.g., even the the operands, types etc should be of type Def or ArrayRef<Def> instead of const Def_* or ArrayRef<const Def_*>:const Def_* refer(const Def_* def) {
    if (!def) return nullptr;

    // find inferred Def_ through chain of Infers
    while (auto infer = def->isa<Infer>()) {
        if (auto op = infer->op())
            def = op;
        else
            break;
    }

    // TODO union-find-like path compression
    return def;
}

template<class D = Def_>
class Def {
public:
    Def() = default;
    Def(const D* ptr)
        : ptr_(ptr) {}

    const D* operator*() const { return refer(ptr_); }
    const D* operator->() const { return refer(ptr_); }
    operator const D*() const { return refer(ptr_); } // maybe we don't even need this one
    explicit operator bool() const { return ptr_; }

private:
    const D* ptr_ = nullptr;
};

using Defs = Array<Def>;

For subclassing we could do Def<App>. E.g.:if (Def<App> app = def->isa<App>()) { // usually you are using "auto app = ..." anyway
}

Only for nominals we would directly work with the pointers Def_*. Alternatively, we could add another wrapper class Nom and Nom<Lam> etc.
Has the additional advantage that we can hook in potentially other machinery into Def if we need this later on - e.g. using operator== for alpha-equiv.
One question is whether we want to keep all methods within Def_ or whether we should move it to Def. Probably the latter option because at least for virtual methods we need to work with const Def_* anyway and its probably awkward to do def.foo() but def->rebuild(/*...*/).

Any opinions on that or other ideas?


Support termination with extreme predjudice

Our termination model puts a quit message into the queue so that the message pump will read the quit instruction once it has processed the existing message, and before reading from the broker's queue. This causes orderly shutdown of all of our queues, with no partial completion.
For some scenarios this is a problem: the main one seems to be where the time taken to process a message is long (due to the length of the operation, or waiting for other resources to be free). When  serviceactivator is being used in a windows service this means that we fail to shut down in the agreed time frame. so Windows will report an error.
So for people who have long running handlers we want to provide the option to immediately terminate. Our assumption is that you will only use the option if you are idempotent and happy that work may be partially complete when terminated. As we will not ack, the abandoned jobs will be loaded when we resume.
We don't want to pass a cancellation token to the handlers to effect this. Our concern here is bleeding the TPL into the handler code, and creating accidental complexity for those that do not require this. In addition, simply signalling cancellation might not resolve the issue if the use case is not a loop or similiar that allows regular checks that we should continue to progress.
The simplest approach here is probably that where we are configured to support termination with predjudice to run the dispatcher inside an appdomain and unload that appdomain when we are instructed to stop. See http://www.superstarcoders.com/blogs/posts/executing-code-in-a-separate-application-domain-using-c-sharp.aspx
Note that this is not perfect, but its the only way for us to say - yes, really abort everything here.
http://stackoverflow.com/questions/4432141/how-to-properly-unload-an-appdomain-using-c
As I say, this should be opt in, so we could just simply document using the above Isolated approach, and create our own version with a facade or Dispatcher and equivalent code (with suitable attribution to this article) to Isolated to wrap it.
Thoughts welcome.

Ouch, but yeah I'm not bursting with alternatives! Perhaps as the codebase grows it's a sync hairs bleeding TPL into implementation into handlers won't feel so wrong.
We should though pass cancellation tokens into internal operations such as requeue wait mechanisms and Polly?

I think this one will get picked up by the async work where we are adding cancellation tokens. Once we get service activator in a position to support an async pipeline then it should be possible to use an async pipeline for a long-running operation and then use the cancellation token mechanism to signal termination. Going to work in Huddle on using the former to fix our instance of the latter.


Sensor charging_complete_time unknown on A5

Describe the bug
First of all. This isn't really a problem at all. I just wanted to report it, since it doesn't really make any sense to me
I have a sensor.audi_a5_sportback_charging_complete_time sensor, which doesn't really have anything to do with my car (gasoline, A5). I can see in the code and debug logs, that the state is checked / validated by remainingChargingTime here:
TRY APPEND STATE: Searching for 'remainingChargingTime' at location=['charging', 'chargingStatus', 'value', 'remainingChargingTimeToComplete_min'], tsoff=-1
TRY APPEND STATE: 'remainingChargingTime' adjusted to 0 due to None value
TRY APPEND STATE: Timestamp for 'remainingChargingTime' is None or missing; not appending state.

Wouldn't this mean that it is None and returned as is not supported? Meaning the sensor would be disabled / hidden?
Screenshots

Logfile
home-assistant_audiconnect_2024-04-18T13-32-10.734Z.log
Your Vehicle Details
Model: A5 Sportback
Year: 2021
Type (ICE/PHEV/BEV): ICE
Note: It might be good to describe what ICE/PHEV/BEV is (ex. this) for none native English speaking. I had to look it up ;)

Thanks for reporting. Which version are you using currently?
Good note as I even don't know the term ICE (only in combination with trains :))

Need to dig deeper but maybe this could be the issue:
        # Special handling for remainingChargingTime         if name == "remainingChargingTime" and val is None:             val = 0             _LOGGER.debug(                 "TRY APPEND STATE: 'remainingChargingTime' adjusted to 0 due to None value"             )
Do you also have the entity remainingChargingTime ?
In this line https://github.com/audiconnect/audi_connect_ha/blob/5055bc34b14e99fda066ce9975da9e8c98ee99da/custom_components/audiconnect/audi_connect_account.py#L1655
        if self.last_update_time is None or self.remaining_charging_time is None:             return None
remaining_charging_time is 0 so not None that might be the reason why we have unknown.... :)

Thanks for reporting. Which version are you using currently?

I'm using the most recent release v1.6.3

Do you also have the entity remainingChargingTime ?

No, i don't have an entity named remainingChargingTime.

Can you check the fix in https://github.com/audiconnect/audi_connect_ha/pull/402 ?

Maybe the fix is not working well in all cases need to think about it.

Maybe the fix is not working well in all cases need to think about it.

I'll try to make the change locally and report back.

@Kolbi i made the change in audi_connect_account.py locally. Nothing changed though.

Honestly, you don't need to spend much time on it for me. I just reported it in case there was an "easy" fix. It doesn't bother me at all that it's visible and I can just disable it manually.

I think @kolbi and I have worked this out. I will work on updating #402 when I have some time. As always, thanks for reporting @mm98 !


PR: Added qdarkstyle to dependencies

Description of Changes

[ ] Wrote at least one-line docstrings (for any new functions)
[ ] Added unit test(s) covering the changes (if testable)
[*] Included a screenshot (if affecting the UI)

I added qdarkstyle to dependencies in mainwindow.py for solving the issue 8291

Issue(s) Resolved

Fixes #8291
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @juanis2112

Hello @juanis2112! Thanks for submitting the PR.

There are no PEP8 issues in the file spyder/app/mainwindow.py !

@ccordoba12 What's our policy on what dependencies we want to add to the dialog or not? My impression was that it was generally only for those that were likely to cause reported problems related to specific versions or conflicts with other deps, since a number of first-level dependencies aren't listed while a number of sub-dependencies are (for example, from our direct requirements, spyder-kernels (!!!), pyzmq (implicated in a number of issues recently), pyqt and qtpy are not listed, along with the less critical cloudpickle, qtawesome, pickleshare, chardet, numpydoc and keyring). Is QDarkStyle considered equal or higher priority to those?

What's our policy on what dependencies we want to add to the dialog or not?

We should probably add all our setup.py dependencies and declare them in a single place (instead of all around our code).
But for this case I instructed @juanis2112 to only address @dpizzeta request to make qdarkstyle appear in our dialog.

My suggestion about this issue (general way) is that put all dependencies (required or not) that makes more easy to report the bug. I think that just the separation about what is needed and not, and if are installed or not are ok, including the versions (required and installed). @ccordoba12  and @CAM-Gerlach raised some good points. For me it is more logical the representation of all of them in the list, even being a big one. :) Tks

My suggestion about this issue (general way) is that put all dependencies (required or not) that makes more easy to report the bug.

I think @ccordoba12 's point is that's out of scope of this PR for now, which is just about adding QDarkStyle. Including all of our setup.py/first-level requirements is a bigger project left for another issue. There's also the matter that some of the most critical packages for bug reporting, like ipykernel, ipython, parso, etc. are not second or third-level deps, so we're already manually "picking and choosing" the packages to include anyway.

I think @ccordoba12 's point is that's out of scope of this PR for now

For sure, I understood. Just to registry my opinion :) Tks

:+1:


allow msgraph catalog plugin to work with extensions

Microsoft Graph allow you to expand objects with extensions system.
https://docs.microsoft.com/en-us/graph/api/resources/schemaextension?view=graph-rest-1.0
https://docs.microsoft.com/en-us/graph/api/resources/opentypeextension?view=graph-rest-1.0
Which are GA for users and groups.
Feature Suggestion
Allow the processors to work with schemaExtensions so the information is fetched while reading.
Possible Implementation

Add optional configuration to the plugin to configure extra fields you want to fetch
IF defined, configure the client to fetch this extra fields.

Context
We are using msgraph plugin to populate our catalogue for users/groups and we are using schemaExtensions to add extra information to the groups. Information that we would like to add as annotations on the entities for future use cases.

Is this something that you might be interested in contributing?

Is this something that you might be interested in contributing?

sure, i will try to to create a PR for this.


Single shared Watcher used to avoid inotify limit

When we were using this tail library, we found that the system limit on inotify watches would become an issue when we we try to tail many files at once (if many Tail objects are open simultaneously). To circumvent this, we changed the InotifyTracker struct to contain a Watcher that is shared by all Tail objects that are created.

@andyouyang22 we already implemented the shared watcher in #53. i'll close this PR unless you wish to reopen it for any reason.

Sridhar,
This pull request goes further than #53 and uses a single shared Watcher
for all Tail objects that are created. We originally made this change
because we found that we would hit the system inotify limit if we were
tailing too many files at once.
Andy
On Sat, Aug 15, 2015 at 11:03 PM, Sridhar Ratnakumar <
<EMAIL_ADDRESS>wrote:

@andyouyang22 https://github.com/andyouyang22 we already implemented
the shared watcher in #53 https://github.com/ActiveState/tail/pull/53.
i'll close this PR unless you wish to reopen it for any reason.
—
Reply to this email directly or view it on GitHub
https://github.com/ActiveState/tail/pull/58#issuecomment-131494110.

Hi, I rebased our changes and added an additional fix for a race in truncation detection.  Are you guys interested in merging our enhancements?

@srid any suggestions on merging this in?

Here's a short description of the changes:

Use a single inotify watcher regardless of the number of files being tailed.  Without this one easily runs into the maximum number of inotify watches allowed by the kernel.
If a process gets suspended and then resumed, the library was printing a spurious warning.
Fix various race conditions.
Upgrade to fsnotify v1 (from v0, which is on life support at this point and not guaranteed to get bug fixes).

@tsuna , @andyouyang22 Thanks for you contributions, it's merged.


OverflowError in resample_poly (upfirdn)

scipy.signal.resample_poly fails if the output vector length would be greater than 2^31-1.
Traceback (most recent call last):

  File "<ipython-input-1-ac5d2b0a1632>", line 11, in <module>
    yy = resample_poly(y, 128, 1)

  File "F:\Programs\Miniconda3\lib\site-packages\scipy\signal\signaltools.py", line 2424, in resample_poly
    y = upfirdn(h, x, up, down, axis=axis)

  File "F:\Programs\Miniconda3\lib\site-packages\scipy\signal\_upfirdn.py", line 183, in upfirdn
    return ufd.apply_filter(x, axis)

  File "F:\Programs\Miniconda3\lib\site-packages\scipy\signal\_upfirdn.py", line 82, in apply_filter
    output_shape[axis] = output_len

OverflowError: Python int too large to convert to C long

output_shape is created on the previous line (81):
output_shape = np.asarray(x.shape)
With an unspecified dtype it appears to get np.int32 by default, which is inadequate for specifying large array shapes.
This could be fixed by explicitly specifying the dtype:
output_shape = np.asarray(x.shape, dtype=np.int64)

Can you share some more information about your platform and python/NumPy/SciPy versions? I'm able to run the following without a problem both on Scipy 1.3.1 and master, with NumPy 1.17.3 and Python 3.7.5
y = np.random.randn(2**25)
yy = sig.resample_poly(y, 2**7, 1)  # Results in yy.size = 2**32

They are on windows where a "C long" is 32 bits.

Got it. @patrick984, would you be willing to put together a PR with your suggested fix?
This looks like an occurrence of what is discussed in numpy/numpy#9464, there may be other such occurrences of 32 bit ints lurking around.

I'm happy to pick this one up. Would a test be useful here? I don't actually have the RAM to try running upfirdn with an array larger than 2^32-1, and the test would be slow, so I'm not sure how useful it would be.


sqlalchemy-oso cannot handle or clauses involving joins

Environment
oso 0.26.1
sqlalchemy-oso 0.26.1
Python 3.10
Setup
Given these models:
class User(db.Model):
  id = Column(BigInteger, primary_key=True)

class Group(db.Model):
  id = Column(BigInteger, primary_key=True)
  type = Column(String)
  members = relationship("User", secondary="Membership", viewonly=True)

class Membership(db.Model):
  user_id=Column(ForeignKey(User.id), primary_key=True)
  group_id=Column(ForeignKey(Group.id), primary_key=True)

And a policy like:
has_role(user: User, "member", group: Group) if user in group.members;
allow(user: User, "read", group: Group) if group.type = "PUBLIC" or has_role(user, "member", group);

Problem
For a query like:
Group.query.all()

The generated query is incorrectly using an inner join instead of a left join:
SELECT ...
FROM group, membership AS membership_1
WHERE group.type = %s OR group.id = membership_1.group_id AND %s = membership_1.user_id

This results in the query skipping public groups that the user is not a member of.
Partial workaround
I have rewritten my model to work around this partially (poor scalability) by changing the policy to look like:
has_role(user: User, "member", group: Group) if group.id in user.get_group_ids();

and adding the following method to the User model:
def get_group_ids(self):
        return [i.group_id for i in Member.query.filter_b(user_id=self.id)]

This results in a query like:
SELECT ...
FROM group
WHERE group.type = %s OR group.id = %s OR group.id = %s ...

This works, but has scalability issues if the group list is too large.

I'd recommend adding the relationships and configure it for eager loading. It works well with those situations for me, except in cases where you have three or four layers of nested joins. It doesn't modify the classes though to eagerly load policy data if you aren't already doing it


Reformat benchmark metrics

As part of effort the to automate benchmarks in XLML, the benchmark_serving.py script will be used to benchmark MaxText JetModels. The benchmark results, however, need to be in a slightly different format:
{
  "metrics": {"step_time": 100},
  "dimension": {"framework": "jax", ...}
}

This PR refactors the output, casts the values, and returns it for later use.

@JoeZijunZhou Is the key request_inthroughput a typo? should it be request_throughput?

@JoeZijunZhou Is the key request_inthroughput a typo? should it be request_throughput?

Yes, plz change it to request_throughput, thanks!

LGTM! Shall we also update the README in /benchmarks to give an example of running benchmark with eval? Also resolve the python checks before merge: https://github.com/google/JetStream/actions/runs/8742895378/job/23992198244?pr=42. Thanks!
Agree, need to update our documentation.


x/tools/go/packages: Load does not respect Go version consistently

x/tools/go/packages invokes the "go" command, but often behaves differently depending on the underlying Go version. As a consumer of the package, I regularly test my usage against several versions of Go, because these tools behave differently depending on the underlying Go version.
At one point, I believed that setting packages.Config.Env with the correct GOROOT and PATH=$GOROOT/bin:$PATH would make up for this, but because exec.Command uses exec.LookPath (which is hard-coded to the system os.Getenv("PATH"), see #20081, #59753, #60601) and packages.Load does nothing to mitigate that, the Go version used to load packages is not the correct one.
Here's an example usage of packages.Load:
package main

import (
        "fmt"
        "go/build"
        "log"
        "os"
        "runtime"

        "golang.org/x/tools/go/packages"
)

func GOROOT() string {
        if g := build.Default.GOROOT; g != "" {
                return g
        }
        return runtime.GOROOT()
}

func main() {
        fmt.Println("GOROOT:", GOROOT())
        fmt.Println("PATH:", os.Getenv("PATH"))
        cfg := &packages.Config{
                Mode: packages.LoadSyntax | packages.LoadImports,
                Env: []string{
                        "GOPACKAGESDRIVER=off",
                        // Packages driver needs a GOROOT to look up cmd/test2json.
                        fmt.Sprintf("GOROOT=%s", GOROOT()),
                        // Where to find the Go binary itself.
                        fmt.Sprintf("PATH=%s/bin", GOROOT()),
                        // Package driver needs HOME (or GOCACHE) for build cache.
                        fmt.Sprintf("HOME=%s", os.Getenv("HOME")),
                },
                Dir: "",
        }
        pkgs, err := packages.Load(cfg, "cmd/test2json")
        if err != nil {
                log.Fatal(err)
        }
        for _, pkg := range pkgs {
                fmt.Printf("%#v\n", pkg)
        }
}

Say you are on a system where the admin has installed some older Go, but you've used golang.org/dl/go1.20 to download a newer version. Or it's a newer version of Go, but you want to ensure that your packages.Load code works against every Go version 1.18 and up.
$ go1.20 build -o pkgdriver
$ GOROOT=$HOME/sdk/go1.20 strace -fe trace=execve -e signal=SIGIO ./pkgdriver 2>&1 | grep -v "exited with" | grep -v "strace: Process"

[pid 675271] execve("/usr/lib/google-golang/bin/go", ["go", "list", "-e", "-f", "{{context.ReleaseTags}}", "--", "unsafe"], 0xc00007e340 /* 6 vars */) = 0
[pid 675272] execve("/usr/lib/google-golang/bin/go", ["go", "list", "-f", "{{context.GOARCH}} {{context.Com"..., "--", "unsafe"], 0xc00009c150 /* 5 vars */) = 0
[pid 675282] execve("/usr/lib/google-golang/bin/go", ["go", "list", "-e", "-json=Name,ImportPath,Error,Dir,"..., "-compiled=true", "-test=false", "-export=true", "-deps=tr
ue", "-find=false", "-pgo=off", "--", "cmd/test2json"], 0xc00002ea50 /* 5 vars */) = 0
[pid 675291] execve("/usr/local/google/home/chrisko/sdk/go1.20/pkg/tool/linux_amd64/compile", ["/usr/local/google/home/chrisko/s"..., "-V=full"], 0xc0001d9d40 /* 25 vars *
/) = 0
[pid 675292] execve("/usr/local/google/home/chrisko/sdk/go1.20/pkg/tool/linux_amd64/compile", ["/usr/local/google/home/chrisko/s"..., "-V=full"], 0xc00013cc30 /* 25 vars *
/ <unfinished ...>
...

Despite best efforts, the system "go" (which might be older) is used to execute the list driver, but $GOROOT/bin/go is then used to compile more information about the package by calling compile/asm functions. This is inconsistent.
Note that if instead of compiling the command and then running it, you run it with go1.20 run, the command seems to mitigate this itself by placing GOROOT/bin in the PATH prior to execution:
$ go1.20 run .
PATH: /usr/local/google/home/chrisko/sdk/go1.20/bin:<snip>

CC @matloob, @golang/tools-team.

Is the request that we essentially look up the path to the go command using the given environment before running it?

Yes. Especially because depending on the situation, the Go packages driver code either directly calls the go command (in which case, system-PATH-go is used) or first invokes a gopackagesdriver that may the same thing (but which now has the PATH set to what I want, and therefore uses the go binary that I want). And if the system-PATH-go command invokes go again, it will then use the go supplied in the PATH I set (This is what you can see in the strace example above -- google/go list invoked by API fork/execs go1.20/go compile, because the PATH changed).
The outcome of a Load call is different depending on the nesting of subprocesses that is invoked by the implementation of Load, which IMO leads to an API that returns confusing results.

Would you be able to set the environment on the tool that you run so that the correct go command is in the path when you run the tool?

I'm supplying these tools as both binaries and APIs. It's possible in the binaries, it's not really possible in the APIs, as I'd have to mess with the caller's PATH for the entire process.

I think another option, rather than using the PATH supplied in env, would be an argument that gives the ability to specify the go command location.

I want to push back a little on this. Right now the contract is that the user of the binary that uses go/packages ensures that the right go command is in their PATH before running it. I think it's reasonable to require users of your API to make sure that they have the correct version of go in their PATH.
What's the use case for using a different version of Go when using go/packages through an API you provide?

the binary name that is in PATH is go1.21, not go.

Those goN.M commands modify PATH in the environment to put their own "go" binary first in the list. See here.

Indeed, but you only get that if your tool using go/packages is run with
goN.M run. If you build it with goN.M and then run the binary, you have to
supply a PATH and a GOROOT to that binary to get the correct behavior.
On Mon, Jan 8, 2024 at 19:28 Dmitri Shuralyov @.***>
wrote:

the binary name that is in PATH is go1.21, not go.
Those goN.M commands modify PATH in the environment to put their own "go"
binary first in the list. See here
https://cs.opensource.google/go/dl/+/master:internal/version/version.go;l=63-66;drc=2a66dfb9a9cf29fab51425f5c052d40437875c70
.
—
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/62114#issuecomment-1882333570, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPG3EV3EXYDB47SZYSUKBTYNS2N7AVCNFSM6AAAAAA3UPWRM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSGMZTGNJXGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

How about using the new GOTOOLCHAIN environment variable?
One caveat is that the version should be the exact go toolchain version, not the language version.
$ go version
go version go1.21.5 darwin/amd64
$ GOTOOLCHAIN=go1.19.5 go version
go version go1.19.5 darwin/amd64