I can't use prisma client with AWS SAM/esbuild

Bug description
Hello everybody
I've a lambda configured through cloudformation sam
  OrganizationPOSTFunction:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: OrganizationPOST
      CodeUri: ../src/
      Handler: organization-post.lambdaHandler
      Events:
        Organization:
          Type: Api
          Properties:
            RestApiId: !Ref ApiGateway
            Path: /organization
            Method: post
    Metadata:
      BuildMethod: esbuild
      BuildProperties:
        Minify: true
        Target: "es2020"
        Sourcemap: true
        EntryPoints:
          - organization-post.ts

Right now all files in my lambda are merged into a single file, so inside my lambda there is only the .ts file (Is there any way to avoid this?) inside my lambda there is no prisma folder.
and inside my organization-post.ts I'm trying to use the Prisma Client
//inside my lambdaHandler
  const prisma = new PrismaClient()

//lots of lines
const organization = await prisma.organization.create({
            data : organizationRequest
        })

I have done the migration and the PrismaClient imported from @prisma/client works fine...I get autocomplete and everything seems to be ok
but when I run the project I get this error
'errorMessage': "ENOENT: no such file or directory, open '/var/task/schema.prisma'"

I want to know why the client is trying to access to the schema in that path...also is it possible to change the schema path in my PrismaClient instantiation?
Because everything in my lambda is bundled into a single file I found this solution
How to include static files into the lambda package with AWS SAM esbuild?
seems to be a good option but I'd need pass my schema dynamically like this
import { PrismaClient } from "@prisma/client";
import schema from "./prisma/schema.prisma"

console.log(`schema is ${schema}`) //print a weird name generated in runtime
const prisma = new PrismaClient({schema}) // <= I need an option like this but I can't find anything

Has anyone had any luck integrating prisma into a lambda with SAM/esbuild and can give me some guidance on how to configure it? Or is it impossible to use prisma with SAM/esbuild?
any help will be appreciated...thanks
How to reproduce

Expected behavior
the Prisma Client must work, I don't need lambda migration, just that my Prisma Client works with SAM
Prisma information

// Add your schema.prisma

// Add your code using Prisma Client

Environment & setup

OS:
Database:
Node.js version:

Prisma Version

Hi @carlosLMZarego.
It looks like your bundling configuration needs one more step. You need to ensure that schema.prisma from generated client directs gets copied to the same directory esbuild writes it's output. You can either use esbuild-plugin-copy or copy file manually.
You might also need to copy the engine file (libquery_engine*) from the same directory to the same location.
Let me know if it helps!.

@carlosLMZarego Did you apply @SevInf advice above?  If so and that didn't work, please reopen and let us know how can we help further.


Update NPM version.

Installing the module from NPM returns an old version, maybe forgot to publish to npm?

1.7.0 should be the latest version, which version are you getting when you run npm install deluge? I just ran it clean and am seeing it install 1.7.0 as expected.

Well looking at the code on this git "getTorrentRecord" is missing in 1.7.0, is this intentional?

You're right, looks like we never released that code. I just cut a release and published it. You should be able to get it from npm now.


Informer could loss some event

I found out that informer could loss some short event. For example, when I run a k8s job with a simple command "ls -l", informer receive event list such as PodPending, PodPending, PodPending, PodSucceed. The PodRunning state is lost.
Is that a bug? Or the informer doesn't guarantee that every event will be received correctly?

It is not a bug, its not guaranteed.

/reopen
/remove-lifecycle rotten

@liggitt @dims @deads2k @smarterclayton @sttts @nikhita @pohly @alexzielenski
Other k8s experts are also expected to answer this question. Sorry if bother you. Thanks!

Informers are guaranteed to report the current state of an object, eventually. They are not guaranteed to report every in-between state. This is a feature, not a bug: Kubernetes is level-driven, not edge-driven, so what matters is the current state, not what happened to get there.
/close

Informers are guaranteed to report the current state of an object, eventually. They are not guaranteed to report every in-between state. This is a feature, not a bug: Kubernetes is level-driven, not edge-driven, so what matters is the current state, not what happened to get there.
/close

Thanks for your reply!
Maybe both of us said is right?
My understand of  level-driven and edge-driven is following. The difference between level-driven and edge-driven is that when informer receive a event from api-server, the level-driven will send object itself to informer, but edge-driven will send variety of object to informer. But both of level-driven and edge-driven could not guarantee that "The PodRunning state event will send". For k8s, what matters is the current state, so could not guarantee "The PodRunning state event will send" does not matter. What matters is the current state is also the reason k8s adopt level-driven. So what @pohly and @hzxuzhonghu said is right.
What I said "Informer will guarantee not miss any event, except one case" is also right? My best evidence actually from @sttts and @mhausenblas 's book Chapter 3 Informers and Caching

So both of us said is right? It is just because k8s api-server will not guarantee to send the PodRunning event, so informer will not receive this event.

It's actually a property on the informer side. It does not guarantee that every event coming through a watch request from the apiserver is actually visible to the informer event handlers. The described error handling is such a situation where the lossless watch retry does not succeed and the best the informer can do is to get a latest state via list. Technically you could use watch requests directly and see every event, but it would be brittle in case of (apiserver) failures.

@sttts
Thanks for your reply!
Your book is amazing, it helps me a lot!
But in your book you said Informer is "edge-triggered, level-driven with additional resync" seems different with what @pohly said "Kubernetes is level-driven, not edge-driven". Actually I understand what you describe in your book, I think you describe about the behavior of Informer clearly. Informer is triggered when there is a event/change(edge-driven triggers) not a regular checked (level-driven triggers). But when informer is triggered the informer to get the latest of object from cache(cache and api-server/etcd should be thought same), this is level-driven. And there is additional resync period for Informer/Controller between the in-memory cache and the business logic: the registered event handlers will be called for all objects each time this period has passed, it makes Informer/Controller more robust especially reconcile about external system. But there are also many people said "Kubernetes is level-driven, not edge-driven", as @pohly said and the link (https://hackernoon.com/level-triggering-and-reconciliation-in-kubernetes-1f17fe30333d) you give in your book. Maybe they talk about the behavior of api-server? Wish your reply to clear my doubts.
Wish your explain/reply more specific more better. Forgive me for being such a curious baby

n following picture. Informer/Controller is

Kubernetes is level-driven, not edge-driven

This is a simplification. The business logic is level-based, that's the important bit. Edges trigger, and resync triggers.

@sttts
Thanks again for your reply.
Or cloud please answer my following question? I think the following question's answer will clear all my doubts. Please forgive my long-winded.
If a Pod's real change path is PodPending, PodRuning, PodSucceed. Then whether following is guaranteed?
a. Will the api-server be guaranteed to send to the watch client 3 events with correct object and correct order?
b. Will client-go's Informer's Reflector's watchHandler function (it means not get object from cache) be guaranteed to receive 3 events with correct object and correct order?
https://github.com/kubernetes/client-go/blob/cf4002bbbf855062bb00291127a16c9677a4c643/tools/cache/reflector.go#L696-L708
I think b is right. Please tell me if I am wrong.
If a is right, then I think this issue is because most client will use informer's cache to get the object, maybe client receive 3 event, but maybe the client process very slowly, at 2th event, the cache has changed to PodSucceed, so the client will see PodSucceed, so the client thought it miss the PodRunning.
If a is wrong, then the api-server maybe just send 3 events with PodPending, PodSucceed, PodSucceed. So the client see what api-server just send.

a is right, in the happy case because the events are coming directly from etcd. But watches stop and network fails etc.
For b I would have to dive into the code too, don't know by heart where from the watch request to the informer event handlers event can go missing.

@sttts
Thanks! Looking forward you dive into the code, then further take a communication with you.
Maybe I can share why I am so persist in this question.
 We all know that the Deployment Controller only concern the final state of Pod, so there are not big problems if I miss the PodRuning or any other middle states.
But now because k8s is so popular, there are many operator like https://github.com/GoogleCloudPlatform/spark-on-k8s-operator, https://github.com/kubeflow/training-operator, their CRD is for a short time task job. Most of the job will concern the Pod's state to determine the job's state. If we miss a middle state, it may cause some problem. And there are some development requirements from myself Product Manager, for example, we need to record the Job's creating path to get a better product experience, my direct implementation relies on the middle state.
I thought the api-server will guarantee the middle state and send it. Like the "a. expression" I post above (a. Will the api-server be guaranteed to send to the watch client 3 events with correct object and correct order?). This is the precondition of the following.
Then what we concern is in client-go. There is a classical picture about client-go.

For this picture, I thought 1), 2), 3), 4) will all guarantee the middle state.
Because the 7), 8), 9) is in another goroutine, then for 9) when it get the object for key it may loss the middle state.
So for some feature need to concern the middle state, my implementation is to write a synchronous 6), a custome event handlers to process the object from 3), so I think the middle state is guaranteed.
But when I see this issue, the main Member give a short conclusion "It is not a bug, its not guaranteed.". No offense, from the thumbs down numbers, I think this short answer confuse many normal developers. Normal developers maybe wrong, but will you could give a more specific answer. @hzxuzhonghu
So, that's all  why I am so persist in this question.

First, in etcd, it just stores the latest object, not intermediate objects.
let me draft some cases:
Case 1: there are two kube-apiservers, and one operator communicates with a different apiserver from the system components like kube-scheduler, kubelet which mutate a pod status.
So if the operator connected kubeapiserver crash in some time, while at the same time the pod get mutated(maybe many state transitions), so once the operator reconnect to the new restarted kube-apiserver, it definitely can only get the latest pod state, so we say some event missing.
Case 2:  in kube-apiserver, there is a watch cache, IIRC, by default the capacity is 1000,. if the cache is full, the oldest unconsumed event will be evicted.
So when the operator/client does not consume quickly, it could miss events. And it can also happen in the case that your client disconnects with the kube-apiserver for a long enough time.

