Dockware-Essentials MYSQL realted env variables not working

Docker compose:
`version: "3"
services:
shop:
image: dockware/essentials:latest
container_name: my_shop
volumes:
- "./shop:/var/www/html/"
ports:
- "80:80"
- "23:22"
- "8888:8888"
- "9998:9998"
- "8080:8080"
- "3307:3306"
environment:
- MYSQL_USER=shop
- MYSQL_PWD=shop`
Error:

When mysql env variables supplied to docker compose it throws an error: "Got error: 1049: Unknown database 'shopware' when selecting the database". Dockware-Essentials does not have shopware 6 built in so by default the database given "shopware" is not there. When these parameters are not specified the container raise up normally but I would like to be able to change the database's default user data at docker-compose level.

same here

is your username root? this is the only username which can not be used this way ...

no, not root, i define a new one you see at the picture:
MYSQL_USER=mysql_username
MYSQL_PWD=mysql_pwd

I am facing the exact same problem. Setting
MYSQL_USER=someuser
MYSQL_PWD=somepwd

leads to
DOCKWARE: creating new MySQL user....
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1062 (23000) at line 1: Duplicate entry 'localhost-root' for key 'user.PRIMARY'

Any news on this?


update copyright

Issue: https://github.com/open-cluster-management/backlog/issues/10226

:tada: This PR is included in version 2.0.10 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Macro to push Generate Loot

Is there macro coding to activate the 'generate loot' or 'roll' button without having to open the table?

Such a fast turn around and makes this much more convenient. Thank you


pget is missing version information

If you run pget version with the built version you get:
pget Version () - Build Time

which is missing important build information.
The pget repository has a Makefile that sets appropriate ldflags to include. Can they be included in the nix build too?

0.3.1 has a performance regression for single files

@technillogue Can you raise as an issue on the pget repo instead?

I mean that the upgrade to 0.3.0 from 0.1.1 in the commit in this repo fixing this issue may be premature


Dark Reader settings do not follow the accent color

Describe the bug

Darkreader settings do not follow the accent color.
To Reproduce

Steps to reproduce the behavior:

Go to Settings and set a accent color
Edit a service and enable dark mode
The dark mode settings color is not changed

Screenshots

Desktop:

OS: Windows 10
Ferdi Version: 5.5.0-gm.2

@kytwb I can take this up.


Fix CSS rendering bug

Fixing the rendering bug that strips out body and head when rendered.

Hey @bgdavidx! Thanks for the pull.  Can you describe the bug in more detail?  Specifically steps to recreate would be helpful.

The bug was from #2

Basically, we were competing in the NoLight challenge, everybody who wrote their CSS in

Helloooooo!

Try this before and after the change, you'll notice what I'm talking about.

@theycallmeswift, @bgdavidx and I talked about this at HackCU. Thanks agian for the fix @bgdavidx!


Create separate HTML-generator for use outside of Bridge

done https://www.nuget.org/packages/Plotly.Sharp/


Add Redis compability test runs

Run tests towards Redis version:
6.2-rc1, 6.0.9, 5.0.10, 4.0.14 and 3.2.7

The problem is with the matrix handling in Github Actions. I didnt want a matrix of different erlang versions running a matrix of tests towards different redis versions, not sure if that gives anything more and it also seems a bit hard to filter out unwanted combinations. It felt more complex then having two different jobs.
An alternative could be to have both jobs in the same CI workflow/same file, but since they are quite large it felt easier to get an overview by separate them in files.
Each month there is 2000 min of free GithubAction time to use, quite a lot, but it would be interesting to see how much we have used sofar..

I understand. An option would be to include only certain (not all) combinations of OTP and Redis version in one matrix, but if you think it's better to have a separate job for Redis versions, go for it!


Setup failed for telegram_bot

Hi.
When I'm try to add telegram_bot in Home Assistant:
Logger: homeassistant.util.package
Source: util/package.py:98
First occurred: 19:06:55 (1 occurrences)
Last logged: 19:06:55
Unable to install package python-telegram-bot==13.1: ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-92p4tyow/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output. WARNING: You are using pip version 20.1.1; however, version 21.1.2 is available. You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

Install python-telegram-bot manually. Command:
pip install python-telegram-bot==13.1
All work fine!


Automatically wrap admonition code-blocks in linting

Problem

Prettier skips wrapping code blocks. This becomes a problem for Sphinx admonition directives. See this commit as an example:
https://github.com/WordPress/openverse/pull/1975/commits/4e46865f273f35181d0f8cc71bfbc5fd93e0cae1
Description

Write a plugin for prettier, as described by https://github.com/WordPress/openverse/issues/2348

It's not possible to use a prettier plugin without publishing it or without switching to a local hook for prettier like we use for eslint. That's not really an option, it seems, otherwise we'll be adding pnpm as a dev dependency for the entire monorepo, rather than just the frontend (which is currently the case).


New update

New update broke the extension.

I wish I could close this I came here to help them update vars but they already did that :) just redownload this cheat if you want it.


Setting watch to true only works from the command-line

Setting watch=true in /etc/confd/confd.toml has no effect, even if it is documented that it should.
A quick look at confd.go (pardon my weak go-foo) seems to indicate that to me. It's picking the processor based on cmdline arguments early and doesn't look at config.Watch
    switch {
    case watch:
            processor = template.WatchProcessor(templateConfig, stopChan, doneChan, errChan)
    default:
            processor = template.IntervalProcessor(templateConfig, stopChan, doneChan, errChan, config.Interval)
    }

I confirm just spent at least 5 hours on this:
In /etc/confd/confd.toml
watch = true

Doesn't work.


Point to the IRC channel on the Libera.Chat network

The opensuse-buildservice channel moved to the Libera.Chat network.
The capitalization of "Libera.Chat" is in line with the one used in
the open-build-service git repo.

Note: existing posts that have a hardcoded link to the freenode
network are not adjusted.

Thank you @marcus-h for your PR. I've pushed some more changes to renamed Freenode to Libera.Chat in all posts. If someone happens to read an old blog post and wants to contact us, it will point them to the right IRC network.


Fix Alluxio master in HA mode start error.

Ⅰ. Describe what this PR does
Fix Alluxio master in HA mode start error.
Ⅱ. Does this pull request fix one issue?

fixes #3656
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

@xliuqq please fix the ut issue. thanks.

/test fluid-e2e


Expose transport and phy configuration for connection (Android 10 connection issue)

Hey,
Android 10 introduced problems with connecting to multiple BLE devices for me. Linked topics may be related:
https://stackoverflow.com/questions/58299507/android-10-ble-connection-issue
https://issuetracker.google.com/issues/141188862
I managed to find solution by forcing this config on connection:
bluetoothDevice.connectGatt(
                context,
                false, // auto connect set to false
                connectCallback,
                BluetoothDevice.TRANSPORT_AUTO,
                BluetoothDevice.PHY_LE_CODED
            )

But RxAndroidBle don't exposes possibility to set transport and phy. Have you considered exposing those settings?

But RxAndroidBle don't exposes possibility to set transport and phy. Have you considered exposing those settings?

At some point — yes. Unfortunately I do have limited time and it is not top priority right now.
Could you shed a bit more light on your exact case? Have you tried to investigate this bug? Get HCI logs from your device?

My case is a bit peculiar. I've got two devices on BT 4.2. They've got two modes, first is public undirected advertising for connection with an unknown central. Second is directed advertising with resolvable private address for reconnection with a bonded central.
After bonding to two devices and doing few successful connections/disconnections it bricks all future connections. After this phone can't connect and times out after 30s with Gatt error 133. It happens only when there are multiple bonded devices and only on Android 10, only thing that helps is clearing list of bonded devices.
Solution from first comment works only until I try to connect with different config, so let's say RxAndroidBle default. After which connection is bricked even for LE_CODED and Transport_auto config.
About the solution itself, setting phy to le_coded and transport to auto. My devices do not support BT5 so phone can't use 2M or le_coded for actual connection. In the HCI logs all connections are done with phy set to 1M no matter what was set in the API call (::connectGatt). But by some reason this is the only way I can connect to my devices.
From the bt device point of view, when the connection is bricked on particular phone. Bt device doesn't see any incoming connections when phone is trying to create one.
@dariuszseweryn a bit long description but case is complex. Anyway it looks like a bug deep in the bt layer that was introduced in Android 10

More info the issue. Actual event of scanning is corrupting future connections to bonded devices.
After bonding I can connect freely to multiple devices, given that I turned off scanning after the bonding. Then after disconnecting from the devies and turning on scanning for a moment and turning it off I can no longer connect to my devices. It seems that scanning event corrupts some internal data for bonded devices.

😲
Have you checked what is sent through HCI before and after scanning?

I'm not an expert in low level BLE communication  but I haven't seen anything out of ordinary in HCI logs. If you're interested in the topic I'd be more than happy to share the logs.
Also found out that it's not only about the scanning. What actually corrupts the connection is successfuly scanning devices from the bonded list. I can't reproduce the error If I'm turning off the devices during scanning events

Please do. Having logs with a successful connection after bonding, re-scan and unsuccessful connection could be interesting to find out what may be happening there

Here are logs and thank you!
HCI logs are a bit crowded with events, please use logcat highlights to get timestamps for easier navigation. Here are steps from the issue:

Started scan and discovered two devices
Successfuly bonded to both devices
Stopped scan
Successfuly connected and disconnected few times
Performed scan for few moments and turned it off
Tried to connect to one of the devices which resulted in failure, gatt error 133 (30 sec timeout)

Just in case also attached full logcat logs with filtering on bluetooth stack.
logcat_full.txt
BTSNOOP.log
logcat_highlights.txt

