uv refuses to resolve deps with dynamic SCM version, missing tags and cylic dependencies A:dev -> B, B -> A, hinting at name shadowing

It happens in several of my projects now. Proper issue as a follow-up of #7329.
Example:

CI job on tag 0.26.2: https://github.com/mkdocstrings/mkdocstrings/actions/runs/11307283146/job/31448849897 ("Install dependencies" step OK
CI job on same commit (triggered via regular push): https://github.com/mkdocstrings/mkdocstrings/actions/runs/11307282883/job/31448849515 -> "Install dependencies" step fails

Using CPython 3.10.15 interpreter at: /opt/hostedtoolcache/Python/3.10.15/x64/bin/python
Creating virtual environment at: .venv
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of mkdocstrings-python-legacy are
      available:
          mkdocstrings-python-legacy<=0.2.1
          mkdocstrings-python-legacy==0.2.2
          mkdocstrings-python-legacy==0.2.3
          mkdocstrings-python-legacy==0.2.4
      and mkdocstrings-python-legacy>=0.2.1,<=0.2.2 depends on your project,
      we can conclude that mkdocstrings-python-legacy>=0.2.1,<0.2.3 depends on
      your project.
      And because mkdocstrings-python-legacy>=0.2.3 depends on your project,
      we can conclude that mkdocstrings-python-legacy>=0.2.1 depends on your
      project.
      And because mkdocstrings[python-legacy] depends on
      mkdocstrings-python-legacy>=0.2.1 and your project requires
      mkdocstrings[python-legacy], we can conclude that your projects's
      requirements are unsatisfiable.

      hint: The package `mkdocstrings-python-legacy` depends on the package
      `mkdocstrings` but the name is shadowed by your project. Consider
      changing the name of the project.

Here uv claims that since mkdocstrings-python-legacy depends on mkdocstrings, and my project is named mkdocstrings, it cannot resolve deps. My project is mkdocstrings, it's not shadowing it :sweat_smile:
In this case, mkdocstrings depends on mkdocstrings-python-legacy as an extra (optional dependency).
[project.optional-dependencies]
python-legacy = ["mkdocstrings-python-legacy>=0.2.1"]

But I get the same error when project A depends on B as a development dependency.
I'm not sure if the non-editable mode is the issue here, as I cannot reproduce this behavior locally.

Here are more verbose logs: https://github.com/mkdocstrings/griffe/actions/runs/11307459194/job/31449208076.

Ah, maybe it's because my version is dynamic, and since the project is shallow (tags not fetched), my build backend (pdm-backend) ends computing the version as 0.1, which is clearly inferior to what the dev/extra-dependency requires.

Wait, no, I actually fetch all tags in this job :weary: Lemme try again with different options on the checkout action.

OK so my previous technique for fetching tag was probably not working well:
    - name: Fetch all tags
      run: git fetch --depth=1 --tags

I replaced it with:
    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
        fetch-tags: true

...and now it works :hot_face:

Thank you for following up 🙏
Is there a bug in the error message hint then? Or is this resolved?

I wouldn't call it a bug, I would say it is confusing. Seeing this error message didn't help me understand what was going on, and the "name shadowing" hint is... incorrect? As mentioned above, I'm not shadowing a dependency name, the project and the dependency are the same project.
So my recommendation, if this is actually what's happening, and if it's possible, is to update the error message by showing that the computed project A version (current project, built for a non-editable install), and the version of project A required by a (dev-)dependency are not compatible.
My second suggestion above is to not even check compatibility between the current project version and the version required by dependencies, and install the current project anyway, always, maybe just showing a warning:

Your project depends on<EMAIL_ADDRESS>which depends on your project>=7.8.9, but your project is currently in v4.5.6, which is incompatible. uv will install your project anyway, but things might break.

Let me know if anything is unclear :relaxed:

One argument in favor of allowing the current project version to be imcompatible with the version required by a dependency is that when forking a repository on GitHub, tags are not copied over. Then when triggering CI on your fork, the checkout action can't fetch tags since they don't exist, and uv fails to resolve. To fix this, authors of the fork have to explicitly fetch tags from upstream and push them back into their fork.

I have updated the title, and built a reproduction.
git clone git@github.com:pawamoy/repro-uv-8148-a
cd repro-uv-8148-a
uv sync  # works fine

# Now we clone a fork of the same project,
# meaning we don't have the Git tags.
cd ..
git clone git@github.com:pawamoy-forks/repro-uv-8148-a repro-uv-8148-a-fork
cd repro-uv-8148-a-fork
uv sync  # fails with the following output

% uv sync
Using CPython 3.12.7 interpreter at: /home/pawamoy/.basher-packages/pyenv/pyenv/versions/3.12.7/bin/python
Creating virtual environment at: .venv
  × No solution found when resolving dependencies:
  ╰─▶ Because only repro-uv-8148-b==0.1.1 is available and repro-uv-8148-b==0.1.1 depends on your project, we can conclude that all versions of repro-uv-8148-b depend on
      your project.
      And because repro-uv-8148-a:dev depends on repro-uv-8148-b and your project depends on repro-uv-8148-a:dev, we can conclude that your project's requirements are
      unsatisfiable.

      hint: The package `repro-uv-8148-b` depends on the package `repro-uv-8148-a` but the name is shadowed by your project. Consider changing the name of the project.

I thought about and tried using dependency overrides, but it looks like it makes uv actually install the current project as a dependency, i.e. not as editable.
[tool.uv]
override-dependencies = ["mkdocstrings>=0"]

I also tried configuring a source for mkdocstrings (which, again, is the current project) like so:
[tool.uv.sources]
mkdocstrings = { workspace = true }

...and:
[tool.uv.sources]
mkdocstrings = { path = ".", editable = true }

...but it is still not installed as editable. The dependency override seems to take precedence.

Haha, I then tried this:
[tool.uv]
override-dependencies = ["mkdocstrings @ ."]

...which failed with this message:
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 88, column 25
     |
  88 | override-dependencies = ["mkdocstrings @ ./"]
     |                         ^^^^^^^^^^^^^^^^^^^^^
  relative path without a working directory: ./
  mkdocstrings @ ./
                 ^^

error: Failed to parse: `pyproject.toml`
  Caused by: TOML parse error at line 88, column 25
   |
88 | override-dependencies = ["mkdocstrings @ ./"]
   |                         ^^^^^^^^^^^^^^^^^^^^^
relative path without a working directory: ./
mkdocstrings @ ./

And then tried this:
[tool.uv]
override-dependencies = ["mkdocstrings @ ${PWD}"]

...which worked :tada: but looks so weird haha

Hmm, uv already supports this env var, although it's undocumented (or at least searching for it in the docs doesn't yield anything).
What I'm not sure to understand is that it seems to be equivalent to PWD: if I enter a subdirectory and run uv lock from there, it says "can't build because subdirectory is not a Python project". Passing --project .. or --project /abs/path/to/project doesn't change anything. Is this because I'm not using workspaces/monorepos and there PROJECT_ROOT defaults to the CWD somehow?

Hmm, uv already supports this env var, although it's undocumented (or at least searching for it in the docs doesn't yield anything).

I think we need to support that to build projects that use Hatch.

I guess what you're looking for here is for us to respect sources on top of overrides? I'm sort of surprised we don't, honestly.

override-dependencies works for me, I'm just looking for something more robust than ${PWD} when specifying the path :slightly_smiling_face: ${PROJECT_ROOT} is already great, even though I'm a bit confused by its behavior :smile:
If you think there's some room for improvement in the way uv handles overrides and sources, I'm happy to help any way I can! Just to be clear, I'm only using overrides now, not declaring any source.

I prefer declaring this:
[tool.uv]
override-dependencies = ["mkdocstrings @ ${PROJECT_ROOT}"]

Than this:
[tool.uv]
override-dependencies = ["mkdocstrings>=0"]

[tool.uv.sources]
mkdocstrings = { workspace = true }
# or mkdocstrings = { path = "${PROJECT_ROOT}", editable = true }

...because even if the result is the same, it feels like the latter will completely disregard any constraints incompatibilities in dependencies regarding mkdocstrings (>=0), while the former will only "force" installation of the current project, while still checking that dependencies have compatible constraints about mkdocstrings. I don't think it's the case though, and both options completely ignore constraints regarding mkdocstrings. Even then, the first option is more appealing, as it requires less things to declare.
(I hope it's fine that I commented so much on this issue! Not trying to get your attention, just documenting my journey and thought process :smile:)

Ah, one more issue, with such an override, the --no-editable option in uv sync has no effect anymore :confused:

@charliermarsh, wdyt about changing this interaction of sources and overrides?

Yeah that makes sense... It seems like sources should apply to overrides and constraints too?

In the latter two cases, did you have repro-uv-8148-a listed as a workspace member?

No I didn't, because I didn't think it made sense, since repro-uv-8148-a is the actual, main project. But if I add this anyway:
[tool.uv.workspace]
members = ["${PROJECT_ROOT}"]  # or members = ["."]

...I still get the "Package is not included as workspace package in tool.uv.workspace" error message.

Oh thanks. What do I need to do exactly to reproduce the latter two cases? Clone repro-uv-8148-a, then what?

So in this case, you're providing a source for the package itself? (Maybe I missed all the context above.)

Haha you probably missed the important bits in the wall of comments I have posted above 😄
So, let say I'm working on project a. It dev-depends on b. And b depends back on a. Resolution conflicts can therefore happen since uv checks that a, the project I'm in, builds to a version that is compatible with b constraints.
The issue here is that my version is dynamic, and based on Git tags (pdm-backend deals with this). When there are no tags (fork, CI), pdm-backend computes version 0.1.devblabla, which is incompatible with what b requires.
Hence why I'm trying to tell uv to ignore constraints on the current project. The only current way to do this, is to use the configuration above:
[project]
name = "a"
dynamic = ["version"]  # dynamic version...

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm]
version = {source = "scm"}  # ...based on Git tags, through pdm-backend

[tool.uv]
override-dependencies = ["a"]  # tell uv to ignore constraints...

[tool.uv.sources]
a = { workspace = true }  # ...while still installing from current folder, in editable mode

[dependency-groups]
dev = [
     "b>=0.1",  # b depend on a>=1.0
 ]

We could argue it isbetter solved within pdm-backend itself. It has a "fallback" mechanism, but only triggered when the folder is not a Git repository. In my case, it is a Git repository, but without tags, so it doesn't fallback. Also, the fallback version is static, so even if it worked and I fell back to v100, this could still be incompatible with what b requires. It would have to support a more dynamic fallback, for example running a Python callable that greps the current version in the changelog file. But even will all that, uv could still prevent me from resolving and working on a, because some dependency doesn't like the current version.
So in the end, when I'm working on a, I want to say "I know what I'm doing", and "just install the current project without checking its version".


TF etc really flaky TurtleBot Lite

Please provide the following information:

OS: Ubuntu 20.04
ROS Distro: Galactic
Built from installed:

