Implementing multi-step exercises?

Today my Kata group discussed solutions for Queen Attack. We all thought it would be interesting to have some follow-up exercises. The idea is that the student would build-on and modify their code from the earlier exercises to solve later exercises.
One possible set of exercises could be:

Can 2 queens attack each other? (this is the standard set of queen attack tests)
Can 2 knights attack each other?
Given a board with a queen and knight, who can attack whom?
Given a board with 2 queens and 2 knights, who can attack whom?

Each exercise would introduce a new wrinkle into the existing code. Moving from Exercise 1 to 2 would get students thinking about different piece types, what behavior they have in common and what behavior they do not.
2 -> 3 Would introduce the ideas of non-reciprocal attacks. If queen A can attack queen B, then the reverse is true. Same for knights. But if a queen can attack a knight, then the reverse is false.
3 -> 4 Is a big leap. You have to introduce a board concept, because you have to start thinking about other pieces being in your way. Yes, that queen might be diagonal from your queen, but there's a knight in your path. Etc.
And so on. You can take this pretty far, obviously.

I love this idea. Would you mind posting it in https://github.com/exercism/discussions? I think that this would take some exploration before we can write up an actionable issue.


Check Documentation Tables

Check the tables in a document

TLDR; All tables should be in the format of GHFM using | and - as horizontal and vertical separators respectively

Check all tables are in the correct format. Please don't use leading and trailing | - more information on github flavoured markdown tables can be found here.

Fix on pull request #14 .


Debian dependencies

Provide environment information
OS:
Linux REDACTED 5.10.0-9-686-pae #1 SMP Debian 5.10.70-1 (2021-09-30) i686 GNU/Linux

SHELL:
GNU bash, version 5.1.4(1)-release (i686-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BASH VERSION:
5.1.4(1)-release

ASDF VERSION:
v0.13.1-0586b37

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/REDACTED/.asdf
ASDF_DIR=/home/REDACTED/.asdf
ASDF_CONFIG_FILE=/home/REDACTED/.asdfrc

ASDF INSTALLED PLUGINS:
python                       https://github.com/danhper/asdf-python.git master 5e277e2

To Reproduce
asdf install python 3.11.5
Describe the Bug
Installing Python-3.11.5...

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/REDACTED/.asdf/installs/python/3.11.5/lib/python3.11/bz2.py", line 17, in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/REDACTED/.asdf/installs/python/3.11.5/lib/python3.11/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'
WARNING: The Python curses extension was not compiled. Missing the ncurses lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/REDACTED/.asdf/installs/python/3.11.5/lib/python3.11/ctypes/__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
WARNING: The Python ctypes extension was not compiled. Missing the libffi lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'readline'
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/REDACTED/.asdf/installs/python/3.11.5/lib/python3.11/ssl.py", line 100, in <module>
    import _ssl             # if we can't import it, let the error propagate
    ^^^^^^^^^^^
ModuleNotFoundError: No module named '_ssl'
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems

BUILD FAILED (Debian 11 using python-build 2.3.27-5-gf7f09650)

Expected Behaviour
Installed Python-3.11.5 to /home/REDACTED/.asdf/installs/python/3.11.5
I had to perform sudo apt-get install libssl-dev libffi-dev libbz2-dev libncurses-dev libreadline-dev libsqlite3-dev liblzma-dev in order to fix this issue. These system dependencies should be listed in the README.

Now they are.


Rename action in gts file causes the default of a default export to also get renamed.

For example,
given this export:
export default State as unknown as HelperLike<{ Args: {}, Return: State}>;

And this import
import state from 'limber/helpers/state';

if I do a "rename" on state on the import to State it changes the default to State, making my export line be export State State.
This is in a .gts file with this .glintrc.yml config:
environment:
  - ember-loose
  - ember-template-imports
include:
  - 'app/**'

That's super strange—we're not doing any work on renames ourselves, just translating what tsserver says. TypeScript's AST representation of default exports is weird, though, so I wonder if we're reading the offset wrong 🤔

Actually, I just confirmed in a Stackblitz sandbox that this happens with vanilla TS as well, so I'm going to close this out as an upstream issue.


Runtime error: invalid memory address or nil pointer dereference

The following error occurs when executing several simultaneous requests:

19 Jun 2023 22:05:39,909 [INFO] (rapid) ReserveFailed: AlreadyReserved
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x68c30f]
goroutine 131 [running]:
go.amzn.com/lambda/rapidcore.(*Server).Invoke.func2()
/LambdaRuntimeLocal/lambda/rapidcore/server.go:653 +0xef
created by go.amzn.com/lambda/rapidcore.(*Server).Invoke
/LambdaRuntimeLocal/lambda/rapidcore/server.go:636 +0x23d

Docker image: public.ecr.aws/lambda/python:3.8

Hey @tcmbilozub
I ran into this same issue and it turned out to be an incorrect path to the python executable that was passed to the runtime interface emulator. Posting here to hopefully help others.

Starting mock Lambda runtime:
16 Aug 2023 16:42:49,811 [INFO] (rapid) exec '/usr/bin/python' (cwd=/, handler=awslambdaric)
16 Aug 2023 16:42:51,574 [INFO] (rapid) extensionsDisabledByLayer(/opt/disable-extensions-jwigqn8j) -> stat /opt/disable-extensions-jwigqn8j: no such file or directory
16 Aug 2023 16:42:51,574 [INFO] (rapid) Configuring and starting Operator Domain
16 Aug 2023 16:42:51,574 [INFO] (rapid) Starting runtime domain
16 Aug 2023 16:42:51,574 [WARNING] (rapid) Cannot list external agents error=open /opt/extensions: no such file or directory
16 Aug 2023 16:42:51,574 [INFO] (rapid) Starting runtime without AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN , Expected?: false
START RequestId: e4769e06-19d6-45c7-969f-a310d8769df9 Version: $LATEST
16 Aug 2023 16:42:51,574 [WARNING] (rapid) First fatal error stored in appctx: Runtime.InvalidEntrypoint
******************************************************************************************************************************************
16 Aug 2023 16:42:51,574 [ERROR] (rapid) Init failed InvokeID= error=fork/exec /usr/bin/python: no such file or directory
******************************************************************************************************************************************

16 Aug 2023 16:42:51,574 [INFO] (rapid) Starting runtime domain
16 Aug 2023 16:42:51,574 [WARNING] (rapid) Cannot list external agents error=open /opt/extensions: no such file or directory
16 Aug 2023 16:42:51,575 [INFO] (rapid) Starting runtime without AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN , Expected?: false
16 Aug 2023 16:42:51,575 [WARNING] (rapid) Omitting fatal error Runtime.InvalidEntrypoint: Runtime.InvalidEntrypoint already stored
START RequestId: 9098b9f6-2ec1-4574-976c-c1f708284870 Version: $LATEST
16 Aug 2023 16:42:55,910 [INFO] (rapid) ReserveFailed: AlreadyReserved
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x699b8f]

goroutine 51 [running]:
go.amzn.com/lambda/rapidcore.(*Server).Invoke.func2()
        /LambdaRuntimeLocal/lambda/rapidcore/server.go:653 +0xef
created by go.amzn.com/lambda/rapidcore.(*Server).Invoke
        /LambdaRuntimeLocal/lambda/rapidcore/server.go:636 +0x23d

Temporarily solved this problem by downgrading to a lower version.
RUN curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.10/aws-lambda-rie \   && chmod +x /usr/local/bin/aws-lambda-rie

Having same issue with simultaneous requests under python 3.8
(rapid) ReserveFailed: AlreadyReserved
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x699b8f]
goroutine 45 [running]:
go.amzn.com/lambda/rapidcore.(*Server).Invoke.func2()
     /LambdaRuntimeLocal/lambda/rapidcore/server.go:653 +0xef
 created by go.amzn.com/lambda/rapidcore.(*Server).Invoke
     /LambdaRuntimeLocal/lambda/rapidcore/server.go:636 +0x23d

I too am hitting this when making simultaneous requests. Is there any workaround other than downgrading to an old version?

The offending code is here
https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/develop/lambda/rapidcore/server.go#L661-L666
It checks if Reserve() fails and logs message but then continues on as if nothing was wrong while reserveResp is nil causing this segfault immediatly when trying to access reserveResp.Token

The permanent link for this code section is: https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/d37e08c13600eae4deb1329603f01a78363f360e/lambda/rapidcore/server.go#L661-L666. I looked at this code, and I'm not sure as to what a good fix might be. One possibility would be to pull the s.Reserve() call out of the go func into the main Invoke() body, which would make the s.Reserve() call synchronous, allowing us to return from Invoke() with an error. This appears to be roughly what the previous version of Invoke() did, but it seems undoing that would contravene the intent behind moving the s.Reserve() call into an asynchronous goroutine.
AWS, can someone please comment on what your plans are for addressing this regression?

Any updates on this? Makes testing locally impossible for some use cases.

Temporarily solved this problem by downgrading to a lower version.
RUN curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.10/aws-lambda-rie \ && chmod +x /usr/local/bin/aws-lambda-rie

Thank you, @tcmbilozub , for this workaround.   With the earlier version you identified at least the first request made can complete (tested with python 3.11).
Given its effect on concurrency and the popularity of lambda, I'm surprised this regression hasn't garnered more attention by now.  Someone once said "speed matters in business."  AWS lambda team, please consider prioritizing this for your customers.

As alluded to above, downgrading isn't really a solution, since it'll still error '[INFO] (rapid) ReserveFailed: AlreadyReserved', it just won't panic on it.
The issue seems to be that Reserve tries to update the single context, on the single Server, and so it just inherently can't serve multiple concurrent invocations:
https://github.com/aws/aws-lambda-runtime-interface-emulator/blob/71388dd788b7a5519262391ce73fe6548dbaf86e/lambda/rapidcore/server.go#L159-L199
but I'm not that familiar with Go, nevermind this project, and I don't know the solution.
Are you able to comment @valerena?

I believe I have a fix/workaround (?) in #133.

The situation here is that for requests running in the Lambda service in the cloud, there will never be concurrent requests, because Lambda manages concurrent requests in different sandboxes/environments that don't interact with each other (therefore different instances of the Lambda Runtime API). This emulator package is a close representation of what's actually executed in the real Lambda hosts, and that's why the concurrent use case is not supported here either.
About the proposed fix, it's modifying behavior that is coming from that internal functionality, and we try to not have deviations on that side.
We will analyze it a bit more, to see if we can come up with a solution that works well for the local invocations, but without affecting the actual execution in the real Lambda environments.

