stop ec2 instance failed with golang sdk: Unable to create moto backend app for empty service: "None"

Reporting Bugs

Start localstack

SERVISCES=kinesis,s3 IMAGE_NAME=localstack/localstack:0.12.5 TMPDIR=/private$TMPDIR localstack -d start --docker

Create ec2 instance with aws client

aws --endpoint-url=http://<IP_ADDRESS>:4566 ec2 run-instances --image-id ami --count 1 --instance-type t2.micro --key-name test

and can see the instance is created:
aws --endpoint-url=http://<IP_ADDRESS>:4566 ec2  describe-instances

Use golang code to stop this instance

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	awscfg "github.com/aws/aws-sdk-go-v2/config"
	"github.com/aws/aws-sdk-go-v2/credentials"
	"github.com/aws/aws-sdk-go-v2/service/ec2"
)

func main() {
	ctx := context.Background()
	opts := []func(*awscfg.LoadOptions) error{
		awscfg.WithRegion("us-east-1a"),

		awscfg.WithEndpointResolver(aws.EndpointResolverFunc(func(service, region string) (aws.Endpoint, error) {
			return aws.Endpoint{URL: "http://<IP_ADDRESS>:4566"}, nil
		})),
		awscfg.WithSharedConfigProfile("localstack"),
	}

	opts = append(opts, awscfg.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(
		"test",
		"test",
		"",
	)))

	cfg, err := awscfg.LoadDefaultConfig(ctx, opts...)
	if err != nil {
		fmt.Println(err)
		return
	}
	ec2client := ec2.NewFromConfig(cfg)

	_, err = ec2client.StopInstances(context.TODO(), &ec2.StopInstancesInput{
		InstanceIds: []string{"i-07ad55738134bc40c"},
	})
	if err != nil {
		fmt.Println(err)
		return
	}
}

and the localstack print error:
2021-01-28T13:34:48:WARNING:localstack.multiserver: Unable to create moto backend app for empty service: "None"
2021-01-28 13:34:48,369:API: Error on request:
Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 323, in run_wsgi
    execute(self.server.app)
  File "/opt/code/localstack/.venv/lib/python3.8/site-packages/werkzeug/serving.py", line 312, in execute
    application_iter = app(environ, start_response)
  File "/opt/code/localstack/.venv/lib/python3.8/site-packages/moto/server.py", line 173, in __call__
    return backend_app(environ, start_response)
TypeError: 'NoneType' object is not callable

First of all, us-east-1a is not a valid region.  Second of all, you need to make sure that your custom endpoint resolver is properly configured with a region: return aws.Endpoint{URL: "http://<IP_ADDRESS>:4566", SigningRegion: region}, nil
Using your example code and changing the region to us-east-1 and making the needed endpoint change resulted in a successful call to the moto server for me.

First of all, us-east-1a is not a valid region.  Second of all, you need to make sure that your custom endpoint resolver is properly configured with a region: return aws.Endpoint{URL: "http://<IP_ADDRESS>:4566", SigningRegion: region}, nil
Using your example code and changing the region to us-east-1 and making the needed endpoint change resulted in a successful call to the moto server for me.

First of all, us-east-1a is not a valid region. Second of all, you need to make sure that your custom endpoint resolver is properly configured with a region: return aws.Endpoint{URL: "http://<IP_ADDRESS>:4566", SigningRegion: region}, nil
Using your example code and changing the region to us-east-1 and making the needed endpoint change resulted in a successful call to the moto server for me.

Thanks! It works for me!
But I have a question, I use aws client to describe ec2 instance, the result is as follow:
{
    "Reservations": [
        {
            "Groups": [],
            "Instances": [
                {
                    "AmiLaunchIndex": 0,
                    "ImageId": "ami",
                    "InstanceId": "i-5424c5fcbf4cba60a",
                    "InstanceType": "t2.micro",
                    "KernelId": "None",
                    "KeyName": "test",
                    "LaunchTime": "2021-02-01T02:44:20+00:00",
                    "Monitoring": {
                        "State": "disabled"
                    },
                    "Placement": {
                        "AvailabilityZone": "us-east-1a",
                        "GroupName": "",
                        "Tenancy": "default"
                    },
                    "PrivateDnsName": "ip-10-32-158-103.ec2.internal",
                    "PrivateIpAddress": "<IP_ADDRESS>",
                    "ProductCodes": [],
                    "PublicDnsName": "ec2-54-214-42-115.compute-1.amazonaws.com",
                    "PublicIpAddress": "<IP_ADDRESS>",
                    "State": {
                        "Code": 16,
                        "Name": "running"
                    },
                    "StateTransitionReason": "",
                    "SubnetId": "subnet-7c21d116",
                    "VpcId": "vpc-7f39ff91",
                    "Architecture": "x86_64",
                    "BlockDeviceMappings": [
                        {
                            "DeviceName": "/dev/sda1",
                            "Ebs": {
                                "AttachTime": "2021-02-01T02:44:20+00:00",
                                "DeleteOnTermination": true,
                                "Status": "in-use",
                                "VolumeId": "vol-38aa5b98"
                            }
                        }
                    ],
                    "ClientToken": "ABCDE0000000000003",
                    "EbsOptimized": false,
                    "Hypervisor": "xen",
                    "NetworkInterfaces": [
                        {
                            "Association": {
                                "IpOwnerId": "000000000000",
                                "PublicIp": "<IP_ADDRESS>"
                            },
                            "Attachment": {
                                "AttachTime": "2015-01-01T00:00:00+00:00",
                                "AttachmentId": "eni-attach-3a2e9f7c",
                                "DeleteOnTermination": true,
                                "DeviceIndex": 0,
                                "Status": "attached"
                            },
                            "Description": "Primary network interface",
                            "Groups": [],
                            "MacAddress": "1b:2b:3c:4d:5e:6f",
                            "NetworkInterfaceId": "eni-a32e6b37",
                            "OwnerId": "000000000000",
                            "PrivateIpAddress": "<IP_ADDRESS>",
                            "PrivateIpAddresses": [
                                {
                                    "Association": {
                                        "IpOwnerId": "000000000000",
                                        "PublicIp": "<IP_ADDRESS>"
                                    },
                                    "Primary": true,
                                    "PrivateIpAddress": "<IP_ADDRESS>"
                                }
                            ],
                            "SourceDestCheck": true,
                            "Status": "in-use",
                            "SubnetId": "subnet-7c21d116",
                            "VpcId": "vpc-7f39ff91"
                        }
                    ],
                    "RootDeviceName": "/dev/sda1",
                    "RootDeviceType": "ebs",
                    "SecurityGroups": [],
                    "SourceDestCheck": true,
                    "StateReason": {
                        "Code": "",
                        "Message": ""
                    },
                    "VirtualizationType": "paravirtual"
                }
            ],
            "OwnerId": "000000000000",
            "ReservationId": "r-da1139ef"
        }
    ]
}

why the AvailabilityZone is us-east-1a but I need to update it to us-east-1 in the code?

Each region has multiple availability zones: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html

Each region has multiple availability zones: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html

thanks！

Thanks for the solution @bpandola! Happy to hear his is resolved.


⚠ Bofrost.es has degraded performance

In ff2d607, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1724 ms

Resolved: Bofrost.es performance has improved in 3c7be9b after 9 minutes.


Bluetooth: controller: Fix PREAMBLE_SIZE define

Fix PREAMBLE_SIZE define to handle phy parameter value of 0
as 1M PHY. Certain parts of controller implementation
for control procedure evaluate to 0, in which case 1M PHY
is to be assumed.
In the related issue #26252, in the sniffer log it is seen
that the controller returns 2112 us instead of 2120 us due
to evaluation of phy parameter to 0 and passed to PKT_US
define.
Relates to #26252.
Signed-off-by: Vinayak Kariappa Chettimada<EMAIL_ADDRESS>

Removed v2.4.0, this PR related issue will be  verified using conformance testing, and if the issue is confirmed, the fix will be incorporated post release.


Passing exit code of the test back to bazel

Script used for parallel GPU execution does not pass the exit code of the test to bazel (always return with exit 0), so failures are shown as PASS in the summary.

Can one of the admins verify this patch?

Jenkins, test this please.

Interesting catch. It seems like our CI was able to report failures fine without this though.
Your analysis makes sense, but I wonder how our CI reported failures.

This is strange indeed - even running false gives exit code 0 when running under old version of the script.

The GPU tests ended up on a faulty machine, rerunning:
Jenkins, test this please.


I can not create Stager.. mshta, regsvr and another after update koadic

Kali Linux 2018
Traceback (most recent call last):
File "/root/koadic/core/shell.py", line 50, in run
self.run_command(cmd)
File "/root/koadic/core/shell.py", line 83, in run_command
self.actions[action].execute(self, cmd)
AttributeError: 'module' object has no attribute 'execute'

I can't replicate this behavior on my box, but I'll run a Kali instance to check just to be sure. Can you confirm that the execute method is present in core/commands/run.py?

If I can run koadic with python3.6 that OK)

Soluiton to this problem is simply and doesn't involve in Python version, Koadic can run just with Python3 or Python3.9. In my case the problem was caused by WRONG stager. So before generate stager for wmic you need to CHANGE stager:
$ use stager/js/wmic
then createstager
I'm feeling dumb becase i had this error for a while.


grub2_full: turn into alias

Description of changes
make this an actual alias, instead of having two attributes for the same package
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Do we have plans for how we'll handle the deprecation of the alias? It probably should go through a warning phase before going directly to a throw.

So, how do we proceed here @samueldr? I don't think "waiting until we have warnings for aliases" is ideal.


[Feature] Tailwind CSS V2 Support

Support using this plugin with both tailwindcss@v3 and tailwindcss@v2.

Pending on https://github.com/web-infra-dev/rslib/issues/413

👀 Does this issue rely on https://github.com/web-infra-dev/rslib/issues/413 to build this package itself?

