Specifying HMAC-based authentication in the spec

The current spec (v2.0) defines three valid security schemes: basic HTTP authentication, authentication using an API key, and Oauth2.
What seems to be nonexistent is an HMAC-based authentication scheme. Are there any plans to add such a scheme in the upcoming versions of the spec?

:+1: Would be really nice to have better support for HMAC.

@bow - it would help to know what would be required to support HMAC. Don't really know the specifics of it.

Ah indeed, HMAC is too broad of a term. I'll try to elaborate more what I had mind:
I was looking for a way to authenticate some of my end points using a digest-based scheme. I stumbled on Amazon's API authentication scheme, but I have the impression they are inventing their own standard (which is something I hope to avoid). Looking further,
I see that there is already a digest authentication scheme defined in RFC2617. Considering this is a known standard, I was hoping that the swagger spec allows me to document such a scheme.
In short, something which allows me to specify that for some endpoints, something like:
Authorization: Digest response=384729837942...

is required in the request header.
(apologies if my terminology gets unclear ~ as you can probably guess, I'm not a cryptography expert ;) ).

No worries. It's been a long time since I've read up on Digest authentication so will have to go over it again at some point.
If you already know, what is the value given as the response (assuming response is something fixed in the header)?

response is something optional in the header (per the RFC). The requirement is that at least one key-value pair from several choices are defined (section 3.2.2) in Authorization, response being one of them.
The contents itself, when defined, is the hash. What needs to be hashed depends on the value of other optional keys as well (section <IP_ADDRESS>).

Right, but the question is whether the spec (Swagger) needs to define which key-values are required for the Digest authentication scheme, as for the values, what they need to contain.

If there are suggestions on how to generalize a HMAC implementation I think we'd be happy to include it in the next rev of the spec.  All the mechanisms are there to automatically generate the hashes.

@webron If I can say, I'd try to be as close as possible to the RFC.
However, the RFC keys seems to have quite complex dependencies among each other (e.g. cnonce must be specified if qop is specified but must not be specified otherwise). So I can imagine this can complicate the Swagger spec too much. In this case, maybe a sensible alternative would be to aim for a subset of what the RFC allows. So at least the username, realm, password, digest-uri, and nonce must be specified. You may notice that this makes for a valid authentication scheme based on an earlier RFC, RFC2069, which RFC2617 supersedes.
This could complicate things when qop is specified, though. Also, what's missing from the Digest authentication scheme is a non-MD5 hashing method (so @fehguy , this isn't exactly HMAC as I thought earlier) since the RFC only recognizes MD5. So while this is technically digest, it's not as general as some would want.
If these two alternatives are too complicated, maybe it's simply simpler to update the swagger spec with a more general Authorization header specification? Something like adding a custom security scheme where the value of the Authorization header is essentially free form text?

It would be nice to see something a bit more free-form and generic implemented here.
Perhaps it would be sufficiently flexible to allow the API spec authors to define which parameters, and their formats, are required for the hash inputs.  This would be able to support HMAC-like schemes such as Hawk.
Something like this:
{
    "securityDefinitions" : {
        "hmac-ish": {
            "hashInputParameters" : {
                "timestamp" : {
                  "type" : "integer",
                  "format" : "int64"
                },
                "uri" : {
                    "type" : "string",
                    "description" : "The full URI of the request"
                },
                "body" : {
                    "type" : "object",
                    "description" : "The full body payload of the request"
                },
                ...
            },
            "hashAlgorithm":"sha256",
            "hashOutputParameter" : {
                "name" : "myHash",
                "in" : "header",
                "description": "Holds the hash"
                ...
            }
        },
        "otherHashingSecurityDefinition": {
            "hashInputParameters" : {
                "uri" : {
                    "type" : "string",
                    "description" : "The full URI of the request"
                },
                ...
            },
            "hashAlgorithm":"sha1",
            "hashOutputParameter" : {
                "name" : "myOtherHash",
                "in" : "header",
                "description": "Holds the hash"
                ...
            }
        }
    }
}

Not sure if this is directly applicable or not, but there is an IETF RFC draft that adds support to retrieving resources using MAC tokens to Oauth2.

I second this request, as I need this for my project -- would be awesome to have support for this in ui/editor.
Couldn't you just do something fairly simple + generic here?  I'm thinking it could be done by allowing one to specify a callback JavaScript function that receives the outbound request and allows the function to modify / sign it before being sent.
Possibly as simple as adding a new type to the Security Scheme Object like custom, and add a new field callback that specifies a string function:
{
   "type": "custom",
   "callback": "function (req) { /* manipulate request on the way out */ }"
}

To support it in the editor, the callback would have to be eval'd
This way, the spec punts the implementation and allows the api designer to implement whatever signing protocol they intend to use.

I second @bow  suggestion on having an quick way to support Authorization Header with custom security scheme. This could be a better starting point.
This can further evolve into what @who has suggested. This is more robust and complete support for such authentication mechanisms.
Going through the following SO questions and Amazon suggested implementation of this approach, IMHO, the above two could be a better way forward
http://stackoverflow.com/questions/454355/security-of-rest-authentication-schemes
http://stackoverflow.com/questions/14043397/http-basic-authentication-instead-of-tls-client-certification
http://stackoverflow.com/questions/319530/restful-authentication
http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html

This should probably be associated https://github.com/OAI/OpenAPI-Specification/issues/585

Thanks @who! Parent is indeed: #585.

@webron Definitely interested in helping this move forward. Many of the projects on which I work will need an HMAC authentication mechanism.
I'd be glad to put together real-world use cases for this. If those would be useful, where would one contribute them? Should I just create a gist/md with nicely-formatted explanations and examples?

@who - sure, gists would be great. Anything that helps clarifying and moving the discussion forward.

pr #807 now allows you to identify any HTTP scheme in the security definition.  There are so many different variants of how HMAC tokens are generated, it would be problematic to try and specify all possibilities.  x- properties can be used to identify parameters that are specific to a particular scheme.

We've done what we could :)

hi guys,
what is the outcome of this issue? i also do need this feature. Is there any workaround for that?
I simply want my clients to pass (ie HMAC-SHA512) signature of the request body, so i'm sure, the message was not modified on its way to the server.

Hi Guys,
I am also interested in this feature.

+1

Hello,
Do we have any plan about this definition in the OpenAPI spec?
Here are some documents found, but looks like there are not standard, if there are some rfc links for reference, please let me know it, much appreciated.
https://docs.microsoft.com/en-us/azure/azure-app-configuration/rest-api-authentication-hmac
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html
https://docs.oracle.com/en/cloud/saas/marketing/crowdtwist-develop/Developers/HMACAuthentication.html

Still needed, for years. HMAC-SHA512 is widely used.


Conflict with cyberrt's asio dependency when using ASIO_STANDALONE

Description
I'm using foxglove-websocket in my project and found that it depends on a standalone ASIO library, so I had to set add_definitions(-DASIO_STANDALONE) in CMake. However, this seems to cause a conflict with the asio dependency in my project's cyberrt, resulting in a "Segmentation fault (core dumped)" error when I run my project.

Version:
CMake version: 3.21
foxglove-websocket version: 1.0.0
ASIO version: 1.10.8
Platform:
Ubuntu 18.04

Steps To Reproduce

I have created a minimal project to reproduce the issue and packaged the environment into a Docker container for easier reproduction. The Docker image is hosted on Docker Hub and can be pulled and run directly.
docker pull lucycat/foxglove_websocketpp_cyber_asio_conflict:0.1
docker run -it --ipc=host --network host lucycat/foxglove_websocketpp_cyber_asio_conflict:0.1 /bin/bash
// in docker
cd ~/ReproduceAsioConflict
mkdir -p build && cd build && rm -rf *
source /usr/local/setup.bash
cmake .. && make -j
./writer &
./asio_conflict_test

Expected Behavior
You'll find that it either hangs indefinitely or exits abruptly with a "Segmentation fault" error message. I hope you can help me resolve this issue, thank you!
Additionally, the source code used to reproduce this issue is also available on GitHub at this repository: https://github.com/FRAOTIAC/ReproduceAsioConflict. You can examine the code or clone the repository for further investigation.

However, this seems to cause a conflict with the asio dependency in my project's cyberrt, resulting in a "Segmentation fault (core dumped)" error when I run my project.

Are you sure that the segfault is caused by asio? Best way to find out is to load the core file into gdb or to run the entire program with gdb.

There was similar issue in Apollo repo: https://github.com/ApolloAuto/apollo/issues/14963 .
My solution was to patch foxglove websocket and swap to boost version of asio in source code. Something like this (FG websocket version is also 1.0):
diff --git a/cpp/foxglove-websocket/include/foxglove/websocket/websocket_logging.hpp b/cpp/foxglove-websocket/include/foxglove/websocket/websocket_logging.hpp
index 22e463b..2e6b8ef 100644
--- a/cpp/foxglove-websocket/include/foxglove/websocket/websocket_logging.hpp
+++ b/cpp/foxglove-websocket/include/foxglove/websocket/websocket_logging.hpp
@@ -1,6 +1,7 @@
 #pragma once

-#include <asio/ip/address.hpp>
+#include <boost/asio/ip/address.hpp>
+// #include <asio/ip/address.hpp>
 #include <websocketpp/logger/levels.hpp>

 #include <functional>