I've set up the network as per https://turtlebot.github.io/turtlebot4-user-manual/setup/discovery_server.html [I don't want the Create3 connected to the network - that seems to make matters worse]
Starting any/all of:
ros2 launch turtlebot4_bringup lite.launch.py
ros2 launch rplidar_ros rplidar.launch.py
Running:
ros2 run tf2_tools view_frames
On either the RPi or the PC (I have set up the PC as per inx above) calling:
ros2 run tf2_tools view_frames
It intermittent - Sometimes the TF tree most of the time not.
I've run through:
https://turtlebot.github.io/turtlebot4-user-manual/overview/
And can't see anything I've missed.
Could you please advise where I can check next.
Thanks
Mark

@CycleMark Did you set namespace to your robot. If thats the case, then ros2 run tf2_tools view_frames will not show any trees. Try this node

@ipa-rar  - Thanks but that isn't the issue. The namespace is set correctly - plus this is only one robot which sometime does and then doesn't show TF - so intermittent

@CycleMark Are you stopping the turtlebot4 service before calling ros2 launch turtlebot4_bringup lite.launch.py? The service runs lite.launch.py in the background so you would be launching duplicate nodes.
You can check if the service is running with sudo systemctl status turtlebot4, and view the full logs with sudo journalctl -u turtlebot4 -r.

This issue is being closed due to inactivity. If you are still experiencing the issue, feel free to reopen this ticket when you are ready to continue the troubleshooting process.


r3 Exclusive dependency

When running against FHIR 3.0.2 definitions using '-d<EMAIL_ADDRESS>both r3 and the default r4 - v4.0.1 are loaded and used. This seems to cause failures related to differences between the r3 and r4 StructureDefinition.
I think the following (processing.ts:ln120-122 is responsible
 if (!dependencies.some(dep => /hl7\.fhir\.r(4|5|4b)\.core/.test(dep))) {
    dependencies.push('hl7.fhir.r4.core@4.0.1');
  }

Could this case be added for r3 please?

Hi @Republicof1.  Unfortunately, GoFSH and SUSHI support only FHIR R4 and above.  Some of the primary elements in StructureDefinition (e.g., type) are different between FHIR R3 and FHIR R4, and GoFSH is designed to work w/ the R4 (and above) representation.
We currently have no plans to support R3, but will take a note to make it more clear that only FHIR R4 and above are supported.  Sorry...

Ah okay, thanks for coming back to me with this!


Universities

I have added a new feature to the profile update where the user has the option to select their university from list of universities in the USA fetched from this  Universities API.

I have added an option for the user to remove their school and also added a logical or operator so that in the case  that school  option is null.


AtlasEngine: Improve RDP performance

tl;dr: If GetSystemMetrics(SM_REMOTESESSION) == TRUE, then render
everything with Direct2D, without shaders, etc.
For performance cache IDWriteTextLayouts in the atlas hashmap and
for correctness reuse all existing facilities as much as possible.
I suggest reviewing with whitespace change suppressed.
Rest: TBA.
Closes #13079
Validation Steps Performed

In testing at the moment...

Does this engine automatically enable/disable this mode when you RDP in? Do we need something special to enable that?

AKA: I don't want to compromise the experience for somebody who returns to their desk after being remote.

Does this engine automatically enable/disable this mode when you RDP in? Do we need something special to enable that?
AKA: I don't want to compromise the experience for somebody who returns to their desk after being remote.

This won't switch automatically. We'd have to run this test every time the display the application is on changes. Coincidentally I have an open task left to create the D3D device for the GPU the window is on instead of using the default/primary GPU. We can then add the check there and we'd get the automatic switching for free.
Until then I'd not overcomplicate this too much. PCs/workstations usually have GPUs and on those devices we should use the proper AtlasEngine no matter what.
In fact, now that I'm saying that, I'd like to propose an improved d2dMode check: We should simply test whether the D3D device is a WARP/Hyper-V adapter and then always use D2D. This would probably be a more robust check.

@msftbot make sure @winobjc-bot signs off

This is a stacked PR, so it can no longer be automerged.


Remake Middleware logic the right way

Instead of creating a specific Middleware instance on Controller move the "adding Middleware" logic on specific Route with the option to add multiple Middlewares.

Implemented in 1.1.0-aplha02 release. 🥳

Implemented in 1.1.0-aplha02 release. 🥳

Adding Middlewares in the App scope - no matter the route those Middlewares will always be called.
Prevent repeated use of Middleware for a group of Routes - add new group() on Router which will create RouteCollection of Routes where specifying Middleware on a group will cause assigning the Middleware to all its Routes.

Adding Middlewares in the App scope - no matter the route those Middlewares will always be called.
Prevent repeated use of Middleware for a group of Routes - add new group() on Router which will create RouteCollection of Routes where specifying Middleware on a group will cause assigning the Middleware to all its Routes.

Simplified image of current Middleware usage logic.


(QENG-3275) Add support for 32-bit puppet on 64-bit windows

This PR ensures ruby_arch defaults to the correct value based on the Windows OS architecture as the setting is required to run puppet, facter and pxp-agent acceptance on Windows hosts, and allows the caller to request 32-bit Puppet on 64-bit Windows, e.g. windows2012r2-6432a. Windows is unique in that there are three combinations, and we currently support all three:

32-bit Puppet on 32-bit Windows
32-bit Puppet on 64-bit Windows
64-bit Puppet on 64-bit Windows

Supercedes #9

Can one of the admins verify this patch?

@justinstoller comment from #9:

Cool, I mean the data is syntactically correct, as long as it's the correct data. I've been pinged on what looks like a re-evaluation of our Windows 32 bit testing matrices elsewhere, so I wanted to broach the subject.

I'm not sure I totally understand your question.. So we've always installed 64-bit Puppet on 64-bit Windows and 32-bit Puppet on 32-bit Windows. The addition of ruby_arch just reaffirms what beaker already does, and is required by acceptance tests that need to know which puppet arch is installed.
I didn't add the 32-bit Puppet on 64-bit Windows combinations for desktop platforms, because FOSS doesn't test them. I'm not sure PE does, but would be easy to add if they do.

That wasn't so much a question as an explanation as to why I asked the previous question:

Do we support 32bit Puppet on 64[bit] Desktop systems?

I had just seen discussions around: https://docs.google.com/document/d/1Ot6zW5aEX2P8s8JVppokXLOJ851c3do8XzwdCVHoSkQ/edit#heading=h.6yg2l174jlfe
That made me wonder if we were going to be reworking our test matrices. And if in reworking them possibly including 32 bit puppet on 64 bit desktop OSes. And if that was a possibility, then would we want to include the same 32bit on 64bit hostgenerator option strings for desktop OSes that we're including for server OSes in the PR?
I think if there's confusion around that though I'm happy to merge this PR for updating Windows Server OSes with the 32bit on 64bit values and if needed later on update the Windows Desktop OSes.

:+1:

That made me wonder if we were going to be reworking our test matrices. And if in reworking them possibly including 32 bit puppet on 64 bit desktop OSes. And if that was a possibility, then would we want to include the same 32bit on 64bit hostgenerator option strings for desktop OSes that we're including for server OSes in the PR?

I want to deprecate, stop testing, and eventually remove support for 32-bit puppet on 64-bit windows. We currently test 32-bit puppet on 2012r2 and 2008r2 (both 64-bit), and this PR handles those combinations, so that we can at least support what we currently test. That said, I don't want to expand the set of 32/64 combinations to desktop platforms, since the goal is the opposite.
When we eventually remove 32-bit puppet from 64-bit windows, we will need to select a replacement 32-bit windows, and our choices are either 2008 non-R2 or desktop. Of those, we only have windows 10 32-bit in the vmpooler, so we will likely adopt that, but that will be 32-bit puppet on 32-bit windows.


It is not recording when i create my own jar using the betamax source code

Hi,
I have created a sample project and tested it with betamax jar. It was recording the web request and response . But when i create a jar using the Betamax source code it was not recording the request . I was trying to analyze the flow of the betamax source . Please help.

I hope that you eventually got this working. Since we no longer support 1.x, I'm closing this. Please file another issue if you are still having problems with 2.x.

I hope that you eventually got this working. Since we no longer support 1.x, I'm closing this. Please file another issue if you are still having problems with 2.x.


PR#306 IOSXE/show cts ap sgt info {ap_name}

Description
Created parser for IOSXE/show cts ap sgt info {ap_name}
Motivation and Context
Able to parse unstructured output from show cts ap sgt info {ap_name} to structured data
Screenshots:

Checklist:

[x] I have updated the changelog.
[x] All new and existing tests passed.
[x] All new code passed compilation.

Cisco PR


CLI package configuration

To configure the phase2cli it turns out that it is necessary to manually copy the .env inside the dist/ before publishing the package or use it with npm link locally. As a result, this process is tedious and easy to forget. Therefore, better to convert the environment to a .json file that is automatically included in the dist/ during the build process.

Fixed in https://github.com/privacy-scaling-explorations/p0tion/pull/124


CGM - Missing Targetare link

ENVIRONMENT: production
URL: https://peviitor.ro
Browser: Chrome
Version: 120
Device: Laptop
OS: Windows 10
STEPS TO REPRODUCE:

Open the url
Hover over the company's logo.

EXPECTED RESULTS:
There is a 'Targetare' button (with link) just under the 'Careers' one.
ACTUAL RESULTS:
The 'Targetare' button is missing.
Attachments:

duplicate #420

Hi!
Even if issue #420 was closed as the company was not on Targetare, I found it there and the information matches the one from the company's Romanian official website. https://targetare.ro/36268684/cgm-software-ro-srl

The issue is still there:

Fixed

Retested ✅


Add SecZetta APIs to the top navbar

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

Superceded by #250 . Closing.


[examples] Minor fix in the comment

Hi,
This is really really a very small thing, does not influence behaviour at all. In models_loading_m3d.c the comment says
*     - Bender M3D exported: https://gitlab.com/bztsrc/model3d/-/tree/master/blender
-*       WARNING: Make sure to add "(action)" markers to the timeline if you want multiple animations.
*

This warning should be removed, because thanks to @TokyoSU and others, I've implemented bpy.data.actions in the Blender exporter. Using timeline markers is just a fallback option from now on, no more needed to have multiple animations in one model file. It's enough to use the standard Blender's actions, those are now handled properly.
Cheers,
bzt

@bztsrc Reviewed! :)


boards: arm: add support for NUCLEO-L011K4 board