@hzxuzhonghu
Thanks! Your reply helps me a lot!
Then I think the philosophy of Kubernetes is "what matters is the current state, not what happened to get there". The important is final state/ final consistence.
Maybe I should consider carefully when developing a Operator to try my best to keep this design philosophy.

I am a little curious about your use case now

I am a little curious about your use case now

@hzxuzhonghu  Like I said here, https://github.com/kubernetes/client-go/issues/571#issuecomment-1758860457.
My use case is like https://github.com/GoogleCloudPlatform/spark-on-k8s-operator, https://github.com/kubeflow/training-operator, to create a CRD about a AI/Machine Learning Training Job. And as a commercial product, we may record the process of Job's LifeCycle to our users. So we need to record when the job is created, when the job is running, when the job is failed, etcd. And the job's status also come from the pod's status, if a the controller only get podpending and podfailed, with no podrunning, the controller will make job's status to jobCreated, JobFailed, without JobRunning, it may confuse our users why my job does not running but failed.
And we need to record the failed reason of the Job, it also comes form the Pod's status. We need to take special action for Pod's evicted situation. But I found that when a pod got evicted, sometimes we can only get that through the pod.Status.Conditions(PodReady is false and reason is Evict), it is a short middle state, then the most strange thing is pod.Status.Conditions will become normal(PodReady became true), at last the Pod would reach failed but the reason sometime not Evicted. So by this observation, the only way I check whether a Pod is Evicted is check the middle state, if I miss it, I will not know the reason why the Pod is failed.
That's first case that comes to my mind. Maybe I can give more general and good case in the future when the CRD is about the short-time Job.

Maybe I can give more cases for Job CRD.
A node maybe removing by users suddenly. Then the Pod running on the node should be deleted then the final state is Pod not exists. My product manager require that for this case we should report the Job failed but not try to create a new Pod in another Node. Then my direct implementation is to check the deletionTime filed of Pod. If I miss this middle state, I maybe just get the Pod not exists, maybe my program will create a new Pod.
If I following the middle state is not reliable guideline. I should do more thing, for example, when I found I need create a new Pod(compare the current pod with desired pod), in the before I just create a new Pod without any other concern. Now I think I should check the Job's status, if it is running, in this time maybe I should not just Create Pod.
All I want to say is that for a Job CRD, there are many cases,  the easiest and direct implementation/thinking for some feature/requirement  is replying on a middle state. If the middle state is not reliable, for developing a robust system, I should think very carefully to implement it.

@hzxuzhonghu @sttts @pohly
I can share more thoughts as a normal developer. It is also another reason why I care about this question so much.
When I started to learn k8s's client-go, I am a little confused about the Resync function in Informer. Actually not just me, I found that at least in the Chinese Internet, there are so many people argue the function of Resync in Informer. Some people thought that the Resync is used for doing a new relist from api-server to get the latest and correct data per Resync time. Some people thought that the Resync is used for doing a new reconcile, where the change/event comes from all the cached data in Informer. I think the second opinion is right.  The book Programming Kubernetes also think second is right. Though second opinion  is right, people will doubt whether the api-server and client-go can guarantee that they will not miss any event. If they missed any event, there will be problem. For example if they missed the Pod's last failed event, the Informer's cache will store PodRunning as the latest's status of Pod, but it is wrong, it will influence all Controller even that only care about the final consistence. That's the reason I think the statement of a and b here are right. https://github.com/kubernetes/client-go/issues/571#issuecomment-1757525498

The conclusion is simple here: Informer does not guarantee against event loss


Implement Stack and Queue in PHP

Hi there!
Thank you for your PR, unfortunately there is already a PR open for PHP here #996. Maybe you could review that PR and see if any changes need to be done?


Possibility to add WA71-304DG?

Hi, should it be possible to fetch data from WA71-304DG, even though it is not listed?
My log would be:
2024-02-04 11:26:04.528 DEBUG (MainThread) [custom_components.wellbeing] Current token is not set or expired
2024-02-04 11:26:05.053 DEBUG (MainThread) [custom_components.wellbeing] Received new token sucssfully
2024-02-04 11:26:05.086 DEBUG (MainThread) [custom_components.wellbeing] Fetched data: None
2024-02-04 11:26:05.086 DEBUG (MainThread) [custom_components.wellbeing] Finished fetching wellbeing data in 0.033 seconds (success: False)

This is probably because of the problem in this issue: https://github.com/JohNan/homeassistant-wellbeing/issues/78
Follow my suggestion in that issue and let me know if you still have problems.


Validate arguments with customCommandLineValidation

Once https://github.com/broadinstitute/gatk/pull/2226 is accepted, move all argument validation to customCommandLineValidation(), throwing UserException.CommandLineException. This will allow a better user help.

Closed by #52


E       fixture 'segmentation_module' not found in pytest

When trying to run test.py I have this error 'segmentation_module' is not a fixture in pytest any help?

test.py is not intended for unit testing, sorry.


Improved "Most Important Lossless Codecs" section + other small changes.

Added aliases of H.264 and H.265
H.262 is actually MPEG-2 Part 2 not MPEG-2 Part H?
Added Opus in the "Competitors that are royalty-free:" section.
Improved the description of lossless formats.

Merged, thanks for the suggestions!


update the README with an example to use the split_key param

Didn't find the split_key param until I read the code, hopefully the updated README will help someone not have to look at the code for the option.

@Gomer05  Thanks!


Problem starting up with docker-compose on Mac

I'm running Docker for Mac 1.13.0 and when I run docker-compose up (following the instructions on the main page). I commented out the baragon stuff to make things simpler when it failed the first time. After starting up, I waited until the logs quieted down with the last lines like this:
master_1     | I0209 22:44:08.020092     7 hierarchical.cpp:473] Added slave 3449ccad-9dee-4360-8360-c439ec66eafb-S0 (localhost) with cpus(*):4; mem(*):999; disk(*):55322; ports(*):[31000-32000] (allocated: )
master_1     | I0209 22:44:08.020138     8 master.cpp:4556] Sending updated checkpointed resources  to slave 3449ccad-9dee-4360-8360-c439ec66eafb-S0 at slave(1)@<IP_ADDRESS>:5051 (localhost)
slave_1      | I0209 22:44:08.020633    15 slave.cpp:1071] Re-registered with master master@<IP_ADDRESS>:5050
slave_1      | I0209 22:44:08.020716    15 slave.cpp:1107] Forwarding total oversubscribed resources
slave_1      | I0209 22:44:08.021097    15 slave.cpp:2341] Updated checkpointed resources from  to
slave_1      | I0209 22:44:08.021208    15 status_update_manager.cpp:181] Resuming sending status updates
master_1     | I0209 22:44:08.021109    10 master.cpp:4618] Received update of slave 3449ccad-9dee-4360-8360-c439ec66eafb-S0 at slave(1)@<IP_ADDRESS>:5051 (localhost) with total oversubscribed resources
master_1     | I0209 22:44:08.021716    10 hierarchical.cpp:531] Slave 3449ccad-9dee-4360-8360-c439ec66eafb-S0 (localhost) updated with oversubscribed resources  (total: cpus(*):4; mem(*):999; disk(*):55322; ports(*):[31000-32000], allocated: )
slave_1      | I0209 22:44:56.605862    10 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322600078987396days

Then when I try to hit the singularity UI here: http://localhost:7099/singularity the browser tells me that I'm unable to connect.
Eventually, the log immediately spews this:
...
scheduler_1       |     at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
scheduler_1       |     at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
scheduler_1       |     at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
scheduler_1       |     at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
scheduler_1       |     at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
scheduler_1       |     at com.google.inject.Guice.createInjector(Guice.java:96)
scheduler_1       |     at com.hubspot.dropwizard.guicier.GuiceBundle.run(GuiceBundle.java:104)
scheduler_1       |     at com.hubspot.dropwizard.guicier.GuiceBundle.run(GuiceBundle.java:56)
scheduler_1       |     at io.dropwizard.setup.Bootstrap.run(Bootstrap.java:176)
scheduler_1       |     at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41)
scheduler_1       |     at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
scheduler_1       |     at io.dropwizard.cli.Cli.run(Cli.java:70)
scheduler_1       |     at io.dropwizard.Application.run(Application.java:72)
scheduler_1       |     at com.hubspot.singularity.SingularityService.main(SingularityService.java:100)
scheduler_1       | Caused by: java.net.UnknownHostException: moby: moby: unknown error
scheduler_1       |     at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
scheduler_1       |     at com.hubspot.singularity.SingularityMainModule.getHostname(SingularityMainModule.java:188)
scheduler_1       |     ... 201 more
scheduler_1       | Caused by: java.net.UnknownHostException: moby: unknown error
scheduler_1       |     at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
scheduler_1       |     at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
scheduler_1       |     at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
scheduler_1       |     at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
scheduler_1       |     ... 202 more
scheduler_1       |
scheduler_1       | 1054) Error in custom provider, java.lang.RuntimeException: No local hostname found, unable to start without functioning local networking (or configured hostname)
scheduler_1       |   at com.hubspot.singularity.SingularityMainModule.getHostname(SingularityMainModule.java:183) (via modules: com.hubspot.singularity.SingularityServiceModule -> com.hubspot.singularity.SingularityMainModule)
...

I had to interrupt docker as it was spewing the stack dump to the logs, apparently in an infinite loop.
I recreated this a couple of times, but now on my third try I still can't bring up the UI, but the logs are quiet. Just printing out:
slave_1      | I0209 22:44:56.605862    10 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322600078987396days
slave_1      | I0209 22:45:56.607321    13 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322600078987396days
slave_1      | I0209 22:46:56.607837    12 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322599174206134days
slave_1      | I0209 22:47:56.608113     8 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322599174206134days
slave_1      | I0209 22:48:56.609350    13 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322599174206134days
slave_1      | I0209 22:49:56.610520    15 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322599174206134days
slave_1      | I0209 22:50:56.610924    10 slave.cpp:4374] Current disk usage 42.53%. Max allowed age: 3.322599174206134days