Yes, I'm going to check tailwindcss/package.json#version and use a different Rspack plugin for Tailwind CSS V2. And currently this will give an error since Rslib removes the Import Attributes.
But there is another way to support Tailwind CSS V2. By publishing a different version of this plugin for Tailwind CSS V2.

How about using fs and require.resovle to read tailwindcss/package.json?

Yeah, we should go this way. I just checked that Import Attributes is not supported in NodeJS 16 :)
> import('./package.json', { with: {type: 'json'} })
Promise {
  <pending>,
  [Symbol(async_id_symbol)]: 255,
  [Symbol(trigger_async_id_symbol)]: 5
}
> Uncaught:
TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///root/package.json" needs an import assertion of type "json"
    at __node_internal_captureLargerStackTrace (node:internal/errors:478:5)
    at new NodeError (node:internal/errors:387:5)
    at validateAssertions (node:internal/modules/esm/assert:82:15)
    at defaultLoad (node:internal/modules/esm/load:84:3)
    at nextLoad (node:internal/modules/esm/loader:163:28)
    at ESMLoader.load (node:internal/modules/esm/loader:605:26)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
    at new ModuleJob (node:internal/modules/esm/module_job:63:26)
    at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:480:17)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15) {
  code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'
}
> process.version
'v16.20.0'


Cooperation with https://github.com/brendonparker/nuimo-client.js

Hi,
cool that you're making a node.js client for Nuimo :)
There is already another one around at https://github.com/brendonparker/nuimo-client.js - Have you looked at possibilities for cooperation there?
I created a typescript-based variant at https://github.com/wind-rider/typed-nuimo-client.js of that library since I wanted to work strongly typed. You can also have a look there :)

Hi, thanks for the reply! I didn't see that one until I was publishing this one, but I saw it afterwards. It does however do a few things I'm not keen on, namely the use of callbacks for what, in my opinion, should be events.
In my view callbacks are more appropriate for one shot responses, such as querying a database, or checking the status for something, or waiting for something to happen. When something is expected to happen more than once and when not explicitly requested, an event is more appropriate.
I do however like TypeScript, so if you wanted to work together on creating a TypeScript variant, I'd love to. :)


Feature Request: Allow custom git-like subcommands for lxc

It would be a good idea to support the execution of custom git-like subcommands. For example, I would like a command to launch and execute a shell into the container directly, so I would create an script called "lxc-go" and I would place it at ~/.bin (or somewhere else) and lxc should allow run this command directly with "lxc go".

This sounds like a nice feature to have but likely requires some discussion. git does this by using the prefix git- to recognize such subcommands.

Yeah, we'd certainly not implement this by looking at lxc-* subcommands or similar tricks as that'd directly conflict with existing commands for LXC itself. Also we don't want to look at random fs paths because that makes LXD's behavior unpredictable.
I'm not against adding a way to define additional external subcommands through ~/.config/config.yml but I do question what you really gain by defining a new "lxc blah" command vs just having a lxc-blah script in your PATH.

Using "lxc blah" instead of "lxc-blah" is only for coherence with lxd (2.0) subcommands. And for convenience, obviously (not to remember if we have to write a dash or not depending on the command).
And I think using ~/.config/lxd/config.yaml (or somewhere else) to add custom commands is also a nice idea, like git aliases.

Yeah, we have aliases support already in .config/lxc/config.yml but those won't let you call external binaries, so it'd have to be something similar but for external commands.

Ok, so we have the aliases system right now, lets just extend it slightly to allow aliasing to external commands.
The easiest and most straightforward way to do that is by simply making it so that if an alias points to a value starting with a leading /, we'll consider it to be an external command and just run that instead. The rest of the aliases feature will still go like the @ARGS@ placeholder.
So you would be able to do something like:
lxc alias add ssh "/usr/bin/ssh<EMAIL_ADDRESS>-l ubuntu -i /home/stgraber/.ssh/keys/lxd"

