I hope support Agents for Amazon Bedrock

I planned to create Agents for Amazon Bedrock using FastAPI and aws-lambda-web-adapter.
Agents for Amazon Bedrock requires an OpenAPI schema to be prepared.
The development experience would be improved if FastAPI could be used in combination with aws-lambda-web-adapter to develop Agents for Amazon Bedrock.
However, the Lambda input event from Amazon Bedrock is different from API Gateway.
Lambda input event from Amazon Bedrock
Event format from API Gateway
It would be great if it is supported.

@moritalous another option is to use Powertools for AWS Lambda. Watch this issue for the progress.

Yeah separate lambdas is the way to go with it,
If you are worried about having to decouple the codebase for each lambda, you may use javascript or go to maintain some form of monolithic codebase, defining entry points separately for each. You can do this with python, (different entrypoint same codeuri) too but you would be sending entire bundles negatively impacting startup times.
It would be nice if some form of bundler existed for python but I have not seen any.

Thank you for your reply.
Upon exploring alternative approaches, I found that Mangum allows the creation of custom adapters, and it suited my needs. I have detailed the process in a blog post, so if you're interested, please take a look. (I apologize for it being in Japanese)
Qiita - Running FastAPI on AWS Lambda with Mangum
https://qiita.com/moritalous/items/c7bbadcf229137c29d1a
https://github.com/moritalous/agents-for-bedrock-sample

Cool.
Also FastAPI by default has an API /openapi.json to export openapi 3 specs. You don't need to have such a convoluted approach to export.

@moritalous this is an interesting approach. This might work if #216 got implemented.

We are very excited to release the pass-through feature. I immediately tried using Bedrock Agent, but it did not work well. Could you please advise if I am using it incorrectly?
I created an API using FastAPI.

main.py

from typing import Any

from fastapi import FastAPI
from pydantic import BaseModel, Field

app = FastAPI()

@app.post("/events", include_in_schema=False)
def events(request: dict[str, Any] | None = None):
    print("/events")
    print(request)

    return {}

class list_regions_request(BaseModel):
    opt_status: str = Field(
        description="A list of Region statuses (Enabling, Enabled, Disabling, Disabled, Enabled_by_default) to use to filter the list of Regions for a given account."
    )

@app.post(
    "/list_regions",
    description="""Lists all the Regions for a given account and their respective opt-in statuses. """,
)
def list_regions(request: list_regions_request):
    print("call list_regions")
    print(request)

    import boto3

    client = boto3.client("account")
    return client.list_regions(RegionOptStatusContains=request.opt_status)

@app.post("/", include_in_schema=False)
def root(request: dict[str, Any] | None = None):
    print("call root")
    print(request)
    pass

@app.get("/check", include_in_schema=False)
def check():
    print("call check")
    return {}

template.yaml

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
  fastapi response streaming

# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
  Function:
    Timeout: 60

Resources:
  FastAPIFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: agents/
      Handler: run.sh
      Runtime: python3.12
      MemorySize: 256
      Environment:
        Variables:
          AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
          AWS_LWA_PORT: "8000"
          AWS_LWA_READINESS_CHECK_PATH: /check
          AWS_LWA_PASS_THROUGH_PATH: /events
      Layers:
        - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:19

Result of sam local invoke.（I use this event.json )
sam local invoke --event events/example-bedrock-agent-runtime-event.json
WARNING: No BuildArchitecture specifed in Layer `None` Metadata. Defaulting to x86_64.
Invoking run.sh (python3.12)
arn:aws:lambda:us-east-1:753240598075:layer:LambdaAdapterLayerX86:19 is already cached. Skipping download
Local image is up-to-date
Using local image: samcli/lambda-python:3.12-x86_64-486eb459fb6e69b30474a3fed.

Mounting /workspaces/python/agents-web-adapter/.aws-sam/build/FastAPIFunction as /var/task:ro,delegated, inside runtime
container
START RequestId: 95081da5-883c-478f-b7c6-3adc99977558 Version: $LATEST
INFO:     Started server process [25]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
call check
INFO:     <IP_ADDRESS>:51298 - "GET /check HTTP/1.1" 200 OK
call root
None
INFO:     <IP_ADDRESS>:51298 - "POST / HTTP/1.1" 200 OK
END RequestId: 3b210b15-bd6e-4c82-b769-440c134524d1
REPORT RequestId: 3b210b15-bd6e-4c82-b769-440c134524d1  Init Duration: 0.06 ms  Duration: 7533.13 ms    Billed Duration: 7534 ms     Memory Size: 256 MB     Max Memory Used: 256 MB
{"statusCode": 200, "headers": {"date": "Mon, 22 Jan 2024 21:37:07 GMT", "server": "uvicorn", "content-length": "4", "content-type": "application/json"}, "multiValueHeaders": {"date": ["Mon, 22 Jan 2024 21:37:07 GMT"], "server": ["uvicorn"], "content-length": ["4"], "content-type": ["application/json"]}, "body": "null", "isBase64Encoded": false}
thread 'tokio-runtime-worker' panicked at src/lib.rs:thread 'main' panicked at src/main.rs:25:25:
lambda runtime failed: Error { kind: SendRequest, source: Some(hyper::Error(IncompleteMessage)) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
204

I had similar results when I deployed it to AWS and called it from Bedrock Agent.
INIT_START Runtime Version: python:3.12.v16	Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:c9875014cbcc77e3455765804516f064d18fe7b27ae7bdb2b1d84ab01ba784f5
--
INFO:     Started server process [12]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
call check
INFO:     <IP_ADDRESS>:33680 - "GET /check HTTP/1.1" 200 OK
EXTENSION	Name: lambda-adapter	State: Ready	Events: []
START RequestId: a96e7411-38a5-45c3-8eb1-c5a618f0d486 Version: $LATEST
call root
None
INFO:     <IP_ADDRESS>:33680 - "POST / HTTP/1.1" 200 OK
END RequestId: a96e7411-38a5-45c3-8eb1-c5a618f0d486
REPORT RequestId: a96e7411-38a5-45c3-8eb1-c5a618f0d486	Duration: 2.60 ms	Billed Duration: 3 ms	Memory Size: 256 MB	Max Memory Used: 92 MB	Init Duration: 1449.20 ms

The request is not routed to /events, it appears to be routed to /. Is there a setting to enable/disable the pass-through function?
Thank you for reading to the end. I would appreciate it if you could give me some advice.

Thanks for reporting this. I can reproduce this issue. I suspect lambda-http crate deserialized the Bedrock Agent event into Something else, not passing through. I'm working on this.

@moritalous You can try this test build before the changes made into a new release.
It's on Dockerhub: awsguru/aws-lambda-adapter:0.8.1-x86_64

Thank you your response.
I would like to report that it worked as expected!!

main.py

from enum import Enum
import json
import os
from typing import Any

import requests
import uvicorn
from fastapi import FastAPI
from pydantic import BaseModel, Field

app = FastAPI()

PORT = os.environ.get("AWS_LWA_PORT", "8080")

@app.post("/events", include_in_schema=False)
def events(request: dict[str, Any] | None = None):
    print(request)

    if request is None:
        return {}

    print(request)

    actionGroup = request["actionGroup"]
    httpMethod = request["httpMethod"]
    apiPath = request["apiPath"]

    params = {}
    parameters = request.get("parameters", [])
    for item in parameters:
        params[item["name"]] = item["value"]

    data = {}
    requestBody: dict = request.get("requestBody", {})
    content: dict = requestBody.get("content", {})
    for key in content.keys():
        content_type = key
        break

    content_value = content.get(content_type, {})
    properties = content_value.get("properties", [])
    for item in properties:
        data[item["name"]] = item["value"]

    api_response = requests.request(
        httpMethod,
        f"http://localhost:{PORT}{apiPath}",
        headers={"Content-Type": content_type},
        params=params,
        data=json.dumps(data) if len(data) > 0 else None,
    )

    return {
        "messageVersion": "1.0",
        "response": {
            "actionGroup": actionGroup,
            "apiPath": apiPath,
            "httpMethod": httpMethod,
            "httpStatusCode": api_response.status_code,
            "responseBody": {content_type: {"body": api_response.text}},
        },
    }

class status(str, Enum):
    ENABLED = "ENABLED"
    ENABLING = "ENABLING"
    DISABLING = "DISABLING"
    DISABLED = "DISABLED"
    ENABLED_BY_DEFAULT = "ENABLED_BY_DEFAULT"

class list_regions_request(BaseModel):
    opt_status: status = Field(
        description="A list of Region statuses (ENABLING, ENABLED, DISABLING, DISABLED, ENABLED_BY_DEFAULT) to use to filter the list of Regions for a given account."
    )

@app.post(
    "/list_regions",
    description="""Lists all the Regions for a given account and their respective opt-in statuses. """,
)
def list_regions(request: list_regions_request):
    import boto3

    client = boto3.client("account")

    return client.list_regions(RegionOptStatusContains=[request.opt_status])

@app.get("/check", include_in_schema=False)
def check():
    print("call check")
    return {}

if __name__ == "__main__":
    uvicorn.run(app, host="<IP_ADDRESS>", port=int(PORT))

template.yaml

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
  fastapi response streaming

# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
  Function:
    Timeout: 60

Resources:
  FastAPIFunction:
    Type: AWS::Serverless::Function
    Properties:
      PackageType: Image
      MemorySize: 256
      Environment:
        Variables:
          AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
          AWS_LWA_PORT: "8000"
          AWS_LWA_READINESS_CHECK_PATH: /check
          AWS_LWA_PASS_THROUGH_PATH: /events
      Policies: arn:aws:iam::aws:policy/AWSAccountManagementReadOnlyAccess
      # Layers:
      #   - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:19
    Metadata:
      Dockerfile: Dockerfile
      DockerContext: ./agents
      DockerTag: v1

CloudWatch log

INFO:     Started server process [11]
--
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
call check
INFO:     <IP_ADDRESS>:53044 - "GET /check HTTP/1.1" 200 OK
EXTENSION	Name: lambda-adapter	State: Ready	Events: []
START RequestId: a3a57985-bfa9-431d-acd2-e4bb706cfc1b Version: $LATEST
{'agent': {'alias': 'TSTALIASID', 'name': 'agent-web-adapter', 'version': 'DRAFT', 'id': 'F7N5Y8HZOA'}, 'sessionId': '781749372177110', 'httpMethod': 'POST', 'inputText': 'Please tell me regions that status is DISABLED', 'sessionAttributes': {}, 'promptSessionAttributes': {}, 'apiPath': '/list_regions', 'requestBody': {'content': {'application/json': {'properties': [{'name': 'opt_status', 'value': 'DISABLED'}]}}}, 'messageVersion': '1.0', 'actionGroup': 'action-group1', 'parameters': []}
{'agent': {'alias': 'TSTALIASID', 'name': 'agent-web-adapter', 'version': 'DRAFT', 'id': 'F7N5Y8HZOA'}, 'sessionId': '781749372177110', 'httpMethod': 'POST', 'inputText': 'Please tell me regions that status is DISABLED', 'sessionAttributes': {}, 'promptSessionAttributes': {}, 'apiPath': '/list_regions', 'requestBody': {'content': {'application/json': {'properties': [{'name': 'opt_status', 'value': 'DISABLED'}]}}}, 'messageVersion': '1.0', 'actionGroup': 'action-group1', 'parameters': []}
INFO:     <IP_ADDRESS>:53046 - "POST /list_regions HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:53044 - "POST /events HTTP/1.1" 200 OK
END RequestId: a3a57985-bfa9-431d-acd2-e4bb706cfc1b
REPORT RequestId: a3a57985-bfa9-431d-acd2-e4bb706cfc1b	Duration: 1631.31 ms	Billed Duration: 3008 ms	Memory Size: 256 MB	Max Memory Used: 107 MB	Init Duration: 1376.30 ms

I'll try to blog about it once it's released!
Thank you very much for adding this feature!!!

Great to see it works!
I would suggest to use a middleware to intercept the request to '/events' route and do the transformation there. This will avoid the second request to the FastAPI.
You could make that middleware generic and publish a package to pypi, so that everyone can use it. :)