I started it up again with baragon in there and once again I couldn't get a stack dump in the logs, but no UI either. docker-compose  doesn't show any ports:
biwrigh-mac:Singularity bill.w.wright$ docker-compose ps
            Name                          Command               State   Ports
-----------------------------------------------------------------------------
singularity_baragonagent_1     /usr/local/bin/supervisord ...   Up
singularity_baragonservice_1   /etc/baragon/start.sh            Up
singularity_master_1           mesos-master --registry=in ...   Up
singularity_scheduler_1        /etc/singularity/start.sh  ...   Up
singularity_slave_1            mesos-slave                      Up
singularity_zk_1               /run.sh                          Up

This was also in my logs:
master_1     | **************************************************
master_1     | Master bound to loopback interface! Cannot communicate with remote schedulers or slaves. You might want to set '--ip' flag to a routable IP address.
master_1     | **************************************************
lave_1      | **************************************************
slave_1      | Slave bound to loopback interface! Cannot communicate with remote master(s). You might want to set '--ip' flag to a routable IP address.
slave_1      | **************************************************
m
s

Does Singularity require Baragon?
Whenever I stop docker-compose (via a Ctrl-C), I get this one trackback:
Stopping singularity_master_1 ...
Exception in thread Thread-9:
Traceback (most recent call last):
  File "threading.py", line 801, in __bootstrap_inner
  File "threading.py", line 754, in run
  File "compose/cli/log_printer.py", line 197, in watch_events
  File "compose/project.py", line 350, in events
  File "site-packages/docker/api/client.py", line 295, in _stream_helper

@billwright , this is the same issue as #1313. Right now the local dev setup relies on HOST network mode in docker, which unfortunately does not work when using docker for mac we found out. At the moment you'd have to use docker-machine


Implement read() and write() function

This is a fixed version of https://github.com/enarx/cipherpipe/pull/13

No merge commits please.

rebased and squashed


Ruby: use the more precise term "consistency" instead of "sanity"

Relates to #16595

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,960,729      Total (=)      1,960,729

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,878,846      Total (<)     10,878,850

 No significant differences in binary sizes

Closing for logistical reasons


Issue getting user identity in OnAuthorizedAsync's eventContext

Hi. In my razor pages application that uses built in Identity authentication, I'm finding that I'm unable to check the identity of the current user in the eventContext for OnAuthorizedAsync. Here is the relevant  configuration
OnAuthorizeAsync = async eventContext => {
                        var test = eventContext.HttpContext.User.Identity;

                        if (!eventContext.HttpContext.User.Identity.IsAuthenticated)
                        {
                            eventContext.FailRequest(System.Net.HttpStatusCode.Unauthorized);
                            return;
                        }
                        if (!eventContext.HttpContext.User.IsInRole("Developer"))
                        {
                            eventContext.FailRequest(System.Net.HttpStatusCode.Forbidden, "Only developers can upload.");
                            return;
                        }
                    }

The HttpContext seems to contain the identity of the logged in user in other xhr requests, as long as that HttpContext is accessed through the PageModel. I've inspected and compared such non-tus xhr requests to the tus xhr requests, and as far as I can tell they look exactly the same where it is relevant: same cookies, headers, both contain the request verification token. So I'm struggling to understand why HttpContext in the useTus configuration doesn't contain user Identity. Thanks in advance for clearing this up for me.

Hi,
Without seeing the rest of your authentication setup I think this is similar to this issue here: https://github.com/tusdotnet/tusdotnet/issues/137#issuecomment-862703575
Have you configured a default authentication schema? If not, you should be able to challenge the request (and thus get the User identity) using AuthenticationHttpContextExtensions.ChallengeAsync .
Please let me know if any of this solved the issue. In a future version tusdotnet will integrate with endpoint routing making all of this easier.

ChallengeAsync didn't seem to work for me, though I could have been misusing it somehow.
I ended up using AuthenticationHttpContextExtensions.AuthenticateAsync, which returns an AuthenticationResult that includes the authenticated user claims. Thanks for pointing me in the right direction, and looking forward to the new improvements. The tus protocol is really exciting!

Oops I linked you the wrong method. Sorry about that! Glad you solved it :) I'l update the docs to make this clearer.


Update office-365-service-encryption.md

Corrected link for Enhancing transparency and control for Office 365 customers

@JohanFreelancer9 Please copy review

Issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/4752

@KCCross Please merge this PR. Thanks

@KCCross Gentle reminder

The link has been updated via a different PR. Closing this PR.


Workaround issues with seq-2.24 installation

Had some issues with CI and forge when developing my own tap. So far debugged it to:

Some packages (i.e., magit, forge) require seq-2.24.
Emacs-29 is delivered with seq-2.23.
Other packages (i.e., compat) require seq-2.23.
When only magit is installed it requires compat which requires seq-2.23 -> seq is not upgraded
When only forge is installed is requires magit and compat; the latter requires seq-2.23 -> seq is not upgraded
When magit is installed followed by installation of forge seq is upgraded to seq-2.24 -> this fails

I think there are at least 2 issues here:

just (package-install 'forge) will not install required seq-2.24 - if I got it right, this is issue with dependency resolution in package
installation of seq-2.24 fails when debug-on-error is t.

This W/A forces installing the freshest version of seq with errors suppressed.

LGTM. Feel free to merge.


AMI eks-worker-* query returned no results

I have issues
I'm submitting a...

[x] bug report

What is the current behavior?
If region is set to us-west-1:
Error: Error refreshing state: 1 error(s) occurred:

module.eks.data.aws_ami.eks_worker: 1 error(s) occurred:

module.eks.data.aws_ami.eks_worker: data.aws_ami.eks_worker: Your query returned no results. Please change your search criteria and try again.

If this is a bug, how to reproduce? Please include a code sample if relevant.
module "eks" {
source        = "terraform-aws-modules/eks/aws"
cluster_name  = "test-eks-cluster"
vpc_id        = "${module.vpc.default_vpc_id}"
subnets       = "${module.vpc.public_subnets}"
tags        = {
Environment = "test"
Terraform   = "true"
}
}
What's the expected behavior?
An available AWS AMI ID.
Are you able to fix this problem and submit a PR? Link here if you have already.
Not sure how.
Environment details

Affected module version: 1.3.0
OS: Linux
Terraform version: 0.11.7

Any other relevant info

@internaught EKS is only available in a few regions right now, and not yet in us-west-1. From experience I wouldn't hold your breath on us-west-1 availability, but I could of course be wrong on that.
From their blog post - https://aws.amazon.com/blogs/aws/amazon-eks-now-generally-available/
Amazon EKS is available today in the US East (N. Virginia) and US West (Oregon) Regions and will be expanding to others very soon. We have a detailed roadmap and plan to crank out plenty of additional features this year.

It seems that AWS are not following the ami naming convention set in the UK for the new EKS in ireland.
https://github.com/terraform-providers/terraform-provider-aws/blob/master/examples/eks-getting-started/eks-worker-nodes.tf#L89
FAILS
´´´
data "aws_ami" "eks-worker" {
filter {
name   = "name"
values = ["eks-worker-*"]
}
´´´
WORKS
´´´
data "aws_ami" "eks-worker" {
filter {
name   = "name"
values = ["amazon-eks-*"]
}
´´´

Hi @mooperd
The new EKS AMIs start with amazon-eks-node-* and that link you have there is for a different repo.


Mega menu component

hahnrob created the following on Jun 25:
This is an Epic that contains links to all of the work required to create the block link component
Original issue: https://github.ibm.com/webstandards/digital-design/issues/1121

Scott is doing user testing and research.  Moving this issue to Icebox until more information is available from his work.

The work Olivia is doing with the Reboot team replaces Scott's work.  Closing this issue.


Investigate Vcpkg sample failure in nightly pipeline

[Yesterday 11:08 AM] George Arama
it's related to something from attestation :
[Yesterday 11:08 AM] George Arama
user-agent : azsdk-cpp-Attestation/1.0.0-beta.3 (Windows Server 2019 Datacenter 6.3 17763 17763.1.amd64fre.rs5_release.180914-1434) x-ms-client-request-id : c4108855-74b7-4971-7753-245d0f29cf2e [2022-05-20T20:33:56.7624737Z] DEBUG : [CURL Transport Adapter]: Creating a new session. [2022-05-20T20:33:56.7624921Z] DEBUG : [CURL Transport Adapter]: Spawn new connection. [2022-05-20T20:33:57.1414436Z] DEBUG : [CURL Transport Adapter]: No Host in request headers. Adding it [2022-05-20T20:33:57.1415057Z] DEBUG : [CURL Transport Adapter]: No content-length in headers. Adding it [2022-05-20T20:33:57.1415216Z] DEBUG : [CURL Transport Adapter]: Send request without payload [2022-05-20T20:33:57.1416308Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.1416811Z] DEBUG : [CURL Transport Adapter]: Parse server response [2022-05-20T20:33:57.8074939Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8075865Z] DEBUG : [CURL Transport Adapter]: Request completed. Moving response out of session and session to response. [2022-05-20T20:33:57.8076107Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8076289Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8076884Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8077055Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8077534Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8077773Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8078262Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8078672Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8078901Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8079145Z] DEBUG : [CURL Transport Adapter]: Windows - calling setsockopt after uploading chunk. ideal = 65536 result = 0 [2022-05-20T20:33:57.8079308Z] DEBUG : Moving connection to pool... [2022-05-20T20:33:57.8079571Z] DEBUG : Start clean thread [2022-05-20T20:33:57.8081220Z] INFO : HTTP Response (1045ms) : 200 OK connection : keep-alive content-type : text/html; charset=UTF-8 date : Fri, 20 May 2022 20:33:57 GMT server : openresty transfer-encoding : chunked x-adblock-key : REDACTED [2022-05-20T20:33:57.8081764Z] INFO : HTTP status code 200 won't be retried. Exception: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '<' *Sample returned a failed code: 1 ##[error]Bash exited with code '1'.
[Yesterday 11:21 AM] Larry Osterman
Not sure what happened without the headers from the service. Can you at least tell me the attestation instance you were using?
[Yesterday 11:22 AM] Larry Osterman
Digging in deeper. Having timestamps helps a lot.
[Yesterday 1:13 PM] Larry Osterman
ok, figured it out.
[Yesterday 1:13 PM] Larry Osterman
https://blob.com/certs returns a 200 error with an HTTP page.
[Yesterday 1:14 PM] Larry Osterman
That's not ok and can never work.
[Yesterday 1:15 PM] Larry Osterman
The vcpkg-all-smoke package needs to create an attestation resource and use it, or it needs to configure the attestation client to retrieve from a valid instance.
[Yesterday 1:15 PM] Larry Osterman
That's because creating an attestation client requires retrieving certificates from the service.
[Yesterday 1:15 PM] Larry Osterman
And https://blob.com/ is not a valid service endpoint.
[Yesterday 2:37 PM] Larry Osterman
FWIW, I updated the main.cpp file to use ATTESTATION_AAD_URL (which is created by the test-resources.json file) but it failed because the environment variable isn't found.
[Yesterday 2:38 PM] Larry Osterman
I'm not sure what to do here w.r.t. this issue. If you want to talk to the attestation service, you need an environment variable set. But that environment variable isn't set in the KeyVault CI pipeline.
[Yesterday 2:39 PM] Larry Osterman
But I'm also not sure why the vcpkg sample is being run from the keyvault pipeline.
[9:24 AM] George Arama
Thank you Larry, much appreciated.
[9:30 AM] Larry Osterman
Not sure what to do with this info though . As best as I can figure the vcpkg sample is pretty busted because it (a) is only deployed in the KV nightly pipelines (arguably it should be in all services) and (b) depends on KV and (now) attestation resources which are not always deployed.
[9:31 AM] Larry Osterman
IMHO this should be in the nightly core CI pipeline and there should be a test-resources.json which deploys AKV, Storage*, and Attestation resources to enable the test to work.
[9:32 AM] George Arama
right, i was thinking of taking a peek at it to see what it's about, and what value it's adding. and also try to figure out why it decided to fail now. And remove it if it's useless, we already run other keyvault samples, and if it's duplicating samples ( which is what i suspect) then it might not add value
[9:33 AM] George Arama
also see what effort it would take to fix it if i decide it should stay
[9:34 AM] Larry Osterman
The reason it is now failing is that I added the factory for attestation. The attestation factory depends on making a service call to the attestation service.
[9:34 AM] Larry Osterman
And https://blobs.com/ is a pretty crappy attestation service instance.
[9:35 AM] Larry Osterman
IMHO it's not strictly useless. It is a decent integration test. However its location is really pretty broken (it's not a sample - it's a test, and we don't have any infrastructure for repo level tests).
[9:35 AM] George Arama
can we put an actual attestetion service ?
[9:35 AM] Larry Osterman
Sure - or we could use the attestation shared instance in some reason (WUS makes sense)
like 1
[9:35 AM] George Arama
aaa, ok , let me look into it and i'll circle back
[9:36 AM] Larry Osterman
For instance, you could use "https://sharedwus.wus.attest.azure.net" as the endpoint for the attestation service and the test will be happy as a clam until they turn off the lights.
[9:38 AM] George Arama
yeees this test was required by the powers that be, to make sure we can instantiate all clients together , it will be integrated in some uber pipeline that will run similar samples from all packages
[9:38 AM] George Arama
we got the sample ready a while back, but those guys were not fully ready with their pipeline ,
[9:39 AM] George Arama
i'll ping Daniel to see where they are


QGB Orchestrator only signs if part of valset

Closes https://github.com/celestiaorg/celestia-app/issues/406

depends on https://github.com/celestiaorg/celestia-app/pull/519

Codecov Report

Merging #523 (11cadab) into qgb-integration (458b6b2) will increase coverage by 0.90%.
The diff coverage is 31.52%.

@@                 Coverage Diff                 @@
##           qgb-integration     #523      +/-   ##
===================================================
+ Coverage            11.72%   12.62%   +0.90%
===================================================
  Files                   65       56       -9
  Lines                10881     9598    -1283
===================================================
- Hits                  1276     1212      -64
+ Misses                9515     8303    -1212
+ Partials                90       83       -7

Impacted Files
Coverage Δ

e2e/qgb/qgb_network.go
0.00% <0.00%> (ø)

e2e/qgb/test_commons.go
0.00% <ø> (ø)

x/qgb/keeper/hooks.go
34.61% <ø> (+2.47%)
:arrow_up:

x/qgb/keeper/keeper_data_commitment_confirm.go
42.85% <ø> (ø)

x/qgb/keeper/keeper_valset.go
32.00% <0.00%> (-7.51%)
:arrow_down:

x/qgb/keeper/msg_server.go
0.00% <0.00%> (ø)

x/qgb/keeper/query_attestation.go
0.00% <ø> (ø)

x/qgb/keeper/query_general.go
0.00% <0.00%> (ø)

x/qgb/keeper/query_valset.go
0.00% <ø> (ø)

x/qgb/types/abi_consts.go
69.23% <ø> (ø)

... and 23 more

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 458b6b2...11cadab. Read the comment docs.


Please report this bug:     https://git.io/brew-troubleshooting

Ran brew doctor. It asked me to report this crash bug to a  URL that no longer seems to exist

[ ] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
[ ] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
[ ] ran brew update and can still reproduce the problem?
[ X] ran brew doctor, fixed all issues and can still reproduce the problem?
[ ] ran brew config and brew doctor and included their output with your issue?

~/tmp$ brew doctor
Error: /usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:72: syntax error, unexpected <<
def caveats; <<~EOS
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:76: syntax error, unexpected tIDENTIFIER, expecting keyword_end
can add a "gnubin" directory to your PATH from your bashrc like:
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:76: syntax error, unexpected ':', expecting keyword_end
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:78: dynamic constant assignment
PATH="#{opt_libexec}/gnubin:$PATH"
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:80: dynamic constant assignment
Additionally, you can access their man pag...
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:80: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
Additionally, you can access their man pages with ...
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: syntax error, unexpected tIDENTIFIER, expecting keyword_end
the "gnuman" directory to your MANPATH from your bashrc as well:
^
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: syntax error, unexpected ':', expecting keyword_end
/usr/local/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:83: dynamic constant assignment
MANPATH="#{opt_libexec}/gnuman:$MANPATH"
^
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:21:in module_eval' /usr/local/Library/Homebrew/formulary.rb:21:in load_formula'
/usr/local/Library/Homebrew/formulary.rb:34:in load_formula_from_path' /usr/local/Library/Homebrew/formulary.rb:83:in load_file'
/usr/local/Library/Homebrew/formulary.rb:74:in klass' /usr/local/Library/Homebrew/formulary.rb:70:in get_formula'
/usr/local/Library/Homebrew/formulary.rb:207:in factory' /usr/local/Library/Homebrew/formula.rb:1183:in []'
/usr/local/Library/Homebrew/diagnostic.rb:1205:in check_for_non_prefixed_coreutils' /usr/local/Library/Homebrew/cmd/doctor.rb:34:in block in doctor'
/usr/local/Library/Homebrew/cmd/doctor.rb:27:in each' /usr/local/Library/Homebrew/cmd/doctor.rb:27:in doctor'
/usr/local/Library/brew.rb:84:in `'
~/tmp$

ran brew config and brew doctor and included their output with your issue?

From the issue template:

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you do not read fill out the issue template repeatedly you will be blocked from ever submitting issues to Homebrew again.

If you add the necessary information to this issue (don't create a new one, please) then this issue may be reopened.


Provide an example

Hi can you provide an example, it seems to errror Error: SET_WALLPAPER permission needed with expo

Sometimes with Expo Go you will need to indicate the permission in your app.json, or you can create a development version.
To indicate the permission
// app.json

{
  "expo": {
    "android": {
      "permissions": [
        "SET_WALLPAPER"
      ]
    },
  }
}

If you don't know how to create a development build, check out this Expo Doc tutorial

This didn't work, but I believe that it just does not work in dev mode, but has to be pushed to expo go and go through the installation process for it to work


BIGTOP-3739: Add Tez support for Bigtop 3.1.0 Mpack

Description of PR
BIGTOP-3739: Add Tez support for Bigtop 3.1.0 Mpack
Please use the following snapshot repository to run smoke test:
https://sekikn-repo.s3.ap-southeast-1.amazonaws.com/centos-7/
How was this patch tested?
Tested along with #945 and #927 in centos7, Looks good to me.
hadoop jar /usr/lib/tez/tez-examples-0.10.1.jar orderedwordcount /tmp/tezsmokeinput/sample-tez-test /tmp/tezsmokeoutput/
[hdfs@ambari-server tez]$ hadoop jar /usr/lib/tez/tez-examples-0.10.1.jar orderedwordcount /tmp/tezsmokeinput/sample-tez-test /tmp/tezsmokeoutput/
22/07/15 03:22:31 INFO shim.HadoopShimsLoader: Trying to locate HadoopShimProvider for hadoopVersion=3.2.3, majorVersion=3, minorVersion=2
22/07/15 03:22:31 INFO shim.HadoopShimsLoader: Picked HadoopShim org.apache.tez.hadoop.shim.DefaultHadoopShim, providerName=null, overrideProviderViaConfig=null, hadoopVersion=3.2.3, majorVersion=3, minorVersion=2
22/07/15 03:22:31 INFO counters.Limits: Counter limits initialized with parameters:  GROUP_NAME_MAX=256, MAX_GROUPS=3000, COUNTER_NAME_MAX=64, MAX_COUNTERS=10000
22/07/15 03:22:31 INFO counters.Limits: Counter limits initialized with parameters:  GROUP_NAME_MAX=256, MAX_GROUPS=3000, COUNTER_NAME_MAX=64, MAX_COUNTERS=10000
22/07/15 03:22:31 INFO client.TezClient: Tez Client Version: [ component=tez-api, version=0.10.1, revision=ff1ba5f1442094bca7ed53aba1faa991499dc1aa, SCM-URL=scm:git:https://gitbox.apache.org/repos/asf/tez.git, buildTime=2022-05-07T04:27:17Z, buildUser=jenkins, buildJavaVersion=1.8.0_322 ]
22/07/15 03:22:31 INFO client.RMProxy: Connecting to ResourceManager at ambari-agent-02/<IP_ADDRESS>:8050
22/07/15 03:22:32 INFO examples.OrderedWordCount: Running OrderedWordCount
22/07/15 03:22:33 INFO client.TezClient: Submitting DAG application with id: application_1657843102751_0006
22/07/15 03:22:33 INFO client.TezClientUtils: Using tez.lib.uris value from configuration: /apps/tez/tez.tar.gz
22/07/15 03:22:33 INFO client.TezClientUtils: Using tez.lib.uris.classpath value from configuration: /etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*,/usr/lib/tez/*,/usr/lib/tez/lib/*
22/07/15 03:22:33 INFO client.TezClient: Stage directory /tmp/hdfs/staging doesn't exist and is created
22/07/15 03:22:33 INFO client.TezClient: Tez system stage directory hdfs://ambari-agent-01:8020/tmp/hdfs/staging/.tez/application_1657843102751_0006 doesn't exist and is created
22/07/15 03:22:33 INFO conf.Configuration: resource-types.xml not found
22/07/15 03:22:33 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
22/07/15 03:22:34 INFO client.TezClient: Submitting DAG to YARN, applicationId=application_1657843102751_0006, dagName=OrderedWordCount, callerContext={ context=TezExamples, callerType=null, callerId=null }
22/07/15 03:22:34 INFO impl.YarnClientImpl: Submitted application application_1657843102751_0006
22/07/15 03:22:34 INFO client.TezClient: The url to track the Tez AM: http://ambari-agent-02:8088/proxy/application_1657843102751_0006/
22/07/15 03:22:42 INFO client.DAGClientImpl: DAG initialized: CurrentState=Running
22/07/15 03:22:42 INFO client.DAGClientImpl: DAG: State: RUNNING Progress: 0% TotalTasks: 3 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:42 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Tokenizer Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:42 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Summation Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:42 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Sorter Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:46 INFO client.DAGClientImpl: DAG: State: RUNNING Progress: 33.33% TotalTasks: 3 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:46 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Tokenizer Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:46 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Summation Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:46 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Sorter Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: DAG: State: RUNNING Progress: 66.67% TotalTasks: 3 Succeeded: 2 Running: 1 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Tokenizer Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Summation Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Sorter Progress: 0% TotalTasks: 1 Succeeded: 0 Running: 1 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: DAG: State: SUCCEEDED Progress: 100% TotalTasks: 3 Succeeded: 3 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Tokenizer Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Summation Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: 	VertexStatus: VertexName: Sorter Progress: 100% TotalTasks: 1 Succeeded: 1 Running: 0 Failed: 0 Killed: 0
22/07/15 03:22:49 INFO client.DAGClientImpl: DAG completed. FinalState=SUCCEEDED

For code changes:

[ ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'BIGTOP-3638. Your PR title ...')?
[ ] Make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/

There are some issues on Checking Tez:

Log:
2022-07-18 07:29:44,615 - File['/var/lib/ambari-agent/tmp/sample-tez-test'] {'content': 'foo\nbar\nfoo\nbar\nfoo', 'mode': 0755}
2022-07-18 07:29:44,617 - Writing File['/var/lib/ambari-agent/tmp/sample-tez-test'] because it doesn't exist
2022-07-18 07:29:44,617 - Changing permission for /var/lib/ambari-agent/tmp/sample-tez-test from 644 to 755
2022-07-18 07:29:44,618 - HdfsResource['/tmp/tezsmokeoutput'] {'security_enabled': False, 'hadoop_bin_dir': '/usr/bin', 'keytab': [EMPTY], 'dfs_type': 'HDFS', 'default_fs': 'hdfs://ambari-agent-01:8020', 'hdfs_resource_ignore_file': '/var/lib/ambari-agent/data/.hdfs_resource_ignore', 'hdfs_site': ..., 'kinit_path_local': '/usr/bin/kinit', 'principal_name': [EMPTY], 'user': 'hdfs', 'action': ['delete_on_execute'], 'hadoop_conf_dir': '/etc/hadoop/conf', 'type': 'directory', 'immutable_paths': [u'/mr-history/done', u'/app-logs', u'/tmp']}
2022-07-18 07:29:44,629 - call['ambari-sudo.sh su hdfs -l -s /bin/bash -c 'curl -sS -L -w '"'"'%{http_code}'"'"' -X GET -d '"'"''"'"' -H '"'"'Content-Length: 0'"'"' '"'"'http://ambari-agent-01:50070/webhdfs/v1/tmp/tezsmokeoutput?op=GETFILESTATUS&user.name=hdfs'"'"' 1>/tmp/tmp3M81cO 2>/tmp/tmpaAtCg6''] {'logoutput': None, 'quiet': False}
2022-07-18 07:29:44,687 - call returned (7, '')

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/TEZ/package/scripts/service_check.py", line 125, in <module>
    TezServiceCheck().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/TEZ/package/scripts/service_check.py", line 56, in service_check
    type = "directory"
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 680, in action_delete_on_execute
    self.action_delayed("delete")
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 674, in action_delayed
    self.get_hdfs_resource_executor().action_delayed(action_name, self)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 373, in action_delayed
    self.action_delayed_for_nameservice(None, action_name, main_resource)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 395, in action_delayed_for_nameservice
    self._assert_valid()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 334, in _assert_valid
    self.target_status = self._get_file_status(target)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 497, in _get_file_status
    list_status = self.util.run_command(target, 'GETFILESTATUS', method='GET', ignore_status_codes=['404'], assertable_result=False)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 214, in run_command
    return self._run_command(*args, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 282, in _run_command
    _, out, err = get_user_call_output(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/get_user_call_output.py", line 62, in get_user_call_output
    raise ExecutionFailed(err_msg, code, files_output[0], files_output[1])
resource_management.core.exceptions.ExecutionFailed: Execution of 'curl -sS -L -w '%{http_code}' -X GET -d '' -H 'Content-Length: 0' 'http://ambari-agent-01:50070/webhdfs/v1/tmp/tezsmokeoutput?op=GETFILESTATUS&user.name=hdfs' 1>/tmp/tmp3M81cO 2>/tmp/tmpaAtCg6' returned 7. curl: (7) Failed connect to ambari-agent-01:50070; Connection refused
000

Are you using the Hadoop packaged by Bigtop 3.1.0? WebHDFS does not work due to ~BIGTOP-3714~ if so.

Please use the following snapshot repository to run smoke test:
https://sekikn-repo.s3.ap-southeast-1.amazonaws.com/centos-7/

Merged.
thanks, @timyuer


[new feture] -  add a feture to add an option to edit the name and dp

so when you click the Elle and/ or dp you can upload an image from your device and you can edit the name so change it from ella to emma or thea

pending in version: 1.1.0


chore(main): release 1.31.1

:robot: I have created a release beep boop
1.31.1 (2024-12-11)
Bug Fixes

add test-http-service to PHONEY (#567) (9ebbbe6)
use atomic reads when using atomic writes (#569) (22599bb)

Miscellaneous

add test-http-service target (#565) (ced483d)
deps: bump github.com/momentohq/client-sdk-go in /examples (#564) (c61f33f)
loadgen: track cancelled errors in the load generator (#568) (8d8ba5c)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/momentohq/client-sdk-go/releases/tag/v1.31.1 :sunflower:


Add Support for Compact mode (js-Controller 2.0 Feature)

The upcoming version 2.0.0 of js-controller will support a new mode for low memory devices. For this, a few minor adjustments to the adapter must be made. Please follow these instructions: https://forum.iobroker.net/viewtopic.php?f=24&t=20387#p213466

This issue was moved to iobroker-community-adapters/ioBroker.find-my-iphone-community#8


Rename client's trpc util to api

Since this got merged, create-t3-app creates a api.ts file instead of trpc.ts for the client, allowing us to write api.bla.useQuery() instead of trpc.bla.useQuery(). I'm not aware if there are any other changes as well though.
I could make a PR for this but I guess it really depends if we're trying to keep CUA updated with CT3A or not.

This'll probably help with the PR as a reference: https://github.com/t3-oss/create-t3-turbo/pull/110

Good find!
Re: keep CUA updated with CT3A
I don't think it should be our goal to be synced with CT3A, and I think the choice of tamagui over nativewind is an example of that. However, if CT3A makes a change that we think will be better for CUA, we should definitely learn from that!
Re: api.bla vs trpc.bla: I personally like having the trpc name for a couple reasons:

Since trpc is a newer technology, I feel it's good to expose the name for the users in order for them to understand the overall stack better. Calling it API may be better if this was a frontend only template. However, I suspect most users of this template will be dabbling in both sides, so in that case, I don't think calling it API gives many advantages.
Github co-pilot will likely be able to give better suggestions lol(I could be wrong on this)

thoughts?

Fair points!
The only benefit I can think of is not having multiple files with the trpc name.

trpc.ts - the client util
trpc.ts - the backend util
[...trpc].ts - the /api dynamic route (it's clear what this one is though)

But that's not the end of the world... Still better than next.js codebases with hundreds of index.tsx files.

Yea that's true! I say we leave as it is for now.
If api.bla becomes a standard when using trpc and people find trpc.bla archaic or confusing then we can make that change!
I'll close this for now!


GameObject finder/picker method in gdx-runtime module

Is your feature request related to a problem? Please describe.
I think a game object finder/picker method by screen x and y coordinates in the gdx-runtime module would be useful.
Describe the solution you'd like
A GameObject findBy(int screenX, int screenY) method in SceneGraph class.
Additional context
The editor uses a finder method in GameObjectPicker class but it uses opengl hack what is not really recommended ( http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-an-opengl-hack/ ).
An other way that use libgdx's Intersector.intersectRayTriangle(...) method to check for every model's meshes.
(Examples: https://github.com/libgdx/libgdx/issues/1256 , https://stackoverflow.com/questions/56837626/libgdx-intersect-ray-with-mesh-from-modelinstance  ). But I think it is cause huge CPU usage if there are lot of game objects on the map.

A possible solution:
        private GameObject getObject(final int screenX, final int screenY) {
		final Vector3 position = new Vector3();

		Ray ray = scene.cam.getPickRay(screenX, screenY);
		GameObject selectedGO = null;
		float distance = -1;
		for (int i = 0; i < scene.sceneGraph.getRoot().getChildren().size; ++i) {
			final GameObject gameObject = scene.sceneGraph.getRoot().getChildren().get(i);

			final ModelComponent modelComponent = (ModelComponent) gameObject.findComponentByType(Component.Type.MODEL);

			if (modelComponent != null) {
				gameObject.getPosition(position);
				position.add(modelComponent.getCenter());

				if (!ModelUtils.isVisible(scene.cam, modelComponent.getModelInstance(), modelComponent.getCenter(), modelComponent.getDimensions())) {
					continue;
				}
				final float len = ray.direction.dot(position.x - ray.origin.x, position.y - ray.origin.y, position.z - ray.origin.z);
				if (len < 0f) {
					continue;
				}
				float dist2 = position.dst2(ray.origin.x + ray.direction.x * len, ray.origin.y + ray.direction.y * len, ray.origin.z + ray.direction.z * len);
				if (distance >= 0f && dist2 > distance) {
					continue;
				}
				if (Intersector.intersectRayBoundsFast(ray, position, modelComponent.getDimensions())) {
					selectedGO = gameObject;
					distance = dist2;
				}
			}
		}
		return selectedGO;
	}

This uses the model component's dimension to detect model game object.
@JamesTKhan Is this accurate enough?

This is not intended to replace the Editor picking right? Just a new method to add to the runtime for raypicking GameObjects in runtime applications?

Yes, just a new method in runtime. Maybe we could put this method into runtime and if someone needs a more accurate method then she/he can use bullet or ode4j for picking, like in your video.

I was thinking about this issue and I will close it. If anyone need a picker method can use bullet or ode4j like in previous comment.


Upsert support

Hi,
I am following your flink experiment project and trying to setup a similar setup. So far it looks good however, I did not see supprt for doing an upsert operation. Is this possible with PgBulkInsert library ?
Thanks,
Swapnil

No, the COPY Protocol, which is implemented in PgBulkInsert, only supports INSERTs. For UPSERT you would have to use JDBC statements.


doc: Update man pages for v18

NOTE: merging into v18.x directly. It's expected for updated man pages and release notes to be brought into develop after v18 release via a "merge master v18.0.0 back into develop" PR.

Thanks for this, probably only you and I still use these, but I make sure the Dash Masternode Zeus installs these for the 'dash' user so people that know can use this fantastic resource.


Support StringEnumAttribute on properties

This commit supports attributing a an enum property on a type with StringEnumAttribute to serialize it as a string.
Closes #4035

ported to 7.x


Why is expr.Expr not compatible with circuit execution?

Environment

Qiskit Terra version: 0.25.1
Python version: 3.10.0
Operating system: OSX (Darwin)

Note: I am using M2 macbook air
What is happening?
I am trying to execute a dynamic circuit with AerSimulator based on the release note example code https://qiskit.org/documentation/release_notes.html#release-notes-0-25-0-prelude. However, it seems that TypeError is raised if I use expr.Expr instance instead of a tuple for IfElseOp.condition or SwitchCaseOp.case field. I highly doubt that it is a bug cause it is probably due to my inconsiderate misuse of the function, but I am creating this issue just in case it is a critical error common for newly added features.
How can we reproduce the issue?
(A) This is the code copied from https://qiskit.org/documentation/release_notes.html#release-notes-0-25-0-prelude
from qiskit.circuit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit.circuit.classical import expr

qr = QuantumRegister(4)
cr1 = ClassicalRegister(2)
cr2 = ClassicalRegister(2)
qc = QuantumCircuit(qr, cr1, cr2)
qc.h(0)
qc.cx(0, 1)
qc.h(2)
qc.cx(2, 3)
qc.measure([0, 1, 2, 3], [0, 1, 2, 3])

# If the two registers are equal to each other.
with qc.if_test(expr.equal(cr1, cr2)):
  qc.x(0)

# While either of two bits are set.
with qc.while_loop(expr.logic_or(cr1[0], cr1[1])):
  qc.reset(0)
  qc.reset(1)
  qc.measure([0, 1], cr1)

(B) This is the modified code that is suitable for old versions (<0.44.0), which does not support expr.Expr.
from qiskit.circuit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit.circuit.classical import expr

qr = QuantumRegister(4)
cr1 = ClassicalRegister(2)
cr2 = ClassicalRegister(2)
qc = QuantumCircuit(qr, cr1, cr2)
qc.h(0)
qc.cx(0, 1)
qc.h(2)
qc.cx(2, 3)
qc.measure([0, 1, 2, 3], [0, 1, 2, 3])

# If the two registers are equal to each other.
with qc.if_test((cr1, 3)):
  qc.x(0)

# While either of two bits are set.
with qc.while_loop((cr1, 3)):
  qc.reset(0)
  qc.reset(1)
  qc.measure([0, 1], cr1)

(C) The code I used for execution is:
from qiskit_aer import AerSimulator
from qiskit.visualization import plot_histogram

backend = AerSimulator()
job = backend.run(qc, shots=1000)
result = job.result()
plot_histogram(result.get_counts())

What should happen?
The above code ((A)+(C)) raise the following error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 6
      4 backend = AerSimulator()
      5 job = backend.run(qc, shots=1000)
----> 6 result = job.result()
      7 plot_histogram(result.get_counts())

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/jobs/utils.py:42](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/jobs/utils.py:42), in requires_submit.._wrapper(self, *args, **kwargs)
     40 if self._future is None:
     41     raise JobError("Job not submitted yet!. You have to .submit() first!")
---> 42 return func(self, *args, **kwargs)

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/jobs/aerjob.py:114](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/jobs/aerjob.py:114), in AerJob.result(self, timeout)
     96 @requires_submit
     97 def result(self, timeout=None):
     98     # pylint: disable=arguments-differ
     99     """Get job result. The behavior is the same as the underlying
    100     concurrent Future objects,
    101
   (...)
    112         concurrent.futures.CancelledError: if job cancelled before completed.
    113     """
--> 114     return self._future.result(timeout=timeout)

File [~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/_base.py:438](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/_base.py:438), in Future.result(self, timeout)
    436     raise CancelledError()
    437 elif self._state == FINISHED:
--> 438     return self.__get_result()
    440 self._condition.wait(timeout)
    442 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:

File [~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/_base.py:390](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/_base.py:390), in Future.__get_result(self)
    388 if self._exception:
    389     try:
--> 390         raise self._exception
    391     finally:
    392         # Break a reference cycle with the exception in self._exception
    393         self = None

File [~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/thread.py:52](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/concurrent/futures/thread.py:52), in _WorkItem.run(self)
     49     return
     51 try:
---> 52     result = self.fn(*self.args, **self.kwargs)
     53 except BaseException as exc:
     54     self.future.set_exception(exc)

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aerbackend.py:433](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aerbackend.py:433), in AerBackend._execute_circuits_job(self, circuits, parameter_binds, run_options, job_id, format_result)
    430 start = time.time()
    432 # Compile circuits
--> 433 circuits, noise_model = self._compile(circuits, **run_options)
    435 aer_circuits, idx_maps = assemble_circuits(circuits)
    436 if parameter_binds:

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aerbackend.py:507](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aerbackend.py:507), in AerBackend._compile(self, circuits, **run_options)
    504 optypes = [circuit_optypes(circ) for circ in circuits]
    506 # Compile Qasm3 instructions
--> 507 circuits, optypes = compile_circuit(
    508     circuits, basis_gates=self.configuration().basis_gates, optypes=optypes
    509 )
    511 # run option noise model
    512 circuits, noise_model, run_options = self._assemble_noise_model(
    513     circuits, optypes, **run_options
    514 )

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:344](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:344), in compile_circuit(circuits, basis_gates, optypes)
    340 def compile_circuit(circuits, basis_gates=None, optypes=None):
    341     """
    342     compile a circuit that have control-flow instructions
    343     """
--> 344     return AerCompiler().compile(circuits, basis_gates, optypes)

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:77](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:77), in AerCompiler.compile(self, circuits, basis_gates, optypes)
     74 circuit = self._inline_initialize(circuit, compiled_optypes[idx])
     75 if self._is_dynamic(circuit, compiled_optypes[idx]):
     76     compiled_circ = transpile(
---> 77         self._inline_circuit(circuit, None, None), basis_gates=basis_gates
     78     )
     79     compiled_circuits.append(compiled_circ)
     80     # Recompute optype for compiled circuit

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:167](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:167), in AerCompiler._inline_circuit(self, circ, continue_label, break_label, bit_map)
    165 elif isinstance(instruction.operation, IfElseOp):
    166     ret.barrier()
--> 167     self._inline_if_else_op(instruction, continue_label, break_label, ret, bit_map)
    168     ret.barrier()
    169 elif isinstance(instruction.operation, BreakLoopOp):

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:287](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:287), in AerCompiler._inline_if_else_op(self, instruction, continue_label, break_label, parent, bit_map)
    284 else:
    285     if_else_label = if_end_label
--> 287 c_if_args = self._convert_c_if_args(condition_tuple, bit_map)
    289 qargs = [bit_map[q] for q in instruction.qubits]
    290 cargs = [bit_map[c] for c in instruction.clbits]

File [~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:184](https://file+.vscode-resource.vscode-cdn.net/Users/shaun/korean-community/meetup-notebooks/2023-09-14/~/anaconda3/envs/qiskit/lib/python3.10/site-packages/qiskit_aer/backends/aer_compiler.py:184), in AerCompiler._convert_c_if_args(self, cond_tuple, bit_map)
    182 def _convert_c_if_args(self, cond_tuple, bit_map):
    183     """Convert a condition tuple according to the wire map."""
--> 184     if isinstance(cond_tuple[0], Clbit):
    185         return (bit_map[cond_tuple[0]], cond_tuple[1])
    186     # ClassicalRegister conditions should already be in the outer circuit.

TypeError: 'Binary' object is not subscriptable

However, it should result in a figure of some distribution. Interestingly, the code (B)+(C) works as expected.

Any suggestions?
No response

FYI https://github.com/Qiskit/qiskit-aer/pull/1915

As with most Qiskit features, whether something will run on a backend depends a lot on the backend.  IBM dynamic-circuits-enabled backends can run these conditions (within the support they have for general mathematical operations), while Aer is just working on adding support now (the PR link above).
I'll close this issue now because at most it would be an issue against Aer not Qiskit, but there's also already Qiskit/qiskit-aer#1915 tracking it.

It sounds like there are no ibm backends that can run dynamic circuit with classical expression. Am I interpreting correctly?

No, all dynamic-circuits-enabled IBM hardware backends should be able to run these circuits.  I was able to run this program successfully on Perth thirty minutes ago:
from qiskit import QuantumCircuit, transpile
from qiskit.circuit.classical import expr
from qiskit_ibm_provider import IBMProvider

provider = IBMProvider()
backend = provider.get_backend(name='ibm_perth')

qc = QuantumCircuit(2, 4)
qc.h(0)
qc.cx(0, 1)
qc.measure(0, 0)
qc.measure(1, 1)
with qc.if_test(expr.logic_and(qc.clbits[0], qc.clbits[1])):
    qc.x(0)
    qc.x(1)
qc.measure(0, 2)
qc.measure(1, 3)
res = backend.run(transpile(qc, backend)).result()
res.get_counts()

with the result


Read compiler.context instead of this.context

this breaks when using webpack 4. I guess because we're using multicompiler.

@timneutkens may be. Let's take this.


Added webserver

Hey Brayden!
I added a webserver that runs this html code in localhost 8000,

Hey @roooof ! Thanks for contributing however my vision of this app was to keep a plain, serverless HTML, CSS, JS boilerplate with no external configs.


Fix parsing of HTTP Headers whitespace

search for the first non space character after the colon

fix for issue #487

I don't see tests for this... also it looks like you're doing it for the synchronous client and not the asynchronous client implementation. Are you using the synchronous client implementation @speedpat?

Any news on this @speedpat? Do you still want to get this in? If so, I'd love a test case to exercise these changes and make sure that we're doing the same for the synchronous and the asynchronous client implementations. Until you have those test cases I'm going to close this for now.


Time Tracker/Productivity Tracker

Description of the new feature / enhancement
A graph that remains on the top of the screen on right side which will tell the productivity based on the google searches and apps used. and the apps that were not productive and how much time is spent on those. There are many apps that are there for tracking these but none of them show a graph on right side of the screen which productive time and unproductive time.
Scenario when this would be used?
This can be used by developers for their time tracking, So productivity will be improved and can also be used by those whose most time is given on computers.
Supporting information
Apps like desktime, notion provide time tracking but none of them have an overlay graph which is shown everytime.

neat idea but i don't see us building this out.


Not able to use system node JS path  - C:\Program is not recognized as an internal or external command

Playwright Version:1.30.0
Operating System: Windows
Browser: Tried for Chrome

Java
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.chromium().launch(
new BrowserType.LaunchOptions().setHeadless(false)
.setExecutablePath(Paths.get("C:\Program Files\Google\Chrome\Application\chrome.exe"))
);
	      Page page1 = browser.newPage();
	      page1.navigate("http://playwright.dev");
	      System.out.println(page1.title());

}
Setting up the NODE JS PATH with the below env property
PLAYWRIGHT_NODEJS_PATH=C:\Program Files\nodejs
Also used below property
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
Code works fine if use existing nodeJS, if we set PLAYWRIGHT_NODEJS_PATH then we are getting below error
'""C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Exception in thread "main" com.microsoft.playwright.PlaywrightException: Failed to read message from driver, pipe closed.
at com.microsoft.playwright.impl.PipeTransport.poll(PipeTransport.java:75)
at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:175)
at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:109)
at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:119)
at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
at com.microsoft.playwright.impl.Connection$Root.initialize(Connection.java:79)
at com.microsoft.playwright.impl.Connection.initializePlaywright(Connection.java:152)
at com.microsoft.playwright.impl.PlaywrightImpl.createImpl(PlaywrightImpl.java:52)
at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:35)
at com.microsoft.playwright.Playwright.create(Playwright.java:110)
at com.microsoft.playwright.Playwright.create(Playwright.java:114)
Add any other details about the problem here.

PLAYWRIGHT_NODEJS_PATH needs to point to node.exe and not the folder. Can you confirm you do that?

PLAYWRIGHT_NODEJS_PATH needs to point to node.exe and not the folder. Can you confirm you do that?

Yes tried both ways with C:\Program Files\nodejs\node.exe also without  node.exe, the error remains the same.

PLAYWRIGHT_NODEJS_PATH needs to point to node.exe and not the folder. Can you confirm you do that?

Yes tried both ways with C:\Program Files\nodejs\node.exe also without node.exe, the error remains the same.

Please note that if we put the system node on another path that does not have space it works fine. I feel it is an issue of spaces in the path, can you please check

Having the same problem, it seems that the space in the path "C:\Program Files" is now causing problems.
@mEklavya thanks for giving the tip to use double quotes in env property.


Inequality Operators

I just want to start off by saying thanks for creating this awesome library. montag and I have been using it for our project and it has been extremely useful. (I'm the main developer on the project, so I'll try to shoot over MRs for your review when I get a break from all the deadlines!).
To give some context about our rule sets, we have made it so that a rule sets no longer exit fast, but instead will evaluate all of the rule rows and return all decisions that were made. We have it setup this way so that our users will be able to remediate any discrepancies in their data vs one at a time.
One thing I have wondered about, is there a particular reason we don't have access to inequality operators? I have mostly been writing my rules inversely to overcome this, but have encountered two scenarios that would greatly benefit having them.
The first scenario is I need to check if something is not equal to 2. You could get around this with "foo > 2 or foo < 2", but this seems rather cumbersome.
My other scenario is a little more nuanced. I basically need to apply some logic like "foo == null and bar != null and bar > 1".
There could be a giant big "gotcha" that I am missing, but I certainly wanted to get your take on it! Again, thank you so much for everything and I look forward to hearing back!

@wempefpl
Thanks for your feedback!
I have implemented NotEq operator as it was trivial to get it done. It is available under version 2.0.3
You can see a sample implementation here
On your other requirement:
"foo == null and bar != null and bar > 1"
I would interpret this as
WhenAll(
   Expression(NumericToken("foo"), NotNone()),
   Expression(NumericToken("bar"), NotNone()),
   Expression(NumericToken("bar"), Gt(1))
)

Does this make sense to you? If yes, I can add an operator (unary) that validates and asserts whether a token is None/null.
Please review this and let me know if we can go ahead.
Thank you once again for your wonderful feedback!


Feature Request: block console messages.

eg i want to test a function foo in a.js, and foo will log many info into console.
so is it possible to write the a.test.js in some way that is able to block the console.log messages?
a.test.js
const foo = require('./a.js')
it('should work', () => {
  blockConsole('log', 'warn'); // can we do this?
  const result = foo();
  expect(result).toBe(1);
});

Unfortunately, that is not possible. However, you can do console.log = jest.fn() and then later check the values of the mock function.

@cpojer will this method also block jest's log messages?


Feature/submodules working

This is an attempt of clean fresh start of submodules idea.
However, I didn't succeed in moving from shell scripts to CMake. Here is my latest (and incomplete) attempt:
cmake_minimum_required(VERSION 2.8)
set_directory_properties(PROPERTIES EP_BASE ${GLOBAL_OUTPUT_PATH})
project(opencv_native)

include(ExternalProject)

# Sets global output directory for single configuration (GCC)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})

# Sets global output directory for sub-configurations (msvc, mingw)
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
    string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${GLOBAL_OUTPUT_PATH})
    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${GLOBAL_OUTPUT_PATH})
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${GLOBAL_OUTPUT_PATH})
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)

#adding openv
ExternalProject_Add(opencv
	DOWNLOAD_COMMAND ""
	SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../opencv
	CMAKE_ARGS -DWITH_CUDA=OFF -DCUDA_ARCH_BIN=5.2 -DCUDA_ARCH_PTX= -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DINSTALL_CREATE_DISTRIB=ON
)

However, it doesn't start opencv build. I'm not familiar with cmake and though I googled a lot I didn't be able to make it work. Maybe you can do better.

The gitmodules looks good.
But I am confused about the CMake: we are creating a new CMake to just wrap OpenCV's CMake?

Yep, that was the original idea, but it seems to be not working for some reason. Maybe I'm just not so good in making make scripts (it's my first attempt ever), but it seemed to be the only cross-platform way to configure make. I just don't like we have 3 scripts that we have to maintain synchronized, and changes in one script may be forgotten to be added in anothers, common copypaste problem, you know :)

Sure, having a cross-platform build system is nice and CMake does a reasonable job.
But As I am looking at the scripts we have for now, there are two scripts across different platforms: one for installing CUDA, one for building OpenCV (mostly just calling OpenCV's CMake). The benefit of having this meta-CMake seems to be wrapping OpenCV CMake command line argument in a cross-platform way. Given that is only a couple of lines of code, I do not know how beneficial it is to work on this. And copy-paste problems should be detected by CI.
Again, for me, I would also like a cross-platform build process because I do not work on Windows, but this library should support Windows users (btw, thank you for all the Windows build improvements), but I felt like working on CMake is not a good investment of time. P.S. I have worked for a project using CMake for cross-platform build, CMake is not friendly to work with :)

@nebgnahz yeah, I see :)

Given that is only a couple of lines of code, I do not know how beneficial it is to work on this. And copy-paste problems should be detected by CI.

But we still make mistakes with these couples of lines. The most notable example, I guess, is compiling world in one case and not compiling it in another one. The most consistent way is use it everywhere or nowhere.
However, I agree that we probably have higher priorities.
Another question is about codegen. See my question on opencv.org . Main OpenCV developer noted that without codegen this initiative may not quit "toy example" state. And it's kind an issue. We may automate a lot of things, such as:

All primitive types, such as CvRect, CvPoint, ...
Constructors and destructors for all types. Automatic drop implementation.
Right signatures for functions as well as comments for functions and parameters.

This is the main problem I see right now, it's quite strategic.

Ping?:)
We also might look on helix and implement some codegen via macros.
@berak is right, without some sort of codegen it would stay at "toy project" state. If we want some acceptance we have to solve all the complexity around the library.

@Pzixel I am all in for a bindgen solution (either using Rust bindgen or adapting existing solutions for Python/Java/Go). I fully agree that without doing that, the manual solution is not scalable for other modules and this will stay as a toy project.
There was another project doing the "adapt Python build process to Rust", https://github.com/kali/opencv-rust/. Last time I checked, it worked better for OpenCV 2.x, not so good for 3.x. For my use case, I need 3.x. And because I wasn't targeting at all OpenCV APIs but only a few modules that I need, I started this project and focused on a simple wrapper that does not do magic bindgen at all. You can take a look at that project and see if the approach is viable.
P.S. I am already over committed recently. Apologies. While I am happy to review your changes and having discussions, implementation-wise, I would not be able to do much (I will be much much much more free after May...)

Yep, I have seen this project, however it looked abandoned and I didn't get how it works. Now I know how bindgen works and I understand this project, but it's a no way for us - I've talked with many people that are using bindgen and they think that bindgen should be user as CLI tool only, no build.rs with bindgen ever.

There is another project doing the "adapt Python build process to Rust", https://github.com/kali/opencv-rust/. Last time I checked, it worked better for OpenCV 2.x, not so good for 3.x. For my use case, I need 3.x. And because I wasn't targeting at all OpenCV APIs but only a few modules that I need, I started this project and focused on a simple wrapper that does not do magic bindgen at all. You can take a look at that project and see if the approach is viable.

So am I, I needed some features to make image database, but involved in library development a bit :)
However, I think my work with CVec, CResult and other types could be reused for this codegen, so they won't be useless waste of time.
We may adopt some code from opencv-rs project to make it compile with 3.X and then introduce more modules. Or should we?
The main reason for codegen is that we shouldn't write our code. But Rust has completely different approaches as C++ code. You cannot generate ideomatic Rust code with bindgen, it's only possible to do manually, e.g. remember all these crazy enums (thay look much better in our wrapper) as well as class hierarchy that looks like trait objects and independed structs (see matchers). It defenitely may be generated, but I don't believe it may be done by bindgen heuristics.
I'm kinda lost here. We can't provide the whole opencv wrapper written manually but we cannot generate ideomatic wrapper. All in all, we probably may enhance bindgen heuristics to make it work with hierarchies, and that probably would allow us to generate wrappers. But again, who knows what else must be enhanced to make it work in a nice way and how much effort should we spend.
Sorry for chaotic writing, I was just writing my thoughts as they come.  The general idea is that we probably can spend several months or even years in enhancing bindgen which probably will be accepted in upstream and which probably will solve some of problems. And this conclusion makes me sad: it shows that it's probably impossible to do by just us two.

However, I'd like to end writing on something positive:
https://github.com/opencv/opencv/blob/master/modules/core/include/opencv2/core/hal/interface.h#L21-L31
OpenCV actually works only on int=i32 platforms so we can easily remove all our c_int's from API.

@Pzixel , i somehow got pinged here, let me add some comments:

no i'm not a "main opencv developer", i'm just loud on answers.opencv.org
"We may automate a lot of things, such as: All primitive types, such as CvRect, CvPoint, ..."
i'd try the opposite way: map fundamental types manually; once you got that, it should be a breeze, generating functions like add(src1, src2, result) (and again, this should be based on c++ types, not the arcane c-api)
i tried to eat my own dog-food recently, trying to automate opencv wrappers for gocv, but after putting in like 60 hrs on some (current 1038 lines) python script, based on gen2.py, results are only 70%correct. this IS terribly hard !
whatever codegen you use, in the end it's a collection of "edge cases", that noone but the author (and you !) may have encountered.
a single person may try a pr with a few wrappers, and this will need only like overview of maybe 20% of the complexity, but a full-blown codegen needs 101% ;(
(on the other hand github interaction with a 1-function pr WILL tire out any maintainer, also the sun will melt, before there's any real progress, that way ...)
i somewhat lost contact to the rust-sphere (shame on me), but it seems it needs 2 layers of wrapping: c++ args to c, -> c args -> rust, and then the reverse for any results: rust ->  c,  c -> c++

in the end: do things in small steps. do try with codegen !
(of your favourite sort), but be sceptical.
feed it with small input (a few functions (classes, if you dare even !) at a time, check the output, do tests.)
i still think, playing with some kind of codegen is a good idea. even if it may not be immediately productive, (aka: merged pr's until you reach the 101% stage) ,
for sure, it will make you understand both rust AND opencv concepts better (even if that's bought terribly expensive ;)


Update repository after transfer

See https://github.com/senzing-garage/garage-roadmap/issues/3

Pull requests:

https://github.com/senzing-garage/g2-sdk-json-type-definition/pull/10


Request: Latex support

Does manis plan to support Latex?
It will be great if theme have Latex support.

Well, I don't really use Latex in my blog. But it should be easy to integrate Katex.
I'll accept PR for the Katex integration.


RuntimeError: self and mat2 must have the same dtype

Whenever I follow the installation instructions, apply autogptq to llama2-hf, then try to run qalora.py on the checkpoints produced by autogptq. I install autogptq using pip install autogptq[triton], and follow all other installation. peft_integration is no longer a branch in autogptq and thus can't be installed.
I get the following error:
"loading base model checkpoints...
QuantLinear with exllama backend not support trainable mode yet, Switch to the pytorch backend.
adding LoRA modules...
trainable params: 17891328.0 || all params:<PHONE_NUMBER> || trainable: 1.4708407835055712
loaded model
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Using pad_token, but it is not set yet.
torch.float16 263512064 0.21663102954794175
torch.int32 809500672 0.665483626567893
torch.float32 143396864 0.11788534388416533
0%|                                                                    | 0/10000 [00:00<?, ?it/s]Traceback (most recent call last):
File "qalora.py", line 793, in
train()
File "qalora.py", line 755, in train
train_result = trainer.train(resume_from_checkpoint=resume_from_checkpoint)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/trainer.py", line 1591, in train
return inner_training_loop(
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/trainer.py", line 1892, in _inner_training_loop
tr_loss_step = self.training_step(model, inputs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/trainer.py", line 2776, in training_step
loss = self.compute_loss(model, inputs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/trainer.py", line 2801, in compute_loss
outputs = model(**inputs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/peft/peft_model.py", line 948, in forward
return self.base_model(
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/peft/tuners/tuners_utils.py", line 106, in forward
return self.model.forward(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py", line 1038, in forward
outputs = self.model(
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py", line 921, in forward
layer_outputs = torch.utils.checkpoint.checkpoint(
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/utils/checkpoint.py", line 249, in checkpoint
return CheckpointFunction.apply(function, preserve, *args)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs)  # type: ignore[misc]
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/utils/checkpoint.py", line 107, in forward
outputs = run_function(*args)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py", line 917, in custom_forward
return module(*inputs, past_key_value, output_attentions, padding_mask=padding_mask)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/transformers/models/llama/modeling_llama.py", line 635, in forward
hidden_states, self_attn_weights, present_key_value = self.self_attn(
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/auto_gptq/nn_modules/fused_llama_attn.py", line 53, in forward
qkv_states = self.qkv_proj(hidden_states)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/peft/tuners/lora/layer.py", line 251, in forward
result = self._linear(x)
File "/home/mohamed/miniconda3/envs/qalora/lib/python3.8/site-packages/peft/tuners/lora/layer.py", line 239, in _linear
return F.linear(input, transpose(self.weight, self.fan_in_fan_out), bias=self.bias)
RuntimeError: self and mat2 must have the same dtype"
Can you help me setup my environment and mention the details instructions to run the qalora on llama2-hf given the latest packages, or release your conda environment yml file?
Thank you.

input.dtype, self.weight.dtype, self.bias.dtype
(torch.float32, torch.int32, torch.float16)

Hi，which bit-width have you chose? 3? I saw the Quantlinear not supported warning and only 3-bit quantization would incur.
I may suggest one way to ignore the error which you can try. Bellow is part of your error: packages/peft/tuners/lora/layer.py", line 239, in _linear
return F.linear(input, transpose(self.weight, self.fan_in_fan_out), bias=self.bias)
Go to this file: packages/peft/tuners/lora/layer.py, change line 239 into:
return F.linear(input.to(self.weight.device), transpose(self.weight, self.fan_in_fan_out), bias=self.bias)
You can try this.

@M-Elfeki I checked my dependencies that, I used the auto-gotq==0.3.0.dev0, You can try 0.3.0

@jianyuheng I will check the dependencies again. Some people told me that they succeed in runing the code will following dependencies which you can try first.
auto-gptq==0.4.2
bitsandbytes==0.41.1
evaluate==0.4.0
optimum==1.13.2

The error no longer appears when I modify these two lines of code. @yuhuixu1993
https://github.com/yuhuixu1993/qa-lora/blob/8791e08929fee2bf015a9bbc0ebaaefd0c9cf2a5/qalora.py#L300
model.config.torch_dtype=torch.float16
https://github.com/yuhuixu1993/qa-lora/blob/8791e08929fee2bf015a9bbc0ebaaefd0c9cf2a5/qalora.py#L340
module = module.to(torch.float16)

this error still raises when resume the ckpt

I used auto-gotq==0.3.0, pytorch=2.0.1-cu118 and fixed the above problems.