Support for the NUCLEO-L011K4 development board with STM32L011K4 SoC.
Although the SoC only contains 16K flash and 2K RAM, it has been tested
on a number of samples and has worked as expected.
Signed-off-by: Steven Daglish<EMAIL_ADDRESS>new file:   boards/arm/nucleo_l011k4/CMakeLists.txt
new file:   boards/arm/nucleo_l011k4/Kconfig.board
new file:   boards/arm/nucleo_l011k4/Kconfig.defconfig
new file:   boards/arm/nucleo_l011k4/board.cmake
new file:   boards/arm/nucleo_l011k4/doc/img/nucleo_l011k4.jpg
new file:   boards/arm/nucleo_l011k4/doc/index.rst
new file:   boards/arm/nucleo_l011k4/nucleo_l011k4.dts
new file:   boards/arm/nucleo_l011k4/nucleo_l011k4.yaml
new file:   boards/arm/nucleo_l011k4/nucleo_l011k4_defconfig
new file:   boards/arm/nucleo_l011k4/pinmux.c
new file:   boards/arm/nucleo_l011k4/support/openocd.cfg

Thanks for this addition!
Some initial changes should be done on the PR to confirm with zephyr criterias:
* Please squash all commits into a single one (we don't use merge commits, all commits will be put on top of the branch, so we expect one 'clean' commit)

* In commit message, nothing should appear after the sign-off

Commits have now been squashed and lines after sign-off removed from commit.

@sdaglish I'm fine with current commit.
Though, I'm worried about the PR state vs CI.
Can you rebase on top of master and push once again?

Project rebased on top of master and pushed.


Support for the S2

Bike: Super73 S2 EU
Controller version: 410
Phone: iPhone 13
Operating System: iOS 16.1.2
App version: 0.0.17
When auto connecting to the bike on first launch the app goes into mode 4 and PAS 4 but these settings do not reflect the mode or PAS level on the bike (defaults to mode 1, PAS 0). If you modify the PAS on the app it does nothing, but on the bike it does. If you change
the mode on the app it does change but now only goes from 0 to 3.

That's interesting. The S2 must have a slightly different internal state than the RX, which is confusing the app. I wish I had access to an S2 to test. Although, I don't even know how the app would be able to differentiate between the two models without being told by the user.
If you're up for it, we could hop on a call next week and I could walk you through the steps to get the data I need to make this work. You'll need a way to get a Mac computer close enough to your bike for a Bluetooth connection to be established.

I might not be able to since I do not have access to a Apple Mac. I will have to see if I can figure something out and get access to MacOS.

Hi there!
Considering i ve an S2 too, i can offer my time to help.
Laptop : Macbook Pro M1
Phone : Google Pixel 7 Pro + Pixel Watch 😉

@blopker Hi, i mean, i can give support for the issue on the S2 using a MacBook Pro. In case you need some debug/test via BT :)

I also have access to iOS device as well as a MBP with xcode and developer tools if needed. I have a US S2

Thanks for all the support everyone! I'll post here what is needed, or at least how I got the information. Please let me know if you try and are unable to follow. I'll add more context as required.
I have a Mac with an Android phone (weird, I know!). However, this should work on any desktop OS. I think you may need an Android phone though. I don't know the process on iOS, yet.
First an overview of the process.
Essentially, the contractors who made the app left debug logs enabled on the official Android (and maybe iOS) app. So, we need to get the logs while running the official app. The idea is to connect your computer to your phone using adb, use your phone to connect to the bike using the official app, then fire off some commands and record what the app puts out. The critical info will look like HEX codes (0x487127), it's the raw data the app is sending to the bike. If I get those codes, annotated with what command you send at the time, I'll be able to reverse engineer what is needed.
Rough steps look like:

Download and install adb: https://developer.android.com/studio/command-line/adb
Connect phone to computer using adb, get the stream of system logs.
Connect phone to bike
Blast bike with a few commands from the app, recording what commands you send with what logs show up
Send me the logs :)

Again, there may be a similar process with iOS, but I'm not sure.

@blopker  do you have a specific command to log? I tried to log only for you package io.kbl.superduper but it's spitting out a lot of stuff :) it's correct ?
adb logcat | grep -F "adb shell ps | grep io.kbl.superduper  | tr -s [:space:] ' ' | cut -d' ' -f2"

Ah, sorry, the app to log is the official app, not SD. But yeah, it's going to be a bit verbose in any case. Filtering to the specific app package is the right call.

@blopker here it is 👍
s2log.txt
////// INSTRUCTIONS GIVEN AFTER CONNECTION
Mode selection 2
Lights on
Lights off
Mode selection 4
Mode selection 3
Mode selection 1

I also tested by having SuperDuper in the background with the auto lock on, and indeed i do see sideeffects on the bike, but with weird numbers (not range from 1 to 4) and not even mapped ( SuperDuper says mode 1 is basically equivalent to Super73 mode 2) .
Haven't got the possibility to try yet SuperDuper on the road but i ll give it a try tomorrow, to see if it set values correctly and inputs them once the bike is turned on/off .
Thanks for you help!

Just to confirm, did you only do the modes or did you mean PAS levels? the modes work on S2; it was the PAS levels that were broke. Anyways legend for doing this! thank you :)

Oh lord, sorry.. i totally forgot because i skipped my 78th coffee of the day.
Here's another one with PAS levels 💯
s2log_pas1-4.txt
Used the handle bar controller, moving from PAS 0 to 4 and viceversa. I hope you can see some stuff

Uploading again the log with PAS changed from 0 to 4 and viceversa from the handle bar.
s2log_pas1-4.txt

Awesome. Here's the relevant data:
0000155f-1212-efde-1523-785feabcd123:00D10004040000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10104040000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004040000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004050000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10104050000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004050000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004070000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004060000000000:WRITE
0000155f-1212-efde-1523-785feabcd123:00D10004040000000000:WRITE

The format is SERVICE:DATA:OPERATION. The entire state is sent over with each WRITE command. So, you can see mode changing in the 10th data column (5th byte), and the light (1 or 0) changing in the 6th (3rd byte).  The 04 at byte 4 is likely the assist level since that's what it is on the other models as well. Indeed, it looks like the S2 modes are 4-7 internally, where the R/RX is 0-3. This is why the app is causing weirdness on S2s. I should be able to get a test app out next week for people to try out :) Thanks @JacopoV!

The other part of this is how to either detect the S2 model, or at least how to let people select the model they have. As far as I can tell in the official app they have a database that maps bike serial numbers to model. We don't really have access to that. I don't know if there's a way for the bike to tell us that info directly.

does the bike broadcast data back to the app via bluetooth? Maybe an onboarding step could be to have the user toggle the headlight on/off and look for the byte that differs between S and R/RX?

@blopker thanks to you!
To reduce complexity, to see if it's working, for now it's probably best to leave the bike type selection up to the user, to pick from S2 or R or RX. 😁
Ping me please when you have a new release so I can give a try 🎉

It does. You can see in the logs were every data that starts with 0300 is the bike updating the app. The thing is that all the other data besides mode looks exactly the same. I'm not sure why assist would not be working, mode is? Unless were talking about different terms?

The app wasn't able to control my S2s headlight when I experimented with it yesterday, which is why I had mentioned that. I didn't try PAS or Mode since I am not updated and didn't want to have to open the official S73 app and risk being forced the update just yet.

@blopker hi!  But something it's really off.
Bike: Super73 S2 EU
Controller version: 410
Phone: Pixel 7 Pro
Operating System: Android 13
App version: 0.0.17
When i set in SuperDuper mode 1 (afaik equivalent of the mode 2 from Super73 app) for some reason so the throttle is active.
Even worse, even if the top speed seems capped to 35kmh (it seems a bit more of the 32kmh on Super73 app), the power output it's just insane. It seems like the full unlocked watts. A bit dangerous because caught me off guard.
Also if coming back in the official app, the mode seems set to be -2.
Any chance something is off like the PAS Internal codes? Can you please look into?
Many thanks 🙏

Hey everyone, wanted to update on this. I've fixed a few minor issues in the app, like changing the mode numbers from 0-3 to 1-4 and the Android version will now not kill the app when the screen is off. This change, however, is requiring me to do a bit of an architecture change, so it's taking a little longer than I'd hoped. This is next though!

Thank you 🙏 It’s really appreciated Regards,ChristopheOp 2 feb. 2023 om 19:53 heeft Bo Lopker @.***> het volgende geschreven:
Hey everyone, wanted to update on this. I've fixed a few minor issues in the app, like changing the mode numbers from 0-3 to 1-4 and the Android version will now not kill the app when the screen is off. This change, however, is requiring me to do a bit of an architecture change, so it's taking a little longer than I'd hoped. This is next though!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thanks a lot @blopker for looking into! Really appreciated !

I just heard another S2 owner doesn't have any issues with the app as it is. Is everyone here on the latest firmware update? Meaning the torque update, I think.

I am not, so that is a good point. I was holding off until I knew this app worked so I could avoid using their app.

@blopker are you referring to my message regarding having a lot of torque and the throttle being available?
Because I just did a new test. In mode 2 (latest app) throttle is available.

It seems following the US modes and not EU ones..

Ooooh, that's interesting. So maybe it's an EU vs US regulation thing and not a model support issue?

If you need me to test the EU version on iOS or android I can help, have
both. Bike is an RX.
Op vr 3 feb. 2023 om 19:55 schreef Bo Lopker @.***>

Ooooh, that's interesting. So maybe it's an EU vs US regulation thing and
not a model support issue?
—
Reply to this email directly, view it on GitHub
https://github.com/blopker/superduper/issues/6#issuecomment-1416270202,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A5RJGQXGLOJ4D2RWZPKW6NLWVVIANANCNFSM6AAAAAAUBUQTV4
.
You are receiving this because you commented.Message ID:
@.***>