@moritalous
New release v0.8.1 is out. Would you like to add a Bedrock Agent example to this repo?

Here is an example of the middleware. It needs some more work to handle parameters and body.
from starlette.middleware.base import BaseHTTPMiddleware
from fastapi.responses import JSONResponse
from fastapi import Response
import json

class BedrockAgentMiddleware(BaseHTTPMiddleware):
    async def dispatch(self, request, call_next):
        # pass through any non-events requests
        if request.url.path != "/events":
            return await call_next(request)

        # convert the request body to json object
        req_body = await request.body()
        req_body = json.loads(req_body)
        print(req_body)

        request.scope["path"] = req_body["apiPath"]
        request.scope["method"] = req_body["httpMethod"]

        # Pass the request to be processed by the rest of the application
        response = await call_next(request)

        if isinstance(response, Response) and hasattr(response, 'body'):
            res_body = response.body
        elif hasattr(response, 'body_iterator'):
            res_body = b''
            async for chunk in response.body_iterator:
                res_body += chunk
            response.body_iterator = self.recreate_iterator(res_body)
        else:
            res_body = None
        # Now you have the body, you can do whatever you want with it
        print(res_body)

        res_status_code = response.status_code
        res_content_type = response.headers["content-type"]

        response = JSONResponse(content = {
            "messageVersion": "1.0",
            "response": {
                "actionGroup": req_body["actionGroup"],
                "apiPath": req_body["apiPath"],
                "httpMethod": req_body["httpMethod"],
                "httpStatusCode": res_status_code,
                "responseBody": {
                    res_content_type: {
                        "body": res_body.decode('utf-8')
                    }
                },
                "sessionAttributes": req_body["sessionAttributes"],
                "promptSessionAttributes": req_body["promptSessionAttributes"]
            }
        })

        print(response)
        return response

    @staticmethod
    async def recreate_iterator(body):
        yield body

The main.py is quite simple.
from fastapi import FastAPI
from pydantic import BaseModel
from bedrock_agent.middleware import BedrockAgentMiddleware
import boto3

app = FastAPI(
    description="This agent allows you to query the number of S3 buckets in your AWS account.",
)
app.openapi_version = "3.0.2"
app.add_middleware(BedrockAgentMiddleware)

s3 = boto3.resource('s3')

class S3BucketCountResponse(BaseModel):
    count: int

@app.get("/s3_bucket_count")
async def get_s3_bucket_count() -> S3BucketCountResponse:
    """
    This method returns the number of S3 buckets in your AWS account.

    Return:
        S3BucketCountResponse: A json object containing the number of S3 buckets in your AWS account.
    """
    count = len(list(s3.buckets.all()))

    return S3BucketCountResponse(count=count)

@bnusunny
I create example and PR. Please review it.
Most of the middleware code was provided by you. thank you.
Is it okay to turn the middleware code into a library and publish a package to pypi?
I have no experience in creating a library, but I would love to try it.

Thanks for the PR. I leave a few comments there.
Yes, please go ahead to package the middleware into a library and publish it to pypi.
The middleware needs a few improvements to be generic library.

don't hardcore '/events' route. Take a parameter to allow people to change it.
use proper logging library to replace print()
improve error handling

@bnusunny
The middleware package has been released!
This will speed up the creation of Bedrock Agent.
https://pypi.org/project/lwa-fastapi-middleware-bedrock-agent/
https://github.com/moritalous/lwa-fastapi-middleware-bedrock-agent
Thank you very much for making Lambda Web Adapter compatible with Bedrock Agent.

Awesome!


LEGO: Pull request from lego/hb_998_20200617041034351 to master

LEGO: Pull request from lego/hb_998_20200617041034351 to master with localized lcls

I just need a recent-enough PR to do some work off of so:
@typescript-bot pack this


Set allowIndexDefinitions to 'true' for Jackrabbit Filevault plugin

Should the new filevault configuration have allowIndexDefinitions=true ?  ACS Commons includes index definitions and this is likely one of the most common use cases.
https://github.com/Adobe-Marketing-Cloud/aem-project-archetype/blob/8e340467eef50f9b2b7128da43a5f5c88f8d3a35/src/main/archetype/ui.content/pom.xml#L91

@jbharrell I agree, this should be more an issue for ACS Commons. At least it should be documented n the page you already linked at [1].
As we don't include the ACS commons OOTB in the maven archetype I will close this issue. It would be nice if you can open an issue on the ACS commons repo for this. Thanks!
[1] https://adobe-consulting-services.github.io/acs-aem-commons/pages/maven.html

ACS AEM Commons does not include any indexes. If the error message says that it does, this is a false positive and needs to be fixed IMO.

This is tracked now in https://issues.apache.org/jira/browse/JCRVLT-343.


Detect system info + available BPF features on startup

Context

Early detection of system info and BPF features to ensure the required runtime dependencies are met.
This information will also provide a better UX through improved error reporting on startup.

Changes

Add a new BPF program to detect what BPF features are available on the host.
Check that procfs and tracefs are mounted.
Check support for tracepoints, perf_events, and a few bpf helpers.

Test Plan

Manual tests + Unit(? / integration?) tests.

We might want to look into the kernel test errors,

FWIW, the error seemed to be related to the unavailability of the hrtimer_start_range_ns kprobe (or maybe kprobes in general on the VM?). Perhaps some kernel flag is missing( ?).
Instead of spending time figuring out how to get that to work, I decided to hook the BPF feature detection program to a tracepoint. Main reason being we already rely on tracepoints and currently don't use kprobes anywhere else.

another thing we could do was moving all this code that is pretty much self-contained (and potentially) reusable to a top level crate similarly to how lightswitch-proto is implemented. What do you think?

That sounds reasonable. Maybe lightswithc_sys_probe would be a good name for this crate? Open to suggestions :)

FWIW, the error seemed to be related to the unavailability of the hrtimer_start_range_ns kprobe (or maybe kprobes in general on the VM?). Perhaps some kernel flag is missing(?). So instead of spending time figuring out how to get that to work, I decided to hook the BPF feature detection program to a tracepoint instead. The main reason is that we already rely on tracepoints and currently don't use kprobes anywhere else.

Makes sense!

That sounds reasonable. Maybe lightswitch_sys_probe would be a good name for this crate? Open to suggestions :)

What about lightswitch-features-probing / lightswitch-capabilities or something like this? -sys is typically used for C bindings


Bugfix retain on pluginMediaStreamTrack will not allow camera/mic to be freed

I noticed CPU was spinning at 20% after i getUserMedia and stop the stream. This fixes the issue, as the lambda was retaining the pluginMediaStreamTrack

@oNaiPs so no more PacerThread thread running after deallocating iosrtc/Cordova?

I'm not sure if that's the thread, but yeah it stops at least one thread
from Webrtc and another one from AV foundation
On Wed, Feb 3, 2016 at 12:40 PM SirSeymour<EMAIL_ADDRESS>wrote:

@oNaiPs https://github.com/oNaiPs so no more PacerThread thread running
after deallocating iosrtc/Cordova?
—
Reply to this email directly or view it on GitHub
https://github.com/eface2face/cordova-plugin-iosrtc/pull/126#issuecomment-179453854
.

Thank you for your response. So basically now you saw that from 20% to ~0% cpu usage?

Yes indeed. The bug is reproducible with:
cordova.plugins.iosrtc.registerGlobals();

navigator.getUserMedia({
    audio: true,
}, function(stream) {
    console.log('Got stream.');
    stream.stop();
}, function(e) {
    console.log(e);
})

Amazing! May you please explain why the track was not freed before and why it is freed using weak var?
May be more places in which weak var should be used?

Yes there will be more places for that to be used. It looks like swift would benefit from other syntax though.
Take a look at https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html, mainly on "Resolving Strong Reference Cycles for Closures"

Is Swift a joke? The problem of "Strong Reference Cycles" is resolved in so many languages with GC...

@oNaiPs should then things like this also be fixed?:
	func MediaStreamTrack_setEnabled(command: CDVInvokedUrlCommand) {
		NSLog("iosrtcPlugin#MediaStreamTrack_setEnabled()")

		let id = command.argumentAtIndex(0) as! String
		let value = command.argumentAtIndex(1) as! Bool
		let pluginMediaStreamTrack = self.pluginMediaStreamTracks[id]

		if pluginMediaStreamTrack == nil {
			NSLog("iosrtcPlugin#MediaStreamTrack_setEnabled() | ERROR: pluginMediaStreamTrack with id=\(id) does not exist")
			return;
		}

		dispatch_async(self.queue) {
			pluginMediaStreamTrack!.setEnabled(value)
		}
	}