@@ -11,7 +12,7 @@ namespace foxglove {

 using LogCallback = std::function<void(WebSocketLogLevel, char const*)>;

-inline std::string IPAddressToString(const asio::ip::address& addr) {
+inline std::string IPAddressToString(const boost::asio::ip::address& addr) {
   if (addr.is_v6()) {
     return "[" + addr.to_string() + "]";
   }
diff --git a/cpp/foxglove-websocket/include/foxglove/websocket/websocket_server.hpp b/cpp/foxglove-websocket/include/foxglove/websocket/websocket_server.hpp
index 66660ca..e109f91 100644
--- a/cpp/foxglove-websocket/include/foxglove/websocket/websocket_server.hpp
+++ b/cpp/foxglove-websocket/include/foxglove/websocket/websocket_server.hpp
@@ -215,6 +215,7 @@ inline Server<ServerConfiguration>::Server(std::string name, LogCallback logger,
   _server.get_elog().set_callback(_logger);

   std::error_code ec;
+
   _server.init_asio(ec);
   if (ec) {
     throw std::runtime_error("Failed to initialize websocket server: " + ec.message());
@@ -239,7 +240,7 @@ inline Server<ServerConfiguration>::~Server() {}

 template <typename ServerConfiguration>
 inline void Server<ServerConfiguration>::socketInit(ConnHandle hdl) {
-  std::error_code ec;
+  boost::system::error_code ec;
   _server.get_con_from_hdl(hdl)->get_raw_socket().set_option(Tcp::no_delay(true), ec);
   if (ec) {
     _server.get_elog().write(RECOVERABLE, "Failed to set TCP_NODELAY: " + ec.message());
@@ -465,9 +466,9 @@ inline void Server<ServerConfiguration>::start(const std::string& host, uint16_t
     throw std::runtime_error("Server already started");
   }

-  std::error_code ec;
+  websocketpp::lib::error_code ec;

-  _server.listen(host, std::to_string(port), ec);
+  _server.listen(port, ec);
   if (ec) {
     throw std::runtime_error("Failed to listen on port " + std::to_string(port) + ": " +
                              ec.message());
@@ -488,9 +489,10 @@ inline void Server<ServerConfiguration>::start(const std::string& host, uint16_t
     throw std::runtime_error("WebSocket server failed to listen on port " + std::to_string(port));
   }

-  auto endpoint = _server.get_local_endpoint(ec);
-  if (ec) {
-    throw std::runtime_error("Failed to resolve the local endpoint: " + ec.message());
+  boost::system::error_code ec2;
+  auto endpoint = _server.get_local_endpoint(ec2);
+  if (ec2) {
+    throw std::runtime_error("Failed to resolve the local endpoint: " + ec2.message());
   }

   const std::string protocol = _options.useTls ? "wss" : "ws";
@@ -1138,7 +1140,7 @@ inline void Server<ServerConfiguration>::sendServiceResponse(ConnHandle clientHa

 template <typename ServerConfiguration>
 inline uint16_t Server<ServerConfiguration>::getPort() {
-  std::error_code ec;
+  boost::system::error_code ec;
   auto endpoint = _server.get_local_endpoint(ec);
   if (ec) {
     throw std::runtime_error("Server not listening on any port. Has it been started before?");

@achim-k Thanks for your suggestion, I did try using gdb, and it did point to asio and raw lock in the code, but was unable to pinpoint the exact problem. However, I've noticed that my project runs perfectly fine without integrating foxglove-websocket, and the foxglove-websocket also fine without cyberrt. Notice that cyberrt have a pre-built fastrtps that include a thirdparty asio, that seems to imply that the issue might be rooted in the ASIO version conflict.

@IvDmNe Thank you so much for your help, IvDmNe! Following your advice, I've made adjustments to my code and it has successfully solved the issue. I think this could be beneficial to other users of this library who may face a similar problem. Would you consider creating a pull request to merge this change? Thanks again, your suggestion was invaluable!

@FRAOTIAC I don't think my solution is suitable for pulling to this repo ;) . It requires Boost library, which is already used in Apollo project but not used here. And in  one of recent commits it is stated that asio headers from weboscketpp library are added. Yeah, maybe I should have suggest you to look at it before applying path to the repo ;)


Prerequisites - should this also include Fabric Capacity options?

[Enter feedback here]
https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-automate-power-bi-report-export#prerequisites
I noticed that this doc calls out Power BI Premium capacity as a prerequisite, but does not reference Fabric Capacity.
Is this workload not supported with Fabric Capacity?  If it is, we should update this doc as such.

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

ID: d92e4209-59ef-2aed-dd62-b38c443d96d3
Version Independent ID: ba65faca-8ef1-3cb3-3a32-bc23fbb1e64c
Content: Export and email a report with Power Automate - Power BI
Content Source: powerbi-docs/collaborate-share/service-automate-power-bi-report-export.md
Service: powerbi
Sub-service: pbi-collaborate-share
GitHub Login: @maggiesMSFT
Microsoft Alias: maggies

Thanks for your comment, @elfohl. This issue has been assigned to the doc author for review.

Good point, @elfohl ! Yes, you're right. I'll make that update.


add logo in title

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
What problem is this feature trying to solve?

i have very good experience in fronted part, i did some good projects related to fronted so, could you please assaign it to me i will do it

hello , I'd like to contribute to this issue. I have extensive experience in website development, particularly in the area of front-end development.Please assign me on this issue under GSSoc'24

@Suchitra-Sahoo I'd like to suggest incorporating a logo into the project to strengthen its brand identity and improve visual appeal. As a designer with experience in logo creation and integration, I'm excited to contribute to this aspect of the project. Let's work together to craft a memorable and impactful logo that enhances the project's overall aesthetic.
Looking forward to collaborating on this exciting addition!

i would love to work on this project could you plzz assign this task to me

This issue is already assigned.


Fix BUCKET naming defaults

S3 bucket names do not permit underscores, yet we default to using cookiecutter.repo_name in bin/create_bucket.sh which likely contains underscores.
BUCKET variable should be lower-cased and kebab-cased
See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html

Closed by #62


How to engage GPU for WNET3D Training

We tried to run the WNet3D training on our dataset but received the following error "Training failed with exception: [enforce fail at alloc_cpu.cpp:114] data. DefaultCPUAllocator: not enough memory: you tried to allocate<PHONE_NUMBER> bytes" We were able to confirm this was a result of the model utilizing the CPU as opposed to our GPU, most likely a result of a failure on our part to download the correct version of pytorch, would fixing the pytorch version fix the GPU engagement issue, and would the CUDA 11.8 pytorch version be preferred for a NVIDIA RTX 4500 Graphics Card, or are there any further steps we need to take, any help would be greatly appreciated!

Hello, thanks for trying out our plugin and models !
This indeed looks like a possible problem with torch and CUDA versions, as the GPU should be selected by default for training if available.

You are right, installing pytorch with a CUDA version that matches your GPU's compute capability could fix the issue. For the RTX A4500 a CUDA version up to 12.x should be fine (see here).
Another thing to keep in mind is to have compatible drivers for your GPU
Additionally, it seems training is trying to allocate 4TB of memory; are you running the training on entire images ? I would suggest splitting your data into cubes of 64 voxels length for WNet training ideally, as that number seems a bit high. You may want to check the utilities menu if you need to quickly fragment a large volume into cubes : see this documentation page for more info

I hope this helps ! Please let me know if I can help with the steps above, or if you have any further issues with the plugin.
Best,
Cyril

Side note, you might know already but if you need to check for GPU availability after reinstalling torch :

You can see a list of available devices in the plugin when running training, under "Device"

Otherwise you can quickly check by running
ipython
and then
import torch
torch.cuda.is_available()

Hello @c3rry , were you able to fix your GPU issues ? I will close this for now, but please reopen the issue if you still need help.
Best,¨
Cyril


Searching a space causes Lapce to drain memory

Lapce Version
0.2.5
System information
Pop!_OS 22.04 LTS
Describe the bug
Lapce becomes frozen and starts draining memory when entering a space character into the search box (Ctrl + F) at the beginning.

This happens because the editor is trying to catch all spaces, I'm looking for a way to fix this

The weird thing is that it crashed for me once, but it doesn't appear to crash anymore weirdly

The weird thing is that it crashed for me once, but it doesn't appear to crash anymore weirdly

you fixed it 😱


Kconfig interface for Pico SDK (WiP)

I am currently hacking on Kconfig support for my custom Pico SDK template, but would love to see something like this "out of the box" in the PicoSDK. It provides some options that are also passed by the pico-project-generator usually.
The plan is to also support "esp-idf style" components with own Kconfig submenus, so invididual subcomponents / libraries can be configured via menuconfig instead of editing defines or CMakeLists.txt.

A lot of the config options should be marked with 25,4: // PICO_CONFIG: , , group= I wonder if it could use those?

A lot of the config options should be marked with // PICO_CONFIG: , , group= I wonder if it could use those?

Yup, those automatically get extracted by https://github.com/raspberrypi/pico-sdk/blob/master/tools/extract_configs.py into the pico_configs.tsv used by https://github.com/raspberrypi/pico-project-generator/
ping @JamesH65 for his thoughts.

Also as side-note things like GPIO and custom peripheral initialization and CPU overclocking could be maybe done via:
void __attribute__ ((constructor)) premain(){
    // init hardware and overclock cpu
}

to be done before main() gets executed, so it is more pleasant to the user.

With the current proof of concept, i am able to load defconfigs for different boards which can also contain pin definitions for custom peripheral etc. It would be great if the pico-sdk would adopt the possibility to include "components" like in the esp-idf which can contain their own Kconfig.
For building I can use now:
cmake -GNinja -DBOARD=datanoise_picoadk ..
ninja

For config I can use now:
cmake -GNinja -DBOARD=datanoise_picoadk ..
ninja menuconfig


[pfe-readtime] Mobile calculation adjustments

Description of the requested feature
Based on research available,

https://www.researchgate.net/publication/286503122_Investigation_of_the_user's_text_reading_speed_on_mobile_devices
https://link.springer.com/chapter/10.1007/978-3-030-20135-7_10

Should we adjust the wpm speeds for mobile users?
Impacted component(s)

pfe-readtime

@castastrophe I think we should do it if the times are truly different and that's backed up by evidence. I looked at a couple of Medium articles between my laptop and phone and the read time was the same, but maybe they wanted to keep development easy. I wonder if there's some variable that we can use to convert the desktop read time to other screen sizes or devices.


Fixed trunk: Libraries/Image/Image.android.js

Set up proper path to emptyfunction
Test Plan:

Circle CI

will ninja land to fix trunk

By analyzing the blame information on this pull request, we identified @andreicoman11 and @ide to be potential reviewers.

@facebook-github-bot shipit

Oh damn, new feature


More gracefully handle the fact that Black does not support "Format Selection"

Environment data

VS Code version: 1.23.1
Extension version (available under the Extensions sidebar): 2018.5.0
OS and version: Windows 10 x64
Python version (& distribution if applicable, e.g. Anaconda): python 3.6.3 x64
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a
Relevant/affected Python packages and their versions: black                    18.6b1

Actual behavior
Every single time a paste a piece of code, I get the error message:
"Black does not support the "Format Selection" command"
Expected  behavior
No error message pop-ups.
    "editor.formatOnPaste": true,
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.tabSize": 3,
    "python.formatting.autopep8Args": [
        "--indent_size=3"
    ],
    //"python.formatting.blackArgs": [
    //    "--indent_size=3"
    //],
    "python.formatting.provider": "black",
    "python.linting.pep8Enabled": false,
    "python.linting.pep8Args": [
        "--ignore=E111,E114,E121,E126,E127,E128,E265,E231,E303,E501,W291,W293,W503",
        "--max-line-length=89"
    ],
    //"python.linting.pylintArgs" If you don't use the pylintrc config file:
    //"python.linting.pylintArgs": ["--disable=C0303,W0311,E1101"],
    "python.linting.pylintEnabled": true,
    "python.linting.pydocstyleEnabled": false,

That's by design from Black itself, so you will have to convince the Black project to support partial formatting (which they have said they don't want to).

I've re-oriented this to provide some feedback somehow that Black purposefully doesn't support "Format Selection".

@brettcannon Thanks for your answer but, please note that my original issue was not what this ticket has become now.
I can see why Black does not want to do partial formatting. It would be nice if it allowed the option, but I can live with it.
My issue is with the Python Extension popping up an error window every single time I do a paste.

@egabrum the closure was from before I thought about redirecting this issue. I have also made the title more generic to also address how to handle "editor.formatOnPaste": true.

I should also mention that to turn off any feature in VS Code just for Python, you can do:
"[python]": {
    "editor.formatOnPaste": false
}

Thanks. Setting "editor.formatOnPaste": false will do the trick for me for now. I missed that.

I got the same spammy notification from black even though I'm using "python.formatting.provider": "autopep8".

This needs to be verified..

@zephyrite I can't reproduce the error message when autopep8 is the chosen formatter:
"python.formatting.provider": "autopep8",
"editor.formatOnPaste": true

Did you perhaps try out Black and then flip your setting back to autopep8 without saving initially?

Maybe we can detect when people turn on Black but have editor.formatOnPaste turned on and give a notification that they should consider turning it off for Python (e.g. link to the docs once they are updated with how to do this)?

I cannot reproduce this behaviour:

I got the same spammy notification from black even though I'm using "python.formatting.provider": "autopep8".

Removing needs verification label.

Why don't we modify the warning notification to provide an option to disable formatOnPaste just for Python when they happen to have the setting turned on.

Why don't we just have the logic that respects formatOnPaste also recognize python.formatting.provider: "black"? I know that might seem heavy-handed, but I believe it would make sense in this scenario...

@d3r3kk I don't quite follow. What "logic that respects formatOnPaste" are you thinking of? Do note that the way VS Code implements formatOnPaste is it does the paste and then make a format() call with a range object, just like on a Format Selection call.

Ah gotcha, yes, that makes sense. Since VSCode handles this flow, we cannot subvert this and add our own 'special logic' to simply not do formatOnPaste in the way I was thinking.

@brettcannon @d3r3kk
Suggestions

Change the message from Black does not support the "Format Selection" command to Black does not support the "Format Selection" command and "Format on Paste" feature
Add a button Disable format on paste to the above message.
Add a button Do not show this again to the above message.

This might be a different discussion, but @brettcannon & @DonJayamanne what do you think about allowing the configuration of a different formatter for formatOnPaste? That way black can be the main formatter used for the file, but you could still use one of the formatters that does format selections just for paste.

@nnja it's definitely possible, but I don't if that is a better solution as that's extra configuration and installing versus saying "the tool you chose doesn't let you do that".

I want to know how to change  the format selection from black to autopep8. As I mistakenly clicked on black rather than autopep8

Even after 'pip install autopep8' the popup box keeps on popping up

@reetishrestha that's off-topic for this issue. Please open a separate issue.

@brettcannon Have you thought about implementing a custom partial-formatting, via expanding selection to full lines and moving the contained code to a temporary file for black to handle as e.g. described here https://blog.godatadriven.com/black-formatting-selection?
As black's formatting is AST-based, selecting code that is not valid python by its own right will fail, however I think that is not too much of a drawback and could just result in a pop up like failed to reformat.

I'd really like to see @DonJayamanne 's solution implemented. what's the status there?

I like Don's solution:

Change the message to Black does not support the "Format Selection" command and "Format on Paste" feature

Add a button "Disable format on paste"

This should disable format on paste for Python only:
"[python]": { "editor.formatOnPaste": false }

Add a button "Do not show again"

If anyone would like to submit a PR for this, the team will be more than happy to review it 😊 otherwise at the moment this is not as much as a high priority for the team to work on.

Maybe I'm off the track,
But wouldn't it be better if we change the internal logic to reformat the whole file on paste?

@tomy0000000 possibly, but since this is driven by VS Code I'm not sure if we are given the appropriate details to do that (I have not checked the docs to see).

@brettcannon
My suggestion above should likely be implement in VS Code rather than here,
but we can certainly link the "format selection" function from VS Code to a "format file" function in black temporally, so VS Code will "think" that black only formats the paste section.
It's kind of a tricky-hot-fix, but better than nothing, I guess?

For people looking for a way to use a different formatter than Black on paste, until VSCode supports a better solution, you can at least get indentation formatting on paste by installing the Paste and Indent extension and using it's suggested keybindings.

There's actually a way to do that:

Save $theFile prior to changes in /tmp/a.
Store diff between $theFile and /tmp/a.
black $theFile
Unpatch diff to $theFile

Surely it won't work in all cases, but should do the trick for many.
There should be a global option IMHO that tells vscode what to do when a formatter doesn't support partial formatting: no format, format whole file, smartypants-format (above process) or no-format if fails, smartypants-format or format-whole-file if fails.

@ambv @zsol @psf I would really love to see this change in Black. Really tired of this notification!

The latest VS Code allows the users to configure the formatting for the entire file or line of code changed, so many sure to enable the editor.formatOnSaveMode as file in the settings
{
  "python.formatting.provider": "black",
  "[python]": {
    "editor.formatOnPaste": false,
    "editor.formatOnSaveMode": "file"
  }
}

You could use Darker to only do Black reformatting for those lines which have been modified since the last commit (or e.g. relative to a given branch).
The documentation has instructions for integration with VS Code.
See this blog post for a detailed example of what Darker does.

Open the settings.json file in the .vscode folder wnich is in the project directory and change the value of the
python.formatter.provider to  autopep8.
That should fix the problem.

Since Darker can already be used as a drop-in replacement for Black as a Python formatter for VSCode, what if we added the capability for Darker to format a given line range (instead of lines it detects as modified according to Git history)? How does VSCode pass the selection range to the reformatting tool?

@codingbrowny people specifically want Black in this issue, so changing the formatter to autopep8 won't fix the issue.
@akaihola we have some ideas on how to at least make it easier for people to create their own formatting extension, so hopefully that will allow someone to create a Darker extension. But unfortunately Darker isn't popular enough right now for us to want to rely on it for something as critical as formatting support.

@brettcannon, we are considering adding this to Black to decrease the need to use alternative formatters in editor integration. How does VScode request a code region to be formatted? How is Black supposed to return the formatted code?
It would be easiest if we'd still get the entire file with a line range which would enable us to fare better with partially selected expressions. Then we'd just emit the entire file back as usual.

@ambv there are two ways: the API way and the LSP way, both covered by https://code.visualstudio.com/api/language-extensions/programmatic-language-features#format-the-selected-lines-in-an-editor. We have medium/long-term plans to move more tool integrations behind LSP, so for our needs that means https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rangeFormatting is how we would implement it.

Since we already have blackd, we'll teach it the LSP protocol.

Here's a first stab: https://github.com/psf/black/pull/2512
Note: this currently just implements textDocument/formatting, but I'd appreciate a review as I'm not intimate with the LSP spec. textDocument/rangeFormatting TBD after this.

@zephyrite I can't reproduce the error message when autopep8 is the chosen formatter:
"python.formatting.provider": "autopep8",
"editor.formatOnPaste": true

Did you perhaps try out Black and then flip your setting back to autopep8 without saving initially?

Thanks a lot man!

FYI we have a new, separate Black extension (code at https://github.com/microsoft/vscode-black-formatter ). Please try it out and if there are issues as that is where we plan to focus our efforts around Black going forward.


Possibilities of NFT

Is it possible to support NFT in Mixin Messenger?

It's possible to make ERC721 or even ERC1155 work on Mixin Messenger without changes on the Kernel.
Every NFT of ERC721 has a distinct uint256 ID, we can make the ERC721 contract as a normal Kernel asset. The messenger API will only allow a whole and single NFT transfer, the transfer will make a transaction on the Kernel with a single UTXO, and the uint256 ID is included in the extra.
The ERC721 account API is the same as a normal fungible asset account. Let's say the ERC721 account has a balance of 7, then it must own 7 UTXO with 7 distinct uint256 ID extra. Beside the basic account API, list an account of ERC721 can return all the UTXOs. And to make a transfer for this kind of account, the UTXO ID must be included.
ERC1155 is no different either, just allow an account has multiple UTXOs with the same uint256 ID extra.

https://eips.ethereum.org/EIPS/eip-721
https://www.bondly.finance/
https://opensea.io/

How do we handle those expirable tokens, e.g. ENS?

How do we handle those expirable tokens, e.g. ENS?

A NFT UTXO should include both the token ID and deposit address in the extra. Thus every NFT is bind to the address. Whenever the NFT on an address expires, it doesn't affect others to deposit again.
And we also must ensure that a NFT token ID can't have more than 1 copy for 1 address. e.g. a domain cedric.eth on address A and B are different, and on address A, you can only have on domain cedric.eth.
And we should never mark an NFT dead or inactive or frozen, because the expired one can be reactivated at any time without change the amount.


Incomplete Entities after using FindOption 'fields'

After loading an entity with the 'fields' FindOption Subsequent load operations will return incomplete entities.
See included testcase
import 'reflect-metadata';
import { Collection, Entity, ManyToMany, ManyToOne, MikroORM, PrimaryKey, Property, wrap, Embeddable, Embedded, EntityCaseNamingStrategy, OneToMany } from '@mikro-orm/core';
import { PostgreSqlDriver } from '@mikro-orm/postgresql';

@Entity()
export class A {
  @PrimaryKey()
    id!: number

  @Property()
    test1!: string

  @ManyToMany({ entity: () => B, mappedBy: 'a' })
    b = new Collection<B>(this)
}

@Entity()
export class B {
  @PrimaryKey()
    id!: number

  @Property()
    test2!: string

  @Property()
    test3!: string

  @ManyToMany({ entity: () => A, inversedBy: 'b' })
    a = new Collection<A>(this)
}

describe('loadItems with fields', () => {
    let orm: MikroORM<SqliteDriver>;

    beforeAll(async () => {
        orm = await MikroORM.init({
            entities: [A, B],
            dbName: ':memory:',
            type: 'sqlite',
        })
    await orm.schema.refreshDatabase()
    })

    test('loadItems with fields', async () => {
      const b = orm.em.create(B, {test2: 'qwer', test3: 'asdf'})
      const a = orm.em.create(A, {test1: 'yxcv', b: [b]})

      await orm.em.persistAndFlush([a, b])
      orm.em.clear()

      await orm.em.findOne(B, 1, {fields: ['test2']}) // fail
      // await orm.em.findOne(B, 1) // ok

      const a2 = await orm.em.findOne(A, 1)
      const test3 = (await a2.b.loadItems())[0].test3

      // no 'find' or 'populate' specified, but still undefined if 'fields' was previously used
      expect(test3).toMatch('asdf')
    })
})

Yes, I understand that this is the same entity, that is exactly the problem I'm having. The cached entity is missing some fields, but is not refreshed even though it is necessary in this case. If the entity was added with 'fields' to the cache, I'm always getting the same entity, even without 'fields'. The cache should probably keep track of this.

The cache should probably keep track of this.

Not really, the fix for this won't change that - you always get only one instance of the entity - the fix will be about loading the missing fields, so the previous instance will no longer be partially loaded. That's why I am asking if you understand this, as that is the core concept here, not a bug. The bug is only in the entity not being reloaded automatically with the loadItems call - but it would be with em.findOne or with em.populate.
If you want to have multiple entity instances, you need to use a separate EM fork (which is what the FindOptions.disableIdentityMap option is doing behind the scenes).

Yes, I understand that. I don't want multiple instances of the same entity. I'm not too familiar with the mikro-orm code, so my assumption with the cache is probably wrong. I simply want, that the missing fields are automatically loaded into the existing entity.

I will keep this refactoring for v6, as it might be semi-breaking, the ordering of the collection items might change a bit (although from what I can see in the tests, it was rather wrong in v5 too, as the PK is used for ordering, even if it's a UUID, so probably fine, but let's stay on the safe side). Also there is one serialization problem that this refactoring introduces and is no longer present in v6 due to other refactorings already done in there.


feat: image transformation

What kind of change does this PR introduce?
Feature
What is the new behavior?
Image transformation #126

:tada: This PR is included in version 2.1.0-next.1 :tada:
The release is available on:

GitHub release
npm package (@next dist-tag)

Your semantic-release bot :package::rocket:


httpx jsurl check before save

Save only valid js urls using httpx and piping alive urls into file. We want to feed only alive urls to linkfinder anyway otherwise it will produce some redundant output alongside with a useful.

Btw I see few tools which aren't used anywhere in this script, like ffuf, yet they downloaded. Why not replace gobuster with it?


Bug 1881055: add gRPC health check to catalog sources

Description of the change:
Right now the health check for catalog consists of checking whether a pod with the correct image is on-cluster and whether the Service associated with the catalog pod is present. In cases where a catalog image is unable to be accessed for example, the health check returns true (which sets the message to all available catalogsources are healthy) even though the catalog is unavailable.
There are two ways to implement the gRPC healthy check -- either dial the address directly or use the status of the catalog source GRPCConnectionState Status field. Since the Connection status changes frequently on-cluster (as evident from the catalog operator logs) it might make more sense to check the connection directly than relying on the gRPC state at that point in time.
Motivation for the change:
Improve UX around catalogs
Reviewer Checklist

[ ] Implementation matches the proposed design, or proposal is updated to match implementation
[ ] Sufficient unit test coverage
[ ] Sufficient end-to-end test coverage
[ ] Docs updated or added to /docs
[ ] Commit messages sensible and descriptive

/bugzilla refresh

/bugzilla refresh

/retest
/bugzilla refresh

/retest
/bugzilla refresh

/retest

/bugzilla refresh

/retest


Eq

1 test failing: eq('a', Object('a')) expects false but returns true
test based on the documentation of the source code src/eq.js

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+28.6%) to 75.676%

Totals

Change from base Build<PHONE_NUMBER>:
28.6%

Covered Lines:
13

Relevant Lines:
15

💛  - Coveralls


ServiceCircularReferenceException

First of all thank you for this bundle.
I've installed the bundle with composer and added it into the AppKernel.
But I'm getting a ServiceCircularReferenceException
Circular reference detected for service "doctrine.dbal.default_connection", path: "doctrine.dbal.default_connection".

I'm using:

Symfony 3.3.15
PHP 7.1.2

I couldn't find any alias or re-reference to doctrine.dbal.default_connection.
The bundle isn't overriding this id.
Do you have any idea how to further debug this issue?
It's possible that another bundle combined with PixersDoctrineProfilerBundle  causes this issue.
Thanks!

Okay, I'll check to disable some bundles and/or Doctrine event subscribers. I'll update the issue afterwards.

Found the issue... we injected the em into a Doctrine Listener instead of using it from LifecycleEventArgs.
derp derp derp derp..


yo langium results in "initialize" is not exported by "node_modules/vscode/extensions.js"

Steps To Reproduce

Install Langium as described at https://langium.org/docs/getting-started (my node version is v20.10.0 and my npm version is 10.2.5).
Run yo langium, and use default "Hello World" values for extension name, language name, and file extensions. Also, reply Yes to the questions for VSCode extension, CLI inclusion, and web worker inclusion.

The current behavior
During the execution of yo langium, and more precisely at the following step
><EMAIL_ADDRESS>build:bundle
> vite --config ./vite.bundle.config.ts build

vite v4.4.12 building for production...

I run into the following error:
"initialize" is not exported by "node_modules/vscode/extensions.js", imported by "node_modules/monaco-languageclient/lib/monaco-vscode-api-services.js".
file: /home/florian/Downloads/hello-world/node_modules/monaco-languageclient/lib/monaco-vscode-api-services.js:6:9
4:  * ------------------------------------------------------------------------------------------ */
5: import { ILogService, initialize, StandaloneServices } from 'vscode/services';
6: import { initialize as initializeVscodeExtensions } from 'vscode/extensions';
            ^
7: import getLanguagesServiceOverride from '@codingame/monaco-vscode-languages-service-override';
8: import getModelServiceOverride from '@codingame/monaco-vscode-model-service-override';
...
An error occured while running langium:app#install
Error langium

Command failed with exit code 1: npm run build:web

Unfortunately, I'm not very familiar with Node.js but could find the following oddities (at least they seem odd to me):

The package.json in the generated hello-world folder states that the generated Langium project depends on vscode-languageclient ~9.0.1 and monaco-languageclient ~6.6.0.
monaco-languageclient ~6.6.0 seems to however depend on vscode-languageclient ~8.1.0.
monaco-languageclient ~7.2.0 seems to plan to get rid of the erroneous import of the initialize function from vscode/extensions (possibly because vscode-languageclient ~9.0.1 doesn't provide it anymore or elsewhere).

Could it be that yo langium should generate a dependency on vscode-languageclient ~8.1.0 rather than vscode-languageclient ~9.0.1 to be compatible with monaco-languageclient ~6.6.0; or, alternatively, have generated projects depend on (the upcoming?) monaco-languageclient ~7.2.0 in case vscode-languageclient ~9.0.1 is required?
If you could use the generated hello-world Langium project please let me know. However, as stated above, I just invoke yo langium following https://langium.org/docs/getting-started to run into the above error (this behavior is repeatable).
As a side note: When executing npm list langium in the generated hello-world folder I get the following response:
<EMAIL_ADDRESS>├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ └──<EMAIL_ADDRESS>deduped
│ └──<EMAIL_ADDRESS>deduped
└──<EMAIL_ADDRESS>
The expected behavior
Behave as described at https://langium.org/docs/getting-started after the successful execution of yo langium.

Note that this is only relevant for developers answering the web worker question with yes. We cannot downgrade the vscode-languageserver dependency, as Langium depends on that itself.

cc @kaisalmen Any idea why this appears in the first place?

Thanks a lot for your prompt responses and technical clarifications @msujew @kaisalmen. I can confirm that the issue is not existent when responding with No to yo langium's question for web worker inclusion (as pointed out by Mark in https://github.com/eclipse-langium/langium/issues/1315#issuecomment-1845776962). For my current endeavors, this workaround is perfectly fine, thanks :-)

changed package.json config  with  "monaco-editor-wrapper": "~3.5.0", can work fine.

Do we have a workaround for this issue? I don't get it so far.

As a new Langium user, I also stumbled across this problem. I am especially interested in the web worker integration. I already used Monaco with Chevrotain in a web worker before, but have some hopes that Langium could make some things easier. Is a fix planned for the web worker integration, or is it dependent on some 3rd party package that the Langium project doesn't have any influence on?

Hi @medihack this has been fixed with #1317  but there was not official release after 2.1.3. v3 got delayed a bit.
As a workaround you can apply the changes from the PR locally. Only the template adjustments are required. And then run the generator. A new official release should become available before the end of January.

Hi @tobiashochguertel sorry I missed your question. The workaround sketched above ⬆ should get it going.

This has been fixed with the 3.0 release.


Updates from Tue 2 Jun

We had a failing test due to 1ed2542, so I disabled it for now. We should be good to merge in a few minutes. Thanks @ide!

Ohh, @ide, I didn't realize that it was your PR we reverted! Sorry about that.
We had to revert it because it was breaking the Android end-to-end tests for one of our products. We will try to get it back in ASAP

@ericvicenti thanks for the update. The code is intended to be backwards-compatible so I bet it's something small.

We had a hiccup yesterday with our export script, so #1505  replaces this


Edit functionality of Note and Reference No. is not working properly.

Describe the bug
Scenario-1. Update only Ref No. and then click on Save. --> Gives no effect.
Scenario-2. Update only Note field and then Save. --> Updates the value in Note and Ref No.

And displays too many messages on click of save.


Mark Filesystem class as deprecated

Future versions of NAS2D will drop the Filesystem class entirely. See #118 and #179.
When NAS2D was first born (circa 2008/2009), the C++ standard library had no built in way to properly deal with the native filesystem. C++17's std::filesystem effectively solves this issue (minus Apple continuing to not provide an actual implementation).
Anyway, because of this, the NAS2D::Filesystem object has basically become obsolete. Users of NAS2D should be encouraged to use the C++17 std::filesystem implementation and move away from Filesystem.

@ldicker83
@DanRStevens
Well poop. I thought this was going to be as simple as marking the class [[deprecated("reason")]] but Microsoft's "Enable SDL checks" option goes against standard and emits an error instead of a warning when "use of a function marked deprecated" or "use of a function marked pragma deprecated" is detected. So far the only "fixes" to the issue are to disable the SDL checks option via changing the property page C++ > General > SDL checks > No (/sdl-), in which the warning and message appear or "disable specific warnings" via C++ > Advanced > Disable Specific Warnings > 4996. in which the warning and message to NOT appear.
See: https://docs.microsoft.com/en-us/cpp/build/reference/sdl-enable-additional-security-checks?view=vs-2019 for everything the SDL checks protect against.
and MS's response to the many people complaining about [[deprecated]] being an error:
https://developercommunity.visualstudio.com/content/problem/164550/c4996-shown-as-error-by-default.html
Any thoughts on how to proceed?

Interesting, though I can see how deprecated methods may have been deprecated for security reasons, so I can understand why Security Development Lifecycle checks would consider such warnings as errors.
Maybe just the one check can be reset to a warning rather than an error:

C4996 | /we4996 | Use of a function marked as deprecated.

However....

I don't think we're quite ready to deprecate this. Downstream projects still rely on Filesystem, and some aspects of what Filesystem provided have no alternative. Namely, platform specific write folders. Until we provide an alternate solution, I think we should hold off on deprecating Filesystem.
Issue #179 is about clarifying which aspects of Filesystem are currently being used, and what we want from the design of that component. The C++ standard library can replace much of what Filesystem was handling, but not all of it. In particular, we used PhysFS to handle platform specific write folders, which has no replacement, and which is still quite important. We also make use of the virtual filesystem capabilities, but only in a minor way, and this can be reasonably dropped.
I think we need a new issue to provided needed replacement functionality, which this issue will depend upon.

Did some further reading, the setting can be overridden by specifying the warning level warning:
C/C++ > Command Line > Add "/w44996" to text box
This works and the error is reverted to a warning.
@DanRStevens  "Deprecated" doesn't mean "remove right now", so we can at least deprecate it now to warn users that it "will be removed in the future" and fix the issues you have with it, making sure to port over the changes to the std::filesystem version before fully removing it.

I still disagree about doing the deprecation right now. I strongly believe things should not be deprecated until a workaround is provided. In particular, the deprecation should include a message that at least hints at how to update the code, such as naming an alternate method or feature that can be used.
Additionally, deprecation warnings are very troublesome for developers who have enabled warnings as errors. This is commonly done on CI builds, as only errors will cause the CI build to fail, and thus alert developers about a problem. Normally warnings would result in a passed build so they are easily missed. If however a deprecation warning is issues, and warnings are promoted to errors, and there is no workaround available yet, there is no way to fix the build.
Warnings as errors can also be used locally to speed up the development cycle when debugging something that is badly broken. I have used it a few times in the past.

I would consider Issue #212 (at minimum) as currently blocking this Issue. We may want to give some consideration as to other potential concerns that would hamper a transition though.

Apple now has support for <filesystem> header. CircleCI supports the required targets as well.
See https://github.com/lairworks/nas2d-core/issues/179#issuecomment-566124388

Good news.

As per my comment in #179, I think we actually need to retain the Filesystem class. The implementation of Filesystem can change though, so it relies on <filesystem> rather than PhysFS.


Min/Man number assets nor working well

Please guide me on how to get the right min/max value for the number of assets. I am working to maximize a set of score objectives with a min/max number of assets constraints.
# Construct efficient frontier
from pypfopt.risk_models import CovarianceShrinkage
import math

# Construct efficient frontier
mu = expected_returns.mean_historical_return(prices)
S = risk_models.sample_cov(prices)

#['CVXOPT', 'ECOS', 'ECOS_BB', 'GLPK', 'GLPK_MI', 'OSQP', 'SCIPY', 'SCS']
ef = EfficientFrontier(mu, S,weight_bounds=(0, 1),solver='ECOS_BB')

#min num assets
b = cp.Variable(len(ef.tickers), boolean=True)
ef.add_constraint(lambda x: x <= booleans)
ef.add_constraint(lambda x: cp.sum(booleans) == 6)

#min 0
ef.add_constraint(lambda x: x >= min_zero)
score_rank = mu.rank(pct = True)

#Max 0.4
for i in range(len(prices.columns)):
    ef.add_constraint(lambda w: w[i] <= 0.4)

#wgt = ef.min_volatility()
wgt = ef.convex_objective(comp_score_obj, score=score_rank)
w_list = list(wgt.values())
clean_wgt = dict(ef.clean_weights())

#clean manually
round_wgt = [round(num,3) for num in w_list]
round_wgt

@amos-peter Can you specify what you mean by "right" min/max value for the number of assets?

@phschiele It is working no problem using default objectives such min_vol or max_sharpe. However it is not working when i try using convex objective such as maximize a set of scores.

@phschiele
i added this code:
booleans = cp.Variable(len(ef.tickers), boolean=True)
ef.add_constraint(lambda x: x <= booleans)
ef.add_constraint(lambda x: cp.sum(booleans) >= 3)

However it is not working if using convex objectives.

@amos-peter Happy to take a look if you can provide a full MWE


Update chromium to 83.0.4103.116

Also cleaned up the workflow

Welp, uploading artifacts is still broken. At least the obs build was succesful. https://build.opensuse.org/package/live_build_log/home:justkidding:arch/ungoogled-chromium/standard/x86_64
Guess this can be merged. @wchen342 @braewoods

@jstkdng The OBS one is manually run by you, not sent by workflow right? I think @braewoods is working on a repo to keep the secrets of OBS but that shouldn't have been finished yet.
There are all kinds of unexpected failures in Actions, that is why I wrapped key parts in my old workflow files in for loops for retries. It was kind of ugly though.

BTW was the OBS build using the latest version of llvm/clang on Arch? I am asking because I hit a strange link-time issue related to standard libraries when cross-compiling on Arch this week and I have to switch to llvm-git (which is llvm 11.0.0) to solve it. It will probably not occur on Linux version though since it's the same architecture.

I have a workflow that triggers an obs build on my own repo. https://github.com/jstkdng/ungoogled-chromium-archlinux/blob/master/.github/workflows/build.yml#L23
Regarding the llvm version, the OBS build is using clang 10.0.0-3 and llvm 10.0.0-2 according to the logs.

If you need llvm-git just build it on the obs and reference your own home project in the repositories for your home project.

I found my problem is actually caused by lld, downgraded it to 10.0.0-2 solved the problem. No idea why though.
I will merge this once the workflow finishes.

Alright then.
Surprisingly, this workflow might actually finish, will you create a release with the resulting binaries?

You mean for this specific version? But if we do this once then we should do it every time. I think it's better wait until either Actions are more stable or the OBS workflow is online.
Creating release can actually be done within workflow btw.

That would create a release on my fork. But, oh well, I'll try to add another job to actually create a release. Probably for next update as 83.0.4103.116-2 came out today.

finally, a sucesfull buils. Will test it asap

Alright, that should do it. OBS build succeded, github one will take a while.

Well the Actions failed again. But since OBS is good I am merging this.

People on the AUR seem to be having the same issue as you @wchen342 . Kinda weird, did you manage to figure out the problem?

That guy's problem is different than mine. My error is related to -wrap so I'm pretty sure it's the linker.
Ok so I saw an update on the problem, it seems it's the LTO.


Certain addons that still use death animations crash the game (ie Half-Life Resurgence)

I test the alpha Barney when finished with death animation will crash the game.

I think it’s due alpha Barney or other not having ragdoll physics


Update design.md - bug fix

Bug fix

:warning: Validation status: warnings

File
Status
Preview URL
Details

mixed-reality-docs/design.md
:warning:Warning
View
Details

mixed-reality-docs/design.md

Line 0: [Warning] Invalid file link:(~/StyleIcon.jpg).
Line 0: [Warning] Invalid file link:(~/MRTKIcon.jpg).
Line 0: [Warning] Invalid file link:(~/ControlsIcon.jpg).
Line 0: [Warning] Invalid file link:(~/AppPatternsIcon.jpg).
Line 0: [Warning] Invalid file link:(~/InteractionDesignIcon.jpg).
Line 0: [Warning] Invalid file link:(~/DesignToolsIcon.jpg).
Line 0: [Warning] Invalid file link:(~/GettingStartedIcon.jpg).

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Amazon s3 guide

I have written a guide on how to use Amazon S3 for storing your media files, you can take a look here. If somebody has anything to add or wants me to clarify something, please feel free to tell me so.
Maybe it's useful enough to add to the wiki as well.

Thanks a lot. Although, in general hosting your media files on a server different than the one hosting Koel  is not supported out of the box due to file system restrains. We had a discussion over this in #71.

I've linked to your guide from the Wiki. Thanks!

I've come up with a package (and guide) to use Amazon S3 with Koel. Check it out: https://github.com/phanan/koel-aws.


sfpowerscripts:orchestrator:prepare failing to provision any scratchorg's

Orchestrator is failing to provision any created scratch org's into the pool. This is caused due to the missing name space  as user is moved out of the salesforce-alm lib to its own repo

This has been fixed in 1.6.11 of the CLI

This has been fixed in 1.6.11 of the CLI


How do I make this support macOS? Do I need to install extra drivers?

Test OK under win10, no response under mac
How do I make this support macOS monterey? Do I need to install extra drivers?

This problem is "solved". (GP2040-PicoFightingBoard_v0.4.3.uf2)
Press and hold 1p 2p 1k 2k to enter different modes.
The default  mode cannot be recognized.
1p:  general mode ok. (ps3?)
2p: switch mode ok.
1k: same as 1p.


my dog eats food on the moon

still an issue: https://twitter.com/KrisTemmerman/status/1716507884656427469

Scott is an announcer on some of them. Likely related to the regex

If we have a way to populate the transcript data locally, I could track down these issues.

Some more details: https://github.com/syntaxfm/website/issues/1562#issue-2141201268
@themisterholliday I think I can get you a DB dump if you are still interested?

Some more details: #1562 (comment)
@themisterholliday I think I can get you a DB dump if you are still interested?

Yep I'll take a look if you can grab that 👍

Emailed ya. Some details:
Here is where we actually append the speaker names:  https://github.com/syntaxfm/website/blob/14ecf7d6e60693dc333e997de2c2b4a984db9ecd/src/server/transcripts/utils.ts#L112
And here we filter the flaggings out (less of an issue) https://github.com/syntaxfm/website/blob/14ecf7d6e60693dc333e997de2c2b4a984db9ecd/src/lib/transcript/Transcript.svelte#L23

Got it 👍
I'll take a look at this and see what i can find

So, I'll break this into three issues:

The flags for speaker detection are sticking around in the transcript view
Wes or Scott is missing in the entire transcript
Scott is mislabeled as Announcer

The flags for speaker detection are sticking around in the transcript view
This can be seen here: https://syntax.fm/show/683/spooky-coding-horror-stories-2023-part-1/transcript
This is because the transcript attributes "My name is Wes. My dog eats food on" to Wes and "the moon." to Scott, which breaks the Regex.
To fix this:

The Regex could be even more relaxed
A search for "startsWith" could be added the same as the line for Scott
or some change could be made to the ingest of transcripts as they are saved to the DB.

I see the first two as still a little "hacky," but getting this right for all occasions seems complicated.
Wes or Scott is missing in the entire transcript
This issue is because speakers are mislabeled (probably while saving the transcript) with "99" as their speaker id.
Then we filter speakers with the "99" id:
https://github.com/syntaxfm/website/blob/14ecf7d6e60693dc333e997de2c2b4a984db9ecd/src/lib/transcript/Transcript.svelte#L20
If we don't filter, the speakers still have names, so they show up just fine in the recent shows.
But I'm assuming this was causing an issue on some other shows, so if we have those, I can double-check the filter.
On top of removing the filter, we could check for no speaker name, have the entry in the transcript, and label it as "unknown."
Examples:
https://syntax.fm/show/726/is-htmx-a-joke/transcript

Scott has a speakerId of 99 and is filtered out completely

https://syntax.fm/show/727/how-to-code-opinionated-typescript-stack-tooling-choices-explained/transcript

Wes has a speakerId of 99 and is filtered out completely

Scott is mislabeled as Announcer
Can you provide the show number we were seeing this? I can't find one, but I'm checking a limited subset.

sweet thanks. The speaker ID of 99 is important, - I forget why though. Ill check tomorrow.
I think all of these issues are due to the regex either being too relaxed, or not relaxed enough.
I'd have to check, but I don't think I'm saving the speaker's name in the DB, just the speakers number. The problem with our transcript provider is they don't tell you who is 1 or 2, so we have to do that ourselves.

If I'm following correctly the speaker name is correctly found here (and above): https://github.com/syntaxfm/website/blob/14ecf7d6e60693dc333e997de2c2b4a984db9ecd/src/server/transcripts/utils.ts#L49
Which accounts for any speaker id in conjunction with detectSpeakerNames.
Since the speaker id is saved in the DB, in show 727 your id is 99 instead of 1 or 2. (I think the announcer may be 99 in some older shows?)
Ah yea I remember y'all saying the transcript provider doesn't give the speaker which is why this code is required.

the incorrect marking is fixed. I'd like to figure a way to map the speaker numbers to show guests now.

Opps! I may have found a bug with transcript's timestamp progress bar not updating while the episode is playing, it updates as soon as we pause the episode.
This might be related to local-storage timestamp saves, I am not sure though!
I am on the edge browser.
https://github.com/user-attachments/assets/133087bb-2954-4d00-a002-59502cd50af2


[feature] SLSA workflows as templates

Is your feature request related to a problem? Please describe.
Let's assume that workflows in an organization are not allowed to reach out to any third-party workflows, e.g.,  SLSA Reusable Workflow (SRW) builders based on their policies. How can such organizations be supported to get benefit from the workflows in this repository?
Describe the solution you'd like
We could host the SRW inside the organization by using the slsa-github-generator repo as a template repo. One concern would however be maintenance overhead as the downstream repo maintainers would need to keep their repo in in sync with the upstream repo.

If we did something like this, I assume the copied reusable workflow repository would need to be self contained, right? All the references it makes would need to be internal and wouldn't be able to call out to slsa-framework repositories in any way?

I assume the copied reusable workflow repository would need to be self contained, right?

Yes, that's correct.

All the references it makes would need to be internal and wouldn't be able to call out to slsa-framework repositories in any way?

Correct.

How would an outside observer know that they are in fact using the SRW and not claiming to use it? This is related to the builder service conversation as well.
For example Github actions hosted by Github the company can be certified to be secure and assuming your organization trusts Github we can then look at the actions and workflows.
In the context of open source the reusable workflows we can look at SLSA/OpenSSF and people can decide whether or not they trust
If someone pulls in those reusable workflows into their own org it might work within their org but if they distribute artifacts and attestations outside their org, the consumer would either need to audit against the org's fork of the reusable workflow or just trust that org.

If someone pulls in those reusable workflows into their own org it might work within their org but if they distribute artifacts and attestations outside their org, the consumer would either need to audit against the org's fork of the reusable workflow or just trust that org.

+1. In this case the builder ID would be the org's reusable workflow path, and consumers would have to trust this org, you're correct. If the code is just mirrored, this could maybe work since the code would be identical. I have thought enough about it yet to know whether some configuration would be needed, etc

Even with mirroring, at that point is it really any different than just using the upstream workflow?
FWIW, I've lived through the pain of needing approvals to use some upstream tool but pulling the code directly in for some reason circumvents that process for not always great reasons. I don't want to get on a soapbox but I do understand that by pulling the code internally it allows the organization to scan, lint, review, and control the code a bit better. However, in cases like an open source external reusable workflow it shouldn't matter because the code can be linted and reviewed from the upstream repo.

Thanks @mlieberman85. Thinking about it some more, you're right that verification of artifacts outside the org would not be straightforward. Even if we could consider maintaining a trust list in slsa-verifier, the trusted SRWs would have to be recertified with every change, which is impractical. I don't think it's a good idea to take the generators out of TCB.
So, using this repo as a template would only be useful for artifacts consumed inside the org. I guess it would be good however if the workflows can be self contained to make this option possible anyway.

I came across a repo that forked this repo https://github.com/albasystems/slsa-provenance-generator and uses it to generate provenance for https://github.com/albasystems/hello-slsa.


x/exp/slog: Customising log source value

Hi,
RE: https://github.com/golang/go/issues/59280#issuecomment-1487344160

func (s *Source) String() string { return fmt.Sprintf("%s:%d", s.File, s.Line) }

What @rsc suggested above is what all our app's are doing for many years. I am wondering if I can somehow accomplish the same behaviour using Slog?
If there is still possibility for a simple string value, I will then get rid of working directory from it (file) and have a final value as shown below.
"source": "/Users/myself/dev/tetris/cmd/api/main.go:15" <--- FROM
"source": "/cmd/api/main.go:15"                         <--- TO

Note: I am coming from Zerolog and Logrus background and both have this possibility but I am not sure if Slog has it. If id does, I prefer migrating to Slog.
Thank you
CC: @jba

see slog.SouceKey and slog.Record.PC
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions


 Need to get a templateflow release without it.

@mgxd Could I trouble you for a review?


Users validate name on register

Users cant use special characters in their name.
They are able to use -, space and norwegian letters.
Done with express-validator.

@NoroffFEU/quality-assurance Please can we get this reviewed and merged today


Possible regression - NosTale is not interpreting clicks correctly (because some kind of built-in anticheat?)

Game does not interpret clicks correctly - it's not possible to walk around with character and also clicking on items is causing odd behaviour (they are changing to random quotes).
Same issue appears on mac since years: https://bugs.winehq.org/show_bug.cgi?id=42999
Not sure if wine or dxvk bug, on gallium nine and steam proton it works fine.
Software information
NosTale, wine with desktop emulation (because for some sake wayland (or xwayland) can't handle mouse clicks on one of my monitors, and if I will emulate desktop it does work fine).
System information

GPU: rx5700 XT
Driver: AMDGPU
Wine version: 5.18
DXVK version: 1.7.1

Apitrace file(s)

For some reason when I launched apitrace with:
wine apitrace-latest-win32/bin/apitrace.exe trace -a dxgi GF_Login.exe
I was not able to get log in the directory, this is possible other issue.

Log files

d3d9.log: It's empty for some reason.
d3d11.log: Same as d3d9.log
dxgi.log:
gfclient_dxgi.log
wine.log:
nt_wine.log

Hmm, that's interesing, it doesn't work on wine 5.18 on Arch with DXVK 1.7, but appear to function properly on Steam Proton with the same DXVK number. Probably wine issue, I installed dxvk via:
export WINEPREFIX=~/.wine ./setup_dxvk.sh install

This is almost certainly not a DXVK bug. DXVK has nothing to do with input.

Gonna close that and reopen if I will be sure that's DXVK bug and will be not getting resolved.


Simplify API, functional testing and docs

Description
Simplify the api: Switch the API to use an interface for the options.
Functional testing: added black-box testing of the tool to ensure everything fits together and output is as expected.
Docs: Documented how to launch the tool.
Testing done
Test coverage isn't taking into account the new black-box testing as the tool is invoked in a child process.  See https://github.com/jacoco/jacoco/issues/1308.
Reviewer checklist

[ ] Ensure relevant issues are linked (description should include text like "Fixes #")
[ ] Ensure any appropriate documentation has been added or amended

Coverage decreased (-6.0%) to 64.286% when pulling 825e240cc2bae64c377f11631a7b9d988a09922b on simplify into cba902c7578fbfa6752e0b14d6b3631eecb26f23 on main.


Problems with pam on Ubuntu 22.10

➜  lightdm cd /etc/lemurs
➜  lemurs ls
config.toml  wayland  wms  xsetup.sh
➜  lemurs tree
.
├── config.toml
├── wayland
│   ├── sway
│   └── ubuntu
├── wms
└── xsetup.sh
2 directories, 4 files
➜  lemurs cat wayland/ubuntu
#! /bin/sh
exec gnome-session --session=gnome-wayland
➜  lemurs ls -al wayland/ubuntu
-rwxr-xr-x 1 root root 54 Dec  1 15:50 wayland/ubuntu
➜  lemurs  cat /var/log/lemurs.log
[2022-12-01][15:19:41][lemurs][INFO] Lemurs logger is running
[2022-12-01][15:19:41][lemurs][INFO] Switching to tty 2
[2022-12-01][15:19:41][lemurs][INFO] UI booted up
[2022-12-01][15:19:41][lemurs::info_caching][INFO] Attempting to get a cached information from '/var/cache/lemurs'
[2022-12-01][15:19:41][lemurs::info_caching][INFO] Read cache file and found environment 'mephisto' and username 'None'
[2022-12-01][15:19:41][lemurs::ui][INFO] Loading environment 'mephisto' from cache
[2022-12-01][15:19:41][lemurs::ui::switcher][WARN] Failed to find selection with title: 'mephisto'
[2022-12-01][15:19:52][lemurs::auth][INFO] Login attempt for 'mephisto'
[2022-12-01][15:19:52][lemurs::auth::pam][INFO] Started opening session
[2022-12-01][15:19:52][lemurs::auth::pam][INFO] Gotten Authenticator
[2022-12-01][15:19:52][lemurs::auth::pam][INFO] Got handler
[2022-12-01][15:19:52][lemurs::auth::pam][INFO] Validated account
[2022-12-01][15:19:52][lemurs::auth::pam][INFO] Opened session
[2022-12-01][15:19:52][lemurs::ui][INFO] Setting cached information
[2022-12-01][15:19:52][lemurs::info_caching][INFO] Attempting to set cache
[2022-12-01][15:19:52][lemurs::info_caching][INFO] Successfully set username in cache file
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'HOME' to '/home/mephisto'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Successfully changed working directory to /home/mephisto!
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'SHELL' to '/usr/bin/zsh'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'USER' to 'mephisto'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'LOGNAME' to 'mephisto'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[2022-12-01][15:19:52][lemurs::post_login][INFO] Set environment variables.
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIR' to '/home/mephisto/.config'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CACHE_HOME' to '/home/mephisto/.cache'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_HOME' to '/home/mephisto/.local/share'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_STATE_HOME' to '/home/mephisto/.local/state'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_DIR' to 'user'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_ID' to '1'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SEAT' to 'seat0'
[2022-12-01][15:19:52][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_VTNR' to '2'
[2022-12-01][15:19:52][lemurs::post_login][INFO] Set XDG environment variables
[2022-12-01][15:19:52][lemurs::post_login][INFO] Starting Wayland Session
[2022-12-01][15:19:52][lemurs::post_login][INFO] Entered Wayland compositor
[2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Adding UTMPX record
[2022-12-01][15:19:52][lemurs::auth::utmpx][INFO] Added UTMPX record
[2022-12-01][15:19:53][lemurs::auth::utmpx][INFO] Removing UTMPX record
When input username and password, it didn't enter gnome desktop, just stay on greeter page.
By the way, this repo is impressive.

Hi,
Thank you for this report. I spend quite some time on trying to find the solution to this. GDM is doing some special stuff normally to make sure gnome-session works fine.
I have been able to identify some points. These are more reminders for me when I continue working on this.

We really should be setting XDG_SESSION_TYPE=x11/wayland/tty depending on the post_login type.
We should set MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland for Wayland sessions.
Some of the error logging in the post_login/mod.rs file is not really helping.
You need to install libpam-dev on Ubuntu to use this project.
You can log gnome-session with the --debug flag.
The debug output shows that the display is not properly set. Using DISPLAY=:1 does not resolve the issue. In fact the documentation stated that gnome-session does this itself.
Starting a gnome-session from the tty is quite difficult.

To be honest, I am having many problems with setting up a good testing environment.
I will follow up soon.

I think this is a problem with gnome-session in general. I had someone message me about the same problem for the X11 gnome-session. I didn't test this yet, but according to the arch wiki somewhere. GDM puts the Xauthority file somewhere else than the home directory. This might well be the problem.

The problem seems to be exclusively with Ubuntu. I tested it with a fresh arch setup and gnome and everything seems to work fine. I will investigate more later.

Okay. I have tracked the issue down. It turns out that the PAM services are very different between Ubuntu and other distributions. Now, I just need to find a fix that seems reasonable.

I have the same problem and logs as @kmephistoh, but instead Ubuntu I'm trying to launch labwc in Arch Linux. I have the wayland folder created and the labwc file with the script, I didn't change anything else.
labwc
#! /bin/sh
exec labwc

Logs
[2022-12-09][20:33:10][lemurs::auth][INFO] Login attempt for 'relwi'
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Started opening session
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Gotten Authenticator
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Got handler
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Validated account
[2022-12-09][20:33:10][lemurs::auth::pam][INFO] Opened session
[2022-12-09][20:33:10][lemurs::ui][INFO] Setting cached information
[2022-12-09][20:33:10][lemurs::info_caching][INFO] Attempting to set cache
[2022-12-09][20:33:10][lemurs::info_caching][INFO] Successfully set username in cache file
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'HOME' to '/home/relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Successfully changed working directory to /home/relwi!
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'SHELL' to '/bin/nu'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'USER' to 'relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'LOGNAME' to 'relwi'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[2022-12-09][20:33:10][lemurs::post_login][INFO] Set environment variables.
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIR' to '/home/relwi/.config'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CACHE_HOME' to '/home/relwi/.cache'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_HOME' to '/home/relwi/.local/share'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_STATE_HOME' to '/home/relwi/.local/state'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_RUNTIME_DIR' to '/run/user/1000'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_DIR' to 'user'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SESSION_ID' to '1'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_SEAT' to 'seat0'
[2022-12-09][20:33:10][lemurs::post_login::env_variables][INFO] Set environment variable 'XDG_VTNR' to '2'
[2022-12-09][20:33:10][lemurs::post_login][INFO] Set XDG environment variables
[2022-12-09][20:33:10][lemurs::post_login][INFO] Starting Wayland Session
[2022-12-09][20:33:10][lemurs::post_login][INFO] Entered Wayland compositor
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Adding UTMPX record
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Added UTMPX record
[2022-12-09][20:33:10][lemurs::auth::utmpx][INFO] Removing UTMPX record

If I change to another tty and run the command labwc it starts correctly.

Is there any chance you can both try again? It works now on my side, but your issues may be different?

Unfortunately it still doesn't work for me, here is the logs, btw, is there the possibility that I'm missing some packages?

Logs
[INFO  lemurs] Lemurs logger is running
[INFO  lemurs] Switching to tty 2
[INFO  lemurs] UI booted up
[WARN  lemurs::post_login] Failed to read from the X folder '/etc/lemurs/wms'
[INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[INFO  lemurs::info_caching] Read cache file and found environment 'labwc' and username 'relwi'
[INFO  lemurs::ui] Loading username 'relwi' from cache
[INFO  lemurs::ui] Loading environment 'labwc' from cache
[INFO  lemurs] Starting new session for 'relwi' in environment 'Wayland { script_path: "/etc/lemurs/wayland/labwc" }'
[ERROR lemurs::env_container] Could not find the working directory when taking snapshot
[INFO  lemurs::post_login::env_variables] Setting Display
[INFO  lemurs::env_container] Set environment variable 'DISPLAY' to ':1'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[INFO  lemurs::auth] Login attempt for 'relwi'
[INFO  lemurs::auth::pam] Started opening session
[INFO  lemurs::auth::pam] Gotten Authenticator
[INFO  lemurs::auth::pam] Got handler
[INFO  lemurs::auth::pam] Validated account
[INFO  lemurs::auth::pam] Opened session
[INFO  lemurs::ui] Setting cached information
[INFO  lemurs::info_caching] Attempting to set cache
[INFO  lemurs::info_caching] Successfully set username in cache file
[INFO  lemurs::post_login::env_variables] Setting XDG Seat Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SEAT'. It was already set to 'seat0'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_VTNR'. It was already set to '2'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Variables
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_RUNTIME_DIR'. It was already set to '/run/user/1000'
[INFO  lemurs::env_container] Skipped setting environment variable 'XDG_SESSION_ID'. It was already set to 'c1'
[INFO  lemurs::post_login::env_variables] Setting Basic Environment Variables
[INFO  lemurs::env_container] Successfully changed working directory to /home/relwi!
[INFO  lemurs::env_container] Set environment variable 'HOME' to '/home/relwi'
[INFO  lemurs::env_container] Set environment variable 'SHELL' to '/bin/nu'
[INFO  lemurs::env_container] Set environment variable 'USER' to 'relwi'
[INFO  lemurs::env_container] Set environment variable 'LOGNAME' to 'relwi'
[INFO  lemurs::env_container] Set environment variable 'PATH' to '/usr/local/sbin:/usr/local/bin:/usr/bin'
[INFO  lemurs::post_login::env_variables] Setting XDG Common Paths
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIR' to '/home/relwi/.config'
[INFO  lemurs::env_container] Set environment variable 'XDG_CACHE_HOME' to '/home/relwi/.cache'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_HOME' to '/home/relwi/.local/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_STATE_HOME' to '/home/relwi/.local/state'
[INFO  lemurs::env_container] Set environment variable 'XDG_DATA_DIRS' to '/usr/local/share:/usr/share'
[INFO  lemurs::env_container] Set environment variable 'XDG_CONFIG_DIRS' to '/etc/xdg'
[INFO  lemurs::post_login] Starting Wayland session
[INFO  lemurs::auth::utmpx] Adding UTMPX record
[INFO  lemurs::auth::utmpx] Added UTMPX record
[INFO  lemurs::env_container] Removing session environment variables
[INFO  lemurs::env_container] Reverting to environment before session
[ERROR lemurs::env_container] Failed to change the working directory back to
[INFO  lemurs] Waiting for environment to terminate
[WARN  lemurs::post_login] Environment came back with non-zero exit code.
[WARN  lemurs::post_login] Environment's stderr: """
    00:00:00.053 [ERROR] [backend/x11/backend.c:408] Failed to open xcb connection
    00:00:00.053 [ERROR] [../labwc-0.6.1/src/server.c:214] unable to create backend
    """
[INFO  lemurs] Environment terminated. Returning to Lemurs...
[INFO  lemurs::auth::utmpx] Removing UTMPX record

➜  ~ lemurs -V
0.3.1

➜  ~ cat /var/log/lemurs.log
[INFO  lemurs] Lemurs logger is running
[INFO  lemurs] Switching to tty 2
[INFO  lemurs] UI booted up
[INFO  lemurs::info_caching] Attempting to get a cached information from '/var/cache/lemurs'
[INFO  lemurs::info_caching] Read cache file and found environment 'xinitrc\nmephisto' and username 'None'
[INFO  lemurs::ui] Loading environment 'xinitrc\nmephisto' from cache
[WARN  lemurs::ui::switcher] Failed to find selection with title: 'xinitrc\nmephisto'
[INFO  lemurs] Starting new session for 'mephisto' in environment 'Wayland { script_path: "/etc/lemurs/wayland/ubuntu" }'
[ERROR lemurs::env_container] Could not find the working directory when taking snapshot
[INFO  lemurs::post_login::env_variables] Setting Display
[INFO  lemurs::env_container] Set environment variable 'DISPLAY' to ':1'
[INFO  lemurs::post_login::env_variables] Setting XDG Session Parameters
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_CLASS' to 'user'
[INFO  lemurs::env_container] Set environment variable 'XDG_SESSION_TYPE' to 'wayland'
[INFO  lemurs::auth] Login attempt for 'mephisto'
[INFO  lemurs::auth::pam] Started opening session
[INFO  lemurs::auth::pam] Gotten Authenticator
[INFO  lemurs::auth::pam] Got handler
[INFO  lemurs::auth::pam] Validated account
[INFO  lemurs::auth] Authentication failed for 'mephisto'. Reason: Failed to open a PAM session
[INFO  lemurs::env_container] Removing session environment variables
[INFO  lemurs::env_container] Reverting to environment before session
[ERROR lemurs::env_container] Failed to change the working directory back to

➜  ~ cat /var/log/auth.log
Mar  7 13:50:12 workpc systemd-logind[3982]: New seat seat0.
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event2 (Power Button)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event1 (Lid Switch)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event0 (Sleep Button)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event5 (CHERRY Mechanical Keyboard)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event6 (CHERRY Mechanical Keyboard)
Mar  7 13:50:12 workpc systemd-logind[3982]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Mar  7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): Error writing /proc/self/loginuid: Operation not permitted
Mar  7 13:50:26 workpc lemurs: pam_loginuid(lemurs:session): set_loginuid failed
Mar  7 13:50:26 workpc lemurs: pam_unix(lemurs:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:26 workpc systemd-logind[3982]: New session c1 of user mephisto.
Mar  7 13:50:26 workpc systemd: pam_unix(systemd-user:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:30 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:30 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:50:30 workpc dbus-daemon[3944]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.507" (uid=1000 pid=6165 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=3982 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:50:30 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:50:32 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:50:32 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:50:32 workpc dbus-daemon[3944]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.540" (uid=1000 pid=6252 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=3982 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:50:32 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:50:36 workpc login[6218]: pam_unix(login:session): session opened for user mephisto(uid=1000) by LOGIN(uid=0)
Mar  7 13:50:36 workpc systemd-logind[3982]: New session 4 of user mephisto.
Mar  7 13:51:23 workpc sudo: mephisto : TTY=tty3 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/lemurs.log
Mar  7 13:51:23 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by mephisto(uid=1000)
Mar  7 13:51:30 workpc sudo: pam_unix(sudo:session): session closed for user root
Mar  7 13:51:37 workpc sudo: mephisto : TTY=tty3 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 13:51:37 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by mephisto(uid=1000)
---------------lemurs:above---------------------------gdm3:below-----------------------------------------------------------------
Mar  7 13:57:22 workpc systemd-logind[4040]: New seat seat0.
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event2 (Power Button)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event1 (Lid Switch)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event0 (Sleep Button)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event5 (CHERRY Mechanical Keyboard)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event6 (CHERRY Mechanical Keyboard)
Mar  7 13:57:22 workpc systemd-logind[4040]: Watching system buttons on /dev/input/event3 (AT Translated Set 2 keyboard)
Mar  7 13:57:23 workpc gdm-launch-environment]: pam_env(gdm-launch-environment:session): deprecated reading of user environment enabled
Mar  7 13:57:23 workpc gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=127) by (uid=0)
Mar  7 13:57:23 workpc systemd-logind[4040]: New session c1 of user gdm.
Mar  7 13:57:23 workpc systemd: pam_unix(systemd-user:session): session opened for user gdm(uid=127) by (uid=0)
Mar  7 13:57:28 workpc polkitd(authority=local): Registered Authentication Agent for unix-session:c1 (system bus name :1.83 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: unable to locate daemon control file
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: stashed password to try later in open session
Mar  7 13:57:45 workpc gdm-password]: pam_env(gdm-password:session): deprecated reading of user environment enabled
Mar  7 13:57:45 workpc gdm-password]: pam_unix(gdm-password:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:45 workpc systemd-logind[4040]: New session 2 of user mephisto.
Mar  7 13:57:45 workpc systemd: pam_unix(systemd-user:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:45 workpc gdm-password]: gkr-pam: unlocked login keyring
Mar  7 13:57:46 workpc systemd: pam_unix(login:session): session opened for user mephisto(uid=1000) by (uid=0)
Mar  7 13:57:46 workpc gnome-keyring-daemon[6167]: The PKCS#11 component was already initialized
Mar  7 13:57:46 workpc gnome-keyring-daemon[6384]: discover_other_daemon: 1
Mar  7 13:57:46 workpc systemd: pam_unix(login:session): session closed for user mephisto
Mar  7 13:57:46 workpc dbus-daemon[4003]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.432" (uid=1000 pid=6372 comm="(sd-pam)" label="unconfined") interface="org.freedesktop.login1.Manager" member="ReleaseSession" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=4040 comm="/lib/systemd/systemd-logind" label="unconfined")
Mar  7 13:57:46 workpc systemd: pam_systemd(login:session): Failed to release session: Access denied
Mar  7 13:57:46 workpc gnome-keyring-daemon[6167]: The Secret Service was already initialized
Mar  7 13:57:46 workpc gnome-keyring-daemon[6387]: discover_other_daemon: 1
Mar  7 13:57:46 workpc gnome-keyring-daemon[6389]: discover_other_daemon: 1
Mar  7 13:57:48 workpc polkitd(authority=local): Registered Authentication Agent for unix-session:2 (system bus name :1.434 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Mar  7 13:57:52 workpc gdm-launch-environment]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Mar  7 13:57:52 workpc systemd-logind[4040]: Session c1 logged out. Waiting for processes to exit.
Mar  7 13:57:52 workpc systemd-logind[4040]: Removed session c1.
Mar  7 13:58:01 workpc polkitd(authority=local): Unregistered Authentication Agent for unix-session:c1 (system bus name :1.83, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Mar  7 13:58:01 workpc PackageKit: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
Mar  7 13:58:01 workpc PackageKit: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh
Mar  7 13:58:01 workpc gnome-keyring-daemon[6167]: asked to register item /org/freedesktop/secrets/collection/login/2, but it's already registered
Mar  7 13:59:45 workpc dbus-daemon[6161]: [session uid=1000 pid=6161] Failed to activate service 'org.freedesktop.Tracker3.Miner.Files': timed out (service_start_timeout=120000ms)
Mar  7 14:00:48 workpc sudo: mephisto : TTY=pts/5 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 14:00:48 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Mar  7 14:01:45 workpc dbus-daemon[6161]: [session uid=1000 pid=6161] Failed to activate service 'org.freedesktop.Tracker3.Miner.Files': timed out (service_start_timeout=120000ms)
Mar  7 14:03:14 workpc sudo: pam_unix(sudo:session): session closed for user root
Mar  7 14:03:15 workpc sudo: mephisto : TTY=pts/5 ; PWD=/home/mephisto ; USER=root ; COMMAND=/usr/local/bin/vim /var/log/auth.log
Mar  7 14:03:15 workpc sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)

➜  lemurs git:(main) ✗ git log | head -n 5
commit d84deacb2b5da69663e5f6c825b43629957c0a4f
Author: Gijs Burghoorn<EMAIL_ADDRESS>Date:   Fri Mar 3 23:03:31 2023 +0100

    Add `shell_login_flag` option in config (#129)

Hi, I pull the latest main branch(no dev branch exist),
at lemurs.log:  [INFO  lemurs::auth] Authentication failed for 'mephisto'. Reason: Failed to open a PAM session

Hey @Relwi, you were probably experiencing the same issue as #131. After resolving that issue, I can now run LabWC just fine. (Where it didn't before for me).
Thank you a lot for this debugging. I am talking to the maintainer of the pam crate because there seem to be some problems on that side. I will come back to this.

Yep, I recently updated the package and is working now, thanks!

Speaking of pam, I think you should include libpam0g-dev for building at Ubuntu 22.04


Deb version fails to download files

To reproduce:

Have someone DM you a file.
Try to download it.
Nothing happens.

Same as in #24, it may not work when there's no default browser set in OS.
Can't reproduce it, @Botspot...

Reinstalling the deb made this issue vanish.


CB-1691. Test connection as part of database registration.

Database and database server registration now test the connection as
part of the registration.
Note: My initial thought was that I was able to register databases with bad credentials because bad credentials passed the test connection. However, on further inspection, it looks like database registration didn't test the credentials at all, so this has been added.
Unit tests and manual tests have been run.

This passes locally, so I'm going to merge this in.


Cache and Resume Downloads

Caching should work already.
Resuming downloads might not be necessary and increase complexity, so I compare local and remote file sizes and see if there is a need to download again via e43a57d.