@blopker it could be.. i have no clue to br honest 😅 but the throttle activation follows exactly the US ones.
Bike has been bought in EU, but all of them are produced in Cali.
Just another thing, maybe other S2 users can check (maybe it's nothing). In the vehicle tab of S73 app , where all Infos are (BT version , serial and such) my bike is identified as model as RX . Never been an issue tho, but i always wondered why not S2.

OK! It was a bit of work to make this happen since I had to rearchitect the app and actually think about the data models, instead of the spaghetti code I hacked together originally, but this is ready to test! The cool thing is the code is now cleaner, and I was able to also add the ability to rename the bike as well. All good.
Anyway, the beta for Android will be ready after Google approves it in a few days. I'll announce here when that happens. If all goes well I'll put that and the iOS version in production for everyone!
Full changelog here: https://github.com/blopker/superduper/releases/tag/v0.0.21%2B21

For Android, to enroll in the test tracks, use https://play.google.com/apps/testing/io.kbl.superduper in your web browser. Version 0.0.21 is the version with the EU support.

@blopker thanks a ton for all your hard work! Really appreciates 🙏
I haven't fully tested it yet because outside is snowing as hell but i run some tests from the beta version:

bike applies all PAS correctly and EU modes (eu model choosen) and they're marching perfectly and in real time the values in Official s23 app 💯
on the kickstand i tried to pedal a second to compare the Power output/torque compared to the Official app and now it seems matching the expected and correct behaviour ✅

I ll try to test it fully on the road as soon as i can, but so far everything seems perfect. Matching exactly the EU modes values automatically solved the engine Power output (vad mentioned few weeks ago, by having weird numbers on the Official app, the engine was going nuts).
I should be able to test soon when the throttle is available or not according to the EU modes, but i m pretty confident that all works now.
Again, thabsk a lot for your time and effort put into this app ❤

Fantastic. Thanks for testing, and providing the data! I've added some polish to the styles in 0.0.22, which I've just sent off for review. Should hit production in a few days! I'll also send off the iOS version as well.
I'll leave this open for a few days to make sure we're all good.

Aaaaaand the iOS version is live!

So far so good @blopker . On S2 EU throttle works only with mode 4 as expected and everything else appears working completely!
Thanks a lot again 🤠

Awesome, I'll close this out for now, but I'll see any additional comments if there are any issues!


Request: Add a footer comment in the generated output

Hi, when writing scripts to automatic update the gitignore.io generating part of .gitignore file, I need a ending footer line to remove the correct lines. Now, we have to assume the gitignore.io part must be appended at the tail of .gitignore.
So how about the template of the generated files looking like:
# Created by https://www.gitignore.io/api/blabla
xxx
# End of https://www.gitignore.io/api/blabla

I'll take a look at this on vacation - it should be straight forward.


Introducing the services object

I'm super excited to introduce the merged services object! ✨(The name needs work!)
Creating a merged services object
// src/services/index.js
import { makeMergedServices } from '@hammerframework/api'
import { Photon } from '@prisma/photon'

import * as posts from './posts'
import * as tags from './tags'

export const services = makeMergedServices({
    services: { posts, tags },
    context: {
        photon: new Photon(),
    },
    copyFromContextToArgs: ['currentUser'], // if this value is in the context it will be copied to the args.
})

// The `services` object now contains: services.posts.<serviceFunctions> and `services.tags.<serviceFunctions>`

A Service Function
You define you services as ordinary function exports in src/services.
// src/services/posts.js

// beforeAction | afterAction are run between service functions if they're exported in the same file:
export const afterAction = (args, { serviceName, services, context: { currentUser } }) => {
  if (serviceName === 'posts.deletePost') {
    services.logger.log(`post ${id} delete by ${currentUser.login}`)
  }
}

export const deletePost = ({ id }) => {
  return photon.posts.delete({
    where: { id: parseInt(id) },
  })
}

/* ... */

Once you've merged a service they're ready to be used as GraphQL resolvers, args and args.input (mutation input patten) are flattened and made to be the service functions first argument so that they feel natural to use when not being executed by GraphQL, the second argument is an object that contains context and some meta information:
{
    context: {
        services, // the merged services object
        // context values from initialising the services, and context values from graphQL.
    }
    info, // information about the GraphQL request that ran this object.
    serviceName, // this current services path: e.g.: posts.deletePost
}

Assigning services to GraphQL resolvers:
This step will go away once we automatically map resolvers to services.
// src/graphql/posts.sdl.js

import { services } from 'src/services'

export const schema = gql`...`

export const resolvers = {
  Query: {
    allPosts: services.posts.allPosts,
    findPostById: services.posts.findPostById,
    findPostBySlug: services.posts.findPostBySlug,
    findPostsByTag: services.posts.findPostsByTag,
    searchPosts: services.posts.searchPosts,
    postsCount: services.posts.postsCount,
  },
  Mutation: {
    createPost: services.posts.createPost,
    updatePost: services.posts.updatePost,
    hidePost: services.posts.hidePost,
    deletePost: services.posts.deletePost,
  },
}

AWESOME
Do you think there's way to even remove the explicit list of services: { posts, tags } from this call? I think we said we're going to get rid of these imports:
import * as tags from './tags'```

And now the only thing left that would make it so I don't have to touch this file at all is that little `{ posts, tags }` call...I'm just thinking that every time you create a new service it almost just magically works, except that you have to remember to come into this file and add it manually each time:

```export const services = makeMergedServices({
    services: { posts, tags },   // <-----
    context: {
        photon: new Photon(),
    },
    copyFromContextToArgs: ['currentUser'], // if this value is in the context it will be copied to the args.
})```

Could `makeMergedServices()` actually go to the `api/src/services` directory and get every file in there, populating this hash itself? So as soon as you create a new service it's available to be used?

PHP-style ™


update_metadata fails updating pyproject.toml if not present

The script fails because it seems to assume that pyproject.toml is present (which is not the case in a new repository):
Traceback (most recent call last):
  File "/home/ebertp/work/code/cubi/cubi-tools/cubi-tools/./update_metadata.py", line 263, in <module>
    main()
  File "/home/ebertp/work/code/cubi/cubi-tools/cubi-tools/./update_metadata.py", line 43, in main
    update_pyproject_toml(project_dir, ref_repo_wget)
  File "/home/ebertp/work/code/cubi/cubi-tools/cubi-tools/./update_metadata.py", line 203, in update_pyproject_toml
    version_old = toml.load(pathlib.Path(project_dir, f), _dict=dict)
  File "/home/ebertp/work/software/conda/lib/python3.9/site-packages/toml/decoder.py", line 133, in load
    with io.open(_getpath(f), encoding='utf-8') as ffile:
FileNotFoundError: [Errno 2] No such file or directory:

Revised script from Sven B works without pyproject.toml being present; however, if pyproject.toml is missing it only gets downloaded (and modified) if any other file was altered.
Fix that!

The pyproject.toml is treated differently than the other metadata files. First there is now a check if that file is present. If not, it"ll be added to the project dir from the desired branch/version tag without further modification. If the file is present, it probably contains project specific information that should not be altered: therefore, only the cubi.metadata.version entry is getting updated if the versions differ.


Update Debian based install for 2.0.0 apt module

include_src was removed and now defaults to false
key_server renamed to server as a parameter of key
key now requires the parameter id is using a hash

you have to adapt the spec tests, too.

Hi,
I'm not planning to only support the 2.0 apt module since older PE versions are possibly pinned down to older apt module versions.
I'll be pinning the module to use apt < 2.0

K. I'll just use my fork. Thanks for the reply!


add required db affinity to non-preemptible nodes

This prevents the mysql database to be scheduled on preemptible nodes.
It should help fixing the following :

the fact that <24h after a deployment, qa becomes unusable because the non-persistant DB gets deleted
preprod and prod should no longer have downtime (even short ones) when preemptible nodes get deleted. mariadb master will now be scheduled on a non-preemptible node. (see my PR in helm https://github.com/helm/charts/pull/7202 for further info)

@mikbry @lodelestra I'm merging this FYI


Code blocks: Make code blocks editable

Suggested by @knz: When a user clicks in a code block, we could turn it into an HTML text editor to allow users to customize the contents before copy/pasting.
https://github.com/cockroachdb/docs/issues/1070 and https://github.com/cockroachdb/docs/issues/1529 should come first.

@jseldess @knz following up on this as part of our redesign. is this a common pattern in other docs sites?

(I don't remember the context of this request, so my response will be vague.)
My response: I don't know what "common" means. Based on the phrasing of the issue, I suspect this came up to answer a pain point. We don't need a problem to be common to want to solve it.

We have closed this issue because it is more than 3 years
old. If this issue is still relevant, please add a comment and reopen
the issue. Thank you for your contribution to CockroachDB docs!


Chrome extension link doesn't work

Every time I try to use the link, I receive a 404. Did it get removed from the store?

The reason this is happening is that google took the extension down. They always do this to Ultratype.

Use the tampermonkey script.

Republished the extension on the webstore today, try again.

Can you make a mobile app for this?

no


Fix typescript definitions on component.

In order to use this with typescript, the props must be properly marked as optional where necessary.

Thank you for the contribution, I just published the updated package on npm


Remove universal-login, moved to identity repo

Who is this for?
Developers who want the code for a project to be in a unsurprising location.
What is it doing for them?
This change removes the code to deploy Auth0 universal login page customisation. The code and deployment scripts have moved into the identity repo alongside the rest of the Auth0 configuration.
See: https://github.com/wellcomecollection/identity/pull/170

Part of https://github.com/wellcomecollection/platform/issues/5261


feat: add CRC error monitoring to net_monitor

Description
add CRC error monitoring to net_monitor
Related links
https://github.com/autowarefoundation/autoware.universe/issues/1770
Tests performed
Preparation

Prepare a jig to short RxD+ and RxD- line on a network cable or connector.
Setup network as follows:

Verify net_monitor: Network CRC Error reports OK in normal operation.

Run Autoware.
Run rqt_runtime_monitor.ros2 run rqt_runtime_monitor rqt_runtime_monitor

Verify net_monitor: Network CRC Error reports OK.

Verify no warning and error messages in a normal run.

Verify network_crc_error is aggregated in resource_monitoring.

Run rqt_robot_monitor.ros2 run rqt_robot_monitor rqt_robot_monitor

Verify net_monitor: Network CRC Error reports Warning in abnormal operation.

Run iperf server on Autoware ECU.iperf -s -u

Run iperf client on the host machine.iperf -c <IP_ADDRESS> -u -b 30M -i 1 -t 300

Short RxD+ and RxD- and observe an error occurs by using ip command.watch -n 0.1 ip -s link show

Verify net_monitor: Network CRC Error reports Warning.

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[x] The PR follows the pull request guidelines.
[x] The PR has been properly tested.
[x] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@v-nakayama7440-esol @ito-san cc @kenji-miyake
I would like to write a little more description in the readme

what can errors be detected?
when can errors be detected?

@yukkysaito cc @ito-san @kenji-miyake
・what can errors be detected?
・when can errors be detected?

Added the above information to README.md.
71c55ca394d57f9c51de94841eacae95963a46eb

Verified in bus project with humble.

OK

Warning


30: replace assert(a === b) for assert.equal(a, b)

Fixes #30 by replacing instances of assert(a === b) for assert.equal(a, b). For those curious this was done with sed:
find . -name '*.js' -type f -print0 | xargs -0 sed -i '' 's/assert(\([^|&]*\) ===\([^|&]*\))/assert.equal(\1,\2)/g'

I've checked the number of tests ran was the same before and after the change and visually inspected all changes so we should be good.
Original issue:

Specifically, assert.equal should always be used with strings. Some string comparisons will fail triple-equality check. I've run into this in getting the tests to pass in the couch adapter.
From a UX perspective, the methods will produce more helpful and descriptive failure messages.

cc: @tjwebb, @devinivy

Love it.  This was needing to be done!

@devinivy, I've improved on this in PR #70, please check it out. Closing this one.

Files changed 69

I've just realised that PR #69 changed 69 files, brilliant! :laughing:


Make Arsenal available through pip

Enable pip Arsenal availability so 'pip install arsenal' (or some variant thereof) works.

This is technically in pypi/pip but still need to edit the documentation.

Also would like arsenal.conf to be installed to /etc/arsenal/ if it doesn't already exist.

Closing this as the arsenal.conf file being installed isn't strictly necessary. Currently in pip as 'arsenal-director' and there's documentation now on how to install from pip.


Peptides: package tests

Cover Peptides package with tests.

is this relevant?

Always is :)
However, I'll close this as won'tfix and will create separate tasks for testing individual pieces.


[ISSUE #7115] Fix the response message NPE

Which Issue(s) This PR Fixes

Fixes #7115
Brief Description
When a system exception occurs in gRPC, such as a NullPointerException (NPE), the Response returned to the client may have its message set to null, resulting in another NPE. In such cases, the client cannot receive the response.
How Did You Test This Change?

@dingshuangxi888 merge the latest development branch to pass ci

Codecov Report

Merging #7116 (46ae05b) into develop (04683ec) will increase coverage by 0.00%.
Report is 1 commits behind head on develop.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             develop    #7116   +/-   ##
==========================================
  Coverage      42.13%   42.14%
+ Complexity      9258     9257    -1
==========================================
  Files           1149     1149
  Lines          82000    82000
  Branches       10694    10695    +1
==========================================
+ Hits           34550    34558    +8
+ Misses         43100    43091    -9
- Partials        4350     4351    +1

Files Changed
Coverage Δ

...rocketmq/proxy/grpc/v2/common/ResponseBuilder.java
67.39% <100.00%> (-2.18%)
:arrow_down:

... and 16 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Add support for AES GCM

Java 8 also have support for GCM, which is preferred over CBC based AES encryption. Task is simply to implement this.

Although the IVSalt is generated with 16 bytes, which may affect the usage of the GCM algorithm negatively, it is left as it is for now. At a later point it can be cleaned up, and improved if required/requested.
Closing this issue for now.


EvilLimiter v1.6.0 wishlist

This is a wishlist for the upcoming EvilLimiter update to version 1.6.0.
I have received multiple feature requests, which I'll try to implement.
If you have a new feature in mind, feel free to post it on here!
Upcoming Features

Show limit in hosts table: Show details on the assigned bandwidth limit, instead of just Limited ✓
Improved monitor command: Be able to monitor every host in real-time, instead of just the hosts that are already limited ✓
scan speed/intensity customization: Be able to set a custom scan speed / intensity for quick or intensive scans ✓
Ability to access the history of commands with arrow keys

Perhaps to limit or block the internet speed for the ip address so that host is limited with the internet speed even they reconnect back ?

Awesome project! I have a few suggestions:

[ ] Ability to set both upload & download speeds independently
[ ] Emulation of packet loss, delay, corruption, etc... (Emulate/utilize tc-netem

@kopilim96
This feature is already available. It's called the watch command. How it works is explained in the README.md file.

@andrewprivate

Ability to set both upload & download speeds independently

EvilLimiter already has the separate upload/download  feature. Check out the README.md file.

Emulation of packet loss, delay, corruption, etc... (Emulate/utilize tc-netem)

Good idea! Unfortunately, I don't have the time to work on this, but I'll add it nonetheless. 👍

Good initiative!
For the next version, I'd like to see the following ability (maybe to be set as option in a config file? So could be opt-in instead of opt-out).
Automatically, when start EvilLimiter in the terminal, execute the commands scan and hosts.

@bitbrute

EvilLimiter already has the separate upload/download feature. Check out the README.md file.
Sorry for the ambiguity, I meant being able to set different rates for download and upload on the same device. Currently you can either set only download, only upload, or both.


[Microwin] Class Not Registered issue

Describe the bug
MicroWin does not remove features, packages, or appx.
To Reproduce
Steps to reproduce the behavior:

Go to MicroWin
Add Win11_23H2_English_x64v2.iso (official iso from microsoft)
Press start
Wait for error

Expected behavior
Proper removal of features, packages and appx (with no error messages)
Screenshots

I had the same errors when I tried. I am waiting a fix for this so I can reinstall windows on my laptop.

Addition: no problem on first Microwin launch (when adk installs)

getting the same error as well:
Remove Features from the image
Unable to get information about the features. MicroWin processing will continue, but features will not be processed
Error information: Class not registered

repo:ChrisTitusTech/winutil same exact error here


minikube profile devnation

This page forgets to tell the reader that the need to make the profile name "stick"
https://redhat-developer-demos.github.io/kubernetes-tutorial/kubernetes-tutorial/installation.html#start-minikube
using
minikube profile devnation
as subsequent examples refer to:
minikube ip
which needs to know the profile

@burrsutter  @lordofthejars  - the minikube profile will be removed soon and when we start minkube -p deviation start this will automatically set the current profile to deviation and we don't need extra minikube profile devnation


upgrade netty4 to the latest release and make it the default option for transporter

we should upgrade netty4 to the latest release and make it the default option for transporter

It look goods to me :-)

looks good!
I'd like to add flow control into netty4 transport

Fixed in the master branch with #2049, need to sync to 2.6.x.


Upgrade Twilio dependency to 7.x

This is a WIP pull request. We still need to figure out how to replace if there is a replacement for TwilioUtils#validateRequest.
The aforementioned method is used in https://github.com/TwilioDevEd/clicktocall-servlets/blob/master/src/main/java/com/twilio/clicktocall/servlet/Connect.java#L81-L101 and it is part of the core functionality of this tutorial.

Introduced in the latest release @acamino https://github.com/twilio/twilio-java/blob/next-gen/src/main/java/com/twilio/security/RequestValidator.java

Thanks @mcelicalderon!


Decrease default frequency of forced heartbeats to 5m

Ref https://github.com/kubernetes/enhancements/issues/589
KEP reflecting that: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/0009-node-heartbeat.md

/lgtm
/approve


[WIP] import await

This patch updates the explainer to be in terms of requiring modules
containing top-level await to be imported with import await. Spec
text not yet written.

Thanks to @sokra and everyone at the JSKongress 2019 Deep Track for developing this idea!

I like the general direction of this change, but I’m concerned about import await being viral. It’d be great if the only thing that makes a module async is adding TLA.

I would be opposed to the proposal moving forward with this change. By making callers need to know whether they are importing a module which awaits or not, this essentially makes the proposal sugar for the export default async function / await import() antipattern documented in the readme, and obviates its value.
To be clearer about why it's important for callers to be agnostic, one of the major use cases of top-level await is maintaining the module abstraction boundary while allowing the depended-upon module to add asynchronous initialization steps. @wycats has made this point in previous meetings.
Here is an example. Consider a module like so:
const template = `<p>Hello, my name is: <slot></slot></p>`;

customElements.define("name-tag", class extends HTMLElement {
  constructor() {
    super();
    this.attachShadow({ mode: 'open' }).innerHTML = template;
  }
});

which is then imported via
import "./name-tag.mjs";

Then the designer gets their hands on things. "This template is too simple!", they say. They beef it up, with a <style> element, a few wrapper divs, maybe some extra flair. The developer decides it'd be best if the designer worked on that in a separate file, name-tag-template.html. They refactor their code to pull in the template from that file, like so:
const template = await (await fetch(new URL("./name-tag-template.html", import.meta.url))).text();

customElements.define("name-tag", class extends HTMLElement {
  constructor() {
    super();
    this.attachShadow({ mode: 'open' }).innerHTML = template;
  }
});

The point of top-level await is that this is not a breaking change for the consumer of name-tag.mjs. Just like you are able to refactor one module into multiple modules, with top-level await, you can refactor from one module into multiple files, or in general multiple async initialization steps.
With the proposal in the OP, this refactoring becomes a breaking change, for the consumers of name-tag.mjs (recursively, throughout the entire graph).
One way to mitigate this would be if everyone everywhere preemptively replaced all import statements with await import statements. You could see this becoming an ESLint rule, perhaps even a recommended one. It's certainly one we'd enforce on any web projects. But that breaks when cross boundaries between code bases; a package author needs to make a breaking change and broadcast to their users, "any code that imports this package needs to switch their codebase from import to await import." And this of course then propagates, so any indirect dependents also need to update. Etc.
Introducing this kind of dynamic into top-level await makes the proposal unusable for me as a package author, and for the cases we are interested in in the web component ecosystem in general.

@ljharb I'm not sure what you mean. What do you think should happen if you import a module which has a TLA? Are you suggesting semantics like #49?

@domenic Yes, this does add friction to the upgrade path; that's the idea of this change. There was an exact opposite concern that it would be unfortunate if a deep dependency became async, now all dependent modules are async. Seems like we just have to make a decision one way or the other on whether this transparent upgrade is desirable or not.

@domenic @ljharb that's the idea of this change: using top-level await should be a breaking change for the module consumer. I think this is desired since async operations can take a significant amount of time. If anyone in the module graph was able to defer the application startup, it might become hard for application authors to find the cause for long startup times.
Another advantage of this change is that it would not change the way how module evaluation is currently specified. Introducing TLA to the specification would be a non-breaking change.
@domenic regarding your example: native HTML modules would make the module graph synchronous again.

Slowly, gradually, and with much pain, we will either switch the entire JavaScript ecosystem to using await import instead of import, or we will declare that package authors which use top-level await are using a "bad part" of JS, and their packages should not be depended upon, and the feature dies out (except maybe at the top app-level).

I think, this is a valid concern (and it's probably what @ljharb meant with TLA becoming viral). But it's also very speculative and hard to predict. If common things like HTML and CSS can be imported synchronously, I don't think that this pattern will become too popular. It might be a different story with Web Assembly modules though since synchronous compilation is discouraged by some engine implementers. If WASM modules become popular in the JS ecosystem, import await might become the de-facto standard for importing things in JavaScript.
However, I still like that the application developer is in control to decide whether to import await or to await import things. The explicit import await makes it clear which part of the module graph might take more time to initialize.

@jhnns i have no issue with adding TLA being a breaking change; my issue is with adding import await being one.

@jhnns HTML modules will be async, not sync.

@domenic Good to know that Wasm modules aren't the only one. I can see how it's not so nice that you have to update all the imports to import await if you want to introduce a Wasm or HTML module in your dependency graph.
Do you have any references with more information about HTML modules being async? Maybe we could point to them from the presentation and the explainer here so people can learn more context.

The intention of import await was not to rewrite major parts of the imports to inport await. Instead it should only used when needed, and the chain should be broken by using import() and non-top-level awaiting it.
This viral behavior is intentional and will make developers aware bad practices.
For web applications you should avoid that your application/entry point becomes an async module, even when other async modules like WASM are used. When your application becomes an async module this probably means the user will see a white screen until all async modules are resolved (i. e. until WASM is compiled). Instead viral import await makes this problem visible and it can be "solved" by breaking the chain with import() and adding spinners or whatever. I agree that there are also some use cases where it might be fine that the entry point becomes an async modules (i. e. Node.js), but for most things it's not good.

As presented in the March 2019 TC39 meeting, the champion group does not plan to take this approach, so closing the PR.


How to add map to root of JSON?

origin := {"a":"a"}
new, err := sjson.Set(origin, "", map[string]any{
	"b": "b",
})

Expect:  {"a":"a","b":"b"}
but give me an error path cannot be empty
What is the correct way to write it?

@AuroraTea you may take a look at #69, it is the same use case.

@natenho Thanks!!!


.humanize() leads to wrong result with datetime.date

I'm using arrow 0.15.2.
>>> import datetime, arrow
>>> yesterday = datetime.datetime.now()-datetime.timedelta(1)
>>> yesterday_date = yesterday.date()
>>> arrow.get(yesterday_date).humanize()
'2 days ago'

As far as I know yesterday was 1 day ago haha. Is this the expected behavior?

Hmm at first I thought that this may be related to the changes in 0.15.0 to add the week granularity (https://github.com/crsmithdev/arrow/pull/642/files), but it seems that this issue is present in 0.14.7 as well. @systemcatch any ideas? I can investigate this further after my exams.

>>> yesterday = datetime.datetime.now()-datetime.timedelta(1)
>>> yesterday
datetime.datetime(2019, 11, 7, 17, 17, 43, 979355)
>>> yesterday_date = yesterday.date()
>>> yesterday_date
datetime.date(2019, 11, 7)
>>> arrow.get(yesterday_date).humanize()
'2 days ago'
>>> arrow.get(yesterday).humanize()
'a day ago'

So it works correctly with the datetime object but not with the date. Further investigation needed.

Hmm it means we have to tweak some parameters to get a good middle ground. Will require a bit more investigation.

Can I look into this? @jadchaar

Yes for sure @andrewchouman! Go for it and feel free to ask us any questions.

Hello @jadchaar I am working with @andrewchouman on this issue. I noticed that the thresholds/parameters for deciding whether a timestamp is one day or multiple days ago is not exact. In other words, two timestamps can only be one day apart if they are within 22 - 36 hours of each other. However, it is very possible for two timestamps to be within 1 hour or even 47 hours of each other and still be one day apart. This can be fixed by checking the "day" attribute of the datetime objects throughout the function. If you are ok with this solution, I can go ahead and work on it.

@skrakowi that is most likely because below 22 hours, we use "hour ago" granularity as follows:
venv ❯ python3
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import arrow
>>> earlier = arrow.utcnow().shift(hours=-20)
>>> earlier.humanize()
'20 hours ago'
>>> earlier = arrow.utcnow().shift(hours=-21)
>>> earlier.humanize()
'21 hours ago'
>>> earlier = arrow.utcnow().shift(hours=-22)
>>> earlier.humanize()
'a day ago'

Also, for the UTC question, it seems that the other object is being adjusted to the tzinfo (timezone info) of the Arrow instance that humanize is being called on: https://github.com/crsmithdev/arrow/blob/master/arrow/arrow.py#L892. Is this the portion of the code that you were referencing?

@jadchaar yes this is what I was referring to. After running and testing the code, it appears that line 892 does not change the utc current time to the local time. It takes the value of the utc current time (for example 19:02) and the local time zone becomes the property of the dt variable. This means that (assuming you are in the Eastern time zone) the difference between the dt and self._datetime will be 5 hours more than the difference in time between the self._datetime and the true current time. If my explanation does not make sense, please let me know and I can elaborate.
Also, the reason that the example above does not work is because when a datetime object has only a date defined (no time defined), the default time is set to 00:00:00. This datetime is being compared to the current date and current time. If it is late enough in the day, the difference between these two datetimes is greater than 129,600 so the program classifies the input as '2 days ago' (see line 936 to see the code I am talking about).
My suggestion for this fix involves 2 steps:

Correct the dt variable so that it gets the current time of the local time zone
As detailed above, check the date of the datetime objects (if the two differences are within 47 hours of each other) to see which day it corresponds to (either 'a day ago' or '2 days ago').

Please let me know how this sounds. I will start working on this fix now!


bins/opt/grpclb_end2end_test --gtest_filter=SingleBalancerWithClientLoadReportingTest.Drop times out

Reproduction: $ ./tools/run_tests/run_tests.py -l c++ -c opt -r 'SingleBalancerWithClientLoadReportingTest.Drop' -n inf -S -a 20
After about 2-3 minutes, all processes will have deadlocked. A gdb session shows them waiting on line 288, load_report_cond_.wait(). ~The problem is due to the corresponding .notify_one() being fired before the wait happens. The way the condition variable is used needs to be re-designed to avoid this issue.~
Actually, consider the following two logs:
First, a successful run:
I0802 12:45:48.210195255   62911 grpclb_end2end_test.cc:455] starting backend server on port 12210
I0802 12:45:48.210428147   62915 server_builder.cc:269]      Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2, CQ timeout (msec): 10000
I0802 12:45:48.211870123   62911 grpclb_end2end_test.cc:460] backend server startup complete
I0802 12:45:48.221648605   62911 grpclb_end2end_test.cc:455] starting backend server on port 24781
I0802 12:45:48.248003734   62918 server_builder.cc:269]      Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2, CQ timeout (msec): 10000
I0802 12:45:48.249343463   62911 grpclb_end2end_test.cc:460] backend server startup complete
I0802 12:45:48.272466196   62911 grpclb_end2end_test.cc:455] starting backend server on port 6011
I0802 12:45:48.278080456   62921 server_builder.cc:269]      Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2, CQ timeout (msec): 10000
I0802 12:45:48.279362057   62911 grpclb_end2end_test.cc:460] backend server startup complete
I0802 12:45:48.301506202   62911 grpclb_end2end_test.cc:455] starting backend server on port 21845
I0802 12:45:48.309362526   62924 server_builder.cc:269]      Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2, CQ timeout (msec): 10000
I0802 12:45:48.310630065   62911 grpclb_end2end_test.cc:460] backend server startup complete
I0802 12:45:48.332495312   62911 grpclb_end2end_test.cc:455] starting balancer server on port 26015
I0802 12:45:48.338582479   62928 server_builder.cc:269]      Synchronous server. Num CQs: 1, Min pollers: 1, Max Pollers: 2, CQ timeout (msec): 10000
I0802 12:45:48.343925088   62911 grpclb_end2end_test.cc:460] balancer server startup complete
I0802 12:45:48.357199386   62929 grpclb_end2end_test.cc:189] LB[0x21e2a40]: BalanceLoad
I0802 12:45:48.357418443   62929 grpclb_end2end_test.cc:193] LB[0x21e2a40]: recv msg 'initial_request {
  name: "servername_not_used"
}
'
I0802 12:45:48.357483814   62929 grpclb_end2end_test.cc:303] LB[0x21e2a40]: sleeping for 0 ms...
I0802 12:45:48.357522112   62929 grpclb_end2end_test.cc:309] LB[0x21e2a40]: Woke up! Sending response 'server_list {
  servers {
    load_balance_token: "load_balancing"
    drop: true
  }
  servers {
    load_balance_token: "rate_limiting"
    drop: true
  }
  servers {
    load_balance_token: "rate_limiting"
    drop: true
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 12210
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 24781
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 6011
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 21845
  }
}
'
I0802 12:45:48.357679004   62911 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:12210'. The empty token will be used instead
I0802 12:45:48.357691405   62911 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:24781'. The empty token will be used instead
I0802 12:45:48.357698414   62911 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:6011'. The empty token will be used instead
I0802 12:45:48.357704642   62911 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:21845'. The empty token will be used instead
WAIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIT
I0802 12:45:50.360716640   62929 grpclb_end2end_test.cc:228] LB[0x21e2a40]: recv client load report msg: 'client_stats {
  timestamp {
    seconds:<PHONE_NUMBER>
    nanos: 360591618
  }
  num_calls_started: 21
  num_calls_finished: 21
  num_calls_finished_known_received: 12
  calls_finished_with_drop {
    load_balance_token: "load_balancing"
    num_calls: 3
  }
  calls_finished_with_drop {
    load_balance_token: "rate_limiting"
    num_calls: 6
  }
}
'
NOTIFYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
I0802 12:45:50.360762232   62929 grpclb_end2end_test.cc:250] LB[0x21e2a40]: done
I0802 12:45:50.360922147   62911 grpclb_end2end_test.cc:142] Backend: shut down
I0802 12:45:50.360932524   62911 grpclb_end2end_test.cc:479] backend about to shutdown
I0802 12:45:50.361221611   62911 grpclb_end2end_test.cc:482] backend shutdown completed
I0802 12:45:50.361231031   62911 grpclb_end2end_test.cc:142] Backend: shut down
I0802 12:45:50.361236251   62911 grpclb_end2end_test.cc:479] backend about to shutdown
I0802 12:45:50.361458299   62911 grpclb_end2end_test.cc:482] backend shutdown completed
I0802 12:45:50.361466926   62911 grpclb_end2end_test.cc:142] Backend: shut down
I0802 12:45:50.361471830   62911 grpclb_end2end_test.cc:479] backend about to shutdown
I0802 12:45:50.361698316   62911 grpclb_end2end_test.cc:482] backend shutdown completed
I0802 12:45:50.361707120   62911 grpclb_end2end_test.cc:142] Backend: shut down
I0802 12:45:50.361712235   62911 grpclb_end2end_test.cc:479] backend about to shutdown
I0802 12:45:50.361934275   62911 grpclb_end2end_test.cc:482] backend shutdown completed
I0802 12:45:50.361943319   62911 grpclb_end2end_test.cc:265] LB[0x21e2a40]: shut down
I0802 12:45:50.361948344   62911 grpclb_end2end_test.cc:479] balancer about to shutdown
I0802 12:45:50.362175927   62911 grpclb_end2end_test.cc:482] balancer shutdown completed
[       OK ] SingleBalancerWithClientLoadReportingTest.Drop (2180 ms)

Now, a failing (deadlocking) one:
I0802 12:45:50.638313218   62991 grpclb_end2end_test.cc:189] LB[0x24c5880]: BalanceLoad
I0802 12:45:50.638596019   62991 grpclb_end2end_test.cc:193] LB[0x24c5880]: recv msg 'initial_request {
  name: "servername_not_used"
}
'
I0802 12:45:50.638901669   62991 grpclb_end2end_test.cc:303] LB[0x24c5880]: sleeping for 0 ms...
I0802 12:45:50.638999486   62991 grpclb_end2end_test.cc:309] LB[0x24c5880]: Woke up! Sending response 'server_list {
  servers {
    load_balance_token: "load_balancing"
    drop: true
  }
  servers {
    load_balance_token: "rate_limiting"
    drop: true
  }
  servers {
    load_balance_token: "rate_limiting"
    drop: true
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 2754
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 8352
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 30388
  }
  servers {
    ip_address: "\177\000\000\001"
    port: 28394
  }
}
'
I0802 12:45:50.640704684   62974 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:2754'. The empty token will be used instead
I0802 12:45:50.640722901   62974 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:8352'. The empty token will be used instead
I0802 12:45:50.640731730   62974 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:30388'. The empty token will be used instead
I0802 12:45:50.640740148   62974 grpclb.c:521]               Missing LB token for backend address 'ipv4:<IP_ADDRESS>:28394'. The empty token will be used instead
WAIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIT

The test never gets into the if (client_load_reporting_interval_seconds_ > 0)  branch that performs the notify.

Actually, I may have found what the issue is... removing assignment for now.

Ok, the whole way we use condition variables in this test is FUBAR: condvars can't be used on their own, they don't hold state, and a notify() before a wait() will be lost. I'm assigning myself to fix this.

Seen a similar issue here: (bins/opt/grpclb_end2end_test --gtest_filter=SingleBalancerTest.RepeatedServerlist GRPC_POLL_STRATEGY=epoll1)
https://sponge.corp.google.com/target?id=60931d36-d654-428e-8ad1-19e3eed87605&target=github/grpc/c%2B%2B_linux_opt_native&searchFor=&show=FAILED&sortBy=STATUS


[CSL-610] Add test for VssCertificate rollback

@ChShersh I merged master to trigger CI. If you're not waiting for someone else's review, can you merge and close both this and the CSL-843 PR?

@rockbmb Merged


Replay is possible in digest notification

https://github.com/http-auth/http-auth/blob/0896bab1aae03d04d9df859575e485fb1a952c5d/src/auth/digest.js#L159
If a client specifies large nonceCount then this request can be replayed (nonceCount - serverNonce[2]) times. This line should be changed to
serverNonce[2] = nc

Moreover request counter should be hexadecimal.

@dukei thanks for PR and issue, will merge it tonight.

published with 3.2.4 version.


Generic ethernet packet filtering based on link (MAC) address

Is your feature request related to a problem? Please describe.
The problem is to have a generic way to filter (or pass to another interface) packets with a special MAC address (for example link-local as https://elixir.bootlin.com/linux/v5.6-rc7/source/include/linux/etherdevice.h#L66).
Up till now all the filtering tasks are executed in ethernet_recv() (https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/net/l2/ethernet/ethernet.c#L170) function.
However, there the filtering is based on the packet type (like it is already done for GPTP or LLDP).
Moreover, when the packet address is not equal to the one for the interface it is dropped (as https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/net/l2/ethernet/ethernet.c#L260)
Describe the solution you'd like
I would like to ask about possible solutions to have a "callback" which would in user program
compare the MAC with allowed ones and possibly pass it to other interface (like eth0 to eth1).
Describe alternatives you've considered
It seems like possible approaches could be used:

Mimic the LLDP code (samples/net/lldp) - but this seems to be one-off and not flexible as this particular example handles the whole packet processing.

Use the "Socket NET_MGMT library" - https://github.com/zephyrproject-rtos/zephyr/blob/master/include/net/socket_net_mgmt.h - similar to Linux netlink - on the ethernet port, which receives the packet (for example eth0) to setup the mac address for which we want to take the action.
Then add special NET_EVENT to https://github.com/zephyrproject-rtos/zephyr/blob/master/include/net/ethernet_mgmt.h , which would call registered callback for each packet with the matching MAC address.
This option seems like an overkill.

Provide a __weak function call to ethernet_recv(), which would be override by user application
defined function.

Additional context
Comments/ideas are more than welcome

From these the 2. option sounds most generic. User would be able to set some MAC address filters in the system. And then when we have a "match", we would call a user specified callback which could determine what should happen to the packet. @lmajewski is this what you are proposing?
@tbursztyka what do you think?

@jukkar - in my use case (DSA switch):

Set the MAC (L2) address for network interface (net_if) - the NET_MGMT library looks like a good mechanism (place) for it.
Then in ethernet_recv() I could trigger proper callback (registered in user's program) for NET_EVENT (NET_FILTER_MAC_ADDR?)

Then are two possible options:
2.1 In the user program's defined callback I would "redirect" this packet to DSA slave network interfaces (net_if lan1..3) and pass it further to the ethernet stack.
Then, the user program would use standard socket API (with SOCK_RAW) to get this "redirected" packet and work on it (in which case the the L2 header shall also be provided).
or
2.2 In the NET_EVENT callback, called when MAC address matches, the user program would handle the packet entirely.
I would prefer approach from point 2.1 as it allows using standard socket API. If not - the approach from 2.2 could be used as a backup plan.
The question is if SOCK_RAW sockets in Zephyr supports such use case ?

The DSA support is already merged so it looks like we can close this.


Missing VersionID for versioned buckets in API

Regarding the API docs, https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.get_object_tagging get_object_tagging method (as well as some others get_object related methods) should return VersionId in response.
The current implementation of moto does not return this value which makes it incompatible with real API for this use case.
This PR makes a small change by adding x-amz-version-id header to the response in case version exists.

Codecov Report

Merging #4796 (a172ed7) into master (7d5ac89) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4796      +/-   ##
==========================================
- Coverage   95.09%   95.08%   -0.01%
==========================================
  Files         586      586
  Lines       61960    61962       +2
==========================================
  Hits        58919    58919
- Misses       3041     3043       +2

Flag
Coverage Δ

servertests
36.23% <100.00%> (-0.01%)
:arrow_down:

unittests
95.02% <100.00%> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

moto/__init__.py
98.43% <100.00%> (ø)

moto/s3/responses.py
95.54% <100.00%> (+<0.01%)
:arrow_up:

moto/iam/models.py
95.09% <0.00%> (-0.13%)
:arrow_down:

Continue to review full report at Codecov.

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


About locale issues

I found that this issue seems to be related to the locale. I tested with LANG set to es_AR.UTF-8, ru_RU.UTF-8, jp_JP.UTF-8, and zh_CN.UTF-8, but it seems that the plugin only works when the language is English.

reproduce steps, please.

sudo vim /etc/locale.gen
# Uncomment the entry in the locale.gen file that is not for the 'en' language
sudo vim /etc/locale.conf
#add the language which you uncommit LANG= xxxxxx
reboot
# then you'll find the plugin will can't run

sudo vim /etc/locale.gen
# Uncomment the entry in the locale.gen file that is not for the 'en' language
sudo locale-gen

sudo vim /etc/locale.conf
#add the language which you uncommit LANG= xxxxxx
reboot
# then you'll find the plugin will can't run


Add FormPropsContext to pass form props to nested children components

Changes: (Refactoring with no behaviour/UI change)

Add FormPropsContext.
Component which has a Form can pass the props to the context.
Form components (which may be nested multiple levels deep) can get the props from the context.
Intermediate components don't need to bother with passing on the props.

Have not looked thoroughly but just wanted to bring this point up!
How is this different from the one that comes together with react-hook-form https://react-hook-form.com/api/#useFormContext?

Yep, I saw that, too. I was considering to use this as well. But some of the props to be passed on are custom data like fields and validations which are not from react-hook-form.


"404 page not found" whatever I try to access

First of all, many thanks for sharing your project!
I would like to use rdpgw with local authentication. I already own a valid LetsEncrypt certificate, so I put together this configuration:
(I just replaced my external FQDN in this snippet, the keys are the ones I actually use, but no worries, I will exchange them as soon as I got this running)
Server:
 Authentication:
  - local
 AuthSocket: /tmp/rdpgw-auth.sock
 Tls: auto
 CertFile: /home/sven/myexternalfqdn.pem
 KeyFile: /home/sven/myexternalfqdn.pem
 GatewayAddress: myexternalfqdn
 Port: 1443
 Hosts:
  - windows-vm.lan:3389
 HostSelection: roundrobin
 SessionKey: amgRRTziC8iDB5L1LgsheFsREUyRVsjS
 SessionEncryptionKey: xQxWCFNNpyopnj6a8Fdn0fir21ps2IRD
 SessionStore: cookie
OpenId:
 ProviderUrl: http://keycloak/auth/realms/test
 ClientId: rdpgw
 ClientSecret: your-secret
Kerberos:
 Keytab: /etc/keytabs/rdpgw.keytab
 Krb5conf: /etc/krb5.conf
Caps:
 SmartCardAuth: false
 TokenAuth: false
 IdleTimeout: 10
 EnablePrinter: true
 EnablePort: true
 EnablePnp: true
 EnableDrive: true
 EnableClipboard: true
Client:
  UsernameTemplate: "{{ username }}\x1f{{ token }}"
  NetworkAutoDetect: 0
  BandwidthAutoDetect: 1
  ConnectionType: 6
  SplitUserDomain: false
Security:
  PAATokenSigningKey: PH2aVB2Rdu1ed2obu30KRTJFAcR3c0VC
  PAATokenEncryptionKey: 5pwGjt2wf3yGs6M4D0TzyFwW48LSz7Y8
  UserTokenEncryptionKey: MKoXaLdeCJ4458QE51yLGDjfSARhvpPq
  EnableUserToken: false
  VerifyClientIp: true

Then I fired up rdpgw-auth with root rights and rdpgw with my local user (sven). rdpgw-auth says:
2022/11/22 10:30:29 Starting auth server on /tmp/rdpgw-auth.sock
rdpgw says:
2022/11/22 10:31:01 Cookies are used as session storage
2022/11/22 10:31:01 Starting remote desktop gateway server
2022/11/22 10:31:01 enabling basic authentication

However, as soon as I point my browser to https://myexternalfqdn:1443/connect , I only see
404 page not found
I am not asked for credentials (no basic authentication)
Accessing https://myexternalfqdn:1443/tokeninfo shows
access_token missing in request
which is fine and tells me that rdpgw is running.
I am using Debian Bullseye (11.5) on amd64. rpdgw compiled using go from official Debian Bullseye backports.
Any hints why I'm not asked for a username/password or what I could do to debug? I already did an
strace -f -eopen ./rdpgw
to see whether it can't open needed files, but this does not reveal anything to me.
Many thanks!
Sven

I face the same problem, but still have no solution

O haha, well because in the case of local-auth you do not any special settings you can just directly point your Renote Desktop client at the the gateway. Obviously you need to set the connection to use the gateway, but that's handled inside the client. So there is no need to point your browser to https://xxx/connect :-)

Many thanks for the help, @bolkedebruin !
I tried to access rdpgw using xfreerdp, but xfreerdp insists on rdpgw not supporting HTTP transport. :cry:
xfreerdp /gt:auto /sec:tls /g:myexternalfqdn:1443 /gu:sven /gp:unixpassword /u:sven /p:windowspassword /cert:ignore /v:win-vm.lan /log-level:info
[16:57:06:839] [326550:326551] [INFO][com.freerdp.core.gateway.rdg] - RD Gateway does not support HTTP transport.
[16:57:06:943] [326550:326551] [WARN][com.winpr.sspi] - InitializeSecurityContextA status SEC_E_INVALID_TOKEN [0x80090308]
[16:57:06:944] [326550:326551] [WARN][com.winpr.sspi] - InitializeSecurityContextA status SEC_E_INVALID_TOKEN [0x80090308]
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.rpc] - error! Status Code: 404
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.http] - HTTP/1.1 404 Not Found
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.http] - Content-Type: text/plain; charset=utf-8
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.http] - X-Content-Type-Options: nosniff
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.http] - Date: Mon, 28 Nov 2022 15:57:06 GMT
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.http] - Content-Length: 19
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.gateway.tsg] - tsg_check failure
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.nego] - Protocol Security Negotiation Failure
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core] - rdp_client_connect:freerdp_set_last_error_ex ERRCONNECT_SECURITY_NEGO_CONNECT_FAILED [0x0002000C]
[16:57:06:945] [326550:326551] [ERROR][com.freerdp.core.connection] - Error: protocol security negotiation or connection failure

I know that i don't need to go to /connect but what is unclear to me is how to setup users

If you use local auth, you must setup users within your underlying Linux system. At least that's how I unstood it.

So now I at least can auth can auth but it still fails. With following message (this is all one try on the mobile app):  For testing i created a user with this command.
And used the config from @sven3 in this issue with the only change beeing the address, cert path and allowed hosts.

Update another client and i get:

With a short peak at the desktop

I got new results with the official RDP client on Android, but it still fails with this message
2022/12/01 21:18:26 User abc authenticated
2022/12/01 21:18:26 Client handshakeRequest from <ipv6>
2022/12/01 21:18:26 major: 1, minor: 0, version: 0, ext auth: 0
2022/12/01 21:18:26 Tunnel create
2022/12/01 21:18:26 Tunnel auth
2022/12/01 21:18:26 Channel create
2022/12/01 21:18:26 Verifying xrdp:3389 host connection
2022/12/01 21:18:26 Checking host for user abc
2022/12/01 21:18:26 Establishing connection to RDP server: xrdp:3389
2022/12/01 21:18:26 Connection established
2022/12/01 21:18:26 Cannot read message from stream 0xcb6cf0
2022/12/01 21:18:35 Identity SessionId: a6551b86-1625-4c10-a524-da73e15ba7ae, UserName: : Authenticated: false
2022/12/01 21:18:35 Identity SessionId: 14e7d7c1-c40f-4703-b053-0a89b6e0fb65, UserName: : Authenticated: false
2022/12/01 21:18:35 Identity SessionId: 27b81b7d-0fc6-42fc-b598-94c6e3cb2d2e, UserName: : Authenticated: false
2022/12/01 21:18:36 User: abc authenticated
2022/12/01 21:18:36 User abc authenticated
2022/12/01 21:18:36 Cannot read message from stream 0xcb6cf0

Does it work on a different client for you @Archef2000 ?

On other clients i also can't get a picture but also no logs of a connection try in rdpgw

I run this
useradd -c "abc" -m abc
echo "abc:abc" | chpasswd

cat <<EOT > rdpgw.yaml
Server:
 Authentication:
  - local
 AuthSocket: /tmp/rdpgw-auth.sock
 Tls: auto
 CertFile: /opt/rdpgw/server.pem
 KeyFile: /opt/rdpgw/key.pem
 GatewayAddress: rdp.haygis.duckdns.org
 Port: 9443
 Hosts:
  - xrdp:3389
 HostSelection: roundrobin
 SessionKey: amgRRTziC8iDB5L1LgsheFsREUyRVsjS
 SessionEncryptionKey: xQxWCFNNpyopnj6a8Fdn0fir21ps2IRD
 SessionStore: cookie
Caps:
 SmartCardAuth: false
 TokenAuth: false
 IdleTimeout: 10000
 EnablePrinter: true
 EnablePort: true
 EnablePnp: true
 EnableDrive: true
 EnableClipboard: true
Client:
  UsernameTemplate: "{{ username }}\x1f{{ token }}"
  NetworkAutoDetect: 0
  BandwidthAutoDetect: 1
  ConnectionType: 6
  SplitUserDomain: false
Security:
  PAATokenSigningKey: PH2aVB2Rdu1ed2obu30KRTJFAcR3c0VC
  PAATokenEncryptionKey: 5pwGjt2wf3yGs6M4D0TzyFwW48LSz7Y8
  UserTokenEncryptionKey: MKoXaLdeCJ4458QE51yLGDjfSARhvpPq
  EnableUserToken: false
  VerifyClientIp: true
EOT

exec ./rdpgw-auth &
exec ./rdpgw

inside archef2000/rdpgw but it is privileged and has sleep 999d as command and i then exec inside the container

Cloud you may share a full example of a local setup of rdpgw

@sven3 Have you found a way to use the local option I am still failing.

@archef2000 unfortunately not, the problem still persists for me.

basic / local /kerberos do not use the connect endpoint. Use the terminal client directly to connect.


where is the source for libsnappyjava.jnilib

It's hpp, cpp files in https://github.com/xerial/snappy-java/tree/master/src/main/java/org/xerial/snappy

And also javah generates some of the header files.


Pushing to uninitialized repository on partition mounted with "noexec" silently fails

Gitea version (or commit ref): f0efb615
Git version: 2.12.0
Operating system: Arch Linux x86_64
Database (use [x]):

[x] PostgreSQL 9.6.1
[ ] MySQL
[ ] SQLite

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

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

Description
When the Git repositories handled by a Gitea instance happen to reside on a partition which is mounted with noexec set and a repository is not initialized upon creation from the Web-UI ("Initialize this repository with selected files and template" unchecked), the usual git push -u to populate the repository silently fails. That is, everything is fine according to the command line, but the repository remains empty in Gitea's Web-UI.
The problem is not that straight-forward to understand as the Gitea logs do not provide any hint.
To reproduce install current Gitea from scratch making sure the Git repositories in terms of [repository] - ROOT of app.ini are on a partition which is mounted with noexec set, have an arbitrary user create an uninitialized repository from within Gitea and have him populate that repository by running git push -u from CLI as usual.
Optionally repeat these steps after remounting the partition with exec set.

Is the log level set to Trace?

Yes. Still there are only messages like
2017/03/12 23:09:20 [D] Session ID: a1831[...]
2017/03/12 23:09:20 [D] CSRF Token: ksKAq[...]
2017/03/12 23:09:20 [D] Bare repository: /<user>/<repo>
2017/03/12 23:09:20 [D] Template: repo/bare

in gitea.log while no error messages can be seen in the rather verbose xorm.log.

Can you strace gitea and post the output?
strace gitea web

I ran strace but I fear it is of no use either. All entries are dealing with launch and shutdown only, all parts in between including pushing to the repository are missing completely.
As a side-effect the problem does not exist when Gitea is run as root (sudo strace -o /usr/share/gitea/log/strace.log /usr/share/gitea/gitea web), while it could be seen when it was run as the regular Git user via strace (sudo -u git strace -t -o /usr/share/gitea/log/strace.log /usr/share/gitea/gitea web) as well.
Current tests performed with 8746fb33.

Hi,
I'm experiencing the same issue with Gitea 1.1.1 running in Docker on AArch64. I wanted to add that pulling from such a repository is fine, the code is just not displayed in the web UI as if the repo was empty.

The git-hooks required to update the DB can't be executed (noexec...) hence they fail. One possible solution would be to just have the hooks as symlinks to a gitea-directory. And have a pre-flight check when creating the repo that we can infact execute stuff in there.

So, how do we work around this in the meantime ? Where is the directory containing those hooks we'd need to move to a different partition ?

@Ulrar you can not use partition with noexec partition to store git repositories

You very much can, it works fine. The only issue is that hook, which should be solved by moving it to a different partition with exec enabled and symlinking it to it's old location. That's what I do with payment binaries for websites, and it works fine, no reason it wouldn't with git

@Ulrar git (independently of gitea) does not support storing hooks outside of repository folder and are stored in .git/hooks directory

https://git-scm.com/docs/githooks#_description

By default the hooks directory is $GIT_DIR/hooks, but that can be changed via the core.hooksPath configuration variable

This would have to inject []string{"-c", "core.hooksPath=/path/to/gitea/lib/hooks/"} :thinking:
https://github.com/go-gitea/gitea/blob/7a30208e05d202062f8ca74c2637273d8bc23a77/cmd/serv.go#L305-L311

Was this fixed? If not, it should be. This is a valid bug and some security standards/guidelines could require user data being on a noexec mount.
(I have wasted many an hour on trying to debug why some software doesn't work, finally figuring out that it's (silently) failing on a noexec mount. If you don't want to support it, at least give the user an actionable error message.)

Not that I'm aware of, unfortunately. We just change the flag in the SQLite
manually after the first push, as far as I can tell everything works fine
on a noexec partition except that very specific thing.
On Fri, Jun 14, 2019, 12:32 Les De Ridder<EMAIL_ADDRESS>wrote:

Was this fixed? If not, it should be. This is a valid bug and some
security standards/guidelines could require user data being on a noexec
mount.
(I have wasted many an hour on trying to debug why some software doesn't
work, finally figuring out that it's (silently) failing on a noexec
mount. If you don't want to support it, at least give the user an
actionable error message.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/go-gitea/gitea/issues/1231?email_source=notifications&email_token=AAGVHT3PQCPOOH6AZP5SXRLP2N6TRA5CNFSM4DDKYJM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXWQXEA#issuecomment-502074256,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGVHTZQG5QODKQIDHWELRTP2N6TRANCNFSM4DDKYJMQ
.

Hmm... so I have an idea for how to go about ameliorating this.
I think setting https://git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath in the gitea user .gitconfig would allow you to change the location of the git hooks for all repos.
You'd lose per repository git hooks but you should be able to set this up correctly so that gitea hooks can be run.
I think through clever use of this you could actually workaround the noexec problem entirely.
Now we could add a gitea workaround based on this - but it may be quite complex and I would have to think about how to make it work.

If this is a deployment problem, I think we can close this.

@techknowlogick Was this fixed?

It's not a bug, we need to be able to execute git hooks.

It's not a bug but an option to specify a different path for hooks would be
a nice fix imho
On Wed 9 Dec 2020, 03:05 techknowlogick<EMAIL_ADDRESS>wrote:

It's not a bug, we need to be able to execute git hooks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/go-gitea/gitea/issues/1231#issuecomment-741495859,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGVHTZPUFKMONLM6CA62NTST3SP5ANCNFSM4DDKYJMQ
.

Undoubtedly something could be done using the config value core.hookspath https://git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath and by making gitea hook pre-receive & gitea hook post-receive execute any hooks directly in pre-receive.d/ post-receive.d/  folders. (gitea hook update could be included here but I think we should stop providing this expensive and poorly implemented hook.) There may yet be potential difficulties with such an approach but I think it should be possible.
I would however say this is not a high priority - even though if implemented correctly it could be a considered a security improvement as the security benefits would be somewhat minor.
If you are desperate for this functionality and cannot provide a PR, you could either provide a bounty for the feature, or try contacting one of the maintainers - myself included - on discord directly asking one of us to implement it as a paid feature. I will likely get round to trying the approach listed above at some point but I'm quite busy on other things at present.