@valerena, I think it would be very much acceptable for the RIE to not concurrently handle requests (however that would manifest), although that would certainly be nice to have. The most important feature would be for the RIE to not crash.


Redisson indefinitely try to reconnect on old sentinel instance

We using redisson for our tomcat session cache in Kubernetes cluster. We have setup a sentinel cluster with 3 redis instance.
We have some issue when one of our redis pod changes. This can happen when maintaining a node. In this case the redis pod is recreated on another node but with a new IP.
For connect to sentinel we use a statefulset headless service.
Expected behavior
Redisson reconnect to the new redis node and stop communicating with the old pod
Actual behavior
Redisson reconnect to the new redis node BUT continue to try reconnect on old node indefinitely.
Steps to reproduce or test case

Setup redis sentinel cluster in Kubernetes (with statefulset). Our pod have 2 container, one for redis (port 6379), and one for is sentinel (port 26379).
Start tomcat pod with redisson config for session.
kubectl delete pod <redis slave pod>

Redis version
6.0.12
Redisson version
3.15.3
Redisson configuration
sentinelServersConfig:
  password: ${REDIS_PASSWORD}
  subscriptionConnectionMinimumIdleSize: 1
  subscriptionConnectionPoolSize: 10
  slaveConnectionMinimumIdleSize: 2
  slaveConnectionPoolSize: 10
  masterConnectionMinimumIdleSize: 5
  masterConnectionPoolSize: 10
  idleConnectionTimeout: 5000
  pingConnectionInterval: 0
  dnsMonitoringInterval: 5000
  checkSentinelsList: true
  clientName: ${HOSTNAME}
  sentinelAddresses:
  - "redis://redis-${ENV}-rds01-0.redis-${ENV}-rds01-headless.infra.svc.cluster.local:26379"
  - "redis://redis-${ENV}-rds01-1.redis-${ENV}-rds01-headless.infra.svc.cluster.local:26379"
  - "redis://redis-${ENV}-rds01-2.redis-${ENV}-rds01-headless.infra.svc.cluster.local:26379"
  masterName: "redisk8s"

can you share logs for org.redisson package at debug logging level?

Starting state :
kubectl get po -n infra -l app=redis -o wide
NAME                 READY   STATUS    RESTARTS   AGE     IP              NODE              NOMINATED NODE   READINESS GATES
redis-qual-rds01-0   3/3     Running   0          3h10m   <IP_ADDRESS>   heber-q-i-doc08   <none>           <none>
redis-qual-rds01-1   3/3     Running   0          3m19s   <IP_ADDRESS>    heber-q-i-doc04   <none>           <none>
redis-qual-rds01-2   3/3     Running   0          3h9m    <IP_ADDRESS>    heber-q-i-doc03   <none>           <none>

kubectl -n infra exec -it redis-qual-rds01-0 -- bash
redis-cli -a $REDIS_PASSWORD -p 26379 sentinel get-master-addr-by-name redisk8s
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
1) "<IP_ADDRESS>"
2) "6379"

Pod redis-qual-rds01-0  is master
Executing : kubectl -n infra delete po redis-qual-rds01-1  (at 13:42:22)
kubectl get po -n infra -l app=redis -o wide
NAME                 READY   STATUS    RESTARTS   AGE     IP              NODE              NOMINATED NODE   READINESS GATES
redis-qual-rds01-0   3/3     Running   0          3h12m   <IP_ADDRESS>   heber-q-i-doc08   <none>           <none>
redis-qual-rds01-1   3/3     Running   0          26s     <IP_ADDRESS>   heber-q-i-doc04   <none>           <none>
redis-qual-rds01-2   3/3     Running   0          3h11m   <IP_ADDRESS>    heber-q-i-doc03   <none>           <none>

kubectl -n infra exec -it redis-qual-rds01-1 -- bash
redis-cli -a $REDIS_PASSWORD -p 26379 sentinel get-master-addr-by-name redisk8s
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
1) "<IP_ADDRESS>"
2) "6379"

Pod redis-qual-rds01-0  is master
glpoc-red-qual.log

out /opt/tomcat/conf/context.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>

    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.                                   -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
    <!-- Utilisation de Redisson pour les sessions
         https://github.com/redisson/redisson/tree/master/redisson-tomcat
         ajouter -Dsession.store=org.redisson.tomcat.RedissonSessionManager
         et -Dfr.senat.appcode=codexa   à CATALINA_OPTS pour activer -->
    <Manager className="${session.store:-org.apache.catalina.session.StandardManager}"
             pathname=""
             configPath="${catalina.base}/conf/redisson.conf"
             readMode="MEMORY" updateMode="DEFAULT"
             broadcastSessionEvents="false"
             keyPrefix="${fr.senat.appcode:-notset}" />
</Context>

Redisson continue reconnecting to sentinel server, since other alive sentinels didn't report that it's in down state. It's recommended to uses at least 3 Sentinels per setup.

We already have 3 sentinels servers and each of them no longer lists the old ip

Fixed! Thanks for report

We have the same problem for our data cache in Kubernetes cluster. We have setup a data sharding cluster with 6 redis instance, the redis cluster containes 3 masters and 3 slaves. Redisson still try reconnect on old node ip after redis pod changed.
Redis version:5.0.6
Redisson version:3.15.6
Redisson client config:ClusterServersConfig

@b2k4j
Can you share redisson logs in TRACE logging level?

We work on the intranet and can't copy files to the Internet。

Our redis cluster:

Redisson still try reconnect on old node ip after redis pod changed

I need TRACE logs since the moment of redis pod change.

It's difficult to reproduce the problem. Now, this happens only when the entire redis cluster goes down and returns to normal again. And I collected some  TRACE  level logs.
redisson.log


Add flake

Currently there is neither need for nor any benefit in adding a flake so i'll close this.

Hello, please forgive me for being so forward, but would you mind expanding on why you don't think a flake would be useful?

You can just add this repo with flake = false and add that to your overlays in the consuming project.

You can just add this repo with flake = false

Sure, I did it. Thanks.
https://github.com/GTrunSec/CyberChef-nix-flake/blob/81d6133baa6c1ba091ace6613cba441aeeb4d830/flake.nix#L11

Why do you think there is no benefit in being able to just write this
overlays = [
  npmlock2nix.overlay
];

as opposed to having to write this
overlays = [
  (final: prev: { npmlock2nix = import npmlock2nix { pkgs = prev; }; })
];

every time?

Another 👍 here for first-class Flake support, please!

I promise that once the Flakes RFC is accepted and it isn't experimental anymore that it will happen. Until then: I don't want to fight breakage.

Again I am looking for flake support as well.

Perhaps now that Nix 2.5 is released can we consider Flakes as stable enough? :pray:

I'll not add flakes to the repo as the CLI still is still changing every now and then. I try to support what we have in this repo as good as I can. Adding flakes adds yet another code path that we have to test and support. Also adds yet another pinning of nixpkgs.
Whenever I try flakes locally it seems like a good idea but it simply isn't mature enough. Once it is stabelized with the proper RFC process it'll be supported.


修复中文首页不加粗的问题“

https://www.zhihu.com/question/58456658/answer/157120688

https://www.zhihu.com/question/58456658/answer/157120688

fix #1


Reduce/eliminate redundant docstrings.

I've noticed some duplicate docstrings while working on streamparse. This issue is to audit duplication then reduce/eliminate it. For example. BatchingBolt repeats several docstrings of Bolt.

This issue was moved to pystorm/pystorm#3


CB-11020. Metering heartbeat versioning is broken.

See detailed description in the commit message.
it only uses version 1 or 2, not any newer one, version 3 is already used from 2020 dec 16, that means newer images uses the older metering streams instead of the new ones

LGTM! 🚢 should be granted by CB team.

the change is straightforward as that is copied from fluent/settings.sls or telemetry/settings.sls, so merging this


How to differentiate between chat and file source type in Questions and Answering project (Azure AI)?

In the documentation there are only file and url types.
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-sources?view=rest-cognitiveservices-questionanswering-2021-10-01&tabs=HTTP#sourcekind

@harunB10
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.


Port fdcan HAL module to use PAC directly instead of fdcan crate.

Don't use fdcan crate dep anymore, instead some files have been forked from fdcan crate
Provide separate FDCAN capable and Classic CAN API's
Provide embedded-can traits.

@Dirbaio, Apologies for another cursed big PR.
When you get a chance, perhaps do a quick scan of the patch first to let me know if the overall approach is OK.
The files in fd/message_ram/ are almost exactly copies from the fdcan crate, it may be only rustfmt changes and not much more. config.rs and filter.rs are also not much different from fdcan crate.
Most of my effort went into peripheral.rs and fdcan.rs. peripheral.rs contains stuff taken from fdcan crate with the register access changed to use 'our' PAC.
Note, that in message_ram, there is a lot of register access that does NOT use our 'PAC'. Firstly, I don't think we even have those defined for G4. And also, as I understand it, for H5/H7 they are configurable. This HAL implementation just sets H5/H7 up to match what G4 does. We could make it more flexible but that would be a whole lot more work.
My eventual goal is to make an option to have read/write done by the interrupt handler(s). I got this working as a POC already but it needed more direct access to parts of what went into peripheral.rs so I kind of had to half do this PAC conversion anyway.
This leads me to the biggest API change. There is now 2 variants of read/write with the extras being read_fd and write_fd. Strictly these are not necessary, it just means an extra 56 bytes in the frame structs. However:

I estimate, most users will use classic CAN, so most users would pay this penalty for nothing.
My primary personal motivation leads back to my desire to add buffer(channel) backed IRQ mode, in that case the extra data size is a big factor. Users can have 5* the buffer length(frames) for the same number of bytes.
Also, a nice follow up step would be to use the same Frame structs for embassy's bxcan implementation. bxcan certinally does not need to waste the extra data, especially as many of these older chips are quite ram constrained (STM32F042 for example).

Thanks for getting this kicked off, would be awesome to remove the fdcan dep.
FYI, I added message RAM register defs and message RAM addresses to the PAC, but it's not well tested. https://github.com/embassy-rs/stm32-data/pull/308
Should in theory work with G0, G4, L5, H5 and U5.

Thanks Torin... I thought about investigating getting the PAC updated for the message RAM registers. It was the H7 that held me off, as you say with the flexibility. Thinking about how to deal with that. I'm sure we can figure out a way to make it work...