I've prepared similar log package from Android 9 where this problem doesn't occur. Differences I found after comparision:

For some reason OnePlus with Android 9 doesn't seem to be using White List at all, where Android 10 Pixel always adds the device to the White List before the connection.

Scanning gives slightly different results for both devices. OnePlus reports the device with address type of Peer Address Type: Public Identity Address (Corresponds to Resolved Private Address) (0x02) where on Pixel reported device type is Peer Address Type: Random Device Address (0x01). Address type is only thing different, address stays the same.

Additionally before scanning that corrupts connection Pixel adds the device to White List with type Address Type: Public Device Address (0x00) and then performs the connection to same address with same type so Peer Address Type: Public Device Address (0x00).
But after scanning the type on add to white list event changes to Address Type: Random Device Address (0x01) but on connection address type stays the same Peer Address Type: Public Device Address (0x00). Address itself doesn't change, only type.
bt_snoop_android_9.log
logcat_full_android_9.txt
logcat_highlights_android_9.txt

I assume your peripherals use public address types?

You're right, the device won't always pop up in the scans, maybe it scanned with true random address and is interpreted by something up in the stack. But still after the scanning it's added to white list with random type address.
Scanning itself is not full story, if I successfuly scan the devices, then turn off bt for a while and try to connect to them without doing second scan (BluetoothDevice from bonded list), connection is successful.

Scanning itself is not full story, if I successfuly scan the devices, then turn off bt for a while and try to connect to them without doing second scan (BluetoothDevice from bonded list), connection is successful.

This is a well-known bug of Android. I have briefly mentioned about it on Wiki

You're right, the device won't always pop up in the scans, maybe it's scanned with true random address and is interpreted by something up in the stack. But still after the scanning it's added to white list with random type address.

I have been looking on frames between 4531 and 6017. First one is the last moment the peripheral is added to white list with public address type and the second is the first moment the peripheral is added to white list with random address type. I have tried searching for MAC address c5:c1:c4:74:61:88 but have not found it in between. That would suggest that the Android stack has some bug not directly related to this peripheral scan.

Was doing some tests with single bonded device and managed to recreate the issue only on one device, which is new for my case.
Checked the logs after connecting without scanning and type address added to the whitelist is actually public as expected connection is successful in such case. When only one device is bonded scanning again doesn't affect future connections as device with correct type address is already on the white list and doesn't have to be re-added. It makes sense that it's really easy to duplicate the issue while using two devices because during connections they're added and removed from white list.
Here are logs with successful connecting without scanning. You can find adding to white list in frame 186
btsnoop_1811_4.log
logcat_highlights.txt
What's interesting is that in logs with corrupted single device connection scanning returns correct address type public resolved from private but it's still added as random to the white list. Which results in unsuccessful connection.
White list in frame 1198
btsnoop_1811_6.log
logcat_highlights.txt

@dariuszseweryn problem has been fixed from the bluetooth device perspective. I think it's really interesting case. Straight after bonding device didn't update it's address type immidiately to correct type (random static) but kept the incorrect (public) one. Address itself was correct.
These are white lists operation with bug:

Add to white list: type PUBLIC, address true private // First connection after bonding
Add to white list: type RANDOM STATIC, address true private // All subsequent connections

These are white lists operation with fixed address type:

Add to white list: type RANDOM, address true private // First connection after bonding
Add to white list: type PUBLIC, address current public random address // All subsequent connections

Here're logs with solution if you're interested:
btsnoop_working.log
logcat_highlights.txt
What is most interesting about it, is that this situation is tolerated by all iOS versions and Android version until 10. It appears that they dramatically changed how addresses are handled under the hood.


Expand awmd-stats tool for use by other event organizers in the Wikimedia movement

I met event organizers of the Women Tech storm hackathon who are exploring ways to retain/track candidates from their events. After having a chat with them and being reminded of your tool again at Wikimania, I was wondering if we could expand this tool so that other event organizers in the movement could use it in a similar way like with the AWMD initiative.
Not quite sure if this is a good idea, thoughts welcome! :)
But, if it is, then maybe we could consider creating a Phabricator ticket, see what others think about this idea and probably this task could become a good candidate for Wikimedia outreach programs?

@srish, the tool can obviously be expanded, we shouldn't limit it to this level, a task to track this if epic :)

@srish, imported on phab as https://phabricator.wikimedia.org/T202233. Closing this now!


nodediscovery: support additional IP address sources for the local node

This will e.g. be useful for multi-homing where the local node might have addresses from more than one network.

/test

/test


Workaround fuel duplicated model

Bug fix
There is a duplicated model in fuel which break pit crew's cache. In order to not break existing caches, I just make an exception for that model.
Fixed bug

Fix applied

If your pull request is a bug fix, delete this line and all the below lines.
If your pull request is a feature implementation, delete this line and all the above lines.
New feature implementation
Implemented feature

Implementation description

I tried a different approach to actually skip the model instead of breaking, it seems to work for me but admittedly I'm not sure why duplicate name was made a breaking condition and whether there is a corner case where we might end up looping endlessly (although that doesn't seem like it should happen):
diff --git a/rmf_building_map_tools/pit_crew/pit_crew.py b/rmf_building_map_tools/pit_crew/pit_crew.py
index 459e81a..56040f6 100644
--- a/rmf_building_map_tools/pit_crew/pit_crew.py
+++ b/rmf_building_map_tools/pit_crew/pit_crew.py
@@ -840,7 +840,7 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
     # RFE: Doing this asynchronously will significantly speed this up.
     # Any solution must guarantee:
     #   - All new models are guaranteed to be added to the cache
-    #   - Loop breaks as soon as we start pulling up already cached models
+    #   - Models that are already cached are not added
     while status == 200 and not break_flag:
         logger.info("Fetching page: %d" % page)

@@ -853,12 +853,11 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
                 model_name = model.get("name", "")
                 author_name = model.get("owner", "")

-                # If a cached model was found, halt
+                # If a cached model was found, skip
                 if (model_name, author_name) in old_cache['model_cache']:
                     logger.info("Cached model found! "
-                                "Halting Fuel traversal...")
-                    break_flag = True
-                    break
+                                f"Skipping model {model_name} by {author_name}")
+                    continue
                 # Otherwise, add it to the cache
                 else:
                     new_cache_count += 1

Does this make sense? CC @methylDragon

The best approach would be to clean up the fuel db, that particular duplicated model has 0 downloads so far.

What I did locally was I made the model name tuple a three member tuple of (model name, author name, creation timestamp)
But then that needed some other changes elsewhere that I wasn't confident of pushing in because it might lead to conflicts with preexisting model caches 😬
Best is to just fix the DB though, Ian said that the model-author pair is supposed to be unique.

I tried a different approach to actually skip the model instead of breaking, it seems to work for me but admittedly I'm not sure why duplicate name was made a breaking condition and whether there is a corner case where we might end up looping endlessly (although that doesn't seem like it should happen):
diff --git a/rmf_building_map_tools/pit_crew/pit_crew.py b/rmf_building_map_tools/pit_crew/pit_crew.py
index 459e81a..56040f6 100644
--- a/rmf_building_map_tools/pit_crew/pit_crew.py
+++ b/rmf_building_map_tools/pit_crew/pit_crew.py
@@ -840,7 +840,7 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
     # RFE: Doing this asynchronously will significantly speed this up.
     # Any solution must guarantee:
     #   - All new models are guaranteed to be added to the cache
-    #   - Loop breaks as soon as we start pulling up already cached models
+    #   - Models that are already cached are not added
     while status == 200 and not break_flag:
         logger.info("Fetching page: %d" % page)

@@ -853,12 +853,11 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
                 model_name = model.get("name", "")
                 author_name = model.get("owner", "")

-                # If a cached model was found, halt
+                # If a cached model was found, skip
                 if (model_name, author_name) in old_cache['model_cache']:
                     logger.info("Cached model found! "
-                                "Halting Fuel traversal...")
-                    break_flag = True
-                    break
+                                f"Skipping model {model_name} by {author_name}")
+                    continue
                 # Otherwise, add it to the cache
                 else:
                     new_cache_count += 1

Does this make sense? CC @methylDragon
Edit: Oh I see that it would always update the model cache if it doesn't exit early

And yes, exiting early is important otherwise builds will get unnecessarily extended (and fuel will get slammed with model list requests)
The models are always presented such that the latest models are shown first.

See what I did here: https://github.com/open-rmf/rmf_traffic_editor/pull/492
I haven't refined it but the basic idea is there.


[x] Science! Continued

Taking over for Z-Key Aerospace due to inactivity

Do you want to add yourself as an author?
Also, the name will differ to the original -> "name": "KSP X Science", (updated) vs "name": "[x] Science!", (original).
Also, it will conflict with the odd usage of the 'v' in the version strings of the previous versions:

I think this can be resolved by removing it from the old .ckans?

Do you want to add yourself as an author?
Also, the name will differ to the original -> "name": "KSP X Science", (updated) vs "name": "[x] Science!", (original).
Edit: This is because CKAN pulls the name from the GitHub repo name.
If you add a explicit "name": "[x] Science!", to the netkan, it should override this.
One more edit: I think this also is the reason, why CKAN can't read the .version file.
Third, it will conflict with the odd usage of the 'v' in the version strings of the previous versions, CKAN thinks the older versions are newer ones (if you have 1.4 marked ad compatible):

I think this can be resolved by removing it from the old .ckans?

I decided to just create from scratch, this means if the original developer comes back he can merge my PR and [x] Science! can live on, for now [x] Science! Continued (this) will just be here so people using ckan can grab the mod magically :)