Which would then (assuming you've got your DNS setup accordingly) do lxc ssh c1


vEthernet Initial RTO timeouts

Good day!
Please let me know if I've posted this to the wrong support channel
My team is using windows containers on a windows server 2019 physical machine, leveraging the default NAT network and are noticing an intermittent delay when connecting to TCP sockets either from:

container to a server on its host
a container to a server in another container on the same host
the host to a server running in a container (on that same host)
But not:
container to itself
host to itself

For example, using this script on the host:
$endpoint = New-Object System.Net.IPEndPoint ([System.Net.IPAddress]::Any, 81)
$listener = New-Object System.Net.Sockets.TcpListener $endpoint
$listener.Start()
do {
    $client = $listener.AcceptTcpClient() # will block here until connection
    echo $client
    $client.Dispose()
} while ($true)

and this script running inside of the container:
function Test-TCPPort{
    Param(
        $HostAddress = 'HOST_IP_HERE',
        $HostPort = 81
    )
    $socket = New-Object Net.Sockets.TcpClient
    Try{
        $socket.Connect($HostAddress, $HostPort)
        Write-Host "Connected"
    }
    Catch{
        Write-Host $_
    }
    Finally{
        $socket.Close()
        $socket.Dispose()
    }
}
(measure-command { Test-TCPPort  }).TotalSeconds

We are seeing results such as the following (note the 2nd last result; tests below run from container client -> server on host):
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
0.0011696
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
0.0011756
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
0.0011102
PS C:\>
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
0.0011874
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
3.0023414
PS C:\> (measure-command { Test-TCPPort  }).TotalSeconds
Connected
0.0012115

The latency is very intermittent, it can happen twice in a row, or it can be many runs apart, but on average it occurs roughly once in every 5-50 connections.  We have noticed, however, that the delay (3s as noted above) does reflect the "Initial RTO" timeout configured at:
>netsh interface tcp show global
Querying active state...

TCP Global Parameters
----------------------------------------------
…
Initial RTO                         : 3000
…

In other words, if we change the Initial RTO, the latency we observe changes accordingly.
We have also looked at some netsh capture logs captured at the time the issue occurred and noticed the following:
TCPIP: Transport (Protocol TCP, AddressFamily = IPV4) dropped 1 packet(s) with Local = HOST_IP_HERE:81, Remote = HOST_IP_HERE:50223.
Reason = Listener dropped SYN because SO_PAUSE_ACCEPT was set.

However, we're not able to find much, if any, documentation about the SO_PAUSE_ACCEPT flag online, so hit a wall there.
We would be quite interested to know if anyone else is able to reproduce this on their machines, or if it is something specific to our own setup, and/or if anyone has any ideas what might be causing the packets to be dropped, and what might be done to remedy the problem!
Some environment details below:
Docker version:
> docker version
Client: Mirantis Container Runtime
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        b3766ff
 Built:             06/29/2021 17:14:16
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Mirantis Container Runtime
 Engine:
  Version:          20.10.6
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.13.15
  Git commit:       a3dc69e6b9
  Built:            06/29/2021 17:12:49
  OS/Arch:          windows/amd64
  Experimental:     false

OS Version:
Windows Server 2019
> (Get-CimInstance Win32_OperatingSystem).version
10.0.17763

Container Image (issue replicated on a base servercore image):
REPOSITORY                                              TAG          IMAGE ID           CREATED
mcr.microsoft.com/windows/servercore   ltsc2019   86eddd4761f5   12 months ago

Just hoping to follow up with this - I'm still able to reliably reproduce the issue; if anyone has any debugging tips they'd like me to try I'm all ears!

I am following up with some teams at Microsoft for more guidance and recommended steps.

Some feedback from experts:
SO_PAUSE_ACCEPT is set when a listening socket’s backlog fills up (i.e. when the application calls accept() or whatever .NET wrapper API too slow to keep up with the rate of inbound connections). So this is most likely an issue with the server application.
You can get more details by running the following ETW trace:
netsh trace start provider=Microsoft-Windows-Winsock-AFD keywords=0xffffffff level=5
Look for “TlBacklogCount”, “Current Backlog”, “Backlog Count” from the converted trace. This will get a more clear idea of what’s the maximum backlog (to be accepted connection) supported and how it gets filled up, as well as when the pause/unpause happen.
My impression is this might be more of a question/issue for .NET API owners, rather than an issue with containers stack. Have you considered raising an issue with .NET API owners as well for help?

Thank you kindly for the response @daschott !  I am away for a week but will try your suggestions upon my return.  As for whether or not it's a .NET issue, I had not yet considered that - I must admit I'm not fully familiar with where or how .NET is integrated into the container stack/vEthernet drivers.
It's probably worth noting that while my reproduction examples above are PowerShell scripts (.NET, likely?) I am able to reproduce the issue identically using a Python client/server setup, which I wouldn't expect to be impacted by any .NET APIs.
Also, I'm not sure if I mentioned it, but just as a bit of backstory the reason I'm chasing this bug is because I initially noticed this latency when proxying HTTP requests from one container to another via two Apache servers (which to my knowledge don't use .NET either).
Anyways, thanks for the suggestion and I will get back to you after I've had a chance to give it a whirl!
Warren

Good morning @daschott,
Another follow up - I have tested the server with a member of my IT team, testing the docker containers without IT's management software or antivirus running - unfortunately the latency was still present, so it seems that they were not causing it.
Which brings me back close to square one:

Is there perhaps another way for SO_PAUSE_ACCEPT to get set? Looking at the logs I didn't see a single record with any backlog values > 0 which seems peculiar given the description of it above
Regarding your .NET suggestion above; was that specific to the powershell server I gave in my initial post?  (As I can reproduce with python and Apache server; sans .NET) Or were you referring to another .NET piece somewhere that I am ignorant of
Would it be of any assistance if I were to send the logs to someone for inspection?  (I'm not sure I'd be comfortable posting them straight to Github)

Alternatively, if it's necessary I might be able to see about getting my organization to create some sort of a Microsoft support ticket; (we have a ton of microsoft servers being a Gov organization), I'm sure they have some sort of support setup figured out.

We gave up on process isolation because of this and related issues.  Disabling RSC "fixed it" for 2019 and 2022.  Issue 145.

Thanks for the suggestion @wagnerscastle,
I have tried disabling RSC support on the network adapter as indicated in #145 ; however it does not seem to have any impact on this issue.
Thanks again for the suggestion though!

Hi @warrenspe sorry for the long overdue response. I reached out to the team and was informed that WinNAT is a networking mode intended for development purposes in which unfortunately perf issues like this are expected. Instead, we are recommending l2bridge networking which does not exhibit performance issues:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/network-drivers-topologies#networking-modesdocker-drivers
Could you switch to l2bridge networking mode instead? If there are any performance issues here we would definitely want to know and help out.
https://aka.ms/winl2bridge

Hello @daschott,
Thanks for the reply!  I do recall attempting to use l2bridge back when I was initially trying to debug this, but I didn't have any luck; not because I ran into the same performance issues, but because my containers seemed to become unreachable.  Probably just some sort of a configuration issue on my end.
Anyways, I recently found out that the there are issues trying to build docker containers on the virtual machines that my organization is switching to, so it looks like my attempts at incorporating Docker into my company's workflow might be killed for a different reason anyways.
Thanks for your assistance with debugging this nonetheless!

I recently found out that the there are issues trying to build docker containers on the virtual machines that my organization is switching to

Not to rathole this issue thread on something unrelated, but I'm curious on this point -- any more info you can share on what the build issues are that you're seeing?


[Model Standardization]: BatteryPass 3.0.0

Link to Standards Document
https://catena-x.net/fileadmin/user_upload/Standard-Bibliothek/Update_PDF_Maerz/Sustainability_Use_Case_Circular_Economy/CX_-_0034_Data_Model_BatteryPass_UseCase_CE_v_1.0.1.pdf
MS1 Criteria

[x] The model exists
[x] There is a Catena-X standard referencing this model
[x] The model is in status "release"
[x] The model is not yet in status "standardize"
[ ] Release note entry for model version referenced in standard received link to standard document

Model file: https://github.com/eclipse-tractusx/sldt-semantic-models/blob/main/io.catenax.battery.battery_pass/3.0.0/BatteryPass.ttl

closed by #280


[Coverity CID :205662]Memory - illegal accesses in /samples/net/sockets/dumb_http_server_mt/src/main.c

Static code scan issues seen in File: /samples/net/sockets/dumb_http_server_mt/src/main.c
Category: Memory - illegal accesses
Function: client_conn_handler
Component: Samples
CID: 205662
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

*** CID 205662:  Memory - illegal accesses  (STRING_NULL)
/samples/net/sockets/dumb_http_server_mt/src/main.c: 168 in client_conn_handler()
162                        * be used in production code. This is done like this just
163                        * for this sample application to keep things simple.
164                        *
165                        * We are assuming here that the full HTTP request is received
166                        * in one TCP segment which in real life might not.
167                        */
     CID 205662:  Memory - illegal accesses  (STRING_NULL)
     Passing unterminated string "buf" to "strstr", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
168                        if (strstr(buf, "\r\n\r\n")) {
169                                        break;
170                        }
171        } while (true);
172
173        (void)sendall(client, content, sizeof(content));

False positive.


Retail predictions

Also, some tests are failing:
Failed RetailPredictions.Samples.Tests.PredictionFilteringTest.TestPredictionSimple [507 ms]
  Error Message:
   Grpc.Core.RpcException : Status(StatusCode="NotFound", Detail="servingConfig 'projects/1061780273775/locations/global/catalogs/default_catalog/servingConfigs/prediction' not found for catalog projects/1061780273775/locations/global/catalogs/default_catalog and project<PHONE_NUMBER>775. If you just created this resource (for example, by activating your project), it may take up 5 minutes for the resource(s) to be activated.", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1650533092.656747293","description":"Error received from peer ipv4:<IP_ADDRESS>:443","file":"/var/local/git/grpc/src/core/lib/surface/call.cc","file_line":1067,"grpc_message":"servingConfig 'projects/1061780273775/locations/global/catalogs/default_catalog/servingConfigs/prediction' not found for catalog projects/1061780273775/locations/global/catalogs/default_catalog and project<PHONE_NUMBER>775. If you just created this resource (for example, by activating your project), it may take up 5 minutes for the resource(s) to be activated.","grpc_status":5}")

And tests are failing.

I'd prefer if we did as we've done for all the rest of samples, that is to have a PR with just the samples and the tests, and another one for setup and cleanup.
Unless there's something I'm missing about this that is different to the rest.
About wether we have one or many cleanup and setup PRs, less discuss that internally. I've sent an email a couple of days ago looking for clarification as we have many setup and cleanup PRs that seems to overlap some. Thanks!!

@mkoshurnikov let me know about this one

Can be closed because it's outdated


Can I use Ubuntu 16 System on Jetson Xavier?

my program can only run on ubuntu16. How does Xavier brush the machine to ubuntu16?

Hi @zhearing, Jetson AGX Xavier (JetPack 4.1 and newer) supports Ubuntu 18.04.   Jetson TX2 and Jetson Nano also have now moved to Ubuntu 18.04 with JetPack 4.2.

@dusty-nv, thus could we switch to Ubuntu16.04 on Jetson AGX Xavier? If so, how?


Miscellaneous changes and improvements

Description

Supersedes #2837. Moves column sizing logic from the app to the browser (using flexbox), simplifying things.
Also moves out from Blueprint's CSS API for dialogs.
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[x] Code quality improvements

Checklist

[x] I have tested this code
[x] I have updated the documentation

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 14 (0.0%)  changed or added relevant lines in 8 files are covered.
11 unchanged lines in 9 files lost coverage.
Overall coverage increased (+0.04%) to 31.45%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
0
2
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
0
2
0.0%

src/pages/academy/groundControl/GroundControl.tsx
0
2
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
0
2
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
0
3
0.0%

Files with Coverage Reduction
New Missed Lines
%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
1
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
1
0.0%

src/pages/academy/groundControl/GroundControl.tsx
1
0.0%

src/pages/academy/dashboard/Dashboard.tsx
2
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.04%

Covered Lines:
4891

Relevant Lines:
14648

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

2 of 27 (7.41%)  changed or added relevant lines in 11 files are covered.
11 unchanged lines in 9 files lost coverage.
Overall coverage increased (+0.04%) to 31.45%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
0
2
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
0
2
0.0%

src/pages/academy/groundControl/GroundControl.tsx
0
2
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
0
2
0.0%

src/commons/editingWorkspaceSideContent/EditingWorkspaceSideContentManageQuestionTab.tsx
0
3
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
0
3
0.0%

src/commons/editingWorkspace/EditingWorkspace.tsx
0
8
0.0%

Files with Coverage Reduction
New Missed Lines
%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
1
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
1
0.0%

src/pages/academy/groundControl/GroundControl.tsx
1
0.0%

src/pages/academy/dashboard/Dashboard.tsx
2
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.04%

Covered Lines:
4891

Relevant Lines:
14648

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

2 of 27 (7.41%)  changed or added relevant lines in 11 files are covered.
11 unchanged lines in 9 files lost coverage.
Overall coverage increased (+0.04%) to 31.45%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
0
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
0
2
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
0
2
0.0%

src/pages/academy/groundControl/GroundControl.tsx
0
2
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
0
2
0.0%

src/commons/editingWorkspaceSideContent/EditingWorkspaceSideContentManageQuestionTab.tsx
0
3
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
0
3
0.0%

src/commons/editingWorkspace/EditingWorkspace.tsx
0
8
0.0%

Files with Coverage Reduction
New Missed Lines
%

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
1
0.0%

src/pages/academy/notiPreference/NotiPreference.tsx
1
0.0%

src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
1
0.0%

src/pages/academy/groundControl/GroundControl.tsx
1
0.0%

src/pages/academy/dashboard/Dashboard.tsx
2
0.0%

src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx
2
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.04%

Covered Lines:
4891

Relevant Lines:
14648

💛  - Coveralls


[REQUEST] Auto Updater For Openbullet

There should be an Auto Updater for openbullet as there are many hotfixes and mods on weekly or sometimes daily basis and its really pain in arse to download whole new version everytime,updating settings and importing databases.
Thanks

Hi, you might want to look into this user-made plugin https://forum.openbullet.dev/topic/939/plugin-updater-for-ob
I will take a builtin auto updater into consideration for OB2


Investigate a streaming implementation of the lexer.

Performance implications

Avoiding the Token Vector is a plus.
Lookahead queries could be done on up to K tokens ahead, so a small buffer would have to be maintained which may impair performance.

If we lose the Token Vector, look-behind becomes impossible. (not sure anyone uses it, but conceptually it could be used.
Naively it would be simple to implement the old none streaming API using the streaming API.
This would avoid code duplication and increased code base size, but the performance of that
much be evaluated too.
Could this completely replace the existing lexer?

This will probably be on the agenda at a later time, but not anywhere in the near future


Namespaced Repository CRD

Currently the Repositories CRD are Cluster scoped and doesn't check ownership of the namespace where it runs.
Problem
We query all of them and match them to the Payload request. So if the payload comes from the repository URL https://github.com/org/user we go over every CRD on clusters that match that url and launch it in the specified namespace from the CRD.
The problem is when you have a malicious user on cluster who would said :
Match this URL to that namespace of this other user which I want to exploit. And have a pipeline that grabs things in that other user namespace.
Possible Solution
As a possible solution we could switch the Repository CRD to "Namespaced" and only launch the Pipeline in the namespace where the user installed it.
In that way a CRD matching can only be made to a namespace the user belongs too.
Caveats
Since we are running namespaced, tools are not going to be able to say :
Show me all my repositories since they can be to multiple namespaces.
The Project api from OpenShift is here for that, since as user we have the permission to list all our projects/namespace created and tools can check for Repositories in there.
The only drawback is that we would be tight to a OpenShift implementation and would mean it would be hard to support it on Kubernetes unless we would only list the current namespace repositories.

Implemented in 99927c3f8e6549f1a8993d48a1474e5cb6f9cc8e and tested as such, doco shoudl come


Manifest 1.14 not there

https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json is being referred by dev.teams.microsoft.com, but is not there.

This is preventing the 1.14 Upgrade button from working in the Teams dev portal.


Discord RPC supports only C++ target platforms error building haxe completion

Describe your problem here.
C:/HaxeToolkit/haxe/lib/hxdiscord_rpc/git/hxdiscord_rpc/Discord.hx:4: characters 8-57 : Discord RPC supports only C++ target platforms.
receiving this error which is stopping haxe from building
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
no

discord_rpc being used macro find and add #if !macro


flash not working

Turn ON/OFF flash is not working.
parameters = camera.getParameters()
parameters.setFlashMode(Camera.Parameters.FLASH_MODE_ON);
camera.setParameters(parameters);

I don't know why it doesn't work.
Please help me if anyone has solution.
Thank you so much.

Did you able to record video with no error?

I have got some issue after record the video it plays very fast i dont know and didnot find the issue

can you please share the exact code ?

I have checked the mute checkbox and record the video, video created fine but I don't understand which mute logic I need to remove to fix it.  I need both video audio

love you alot it fixed by removing the muteAffect
thank you so much  :*

If it's fixed, why is the issue still open?


how to watch files change when used with postcss-cli -w

When used with postcss-cli, how to watch file changes.
postcss-cli support postcss-import with the following config:
{
  "postcss-import": {
    onImport: function(sources) {
      global.watchCSS(sources, this.from);
    }
  }
}

Is there a similar method? I found there is an option addDependencyTo, can it be used with postcss-cli?

postcss-partial import is now a layer of sugar atop postcss-import, so this feature is now available. However, note that addDependencyTo is being deprecated for a new method of tracking files. Please see their documentation.


add favicon

add favicon and display image for link previews

I can add a simple favicon.
Do you have one in mind and/or do you have a link preview image ready?


dropdown for navigatorIOS

Is there possible to add a dropdown for the right menu of navigatorIOS or navigator ?
<NavigatorIOS
        ref='nav'
        initialRoute={{
          component: MyView,
          title: 'Foo This',
          passProps: { myProp: 'foo' },
          rightButtonTitle: '+',
          onRightButtonPress: () => this._handleNavigationRequest(),
        }}
        style={{flex: 1}}
      />

@facebook-github-bot stack-overflow

Hey @Bruce-Jcw and thanks for posting this! @DanielMSchmidt tells me this issue looks like a question that would be best asked on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only. Will close this as this is really a question that should be asked on SO.


[Bug]: SAML app is unable to be deactivated

Preflight Checklist

[X] I could not find a solution in the documentation, the existing issues or discussions
[X] I have joined the ZITADEL chat

Environment
Self-hosted
Describe the bug
We integrated AWS with zitadel SSO, however upon creating (and successfully linking the 2 together) we saw that disabling the app in the interface did not mean logging in fails. AWS goes to zitadel and zitadel authorizes my request.
In short: disabling a SAML app does not disable it.
To reproduce

Create a zitadel integration with AWS
Disable said AWS SAML app in zitadel
Login to AWS

Screenshots
No response
Expected behavior
I expected to not be able to login to AWS
Version
v2.22.2
Operating System
K8s
Relevant Configuration
No response
Additional Context
No response

Hm this sounds really like a bug any idea on this @livio-a @stebenz

I followed the steps in the documentation: https://github.com/zitadel/zitadel/blob/main/docs/docs/guides/integrate/services/aws-saml.md


let last fetched summary override

instead of using the first summary that contains a field,
use the last one.  This is probably more useful in the
(very few) cases where you can see the difference.

@bratseth please review and merge

This is less efficient ... how about just adding the summaries to the list in reverse order (change add(summary) to add(0, summary) and keep everything else as-is?

i'll make index an offset from end instead, that should work...

Good idea!
Adding this case to the test would be nice too ...

@bratseth please take another look (now also extended test)


add new mandatory field to SNow payloads

coverage: 67.129% (+0.06%) from 67.067%
when pulling 8df05bcc2f6d5b18f84aed6af6c666fc6b6bdc1d on fix-snow-delivery
into 2c4e5fe52ca72e4d51bc40147996d194b714e3c4 on main.


Explorer: store state in the URL

It would be very nice to store the state of the explorer in the URL.  Currently it is fixed at http://localhost:3000/#/remoteExplorer if this was http://localhost:3000/#/remoteExplorer/drive:/path/dir then this would make it possible to save the URL and press refresh in the browser.

We need to figure out a way to store the current layout and also the remotes and path of all the remote explorers.

Using the syntax that rc uses would probably work, so [remote:path]/path/to/object  if you had multiple panes you could separate them with | or something like that.
So #[remote:path]/path/to/object or #[remote:path]/path/to/object|[remote2:path2]/path/to/object

This issue is fixed by using the redux store to store the current state of remote explorer.


Add test cases

Adding various regression testing cases for EPANET. A total of 45 tests are now available.

Regression testing on AppVeyor and Travis is operational but failing.

This is great, @michaeltryby - more benchmarks are really helpful. Two questions:

are the text report files needed for the tests?
any ideas as to why the regression is failing?

Hey @samhatchett!
Within the python package nrtest-epanet there are comparison routines for the binary output files and the text report files. Essentially, the report files get diffed with no comprehension of the content. This is useful in SWMM because the report files contain output not available from reading the binary file. This could also be useful for EPANET, for evaluating differences in engine convergence or other status messages. The downside is that diffing the report file makes for a very strict regression test.
Unfortunately, I have not had a chance to dig into the test results and determine why they are failing. But that is next on my list ...

Cool, thanks. My only other thought would be to put all the benchmarks on S3 or similar so they don’t contribute bloat to the repo. You have any opinions on hat?

@samhatchett storing benchmarks on S3 sounds useful. I am not opposed to doing that, but I don't have any idea how to do it either :smile:

S3 or similar is good idea. I can provide the hosting, something like:
http://epant-test.s3.amazonaws.com/2PRVs.out

@eladsal OWA already has an OWS account. @bemcdonnell set it up. I just don't know how to use it.

Even better! He should probably give you permissions and then use some explorer like tool. There are simple, explorer like, tools for managing the files. I use a commercial product but there is a freeware version too (can send you a link if you want). Maybe there are open source tools too.

I wil refer you to issue #159 for some light discussion on this topic

Closing this pull request. See Issue #159 for discussion.


Generated HQL for a Count Query with multiple Group By columns not producing valid SQL for MSSQL

Related to #1472
I think the fix introduced a bug. When I do aggregations on any column and add a new group by. It will generate a count query HQL that looks like this:
select count(distinct col1, col2)
// where col1 and col2 are the group by columns.

In MSSQL it will throw an exception as the generated SQL from the HQL is not valid SQL for MSSQL.
The issue has been touched on this hibernate issue:
https://hibernate.atlassian.net/browse/HHH-11042?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&showAll=true
With the result being to implement a dialect specific sql function for sql server that would create valid sql for this use case. The resulting sql would have the following format:
count(distinct coalesce(nullif(coalesce(col1 || '', '\0'), ''), '\01') || '\0' || coalesce(nullif(coalesce(col2 || '', '\0'), ''), '\02'))

Is there any way to do this right now in querydsl (i.e. add your own override count function to the count query)? What do you guys think a good workaround would be?
Thanks,
Gary

I had the same issue while doing a count on a select distinct query.
It is not M$SQL limitation, it is SQL language limitation.
Both count and distinct are aggregation functions, and you can't aggregate an aggregated result.
The only way I found is to do a select count(*) from (select distinct, but JPA specifications doesn't allow it.
So I tried using the SQLQueryFactory instead of JPAQueryFactory, but I didn't manage to "translate" the JPA generated query into a proper SQL query. If anyone has a hint, I would be glad to read it.
So... the workaround I used is to create a SQL view  with my select distinct and I easily use it with JPA.

Facing the same around here.
I had to create a count query distincting columns to simulate a count.

Facing this issue. It is a pretty basic issue and should be fixed. Is there any timeline for this? It seems like it is already long overdue.

I have a scenario to fetch count of following SQL.
select count( distinct col1, col2) from table
How do i do it using queryDsl JPAQuery?
Currently i have framed like this, however i don't have option to do counting DISTINCT over multiple columns.
jpaQuery
      .from(qTable)
      .where(wherePredicate).
      .select(qTable.col1, qTable.col2)
      .fetchCount();

Any suggestions?

Have you tried the following?
jpaQuery
.from(qTable)
.where(wherePredicate).
.select(qTable.col1, qTable.col2).distinct()
.fetchCount();

@jaumzera Yes, I had tried your query, however i'm getting SQL queries as
select count(distinct table.id) from table


Sparse accessor is wrong in some models

The following models are not drawn correctly.
Accessor_Sparse_00.gltf
Accessor_Sparse_01.gltf
Accessor_Sparse_03.gltf
from https://cx20.github.io/gltf-unit-test/
SimpleMorph/glTF-Sparse in Gltf-samples
┆Issue is synchronized with this Wrike Item

@KaYaF Those models use sparse accessors for animation, but Rhodonite has handled sparse accessors for meshes only.
So I fixed the rhodonite code to handle sparse accessors for animation.

You can test on https://editor.librn.com now.


There is to be a way to conveniently identify and perhaps offer fixes to documentation

The docs are not perfect. Some of the issues are obvious typos but others include convoluted phrasing and treatment of subject. Presently, there is no obvious way to report or suggest changes. That is a problem and a massive opportunity lose given the talents of the community. It is a lot easier to review and accept a change than to construct one.

Hi,
I definitely like the idea.
How do you imagine this could look like concretely?

Firstly, a voting system would help flag particularly problematic but frequently accessed pages.
Secondarily,  an edit button on each page that takes you to the actual editable document on github so that github's pull request process can be used conveniently to submit improvement suggestions.

An edit button makes most sense as a rustdoc feature, probably by being able to pass some "edit-url-template" that gets filled out with the manifest-relative source file etc. (to support non-github and workspaces). Voting seems more difficult, I don't know where the data would be stored and how it would get shown to the developers.

edit-url sounds awesome, though tricky.
Docs.rs shows a released version, and most of the time edits would happen on the main branch of the repo.
@Nemo157 but this sounds like this is likely a rustdoc change, not docs.rs?
So we could move this issue?

I suppose the vote count could be stored as a page element and possibly displayed.

edit-url sounds awesome, though tricky.
Docs.rs shows a released version, and most of the time edits would happen on the main branch of the repo.
@Nemo157 but this sounds like this is likely a rustdoc change, not docs.rs?
So we could move this issue?

It is an issue that affects the utility of Docs.rs. Perhaps rustdoc has become inadequate, a bottleneck. In any event,  ignoring this issue of effectfulness can't be a good option.

This issue affects the utility of Docs.rs.

Not only docs.rs, this also affects users that build the docs of other crates locally themselves. Which is a valid use-case for docs.

Perhaps current rustdoc has become inadequate, a bottleneck. In any event, ignoring this issue shouldn't be an option. Perhaps these two products are too interdependent.

Even without the rustdoc/docs.rs split, this would not be an easy or simple topic, taking all the different kinds of crates and how each builds its docs into account.
Personally I'm not sure how voting would help improve the docs, while having an easy way to create issues on the crates' repo, or directly get to the source-file, would definitely make improvements easier.
Since both features would need rustdoc changes, the next step (if you want to take it) is probably an initial design discussion on the https://github.com/rust-lang/rust repo (where rustdoc lives), or on https://internals.rust-lang.org/ .
cc @GuillaumeGomez

Voting would identify particularly good documentation and flag particular bad ones with an emphasis on those that are heavily used. It informs the author and potentially provides good, bad examples, and good changes. I suppose instead of a vote it may better be described or become a survey seeing that it would be useful if voters could also provide a rating on their personal experience level with Rust, the API, and perhaps other Rust API's, etc.

I'm not sure to see how voting would help here. It'd just be a way to flag some documentations as bad and that's pretty much where it would stop in my opinion. So not improving in any way.
It was mentioned that there was no easy way to help improve a documentation, but what's preventing users to open an issue on the repository directly?

Also cc @jsha and @Manishearth.

Lack of knowledge is what is preventing users from opening an issue with the underlining repository directly. Lack of knowledge is also why they come to the documentation in the first play. The UI of the documentation presentation needs to be improved.

Lack of knowledge is what is preventing users from opening an issue with the underlining repository directly. Lack of knowledge is also why they come to the documentation in the first play.

I think you're confusing "lack of knowledge about a given crate" with "lack of knowledge of how repositories work". And also, if someone doesn't have time to look how to report back to the original repository, I'm not sure if they'll be able to provide a useful feedback to the crate's owner(s)...

The UI of the documentation presentation needs to be improved.

Are talking about docs.rs crate page or rustdoc page? In any case, if you have suggestions, please open an issue either here (if docs.rs issue) or on https://github.com/rust-lang/rust (if rustdoc issue) and we'll happily discuss about them.

The search feature is also problematic as it fails to search examples which often include more conventional phrases for things as oppose to the unique or jargon used by APIs.

I suppose you didn't read the documentation (which leads to an interesting question: how could we make it easier to find)? Rustdoc search only look for API content (functions, struct, etc), not documentation content.

I am very very wary of adding features like voting, they are far too prone to rather complex social pressures.
People are able to link to their repository sources for feedback and that works pretty well . I do not think the Rust Project should take charge of facilitating feedback between users and crate authors; it requires very large amount of persistent work that we must commit to

GuillaumeGomez, I only belatedly became aware that rustdoc generates docs.rs content. Granted, I may have read it and forgot it earlier.
A Significant value can be derived from improvements in docs.rs considering the hundreds of thousands of people it serves on a monthly basis. Cutting their effort down by one minute means hundreds of thousands of minutes gain and thousands of hours freed to the community. It will also help new users tremendously over time as documentation improvements with assistance from those who use it gain their user perspective on treatment.

@gdennie welcome, and thanks for wanting to improve the state of documentation!
I agree with @Manishearth and @syphar. Voting on docs is socially complex. As a crate author I would be demotivated rather than encouraged by seeing that twenty people thought my docs were bad. It's also not very actionable - how do I know what problems people are having with them?
On the other hand, if someone takes the time to write a thoughtful comment describing what they're working on, what their experience level is, and what they found confusing or missing in the docs - that's extremely motivating! I'd be excited to write docs with a specific person in mind. It's always helpful to write with an audience in mind.
A "fork me on GitHub" style ribbon could lower barriers to small contributions, but I think that does not do much to improve the quality of documentation overall. Small drive-by edits (like typos) are great, but they are not as useful as thoroughly explaining the purpose of each type, how it interacts with other types, and what some common usage examples are. Also there is no need for a rustdoc or docs.rs feature to implement such a ribbon - doc authors can do it themselves using the full HTML support in rustdoc.
Writing docs is hard work. It's a different skill from writing code. If the people writing docs are not the authors of the code, it requires trust and rapport between them and the authors. Perhaps the most powerful thing that could be done with regards to improving crate documentation would be to establish an organized volunteer group that can offer crate authors a service: a prolonged engagement (e.g. 20 hours per crate) to expand and refine upon their docs. Is that something you'd be interested in trying, @gdennie?

Sure. Sounds like fun. How do we begin, @jsha?

I would recommend asking in community spaces like Reddit, users.rust-lang.org, perhaps the rust community discord, and seeing if there is interest.
I also recommend we close this issue, I don't think there's further action from the team here at the moment.


Inconsistent information on inclusion of Vulnerability Management

Hi, in the table-format breakdown of features Vulnerability Management is listed as not included in Plan 1, however below the table it's listed as included.
When selecting Plan 1 in Defender for Cloud it's also listed as included, so I believe the table is incorrect.

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

ID: c1c69fcb-4a11-b869-3e58-2130c6d938a9
Version Independent ID: 37190667-e7b3-eeec-fa38-a34fae4b54ec
Content: Select a Defender for Servers plan in Microsoft Defender for Cloud
Content Source: articles/defender-for-cloud/plan-defender-for-servers-select-plan.md
Service: defender-for-cloud
GitHub Login: @bmansheim
Microsoft Alias: benmansheim

@farces
Thanks for your feedback! We will investigate and update as appropriate.

@bmansheim
Could you Please review this and update as appropriate.

@farces
I'm going to assign this to the document author so they can take a look at it accordingly

#reassign:dcurwin

I see that Vulnerability Management is now included in the table as part of Plan 1. I'm closing this issue - but if there's anything still unclear, please let us know.
#please-close


[Fix bug] should remove decommission job type from enum

Proposed changes
Issue Number: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)

Does it affect the original behavior: (Yes/No/I Don't know)
Has unit tests been added: (Yes/No/No Need)
Has document been added or modified: (Yes/No/No Need)
Does it need to update dependencies: (Yes/No)
Are there any changes that cannot be rolled back: (Yes/No)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

Hi @yiguolei , please pay attention to your PR title: http://doris.incubator.apache.org/community/commit-format-specification.html#commit-format-specification


spago docs ignore failed files.

Currently spago docs failed on a file, it's probably a purs docs problem, but I hope spago can ignore the error, and generate docs/tags for other files.
$ spago docs -f ctags
Generating documentation for the project. This might take a while..
purs: An internal error occurred during compilation: Failed to decode: output/Data.String.CodeUnits/docs.jsonThe input could not be parsed as JSON
aeson said: Error in $: not enough input
Please report this at https://github.com/purescript/purescript/issues
CallStack (from HasCallStack):
  error, called at src/Language/PureScript/Crash.hs:24:3 in purescript-0.13.2-6QPLI9hJaMv7vmLTEn2Yqo:Language.PureScript.Crash
  internalError, called at src/Language/PureScript/Docs/Collect.hs:120:19 in purescript-0.13.2-6QPLI9hJaMv7vmLTEn2Yqo:Language.PureScript.Docs.Collect
spago: Docs generation failed.

I hope spago can ignore the error, and generate docs/tags for other files.

Spago passes compile targets to purs as globs, not one-by-one.
Did you try rm -rf output? If the problem persists, it's best to report it to https://github.com/purescript/purescript

@klntsky I tried to remove output/Data.String.CodeUnits/docs.json, then it runs ahead, then the error happens again on another module, I do it again for several times, finally it succeeds.

I've opened the issue in purescript(https://github.com/purescript/purescript/issues/3710), so I'm closing this now.


New version: th-ch.YouTubeMusic version v2.0.4

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service agree


(fix) Update OFAC list URL and filename

Summary by CodeRabbit

New Features

Updated the source URL and default filename for the OFAC list, enhancing data accuracy and relevance.
Added new entries to the OFAC list to improve compliance and monitoring.

Bug Fixes

Ensured that error handling remains intact during file reading and network fetching processes.

@PavelInjective please update the PR description to point to the Jira task


Implemented 9 new functions

I've added 2 new functions to:

Mark an article as unsaved
Get the content from an entryId

Added 7 functions

get_categories
get_sorted_categories
change_category_label
delete_category
get_user_preferences
update_user_preferences
delete_user_preference

@axsapronov

Sorry for long delay.
I missed github notification about PR.

Thanks for PR.

Bump version in PyPi


Rotating Text

Hi,
I had an issue where text would not rotate with a custom font using this library.  I resolved by modifying the APi.text method
Below transformationMatrix = [f2(c), f2(s), f2(s * -1), f2(c)];
I added
xtra = [f2(c), f2(s), f2(s * -1), f2(c), ''].join(" ") +  "";
mode = 'Tm';
I declared mode at the top of method and initialised to Td
I then modified the args passed into the out function as folllows:
out('BT\n/' + activeFontKey + ' ' + activeFontSize + ' Tf\n' + // font face, style, size
activeFontSize * lineHeightProportion + ' TL\n' + // line spacing
textColor + '\n' + xtra + f2(x * k) + ' ' + f2((pageHeight - y) * k) + ' ' + mode + '\n' + text + ' Tj\nET');
(added xtra and modified mode)
Looks to be working for me, hope this helps somebody!

can you explain more with more clear steps

This does allow rotating for me, but changes from my custom font to Times


Fix migration issues for fields with choices

Just upgraded to 0.11.0 and notice some errors on my migrations. There's no need to set covariant/contravariant on _GT/_ST.
The tests are just there to make sure that there are no errors anymore. If the code is reverted the test would fail

Thanks!


Add env module

I changed the env module as requested, except for the label part as there are endless of ways how to implement it so I'd leave that up to you.
However I added a separate label module, that allows you to display arbitrary text to the prompt.
So you could do:
flexprompt.settings.right_prompt = "{exit}{label:stage=PROD:color=red}"

or even:
stage=os.getenv("stage")
flexprompt.settings.right_prompt = "{exit}{label:stage=".. stage .."}"

This allows you to construct the text as you like using any supported Lua constructs. But the text is only generated once during config load.

You can also derive the label to display from somewhere else:
stage=os.getenv("stage")
flexprompt.settings.right_prompt = "{exit}{label:stage=".. stage ..":color=red}"

This allows you to construct the text as you like using any supported Lua constructs. But the text is only generated once during config load.

FWIW that technique is susceptible to "injection attacks" because external data is injected into a string that will be later processed.  If the external data contains certain kinds of characters it can cause the prompt to malfunction.  Strings can of course always be constructed however an author wants to, but where the content comes from and what safeguards exist can be important.


Comparing kube-apiserver version fails when tried to upgrade pharos cluster to 2.1.0

Comparing kube-apiserver version fails when tried to upgrade pharos cluster to 2.1.0-dev:
NoMethodError: undefined method `[]' for nil:NilClass
  /Users/lauri/Projects/pharos-cluster/lib/pharos/phases/upgrade_master.rb:17:in `upgrade?'

It seems that upgrade? method tries to search kube-apiserver:v(.+) from kube-apiserver.yml, but the format has changed to image: registry.pharos.sh/kontenapharos/kube-apiserver-amd64:v1.11.4

Actually 2.0.x has kube-apiserver-amd64:v1.x.x and 2.1.x has kube-apiserver:v1.x.x.


[DRAFT] Stack of updates to docs in preparation for 1.0

@benclifford Could you take a look at the monitoring section, please?


Glow Flicker Fix and Code Quality

Fixes the Glow Flickering issue and improves code and coding conventions

Sorry but this changes way too much of the plugin, i'll have to look for an alternative way to fix it.


Code signing issue for MacCatalyst build with 20.0.0

How frequently does the bug occur?
Always
Description
Using Xcode 16.0 RC with Realm 20.0.0, building iOS works but building macOS with MacCatalyst fails saying code object is not signed at all in RealmSwift
Stacktrace & log output
CodeSign /Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Products/Debug-maccatalyst/AppName.app (in target 'AppName' from project 'AppName')
    cd /Users/UserName/AppName

    Signing Identity:     "Apple Development: UserName (someID)"
    Provisioning Profile: "Mac Catalyst Team Provisioning Profile: UserName.AppName"
                          (94cc131e-1fe6-466c-ae39-5c88b9c8743c)

    /usr/bin/codesign --force --sign 671FA29D3E511DCA1B299BE15531E0543D055605 -o runtime --entitlements /Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Intermediates.noindex/AppName.build/Debug-maccatalyst/AppName.build/AppName.app.xcent --timestamp\=none --generate-entitlement-der /Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Products/Debug-maccatalyst/AppName.app

/Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Products/Debug-maccatalyst/AppName.app: replacing existing signature
/Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Products/Debug-maccatalyst/AppName.app: code object is not signed at all
In subcomponent: /Users/UserName/Library/Developer/Xcode/DerivedData/AppName-ghkifyxwnjrxsoevsnjmrngqdzfx/Build/Products/Debug-maccatalyst/AppName.app/Contents/Frameworks/RealmSwift.framework
Command CodeSign failed with a nonzero exit code

Can you reproduce the bug?
Always
Reproduction Steps
Build for Mac using MacCatalyst
Version
20.0.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
macOS Sonoma 14.6.1
Build environment
Xcode version: 16.0 RC
Dependency manager and version: Using the Carthage xcframework

Bump. This is happening on XCode 16.0 Release versions as well. Please fix.


Client requests '/v1/auth/self-info' when not logged in

When logging out,
Or accessing '/' when not logged in
results in Client requesting '/v1/auth/self-info' and getting response 401.
Also Client expects a object from the response, but gets a string, which results in a error.

The fix didn't work. Not calling the endpoint could be hard. It might be better to just not show the error in the client.


ExpandIcon should have a IconData field to overwrite Icons.expand_more

Hey @stephane-archer , thank you for using the package!
The ExpandIcon widget is part of the flutter flamework.

@baumths you are welcome, I didn't know ExpandIcon was part of Flutter. If we can't customize ExpandIcon then I would be glad if we can replace it with another class of your own or that the user define.

As the flutter framework already provides such a widget, I would recommend you to file an issue there so they add more customization options to the ExpandIcon widget instead.
In the meantime, I've put together an example using the AnimatedRotation widget, which you can copy and tweak to look as desired:
class MyExpandIcon extends StatefulWidget {
  const MyExpandIcon({super.key});

  @override
  State<MyExpandIcon> createState() => MyExpandIconState();
}

class MyExpandIconState extends State<MyExpandIcon> {
  bool isExpanded = false;

  @override
  Widget build(BuildContext context) {
    return IconButton(
      onPressed: () => setState(() => isExpanded = !isExpanded),
      icon: AnimatedRotation(
        turns: isExpanded ? 0.5 : 0,
        duration: kThemeAnimationDuration,
        child: const Icon(Icons.chevron_right),
      ),
    );
  }
}


fail the schema-update if there are existing Evidence or EvidenceVariable resource instances

Is your feature request related to a problem? Please describe.
Evidence and EvidenceVariable are the two resource types in R4B where a valid R4 instance is basically guaranteed not to parse.
That means that, after migration to our 5.0.0, certain interactions could blow up on any existing resources of this type in the db.
Describe the solution you'd like
To avoid a big surprise down-the-line, I think it would be better just to fail the schema-upgrade in cases where there is data in the Evidence_RESOURCES or EvidenceVariable_RESOURCES tables.
Describe alternatives you've considered
Provide steps to patch the old Evidence and EvidenceVariable resources instead
Acceptance Criteria

GIVEN [a precondition]
AND [another precondition]
WHEN [test step]
AND [test step]
THEN [verification step]
AND [verification step]

Additional context
EvidenceVariable too?

Implementation tips:
Add a new version to FhirSchemaVersion:
    ,V0030(30, "issue-3681 test for existence of Evidence and EvidenceVariable resources", false)

In com.ibm.fhir.schema.app.Main, see the method:
    protected void updateFhirSchema() {
        ...
                    // Finally, update the whole schema version
                    svm.updateSchemaVersion();
        ...

Before the svm.updateSchemaVersion() we''ll need a new method call which will check for data in the evidence_logical_resources and evidencevariable_logical_resources tables. That method will look
something like this:
    private boolean checkIfDataExistsForV0030() {

        IDatabaseAdapter adapter = getDbAdapter(dbType, connectionPool);

        try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {
            try {
                checkIfDataExistsForV0030(adapter, schema.getSchemaName());
            } catch (DataAccessException x) {
                // Something went wrong, so mark the transaction as failed
                tx.setRollbackOnly();
                throw x;
            }
        }
    }

    private void checkIfDataExistsForV0030(IDatabaseAdapter adapter, String schemaName) {
        TableHasData cmd = new s(schemaName, "evidence_logical_resources");
        if (adapter.runStatement(cmd)) {
            logger.severe("At least one Evidence resource exists. Cannot upgrade " + schemaName);
            return true;
        }
        cmd = new s(schemaName, "evidencevariable_logical_resources");
        if (adapter.runStatement(cmd)) {
            logger.severe("At least one EvidenceVariable resource exists. Cannot upgrade " + schemaName);
            return true;
        }
        return false;
    }

The checkIfDataExistsForV0030 should only be called if the current schema is less before V0030:
                    int currentSchemaVersion = svm.getVersionForSchema();
                    if (currentSchemaVersion < FhirSchemaVersion.V0030.vid()) {
                        if (checkIfDataExistsForV0030()) {
                             ...signal error
                        }
                    }

There are a number of example DAO command implementations you can use as the basic for the TableHasData class. GetXXLogicalResourceNeedsMigration is a good example. The SQL statement you'll want to be executing is as simple as:
    "SELECT 1 FROM evidence_logical_resources " + translator.limit("1");

Obviously the table name (evidence_logical_resources) will be configurable (a member variable of the DAO).

Because the table name is a parameter to the DAO command class, we should check it is a valid name (secure programming). DataDefinitionUtil has a couple of methods to support this. The simplest would be:
   this.tableName = DataDefinitionUtil.assertValidName(tableName);

in the constructor.

Unit testing this particular case is a bit more involved. Because we're already testing migration is successful, we don't need to test the use case where there are no Evidence resources (as this is already covered). We do need to test where Evidence resources exist. This requires:

build an old schema version which includes the Evidence resource type. It may be possible to create this schema with just this (and possibly EvidenceVariable) as tables. You may need one or two other resource-types too if there are other resource-type-specific migration steps.
create a record in evidence_logical_resources
perform the migration
check the migration fails with the expected error

This unit test will be in fhir-persistence-schema, which means you don't have access to the fhir-persistence-jdbc layer, so you need to create the resource record yourself using a plain insert:
            final String insert = "INSERT INTO " + tablePrefix + "_logical_resources (logical_resource_id, logical_id, is_deleted, last_updated, version_id) VALUES (?, ?, ?, ?, ?)";
            try (PreparedStatement stmt = conn.prepareStatement(insert)) {
                // bind parameters
                stmt.setLong(1, v_logical_resource_id);
                stmt.setString(2, 'evidence123');
                stmt.setString(3,  "N");
                stmt.setTimestamp(4, p_last_updated, UTC); // can use Instant.now() converted to timestamp
                stmt.setInt(5, 1); // initial version
                stmt.executeUpdate();
    }

The v_logical_resource_id value could probably be just 1. Theoretically it should be assigned the next val from fhir_sequence,  but for this test case I don't think it matters.
As for the migration itself, take a look at DerbyMigrationTest#testMigrateFhirSchema(). Note that you don't need to deal with any of the steps comparing the migrated database (because we're expecting it to fail with an exception).

Oh, because your DAO should be generic, it doesn't matter if you test Evidence or Observation. In this case because our tests currently use Observation, just go with that.

Unfortunately because we're not unit-testing the data migration logic contained in the Main class, this means that we won't have a unit test to check the schema version (< V0030) logic. We may have to check this with inspection and QA.

the schema upgrade is split into multiple transactions, so we need to move the check to the beginning to avoid complicated rollback logic

QA: Using a schema which contains tables for Evidence and EvidenceVariable, I manually inserted row into one of evidence_logical_resources or evidencevariable_logical_resources, for example:
insert into fhirdata.evidence_logical_resources(logical_resource_id, logical_id, is_deleted) values (3880, 'foo', 'Y');

Also, we need to manipulate the whole_schema_version to a prior value so that we don't bypass everything:
update fhirdata.whole_schema_version set version_id = 29;

Running first with an evidence row, we see:
2022-08-30 11:22:24.524 00000001    INFO .common.JdbcConnectionProvider Opening connection to database: jdbc:postgresql://localhost:5432/fhirdb
2022-08-30 11:22:24.686 00000001    INFO base.utils.schema.LeaseManager Requesting update lease for schema 'FHIRDATA' [attempt 1]
2022-08-30 11:22:24.700 00000001 WARNING ls.pool.PoolConnectionProvider Connection open count is > 1
2022-08-30 11:22:24.709 00000001  SEVERE forhealth.fhir.schema.app.Main At least one Evidence resource exists. Cannot upgrade FHIRDATA
2022-08-30 11:22:24.711 00000001    INFO base.utils.schema.LeaseManager Canceling lease for schema 'FHIRDATA'
2022-08-30 11:22:24.716 00000001  SEVERE forhealth.fhir.schema.app.Main schema tool failed

Cannot update schema due to existing Evidence or EvidenceVariable resource instances
java.lang.IllegalStateException: Cannot update schema due to existing Evidence or EvidenceVariable resource instances
	at org.linuxforhealth.fhir.schema.app.Main.updateFhirSchema(Main.java:525)
	at org.linuxforhealth.fhir.schema.app.Main.updateSchemas(Main.java:452)
	at org.linuxforhealth.fhir.schema.app.Main.process(Main.java:1882)
	at org.linuxforhealth.fhir.schema.app.Main.main(Main.java:2007)
2022-08-30 11:22:24.717 00000001  SEVERE forhealth.fhir.schema.app.Main SCHEMA CHANGE: RUNTIME ERROR

Then the same with an evidencevariable_logical_resources record:
2022-08-30 11:23:18.580 00000001    INFO .common.JdbcConnectionProvider Opening connection to database: jdbc:postgresql://localhost:5432/fhirdb
2022-08-30 11:23:18.744 00000001    INFO base.utils.schema.LeaseManager Requesting update lease for schema 'FHIRDATA' [attempt 1]
2022-08-30 11:23:18.763 00000001 WARNING ls.pool.PoolConnectionProvider Connection open count is > 1
2022-08-30 11:23:18.772 00000001 WARNING ls.pool.PoolConnectionProvider Connection open count is > 1
2022-08-30 11:23:18.776 00000001  SEVERE forhealth.fhir.schema.app.Main At least one EvidenceVariable resource exists. Cannot upgrade FHIRDATA
2022-08-30 11:23:18.778 00000001    INFO base.utils.schema.LeaseManager Canceling lease for schema 'FHIRDATA'
2022-08-30 11:23:18.782 00000001  SEVERE forhealth.fhir.schema.app.Main schema tool failed

Cannot update schema due to existing Evidence or EvidenceVariable resource instances
java.lang.IllegalStateException: Cannot update schema due to existing Evidence or EvidenceVariable resource instances
	at org.linuxforhealth.fhir.schema.app.Main.updateFhirSchema(Main.java:525)
	at org.linuxforhealth.fhir.schema.app.Main.updateSchemas(Main.java:452)
	at org.linuxforhealth.fhir.schema.app.Main.process(Main.java:1882)
	at org.linuxforhealth.fhir.schema.app.Main.main(Main.java:2007)
2022-08-30 11:23:18.784 00000001  SEVERE forhealth.fhir.schema.app.Main SCHEMA CHANGE: RUNTIME ERROR

After deleting the offending record, the schema update completes successfully:
2022-08-30 11:29:31.605 00000001    INFO forhealth.fhir.schema.app.Main SCHEMA CHANGE: OK
...
select * from fhirdata.whole_schema_version;
 record_id | version_id
-----------+------------
         1 |         30


Samples are outdated and do not work.

The samples which are given here are outdated and do not work. There are no other samples through them we can achieve the same.

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

ID: f0bd1414-d29f-fe3b-503f-365692c77ca5
Version Independent ID: 8627b318-bd95-0176-bfd5-6cb20f661692
Content: How to use Azure Service Bus queues with Java
Content Source: articles/service-bus-messaging/service-bus-java-how-to-use-queues.md
Service: service-bus-messaging
GitHub Login: @sethmanheim
Microsoft Alias: sethm

@AnilChandore Thanks for the feedback. We are actively investigating and will get back to you soon.

@AnilChandore Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

Hi! Any updates on this issue? I really need a working sample and I'm struggling to find one.

@Karthickhcl - Sorry for the late response. Our product team has updated the code in the article recently (couple of weeks ago). https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-queues
The topics and subscriptions article for Java also was updated.
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-topics-subscriptions
Please check this GitHub repo for the complete code and other samples:
https://github.com/Azure/azure-service-bus/tree/master/samples/Java/azure-servicebus
Queues getting started:
https://github.com/Azure/azure-service-bus/tree/master/samples/Java/azure-servicebus/QueuesGettingStarted
Topics and Subscriptions  - getting started
https://github.com/Azure/azure-service-bus/tree/master/samples/Java/azure-servicebus/TopicsGettingStarted

#please-close


Bump gha actions

checkout@v4
setup-node@v4
codecov@v4

Issue: BREAK-7

Hello francoisferrand,
My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options

name
description
privileged
authored

/after_pull_request
Wait for the given pull request id to be merged before continuing with the current one.

/bypass_author_approval
Bypass the pull request author's approval
:star:

/bypass_build_status
Bypass the build and test status
:star:

/bypass_commit_size
Bypass the check on the size of the changeset TBA
:star:

/bypass_incompatible_branch
Bypass the check on the source branch prefix
:star:

/bypass_jira_check
Bypass the Jira issue check
:star:

/bypass_peer_approval
Bypass the pull request peers' approval
:star:

/bypass_leader_approval
Bypass the pull request leaders' approval
:star:

/approve
Instruct Bert-E that the author has approved the pull request.

:writing_hand:

/create_pull_requests
Allow the creation of integration pull requests.

/create_integration_branches
Allow the creation of integration branches.

/no_octopus
Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead

/unanimity
Change review acceptance criteria from one reviewer at least to all reviewers

/wait
Instruct Bert-E not to run until further notice.

Available commands

name
description
privileged

/help
Print Bert-E's manual in the pull request.

/status
Print Bert-E's current status in the pull request TBA

/clear
Remove all comments from Bert-E from the history TBA

/retry
Re-start a fresh build TBA

/build
Re-start a fresh build TBA

/force_reset
Delete integration branches & pull requests, and restart merge process from the beginning.

/reset
Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

Incorrect fix version
The Fix Version/s in issue BREAK-7 contains:

None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

1.0.3

Please check the Fix Version/s of BREAK-7, or the target
branch of this pull request.

Waiting for approval
The following approvals are needed before I can proceed with the merge:

the author

one peer

/approve

I have successfully merged the changeset of this pull request
into targetted development branches:

:heavy_check_mark: development/1.0

Please check the status of the associated issue BREAK-7.
Goodbye francoisferrand.
The following options are set: approve


Should localStorage provider use browsers Local Storage?

As far as I've seen, localStorage holds translate in scope, not in browsers Local Storage. Is it a correct behaviour?
Why implement own solution and not use https://github.com/gsklee/ngStorage for storage?

Hello, @jeserkin.
Where did you see that?
As far as I know, $translateLocalStorage uses browser's local storage, not a simple js scope. See
master: src/service/storage-local.js

According to code it should, yes, but as far as I can tell, when I print window object in console (Chrome), then only language code is present in localStorage. I've specified urlLoader and translates do come in, but I don't see them under localStorage. Are they placed there at some other time?

No. The only information angular-translate puts in the storage is a language key for now.

Okay. And where does it hold translates, that are requested with urlLoader? At the same time seems a bit odd to say .useLocalStorage(). Doesn't seem to be very self explanatory code. I would assume, that translates are plates in Local Storage.

It keeps all translations in the internal map. Why should it put them in a storage? The module stores a language key because it has to persist among requests. But translation files may be changed on the server between requests. So, it is not a stable data.
If you want to cache translation files and prevent the module from fetching them each time the page is reloaded, you can use a special method:
$translateProvider.useLoaderCache(true);

It is documented in our guide. So, you can find a more detailed explanation in the Asynchronous Loading chapter, "Configuration of a loader" and "Using a cache" sections.
As for naming... .useLocalStorage() seems to be pretty straight forward. You tell the module which storage to use. But the module decides what information has to be stored on its own.

Well... So so. But okay. All in all it is good. Now the next question. As far as I've seen this plugin uses it's own storage solution. Why not ngStorage?

It is not an own storage solution, but rather a light wrapper for a standard feature. It doesn't bring any special abilities or additional dependencies. It doesn't rely on third party components.
angular-translate allows you to use any storage you want as long as it implements a desired interface. So, you are free to use ngStorage if you want. All you need is to create a custom storage.

I see. Okay.


Fix detect/build mode detection when using symlinks

cnb_runtime() has to detect the currently running binary name in order to determine whether the binary should be run in detect or build mode.
Previously the current binary name was calculated using std::env::current_exe().
Unfortunately that function's behaviour varies by platform, and on some platforms (such as Linux) if the current file was invoked via a symlink, then current_exe() returns the symlink target rather than the original symlink path itself.
As such until now, buildpacks using libcnb.rs had used hard links instead of symlinks, however Pack does not handle hard links properly (buildpacks/pack#1286), which results in the binary being bundled twice in the buildpack (doubling the size).
Even if that Pack issue ends up being fixed, we likely want to support both symlinks and hard links, which we can do by using std::env::args() instead.
There are some caveats with that approach:

The first element is traditionally the path of the executable, but it can be set to arbitrary text, and may not even exist.
This means this property should not be relied upon for security purposes.

...however for our use-case this is absolutely fine, since (a) the buildpack packagers control the naming of the file + Pack/lifecycle controls how it is run, (b) any invalid or missing filename arguments will be rejected, (c) this isn't a security sensitive usage.
The target_family = "unix" attribute usage has been removed, since env::args() has consistent behaviour regardless of platform (unlike std::env::current_exe()).
I looked into whether this could be easily tested, however it would be non-trivial. For now, this has been tested locally with a test buildpack using both symlinks and hard links. In the future perhaps this can be tested via examples/ (once they are fixed and run in CI).
Fixes #51.
GUS-W-9866676.

Won't the names be build.exe and detect.exe on Windows though?

@dzuelke Ah good point, I will switch to Path.file_stem.

Great fix, I like it! 👍🏻

I will switch to Path::file_stem.

puts on pedantic hat That'd allow the usage of i.e. build.sh on Linux. We could have constants for each target OS that contain the expected file name. TBF, this is nothing that I would block this PR on, especially since Windows support wasn't there before this PR either.

Yeah I agree - I'll leave the target_family for now.


Make shortcuts be repeatable or not-repeatable

Currently, Bloc shortcuts are repeatable. We sometimes want to have them only happen once (for example, when we deal with an expensive operation). To accommodate this we need to introduce the notion of a not-repeatable shortcut.

All shortcuts are repeatable by default
BlShortcut new
  combination: BlKeyCombination delete;
  action: [ self inform: 'I am repeatable' ]

however, it is possible now to have not-repeatable shortcuts:
BlShortcut new
  repeatable: false;
  combination: BlKeyCombination delete;
  action: [ self inform: 'I am not-repeatable' ]


Made Xtensa kernels available via bazel.

Creates a micro_ops implementation for each of the target kernel implementations. i.e. micro_ops for the reference ops, xtensa_hif4_micro_ops for the Xtensa HiFi4 ops, etc.
This resembles how the Makefile works, but using Bazel macros instead. This paradigm should extend to all target implementations, not just Xtensa.

Is this still active, or has it been superseded by the more recent changes?

Is this still active, or has it been superseded by the more recent changes?

This can be closed.


How Does It Work on Multiple Servers? (guild id)

Discussed in https://github.com/bwmarrin/discordgo/discussions/1169

Originally posted by sercanarga April 26, 2022
Hello,
I developed a bot using the example in the link. For the bot to work, the id(guild id) information of the server it will run on is needed.
How should we configure it so that it can run on multiple servers? I want users to be able to use the bot when they add it to their server.
Thanks for your time.

Ok I solved the problem. If you want your bot to be able to run on every server, you should enter the guild id value as empty.


Gettextize cli_wallet_daemon_isolation_qubes_whonix.md and howto_fix_stuck_funds.md

This is the first PR which adds .pot and .po files to be fed to weblate and are located in _18n/$LANG/resources/user-guides/weblate/$GUIDE.po(t). All files have been manually checked and "unfuzzed".
I'm currently testing this PR on Weblate.
Part of #1270

Tested OK on Weblate.

The headers weren't a problem, but they are really useless to us and doesn't worth spend time to personalize them, so i just used the standard version everywhere. Fixed the fuzzy strings and uniformed the files.

I mainly just mentioned the headers because you changed them for some files but not for others.
Should these two files not be deleted?

_i18n/en/resources/user-guides/weblate/cli_wallet_daemon_isolation_qubes_whonix.pot~
_i18n/it/resources/user-guides/weblate/cli_wallet_daemon_isolation_qubes_whonix.po~

I mainly just mentioned the headers because you changed them for some files but not for others.

You were right. Now i switched to the standard one, so the problem is avoided :)

That's what I meant when I said "I don't believe this file should be here." Sorry if that was unclear.

Sorry, i misunderstood. Yes those shouldn't be there. Deleting them/

Sorry, one last thing: are the changes to _i18n/it/resources/user-guides/cli_wallet_daemon_isolation_qubes_whonix.md intentional? It seems to be the only file with a structure different from the rest.

It's the result of a test (conversion .po > .md). po4a wraps the text when converting. I left it because there is a string translated and in any case doesn't really matter, users won't touch these files anymore.


Improved option search with iterative approach

This pull request improves the getOption method by allowing it to search for nested options using a dot-separated path, like $option = $command->getOption('foo.bar'). This new approach replaces the previous method and provides better support for nested structures, especially for options of type ApplicationCommandOptionType::SUB_COMMAND. The old method does not support nested structures and will fail if you try to retrieve bar from foo.bar.

Thanks for the pr!
Would you mind adding a test case for retrieving a nested option? Could either be added to CommandInteractionTest@testParsesOptions or a new test case in that file :)


#25-Implement "Call-To-Action" Block

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #25

Implement "call to action" block styling
Leveraged calcite variables, spacing, font size, colors
Pending: Calcite Buttons

Test URLs:

Original: https://www.esri.com/en-us/about/about-esri/overview
Before: https://main--esri--aemsites.hlx.live/en-us/about/about-esri/overview
After: https://call-to-action--esri--aemsites.hlx.live/en-us/about/about-esri/overview

Can you fix the linter issues and also add the call-to-action.js? it's fine if it's empty, but the framework expects it to be there:


PNG interlaced

Is your feature request related to a problem? Please describe.
I can't find any documentation that might suggest that interlaced pngs can the written
Describe the solution you'd like
Add an option to enable interlaced png output
Describe alternatives you've considered
Not using interlaced pngs
Additional context
Add any other context or screenshots about the feature request here.

:rocket: Issue was released in v1.2.0 :rocket:


Error with siglip.

In your paper you said that you use ViT-B-16 siglip model with webli weights.
I try to use ViT-B-16-SigLIP webli but get this error^
AttributeError: 'TimmModel' object has no attribute 'transformer'
I am trying several siglip models but each time get this error.
What I have to do to launch Legrad on siglip models?

I was just facing the same error. Turns out you should use compute_legrad_siglip instead of compute_legrad_clip. Or you can use compute_legrad which will route to the appropriate method automatically depending on the model type (clip, siglip, coca).
I think the example in the README should use compute_legrad anyway to avoid this error.


release: publish v2.0.1

Purpose
Describe the problem you want to address or the feature you want to implement.
Approach
Describe how your changes address the issue or implement the desired functionality in as much detail as possible.
References
Provide a link to the existing issue(s), if any.
Pre-Merge TODO

[ ] Write tests for your proposed changes
[ ] Make sure that existing tests do not fail

The failed test is unstable and sometimes fails or passes in master.


German translation

Pull Request Checklist

[x] Description: Briefly describe the changes in this pull request.
[x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
[x] Documentation: not necessary
[x] Dependencies: no dependencies
[x] Testing: no testing
[x] Code Review: no coding

Description
This pull request updates the German localization file with the following enhancements:

Adds several missing translations for new features added lately.
Corrects typographical and grammatical errors in existing translations.
Adjusts certain translations to ensure a more coherent and consistent style across the application.

Changelog Entry
Added

missing german translations

Changed

some errors in translations
improved translations.

Feel free to make a new PR after resolving conflicts!


Fix for duplicate lines.

Lines 56 and 58 are duplicate.

Thanks for catching this, @AlphaLionByte

Hello, @EliotSeattle! I'm a russian student and I am studying Windows driver development. Is there any possible way to write a translation for driver docs (and other articles) on MS site (maybe just like this pull request)? My russian language level is good (same for technical). I think, it will be a good practice for me in technical English and win driver theory. I've read articles about Markdown and Git Bash.
I had already googled for my question, but did not receive results.

Hi @AlphaLionByte
Sorry I didn't get back to you sooner, but right now we don't have the ability to accept community translations. We're just not able to scale up to review unscheduled content. I would encourage you to go ahead and write whatever content you can and [ublish it on a blog or any other place you can find. My experience has been that writing about a technology for others to read makes me really have to understand what I'm talking about. :-)
I wish I had better news than that.
Eliot

Thanks a lot, @EliotSeattle!
Philipp


Local Variables Feature (Request Scope)

Hi guys!
First of all, congrats for the application. It's awesome! I have been using Postman as my primary rest client for a long but after started using Insomnia there is no chance for other application jejeje!
I don't know if already exists a feature like this, but I think that will be great if you can use variables on a request scope. I mean, I can use environment scoped variables but I'm wondering if you can just define and use local variables for a given request (for example an entity ID used in the URL can be a local variable just for the underlying request,......using environment scope will be a bit confusing I think).
I hope you can understand the feature I'm proposing, and, if you can jaja, help to improve a little Insomnia!
Again, congrats for the excellent work!
Patricio.

This is a pretty popular request. It is also being discussed in #203. Going to close this one as a duplicate.

P.S. I'm glad you're enjoying the app! That me happy to hear 😄