to:
	func MediaStreamTrack_setEnabled(command: CDVInvokedUrlCommand) {
		NSLog("iosrtcPlugin#MediaStreamTrack_setEnabled()")

		let id = command.argumentAtIndex(0) as! String
		let value = command.argumentAtIndex(1) as! Bool
		weak var pluginMediaStreamTrack = self.pluginMediaStreamTracks[id]

		if pluginMediaStreamTrack == nil {
			NSLog("iosrtcPlugin#MediaStreamTrack_setEnabled() | ERROR: pluginMediaStreamTrack with id=\(id) does not exist")
			return;
		}

		dispatch_async(self.queue) {
			pluginMediaStreamTrack!.setEnabled(value)
		}
	}

I'm preparing a commit that replaces all the let xxxx = somecontainer[id] with weak var.

@ibc yes, it'll apply to those variables that are used inside the lambda block afterwards.

Thanks. I've set weak var more aggressively in all the references retrieved from containers (for consistency):
https://github.com/eface2face/cordova-plugin-iosrtc/commit/ad7a0e339e07b4ac567dfc77f59f44c8ef35dd91


/usr/bin/homebridge: No such file or directory

Hi, i change my pi 2 with a pi 0.
So i reinstall nodejs and every modules because its arm6
first i have a mismatch error when i launch home bridge (because i think he's not same node version)
So i try several thing, and reinstall totally home bridge plugin , seems ok but when i want launch homebridge i have this error : bash /usr/bin/homebridge: No such file or directory
any idea ?

Perhaps that is not the directory homebridge was installed into. To check the directory run this command: "which homebridge". What does that return?

sudo npm i -g --unsafe-perm homebridge

@GeorgeBgk He may have done this, probably not, but to check the current directory of homebridge @johnx102 must perform the which homebridge command for us to know the current installed location.

Hey, thank's for the answer, when i do which home bridge, he return me nothing. no error just nothing ....

So @EdwinJS like you say i already reinstall home bridge with unsafe-perm...but it resolve nothing.
maybe this can help ou, when i do "sudo npm i -g --unsafe-perm homebridge"
i have this when it's finish ... : /opt/nodejs/bin/homebridge -> /opt/nodejs/lib/node_modules/homebridge/bin/homebridge
/opt/nodejs/lib
└──<EMAIL_ADDRESS>

Wait so which homebridge doesn't return anything? Try >sudo which homebridge

EdwinJS i do but same problem.
So i erase and reinstall everything from beginning, now it's working ...
Thank's for help ..


meta.json is not removed when the container process exits

Description
container Poststop hook is not triggered when container exists: meta.json is not removed when the container process exits.
Steps to reproduce the issue

nerdctl run  --name toto alpine
nerdctl kill toto
/var/lib/nerdctl/<ADDRHASH>/etchosts/default/<ID>/meta.json is still present

Describe the results you received and expected
/var/lib/nerdctl/<ADDRHASH>/etchosts/<NS>/<ID>/meta.json should be removed when container with id  ID exists
What version of nerdctl are you using?
latest
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response

container Poststop is executed in the Runtime Namespace and not the container ns

Hey folks.
Wondering if we do really want this.
meta.json will get deleted when the container gets removed (postStop).
Is removing at stop really bring anything valuable to the table?

@fahedouch ^

@AkihiroSuda @fahedouch shall we close this?
I do not think we should remove it when the container stops. It is removed when the container is removed though.

We may remove it when the container exits, but it’s not a critical requirement

We may remove it when the container exits, but it’s not a critical requirement

I do not think it is feasible, as we do not get ocihooks events for container stop/start.
Generally speaking, we cannot ensure we do things when containers stop outside of us explicitly calling stop.


jail show command

Command to show all useful information about jail. Like inspect venv, but with exposed entrypoints list.

Is this different than jail list?

Good question, thank you. Issue description isn't clear enough. jail show should show information about specific jail:
$ dephell jail show flake8
{
  name: "flake8",
  path: "...",
  size: "...",
  entrypoints: ["flake8"]
}

It's like dephell inspect venv, but shows information about venv of specific jail, not the current project.


x/pkgsite: module latest-version information

Pkgsite needs to track three kinds of latest versions for each module:

The raw latest version (see #44437)—determines retractions and deprecations;
The cooked latest version, which is the raw one after applying retractions—what go get will download;
The good latest version, which is the latest version that pkg.go.dev has useful information for.

We will have a single table, module_latest_versions, to track all of these. The table will be updated by the worker each time a module (at any version) is processed. It will be consulted by GetUnitMeta and other DataSource methods that require the latest version of a module.
Usually all three kinds of latest version will be the same, but sometimes they will differ. Pkgsite will always show the good latest version when the URL is unversioned (that is, it does not contain "@version"). If the cooked latest version differs, the page will say so.

One important piece that is missing from this: if we even learn that the good latest version changes due to a retraction, we need to re-do the imports_unique and search_documents tables for that module.
I'm not talking about the normal case, where a new, latest version is published and we update those two tables while we process it. This is a new case we haven't dealt with before: a new raw latest go.mod retracts the latest good version (and itself), leaving an older version as the latest good one.
Say the current latest (raw, cooked and good) is v1.2.0, and there is also a v1.1.0 in the DB. Now v1.3.0 is published, with a go.mod that retracts v1.3.0 and v1.2.0.
When we process v1.3.0, we need to notice that the latest good version has changed, and that it is not the version we're currently processing. We then need to update latest_module_versions.good_version, and repopulate the two tables mentioned above.

We are now tracking and using latest-version information.


Sticking some add methods on the HostConfigurator class

Just wanted a way of adding some instructions for the service class based on parameters

After some proper debugging I've seen that these extra arguments are picking up the main args array. So there is no need for this change.
I've found a better solution for the outcome that I was trying to achieve. (Delaying the instant running of the service after installing it)


fsr problem

Hi,
How can I solve version problem.
Thanks

Hi, xxchenchen
Did you install libjpeg62-dev ?
$ sudo apt-get install libjpeg62-dev

Hi, Thanks for answer.
It does not work. I did it by using synaptic manager. You can see.


Unable to rename some globals in decompiler

Describe the bug
Some global pointers cannot be renamed in the decompiler.  The rename right click context menu item is gone.
Looks to bisect down to fcf20ed9a5ac862ce6e61511908637aca11c0e6a
To Reproduce
void *g_func;
void foo() { return; }
void set_func(void *x) { g_func = x; }
void init() { set_func(foo); }

In init I cannot rename foo from the decompiler
Environment (please complete the following information):

OS: 20.04
Java Version: 17.0.4
Ghidra Version: 7e24c986ad72ce70a3e71c7a3d2adfd752b6e73f
Ghidra Origin: eclipse

When I tested using your sample code (built ELF binary) the Rename Function popup menu action was present/enabled and worked as expected.

@ghidra1  thanks for verifying.  Looks like there were a few merges, I'll pull those and double check tonight.  I guess it just depends on if I can rename after pulling, but I was able to bisect down to that one commit, are you able to rename on that commit?

Sorry, I am was in an older master branch when I tested.  Yea - I may have broken with GP-2520 merge.  Stay tuned...


Selecting a profile to copy when creating a new one seems to only ever copy the default profile

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.84.2
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:52:33.687Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 23.0.0
Steps to Reproduce:

create a new profile called A
add 1 or more extensions to profile A
create a new profile called B selecting profile A as the 'copy from'
extensions from step 2 are not present

It is working for me. Are there any steps missing in your repro steps?

This was my test just now, I list out the extensions used in the default and SpringBoot profile, create a new profile based on the SpringBoot profile and then list the test profile and it is the same as default
ssmale@Simons-MacBook-Pro-2 ~ % code --list-extensions
aaron-bond.better-comments
benjaminadk.emojis4git
BriteSnow.vscode-toggle-quotes
christian-kohler.path-intellisense
eamodio.gitlens
esbenp.prettier-vscode
GitHub.vscode-pull-request-github
GitLab.gitlab-workflow
Gruntfuggly.todo-tree
KnisterPeter.vscode-commitizen
michelemelluso.gitignore
ms-azuretools.vscode-docker
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.remote-explorer
quicktype.quicktype
richie5um2.vscode-sort-json
shyykoserhiy.vscode-spotify
streetsidesoftware.code-spell-checker
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vscode-icons-team.vscode-icons
WakaTime.vscode-wakatime
wayou.vscode-todo-highlight
yzhang.markdown-all-in-one

ssmale@Simons-MacBook-Pro-2 ~ % code --list-extensions --profile SpringBoot
aaron-bond.better-comments
benjaminadk.emojis4git
BriteSnow.vscode-toggle-quotes
christian-kohler.path-intellisense
eamodio.gitlens
esbenp.prettier-vscode
GitHub.vscode-pull-request-github
GitLab.gitlab-workflow
Gruntfuggly.todo-tree
KnisterPeter.vscode-commitizen
michelemelluso.gitignore
ms-azuretools.vscode-docker
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.live-server
ms-vscode.remote-explorer
ms-vscode.remote-server
quicktype.quicktype
redhat.java
richie5um2.vscode-sort-json
ryanluker.vscode-coverage-gutters
shyykoserhiy.vscode-spotify
streetsidesoftware.code-spell-checker
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vmware.vscode-boot-dev-pack
vmware.vscode-spring-boot
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-lombok
vscjava.vscode-maven
vscjava.vscode-spring-boot-dashboard
vscjava.vscode-spring-initializr
vscode-icons-team.vscode-icons
WakaTime.vscode-wakatime
wayou.vscode-todo-highlight
yzhang.markdown-all-in-one

ssmale@Simons-MacBook-Pro-2 ~ % code --list-extensions --profile test
aaron-bond.better-comments
benjaminadk.emojis4git
BriteSnow.vscode-toggle-quotes
christian-kohler.path-intellisense
eamodio.gitlens
esbenp.prettier-vscode
GitHub.vscode-pull-request-github
GitLab.gitlab-workflow
Gruntfuggly.todo-tree
KnisterPeter.vscode-commitizen
michelemelluso.gitignore
ms-azuretools.vscode-docker
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
ms-vscode.remote-explorer
quicktype.quicktype
richie5um2.vscode-sort-json
shyykoserhiy.vscode-spotify
streetsidesoftware.code-spell-checker
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vscode-icons-team.vscode-icons
WakaTime.vscode-wakatime
wayou.vscode-todo-highlight
yzhang.markdown-all-in-one

/duplicate #199453

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


Run antrea in openshift using networkPolicyOnly mode

is there a way to run antrea in openshift using networkPolicyOnly mode?
Since the RH atomic host is readonly at /opt/cni/bin , the init containter of the agent will fail.
If I change that folder to someplace else, the initContainer will suceed but the host will lose all connectivity immediately.

As @tnqn pointed out on Slack, if the primary CNI for the cluster is ovn-kubernetes, networkPolicyOnly is unlikely to work. There may be issues since both CNIs use OVS as their datapath, and networkPolicyOnly mode makes some assumptions about the existing CNI (https://github.com/antrea-io/antrea/blob/main/docs/design/policy-only.md).

Since the RH atomic host is readonly at /opt/cni/bin , the init containter of the agent will fail.

Can you clarify this comment? Even in "normal" (encap) mode, Antrea will install its binary there, so it needs to be able to write to this folder. That's not specific to networkPolicyOnly mode / CNI chaining. When using the Antrea operator for OpenShift for example, we still write to this folder.
BTW, maybe you could provide more information about why you would want to use both CNIs here. The typical use case would be using Antrea as the only CNI for the OpenShift cluster, with the certified Antrea operator. networkPolicyOnly mode exists because for managed K8s clusters, it is not always possible to deploy Antrea "standalone" (because of K8s configuration and / or VPC networking). But that should not be the case for OpenShift clusters?

HI @antoninbas , it is been a busy couple of weeks trying to plan the move from vanilla k8s to openshift. In my company we've been using antrea for years and rely a lot on its network policies. Since I was not having success on installing antrea as primary CNI ( workaround in  https://github.com/vmware/antrea-operator-for-kubernetes/issues/98 ) i was thinking about the networkPolicyOnly mode.
Now the problem is the lack of antrea operator`s certification for 4.13 and 4.14. (https://github.com/vmware/antrea-operator-for-kubernetes/issues/99) thus the third-party collaborative support between Redhat and Vmware wont apply if I use antrea on 4.14.  And that's risky since the primary CNI can not be changed in openshift without a full reinstall.
I will also evaluate if I can get the VMware's official subscription/support for Antrea CNI.
btw, any place where I can get the SKU for antrea CNI and how the subscription works  (core/socket)? I will be running antrea outside VMware Virtualization. It will be on openshift bare metal.


Remove superfluos projectId parameter in BigQuery job definition

Description
Remove parameter projectId from luigi.contrib.bigquery tasks.
Motivation and Context

Resolves #2116

Have you tested this? If so, how?
I tested it using a job based on BigQueryRunQueryTask against live data.

@Tarrasch I also created the issue. So that should be fine.

@mikekap Being the original author would you mind to review?


No sample how to create diagnostic settings for subscription

Per the doc for CLI there is a way to create diagnostic settings for subscription:
az monitor diagnostic-settings subscription create ...

which they can be used to onboard to Azure Sentinel.
I'm looking for a way to create it using ARM template and the article doesn't list such option.
Nor does another article: Diagnostic settings in Azure Monitor#Create diagnostic settings

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

ID: 07fc8414-3bff-03f8-fdca-f040eed71389
Version Independent ID: 8196bd5d-b265-fd62-59c4-2a97b34ebf69
Content: Resource Manager template samples for diagnostic settings - Azure Monitor
Content Source: articles/azure-monitor/essentials/resource-manager-diagnostic-settings.md
Service: azure-monitor
Sub-service: essentials
GitHub Login: @bwren
Microsoft Alias: bwren

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

@abatishchev The template is already present within the document.

As there are no further documentation changes, we will close the issue for now. If there are further questions , please revert and we will be glad to assist you.


Vickel: Blacklist<PHONE_NUMBER>

Vickel requests the blacklist of the number<PHONE_NUMBER>. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by double-beep in Charcoal HQ


refactoring: refactor sparse vector support

I feel like sparse vector support should not be in __init__
I tried this naming, it seems to be better for the configurator classes, but worse for the client class, idk, feel free to change it back if you want

LGTM. Thanks!


cant run rawdog on windows.

I am using Python 3.12.2
I ran pip install rawdog-ai
then I initially  get this error when I run rawdog
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\rawdog_main.py", line 4, in
import readline
ModuleNotFoundError: No module named 'readline'
I installed pip install pyreadline
Now I'm getting this error
C:\Windows\System32>rawdog
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Scripts\rawdog.exe_main.py", line 4, in
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\rawdog_main.py", line 4, in
import readline
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\readline.py", line 34, in
rl = Readline()
^^^^^^^^^^
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\rlmain.py", line 422, in init
BaseReadline.init(self)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\rlmain.py", line 62, in init
mode.init_editing_mode(None)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\modes\emacs.py", line 633, in init_editing_mode
self._bind_key('space',       self.self_insert)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\modes\basemode.py", line 162, in _bind_key
if not callable(func):
^^^^^^^^^^^^^^
File "C:\Users\myuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyreadline\py3k_compat.py", line 8, in callable
return isinstance(x, collections.Callable)
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Callable'

try pip install pyreadline3 instead - sorry this should be fixed already on the github version of the code, but hasn't yet been updated on PyPI

it's updated on PyPI now! closing this as it should be fixed, please reopen if you experience any more issues.

rawdog failed to start for some reason.**
C:\Users\thele>rawdog
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Scripts\rawdog.exe_main.py", line 7, in
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog_main.py", line 88, in main
llm_client = LLMClient(config)
^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\llm_client.py", line 36, in init
{"role": "system", "content": EnvInfo(config=self.config).render_prompt()},
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 21, in init
self._set_from_env()
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 38, in _set_from_env
self.cwd_info = self._get_cwd_info()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\site-packages\rawdog\utils.py", line 63, in _get_cwd_info
size = len(list(item.iterdir())) if item.is_dir() else item.stat().st_size
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\thele\AppData\Local\Programs\Python\Python311\Lib\pathlib.py", line 931, in iterdir
for name in os.listdir(self):
^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied: 'C:\Users\thele\Application Data'
So I ran CMD with admin privilege. It worked but it's showing that fatal error. is this normal? Should I still pip install pyreadline3??

I have had the same issue. I had exactly the same error as the other guy, .... tried to manually import readline ... the same problem ...  tried to import pyreadline ... again ... luckily I have seen this closed message ... so I imported the pyreadline3. And finally.  The Windows installation is a pain, and after all these troubles - it cost me a significant amount of time - I am now rather cautious about the product. ... but thanks anyway ...

@miraculix95 how did you install rawdog? with pip install rawdog-ai or by cloning this repo?

With pip install rawdog-ai

One information I found missing as well: What Python versions are allowed? Is Python 3.12. allowed?
What is the ~ directory for the config file in the context of a windows installation?

Ah, thanks there was an issue with requirements setup, fixed by @jakethekoenig here: https://github.com/AbanteAI/rawdog/pull/88
Python 3.12 should work! We'll add which versions work, but I'd assume 3.10+
The ~ directory on windows should be something like C:\Users\username

Thanks a lot


[DRAFT] Improve plot display

THIS IS A DRAFT VERSION.
Instead of writing HTML plot for each combination of data, we use a unique plot and update it using JS.

The constant TEMPLATE_LOCAL_RESULT seems to be unused.

The link https://cdn.plot.ly/plotly-latest.min.js returns PlotlyJS V1 instead of V2.

Codecov Report

Merging #418 (26fba74) into main (899967d) will decrease coverage by 0.32%.
The diff coverage is 5.88%.

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   53.99%   53.67%   -0.33%
==========================================
  Files          44       44
  Lines        2667     2683      +16
  Branches      506      510       +4
==========================================
  Hits         1440     1440
- Misses       1120     1136      +16
  Partials      107      107

Just tried it, this seems much smoother!! There are still some work but it is going in the right direction I think.
One think: you should store the median curve directly in the json data no? this way you won't have multiple curve per solver?

Maybe a nice thing would be to list the different steps that you think you will take in the PR description, so we can discuss them and see if anything is missing?

But I have to say, the loading seems super smooth!! :)

It is amazingly fast compared ton main, thanks @Melvin-klein ! :tada:
Just a small observation if it hasn't been done already, there is a black line for the y axis but not fore the x axis:

I think no line for axis but a slightly grey/blue background like before is OK

@Melvin-klein you can configure vscode to do this automatically on save by adding this to your settings.json:
    "files.trimTrailingWhitespace": true,
    "editor.formatOnSave": true,

Ok thanks !

I am still amazed by how fast this is.
One comment: can you set a negative xlim, so that it does not start exactly at 0 ? Some curves are almost hidden in some cases:


[Feat][UI] Migrate to unplugin icons

Mockups / Screenshots
Replace @iconify/react with unplugin-icons

https://github.com/unplugin/unplugin-icons

There's a nifty guide here https://www.launchfa.st/blog/nextjs-unplugin-icons/


Memory leak in the Dolphin Platform

There is a memory leak in the Dolphin Platform. The resources are not fully cleaned up when a session ends.

#68 has been merged. Issue can be closed


[DRAFT] Refactoring License Checker

This draft is for refactoring license checker and updating.
ONE-vscode-DCO-1.0-Signed-off-by: Seok NamKoong<EMAIL_ADDRESS>
Parent Issue : #356

Related PRs are all created, close!


let paddle hold the creation buffer

Description
Avoid random crashes during the bytebuffer early catch

Codecov Report

Merging #1162 (2810ff8) into master (002c04a) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1162      +/-   ##
============================================
- Coverage     70.20%   70.18%   -0.03%
  Complexity     5342     5342
============================================
  Files           513      513
  Lines         23703    23708       +5
  Branches       2562     2562
============================================
- Hits          16641    16639       -2
- Misses         5697     5710      +13
+ Partials       1365     1359       -6

Impacted Files
Coverage Δ

...ain/java/ai/djl/paddlepaddle/engine/PpNDArray.java
55.81% <100.00%> (+5.81%)
:arrow_up:

...rc/main/java/ai/djl/paddlepaddle/jni/JniUtils.java
84.44% <100.00%> (ø)

...gine/src/main/java/ai/djl/dlr/engine/DlrModel.java
53.12% <0.00%> (-3.13%)
:arrow_down:

api/src/main/java/ai/djl/util/Platform.java
42.30% <0.00%> (-1.93%)
:arrow_down:

api/src/main/java/ai/djl/repository/Artifact.java
86.17% <0.00%> (-1.63%)
:arrow_down:

...g/src/main/java/ai/djl/serving/util/Connector.java
55.40% <0.00%> (-1.36%)
:arrow_down:

...ngine/src/main/java/ai/djl/mxnet/jna/LibUtils.java
40.00% <0.00%> (-1.18%)
:arrow_down:

.../djl/training/listener/MemoryTrainingListener.java
76.62% <0.00%> (ø)

...rc/main/java/ai/djl/paddlepaddle/jni/LibUtils.java
48.30% <0.00%> (ø)

Continue to review full report at Codecov.

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


Nested ItemsRepeater issues

Describe the bug
When nesting ItemsRepeaters, a couple things...
1- When scrolling, primarily with the scrollbar thumb, the garbage collector runs almost constantly. I can't tell if this occurs in WinUI since that mostly lives in native memory
2- When scrolling, especially large jumps quickly, the scrollviewer will freeze. Resizing a parent container (like the window) will fix it. I think this is related to the items of different height issue, but I haven't seen any reports of freezing yet. I also can't replicate this in WinUI, I can get choppy scrolling but it never fully freezes. Sometimes it takes aggressive scrolling to cause this (like in the video I attached), and sometimes one large quick scroll will do it.
(see attached video for demo of 1 & 2)
3- There may or may not be a memory leak. I do think this also occurs upstream in WinUI, as process memory slowly climbs when scrolling.
When first loaded, 10 ListBoxItems are present
Scroll up and down the list once: 179 ListBoxItems are present
Scroll randomly: 301
Scrolling some more: 438
To Reproduce
Example code:
Group installed fonts alphabetically and display using nested ItemsRepeaters
public class ViewModel
{
        public ViewModel()
        {
	        Items = new List<string>(FontManager.Current.GetInstalledFontFamilyNames());
	        var query = from item in Items
				        group item by item.Substring(0, 1).ToUpper() into g
				        orderby g.Key
				        select new GroupInfo(g) { Key = g.Key };
	        Groups = new List<GroupInfo>(query);
        }

        public List<string> Items { get; }
        public List<GroupInfo> Groups { get; }
}

public class GroupInfo : List<string>
{
        public string Key { get; set; }
        public GroupInfo(IEnumerable<string> items) : base(items) { }
}

Window Content:
<Panel>
      <Border Width="350" Height="400"
              BorderBrush="{DynamicResource SystemControlHighlightBaseLowBrush}"
              BorderThickness="1">
          <ScrollViewer HorizontalScrollBarVisibility="Disabled">
              <ItemsRepeater Items="{Binding Groups}">
                  <ItemsRepeater.ItemTemplate>
                      <DataTemplate>
                          <StackPanel>
                              <Border Height="40">
                                  <TextBlock Text="{Binding Key}"
                                             VerticalAlignment="Center"
                                             Margin="12 0"
                                             FontWeight="Bold"/>
                              </Border>
                              <ItemsRepeater Items="{Binding}">
                                  <ItemsRepeater.ItemTemplate>
                                      <DataTemplate>
                                          <ListBoxItem Height="40" Content="{Binding}" />
                                      </DataTemplate>
                                  </ItemsRepeater.ItemTemplate>
                              </ItemsRepeater>
                          </StackPanel>
                      </DataTemplate>
                  </ItemsRepeater.ItemTemplate>
              </ItemsRepeater>
          </ScrollViewer>
      </Border>
  </Panel>

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
https://user-images.githubusercontent.com/40413319/111887602-0ebf6c00-89a4-11eb-80c9-889c42d62ce5.mp4
Desktop (please complete the following information):

OS: Windows 10
Version 0.10

Nested ItemsRepeater doesn't look like a correct design. I also don't think it will work with virtualization, so you probably should disable it on StackLayout.
I would use mixed items in the source like new [] { groupHeader1, item1, item2, groupHeader2, item3, item4 }, and set different templates for headers and items with custom template factory. It will be simpler solution.
Better solution might be creating Layout, that knows about headers, and will arrange headers and items correctly. Not sure how easy it is, and if it's even possible, but it will allow setting up custom layout placement for headers and items (important for grid-like layouts).

Nesting ItemsRepeaters is actually recommended in the UWP docs: https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/items-repeater#display-grouped-items.

@jp2masa interesting, I hope it's really supported by design.
Although as the example they used horizontal lists inside of the group.

The WinUI test app has an example of vertical stack within vertical stack, and the NavigationView also uses this for hierarchical items (tho virtualization is disabled in the NavView for some unrelated bug)

Nesting ItemsRepeaters is actually recommended in the UWP docs: https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/items-repeater#display-grouped-items.

@jp2masa interesting, I hope it's really supported by design.
Although as the example they used horizontal lists inside of the group.

Nesting ItemsRepeater MUST be supported for future "ItemsRepeater as ItemsPresenter" Avalonia plans. Nesting arbitrary controls is also a pretty fundamental XAML concept.
That said, I've seen nothing but issues with the edge cases using ItemsRepeater. I'm not even sure the fundamental design works in all theoretical edge cases. However, it seems like it should and it came from some smart minds at Microsoft. I guess it just doesn't have the mileage yet to have solved all the problems.


bug in operator creation when array only used as index

from devito import Grid, Function, Operator, Eq, Dimension
import numpy as np

grid = Grid(shape=(10,10))
x, y = grid.dimensions

p_poke = Dimension('p_src')
d = Dimension('d')

npoke = 1

u = Function(name='u', grid=grid, space_order=0)

coordinates = Function(name='coordinates',
    dimensions=(p_poke, d),
    shape=(npoke, grid.dim), space_order=0, dtype=np.int32)

coordinates.data[0,0] = 4
coordinates.data[0,1] = 3

poke_eq = Eq(u.indexed[coordinates.indexed[p_poke,0],
                       coordinates.indexed[p_poke,1]], 1.0)

op = Operator(poke_eq)
print(op)

# The need for the p_src_e=2 is, I think, another issue
op.apply(p_src_e=2)

print(u.data)

Errors with:
Traceback (most recent call last):
  File "indexed_as_index_bug.py", line 24, in <module>
    print(op)
  File ".../devito/ir/iet/nodes.py", line 103, in __str__
    return str(self.ccode)
  File ".../devito/ir/iet/nodes.py", line 77, in ccode
    return CGen().visit(self)
  File ".../devito/tools.py", line 544, in visit
    return meth(o, *args, **kwargs)
  File ".../devito/ir/iet/visitors.py", line 290, in visit_Operator
    decls = self._args_decl(params)
  File ".../devito/ir/iet/visitors.py", line 146, in _args_decl
    if i.is_Object:
AttributeError: 'Symbol' object has no attribute 'is_Object'

It all starts to work if I use the coordinates array in a numerical expression, rather than only as an index.
e.g.:
-poke_eq = Eq(u.indexed[coordinates.indexed[p_poke,0], coordinates.indexed[p_poke,1]], 1.0)
+poke_eq = Eq(u.indexed[coordinates.indexed[p_poke,0], coordinates.indexed[p_poke,1]], coordinates.indexed[p_poke,0]*1e-20 + 1.0)

giving, as desired:
[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 1. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]]

Does it also break without indexed? like:
poke_eq = Eq(u.subs({u.indices[0] : coordinates.subs({d:0}), u.indices[1] : coordinates.subs({d:1})), 1.0)

Well, it does produce C code at least...  but then it's a different issue:
  gettimeofday(&start_section_0, NULL);
  for (int p_src = p_src_s; p_src < p_src_e - 1; p_src += 1)
  {
    // Not supported in C:
// coordinates
// coordinates
u[coordinates(p_src, 0)][coordinates(p_src, 1)] = 1.00000000000000F;
  }
  gettimeofday(&end_section_0, NULL);
  timers->section_0 += (double)(end_section_0.tv_sec-start_section_0.tv_sec)+(double)(end_section_0.tv_usec-start_section_0.tv_usec)/1000000;
  return 0;
}

I tried a lot of ways to get it to work, trying to duplicate stuff from SparseFunction, and eventually realised that SparseFunction works because the value of the coordinate is also used on the rhs of the expression.


Add Etch a Sketch

Related Issue

issue: #500
Description
Added a etch a sketch project. tech stack is HTML CSS JAVASCRIPT
Screenshots

Looks Good 🎉

Hi @priyankarpal  Can you add what level is this pr?


Diabolik Lovers: More, Blood Limited V Edition [PCSG00476]

App summary

App name: Diabolik Lovers: More, Blood Limited V Edition
App serial: PCSG00476
App version: 1.0

Vita3K summary

Version: v0.1.5
Build number: 2642
Commit hash: https://github.com/vita3k/vita3k/commit/4e1e255a
CPU backend: Dynamic

Test environment summary

Tested by: othmanead
OS: Windows 11
CPU: Intel i5-10300H
GPU: RTX 3060 mobile
RAM: 16 GB

Issue:

Game plays with no issues

Screenshots:

Log
vita3k.log
Recommended labels

Playable

Good afternoon, how to download this game?


Remove DescriptorBufferContentDesc

See #608
Initially the idea was to make sure that the layout of content of the buffer expected by the shader was the same as the actual layout.
This is now abandoned because too cumbersome and too "weird".

Technically a breaking change, but it's ok since it's an obscure part of the library.

We may wish to wait for vulkano 0.6 to merge this, as it requires an update of simultaneously vulkano and vulkano-shaders. In other words vulkano 0.5.3 wouldn't be compatible with vulkano-shaders 0.5.2.


[CSNM] Add new object type CSNM

@michaelbelenki  can you remove the .DS_Store file, as it is a macOS specific file and not relevant for the git repository?
We told git to ignore such files, but for some reason you we able to add it 😓 , https://github.com/SAP/abap-file-formats/blob/95f02af336b9a52a28873ed9a8a304da03ec281e/.gitignore#L2


File "F:/knowledge_graph/PromptKG-main/research/GenKGC/main.py", line 26, in import_class     class = getattr(module, class_name) AttributeError: module 'models' has no attribute 'RobertaUseLabelWord'

please set your PATH under the main.py folder

hi buddy, have you solved your issue?


Bug Report - How to change parameter of policy set assignment

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Versions

terraform:
azure provider:
module: 2.0.1
Description
I was looking at the documentation for excluding policy assignments here: https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/wiki/[Variables]-archetype_config_overrides
Let's say I want to change the policy that blocks ACR public access to "Audit", I was expecting to do something like this:
  archetype_config_overrides = {
    landing-zones = {
      archetype_id = "es_landing_zones"
      parameters = {
        # This currently doesn't work. Param not populated in policy definition set
        Deny-Public-Endpoints = {
          ACRPublicIpDenyEffect = "Audit"
        }
      }
      access_control = {}
    }

But that doesn't seem to trigger anything. Could that be because the parameters are not specified here? https://github.com/Azure/terraform-azurerm-caf-enterprise-scale/blob/e4019d8f8943cc341ba8fd13ba29c105d48031d1/modules/archetypes/lib/policy_assignments/policy_assignment_es_deny_public_endpoints.tmpl.json
Steps to Reproduce

Add the config overrides block.
Run terraform plan
No action will be taken.

Screenshots

Additional context

@DevSecNinja, in order for the parameters to do anything, they must map to a valid Policy Assignment.
In this instance, the Deny-Public-Endpoints Policy Assignment isn't applied at the landing-zones scope as this is only applied at the corp scope within the ALZ reference architecture.
For this to work, you can either set deploy_corp_landing_zones = true and use the same approach to set this parameter on this Policy Assignment, or you can use the archetype extensions capability to add this Policy Assignment to the landing-zones scope.
Please let me know if you require further guidance on this.

Incidentally, you can also set parameter values within the archetype definition files, including within an archetype extension. For this type of scenario, that may work better for you as it would allow you to both enable the Policy Assignment and set custom parameter values within a single place, potentially negating the need for setting archetype_config_overrides.


Animation bug w/ animation-smoothing: Bows-shooting

Currently, the shooting-animation, and the arrow-animation are not synchronized.
More precisely, the arrow gets shot even before the character would have the arrow in it's hand.
I'm not sure, whether it's also the case with other weapons/items, etc.

We aren't jagex, if you want that changed ask them

We aren't jagex, if you want that changed ask them

As much, as I'd love to, the bug is caused after I turn the animation-smoothing on in runelite.
I don't think, they have anything to do with it.

anim smoothing just tweens the animations; it will be desynced without it on too

I've tried to make as accurate images as I could.
As you can see on the image WITH smoothing, the arrow is being fired without the figure actually touching the arrow.
This is not the case in the other image.
I'm not sure, what causes this bug, but I'm very positive, that it's not Jagex-sided.


Adapt biographical details about public team profile page to new backend

Right now, the team rankings page exists. However, the behaviour where clicking on a team in the rankings leads to a new page showing its team profile is currently suppresed.
This PR would complete the work started by #318 by unsurpressing this ilnk and fixing any bugs with the page. These should also be linked via the rankings / team list page

done via #370


Proposed significant optimization for common cases

Great work with Dwifft. Thanks for it.
One challenge with the LCS algorithm is that it is O(m*n) in both CPU and memory consumption. Though this isn't a problem in practice when the size of the arrays is moderate, it becomes a problem when the arrays are large.
Anything that can be done to reduce the size of the arrays passed to the LCS algorithm has very beneficial results.
This approach, which I've used in the past in another language, is to essentially trim off the matching prefixes and suffixes from the arrays passing only the "middle" of the array to the LCS algorithm.
Of course, if there is a change at both the head and tail of the array, this optimization has no benefit. In the common case, though, the benefit is huge.
Based on the guidelines, I thought it would be good to discuss the idea before opening a PR. Nevertheless, it may be easiest to just see the code.
In my previous implementation, I also added change beyond what I've proposed here to pick an upper bound on m*n work factor. When that limit is exceeded, a reloadData is really the best approach.

Hey @epatey,
Thanks for opening this. This seems like a great idea to me, and I'd be open to merging a PR that implemented it. I do have some changes I'd probably want to make to the code in the diff you linked, but nothing systematic - if you send me a PR I'll give it a thorough review.
Have a great weekend!

#89

@jflinter @epatey How is the status on this one?


Bumps azure/login from 1 to 2.2.0

DEVOPS PULL REQUEST
Related Issue

While updating credentials for Azure and terraform, noticed that azure/login was behind on an update an not consistent in all modules.
Bumps azure/login from 1 to 2.2.0.

Changes Proposed

Modify all azure/login version to 2.2.0

Additional Information

Deployed to dev2 to tet it.

Testing

How should reviewers verify this PR?

<!---
## Checklist for Primary Reviewer
### Infrastructure
- [ ] Consult the results of the `terraform-plan` job inside the "Terraform Checks" workflow run for this PR. Confirm that there are no unexpected changes!

Waiting for cert renewal to be complete, then will move forward with merge

Re-ran backend test after it was removed from the merge queue and the test passed, so re-adding it to the merge queue.


[fluentd] adds fluentd

Adds the Fluentd integration.

We need to rebase.

I'll rebase. I'm not going to rebase any until I'm ready to merge them because we need to rebase it after every new integration is added


Assistance with thestandard.com.hk

I've been trying for awhile to figure out a way to make this work but with no success.  I have a feeling split may work but I do not know regular expressions at all.  I'm wondering if you have any ideas.
Essentially I want to combine all of the  elements since there aren't any xpath elements above them that I have been able to get to work.
I really appreciate any help if you can provide.  If not, thanks for the amazing plugin.
If you have the time, a sample link is below.  Thanks again.
http://www.thestandard.com.hk/news_detail.asp?pp_cat=31&art_id=155819&sid=44191877&con_type=1&d_str=20150402

Hi cwmke,
Thanks for using my plugin.
Try this config:
"thestandaard.com.uk":{
    "type": "xpath",
    "xpath": "table\/tr\/td\/b[contains(@class, 'bodyHeadline')]\/..\/..\/.."
}

Worked for me.
If you need further assistant please do not hesitate to contact me.

I appreciate your response!  I'm wondering what you did means and how you were able to figure that out.  I think I figured out how you got the table/tr/td/b part, but when I attempt to apply the same thing to the below link (same site different xpath).
I attempted to switch the 'b' with an 'i' to no avail.  It appears this one may be in an iframe.  Could that be the issue?  Thanks a lot for your patience.

You're welcome.
The XPath means, I'm looking for a table table containing a row tr with table data td containing a bold b element that has the class bodyHeadline. If found, I step back to the table element by referencing the parent element ...
Can you provide the link you are talking about, seems you have forgotten to add it to your comment. As soon as I get it I'll give it a try.

Sorry about that.  Here you go.
http://www.thestandard.com.hk/breaking_news_detail.asp?id=59426

I think this is nealy what you can get:
{
    "type": "xpath",
    "xpath": [
        "table\/tr\/td\/b[contains(@class, 'bodyHeadline')]\/..\/..\/..",
        "table[contains(@class,'bodyCopy')]\/.."
    ],
    "cleanup": [
        "a[@name='anc_']",
        "table[contains(@class, 'breakingListTitle')]"
    ]
}

The content is structured completly different. And It contains unclosed tags, making it harder...

This site has been giving me trouble for a few months.  I ended up switching some parts around from what you provided and below is my final version.  I just subscribed to your blog and look forward to using feediron for a long time.  Have a great day and thanks again for your help.
},
"thestandard.com.hk/breaking_news_detail": {
    "type": "xpath",
    "xpath": "table\/tr\/td\/b[contains(@class, 'bodyHeadline')]\/..\/..\/..",
    "cleanup": [
        "i",
        "b",
        "table"
    ]
},
"thestandard.com.hk": {
    "type": "xpath",
    "xpath": "table\/tr\/td\/span[contains(@class, 'bodyCopy')]\/..\/..\/..",
    "cleanup": [
        "a",
        "span[@class='bodyHeadline']",
        "i",
        "b",
        "table"
    ]
}

You'r welcome!
Do you have experience in git? You can share the recipes for other users by creating a pull request.

Only a little, but I'll look into it and add mine.  I have quite a few sites cleaned up.  The only problem I could see is that my formatting removes article titles, dates, and in some instances authors, since tt-rss adds the date and title already.


S3 multipart uploads to text streams are committed on exception

Problem description
If I smart_open an S3 file in text mode, write some data, and then raise an exception, I expect the multipart upload to be terminated, and no key to be created. That's what I see for binary-mode smart_open streams.
This is almost the same issue as https://github.com/RaRe-Technologies/smart_open/issues/684, but in the context of using text streams, instead of compression. It suggests there might be some broader architectural fix, although I'm not sure what it would be.
Steps/code to reproduce the problem
Given this code:
with smart_open.open("s3://some_bucket/path/to/key.txt", "w") as fh:
  fh.write("hello\n")
  raise AssertionError()

I expect key.txt not to be created. Instead, I see it created with the content "hello\n".
For the almost-identical binary version:
with smart_open.open("s3://some_bucket/path/to/key.txt", "wb") as fh:
  fh.write(b"hello\n")
  raise AssertionError()

it works as intended.
The proximate problem is that while s3.MultipartWriter implements cancellation on exception, when we open in text mode, we wrap the object in a TextIOWrapper.
TextIOWrapper inherits from IOBase, and IOBase.__exit__ unconditionally calls self.close(), which completes the write and creates the partial object.
Versions
Please provide the output of:
import platform, sys, smart_open
print(platform.platform())
print("Python", sys.version)
print("smart_open", smart_open.__version__)

Linux-5.4.209-116.367.amzn2.x86_64-x86_64-with-glibc2.35
Python 3.10.8 (main, Feb 21 2023, 22:10:24) [GCC 11.3.0]
smart_open 6.3.0

Checklist
Before you create the issue, please make sure you have:

[x] Described the problem clearly
[x] Provided a minimal reproducible example, including any required data
[x] Provided the version numbers of the relevant software

This issue affects SinglePartWriter as well.
The problem boils down to how garbage collection of both SinglepartWriter and MultipartWriter is being done. Both writers inherit from io.BufferedIOBase which calls .close() on garbage collection when __del__() descriptor is invoked.
If writer was properly matked as closed on exception then calling del() by GC would close the writer. Unfortunately current implementation of closed look like this:
@property
    def closed(self):
        return self._buf is None

Hence it will always return  True in case of unhandled exception. I suppose easy way to fix that would be to set self._buf = None at the end of terminate() method of both writers.

The proximate problem is that while s3.MultipartWriter implements cancellation on exception, when we open in text mode, we wrap the object in a TextIOWrapper.
TextIOWrapper inherits from IOBase, and IOBase.__exit__ unconditionally calls self.close(), which completes the write and creates the partial object.

TextIoWrapper was patched in v7.0.0 ref https://github.com/piskvorky/smart_open/commit/42682e7eab45b01938b8964a7acec5dcd461b31e
So using the with-statement will now also abort upload on exception when in text mode.
I think that fixes this issue

@ddelange regardless of patches for TextIOWrapper implemented in v7.0.0 close() will be called on garbage collection resulting in unwanted writes to S3.

@donsokolone Can you think of a way we can avoid the unwanted writes?

@mpenkov After doing some more troubleshooting I've created separate issue #819 as the problem I've mentioned affects only SinglepartWriter at the moment. Fix for that is quite simple and I will try to PR it today.


Upgrade to dep

Using dep as go dependencies management

Using dep as go depedencies management
Updating imports and code to comply to updated dependencies
Updating Makefile to use dep instead of glide
Updating Travis CI to also use dep instead of glide

This fixes the bug where reclaimPolicy was not taken into account by the
external provisioner (upgrading to latest version fixes it)

Very cool, I'll test this out!


Is ERC721SeaDropUpgradeable Supported?

Wanted to clarify if upgradeable contracts are supported? Having tried it out for a few days, I have noticed the following challenges that I do not encounter with the non-upgradeable version.
Note that I am on the main branch

@openzeppelin/hardhat-upgrades is not included in package.json but utilised in hardhat.config.ts
Custom Unrecognised Error encountered when attempting to mint on a locally forked Mumbai hardhat env and/or deploy a local instance of SeaDrop
Deployment of ERC721SeaDropUpgradeable contract leads to a "Large Contract Size" error and requires allowUnlimitedContractSize: true to be included hardhat.config.ts
No valid tests within src-upgradeable

Wanted to check with the team if the upgradeable contract is tested, supported and if there have been any cases where an upgradeable ERC721SeaDrop contract has been deployed and minted successfully.

yes it does work, there are many deployments of it out in the wild. instructions here.
not sure why you're having issues with the contract size, haven't seen that before.
i haven't gotten a chance to hook it up to the existing test suite, i will do for v2 which we'll be upgrading to over the next weeks/months and I have yet to build out upgradeable contracts for those yet, when I do it will definitely be hooked up the to the test suite.

thanks for the fast response. to be fair, im using a local fork of mumbai and haven't tried deploying it to testnet directly.
i'll give that a shot and see if there are any issues and revert back if i do

Hi, wanted to do a quick confirmation that it deploys well on sepolia testnet and I could do a full end to end flow.
However for some reason, it doesn't work properly if you fork a network on hardhat or if you deploy on a local hardhat node.
As such, there isn't a way to unit test the upgradeable contracts.
Looking forward to the v2 update. happy to help as well.
Will close this issue. thanks @ryanio for ur response


Restyle the workflow details page

New designs have been produced for the tools detail page. See here:
https://projects.invisionapp.com/d/main#/console/13746874/318884185/preview
Change the existing tools tab to match this styling. Leave the existing 'launch' button in place for now with it's standard behavior. Also ignore "Processing single workflows from files" and the other checkbox. The only thing you can do at the moment is process from a table.
"Select index table" is equivalent to existing "Data Type" selector, and can have the same behavior. "Select index table" is preferable language though.

@bradtaylor do you want the Launch Analysis button visible on all of the "tabs", or just on Outputs?


LightweightConv. Incorrect decoding with incremental state

🐛 Bug
I am using LightweightConv layer and it seems to be incorrect when applying with incremental state and step more than 1:
https://github.com/pytorch/fairseq/blob/fcca32258c8e8bcc9f9890bf4714fa2f96b6b3e1/fairseq/modules/lightweight_convolution.py#L221
Code and Expected behavior
# LightweightConv1dTBC
conv = LightweightConv(
    1,
    kernel_size=3,
    padding_l=2,
    weight_softmax=True,
    num_heads=1,
    weight_dropout=0.0,
)
long_x = torch.arange(30.0).view(-1, 1, 1)

step = 10
result = []
state = {}
for i in range(0, len(long_x), step):
  with torch.no_grad():
    out = conv(long_x[i:i+step], incremental_state=state).squeeze()
    result.append(out)

result = torch.cat(result)

(conv(long_x).squeeze() == result).all()
# False

Expected True (first few values are True, others False). If step is 1, equation is correct
Environment

fairseq Version (e.g., 1.0 or main): fairseq==0.10.0
PyTorch Version (e.g., 1.0): 1.9.0
OS (e.g., Linux): MacOS Catalina
How you installed fairseq (pip, source): pip
CPU only

Hi, any update?


Patch rendering: lines should not be drawn on nodes

Connecting lines should pass under nodes, not on top.

That's because of the fact, that in the current implementation the pin positions are calculated while the nodes are drawn, and therefore the links can only be rendered afterwards.
To fix this, we might need a 2pass-approach, where pin location calculation is taking place in a step before.
Also, there might be some SVG notation to define the z-index. Any hints about that very appreciated.


Use of bare << to mean <<"" is deprecated at Makefile.PL

For perls 5.22 .. 5.24 the build fails like this:
Output from '/usr/perl5.22.2t/bin/perl Makefile.PL':

Use of bare << to mean <<"" is deprecated at Makefile.PL line 58.
Bareword found where operator expected at Makefile.PL line 62, near "tidy"
	(Missing semicolon on previous line?)
Unquoted string "lib" may clash with future reserved word at Makefile.PL line 63.
syntax error at Makefile.PL line 58, near "<<~"
Search pattern not terminated at Makefile.PL line 66.

Fixed at head. Thanks.


IOT instruction (core dumped)  ./bin/crystal... when compiling Crystal for arm64

Bug report
I'm compiling Crystal for arm64 (for my Raspberry Pi) as per these instructions.
In the repo's root, I ran make deps, then I ran ./bin/crystal build src/compiler/crystal.cr --cross-compile --target arm-unknown-linux-gnueabihf --release -s -D without_openssl -D without_zlib. The output was:
Parse:                             00:00:00.000050157 (   0.69MB)
Semantic (top level):              00:00:00.441987920 ( 142.28MB)
Semantic (new):                    00:00:00.003406280 ( 142.28MB)
Semantic (type declarations):      00:00:00.052405017 ( 150.28MB)
Semantic (abstract def check):     00:00:00.064425088 ( 150.28MB)
Semantic (restrictions augmenter): 00:00:00.017584969 ( 158.28MB)
Semantic (ivars initializers):     00:00:20.598774441 (1734.21MB)
Semantic (cvars initializers):     00:00:00.024971885 (1734.21MB)
Semantic (main):                   00:00:39.344143427 (2070.21MB)
Semantic (cleanup):                00:00:00.004213097 (2070.21MB)
Semantic (recursive struct check): 00:00:00.010476639 (2070.21MB)
Codegen (crystal):                 00:00:16.539319306 (2366.21MB)
LLVM ERROR: Cannot generate unaligned atomic store
zsh: IOT instruction (core dumped)  ./bin/crystal build src/compiler/crystal.cr --cross-compile --target   -s -D

(I'm using zsh)
I then took away the -D without_openssl -D without_zlib from the end, and it produced similar results.
Parse:                             00:00:00.000038378 (   0.69MB)
Semantic (top level):              00:00:00.614185670 ( 142.29MB)
Semantic (new):                    00:00:00.003639309 ( 142.29MB)
Semantic (type declarations):      00:00:00.099942765 ( 150.29MB)
Semantic (abstract def check):     00:00:00.029608429 ( 158.29MB)
Semantic (restrictions augmenter): 00:00:00.018643700 ( 158.29MB)
Semantic (ivars initializers):     00:00:09.082725345 (1758.22MB)
Semantic (cvars initializers):     00:00:00.011977501 (1758.22MB)
Semantic (main):                   00:00:06.050483466 (2070.22MB)
Semantic (cleanup):                00:00:00.002086396 (2070.22MB)
Semantic (recursive struct check): 00:00:00.006443688 (2070.22MB)
Codegen (crystal):                 00:00:06.896796299 (2414.22MB)
LLVM ERROR: Cannot generate unaligned atomic store
zsh: IOT instruction (core dumped)  ./bin/crystal build src/compiler/crystal.cr --cross-compile --target   -s

./bin/crystal -v output:
Crystal 1.5.0 (2022-07-10)

LLVM: 14.0.6
Default target: x86_64-pc-linux-gnu

/bin/crystal -v produces the same output.
OS: Arch Linux July 2022.
I don't know any Crystal at all; I'm only compiling it so I can compile a program written in Crystal.
Thanks in advance!

These instructions are very outdated.
Also note that the target architecture for ARM64 is aarch64, arm targets 32bit ARM.
If you're running Archlinux ARM on the target there's no need to cross-compile, just install the package: https://archlinuxarm.org/packages/aarch64/crystal.
Otherwise you should have some luck with running the static Alpine builds on the target or cross compiling via an Alpine based docker container.

Thank you very much! After installing the deb package, Crystal works fine. Thank you!


[LANG-1681] - fix some javadoc on FieldUtils methods

Fix for https://issues.apache.org/jira/browse/LANG-1681
Some methods using Validate.nonNull not refering to NullPointerException in javadoc comment

Codecov Report

Merging #1047 (a26c77f) into master (fee35dd) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1047   +/-   ##
=========================================
  Coverage     92.06%   92.06%
  Complexity     7484     7484
=========================================
  Files           194      194
  Lines         15725    15725
  Branches       2897     2897
=========================================
  Hits          14478    14478
  Misses          674      674
  Partials        573      573

Impacted Files
Coverage Δ

...a/org/apache/commons/lang3/reflect/FieldUtils.java
93.33% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Thanks, @laurentschoelens for fixing these and @kinow for pinging me.
These 4 methods were among my tool findings.
I'm rerunning the tool on the latest commit. I'll be happy to submit more PRs fixing what it finds. Then we can finally close LANG-1681.
Should I submit one PR per class or a single (possibly large) PR for all findings?
The tool also finds missing @throws. I can submit different PRs for those as well.
Does that sound good to you, @kinow?

Hi @dvmarcilio

I'm rerunning the tool on the latest commit. I'll be happy to submit more PRs fixing what it finds. Then we can finally close LANG-1681.
Should I submit one PR per class or a single (possibly large) PR for all findings?

That could result in a lot of similar PRs, which would spam others that follow every message/commit/etc sent to the ASF mailing lists. Would you be able to provide this list here? Then @laurentschoelens can see whether that can be added to this PR, or maybe you could send an extra commit/diff here.
As for the missing throws I think we can also add it here (noting that we have to verify first whether we document every runtime error or not - some libraries may decide to document everything, while others document only a few like NPE, IllegalArgument, etc).
Cheers
Bruno

@laurentschoelens, could you please give me permissions on your fork's branch LANG-1681 so I can add more commits to it?

@laurentschoelens, could you please give me permissions on your fork's branch LANG-1681 so I can add more commits to it?

Could you tell me how to do it ?

Could you tell me how to do it ?

This should work: Inviting collaborators to a personal repository However, I'm unsure if you can give permission to a single branch. If that's the case, I promise not to touch other branches :)

Done, enjoy 😃

Hi @kinow, work done by @dvmarcilio

I pushed modifications for all relevant cases that my tool could find.

I pushed modifications for all relevant cases that my tool could find.

I'll do checks on this soon.
Many thanks for the job done

Great team work! I've triggered the workflow to run, and will take a look at this PR later today. Thanks :+1:

Error:  src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java:[837] (regexp) RegexpSingleline: Line has trailing spaces.

@kinow : I'm not a git-pro but I'll squash the build fix with all commits of @dvmarcilio into one single commit and force-push to my repo if it's OK for you

@kinow : I'm not a git-pro but I'll squash the build fix with all commits of @dvmarcilio into one single commit and force-push to my repo if it's OK for you

Done. And build should be fixed


Tiling breask when window decorations are hidden (qutebrowser)

Hi @nikitabobko thanks a lot for the awesome project, I have been playing around with it for some time and finally switched over from yabai recently.
Everything works great for me other than qutebrowser

When I am hiding window decorations for qutebrowser, aerospace starts treating qutebrowser as a floating window.
Tiling works fine when window decorations are not hidden.

Wanted to ask if there is a way to allow this with a rule / if you have any other ideas.
This is what I used on yabai to achieve something similar:
yabai -m rule --add app="^qutebrowser$" title!="^$" role="AXWindow" subrole="AXDialog" manage=on
Again, thanks a lot!
ENV: macOS Sonoma, latest aerospace installed with brew

Duplicate of #276


The new import style causes eslint error

The new import style causes an import/no-unresolved ESLint error
import someSVG from "../../../../assets/views/someSVG.svg?react";

Duplicate of #91


📚 Name Change

Is your request related to a problem? Please describe.
FHeD doesn't sound professional
Suggestions below

HeDDIY (pronounced Hedy) - Help Desk DIY


Object literal methods in prototype assignments don't have correct this-type

/**
 * @constructor
 * @template {string} K
 * @template V
 */
// function Multimap() {
var Multimap = function() {
    /** @type {Object<string, V>} TODO: Remove the prototype from the fresh object */
    this._map = {};
};

Multimap.prototype = {
  /**
   * @param {K} key
   * @param {V} value
   */
  set: function(key, value) {
    var set = this._map.get(key);
    if (!set) {
      set = new Set();
      this._map.set(key, set);
    }
    set.add(value);
  }
}

Expected behavior:
No errors on this._map references.
Actual behavior:
Property '_map' doesn't exist on type { get(key: K): V }.

This is a regression in 3.1. Doesn't repro on 3.0.

The reason 3.0 doesn't repro is that all objects have an index signature, even with noImplicitAny. In 3.1, noImplicitAny doesn't put an index signature on object literals.
Outside references to Multimap instances have the correct type because they create an intersection. checkThisExpression should  do the same thing.


docs: in memory state store component

Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:

[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[x] Read the contribution guide
[ ] Commands include options for Linux, MacOS, and Windows within codetabs
[x] New file and folder names are globally unique
[ ] Page references use shortcodes instead of markdown or URL links
[ ] Images use HTML style and have alternative text
[ ] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:
Description

Issue reference
#2014

cc @msfussell
The validate-links report a url that i didn't modify. I think we need rerun the job :)

cc @msfussell The validate-links reports a url that i didn't modify. I think we need to rerun the job :)

No, it is everyone's job to fix broken links :) Check the URL. If it is exists, of course we need to rerun -- if it does not exist, please try to find another suitable URL and make the change :)

cc @msfussell The validate-links reports a url that i didn't modify. I think we need to rerun the job :)

No, it is everyone's job to fix broken links :) Check the URL. If it is exists, of course we need to rerun -- if it does not exist, please try to find another suitable URL and make the change :)

This is fixed now.

All resolved. Please review again


Toggle [disabled] on form submitter

During a form submission, toggle the disabled attribute on prior to
turbo:submit-start, and remove it prior to firing turbo:submit-end.
If callers need to control the submitter's disabled attribute more
finely, they can declare listeners to do so.
Combined with CSS rules, consumer applications can hide and show
submission text similar to RailsUJS's support for data-disable-with:
button                  .show-when-disabled { display: none; }
button[disabled]        .show-when-disabled { display: initial; }

button                  .show-when-enabled { display: initial; }
button[disabled]        .show-when-enabled { display: none; }

<button>
  Submit
  Submitting...
</button>

Styling descendant submitters based on their ancestors is only possible
with <button> elements, since <input type="submit"> do not have text
content or descendants of their own.

This is so slick. I don’t know why I thought I couldn’t use the request callbacks to achieve this. The use of CSS selectors to handle the disable behaviors is super cool too.
That said, I wonder if it’s worth trying to implement the behavior for submit given that submit inputs seems to be considered semantic for the Rails form builder. submit is useful for I18n as well thanks to Rails’ built-in localization of helpers.
Also there’s the question of if we want to continue the hack of disable working on links. I figure no since Hotwire focuses on progressive enhancement, but I wanted to throw it out there.

The SubmitEven.submitter discussion is very interesting
That makes me think that it may be out of Turbo's reach/responsibility to do something too specific about it. I personally think that disabling a button in a busy form is super important for all apps and Hotwire should probably provide a solution but I starting to gear more towards leaving that responsibility to Stimulus. I just added this functionality to an app and I liked having that control; from toggling styles the way I like to being responsible for accessibility. In my case, styles are tied to aria-disabled so this just works:
import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  static targets = ["submitter"]

  disableSubmitter(event){
    // Although this should be the correct implementation,
    // there is a bug in safari at the moment that doesn't allow
    // the submitter to be located this way.
    // In the future it's likely that Turbo will have this functionality baked
    // in so we won't have to do it manually.
    // https://github.com/hotwired/turbo-rails/pull/257
    // event.detail.formSubmission.submitter.setAttribute("disabled", "")
    this.submitterTarget.setAttribute("aria-disabled", "true")
  }

  enableSubmitter(event){
    this.submitterTarget.setAttribute("aria-disabled", "false")
  }
}

<%= form_with model: @user,  data: { controller: "form", action: 'turbo:submit-start->form#disableSubmitter turbo:submit-end->form#enableSubmitter') } do |form| %>
 <%= form.button data: { form_target: "submitter" } %>
<%= end %>

What I personally don't like about this approach is that it's very verbose. I could probably cut a couple of characters by changing disableSubmitter to  toggleSubmitter and having it set the listener for submit-end?.
Also, maybe I'm doing something wrong but I'd like for the actions to be declared on the button rather than the form. Is that possible?
I think having an answer for questions like these in the context of Stimulus might be worth exploring to understand if this functionality is better of over there. I still love the idea of this being part of a Standard Library.

I also found something interesting while working with Activestorage direct uploads yesterday. It also sets the disabled attribute upon form submission while it waits for the blob ids to return back from the server and upon success it doesn't remove the disabled attribute.
Maybe it's something we could think of holistically(?)

Let's start with disabled, so we stay congruent with ActiveStorage as well. Then we can explore options for aria-disabled separately.

The advantage of using disabled is it automatically prevents users who like to double-click buttons from submitting the form multiple times.  When using aria-disabled, you must also add additional javascript to check the state of aria-disabled to prevent double clicking?  If considering aria-disabled in the future, consider how to make it easy to also prevent double clicking.

@tleish that's a good point.
Turbo already declares FormSubmitObserver and FormInterceptor classes that listen for submit events.
If [aria-disabled="true"] were toggled, those listeners could be extended to ignore or cancel submissions where event.submitter.getAttribute("aria-disabled") == "true".


Prepare migration from GCR -> Artifact Registry

How to categorize this PR?
/area delivery
/kind technical-debt
What this PR does / why we need it
As GCR was deprecated, Gardener-Project needs to migrate from GCR (eu.gcr.io/gardener-project) to Artifact Registry (europe-docker.pkg.dev/gardener-project). This will result in different URLs (Registry + Repository, as called in OCI's terms) for Container Images built by Gardener-Project, which will require some build-scripts to be adjusted.
This specific Pull-Request will "register" the new Artifact-Registry as another "well-known" OCI Image Registry hosting images built by Gardener-Project.
In addition, it removes some "cruft" that seems has no longer been in use for quite some time by now.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note:
Prepare shared `component_descriptor` script for migration from GCR to Artifact Registry.

/lgtm
/approve


[WARNING] Permabann

Today many players (me included) in the issue section, reddit and other platforms, got banned (proberbly perma) because of botusing (or cheating how casual players would it).
If you're not affected by this, I would advise you to be careful. Maybe stop the bot for a while or at least set the walking speed down and make a few breaks every now and then.
It seams like Niantic is trying to shut us down before they implement trading.

Yea seems like one of my bots got banned but other one didn't. Not sure what the criteria is because i usually always ran them at the same time and same path.

Please don't use issues for this type of info, take it to the slack server


Enable code block Copy button to be disabled

The Copy button that appears in the upper right corner of every code-block is sometimes unwanted for at least one of these two reasons:

button obscures part of the content (see #574 even at non-small screen sizes)
not all content should be copied (e.g. terminal fragment with prompt, command [COPY ME], and sample output)

This issue is to suggest an enhancement that would enable removal of the Copy button.
Good: per site
Better: per page
Best: per code-block

Say we add a variable in the configuration file. If the user has it set to false, then we do not show the copy button on while site.
But the JS code is already present. So the user will get a bloated JS file, a part of which he has disabled due to the variable.
Would not it be better for the user to fork the elegant and create a copy which does not have the code copy JS script?
@iranzo let me know what you think.

Good: per site

I think it is possible.

Better: per page

Not sure how. But it is probably possible.

Best: per code-block

No idea how. I don't think we can pull it off.

Variable to disable would be easiest without requiring a fork. A per page should be similar.
Per block would be great but no easy way to get that sorted out.
Some global variable (defaulting to enabled) and article yaml preamble var which takes precedence over global always? like:
global  disable  -> enable for article
global enable -> disable for article

Hmm... I was hoping there might be a way with the :classprefix: RST option, but it looks like that affects classes inside the highlighted pre, not the class of the pre itself or its div parent.


Release v1.0.0-rc.1 for notation-core-go

Release v1.0.0-rc.1 for notation-core-go:

[ ] Decide on main commit for a release: Commit id 3022517
[ ] Cut branch named v1.0.0-rc.1 based on agreed upon main commit
[ ] Cut a tag named v1.0.0-rc.1

@SteveLasker @NiazFK  Please respond with +1 comment for approval.
cc: @iamsamirzon  @vaninrao10 @priteshbandi  @toddysm @FeynmanZhou @shizhMSFT

+1

+1

+1

+1

+1

+1

notation-core-go released https://github.com/notaryproject/notation-core-go/releases/tag/v1.0.0-rc.1