it will conflict with the odd usage of the 'v' in the version strings of the previous versions, CKAN thinks the older versions are newer ones (if you have 1.4 marked ad compatible):

I think this can be resolved by removing it from the old .ckans?

Would be better to do an epoch rather than removing the old ones

@Flupster now decided to make it a separate mod, so this issue is resolved.
Also I think it now would make sense to create a new forum thread, @Flupster, so you can communicate with the users outside the comment section of the original thread.

#rebuild

Two mods suggest or recommend xScience. Should this mod have "provides": [ "xScience" ], to pull it in in those cases?

Two mods suggest or recommend xScience. Should this mod have "provides": [ "xScience" ], to pull it in in those cases?

One of those mods is mine. I'll likely just make a PR to suggest Flupster's continuation instead anyways.

Two mods suggest or recommend xScience. Should this mod have "provides": [ "xScience" ], to pull it in in those cases?

Alternately, if this PR is able to be merged, I can take a stab at adding replaced_by: to the old xScience for the sake of testing that out.

Does a replaced_by relationship imply a conflicts (@HebaruSan / @politas) ?

@DasSkelett No, any conflicts or provides would need to specified separately.

Anything needed to be done by me before this gets merged?

Anything needed to be done by me before this gets merged?

Is there going to be a new forum thread? That was suggested above and sounds like a good idea.

Anything needed to be done by me before this gets merged?

Is there going to be a new forum thread? That was suggested above and sounds like a good idea.

I don't see a point, there are no additional features or changes other than recompiling for newer versions of KSP, I'll continue to monitor the older thread but seeing as there are no additional features there's no need to make a new thread.

@Flupster The problem with not creating a new thread is that you don't have control of the OP, which can cause issues down the road (I'm running into this with the OSE Workshop)

@Flupster One example is that you would be able to update the version number in the thread title. It would also just make it clear that you're continuing it as another mod and no longer just updating the same mod.

I've created a thread and changed the homepage in the netkan meta.

Hm, I wonder if a new thread takes a few minutes before being available to anyone else? I was on my way over there to give you kudos but got a 404...

I'm still below 5 posts, it's in the process of being approved 😅

Oh hahaha that's hilarious


Make link_to field required

Make link_to field required. Currently it is not required, resulting in links to None. See issue #13.
This fix seems to work for me:

Hi @rikva !
Thanks!
I wonder if we did required=False because we wanted it to be possible to have optional links...
Eg:
class MyImageBlock(StructBlock):
   image = ImageChooserBlock()
   # optional link when you click on the image.
   link = LinkBlock()

I think we've used that pattern on a few of our projects.
Ideally, we'd have something like:
class MyImageBlock(StructBlock):
   image = ImageChooserBlock()
   # optional link when you click on the image.
   link = LinkBlock(required=False)

kind of thing - so you could explictly specify if it was required or not.
I think we'd prefer it if it was default required=False - so we don't get a bunch of migrations 🤣
What do you think?

I see... I agree with what you are saying: ideally you'd specify that required parameter on the LinkBlock instantiation.
With the current state of link_to being optional, you need to handle "links without links" in the templates.
Perhaps for backwards compatibility we could add something like this?
class LinkBlock(StructBlock):
    def __init__(self, **kwargs):
        # Default required to False
        kwargs["required"] = kwargs.get("required", False)
        super().__init__(self.fields, **self.meta)

Hi @danthedeckie, any thoughts on this?

Hi @rikva - thanks so much for your contribution -
sorry it took me so long to respond.
I've taken the concept and implemented it in #18  so am closing this PR now.

Thanks, @danthedeckie. Unfortunately this does not appear to fix the issue: by default, the link_to field is still not required, so users can still accidentally create a link to https://example.com/None.


quintic pi million digit test breaks clang -Ofast3

The quintic million digit test breaks optimization setting -Ofast3 on clang. This might be a compiler issue, as all other compilers including clang itself at lower optimization levels pass the test.
We will, nonetheless, create this issue for artempting to work around the potential bug. The reason is because the code to test success of the million digit run is somewhat complex and could potentially be made more clear or be implemented with reduced complexity, which requires some thought

Fixed by 37190061a374a4df9a4941db8f4f4e3870b0e04c


fixing private key formatting

Which issue this PR addresses:
Fixes bug introduced by https://github.com/Azure/ARO-RP/pull/2266/files
What this PR does / why we need it:
Properly formats RSA public key format
Test plan for issue:
Needs to be tested during ongoing INT deployments
Is there any documentation that needs to be updated for this PR?
No

/azp run ci

/azp run ci


fix: action is Array or Dictionary can't be transformed

When action is Array or Dictionary, it's hard to transformed to NSArray or NSDictionary.
"items": [
     "action": {
        "id": 1,
        "name: "book name"
    },
    "type": 1"
]

the TangramBus's  event params get action is
{
    id = 1;
    name = "book name";
}

While we want
 {
        "id": 1,
        "name: "book name"
 }

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.relax seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add icons to Header

It might not look as clean as before, but I think icons are always good when it comes to building a good UI. @asketonim, what's your opinion?

It might not look as clean as before, but I think icons are always good when it comes to building a good UI. @asketonim, what's your opinion?

Indeed, comparing two pages (with and without icons) I might say the one without icons looks cleaner.

On another hand, it takes less time for user to navigate on the page.
From how it looks - no icons, from how it feels - yes icons.
I might have missed something, so I need a response from you.

@asketonim, yeah, this duality is a problem. Maybe we could polish our logo a bit, so it fits this bar better and then we can go with the icons?

@asketonim, also check out this variants:

I like the second one. I guess that's what we need.

@asketonim, I am still not sure :laughing: . Final choice:

P.S: I like the last one more

Yeah, the last one.
We can easily change it at any time, so let's move on.


Add support for using a custom user model

This PR makes it possible to dynamically use a custom model to login without using the guard
Usage:
<x-login-link user-model="App\\Models\\Customer"<EMAIL_ADDRESS>label="Login as Customer"/>

There are conflicts. Could you rebase with the current main branch? Thanks!

@freekmurze Fixed 😄

Very nice, thanks!


Please push a new release to Hackage

Hi @gibiansky, now that lts-10.0 is out, can you push new releases to Hackage for ihaskell, ghc-parser, ipython-kernel, and possibly also the ihaskell-display modules? Alternatively, could you add me to the package maintainer group for these packages? My username is VaibhavSagar.

@vaibhavsagar Thanks! I've added you as a maintainer on all the packages listed here except for inline-r which wasn't uploaded by me.

Thanks so much! In that case I will close this as soon as I upload a new release 😃.

[x] https://hackage.haskell.org/package/ihaskell-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ipython-kernel-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ghc-parser-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-aeson-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-blaze-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-charts-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-diagrams-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-gnuplot-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-hatex-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-juicypixels-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-magic-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-plot-<IP_ADDRESS>/
[x] https://hackage.haskell.org/package/ihaskell-widgets-<IP_ADDRESS>/


bug: the history page of WIKI can't open

Gitea version (or commit ref): 1.12.0+dev-72-g2c25e75dc
Git version:
Operating system:
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[ ] Not relevant

Log gist:

Description
see Screenshots
https://gitea.com/gitnex/GitNex/wiki/How-to/_revision
Screenshots

Closing as duplicate of #11041


 :)
EDIT : its Bottleneck-0 in the image btw

What's happening there is that the data has to be transferred from GPU to CPU. I couldn't figure out a way to do something like boolean mask on GPU only. Perhaps there is a way to transfer less data than I currently do or parallelize more tasks in the meantime? I'm not sure.
It's possible to also ping the TF team and ask about boolean_mask support. Awesome profiling though! Would it be possible to document a bit about what you've found so far so there's a reference of where biggest parts of improvements could be?

HI
thank you for your reply
i got those times on a GPU : gtx850m 4GB ddr3
on CPU (i7-4710HQ/Intel HD4600)  a get about   850ms/image and weirdly less predictions ? :D

i will refactor the code and do some clean up and upload it. (maybe tomorrow)
about some improvements i was wondering if  its possible to perform more operations on tensors
before dowloading the final  data to the cpu (like the iou or the box filtering & class thresholds)
i am currently reading the original darknet lib and the darkflow port maybe i can get some clues
i will post any findings

Hi, I'm interested in this too!
I'm trying running an extremely light weight model (on CPU), the forward pass takes 10ms.
I actually got to the same bottleneck code.
So I replaced the code with a tensorflow equivalent:
  const prediction_mask = tf.greaterEqual(box_class_scores, tf.scalar(threshold)).as1D();
  const N = prediction_mask.size
  const all_indices = tf.tensor1d(Array.from(Array(N).keys()));
  const neg_indices = tf.tensor1d(new Array(N).fill(0));
  const indices = tf.where(prediction_mask, all_indices, neg_indices).toInt();

So .data isn't called (index 0 represents the objects that don't survive the threshold, but those will be filtered later anyway, and it's only a single index).
This indeed shrinked the run time of that part of the code to an order of 10ms.
But then in the yolo function, there is
const classes_indx_arr = await classes.gather(tf.tensor1d(keep_indx).toInt()).data();
And I didn't find a way to reduce that yet.

The really strange thing for me, is that I'm running this on a laptop without a GPU, and still have the same issue.