I'd recommend having a trait in the HAL which has methods for getting the different regions. For non-H7 the impl uses the PAC. For H7 the impl takes a configuration struct which defines the regions. The same config struct can be used to set up the regions in driver init. The user could then even set up regions themselves, possibly

maybe an alternative is: always treat the FDCANRAM as "a bunch of bytes" in the PAC, then in the HAL have a "configuration" of how things are laid out. Then you can make the configuration user-settable in H7 and "fixed" in all other chips. This way the code that accesses FDCANRAM can be the same in all chips.
(i'm assuming the non-H7 fixed layout is a "special case" of the H7 configurable layout? hopefully that's the case, but this being ST I wouldn't take it for granted).

maybe an alternative is: always treat the FDCANRAM as "a bunch of bytes" in the PAC, then in the HAL have a "configuration" of how things are laid out. Then you can make the configuration user-settable in H7 and "fixed" in all other chips. This way the code that accesses FDCANRAM can be the same in all chips.

In terms of responsibilities, I think I prefer the PAC describing the layout for non-H7 chips, rather than the HAL, but I recognise that it makes the HAL more complicated. I'm on the fence.

(i'm assuming the non-H7 fixed layout is a "special case" of the H7 configurable layout? hopefully that's the case, but this being ST I wouldn't take it for granted).

In short, yes.
Example from RM0492 (H503, but mirrors other H5s):

Example from RM0455 (H7A3/B3/B0, but mirrors other H7s):

H7 has a single message RAM block shared between all FDCAN modules. On non-H7s, each module has its own message RAM, but they are adjacent so again, it can be treated as a "special case" of an H7 setup.

In terms of responsibilities, I think I prefer the PAC describing the layout for non-H7 chips, rather than the HAL, but I recognise that it makes the HAL more complicated. I'm on the fence.

yeah we can leave the non-H7 registers in the PAC, they can be useful if someone wants to use the PAC directly and doesn't care about H7. The HAL can still "ignore" them and do everything with pointer math based on the "config".
it's just a random idea, you guys are the experts, so feel free to choose the solution you think its best though!

I do see some benefit in allowing custom configuration for H7, especially if the design lets you make more smaller buffers for classic CAN. However personally, it's lower on my priority list than buffering option which helps all users. I bought a H723 board so I could (and did) test this module with real CAN but my own projects are targeting G4.
But yes, to do this, the H7 will need a config struct that is used by the msg ram reader/writer functions. In the current design, there is a function to return a ref to an individual buffer. The type of this is from the code that I copied from the fdcan create. For non-H7, this could return the PAC type. For H7, perhaps it could return something with the same name(type alias) as the non-H7 PAC crate has. I need to look into the specifics more, I didn't look at Torin's changes yet.
Where do you both stand on this issue of message ram? Are we talking for down the track? Or do we need to do something for this PR to pass through?

i'm fine with whatever you think is best.

@tcbennun, I looked again at the PAC. It seems that you only added methods to get access to the individual FIFO elements but didn't break that down further into the actual registers? Is that the case or am I looking in the wrong place?

In general though, I'm happy to leave it as it is for now. It won't impact the existing API, only perhaps add some more config options for H7 but that should be non-breaking.
This is pending whatever further review comments come up for this patch.

@tcbennun, I looked again at the PAC. It seems that you only added methods to get access to the individual FIFO elements but didn't break that down further into the actual registers? Is that the case or am I looking in the wrong place?

Yes, currently it's just broken down into regions.

bender run

I was deploying a teleprobe fix for the h5 and screwed it up while this was running.
bender run

Ok, thanks. I have pushed fixes for Tomasz comments and rebased.

Hi all, I have added another PR that builds on this one: This branch builds on https://github.com/embassy-rs/embassy/pull/2571

bender run

Regarding your comments:

Yes! Actually I did it already, please see follow-up PR here: https://github.com/embassy-rs/embassy/pull/2588 After getting the buffered mode working.
Yes, understand. I kind of didn't really like having bxcan and fdcan files mixed in one directory so I was hoping to clean it up further later and figured starting a pattern for now was a good way to start. But that's OK, I can move it back.
Ok, I'll have a play with that and see if I can figure it out.

Do you have time to check the approach of my Buffered implementation at least quickly to see if it seems reasonable(does it suck). There is an enum-based decision in the IRQ handler to deal with both options. Not sure if this is considered unacceptable. I guess this is a minor extra CPU cost in the IRQ handler as well as possibly a bit of overhead in the data portion of the enum union. I figured the size of  channel sender/receivers is probably smaller, than the wakers for non-buffered mode anyway.
Essentially, I want to know if I can apply these changes to the buffered branch and move forward with that. Or should I backtrack to this head and rebase the typestate change, working from there.

I kind of didn't really like having bxcan and fdcan files mixed in one directory

separating in modules internally is fine. You can have the module private, and do pub use fd::*. I was referring to the public API only.

Actually I did it already, please see follow-up PR here: https://github.com/embassy-rs/embassy/pull/2588

Essentially, I want to know if I can apply these changes to the buffered branch and move forward with that. Or should I backtrack to this head and rebase the typestate change, working from there.

oh okay, I hadn't looked at that one yet. I'm OK with merging it later, don't worry about rebasing.

does the hardware somehow require you can't change the configuration while it's running? if so I think it makes sense!

Yes, many (all) registers say they are locked when not in config mode.


None admin user given permission to editUsers seeing 500 error when add two-factor authentication as a column

None admin user given permission to manage other craft user seeing 500 error when adding two-factor Authentication as a column in EVENT_SET_TABLE_ATTRIBUTE_HTML
Error:
[error][Twig\Error\RuntimeError] yii\base\UnknownPropertyException: Getting unknown property: craft\elements\User::hasTwoFactorAuthentication in
/vendor/yiisoft/yii2/base/Component.php:155
Fix description:
If a user given access to editUsers and have permission to the accessPlugin-two-factor-authentication, they should see what admin is seeing.
Fixes 1: Allow none admin who can editUsers see the two-factor authentication column without an 500 error
https://github.com/born05/craft-twofactorauthentication/blob/060bdad53fb92527a6a85fcfc68fd0c679b48f82/src/Plugin.php#L102
update to
if( $event->attribute == 'hasTwoFactorAuthentication'
 && $currentUser->can('editUsers')
 && $currentUser->can('accessPlugin-two-factor-authentication') )

Optional Fixes 2: Allow none admin who can editUsers to disable the two-factor for other user
https://github.com/born05/craft-twofactorauthentication/blob/060bdad53fb92527a6a85fcfc68fd0c679b48f82/src/Plugin.php#L121
update to
$currentUser = Craft::$app->getUser()->getIdentity();
if( $currentUser->can('editUsers')
 && $currentUser->can('accessPlugin-two-factor-authentication')
 && !$context['isNewUser'] ){

https://github.com/born05/craft-twofactorauthentication/blob/060bdad53fb92527a6a85fcfc68fd0c679b48f82/src/controllers/UsersController.php#L21
update to
$currentUser = Craft::$app->user->getIdentity();
if ($currentUser->can('editUsers') && $currentUser->can('accessPlugin-two-factor-authentication')) {

@roelvanhintum, this 500 error has been an issue for us also. It would be nice to have it resolved for a project we're in process on. Would it help if we submitted a pull request?

@mike-moreau yes, that would definitely help.

@roelvanhintum sure thing, made a PR here https://github.com/born05/craft-twofactorauthentication/pull/73 with the fixes suggested by @xhuang9 above

Sorry about the delay. Released in 3.1.0


about the speed

Hi,
May I ask a simple question: You claim 24K token/s with 1.1B model which is 56% efficiency.
But my cuda code with pure cublas GEMM calls on 2048*2048 matrix fail to reach 56% efficiency.
Note that we also have other operations such as layernorm etc.
So my own 1B GPT with cuda/bfloat16 only reach 10K tokens/s.
It seems that there is a chance to double my speed...
I will appreciate to hear discussion from you!
Yi

Hi, may I have more information about your GPUs?


Issue with the Package Name field in the Template Mod Generator

The package name field does not allow names with capital letters such as a.Bcd and forcefully converts them into a.bcd.

This is correct behaviour imo, package names should always be lower case.
As per: https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html
Package names are written in all lower case to avoid conflict with the names of classes or interfaces.


Update Composer dependencies (2021-11-29-21-12)

Visual regression test passed!
View the visual regression test report


Fix in case commit log has only a line

To backport https://github.com/cupy/cupy/pull/6823.

see https://github.com/cupy/cupy/pull/6823#issuecomment-1204173008


Integrating  sharding-transaction-base-saga 4.0.0-RC1

Integrating sharding-transaction-base-saga to configure saga. properties file with saga. persistence. enabled = true, and then configuring saga. persistence. ds. content, resulting in SpringBootConfiguration. dataSource () method creating dataSource error subsequently leading to
Java.util.Service Configuration Error: org.apache.shardingsphere.transaction.spi.ShardingTransaction Manager: Provider.shardingsphere.transaction.saga.SagaShardingTransaction Manager can not be instantiated

For English only, other languages will not accept.

@mygitdds please make sure saga-example runnable in your local environment.

If you don't configure saga. persistence. enabled = true and  saga. persistence. ds. my project, you can run.

@If you don't configure saga. persistence. enabled = true and saga. persistence. ds. my project, you can run.

@cherrylzhao  Saga-example is not configured persistence I have referred to, if not configured persistence, the project can run.

your project means our example? or your test project?

@cherrylzhao It's my development project.

@cherrylzhao  Sharing-transaction-base-saga source code has been read and it feels OK. I am not quite sure what caused the SpringBootConfiguration. dataSource () method error in org. apache. shardingsphere. shardingjdbc. spring. boot.

@cherrylzhao  When I used to do this dome, I didn't do business, so now I have this problem.

how can I reproduce your problem? can you push your test-project to GitHub?

@cherrylzhao  ok  My project is on gitee. I'll give you a project address.

@cherrylzhao  https://gitee.com/shengnong_1/swallowBird.git

@cherrylzhao  I've modified the code, which is available. This is a spring cloud project, and you start the Eureka project and the BusinessSystem.

ok, I'll check it later.

@cherrylzhao Thank you

which branch should I checkout, master?

@cherrylzhao  Direct in master

@cherrylzhao You pull down the code. I just had two configuration files not submitted.

@cherrylzhao
I looked at the source code of saga-4.0.0RC1 and reasonably configured saga. persistence. ds. The data source was instantiated directly in the process of instantiating the SagaSharingTransaction Manager object, but I don't know why it affected. Sharing failed in the project of creating a dataSource into a container，（org.apache.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration.dataSource()）. It shouldn't have anything to do with it

ok, I have got the same error in my environment, I think you should just paste the full exception stack log next time.

@cherrylzhao  Sorry, I found the problem. I configure the SQL according to the official document. When I first create the object of SagaSharing Transaction Manager, I automatically create sql. It fails in the process of executing sql, which leads to subsequent failure.

you have resolved the problem?

@cherrylzhao yes

@cherrylzhao  I went to modify the sharding-transaction-base-saga source code to print the log, and dug into each execution method to find the execution SQL error.

@cherrylzhao I followed the official SQL and created the file schema-init.sql, but there was a problem when the SQL was executed in the framework.

how did you resolve the error, create table SQL is wrong from official site?

@cherrylzhao Create SQL and files to https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/usage/transaction/
Where will the source code go to the schema-init.sql file under the resources of the project? If it is not found, the logic of creating SQL will not be executed. I deleted the schema-init.sql from my project and the project started successfully.

execute schema-init.sql behavior is right, we should find the root cause why execute SQL throw exception.

@cherrylzhao  Official SQL is no problem. When I dug, I saw that the execution of SQL seemed to be no problem. But execution is, fail

@cherrylzhao  I duplicated the SQL executed in the framework and found that when two SQL statements were created in the file and read out, the first statement seemed to be all right, but when it was copied out to the SQL tool to execute, it made a mistake, a little similar. The key word "use" appeared in the field of table building.

@mygitdds your schema-init.sql contains a \uFEE in the head. when I create a new file, the problem was resolved.

@cherrylzhao Thank you


Add Laravel Kit

App name: Laravel Kit
Website: https://github.com/tarequemdhanif/laravel-kit

@MarshallOfSound homebrewCaskName property is now modified.


CFLAGS is ignored

CFLAGS is ignored by the Makefile because common.mk purges it at the top with :=.
This choice is unconventional. Is it intentional? Is there a way to add arguments to the compiler options?

If you want to add anything to CFLAGS, then simply edit that line in common.mk. Other potential option is to set CFLAGS ?= . That way even command-line options are honoured

common.mk could have used CFLAGS ?= -- then CFLAGS is honored by default as usually done in packages. I remember autotools decided to use AM_CFLAGS internally to avoid messing with user supplied CFLAGS completely -- might be useful to follow a similar pattern here? Similar arguments were made for LDFLAGS too.

I remember having had that previously but something didn't work quite correctly. But I didn't find anything this time. Does this work for you? Since the CC variable is often set to an old /usr/bin/cc, Corrfunc does not honour the CC variable by default. Let me know if this solves your issue.
Corrfunc uses a different CLINK variable for linker flags and does not use the LDFLAGS variable at all.

@rainwoodman - is it okay to close this issue?

Sure!


Fresh toolpad app throwing error related to functions.ts

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Steps:

Started a fresh project using yarn create toolpad app (later also tried using npx)
Somehow, it doesn't come with resources or components folder
After yarn dev, when I click on server side javascript query, I get the below error and the app stops

Current behavior 😯

Expected behavior 🤔
No response
Context 🔦
No response
Your environment 🌎
Mac
Toolpad version v0.1.6

I can't reproduce

Started a fresh project using yarn create toolpad app (later also tried using npx)

Can you share the exact commands and input that you've used to get to this project.
From your screenshot it looks like you have a pg_admin folder inside of a pg_admin folder. Are you sure you're starting toolpad in the right folder?

Just tried and I can't reproduce it either.

This is exactly the error we had on Windows...
But the create-toolpad-app you were using yesterday shouldn't have included those fixes yet, right?

Ok I also got this after all but nothing crashed:

I think it's a temporary error when we create a new toolpad app with create-toolpad-app and run yarn dev and we go to create a custom function. It works but because it didn't create the resources folder right away it shows this error in the console when it tries to get the list of available function.
So we should probably fix this just not show the ugly console error.

But since there is no resources folder. I can't write a code query.
I'll upgrade to v0.1.7 and retry.

But since there is no resources folder. I can't write a code query. I'll upgrade to v0.1.7 and retry.

It ended up creating the resource folder for me when I pressed Open editor, but it wasn't there in the beginning.
I think the fixes in v0.1.7 are unrelated to the issue should still be there.

Upgraded to v0.1.7 and this issue is gone!

This again happened today when I created a fresh app using yarn create toolpad-app. Somehow resources folder isn't created sometimes.

This is still happening in v0.1.11. Components folder is also not being created.

So far that has been deliberate. The idea was that the project folders comes as thin as possible and these folders get created on demand as the first function is added or the first component is added. Do you think we should always create these folders/files when the project starts up, even when users don't need them?

Ok, just validated this. After learning how Toolpad works, there would be times when a user would start from a function or code component, so creating them by default sounds reasonable to me.
Having these folders not created makes me question if there was some issue in the installation process.

On my machine when I create a fresh toolpad app, following issues are being observed:

Custom component creation works fine. A folder gets created, but the Open button doesn't work. It says No code editor found. Also reported here
When creating a custom function, I see no function to pick from and as there is no folder in resources. Not sure what is the trigger for folder creation in this case.

https://github.com/mui/mui-toolpad/assets/92228082/74f6fac4-2205-46ea-880f-15af3be33967


⚠ Processors has degraded performance

In f5a6a99, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 50 ms

Resolved: Processors performance has improved in 6262fc2.


[P3] Add RBAC example showing the which accounts are assigned which role

Is your feature request related to a new Jumpstart scenario you would like to contribute?
No
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like.
In the DevOps doc, the instructions show me that I can't delete pods as Jane because Jane has a role of "pod-reader".
But it doesn't show me how to figure out who all of the potential users are, or what roles they have.
It would be helpful to have a command that showed all of the users, and another to show the members of the "pod-reader" role so I can connect the dots from Jane to pod-reader, and also find out who else has that role, or other roles.
Describe alternatives you've considered.
I can probably search online and find the instructions
Additional context.

I haven't test this (YMMV), but it looks like ChatGPT has a good set of steps to dig into listing the accounts and roles:
From ChatGPT:
In Kubernetes, the --as argument in kubectl allows you to impersonate another user when performing actions, given that the current user has permission to impersonate other users. This is also known as User Impersonation.
To use the --as flag, your user account must have the necessary permissions to impersonate other users. The permissions are set in the cluster's Role-Based Access Control (RBAC) rules.
To list all of the accounts that a user can impersonate, you need to look into the RBAC rules set in your cluster. There isn't a direct kubectl command to list all the accounts that a specific user can impersonate, but you can review the ClusterRoles and Roles that are associated with your user and look for the "user.impersonate" or "*" permission in the rules.
Here is a general approach to see which roles have impersonation rights in the cluster:

List all ClusterRoles with impersonation permissions:
kubectl get clusterroles -o yaml | grep -B 10 -E '"user.impersonate"|".*"'

List all Roles with impersonation permissions in a specific namespace:
kubectl get roles -n <namespace> -o yaml | grep -B 10 -E '"user.impersonate"|".*"'

Check which ClusterRoleBindings or RoleBindings are associated with your user:
To see ClusterRoleBindings:
kubectl get clusterrolebindings -o yaml

To see RoleBindings in a specific namespace:
kubectl get rolebindings -n <namespace> -o yaml

Inspect a specific ClusterRoleBinding or RoleBinding to check if your user is associated with it:
To see a specific ClusterRoleBinding:
kubectl get clusterrolebinding <clusterrolebinding-name> -o yaml

To see a specific RoleBinding in a specific namespace:
kubectl get rolebinding <rolebinding-name> -n <namespace> -o yaml

If a ClusterRole with "user.impersonate" permission (or "*" permission, which is wildcard and includes impersonation) is bound to your user (either directly or through a Group) via a ClusterRoleBinding or RoleBinding, then you have the rights to impersonate other users.
Note: These commands do not give a list of specific users that you can impersonate, but rather they help to identify the roles that have impersonation permissions and whether your user is associated with those roles. The actual user names that you can impersonate are not specified in the RBAC rules.


Azure Automation Expansion: Support Python Runbooks

As opened by @hdost in Azure/azure-sdk-for-go#2256:

As of right now there is no support for python run books
This would be needed for terraform-providers/terraform-provider-azurerm#1602

Relevant clause here, that notably doesn't include Python:
Azure/azure-rest-api-specs/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/runbook.json#L1083

Support for Python 2 has been added to the product in 2018. This needs to be reflected in the SDK. Created work item.

Is there any change of a python 3 support.

Yes, work on migrating this to python 3 is in progress.

Hi @andyw248 , could you give us a reading on the progress?

Without Python support, automating the deployment and lifecycle of Python-based automation runbooks is impossible.  I've no interest in sinking the time/effort into refactoring code to PowerShell so I guess I'll have to look elsewhere for my automation needs.

Without Python support, automating the deployment and lifecycle of Python-based automation runbooks is impossible. I've no interest in sinking the time/effort into refactoring code to PowerShell so I guess I'll have to look elsewhere for my automation needs.

Just do like everyone else: use Azure functions instead

Yea this can probably be closed at this point.


Add option to provide blank AUTH_HEADER_TYPE?

Wondering what thoughts are on allowing an empty AUTH_HEADER_TYPE to the settings. I've seen some other packages that simply omit Bearer or Token from the Authenticate header when implementing JWT.
In my case, Swagger docs for django rest framework don't play nice with JWT yet, and allowing a blank AUTH_HEADER_TYPE would solve that issue.
It seems providing AUTH_HEADER_TYPE=None causes an encode error, and empty string doesn't authenticate correctly.
So far i'm loving this package, thanks!

Hi Nicholas,
Thanks for feedback!  I'll have to look into this and clarify what the relevant RFCs have to say about it.  Also, do you have a link to something that makes it more clear what the issue is with Swagger?  Either way, you could probably get away with subclassing rest_framework_simplejwt.authentication.JWTAuthentication and overriding the get_raw_token method to get what you need.  You'd then just list that class in settings.py instead of the default authentication backend class.

Here's a related PR for swagger, but basically, swagger doesn't support adding Bearer or Token to the Authentication header via the UI right now. https://github.com/marcgibbons/django-rest-swagger/pull/662
I think you're right on checking the RFCs. I'm now realizing the JWT implementation I saw that did not include a Bearer or Token prefix was a custom job, so it may be incorrect to simply omit a prefix. But given that this package allows you to basically set a custom one, I wonder if the spec has anything to say about not having one.
I'll give your overriding option a try. Thanks!

@nicholasserra Did you ever happen to find out if a blank auth header type is kosher?  I haven't had the time to look into this.  Also, did my suggestion ever work out for you?

So for a bit I was basically just typing Bearer example-token into the Swagger authorize box, as this was the workaround:

But I just tried out your recommendation finally, and it works well. So as the code sits, you cannot add None to AUTH_HEADER_TYPES, but you can add an empty string.
So my setting is 'AUTH_HEADER_TYPES': ('Bearer', '',), and I added these lines to my custom get_raw_token:
        if b'' in AUTH_HEADER_TYPE_BYTES and len(parts) == 1:
            # Allow blank auth header
            return parts[0]

and that now allows me to authenticate via Bearer in the header or by omitting a token type entirely.
So this solves my nitpick of having to enter the token type into swagger. As to whether any of this is correct or allowed by the spec? I have no idea ha. I'm gonna close this now, as I don't think theres a valuable fix here that follows any spec. Thank you for the recommendation on this!

Thanks Nicholas.  Glad you got things worked out.


entrypoint image lookup: change auth order

Changes
The google.Keychain will fail hard in case of gcloud command
missing (which can be the case in minikube and other kubernetes
cluster). This means it will fail before trying to contact the
registry anonymously — even if the images are publically available.
This add an ad-hoc anonymous keychain, and set it as the first
keychaien to check. That way, it will first try to get images config
anonymously and then try other authentications.
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>This could be removed if https://github.com/google/go-containerregistry/pull/405 gets merged, but I also think pipeline should try anonymously before the rest.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[x] Commit messages follow commit message best practices

See the contribution guide
for more details.

/hold
It breaks stuff :sob:

/test pull-tekton-pipeline-integration-tests

/test pull-tekton-pipeline-integration-tests

/hold cancel


Generators / Hash unable to calculate Hash correctly due to inconsistent newline characters on Windows

Current behavior
I have a inline script have to put it into a web page and configure CSP header for this. The inline script content below:
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');

I have to calculate the sha256-base64EncodedHash value of the content for my CSP header. The DevToys produce the wrong hash result and it very possibly caused by the "NEWLINE" character!
How to reproduce it (as minimally and precisely as possible)

Prepare the text for hash
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');

I tried this website, the Hash result is correct. Just paste the above JS into Inline scripts/styles' field and hit Calculate hash` button to get the result. Like below:
sha256-XIt1SuJNEQJb+jl5/gpNU2NFCVeB9VsTTS6rVIPECB8=

The XIt1SuJNEQJb+jl5/gpNU2NFCVeB9VsTTS6rVIPECB8= is the base64EncodedHash (SHA256).

Use DevToys to calculate the hash, I got this result below, which is different than above one:
F6Li77u3rHsErlN19VrO5I8SC/xleMs17TCQA8aLX9Y=

Expected behavior
I expected the result should be the same and it's important to treat newline characters correctly.
Screenshots

Workaround
None.
Affected platforms
Windows
Affected DevToys kind
DevToys (app with GUI)
DevToys Version
Version <IP_ADDRESS> | X64 | RELEASE | 2706c6c2 | 2706c6c2
Relevant Assets/Logs
I think it's related to this issue: https://github.com/veler/DevToys/issues/758#issuecomment-1460057543 and https://github.com/microsoft/microsoft-ui-xaml/issues/1826

Hi,
Same thing than in #961. This will be fixed in DevToys 2.0 upon release. We merged the Hash generator and Checksum generator into 1 unique tool, and DevToys 2.0 will support both \r and \n\r.

May I ask when will 2.0 release?

We're hoping early next year.


netty-resolver-nds:Cname max ttl can not be 0

netty-resolver-nds:
The maxTtl of DefaultDnsCache can be set to 0, but the DefaultDnsCnameCache and DefaultAuthoritativeDnsServerCache can`t be 0.What is the reason  for this impl?

The DefaultDnsCache is older than the other two, so it is stuck with this feature for configuring a non-caching behaviour. Instead of setting max TTL to zero, integrators who don't want any caching should instead configure their resolver to use the Noop*Cache.INSTANCE implementations.


[snap] Config hook support for enabling/disabling individual services

The California snap start & stop scripts read a file called $SNAP_DATA/edgex-service-env to determine which services to start/stop.  In Dehli, the snap instead should provide configure hook settings for each service, with a single setting controlling whether or not the security services should be started.
Note - this should probably be done at the same time we get rid of the start/stop scripts and and make all of the services daemons, or after that work is finished.

Remove Dehli label as this was added with #722, and added an Edinburgh label as this code hasn't yet been merged in master.


Stages of the activity lifecycle

Stages of the Activity lifecycle
Describe the problem
when  I click the run button in the android studio I get the error Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Steps to reproduce?

clone the repo and wait for the gradle to sync
click the run button

Versions
_Android Studio version: _koala
API version of the emulator: 35

for some reason deleting C:\Users\name\.gradle\caches\modules-2\files-2.1 this folder solved it


Add a facility to create WHERE ... IN (SELECT...) constraints for relationship queries (has(),  whereHas(), ...) to avoid full table scans.

Add a facility to create WHERE ... IN (SELECT...) constraints for relationship queries (has(),  whereHas(), ...) to avoid full table scans.
See #8720 for details.
The facility is implemented for belongsTo, BelongsToMany, HasOne and HasMany. Other relationship types (i.e. Morph*) are not implemented yet.
The code falls back to the old behaviour whenever the new query strategy is not applicable or implemented.

I think you're better off with a simple raw SQL query at this point.

This decision is very frustrating


Delete files with :open when done with them

Iamb downloads every file opened with :open before opening, which makes sense, but it doesn't delete them when I'm done looking at them, resulting in my downloads folder getting cluttered with a bunch of files I just wanted to look at once. It'd be nice if there were an option to automatically delete the file, so that it doesn't even seem as if the file was written to a file to begin with.

maybe specify download directory to /tmp/iamb , that won't write to disk

That's an option, but not a great one IMO. The ranger file manager puts image previews in /tmp/, but has a bug causing them not to be deleted when the program closes. There've been multiple occasions where I simply hadn't restarted my device in long enough that ranger's files in /tmp/ actually took up it's entire capacity...
It's a better solution than $XDG_DOWNLOAD_DIR, at least, but can have odd consequences if you don't reboot often.


Should we add some sort of "blacklist" for pip packages?

Hi everyone,
as most of the long-term watchers of this repo and/or the forum have probably noticed, we are getting a lot of repeated issues regarding pip, especially the installation of non-compatible pypi packages.
Some examples are https://github.com/ywangd/stash/issues/358 and https://github.com/ywangd/stash/issues/371 .
Should we add a blacklist to pip, which explicitly warns the user that these modules can not be installed (e.g. 'matplotlib' can not be installed, but is already preinstalled or mypy can not be installed, because it has c-code)? Also, should we add a --force argument to pip to bypass the blacklist?
What do you guys think?

If we were to discuss this, we should also consider having some sort of mechanism that allows pip to log (yet continue) if a dependency isn't able to be installed. This way, what is currently supported is there but the user knows about missing things as well. maybe --allow-broken-dependencies or --install-what-you-can? idk.
I've had times where I would want a library but it had some incompatible prerequisite.
To somewhat manually solve this, I would git clone the repo, remove that required package from the setup.py, and the install (along with what functionality I needed from that library) worked just fine.
Starting some sort of a ~/pip.conf with a "ignored_packages": ["mathplotlib", "mypy"], section like sublime text has or even just a ignored_packages.txt would be nice.
That way you would have a clearly defined place where you can add packages. Not all libraries break during install but do super screw up the execution environment if they get through so some persistent file that outright protects the system would be nice.
Those are my thoughts on it.

@bennr01 perhaps there needs to be a separate py2 vs py3 blacklist?  Or blacklist json should allow blacklisting on one or the other.  For example: xmlrpc should be installed for python2, but never python3.

@bennr01 perhaps there needs to be a separate py2 vs py3 blacklist? Or blacklist json should allow blacklisting on one or the other. For example: xmlrpc should be installed for python2, but never python3.

I believe adding another key to the blacklist would be preferable over a new blacklist. It is simply extremely rare that a package needs to be added depending on the python version. Normally, they either work on neither/both python version or set the requires_python value correctly.


Excluding the selected starting and ending currencies in the Arbitrage page crashes the server

Not sure if its specifically having both starting and ending currencies excluded is what breaks it, or some part of that combination.
Ideally the user shouldn't be able to exclude the selected start and end currencies.

I've changed the endpoint on modified_endpoints to throw an exception instead of crashing if this happens, but it would still be better to prevent the user from doing this in the first place.


CodeMirror gutter should fill up the editor

The min-height setting of CodeMirror editor cause the line number column becomes too short.

@wujysh Just curious, are you testing on macOS or Linux?

@hackjutsu
Linux. There is no problem on macOS?
2017年2月10日 上午4:41，"Cosmo"<EMAIL_ADDRESS>
@wujysh https://github.com/wujysh Just curious, are you testing on
macOS or Linux?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hackjutsu/Lepton/issues/88#issuecomment-278766905,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFSxQuEBU6Y8GeFON4mFer-wA3zS_Gd5ks5ra3n0gaJpZM4L8AW7
.

@wujysh
No, not about this issue. As I know, the Electron's notifications might not work on some Linux platforms,  so I'm curious whether you have received notifications when performing the sync create, edit, delete and share operations.

@hackjutsu
Notification is working.
2017年2月10日 上午10:22，"Cosmo"<EMAIL_ADDRESS>
@wujysh https://github.com/wujysh
No, not about this issue. As I know, the Electron's notifications might
not work on some Linux platforms, so I'm curious whether you have received
notifications when performing the sync create, edit, delete and share
operations.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hackjutsu/Lepton/issues/88#issuecomment-278839699,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFSxQlG--9f1jtZhTx3zxO-VY0S6F_bdks5ra8nOgaJpZM4L8AW7
.

@wujysh Thank you for letting me know:)


dartanalyzer reports warning instead of error

List l = new List();
l.add("string");

List<int> li = new List<int>();

li = l;

print(l2[0]);

Analyzer (in strong mode) reports on this: [warning] Unsound implicit cast from List< dynamic > to List< int >
There should be an error, not warning! Otherwise it's possible circularity that we want to avoid (see https://github.com/dart-lang/dev_compiler/blob/master/doc/STATIC_SAFETY.md)
  List<String> ls = new List<String>();
  List l = new List();
  List<int> li = new List<int>();

  ls.add("abc");
  li.add(123);

  l = ls;
  li = l;

  print(li[0]);

In a strong mode analyzer reports
[warning] Unsound implicit cast from List< dynamic > to List< int >
[hint] A value of type 'List< String >' cannot be assigned to a variable of type 'List'
1 warning and 1 hint found.
And no error!
Tested on Dart VM version: 1.19.0-dev.7.3 (Tue Aug 23 03:02:14 2016) on "windows_x64"

This is working as intended.  We currently allow implicit downcasts in strong mode. In DDC, which is the only platform that currently implements the runtime checks required for soundness, there will be a runtime cast inserted on the assignment to li, which fail at runtime.  On other platforms, strong mode is not yet enough to guarantee soundness, but we expect to have implementations of this on other platforms as well in the near future.
That said, there is a new flag that will be available in v19 (and is already available in the dev channel) that will turn implicit downcasts such as the ones in your example into errors.  Run the analyzer with --strong --no-implicit-casts to get this behavior.  We'd love to get feedback on this feature, so if you turn it on please let us know how it goes.


TextField restricts input only to numbers

When entering any character, if the value is not updated, then it will be appended to the next input value.
https://user-images.githubusercontent.com/76673990/141152311-6959b8e3-fd5b-4561-8dc2-6c18d8a6212f.mp4
OutlinedTextField(
value = BotState.qq.let {
    if (-1L == it) {
        ""
    } else {
        it.toString()
    }
},
label = {
    Text("QQ")
},
onValueChange = {
    if (it.isEmpty()) {
        BotState.qq = -1L
    } else {
        try {
            println(it)
            BotState.qq = it.toLong()
        } catch (e: Exception) {
//                                    e.printStackTrace()
            println("exception")
        }
    }

},
)

object BotState {

    var qq by mutableStateOf(-1L)
    var password by mutableStateOf("")
}

So what is your question?

The current value of TextField should be value.
But in fact, even if the internal value of the value TextField is not changed after the input, it will change, causing the input number to be abnormal.
Maybe there should be a regular expression input rule restriction?
Sorry, this is Google machine translation
TextField 的当前值应该是value才对。
但实际上输入之后即使没有改变value TextField内部值也会改变 导致输入数字异常。
或许应该有个正则表达式输入规则限制？

Google is not that good in translation :(
Maybe you can describe a test scenario. Something like - enter 23, than enter g, expect to get 23, but get 23g. ?

I think you just need to handle Exception properly and update State whenever value in TextField is changed. \
BTW, on my system your video is empty - I can't see anything.

I think you just need to handle Exception properly and update State whenever value in TextField is changed. \
BTW, on my system your video is empty - I can't see anything.

You can click on the three dots on the right of the video, and then download it to the local for viewing

I understand what should be there. Try approach I described.

Closing as dormant

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Removed require spec_helper from non-spec file.

Made rspec a dev dependency.
Bumped gem version.

:wave:

:elephant: :elephant: :elephant:


Tracker for upgrading to LangChain4j 0.32

Checklist:

[x] Switch the parallel execution of in-process embedding models to use the quarkus worker pool (see https://github.com/langchain4j/langchain4j-embeddings/pull/31) - IMPLEMENTED IN https://github.com/jmartisk/quarkus-langchain4j/commit/74fd385163d84e042be392da25afc74b1ab15cf3
[ ] Breaking changes in Mistral models due to https://github.com/langchain4j/langchain4j/pull/1226
[ ] Use new observability interfaces

@geoand let's try tracking the necessary changes like this, WDYT?
Once we become aware of more, we can add them here

Sounds like a good idea!

I've also pushed a branch https://github.com/quarkiverse/quarkus-langchain4j/tree/langchain4j-0.32 that integrates the mandatory changes for the upgrade. I've been doing this for SmallRye GraphQL for quite a while, maintaining an upgrade branch over time, rather than implementing everything at once the new version is released... Let's see how it works... We can always back off

Sure, let's see how it goes

@jmartisk I assume you haven't done anything for MistralAI, correct?
Asking so I don't duplicate work

Correct, I haven't looked at that

👍🏼

I have force pushed an update


Ensure compatibility with PHP 7.4 arrow functions

Related to #4382.

Test added, thank you @gharlan.

(i did rebase + squash + fix minor issues)

Thank you @julienfalque.

Unfortunately, this is not working. With --verbose -> invalid file syntax.

return fn(SearchHit $hit) => $hit->valueObject;

Not accepted, quite frustrating!


(PUP-4660) Stop checking Puppet.features.external_facts?

CLA signed by all contributors.

This still leaves the feature itself in place. I'd like to trash that, but probably it's public API that we need to leave until a major. @kylog what are your thoughts on that?
If we want to keep the feature around we should file a ticket targeted at 5.0 to remove it

Good point, adding a ticket to remove completely makes sense to me. FWIW, puppet's feature code relies on method missing (IIRC), so if we do remove the feature, then it would erroneously return false:
irb(main):002:0> Puppet.features.foobar?
=> false

To play it safe, +1 on a ticket to remove at the next major. Since this seems unlikely to be widely adopted (if at all) as an API, I'd suggest we deprecate in docs only rather than with a runtime warning.
Also, should we:

always return true here: https://github.com/puppetlabs/puppet/blob/ed209118fceb6433b51c88c10883cb7415b36adb/lib/puppet/feature/external_facts.rb#L4
remove this stub: https://github.com/puppetlabs/puppet/blob/ed209118fceb6433b51c88c10883cb7415b36adb/spec/unit/face/plugin_spec.rb#L15-L17

??

Yup, I agree those two changes should be part of this PR. I'll file the ticket to remove the feature in 5.0


search icon code clean up + night_mode regression fix

Testing Plan:
GIFs or Screenshots:

Looks good but needs work on node tests.

Sorry I'd missed the node failure! It's fixed now.

Merged, thanks @YashRE42!


Style No Results cell more in line with web stats

Fixes #384

Updated the styling of the no results cell to match what was requested.
Moved the stats bundle helper class extension to NSBundle rather than NSObject.
Pulled the no results cell out of the storyboard (used in two view controllers) and put it into a XIB.
Fixed a root folder problem on the UI group. New files were not being placed into the UI folder on disk.

Needs Review: @bummytime, @jancavan

Moved the stats bundle helper class extension to NSBundle rather than NSObject.

:+1:
Code is square. The no data cells look a lot better too. :shipit: from me.

LGTM :+1:

Thanks everyone!


Tweaked configuration doc chapter

If you don't agree with any of the proposed changes, please ignore them at will.

Thanks @javiereguiluz! I love the suggestions (and completely forgot the bundle...)


ngKeypress wont trigger escape key on chrome

I cant make work ngKeypress for detect escape key event on chrome.
It s work on firefox.
ngKeydown trigger it.
Chrome Version 40.0.2214.93 m

It doesnt work on firefox too. It s saying key 0. Nvm.

I don't think we can do anything about this in AngularJS - the best advice is to use ngKeyup / ngKeydown instead:

http://stackoverflow.com/questions/719537/capture-an-escape-keypress-in-webkit-browsers
http://stackoverflow.com/questions/3901063/jquerys-keypress-doesnt-work-for-some-keys-in-chrome-how-to-work-around

OK ty


Support HostBuildDependecies

For https://github.com/JuliaPackaging/Yggdrasil/pull/1694 it would be useful to be able to download the host version of LLVM_full_jll so that I can use llvm-config as the LLVM_CONFIG_HOST and get the right build flags.

This is great idea and relatively easy to implement, but we have one point to decide: where to install these dependencies.  The ${prefix} is where the target stuff lives.  Any suggestion?

${hostprefix} ;)


Topic "Create a Northwind Destination": Proper neo-app.json Setting Missing

The topic Create a Northwind Destination ends with:

With this configuration you can use the destination for any app inside SAP Web IDE. Whenever an app calls a (local) service beginning with /destinations/northwind/*, the created destination becomes active as a simple proxy. This helps to prevent any possible issues related to the same-origin policy of browsers.

And that's it.
It's missing a link between neo-app.json and the destination created in SCP, leaving the reader out in the cold. If the prefix "/destinations/northwind/" is not added to the "routes" inside the neo-app.json, the app won't be able to fetch any data from the service. That information, however, is not mentioned in the topic.
There is the previous topic Create neo-app.json Project Configuration File, but that doesn't include the destination created in SCP but only the basic route to get the UI5 resources.
What is the expected result?
The topic Create a Northwind Destination guides the reader into adding the corresponding route to the neo-app.json appropriately, just like in the topic Request Fails Due to Same-Origin Policy (Cross-Origin Resource Sharing - CORS):

neo-app.json
...
{
 "routes": [
   {
     "path": "/destinations/northwind",
     "target": {
       "type": "destination",
       "name": "northwind"
     },
     "description": "Northwind OData Service"
   }
 ]
}

...
manifest.json
"sap.app": {
 "dataSources": {
   "invoiceRemote": {
     "uri": "/destinations/northwind/V2/Northwind/Northwind.svc/",
     "type": "OData",
     "settings": {
       "odataVersion": "2.0"
     }
   }
 }
},

Or at least a link to "the next step", where adding the route is mentioned, would be great.

Hello @boghyon,
Thank you for sharing this finding. I've created an internal incident<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Georgi

Ticket was updated and the documentation improved, please check.

@AnnFr Thanks for the update! I can see that the neo-app.json settings are added now. It would be better if the manifest.json setting is also added as an example.
"sap.app": {
 "dataSources": {
   "invoiceRemote": {
     "uri": "/destinations/northwind/V2/Northwind/Northwind.svc/",
     "type": "OData",
     "settings": {
       "odataVersion": "2.0"
     }
   }
 }
},

The topic says ..

Whenever an app calls a (local) service beginning with /destinations/northwind/*

..but a concrete example would provide better understanding.

Is this issue still being tracked? People do read documentation but are confused because of the incomplete guide (See e.g. this question). It's still missing:

proper route in neo-app.json in the code snippet
manifest.json sample as in https://github.com/SAP/openui5/issues/2307#issuecomment-448953018

From Slack:

Hi guys. In SAPUI5 SDK page, in the page for topic 'create northwind destination', the code sample doesn't show the new code regarding the explanation above the code sample box.

Hello @boghyon,
i made sure that those code blocks are now appearing in the documentation according to your feedback and are marked properly using our highlighting syntax of the demo kit.
It will be first visible here on openui5nighly, once our UA colleagues approved the change:
https://openui5nightly.hana.ondemand.com/#/topic/3a16c7a2f1e944deb000db49e5ece6be
here is a sneak preview for your convenience :-)
neo-app.json
With this configuration you can use the destination for any app inside SAP Web IDE. Whenever an app calls a (local) service beginning with /destinations/northwind/*, the created destination becomes active as a simple proxy. This helps to prevent any possible issues related to the same-origin policy of browsers. For this, you need to add another route to the neo-app.json:
{
  "welcomeFile": "index.html",
  "routes": [
    {

      "path": "/resources",
      "target": {
        "type": "service",
        "name": "sapui5",
        "version": "snapshot",
        "entryPath": "/resources"
      },
      "description": "SAPUI5 Resources"
    },
    {
      "path": "/test-resources",
      "target": {
        "type": "service",
        "name": "sapui5",
        "entryPath": "/test-resources"
      },
      "description": "SAPUI5 Test Resources"
    }*HIGHLIGHT START*,
    {
      "path": "/destinations/northwind",
      "target": {
        "type": "destination",
        "name": "northwind"
      },
      "description": "Northwind OData Service"
    }*HIGHLIGHT END*
  ]
}

webapp/manifest.json
In the app descriptor, the service URL is then defined relative to the destination path specified above:
...
"sap.app": {
 "dataSources": {
   "": {
     "uri": "*HIGHLIGHT START*/destinations/northwind/V2/Northwind/Northwind.svc/*HIGHLIGHT END*",
     "type": "OData",
     "settings": {
       "odataVersion": "2.0"
     }
   }
 }
}
...

Thanks again for your patience and for reporting this isse - it is appreciated!

All the best,
Michael


Using Highlight Groups rather than load_colors

I have a quick question. I'm sure I must be doing something wrong... I am currently using load_colors to set up colors for Heirline and for a simple example, I am getting the fg and bg of the StatusLine and setting that as the hl variable manually with something like this:
bg = utils.get_highlight("StatusLine").bg,
fg = utils.get_highlight("StatusLine").fg,

And then setting them as the topmost level hl with hl = { fg = "fg", bg = "bg" }. This works great but I am trying to move this to using the highlight group notation with strings, but when I do hl = "StatusLine" I am getting different results. I have verified that the StatusLine highlight group I have in my  theme only sets fg and bg and doesn't set anything like reverse = true or anything, but this is what I'm getting:
With  hl = { fg = "fg", bg = "bg" }:

With hl = "StatusLine":

It seems to me like for some reason when I use the hlgroup notation the colors get reversed as well as bolded. I did some testing and this is what I get when I do hl = { fg = "fg", bg = "bg", reverse = true }:

hl = { fg = "fg", bg = "bg", reverse = true, bold = true }:

Is there any reason for this to be happening or something I might be doing incorrectly?

Hm as I opened this I am starting to think this is a problem with my surround function for some reason. I am investigating this currently

I guess I'm still confused why changing a global highlight group from a manual definition to the hlgroup string definition would change behavior if they should be resolving to the same set of highlights. So maybe this is something else and not my own fault 🤔

I think this has to do with the colors not updating when you reload the colorscheme. For example, if I do this:
hl = utils.get_highlight("StatusLine")

I get the same results as hl = "StatusLine"
but if I do
hl = function() return utils.get_highlight("StatusLine") end

it works as expected.

When you use hl = "HlName" heirline calls utils.get_highlight at evaluation to be able to merge the highlight with the parent, so it will always pick up hl defined in the current theme.
When you use hl = utils.get_highlight("HlName") you are "hard coding" the returned values in the component definition, which are only valid for the current theme.
As you found out, wrapping it into a function allows re-evaluation of 'get_highlight` and updates correctly on colorscheme changes (as long as the hlgroup exists in the new theme).
The best way to ensure consistency on colorscheme changes is to never use the result of utils.get_highlight directly, instead, wrap it into a function, use hlgroups names directly, or use color name aliases defined in setup_colors with the instruction in the cookbook #theming.
Is there anything you think I could do?

Hm, I guess I'm wondering why it doesn't seem to work correctly when I use the hlgroup name directly. Do you have any idea why that would be?

The simplest example that illustrates this is
require("heirline").setup({ hl = "StatusLine", provider = "Hello, World!" })

This results in:

where if I specify the fg/bg directly or with the function calling get_highlight I get this:
require("heirline").setup({ hl = function() return utils.get_highlight("StatusLine") end, provider = "Hello, World!" })

require("heirline").setup({ hl = "StatusLine", provider = "Hello, World!" })

gives me the expected result, unless I load heirline config before the intended colorscheme.
this is what I get with nvim --clean --cmd 'hi StatusLine'

The strange thing is that, for some reason, bold and reverse get stuck within the component highlight logic... I will investigate


Update osc to v1.9.1

What type of PR is this?
/kind ci
What this PR does / why we need it:
Update osc to the latest release.
Which issue(s) this PR fixes:

None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?

None

/approve
/lgtm


Issuer name is missing

I am trying to secure an API but I see the following entries in API's logs and I do not know how to handle this or what is it referring to:
[09:15:03 Information] IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler
AuthenticationScheme: Bearer was challenged.

[20:07:32 Error] IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler
Policy error while contacting the discovery endpoint https://idp.example.com: Issuer name is missing
System.InvalidOperationException: Policy error while contacting the discovery endpoint https://idp.example.com: Issuer name is missing
   at IdentityModel.AspNetCore.OAuth2Introspection.PostConfigureOAuth2IntrospectionOptions.GetIntrospectionEndpointFromDiscoveryDocument(OAuth2IntrospectionOptions options)
   at IdentityModel.AspNetCore.OAuth2Introspection.PostConfigureOAuth2IntrospectionOptions.InitializeIntrospectionClient(OAuth2IntrospectionOptions options)
   at IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionHandler.LoadClaimsForToken(String token)
   at IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()

[20:07:32 Information] IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler
Bearer was not authenticated. Failure message: Policy error while contacting the discovery endpoint https://idp.example.com: Issuer name is missing

[20:07:32 Information] IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionHandler
AuthenticationScheme: BearerIdentityServerAuthenticationIntrospection was challenged.

[20:07:32 Information] IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler
AuthenticationScheme: Bearer was challenged.

Is https://idp.example.com really the authority you've configured?

Is https://idp.example.com really the authority you've configured?

Here I've just masked the real URL with example.com, but yes, the authority it is configured properly.

Well, the error is pretty much clear: it can't connect to https://idp.example.com/.well-known/openid-configuration. Do you know why?

@brockallen Thank you, it seems there was a miss-configuration in resolving IP address of idp.example.com.


Suppress static SKFont finalizer to prevent crashes on app exit

What does the pull request do?
It fixes the crash on any .net framework avalonia application on exit.
What is the current behavior?
Application crashes leaving log in the Event Viewer (on windows). It does not repro with .net core and might be depending on some other factors but it is easily reproducible. The impact is medium since it is on the exit but still can cause issues with the proper app shutdown.
What is the updated/expected behavior with this PR?
Application should not crash on exit.
How was the solution implemented (if it's not obvious)?
The problem is partially in the skiasharp pattern of disposing everything in the finalizer. Finalizer does not have well defined priority of invocations and thus the SKFont instance is finalized after a lock on which it is depending. A proper solution would be to dispose the SKFont instance but that would require a bigger architectural change. So I used a workaround (a proper solution is welcome of course).
Breaking changes
This class is a singleton so it shouldn't create any memory leaks.
Fixed issues
Fixes https://github.com/AvaloniaUI/Avalonia/issues/7579

You can test this PR using the following package version. 0.10.999-cibuild0019517-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

Have you tried making s_font a non static field? We should change that anyways if we keep that object alive. There can be multiple instances.

@Gillibald that was my first instinct. The problem is who will dispose the parent object then? PlatformRenderInterface : IPlatformRenderInterface is not IDisposable so we would just shift the problem one layer up and it gets more complicated there (with multiple implementations of IPlatformRenderInterface and no real IoC container that would handle this for us).
If the question is just about the GC priority then it does not help. It gets finalized after the NonAlertableWin32Lock anyway.

Hello, seems like this was not included in the 0.10.14 release, wondering if it'll make its way in the next one or if there are any blockers?
Thanks!


Error: 400-InvalidParameter, Service {Fssoc15Prod} does not exist.

Warning:  Experimental feature "module_variable_optional_attrs" is active
on .terraform/modules/lz_compartments/compartments/providers.tf line 11, in terraform:
11:   experiments = [module_variable_optional_attrs]
Experimental features are subject to breaking changes in future minor or
patch releases, based on feedback.
If you have feedback on the design of this feature, please open a GitHub
issue to discuss it.
(and 8 more similar warnings elsewhere)
Error: 400-InvalidParameter, Service {Fssoc15Prod} does not exist.
Suggestion: Please update the parameter(s) in the Terraform config as per error message Service {Fssoc15Prod} does not exist.
Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/identity_policy
API Reference: https://docs.oracle.com/iaas/api/#/en/identity/20160918/Policy/CreatePolicy
Request Target: POST https://identity.ap-dcc-gazipur-1.oci.oraclecloud15.com/20160918/policies
Provider version: 5.36.0, released on 2024-04-03. This provider is 1 Update(s) behind to current.
Service: Identity Policy
Operation Name: CreatePolicy
OPC request ID: a033a371e6580523c0ff339a4f0b8ab7/2F124F75D176301882F967B3B94DB766/2DD88846F12F1B579BDE3EF6F99115B6
with module.lz_services_policy[0].oci_identity_policy.these["a2i-services-policy"],
on .terraform/modules/lz_services_policy/policies/main.tf line 22, in resource "oci_identity_policy" "these"
22: resource "oci_identity_policy" "these" {

this was applied to a DRCC region OC15 BDCCL Dedicated Region.

Hi mshimul, thanks for reporting. We'll get this addressed in our next release.

Hi @mshimul ,
We have added a fix for this in release 2.8.2.
We hope this resolves this issue.
Thanks,
Josh


Potential race condition in aio_command_finish?

I'd like to get a second opinion on whether there is a potential race condition in aio_command_finish.
What does aio_command_finish do?
On entry into the function we call tcmur_tcmulib_cmd_complete which locks the device's cmds_list_lock and then calls tcmulib_command_complete to update the command ring tail. We then unlock the cmds_list_lock and call tcmulib_processing_complete to notify the kernel that there are commands to reap.
The Problem
We can have multiple threads calling into aio_command_finish concurrently. This means we can have one thread calling tcmulib_command_complete (updating the ring buffer tail) while another thread is calling tcmulib_processing_complete. tcmulib_processing_complete subsequently calls into tcmu_handle_completions on the kernel side (see target_core_user.c).
As far as I can tell there is insufficient synchronisation between the user-space thread which is updating the command ring tail pointer and the kernel thread which is reading the command ring tail pointer. Our tcmulib_command_complete thread is essentially doing:
tcmulib_command_complete()
    entry = list->tail
    entry->cmd_id = 42
    list->tail++

while our kernel thread is doing:
tcmu_handle_completion()
    while (last != READ_ONCE(list->tail))
       entry = last;
       if !find_cmd(entry->cmd_id)
          print_error("cmd_id %u not found, ring is broken\n")
       last++

Now, unless I'm misunderstanding something I believe that the CPU is entitled to re-order the instructions in tcmulib_command_complete could be re-ordered at runtime such that the increment to list->tail happens BEFORE the assignment to entry->data. In pseudo-code, something like:
 entry = list->tail
 list->tail++
 entry->cmd_id = 42

Whether this happens, and how likely it is to happen probably depends on the CPU architecture. If this was to occur then it would be possible for tcmu_handle_completions to access an entry via list->tail before the store to cmd_id has been made visible. This would result in a bogus value for cmd_id being read and potentially the call to find_cmd would fail, or worse result in the wrong command being processed. The READ_ONCE on the kernel side ensures that list->tail is always read (rather than being read from a cached value in a register), but it DOES NOT ensure that the stores to entry in user-space are only made visible once the increment of the tail pointer has been made visible.  As far as I understand the store/load to list->tail should use relevant atomics or a memory barrier to ensure the correct synchronisation?
I'd appreciate it if someone were to review my logic! I definitely feel like I could have missed something. I'll see if I can repro it with tcmu-runner.

I've managed to repo the problem on a couple of aarch64 machines (Fedora 36 (aarch64), 5.19.12-200.fc36.aarch64 and Rocky Linux release 8.4 (Green Obsidian), 4.18.0-305.3.1.el8_4.aarch64). I can't repro the problem on x86.
Repro steps:

Check out this branch https://github.com/geordieintheshellcode/tcmu-runner/tree/tcmu-race-condition. It's master with some extra scripts and a modification to the CMakeLists.txt to install the file_example handler.
Build and install
Run ./create.sh to create a 1 GiB file-backed TCMU backstore and hook it up to a SCSI HBA/LUN.
Find the SCSI device and run fio against it: sudo FILE=/dev/sda QD=128 BS=4k fio randwrite.fio

After a while (almost instantly one of my test machines, on the other it takes a few minutes), you'll see a bunch of write commands failing in dmesg and the target_core_user module reports that the ring is corrupted:
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#339 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#339 CDB: Write(10) 2a 00 00 1c c9 f8 00 00 08 00
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#276 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#276 CDB: Write(10) 2a 00 00 1d cd b8 00 00 08 00
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#451 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[Mon Oct  3 17:23:50 2022] sd 0:0:1:0: [sda] tag#451 CDB: Write(10) 2a 00 00 15 b1 78 00 00 08 00
[Mon Oct  3 17:23:53 2022] sd 0:0:1:0: [sda] tag#704 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[Mon Oct  3 17:23:53 2022] sd 0:0:1:0: [sda] tag#704 CDB: Write(10) 2a 00 00 16 64 78 00 00 08 00
[Mon Oct  3 17:23:53 2022] cmd_id 6 not found, ring is broken
[Mon Oct  3 17:23:53 2022] sd 0:0:1:0: [sda] tag#901 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[Mon Oct  3 17:23:53 2022] ring broken, not handling completions

What's a bit confusing is even after applying the following patch to ensure that only a single thread is calling tcmur_tcmulib_cmd_complete and tcmulib_processing_complete at once, I still see failed write commands.
diff --git a/tcmur_cmd_handler.c b/tcmur_cmd_handler.c
index 01d6a10..20266e0 100644
--- a/tcmur_cmd_handler.c
+++ b/tcmur_cmd_handler.c
@@ -64,18 +64,24 @@ void tcmur_tcmulib_cmd_complete(struct tcmu_device *dev,
        pthread_cleanup_pop(0);
 }

+static pthread_mutex_t mega_lock = PTHREAD_MUTEX_INITIALIZER;
+
 static void aio_command_finish(struct tcmu_device *dev, struct tcmulib_cmd *cmd,
                               int rc)
 {
        struct tcmur_device *rdev = tcmu_dev_get_private(dev);
        int wake_up;

+       pthread_mutex_lock(&mega_lock);
+
        tcmur_tcmulib_cmd_complete(dev, cmd, rc);
        track_aio_request_finish(rdev, &wake_up);
        while (wake_up) {
                tcmulib_processing_complete(dev);
                track_aio_wakeup_finish(rdev, &wake_up);
        }
+
+       pthread_mutex_unlock(&mega_lock);
 }

dmesg:
[Tue Oct  4 11:47:03 2022] sd 0:0:1:0: [sda] tag#245 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[Tue Oct  4 11:47:03 2022] sd 0:0:1:0: [sda] tag#245 Sense Key : Hardware Error [current]
[Tue Oct  4 11:47:03 2022] sd 0:0:1:0: [sda] tag#245 Add. Sense: Internal target failure
[Tue Oct  4 11:47:03 2022] sd 0:0:1:0: [sda] tag#245 CDB: Write(10) 2a 00 00 1c 1a 78 00 00 08 00
[Tue Oct  4 11:47:03 2022] blk_update_request: critical target error, dev sda, sector 1841784 op 0x1:(WRITE) flags 0x8800 phys_seg 1 prio class 0

and tcmu-runner.log:
2022-10-04 11:47:03.880 66678 [ERROR] check_iovec_length:143 file/file: iov len mismatch: iov len 4096, xfer len 40704, block size 512

This is quite odd as the fio is only writing 4096 B blocks! I wonder if we have a similar problem with the tcmur_cmdproc_thread thread calling tcmulib_get_next_command and clashing with the kernel thread which is updating the ring buffer. I've not had time to investigate this.

@geordieintheshellcode This sounds reasonable and could happen IMO.
Could you raise one PR to fix this ? Thanks!

Sorry I've been quite busy recently. I will open a PR as soon as I can. Cheers


Adding notifications on builds.

Current coverage is 98.66% (diff: 100%)

Merging #65 into master will not change coverage

@@             master        #65   diff @@
==========================================
  Files            60         60
  Lines          1725       1725
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           1702       1702
  Misses           23         23
  Partials          0          0

Powered by Codecov. Last update bb3b700...40f135f

Looks good.  Add me.

Looks good


 Can you only print that message when I actually try to use your reporter please?
(If you want to push back on my use-case, we have lots of static analysis tools which load all constants we can find and do things to them. Just by loading your constant we get STDOUT spew when we had no intention of running the reporter).

Just to clarify:  "loading your constant" mean "loading your file"?

Yes

fixed by 406cdc83de197bb92391a684f051434c44fe1ee3
Will contact RubyMine's team to let them time to test the change before releasing a new version.


Update compile.sh

Update fetching structure

Thanks! Looks robust enough for the common cases. For people hacking on a bunch of kernels it may throw you for a loop, but you should be able to figure out what's going on with that error message.


PATH variable not available in non-interactive shells on Linux

I'm trying to deploy code using Ansible, which (very indirectly) runs cargo via non-interactive ssh session.
Rustup modifies PATH in ~/.profile on Linux, but AFAIK this file is only used for interactive sessions. ~/.bashrc is used for both interactive and non-interactive sessions, so it may be a better place to modify path.

Could you add a line in your ~/.bashrc to source ~/.profile?
I've done some digging and found why this is like this. Basically, for Desktop Environments.
Relevant part:

For example if a user launches application (IDE or Emacs, for example) via desktop environment and not via command line, then the PATH will be wrong.

There's basically no good solution to this: .profile is about the closest there is to a per-user setting, and excepting some shells which ignore that in favour of a shell-specific file, it should be sourced on login.
Unfortunately, for whatever reason, ssh sessions do not run in a login shell, despite logging in the user :angry:
For the moment at least, if you're a linux user, you're going to have to know where this needs to be sourced to meet your needs. The best we can do is make that as easy as possible.

Another variant of https://github.com/rust-lang-nursery/rustup.rs/issues/371


Suggestions for getting titles and filenames into a matrix

Have you gotten everything you need out of this pull request? Can I just close it?


fix: correct argument length check in FlagSet.Parse

The previous check len(arguments) < 0 was meaningless because the length
of a slice cannot be negative.
And format comments for better readability (automatic format)

 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.

Mind adding a test for this?

Done.


add robot to the simulator on startup

including walls,

will need a reset button which will reset the environment.

the robot is now in the scene thanks to #46 but we still need reset functionality


Feature request: Filtering and search

Loving this plugin - it's a gamechanger. Would love to be able to filter or narrow down with search. Not important, just an idea.

+1 to the ability to search a note's influx section when searching a note. My typical use case is that everything lives in daily notes and link to specific topic notes, so within a topic note, all of the content is from influx backlinks, but I'm not able to search the backlinked content within the topic note.

I use this plugin, but really love the structring of influx. Would love a search feature as well
https://github.com/nothingislost/obsidian-query-control

I really would appreciate this addition too. It would make my whole workflow faster and easier


Browser navigation issue on my simple demo

Hi all, I am a newer for ui-router. I met an issue on my simple demo. The browser navigation not works as expected. It works as below pic:

my simple code:

    <title></title>

Navigator Demo

    nav
    s_1
    s_2
    s_3

Did I make any mistake?

There is a typo in your code: abtract: true, should be abstract: true,
Please, create a plunker.

Thanks Joba. But after correct the typo, it still can not work. Please check the Plunker:
http://plnkr.co/edit/Ut0Ddm9QRQNyL8IOMdqu?p=preview

I'm pretty new to ui-router, but abstract states cannot be activated on its own. Remove abstract: true and the navigation will work: fixed-plunker
$stateProvider doc says:

An abstract state will never be directly activated, but can provide inherited properties to its common children states.

Closing due to inactivity


Upstream change to support Hardhat verify

SUMMARY

We want to support Hardhat users who want to verify using Sourcify. Complete this task.
ISSUE TYPE

Feature Idea

COMPONENT NAME

Integration.
ADDITIONAL INFORMATION

Have made a PR upstream on hardhat-verify