@jacobgil wow that's really clever! 😍  I scratched my head quite a bit at how to not use gross data transferring and couldn't figure out how exactly to use where for this case haha, I'll admit I need to chew on it a bit still to understand the implications of index 0, is the assumption that class 0 will most likely have a low prob and get filtered out by the classProbThreshold?
I want to say that last data transfer is hard to get rid of (we need to exit tensor-land eventually). It seems like we can move the classProbThreshold into tensor-land by borrowing the same greaterEqual/where/gather masking logic. I haven't touched the code for a bit so I can't think of what the potential impact of that would be (can't speculate on latency/data transfer speed).
Would you mind landing in a PR with your proposed new code? And some pre/post optimization benchmarks?
p.s. I think that masking logic alone would make a great NPM module haha, unless boolean_masks are already a thing or upcoming on the tfjs roadmap (the project moves too fast for me to keep up)

Yes the assumption is that if class 0 survives the initial filtering (but has a very low probability), it can't survive the next filtering by classProbThreshold anyway.
Unfortunately this doesn't speed up things for the entire program, since the .data transfer happens in another place in code anyway, so pre/post optimization benchmarks show that the total run time isn't changed, only the run time of that specific part in the code.
I'l try figure out a way to move classProbThreshold into tensor-land.

@MikeShi42  you can remove BatchNorm layers from the model as they are not needed for inference(i think)
i managed to do it but i am not  very sure  about the results
here a script on tiny-yolo coco :
import os
import numpy as np
import keras
from keras.models import Sequential, load_model
from keras.layers import Conv2D, MaxPooling2D
from keras.layers.advanced_activations import LeakyReLU
import tensorflowjs as tfjs

model_path = "tinyv2.h5"

# Load the model that was exported by YAD2K.
model = load_model(model_path)
# model.summary()
model_nobn = Sequential()
model_nobn.add(Conv2D(16, (3, 3), padding="same", input_shape=(416, 416, 3)))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D())
model_nobn.add(Conv2D(32, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D())
model_nobn.add(Conv2D(64, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D())
model_nobn.add(Conv2D(128, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D())
model_nobn.add(Conv2D(256, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D())
model_nobn.add(Conv2D(512, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(MaxPooling2D(strides=(1, 1), padding="same"))
model_nobn.add(Conv2D(1024, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(Conv2D(512, (3, 3), padding="same"))
model_nobn.add(LeakyReLU(alpha=0.1))
model_nobn.add(Conv2D(425, (1, 1), padding="same", activation='linear'))
#model_nobn.summary()
def fold_batch_norm(conv_layer, bn_layer):
    """Fold the batch normalization parameters into the weights for
       the previous layer."""
    conv_weights = conv_layer.get_weights()[0]

    # Keras stores the learnable weights for a BatchNormalization layer
    # as four separate arrays:
    #   0 = gamma (if scale == True)
    #   1 = beta (if center == True)
    #   2 = moving mean
    #   3 = moving variance
    bn_weights = bn_layer.get_weights()
    gamma = bn_weights[0]
    beta = bn_weights[1]
    mean = bn_weights[2]
    variance = bn_weights[3]

    epsilon = 1e-3
    new_weights = conv_weights * gamma / np.sqrt(variance + epsilon)
    new_bias = beta - mean * gamma / np.sqrt(variance + epsilon)
    return new_weights, new_bias

W_nobn = []
W_nobn.extend(fold_batch_norm(model.layers[1], model.layers[2]))
W_nobn.extend(fold_batch_norm(model.layers[5], model.layers[6]))
W_nobn.extend(fold_batch_norm(model.layers[9], model.layers[10]))
W_nobn.extend(fold_batch_norm(model.layers[13], model.layers[14]))
W_nobn.extend(fold_batch_norm(model.layers[17], model.layers[18]))
W_nobn.extend(fold_batch_norm(model.layers[21], model.layers[22]))
W_nobn.extend(fold_batch_norm(model.layers[25], model.layers[26]))
W_nobn.extend(fold_batch_norm(model.layers[28], model.layers[29]))
W_nobn.extend(model.layers[31].get_weights())
model_nobn.set_weights(W_nobn)

# Make a prediction using the original model and also using the model that
# has batch normalization removed, and check that the differences between
# the two predictions are small enough. They seem to be smaller than 1e-4,

print("Comparing models...")

image_data = np.random.random((1, 416, 416, 3)).astype('float32')
features = model.predict(image_data)
features_nobn = model_nobn.predict(image_data)

max_error = 0
for i in range(features.shape[1]):
    for j in range(features.shape[2]):
        for k in range(features.shape[3]):
            diff = np.abs(features[0, i, j, k] - features_nobn[0, i, j, k])
            max_error = max(max_error, diff)
            if diff > 1e-4:
                print(i, j, k, ":", features[0, i, j, k], features_nobn[0, i, j, k], diff)

print("Largest error:", max_error)
print("Converting...")
tfjs.converters.save_keras_model(model_nobn, "./Converted-NoBatch/")
print("yay")
print("Done!")

also check this out because i think he has a better way of post processing

@TheHidden1 do you have a set of tfjs weights that can be pointed to? :) Or do you need help converting the Keras model to tfjs format?
Also, I don't think that other method would be faster, the current method uses a good amount of parallelism (vectorized), whereas the one linked seemed to use a triple for-loop, thus making it a serial operation.

https://github.com/TheHidden1/tiny-yolo-noBatch
i am not sure about the Perfs impact  but this definitively uses less memory
right now i think the post processing is messy ,
from what i can uderstand right now  there are 3 main things to do  in tensorland to minimize the tensor.data() impact :
Box filter
NonMaxSuppression
Class Prob filter
i think these 3 can be done with  conv layer  to obtain some kind of final indices tensor
tf.gather the output (the  5 or 6  final detection ) then call data()  on it
i will try to do it but honestly i am  still wayyy too noob  in tensorflow

Hey interesting discussion I am facing the exact same issue.
I implemented a ssd mobilenet architecture, but fetching the tensor data is the bottleneck here. I removed the post processing layer and do non max suppression and confidence filtering manually.
Initially my guess was, doing the post processing e.g. non max suppression and confidence filtering on the gpu would fix the bottleneck, because you would have to transfer less data, as @TheHidden1 suggested.
Now the weird thing is, no matter if I call scores.data() to get the entire tensor data, or if I reduce the size of the tensor to a single entry with tf.slice beforehand, it takes the same time for both tensors to fetch the data from gpu. Thus I suspect, it doesn't really matter if you do filtering and non max suppression on the gpu or cpu.
Anyways hitting a performance bottleneck with fetching the tensor data (~100ms) whereas actual forward time is ~30ms on my system.

@justadudewhohacks  how exactly do you slice beforehand  ??
I managed ~20ms  forward time +pre/post processing on tinyyolov2 and tinyyolov3
on a gtx 850m 4gb
sadly data() still takes about ~190ms witch is really frustrating

Basically: const sliced = tf.slice(scores[0], 0, 1), which gives me a tensor of shape [1]. Calling .data() on that one is ~100ms for some reason.
I think there must be some prefetching going on. For example if I do:
await tensor1.data()
await tensor2.data()

then fetching the data of tensor2 is ~10ms and the first fetch is ~100ms. Otherwise fetching tensor2 would also be about 100ms.
This is quite odd behavior in my opinion. Will have to investigate into it.
Regarding nms, I don't do it on the gpu. As I said I do all post processing on the cpu. The code for nms is from my PR in tfjs-core. Just passing scores and maxOutputSize as a number array instead of tensors.

I'm not sure how y'all are looking at timing, but my suspicion and I forgot if I already said this somewhere above is that because tensor.data() waits for the GPU to be free, if there are tensor operations running (inference), then the delay/wait you're seeing on the .data() call is most likely because it's waiting for the inference step to finish before downloading data to CPU (not because the download actually takes 100ms to transfer).
I haven't benchmarked the code in a while but I think the GPU usage graph in Chrome could be a good telltale sign on if the GPU is busy doing inference for only 20/30ms or if it's actually taking 120ms but because it's GPU code, our JS burndowns don't capture the timing appropriately.
It'd be great if y'all shared burndown/GPU usage graphs that could probably help in documenting perf improvements :)
Just my 2cents
Also @TheHidden1 sorry I haven't had time to look at non-BN model yet, I've unfortunately been very busy with other stuff :'(

Ohhh well that of course explains the behavior. You probably just saved me a lot of time breaking down the issue @MikeShi42. Thanks and very well explained!
Also sorry, that my issue is not related at all to tfjs-yolo-tiny, but ssd in general. This issue got linked from tfjs somewhere and I didn't notice me ending up in a different repo.
Thanks and have a great weekend!

@justadudewhohacks no worries! This issue is one that plagues obj detection models with similar post-processing so it's totally relevant. And what I said is just a hunch that I think I've tested before, but the profiling tools were a bit finicky on Chrome for some reason so I can't confirm 100% that that's the most likely root cause (but it seems reasonable and explains certain behaviors), but is a good place for you to sanity check as well if you wish :)
Hope everything is working out well for you!

Just gave it a shot by awaiting a small timeout before calling .data() and indeed what you explained is what I was facing. When awaiting a timeout of 100ms, the actual fetching of data is indeed just a few ms for the entire tensor. So I guess 100 - 150ms is simply the time for inference on my gpu.
Thanks again!

@justadudewhohacks  @MikeShi42  i tried measuring the timings  with tf.time and i am still getting the same results (i think)
the downloadWaitMs  is still the major bottleneck  while kernelMs is fine
https://groups.google.com/a/tensorflow.org/forum/#!topic/tfjs/YfH5_GTnx3E

ps : i made some changes to the post processing algorithm

@TheHidden1 Is that timing the entire execution of the model + post-processing, or only post-processing?
If it's only post, is there any chance you could try timing the entire model + post-processing? Mainly for sanity checking that the kernel timing is accurate (not just CPU time spent on inference, which there would be very little)

@MikeShi42 the timing are for the whole inference pipeline(pre-processing +prediction +post-processing)
i know  the KernelMs times  look weird but the docs says

kernelMs: Kernel execution time, ignoring data transfer.

and on the tfjs google group

The kernel time is just the time taken to execute the current process on the tensorflowjs backend (CPUor GPU), so wallTime = kernelTime(current process time) + otherProcesses time (incl. data transfer time).

it also may very well  be a bug in tf.time or simply  i am a wizard that made such a good post processing 🤣 🤣   i think the former

@MikeShi42 can you try and benchmark yourself to see  if you can get similar results ?

this on the full yolov3

ithink there is something wrong with tf.time() or i am doing something wrong

ehehehhehehe
https://groups.google.com/a/tensorflow.org/forum/?utm_medium=email&utm_source=footer#!msg/tfjs/YfH5_GTnx3E/Xx95BT4SAgAJ

Right now tf.time() is totally busted. The GPU timer we use was turned off in chrome recently because of Spectre / Meltdown.

@TheHidden1 thanks for the follow up, makes sense!


TRPC Package

closes #284

[ ] Documentation?
[ ] Testing?
[x]  Generate dependant models if required => We could introduce a flag to the command to omit this, but by default I'd do it

Server:

[x] ResponseMeta
[x] Context

Client:

[x] Headers
[x] Transformations

@mrleebo/prisma-ast for parsing the prisma file

Random Idea: Fields like ID are likely to be generated automatically on the server, so there will be no need to transfer them via trpc. We should add an option, to add a comment before a prop with a given text like @webstone ignore or something, that prevents this prop to be used with trpc. I'm not sure if that's possible, or a thing we want, just a random idea

We decided to use the decoraters @default for now, and determine by these if the field gets optional

In b0f4a4f, I renamed webstone-plugin-cli|web-<package> to webstone-plugin-<package>-cli|web.
I also added new tasks that run when a new plugin is created. The tasks install the plugin's CLI as a dev dependency for the web directory. It also installs the @webstone/cli as a dev dependency. Lastly, it creates a prepublishOnly NPM script to remove these two dependencies before the plugin's web package is published to NPM.

This PR contains improvements to how we create plugins. I need that for the request-logger plugin. I'm going to merge this PR and should it introduce any issues, I'll deal with it as I develop the request-logger plugin.


Your first program: Android Basics in Compose

URL of codelab
In which task and step of the codelab can this issue be found?
Describe the problem
Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

https://github.com/google-developer-training/basic-android-kotlin-compose-birthday-card-app/issues/893#issue-2616709713


[doc] Add user guide for software tests WIP

This change adds a step-by-step guide to how to run the software tests
locally.
The existing documentation didn't cover how to run the software unit
tests and the existing documentation for smoke tests was not very
accessible to newcomers to the project.

General style comment: Rendered markdown files should be written with one sentence per line to make diffs easier. (See https://docs.opentitan.org/doc/rm/markdown_usage_style/)

Thanks @imphil.

Looking for high-level feedback for now. This is my first OT documentation contribution so I'm a bit unsure whether this makes sense.

Is this the right place for this information to live (it is a user guide alongside Build software called Test software)?
Any general thoughts on the style and level of detail?
Do you think this would be useful to you personally as a reference or is it only useful for newcomers in need of basic guidance?

Thanks!

@mundaym looks like this PR fell through the cracks. Do you plan to complete it? Otherwise let's close it.


na/ofi: fix a double free problem in error case

If a provider is unable to initialize properly
when creating an endpoint or domain, the OFI NA
wasn't handling cleanup of OFI info objects quite
right, resulting in heap corruption with double
frees, etc.
Signed-off-by: Howard Pritchard<EMAIL_ADDRESS>

Merged in 52a20eb


Auth with OIDC

Is your feature request related to a problem?
I heavily use Authelia in my self hosted environment and try to use only services that can authenticate through HTTP Headers from the Reverse Proxy or OIDC.
Describe the solution you'd like
Would be great to be able to authenticate through other methods such as OIDC or other remote auth options.
Additional context
I am not an expert in this space, I know that other services like Octoprint or Paperless-ngx offer the ability to do authentication through HTTP header. Not sure how that works given you utilize an email for users.

+1 on OIDC
Check this out, if you're familiar with GO, i'm more of python guy tho not much of help lol.
https://pkg.go.dev/github.com/coreos/go-oidc/v3/oidc
This will allow authentication against any ODIC providers: google, auth0, keycloak, anthelia, authentic, etc.

I would be happy to use auth proxy, like for example how Grafana do to be able to auth with Cloudflare Access

I can confirm this works with Authelia right now 👍

Working configuration for Authelia:
Server side (in configuration.yml):
identity_providers:
  oidc:
    - id: memos
      description: memos
      secret: 'insertsecrethere'
      public: false
      authorization_policy: two_factor
      redirect_uris:
        - https://URL_OF_MEMOS/auth/callback
      scopes:
        - openid
        - profile
        - email
      grant_types:
        - authorization_code
      userinfo_signing_algorithm: none

client side (in memos):

Field
Value

Name
Authelia

Identifier Filter

Client ID
memos

Client secret
insert_secret_here

Authorization endpoint
https://auth.example.com/api/oidc/authorization

Token endpoint
https://auth.example.com/api/oidc/token

User endpoint
https://auth.example.com/api/oidc/userinfo

Scopes
openid profile email

Identifier
preferred_username

Display Name
given_name

Email
email

Hi @Hobbabobba, thanks for sharing your config. This looks very promising. Unfortunately, I am only seeing a spinning wheel after authorising with Authelia.

Did any part of this change in the meantime? I cannot see any errors in the logs.

No changes on either Authelia or Memos side. Feels like this part of your configuration has a problem:
      redirect_uris:
        - https://URL_OF_MEMOS/auth/callback

I'd like to heavily upvote the request for proxy authentication because it is just so simple and elegant.
The perfect proxy auth feature for me would work like this:

Start the app with additional environment variables:

containing the name of the initial admin user (e.g. admin=admin_user)
enabling proxy auth (e.g. proxy_auth=true)
setting the key of the http header that contains the username (e.g. auth_header=X-Authenticated-User)

Configure the reverse proxy to authenticate incoming requests in any way you like.
Let the reverse proxy set X-Authenticated-User to the authenticated username on every request.
The app treats the requests as if they belong to the appropriate user session.
Bonus: if the app does not know the username, it creates a new user with that name.

Other SSO methods like OIDC still require the user to login with each app, even it no credentials are required. It is still an additional step that is unneeded and hurting the user experience.
Here are some examples of apps that feature proxy authentication: FreshRSS, LinkDing, Navidrome.
Additional context:
I am using the app for this product. Since this is a single-user platform, users really should see no login screen at all, not even for SSO.

Working configuration for Authelia:
Server side (in configuration.yml):
identity_providers:
  oidc:
    - id: memos
      description: memos
      secret: 'insertsecrethere'
      public: false
      authorization_policy: two_factor
      redirect_uris:
        - https://URL_OF_MEMOS/auth/callback
      scopes:
        - openid
        - profile
        - email
      grant_types:
        - authorization_code
      userinfo_signing_algorithm: none

client side (in memos):
Field 	Value
Name Authelia
Identifier Filter
Client ID memos
Client secret insert_secret_here
Authorization endpoint https://auth.example.com/api/oidc/authorization
Token endpoint https://auth.example.com/api/oidc/token
User endpoint https://auth.example.com/api/oidc/userinfo
Scopes openid profile email
Identifier preferred_username
Display Name given_name
Email email

I had to add this line to the configuration.yml based on the error logs from memos.
token_endpoint_auth_method: 'client_secret_post'
2024/04/08 05:39:54 INFO client error method=/memos.api.v2.AuthService/GetAuthStatus error="rpc error: code = Unauthenticated desc = user not found"
2024/04/08 05:39:54 ERROR server error method=/memos.api.v2.AuthService/SignInWithSSO error="rpc error: code = Internal desc = failed to exchange token, err: failed to exchange access token: oauth2: \"invalid_client\" \"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The request was determined to be using 'token_endpoint_auth_method' method 'client_secret_post', however the OAuth 2.0 client registration does not allow this method.\""

Did anyone try to use OAuth/OIDC with Memos and KanIDM?

This is working great with Authentik. I assume this can be closed out as delivered?

I would still love to see a proxy auth option as described above. Should this be another ticket then?


Set Up SAP Data Hub, Developer Edition 2.4

Tutorial URL: https://developers.sap.com/tutorials/datahub-docker-v2-setup.html
Please specify the step you are referring to
Step 2: Download SAP Data Hub, developer edition
On trying the link as specified I get the following error
Unfortunately, a technical error occurred when processing your request. Please try again.
@anishgupta85

Could you try it again, it works fine right now @amitavamitra

Thanks @fx5151git it works and I managed to install SAP Datahub.

Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.


SDHC Library Changes to Enable New Features of the AppSwitcher

I changed the AppSwitcher (in "refdes" repository) example to work from the external flash instead of the SD Card. To be able to build the new code, some functions should be changed from here too.

/clang-format-run

Not sure why the workflows aren't running...

/clang-format-run


Update mingw website

The project moved off of sourceforge a long time ago. Unfortunately, I can't find the files that the readme references, so maybe this whole section should be removed since it is sort of an area a user will have to research today if they want to avoid rake-compile-dock on OSX.

How about using https://www.mingw-w64.org/ instead?

Ah, this was my confusion, you recommend mingw-w64, which is a fork still hosted on sourceforge, where as mingw (which now supports 64 bit and was formerly know as mingw-w32) has moved to OSDN.


Nit - typo in systemd service  file example

https://github.com/synesthesiam/homeassistant-satellite#running-as-a-service
Type=simpile
should be :
Type=simple

Fixed, thanks!

I'll also take this opportunity to congratulate you a great project !


Agent MVP tasks

Background

Users will run an agent (locally or on hosted infra) joined to their HALO
The agent can be configured to manage epochs
Users will either run a single agent or designate one to be the leader (prior to leadership election functionality)
Leader agents are responsible for managing epochs for Spaces that were created by the User (to avoid contention between agents from multiple members)

Tasks

[x] Peers should only request/download LAST epoch
[x] Update heuristic to trigger epochs
[x] Document start and join flows https://github.com/dxos/dxos/issues/3605
[ ] Telemetry

[x] Uptime
[ ] Install event

Feedbacks

[ ] https://github.com/dxos/dxos/issues/3680
[ ] https://github.com/dxos/dxos/issues/3740

Stability

[x] Lock file https://github.com/dxos/dxos/pull/3634

[x] Check if it works on MacOS and Linux
[x] Integrate

[x] Print start errors (wait for system service RPC)
[x] Make dx config show config with defaults
[ ] Each agent exposes ws://<IP_ADDRESS>:4567 (with unique port, only local host); dx agent devtools opens devtools inside browser

Duplicates

[x] dx halo join and dx device join
[x] dx debug echo-test-data and test plugin inside labs.dev.dxos.org

Future

[ ] Devices presence
[ ] Devices metadata

Product

[ ] Simplify process to deploy and join HALO on remove host

Future

[ ] Leadership determined via credential
[ ] Epoch snapshot time-travel
[ ] Paper key recovery
[ ] Leadership election

Should be mostly deprecated in favor of https://github.com/dxos/dxos/issues/4376


Add poll for reply functions and poll for queued events.

Hey, I wanted to know what it would look like to integrate cookie reply polling and dispatching into event loop and I have been wondering whether these are the kind of changes that would be needed in x11rb. Poll for queued events is there because it seemed to be the only way to ensure with libxcb that both reply and event queues have been emptied. Is there any interest in this kind of functionality or could I get better pointers about how using both event and reply polling in event loop should be done? I'm not sure how useful this functionality is either as I didn't find examples of how to do it.
Gotchas/TODO:

I have been looking at XcbConnection mainly.
Polling replies with rust connection does not read from socket (yet). Though I think it would be better if it didn't. If I understood correctly, in libxcb both poll_for_events and poll_for_reply read in events and replies from the socket which seems to make it hard to ensure that queues for both are empty. So complicated that I think I must have missed something (I'm trying it here).
I haven't implemented a version of poll_for_reply similar to wait_for_reply where the errors are left in the event loop. I'm not sure if it would even be useful as a polled version.
With these functions it isn't possible to know if there are still any errors from discarded replies left in queue when ending a cycle. Isn't that how it has been with poll_for_event always though?

Thanks for the detailed reply. I don't have anything to add for now, so maybe it's best to close this.


Incompatible types when compiling with lua_script_api feature

I am facing a similar set of errors to #61 with bevy 0.11.2 and bevy_mod_scripting commit 8bf3796 with the lua_script_api flag enabled
cargo run
    Updating git repository `https://github.com/makspll/bevy_mod_scripting`
   Compiling bevy_script_api v0.3.0 (https://github.com/makspll/bevy_mod_scripting?rev=8bf3796#8bf37962)
error[E0599]: no variant or associated item named `Pairs` found for enum `LuaMetaMethod` in the current scope
   --> /Users/videah/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/8bf3796/bevy_script_api/src/lua/std.rs:317:45
    |
317 |         methods.add_meta_method(MetaMethod::Pairs, |ctx, s, _: ()| {
    |                                             ^^^^^ variant or associated item not found in `LuaMetaMethod`

error[E0308]: `?` operator has incompatible types
    --> /Users/videah/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/8bf3796/bevy_script_api/src/generated.rs:4501:17
     |
4501 |     #[languages(on_feature(lua))]
     |                 ^^^^^^^^^^^^^^^ expected `BVec4`, found `BVec4A`
     |
     = note: `?` operator cannot convert from `BVec4A` to `BVec4`
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/videah/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/8bf3796/bevy_script_api/src/generated.rs:4501:17
     |
4501 |     #[languages(on_feature(lua))]
     |                 ^^^^^^^^^^^^^^^
     |                 |
     |                 expected `BVec4A`, found `BVec4`
     |                 arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/videah/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/8bf3796/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/videah/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/8bf3796/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 --------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0308, E0599.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `bevy_script_api` (lib) due to 3 previous errors

My Cargo.toml looks like this:
[package]
name = "myrrh"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1

# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
[profile.dev.package."*"]
opt-level = 3

[dependencies]
bevy = { version = "0.11.2", features = ["dynamic_linking"] }
bevy_mod_scripting = { git = "https://github.com/makspll/bevy_mod_scripting", rev = "8bf3796", version = "0.3.0", features = ["luajit", "teal", "lua_script_api"] }

I get the same error I'm afraid, even with a cargo clean 😢

Interesting, I see why I can run it, the issue comes from luajit!  Pairs doesn't exist with that feature:
    #[cfg(any(
        feature = "lua54",
        feature = "lua53",
        feature = "lua52",
        feature = "luajit52",
    ))]
    Pairs,

I will adjust the pipeline to compile check with all the lua feature combinations and push a fix soon

That's now merged into main, and luajit should work with the lua script api feature

I'm running into the same issue:
error[E0308]: `?` operator has incompatible types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4518:9
     |
4518 |         ///Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `BVec4`, found `BVec4A`
     |
     = note: `?` operator cannot convert from `BVec4A` to `BVec4`

This happens with both the lua54 and luajit features.
Cargo.toml:
[package]
name = "bevyworld"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy_mod_scripting = { git = "https://github.com/makspll/bevy_mod_scripting.git", rev = "7590248", features = ["luajit","lua_script_api"] }
bevy_mod_scripting_lua = { git = "https://github.com/makspll/bevy_mod_scripting.git", rev = "7590248"}
bevy = { version = "0.11.2", features = ["dynamic_linking", "serialize","bevy_asset","bevy_core_pipeline","bevy_pbr","bevy_render","bevy_sprite","bevy_winit","filesystem_watcher","hdr","multi-threaded","tonemapping_luts","ktx2","zstd"] , default-features = false }
rand = "0.8.5"
rand_distr = "0.4.3"

I get this error on both a new project and when running several of the example projects. Is there a solution?
Thanks!

Hi @CyanBlob I am able to compile with the below Cargo.toml:
[package]
name = "bevyworld"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy_mod_scripting = { git = "https://github.com/makspll/bevy_mod_scripting.git", rev = "7590248", features = [
    "luajit",
    "lua_script_api",
] }
bevy = { version = "0.11.2", features = [
    "dynamic_linking",
    "serialize",
    "bevy_asset",
    "bevy_core_pipeline",
    "bevy_pbr",
    "bevy_render",
    "bevy_sprite",
    "filesystem_watcher",
    "hdr",
    "multi-threaded",
    "tonemapping_luts",
    "ktx2",
    "zstd",
], default-features = false }

and the following main.rs:
use bevy::app::AppExit;

use bevy::prelude::*;
use bevy_mod_scripting::prelude::*;

**use bevy_mod_scripting::api::lua::{bevy::LuaBevyAPIProvider, RegisterForeignLuaType};**

#[derive(Component, Default, Reflect)]
#[reflect(Component)]
pub struct MyComponent {
    quat: Quat,
    vec2: Vec2,
    usize: usize,
    f32: f32,
    mat3: Mat3,
    option_vec3: Option<Vec3>,
    vec_of_option_bools: Vec<Option<bool>>,
    option_vec_of_bools: Option<Vec<bool>>,
}

fn main() -> std::io::Result<()> {
    let mut app = App::new();

    app.add_plugins(DefaultPlugins)
        .add_plugins(ScriptingPlugin)
        .register_type::<MyComponent>()
        // note the implementation for Option is there, but we must register `LuaProxyable` for it
        .register_foreign_lua_type::<Option<Vec3>>()
        .register_foreign_lua_type::<Vec<Option<bool>>>()
        .register_foreign_lua_type::<Option<bool>>()
        .register_foreign_lua_type::<Option<Vec<bool>>>()
        .add_script_host::<LuaScriptHost<()>>(PostUpdate)
        .add_api_provider::<LuaScriptHost<()>>(Box::new(LuaBevyAPIProvider))
        .add_systems(Startup,
            |world: &mut World| {

                let entity = world.spawn(())
                    .insert(MyComponent {
                        usize: 5,
                        vec2: Vec2::new(1.0, 2.0),
                        f32: 6.7,
                        mat3: Mat3::from_cols(
                            Vec3::new(1.0, 2.0, 3.0),
                            Vec3::new(4.0, 5.0, 6.0),
                            Vec3::new(7.0, 8.0, 9.0),
                        ),
                        quat: Quat::from_xyzw(1.0, 2.0, 3.0, 4.0),
                        option_vec3: None,
                        vec_of_option_bools: vec![Some(true), None, Some(false)],
                        option_vec_of_bools: Some(vec![true, true, true]),
                    }).id();

                // run script
                world.resource_scope(|world, mut host: Mut<LuaScriptHost<()>>| {
                    host.run_one_shot(
                        r#"
                        function table_to_string(t)
                            local result = "["
                            for k,v in pairs(t) do
                                result = result .. string.format("%s:%s,",k,v)
                            end
                            return result .. "]"
                        end

                        function once()

                            -- the api provides us with 3 globals
                            print(entity)
                            print(script)
                            print(world)

                            -- we first retrieve ID's for our component and resource by their short name (long name/full path also work)
                            local my_component_type = world:get_type_by_name("MyComponent")

                            -- then ask the world to give us a reference to `MyComponent` on the entity we just spawned
                            -- resources work the same way, but we use `get_resource` instead of `get_component`
                            -- the comp object is resolved to a `bevy_script_api::script_ref::ReflectValue` which implements UserData.
                            -- we can use a custom proxy instead (by implementing LuaProxyable), but this is the simplest way to get started.
                            local comp = world:get_component(entity, my_component_type)
                            print("Before script: ", comp)

                            print("============")

                            -- the index metamethod on ReflectValue's uses bevy's reflection mechanism on top of some custom sub-reflection logic to
                            -- allow reflecting inside Options, Vectors etc.
                            -- when we index into ReflectValue's we either get back a custom proxy or another ReflectValue

                            -- the LuaBevyAPIProvider provides us custom proxies for many bevy types as well as std types.
                            -- all of these implementations can be overridden via the bevy TypeRegistry
                            comp.usize = 2
                            print("comp.usize after assigning to 2: ", comp.usize)

                            -- Option's get converted to nil or the value inside
                            print("comp.option_vec3 before: ", comp.option_vec3)
                            comp.option_vec3 = Vec3.new(2,1,3)
                            print("comp.option_vec3 after: ", comp.option_vec3)

                            -- reflection via index is indexed starting at 1, unlike in Rust to match Lua's indexing
                            print("comp.option_vec3[1] before: ", comp.option_vec3[1])
                            comp.option_vec3[1] = 5
                            print("comp.option_vec3[1] after: ", comp.option_vec3[1])

                            print("============")

                            -- Vec<T> references get converted to a custom proxy `LuaVec<T>` which is
                            -- also assignable via lua tables

                            print("comp.vec_of_option_bools before: ", table_to_string(comp.vec_of_option_bools))
                            comp.vec_of_option_bools = {true,false,true}
                            print("comp.vec_of_option_bools after assignment: ", table_to_string(comp.vec_of_option_bools))

                            print("comp.vec_of_option_bools[1] before: ", comp.vec_of_option_bools[1])
                            comp.vec_of_option_bools[1] = false
                            print("comp.vec_of_option_bools[1] after: ", comp.vec_of_option_bools[1])

                            -- there are some additional methods available on LuaVec proxies imitating the Vec<T> api
                            print("comp.vec_of_option_bools before insert: ", table_to_string(comp.vec_of_option_bools))
                            comp.vec_of_option_bools:insert(1,nil)
                            print("comp.vec_of_option_bools after insert: ", table_to_string(comp.vec_of_option_bools))

                            print("comp.vec_of_option_bools before push: ", table_to_string(comp.vec_of_option_bools))
                            comp.vec_of_option_bools:push(false)
                            print("comp.vec_of_option_bools after push: ", table_to_string(comp.vec_of_option_bools))

                            print("comp.vec_of_option_bools len after push: ", #comp.vec_of_option_bools)

                            print("comp.vec_of_option_bools before pop: ", table_to_string(comp.vec_of_option_bools))
                            print(comp.vec_of_option_bools:pop())
                            print("comp.vec_of_option_bools after pop: ", table_to_string(comp.vec_of_option_bools))

                            print("the pairs inside comp.vec_of_option_bools: ")
                            for k,v in pairs(comp.vec_of_option_bools) do
                                print(string.format(" - %s:%s",k,v))
                            end

                            comp.vec_of_option_bools:clear()
                            print("comp.vec_of_option_bools after clear: ", table_to_string(comp.vec_of_option_bools))

                            print("comp.vec_of_option_bools len after clear: ", #comp.vec_of_option_bools)
                            print("============")

                            print("comp.option_vec_of_bools before: ", table_to_string(comp.option_vec_of_bools))
                            print(comp.option_vec_of_bools:pop())
                            print("comp.option_vec_of_bools after pop: ", table_to_string(comp.option_vec_of_bools))

                            print("comp.option_vec_of_bools len after pop: ", #comp.option_vec_of_bools)

                            print("the pairs inside comp.option_vec_of_bools: ")
                            for k,v in pairs(comp.option_vec_of_bools) do
                                print(string.format(" - %s:%s",k,v))
                            end

                            print("============")

                            local complex_vec_op = Vec3.new(0,1,0):any_orthonormal_vector() + comp.mat3.x_axis
                            print("(0,1,0).any_orthonormal_vector() + mat3.x_axis is: ", complex_vec_op)

                            local new_mat3 = Mat3.from_cols(Vec3.new(1,0,0),Vec3.new(0,1,0),Vec3.new(0,0,-1))
                            print("new_mat3 is:", new_mat3)

                            comp.vec2 = comp.vec2 + comp.vec2
                            comp.usize = comp.vec2:min_element()
                            comp.f32 = comp.f32 + comp.f32 + comp.vec2:min_element()
                            comp.vec2 = Vec2.new(2,1)
                            comp.quat = Quat.from_xyzw(3,2,1,4)
                            comp.mat3.x_axis = Vec3.new(69,69,69)

                            print("============")

                            -- this is an example of something impossible to achieve with plain bevy reflection under the hood
                            comp.mat3[1][1] = 42

                            -- now let's retrieve these again to see if we actually changed their values permanently
                            comp = world:get_component(entity,my_component_type)

                            print("After script:")
                            print(comp)
                        end
                        "#
                        .as_bytes(),
                        "script.lua",
                        entity,
                        world,
                        LuaEvent {
                            hook_name: "once".to_owned(),
                            args: (),
                            recipients: Recipients::All,
                        },
                    )
                    .expect("Something went wrong in the script!");
                });

                world.send_event(AppExit)
            },
        );

    app.run();

    Ok(())
}

Note I removed the direct dependency on bevy_mod_scripting_lua and changed the import structure but I don't think that was causing any issues either.
Which examples are giving you trouble exactly ?

Same issue:
error[E0308]: `?` operator has incompatible types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4518:9
     |
4518 |         ///Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `BVec4`, found `BVec4A`
     |
     = note: `?` operator cannot convert from `BVec4A` to `BVec4`
note: return type inferred to be `BVec4` here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4518:9
     |
4518 |         ///Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4567 | /         ///Returns a vector mask containing the result of a `==` comparison for each element of
4568 | |         ///`self` and `rhs`.
4569 | |         ///
4570 | |         ///In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
4571 | |         ///elements.
4572 | |         cmpeq(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4574 | /         ///Returns a vector mask containing the result of a `!=` comparison for each element of
4575 | |         ///`self` and `rhs`.
4576 | |         ///
4577 | |         ///In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
4578 | |         ///elements.
4579 | |         cmpne(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4581 | /         ///Returns a vector mask containing the result of a `>=` comparison for each element of
4582 | |         ///`self` and `rhs`.
4583 | |         ///
4584 | |         ///In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all
4585 | |         ///elements.
4586 | |         cmpge(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4588 | /         ///Returns a vector mask containing the result of a `>` comparison for each element of
4589 | |         ///`self` and `rhs`.
4590 | |         ///
4591 | |         ///In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all
4592 | |         ///elements.
4593 | |         cmpgt(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4595 | /         ///Returns a vector mask containing the result of a `<=` comparison for each element of
4596 | |         ///`self` and `rhs`.
4597 | |         ///
4598 | |         ///In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all
4599 | |         ///elements.
4600 | |         cmple(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4602 | /         ///Returns a vector mask containing the result of a `<` comparison for each element of
4603 | |         ///`self` and `rhs`.
4604 | |         ///
4605 | |         ///In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all
4606 | |         ///elements.
4607 | |         cmplt(self:self) -> Wrapped(BVec4A),
     | |__________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:4501:17
     |
4501 |       #[languages(on_feature(lua))]
     |                   ^^^^^^^^^^^^^^ expected `BVec4A`, found `BVec4`
...
4635 | /         ///Performs `is_nan` on each element of self, returning a vector mask of the results.
4636 | |         ///
4637 | |         ///In other words, this computes `[x.is_nan(), y.is_nan(), z.is_nan(), w.is_nan()]`.
4638 | |         is_nan_mask(self:) -> Wrapped(BVec4A),
     | |____________________________________________- arguments to this function are incorrect
     |
note: associated function defined here
    --> /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/wrappers.rs:38:16
     |
38   |         pub fn new(b: $type_) -> Self {
     |                ^^^ ---------
     |
    ::: /Users/andrew/.cargo/git/checkouts/bevy_mod_scripting-66f82db9d3a19d6f/7590248/bevy_script_api/src/generated.rs:5050:17
     |
5050 |     #[languages(on_feature(lua))]
     |                 -------------- in this macro invocation
     = note: this error originates in the macro `impl_lua_newtype` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `bevy_script_api` (lib) due to 8 previous errors

The only example that I could get to work was the complex_game_loop one. All the others I tried (including the Game of Life) had the same problem
I'm currently on the stable branch but I also tried some examples with nightly and had the same problem as well

uhh, okay I think this might be something to do with platform differences, maybe BVec4 and BVec4A are aliases on your arch and the macro treats them differently. Which OS and arch are your using ?

I'm using an M2 (Arm) Mac so you may be right! If you give me pointers for where to start looking into this issue I can try to fix it later today

How do you regenerate bevy_script_api/src/generated.rs? It seems to require json files in target/doc, but I'm not sure where those come from.
generated.rs contains this section:
impl_script_newtype! {
    #[languages(on_feature(lua))]
    ///A 4-dimensional vector.
    ///
    ///SIMD vector types are used for storage on supported platforms.
    ///
    ///This type is 16 byte aligned.
    glam::f32::Vec4 :
    Clone +
    Debug +
    Methods
    (
        ///Creates a new vector.
        new(Raw(f32),Raw(f32),Raw(f32),Raw(f32)) -> self,

        ///Creates a vector with all elements set to `v`.
        splat(Raw(f32)) -> self,

        ///Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
        ///for each element of `self`.
        ///
        ///A true element in the mask uses the corresponding element from `if_true`, and false
        ///uses the element from `if_false`.
        select(Wrapped(BVec4A),self,self) -> self,

This is where the problem is. It's supposed to be an implementation for glam::f32::Vec4, but the generated function body uses BVec4A instead of BVec4

I found the makefile and generated the docs. I think I found the issue.
The glam-rs impl of Vec4 comparison functions return a BVec4A: https://github.com/bitshifter/glam-rs/blob/5fd61e965f777dc0e3c3d353e9007e5a7c957304/src/f32/coresimd/vec4.rs#L211
I'm not sure why this works for you though. It may have something to do with this: https://github.com/bitshifter/glam-rs/issues/296
I tried re-generated the glam docs with the core-simd feature enabled and then re-generated generated.rs but the issue persists

Hey @CyanBlob fantastic work! Sorry I didn't manage to give you pointers before you started!
Yup that will be it, glam generates a different interface completely for Vec4 depending on if simd is available.
At its root this will come from the fact codegen is executed on one machine (mine) and not at the end users machine. I suppose we don't necessarily have to do that, instead codegen should generate 'generated.rs' multiple times, once per architecture/feature that changes the interface and separate them by module, then hide this away with clever conditional imports. I haven't tried cross compiling in rust but hopefully it's not a pain to do.
Alternatively we could generate as a compile step but I would like to avoid increasing compilation times
We also need to modify the CI so this doesn't go unseen in the feature by adding an arch row to the feature matrix (if possible)!
Again thanks a lot for investigating @CyanBlob, if you're interested in writing a PR please feel free too, otherwise I'll take this on probably later tonight (UK time)

Actually maybe having the API vary based on arch is not as good a solution I thought, it could entail having to write platform dependent code on the script side which is.. yucky.
Maybe we need to manually override these functions to abstract away these differences, for example by returning the type which is available on all platforms. Although this will probably sacrifice some performance I think a clean and stable API is more important

Okay I finally found a way to replicate this using cross this appears on linux arm64 builds as well: cross run --target=aarch64-unknown-linux-gnu --example bevy_api_lua --features=lua54,lua_script_api

This is now part of the CI, and so a complete fix will pass CI: https://github.com/makspll/bevy_mod_scripting/actions/runs/6473615465/job/17576720332

I've cross-compiled to aarch64-unknown-linux-gnu and generated a diff between the generated API files:
4470a4471,4473
>         x: Raw(f32),
>         y: Raw(f32),
>         z: Raw(f32),
4503,4506d4505
<     ///
<     ///SIMD vector types are used for storage on supported platforms.
<     ///
<     ///This type is 16 byte aligned.
4523c4522
<         select(Wrapped(BVec4A),self,self) -> self,
---
>         select(Wrapped(BVec4),self,self) -> self,
4572c4571
<         cmpeq(self:self) -> Wrapped(BVec4A),
---
>         cmpeq(self:self) -> Wrapped(BVec4),
4579c4578
<         cmpne(self:self) -> Wrapped(BVec4A),
---
>         cmpne(self:self) -> Wrapped(BVec4),
4586c4585
<         cmpge(self:self) -> Wrapped(BVec4A),
---
>         cmpge(self:self) -> Wrapped(BVec4),
4593c4592
<         cmpgt(self:self) -> Wrapped(BVec4A),
---
>         cmpgt(self:self) -> Wrapped(BVec4),
4600c4599
<         cmple(self:self) -> Wrapped(BVec4A),
---
>         cmple(self:self) -> Wrapped(BVec4),
4607c4606
<         cmplt(self:self) -> Wrapped(BVec4A),
---
>         cmplt(self:self) -> Wrapped(BVec4),
4638c4637
<         is_nan_mask(self:) -> Wrapped(BVec4A),
---
>         is_nan_mask(self:) -> Wrapped(BVec4),
4808a4808,4811
>         x: Raw(f32),
>         y: Raw(f32),
>         z: Raw(f32),
>         w: Raw(f32),
4999,5001c5002
<     ///A 3-dimensional SIMD vector mask.
<     ///
<     ///This type is 16 byte aligned.
---
>     ///A 3-dimensional `u32` vector mask.
5037a5039,5041
>         x: Raw(u32),
>         y: Raw(u32),
>         z: Raw(u32),
5051,5053c5055
<     ///A 4-dimensional SIMD vector mask.
<     ///
<     ///This type is 16 byte aligned.
---
>     ///A 4-dimensional `u32` vector mask.
5089a5092,5095
>         x: Raw(u32),
>         y: Raw(u32),
>         z: Raw(u32),
>         w: Raw(u32),
7384,7387d7389
<     ///
<     ///SIMD vector types are used for storage on supported platforms.
<     ///
<     ///This type is 16 byte aligned.
7478a7481,7482
>         x_axis: Wrapped(Vec2),
>         y_axis: Wrapped(Vec2),
9401,9404d9404
<     ///
<     ///SIMD vector types are used for storage on supported platforms.
<     ///
<     ///This type is 16 byte aligned.
9642a9643,9646
>         x: Raw(f32),
>         y: Raw(f32),
>         z: Raw(f32),
>         w: Raw(f32),

@CyanBlob  could you try this branch? https://github.com/makspll/bevy_mod_scripting/actions/runs/6500479459/job/17655933338?pr=80

This is fixed by #106


added .new-shortcut plugin

Added shortcut for Google Docs, Sheets, Slides, Forms, and CodePen.

resolve #35

Sorry it took so long. If there are any other shortcuts you would like to see, I can happily add them.


[Feature] Allow different LocalQueue label for head and worker groups

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
Per doc (https://kueue.sigs.k8s.io/docs/tasks/run/rayjobs/), the LocalQueue label is a global settings that will be applied to both head and worker pods. As a result, we could accidentally schedule head pod (which usually can be lightweight) in the scarce node types reserved for workers and inherit all the ResourceFlavor labels and tolerations.
Use case
No response
Related issues
https://github.com/ray-project/kuberay/issues/2098
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

cc @andrewsykim @alculquicondor

This would break a lot of semantics.
A better practice, that is already supported, is to define two resource flavors for each CQ, one with GPUs, one without. You can use affinities or taints/tolerations to match heads and workers to each of the flavors. https://kueue.sigs.k8s.io/docs/concepts/resource_flavor/#resourceflavor-labels

Hi @alculquicondor , we did some quick tests and it appears that heads and workers cannot be admitted to different flavors at the same time. I'm wondering if you have existing setups/examples that could share with me for reference?
Here is some controller logs related
24T23:39:21.793884669Z","logger":"events","caller":"recorder/recorder.go:104","msg":"couldn't assign flavors to pod set default: flavor default-cpu doesn't match node affinity, untolerated taint {specialized NoSchedule NoSchedule <nil>} in flavor a100xl-us-east-1a","type":"Normal","object":{"kind":"Workload","namespace":"xxx","name":"xxx-d429d3a2-0293-11ef-86c3-caa498469caf-2816f","uid":"44ac9406-2826-43c6-8970-f9424e632c66","apiVersion":"kueue.x-k8s.io/v1beta1","resourceVersion":"807027005"},"reason":"Pending"}

@shaowei-su can you share your full RayJob yaml and your ClusterQueue? (redact any internal details)

Thanks @andrewsykim, I just got it working by deleting & re-apply the CRDs (resource flavors, cluster queues). It was not working with in-place editing for some reason. Closing this issue and thanks for looking into this!

@shaowei-su  We are also running into similar issue, could you please share how you got it working with different resource flavors?

@pravingadakh  It's basically what @alculquicondor mentioned above: since we mostly care about the GPU flavored resources, we have one additional CPU-only resource (with arbitrarily large CPU/memory pool size) defined for each CQ.


Can't compile . PNGEncoderOptions error

With the latest OpenFl and Lime received the following error:
/openfl/3,5,3/extern/flash/display/PNGEncoderOptions.hx:17: characters 0-27 : Recursive typedef is not allowed

I manually set this fix, but still received same error ( target flash) . The problem is in this row:
typedef PNGEncoderOptions = openfl.display.PNGEncoderOptions;
Test data :
openfl test flash
/haxe/lib/openfl/3,5,3/extern/flash/display/PNGEncoderOptions.hx:17: characters 0-27 : Recursive typedef is not allowed
Example code:
 public function new () {
		Assets.getBitmapData("assets/25.png");
   }

I have the same issue, how did you solve it at flash?

Have you tried updating to the latest and (if necessary) doing a -clean build?

Here is my setup:

haxelib list
actuate: [1.8.6]
cereal: [0.0.4]
hscript: [2.0.5]
lime: 2.7.0 [2.8.3]
openfl: 3.4.0 [3.5.3]
rox-i18n: [1.0.0]
stablexui: [1.1.5]
svg: [1.0.8]
swf: 2.1.2 [2.1.6]

haxelib run lime build "project.xml" flash -debug -Dfdb -clean

C:/HaxeToolkit/haxe/lib/openfl/3,5,3/extern/openfl/display/PNGEncoderOptions.hx:17:
characters 0-27 : Recursive typedef is not allowed
On Thu, Jan 7, 2016 at 11:54 PM, Joshua Granick<EMAIL_ADDRESS>wrote:

Have you tried updating to the latest and (if necessary) doing a -clean
build?
—
Reply to this email directly or view it on GitHub
https://github.com/openfl/openfl/issues/979#issuecomment-169818479.

--
Kind Regards,
Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East