Please add examples on how to integrate Playwright

I've been trying to integrated Playwright into my .NET Aspire Test project, however, I haven't found a way to make it work.
I have a problems

None of the routes from the httpClient created from DistributedApplicationTestingBuilder are accesible from my browser.

Hi @efonsecab I was thinking about this today as well. The HttpClient won't give you what you need for a Playwright test (assuming you want to do more URI-based/Page-based tests).
Here's a sample I came up with and wonder if you might play around with this and see if meets your needs? (this is using Playwright tests written in MSTest):
[TestMethod]
public async Task BrowseAroundFrontEnd()
{
    var appHost = await DistributedApplicationTestingBuilder.CreateAsync<Projects.AspireApp133_AppHost>();
    await using var app = await appHost.BuildAsync();
    await app.StartAsync();

    // find the named resource I need
    var webResource = appHost.Resources.Where(r=>r.Name == "webfrontend").FirstOrDefault();

    // get the 'http' endpoint for the resource
    var endpoint = webResource.Annotations.OfType<EndpointAnnotation>().Where(x => x.Name == "http").FirstOrDefault();

    // navigate to the UriString of the allocated endpoint
    await Page.GotoAsync(endpoint.AllocatedEndpoint.UriString);

    await Page.ScreenshotAsync(new PageScreenshotOptions { Path = ".\\screenshot.png" });

    await Page.GetByRole(AriaRole.Heading, new() { Name = "Hello, world!" }).ClickAsync();
    await Page.GetByRole(AriaRole.Link, new() { Name = "Counter" }).ClickAsync();
    await Page.GetByRole(AriaRole.Button, new() { Name = "Click me" }).ClickAsync();
    await Page.GetByRole(AriaRole.Link, new() { Name = "Weather" }).ClickAsync();
    await Page.GetByRole(AriaRole.Heading, new() { Name = "Weather" }).ClickAsync();

}

It's nothing ornate, just was seeing to get the information working with a Page test.
Repo: https://github.com/timheuer/aspire-playwright
I know @ReubenBond is thinking of some other things for test apphost as well so just tagging him to watch feedback.

Thanks @timheuer, that works just fine for me.

Thanks for confirming @efonsecab  -- i'm going to move this to the samples repo as I think still a good issue to properly track a sample, but not a platform issue as of now.


feat: RunnerSet backed by StatefulSet

TL;DR; RunnerSet is a more feature-rich, flexible, easy to configure, and maintainable alternative to RunnerDeployment.

It can be said feature-rich as it supports #612 for using persistent volumes for caching.
It is flexible as it supports all the pod template settings from StatefulSet API while supporting all the runner-related settings from Runner API
It is easy to configure and maintainable as the pod-related and container-related settings are now inherited from StatefulSet/Pod Template API. We don't need to maintain and rely on our own variants included in Runner Spec.

A runnerset can manage a set of "stateful" runners by combining a statefulset and an admission webhook. A statefulset is a standard Kubernetes construct that manages a set of pods and a pool of persistent volumes. We use that to manage runner pods, while using the admission webhook mutates each pod to have required environment variables and registration tokens.
It is considered to be a complete replacement to the former method of deploying a set of runners, RunnerDeployment, which also creates pods with the required environment variables and registration tokens.
Differences between RunnerSet and RunnerDeployment
The only and big functional difference between RunnerSet and RunnerDeployment is that the former has support for volumeClaimTemplates, which allows actions-runner-controller to manage a pool of dynamically provisioned persistent volumes. This should be useful to make certain types of actions workflows faster by utilizing per-pod-identity cache, like docker layer caches in /var/lib/docker persistent across pod restarts.
The basic usage of RunnerSet is very similar to that of RunnerDeployment.
This RunnerDeployment:
# runnerdeployment.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: example-runnerdeploy
spec:
  replicas: 2
  template:
    spec:
      repository: mumoshu/actions-runner-controller-ci
      env: []

can be rewritten to:
# runnerset.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerSet
metadata:
  name: example
spec:
  # NOTE: RunnerSet supports non-ephemeral runners only today
  ephemeral: false
  replicas: 2
  repository: mumoshu/actions-runner-controller-ci
  # Other mandatory fields from StatefulSet
  selector:
    matchLabels:
      app: example
  serviceName: example
  template:
    metadata:
      labels:
        app: example

Also note that, unlike RunnerDeployment, you can write the full StatefulSet spec inside RunnerSet. Configure the pod template however you like, and the runnerset controller reads and tweaks the pod template to create a complete runner pod spec. This makes it unnecessary to add every pod spec fields to runner spec.
How to configure your RunnerSet
You might have written a RunnerDeployment like the below with various tweaks:
# runnerdeployment.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: example-runnerdeploy
spec:
  replicas: 2
  # Mandatory fields from StatefulSet
  selector:
    matchLabels:
      app: example
  serviceName: example
  # Pod template
  template:
    metadata:
      # Mandatory fields from StatefulSet
      labels:
        app: example
    # Pod template spec
    spec:
      repository: mumoshu/actions-runner-controller-ci
      dockerdWithinRunnerContainer: true
      env: []
      securityContext:
        #All level/role/type/user values will vary based on your SELinux policies.
        #See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/container_security_guide/docker_selinux_security_policy for information about SELinux with containers
        seLinuxOptions:
          level: "s0"
          role: "system_r"
          type: "super_t"
          user: "system_u"
      resources:
        limits:
          cpu: "4.0"
          memory: "8Gi"
        requests:
          cpu: "2.0"
          memory: "4Gi"
      dockerdContainerResources:
        limits:
          cpu: "4.0"
          memory: "8Gi"
        requests:
          cpu: "2.0"
          memory: "4Gi"

In RunnerDeployment API, you have 4 things to declare in 2 places. 1 thing under spec and 3 things under spec.template.spec:

Per-deployment settings like replicas under spec
Per-deployment and runner-related settings like repository, organization, enterprise, dockerdWithinRunnerContainer, and so on under spec.template.spec
Per-pod settings like securityContext, volumes under spec.template.spec
Per-container settings like resources, dockerdContainerResources, image, dockerImage, and so on under spec.template.spec

In RunnerSet API, you have 3 things to declare in 3 places:

Per-set settings like replicas, repository, organization, enterprise, and so on under spec
Per-pod settings under spec.template.spec
Per-container settings under spec.template.spec.containers[]

All the dockerdContainer* settings in RunnerDeployment goes to the containers entry whose name is docker, for example.

2 and 3 might be more familiar to many users and therefore it will be easy to write, as it's a standard pod template syntax used widely in Kubernetes Deployment, ReplicaSet, and StatefulSet.
That being said, the above example can be rewritten in RunnerSet like the following:
# runnerset.yaml
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerSet
metadata:
  name: example
spec:
  # NOTE: RunnerSet supports non-ephemeral runners only today
  ephemeral: false
  replicas: 2
  repository: mumoshu/actions-runner-controller-ci
  dockerdWithinRunnerContainer: true
  template:
    spec:
      securityContext:
        #All level/role/type/user values will vary based on your SELinux policies.
        #See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/container_security_guide/docker_selinux_security_policy for information about SELinux with containers
        seLinuxOptions:
          level: "s0"
          role: "system_r"
          type: "super_t"
          user: "system_u"
      containers:
      - name: runner
        env: []
        resources:
          limits:
            cpu: "4.0"
            memory: "8Gi"
          requests:
            cpu: "2.0"
            memory: "4Gi"
      - name: docker
        resources:
          limits:
            cpu: "4.0"
            memory: "8Gi"
          requests:
            cpu: "2.0"
            memory: "4Gi"

Planned but not yet implemented
The following features are planned but not implemented. Please use RunnerDeployment for now if you need any of them.
HRA support:
The support for HorizontalRunnerAutoscaler is planned but not done yet.
Scale-from/to-zero:
Scale-from/to-zero is planned but not implemented yet.
Auto-recovery runner pods stuck while registering:
Planned but not implemented yet.
Call for help
I've already verified this to work manually using the updated helm chart and my own build of the actions-runner-controller container image. But, as a lot of changes are made to the code-base, I don't think this is tested enough.
If you want this feature to get merged at all, or get merged earlier, please test and report any problems you encounter!
Changelog

Add API types, CRDs, controllers/runnerset_contorller.go and controllers/pod_runner_token_injector.go

Added acceptance/testdata/runnerset.yaml and updated acceptance/deploy.sh. Run a deployment with USE_RUNNERSET=1 to deploy test runners using RunnerSet instead of RunnerDeployment.

Manually update manager_role.yaml chart template to reflect changes in kustomize config/rbac/role.yaml

Update controller-gen from 0.3.0 to 0.4.1 to avoid errors generating RunnerSet CRD. The side-effect of this is that all the other CRDs upgraded to v1 API

Update controller-gen to 0.6.0 to avoid issues on runnerset.spec.template.metaata being empty

Manually update webhook_configs.yaml char template to reflect changes in kustomize config/webhook/manifests.yaml

Upgraded controller-runtime to 0.9.0 to prevent envtest failing to install v1 CRDs

I had to fix various errors due to deprecation and removals listed in e.g. https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.7.0
Issues I have encountered while developing this:

https://github.com/kubernetes-sigs/controller-tools/issues/444#issuecomment-680168439

https://github.com/kubernetes-sigs/controller-tools/issues/302

Related issues
Resolves #613
Ref #612
Revival of #4

Hi @mumoshu. I am testing the controller using the canary tag and I am seeing the following error
actions-runner-controller-67bc455dd6-css9q manager E0622 15:10:58.821753       1 leaderelection.go:325] error retrieving resource lock actions-runner-system/actions-runner-controller: leases.coordination.k8s.io "actions-runner-controller" is forbidden: User "system:serviceaccount:actions-runner-system:actions-runner-controller" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "actions-runner-system"

I see that https://github.com/actions-runner-controller/actions-runner-controller/blob/8b90b0f0e3a4a254c096f8d9ecd8aeed0ee3c00e/controllers/runnerset_controller.go#L68 is commented out. Is that needed?

Hi @mumoshu. I am testing the controller using the canary tag and I am seeing the following error
actions-runner-controller-67bc455dd6-css9q manager E0622 15:10:58.821753       1 leaderelection.go:325] error retrieving resource lock actions-runner-system/actions-runner-controller: leases.coordination.k8s.io "actions-runner-controller" is forbidden: User "system:serviceaccount:actions-runner-system:actions-runner-controller" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "actions-runner-system"

I see that
https://github.com/actions-runner-controller/actions-runner-controller/blob/8b90b0f0e3a4a254c096f8d9ecd8aeed0ee3c00e/controllers/runnerset_controller.go#L68
is commented out. Is that needed?

This was my fault. I used an outdated chart (changed controller tag to canary).
The chart that is currently in master works fine. Thanks! I'll continue testing this!

@esvirskiy Wow! Thanks a lot for testing ☺ Please feel free to leave any early feedbacks. That would be super helpful to shape this feature.
Note that there's a few unimplemented things as explained in the pr description:

I'm working for the HRA support at #647. I'll tackle the auto-recovery feature next. Scale-from/to-zero is at the lowest priority and I may skip working on it entirely, because a potential enhancement on the GitHub side can make it unnecessary.


Separate certificate server

Hi,
I am trying to find a solution for a issue on my organization.
The network looks like this: We have a f5 load balance that divides the traffic to two IIS servers. We want a separate server that deals with all the certificates and installs them for each of the IIS servers. Is this possible with the current script or would some modifications be necessary?
Thanks.

We do this using Centralized Certificate Store option.  You specify a central path (shared folder location) as a parameter in the command line and it will install the pfx cert to that folder.  Then on each IIS server set it up to use centralized certificate store in Bindings and it will look in that folder for the cert without you having to actually "install" it in IIS.  It does it by name so you just have to make sure the filename is the same as the domain name (other than the .pfx extension).  Search online about that option for IIS and you'll find more inf on it.  As far as this script, it's very easy.  Just add that command line to specify the destination folder for the pfx.

Thanks @EricQTI, the way you describe it is best practice as far as I know.

Also see #893 for some tips.

Thanks a lot guys I will check it out. I think this solves the issue. I'll give some updates.

Hey guys, I tried to setup a separate server as the Centralized certificate store. On this server I installed IIS and enabled centralized certificate store, and an open share to this server. I then setup another IIS server that would connect to this centralized certificate store remotely over the internet using its UNC path. When trying to connect with the correct credentials I get the error message "Cannot connect to the specified path. Make sure that the path and credentials are valid" it works to connect locally to the path but not remotely, anyone has any clues? I am so close to success 👍

Made a wiki page about it:
https://github.com/PKISharp/win-acme/wiki/Load-balancing
I hope you managed to solve your connection issue sl4cky. Can have many reasons at the network level and OS level, but there are better places than this to get help for troubleshooting fileshares/IIS.

@WouterTinus  note that if IIS is clustered, it means that the serverA starting the validation might get those requests sent to serverB. The way we have handled this ourselves is a virtual directory for .well-known that points to a central smb path (could be the same server as the central ssl store).


Debounce not working

From a clean install of 0.1.7, copilot ignore is finding .copilotignore files but not triggering on window change. Extension host log is full of the following:

2024-10-30 07:06:23.915 [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json'
2024-10-30 07:06:24.108 [error] TypeError: Cannot read properties of undefined (reading 'log')
at _trigger (/home/rgr21/.vscode/extensions/mattickx.copilotignore-vscode-0.1.7/out/extension.js:84:14)
at Timeout._onTimeout (/home/rgr21/.vscode/extensions/mattickx.copilotignore-vscode-0.1.7/out/extension.js:39:41)
at listOnTimeout (node:internal/timers:581:17)
at process.processTimers (node:internal/timers:519:7)

@mattickx title maybe under representing this -- I think 0.1.7 is not working at all.

Could you try with 1.0.8
I've implemented and tested:
this.trigger = debounce(this._trigger.bind(this), 100)
Then there might be no need to move the debounce function

That works, thanks. (I confess to being no typescript developer!)

That works, thanks. (I confess to being no typescript developer!)

No worries, thanks for noticing, I'm not sure how I missed it yesterday as it seemed to be working while developing.
Pushed 1.0.8 which in now available!


Add support to conditional typings

Hi there,
I've been working on a feature with dynamic schemas that I need to validate some rules, but I'm having trouble with typescript errors in refine or superRefine.
import { z } from 'zod';

// Dynamic condition that the user can change, for example
let isForm1Active = false;

// Basic schema
const form1Schema = z.object({
  name: z.string(),
  age: z.number(),
});

// Dynamic schema
const schema = z
  .object({
    form1: isForm1Active ? form1Schema : z.unknown(),
  })
  .refine((args) => {
    // args.form1.name is not accessible, ok

    if (isForm1Active) {
      // args.form1.name is still not accessible
      // maybe here, like in union types in typescript, this should work?
    }
  });

Is there another way to work with dynamic items without losing the type safety of zod?
Live preview:
https://stackblitz.com/edit/typescript-kaf78i?file=index.ts
Thanks in advance and congratulations on this lib, the syntax to validate everything is so neat!

there are a few tools to achieve what you're trying to do
Did you try to use z.union, or more specifically z.discriminatedUnion?

@lucassarcanjo
Is the above answer satisfactory? Or do you have any questions?
I'd like to close this issue if there are no further questions.


Stacked-bar from dist/bundled/britecharts and from dist/umd doesn't work the same

Hello,
The stacked-bar chart from dist/bundled/britecharts.min.js and the stacked-bar from dist/umd/stacked-bar.min.js doesn't work the same
Expected Behavior
In all case, the stacked-bar constructor should be stackedBar(), for now it's stacked-bar() in umd file
chartContainer.datum(dataset).call(barChart);  shouldn't trigger an error
Steps to Reproduce (for bugs)
Exemple with bundled file
https://codepen.io/sound-matt/pen/weJdMJ
Exemple with UMD files
https://codepen.io/sound-matt/pen/gRPmXK

Hi @sound-matt, thanks for the bug report!
It makes sense, as our build is using the filenames as the namespace for the charts. It should definitely work as you suggest.


If there are no favourites replace BitFlux with a message

If you remove all favourites, then that’s the only moment where there would be no selections. In this case no chart should appear.
A message should appear replacing the chart, something like “ Please add a stock from the search panel"

Closed by #323


Metadata Filters rendered by datatype

Is this issue relevant for Argilla 2.0 or can we close it @dvsrepo ?


Pylance doesn't seem to respect python.autoComplete.extraPaths

Environment data

Language Server version: 2020.6.1
OS and version: OSX 10.15.5
Python version (& distribution if applicable, e.g. Anaconda): Python 3.6 (pyenv)

Expected behaviour
Project imports are recognised when they exist in paths defined by python.autoComplete.extraPaths
Example:
"python.autoComplete.extraPaths": [
            "kogan3/apps/",
            "kogan3/"
        ],

Should recognise an import of from myapp.models import MyModel when it is contained within kogan3/apps/myapp/
Actual behaviour
Red squiggles and the imports aren't recognised
Logs

Time taken to get recommendations: 5 ms, Memory increase: 480 KB.
[BG] analyzing: /Users/josh/dev/K3/kogan3/apps/klarna/models.py ...
[BG]   parsing: /Users/josh/dev/K3/kogan3/apps/klarna/models.py (9ms)
[BG]   binding: /Users/josh/dev/K3/kogan3/apps/klarna/models.py (2ms)
[BG]   checking: /Users/josh/dev/K3/kogan3/apps/klarna/models.py (102ms)

Code Snippet / Additional information

Ah, as my team mate has discovered, a new setting resolves this:
"python.analysis.extraPaths": [
            "kogan3/apps/",
            "kogan3/"
        ],

Yes, we moved this to a new setting as the old one was inconsistently named (for historical reasons). We plan to keep everything under the python.analysis.* grouping from now on.


Avoid NPE on missing event update datetime [google-calendar-stream]

Added a simple null check to prevent NullPointerException in case event update datetime is missing.
[2020-12-09 11:14:19,110] WARN Consumer Consumer[google-calendar-stream://gcalstream?accessToken=xxxxxx] failed polling endpoint: google-calendar-stream://gcalstream?accessToken=xxxxxx. Will try again at next poll. Caused by: [java.lang.NullPointerException - null] (org.apache.camel.component.google.calendar.stream.GoogleCalendarStreamConsumer)
java.lang.NullPointerException
	at org.apache.camel.component.google.calendar.stream.GoogleCalendarStreamConsumer.poll(GoogleCalendarStreamConsumer.java:91)
	at org.apache.camel.support.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:190)
	at org.apache.camel.support.ScheduledPollConsumer.run(ScheduledPollConsumer.java:107)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Can you create a new PR for 3.7.x too? Thanks

Can you create a new PR for 3.7.x too? Thanks

Sure. There is no automatic backporting?

Not yet


Questions

Recently I update the shader to version 2. When I click 'shift'+'I', then '2', I see that it justs says (rgb), while v1 also had (luma), does this makes a difference? (It might be placebo, but I think v1 was better).
And which release of version 2 you think is the best?
Also, I wanted to know what mpv settings you think are the best to use with your shader, to not conflict with it. Now I am using those:
profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=mitchell
and KrigBilateral shader for chroma.
Thanks in advance.

I have an Nvidia card
gpu-api=vulkan
vulkan-async-transfer=yes
vulkan-async-compute=yes
vo=gpu
hwdec=cuda
scale=ewa_lanczossharp
cscale=ewa_lanczossoft
dscale=mitchell
I'm using v2.0 RC5 and with some non-anime videos mpv crash on startup

Try without hwdec cuda and see if it crashes.

I just write here my review of the version 2.1aL
I think this is the best anime upscaler so far, especially this latest version, it's incredible, black magic.
480p to 1080p is near the perfection. I really appretiate your work! Thank you!

There is any way with MPV to activate and deactivate the shader with one button? Because I sometimes watch 3D movies, concerts, etc, and this shader is not good for non-Anime.
I have another MPV player setted with ravu, but is annoying to switch player all the times.

I just write here my review of the version 2.1aL
I think this is the best anime upscaler so far, especially this latest version, it's incredible, black magic.
480p to 1080p is near the perfection. I really appretiate your work! Thank you!

Can you tell me which combination of shaders are you using, I also want to use this for scaling/refining 360/480/720 to 1080p res but I don't know which shaders to use, does it upscale every video to  4k?


[STORM-1605] use '/usr/bin/env python' to check python version

Current python version check is hard-coded and it cannot detect python 2.7.x versions. Changed to /usr/bin/env to keep consistent with storm.py

@unsleepy22  It loos good to me.  Many *.py files start with "#!/usr/bin/python" in storm . So do you think we should update them together or not?

@hustfxj thanks for pointing out, I added storm.py too. But for the other files, I prefer to leave them alone since they're not part of storm-core.

+1 looks good to me.

+1


Add WBGT Chronic Heat Model

This is a new pull request to merge changes from MLevinMazars pull request:
Updates made to the WBGT model to add variance by asset type. Additionally changes to hazard data to account for windows/unix differences.
Signed-off-by: MLevinMazars<EMAIL_ADDRESS>


Button "Continue" enabled by default

When opening a step, the "Continue" button is enabled by default.
It should be enabled only when the step is completed, no?

First of all, sorry for the immense delay in my response; after a long period of abandonment it is only recently that I have found the time to work on this library again.
Regarding the issue, the Continue button is and has always been disabled by default; you have to mark the step as completed to activate it.


not work in 1080ti gpu

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.61                 Driver Version: 551.61         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1080 Ti   WDDM  |   00000000:04:00.0  On |                  N/A |
| 30%   23C    P2             56W /  250W |     286MiB /  11264MiB |      2%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
not work in gpu, only run to cpu, why?

Can you share the server.log?

Which processor are you using?

@schueszy
My processor is Intel Xeon X5675.

I believe this CPU lacks AVX, making this a dup of #2187

Thank you! You're right processor is not support AVX.

If possible, I'd recommend trying to use a CPU that does have at least AVX unless you know your model will completely fit into the GPU as we see ~4x improvement in speed between no-AVX and AVX.


MsalInterceptor breaks ngx-translate

Library

[x]<EMAIL_ADDRESS>or<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>
Framework
Angular 10
Description
I use ngx-translate in my Angular 10 App. With uses the default HTTPLoader to load the language files.
export function HttpLoaderFactory(http: HttpClient) {
   return new TranslateHttpLoader(http);
}

When i add the MsalInterceptor to the Angular App every HTTP Request to get the language files seems to be intercepted by the MsalInterceptor. Because that the request fails and ngx-translate is not working. The Request gets intercepted even if protectedResourceMap is to null.
In my unterstanding, MsalInterceptor trys to get a token and add the token to the request for every call ngx-translate make. But when the user is not signed in, getting the token fails and the ngx-translate request is not made.
Ngx-Translate start working again as normal immediately when i remove the MsalInterceptor. When the user is logged in with his Microsoft-Account, ngx-translate also works. But if the user is not signed in the MsalInterceptor tries to get a token for every ngx-translate request and then fails.
    MsalModule.forRoot({
            auth: {
                clientId: 'xyz', // This is your client ID
                authority: 'https://login.microsoftonline.com/xyz', // This is your tenant info
                redirectUri: 'http://localhost:4200/login' // This is your redirect URI
            },
            cache: {
                cacheLocation: 'localStorage'
            }
        }, {
            popUp: true,
            consentScopes: [
                'user.read',
                'api://xyz/api.consume'
            ],
            unprotectedResources: null,
            protectedResourceMap: null,
            extraQueryParameters: {}
        }),

Error Message
core.js:4197 ERROR ClientAuthError: User login is required. For silent calls, request must contain either sid or login_hint
Browsers/Environment

[x] Chrome
[x] Firefox
[x] Edge
[x] Safari
[x] IE
[ ] Other (Please add browser name here)

When i add the MsalInterceptor to the Angular App every HTTP Request to get the language files seems to be intercepted by the MsalInterceptor. Because that the request fails and ngx-translate is not working. The Request gets intercepted even if protectedResourceMap is to null.

What do the urls for the http requests from ngx-translate look like? Are they external paths, or local paths on your app?

@jasonnutter The language files are located in my asset-folder as .json files:

ngx-translate sends an additional http-request to get this files:

This works well, as long i'm signed in via the msal-library and the msal-library is able to get a token silent. When i'm not signed in the msal-library tries to get a token for ngx-translate http-request. This fails with this here and ngx-translate is not able to get the .json files:

I'm struggling with the same issue.
This problem would not exist if the "unprotectedResources" were still available in the msal-angular setup. That way I could exclude the local translation files from msal.
For now, I'm using this dirty workaround to reload the application after login...:
this.broadcastService.subscribe('msal:loginSuccess', () => {       location.reload();     });

@OPunktSchmidt Does this work?
export const protectedResourceMap: [string, string[]][] = [
  ['http://localhost:4200', null]
];

Also, if you don't have any protected resources (i.e. your protected resource map is empty or null), you should not need to include the MSAL Interceptor at all in your app.

@OPunktSchmidt Does this work?
export const protectedResourceMap: [string, string[]][] = [
  ['http://localhost:4200', null]
];

No, these calls still get intercepted (and a bearer token is added when logged in)

Also, if you don't have any protected resources (i.e. your protected resource map is empty or null), you should not need to include the MSAL Interceptor at all in your app.

I have a list with 3 endpoints that should be intercepted. But msalIntercepter is processing each request that goes through the httpClient, also for url's that are not in the list.

Sorry, something like this should work:
["http://localhost:4200/assets/i18n/*.json", null]

I have a list with 3 endpoints that should be intercepted. But msalIntercepter is processing each request that goes through the httpClient, also for url's that are not in the list.

Correct, the interceptor will be run for each request using the http client. It will attach tokens for urls that are listed in the protected resource maps, and by default, will attach ID tokens for requests against the app itself (e.g. the ngx-translate requests) unless an entry like the one above is added. This is behavior we will be changing in MSAL Angular v2.

["http://localhost:4200/assets/i18n/*.json", null]

@jasonnutter This does not work either. The msal-library still tries to add a token to the request.
export const protectedResourceMap: [string, string[]][] = [['https://localhost:5001/Authentication/azuread', ['api://xyz/api.consume']],
    ["http://localhost:4200/assets/i18n/*.json", null]];

      MsalModule.forRoot({
            auth: {
                clientId: 'xyz', // This is your client ID
                authority: 'https://login.microsoftonline.com/xyz', // This is your tenant info
                redirectUri: 'http://localhost:4200/login' // This is your redirect URI
            },
            cache: {
                cacheLocation: 'localStorage'
            }
        }, {
            popUp: true,
            consentScopes: [
                'user.read',
                'api://xyz/api.consume'
            ],
            unprotectedResources: null,
            protectedResourceMap: protectedResourceMap,
            extraQueryParameters: {}
        }),

Couldn't get it to work either...
For now I went back to msal-angular 1.0.0, with these unprotectedResources:
unprotectedResources: [         '/assets/'       ],
This works as expected: calls to the translations files execute instantly without token. In the meantime, the popup appears to handle the login process. When the login is successful, the application works as expected with instant translations.

@mtvw I also went back to 1.0.0 and now it works as expected.

Any updates on this issue? Im having a similar issue but when accessing a reverse proxy on my webserver.

Apologies for the delay. I was able to reproduce the behavior you describe in the ngx-translate sample app, and was able to mitigate it by providing the relative path in the protectedResourceMap, e.g.:
export const protectedResourceMap: [string, string[]][] = [
    ["/assets/i18n/*.json", null]
];

Apologies for the confusion, we'll make sure this is better documented. cc: @jo-arroyo

I have the same issue. Adding
 ["/assets/i18n/*.json", null] into protectedResourceMap
doesn't help, app sends requests with appended security token for these resources. Any workaround?


On lend history instead of DoC appear MoC

Hi,
On lend history instead of DoC appear MoC.

Obs. This is on test.sovryn.app. On live.sovryn.app all looks like working ok.


(WIP) Source extraction

This PR introduces the "source extraction" API for Thunder. Source extraction describes the problem of identifying spatially-structured and temporally-coherent sources in spatio-temopral data (for example, neurons in fluorescence imaging data).
An iPython notebook introduces the proposed API and walks through working toy examples.
The key design goals were:

Providing a general, modular framework or "harness" that supports plugging in a variety of existing algorithmic approaches while exposing a simple, high-level interface
Maintaining scalability and performance by distributing core operations where possible using Spark

The design is based on extensive discussions with @pkaifosh, @poolio, @broxtronix  , @logang, @speron, @sofroniewn, feedback welcome from all of them (and from others! ccing @jakirkham @tomsains )
Although the API is new, it uses lots of core functionality we have been building into Thunder (for example, the ability to express Images as distributed Blocks, the ability to extract signals from arbitrary spatial regions in either Images or Series, and new support for JSON serialization).
Summary of key additions:

Source and SourceModel classes for creating, manipulating, saving/loading, and rendering sources
Block based source extraction methods, including algorithms and mergers
Feature based source extraction methods, including algorithms and creators
Two very simple example implementations (a feature method, localmax, and a block method, nmf).

New dependencies:

scikit-image (image morphology processing)
zope.cachedescriptors (lazy property handling)

Outstanding issues:

The trick used to expose keyword arguments at the component level (e.g. for algorithms and mergers) to the top-level factory method does not trigger ordinary keyword argument validation. Open to alternatives, so long as we can still expose a top-level factory method, which has great benefit for ease-of-use.
The BasicBlockMerger is extremely minimal and should be enhanced.
More algorithm-specific unit tests.
More geometric operators and comparators for sources (expand, dilate, overlap).
At least one or two more example methods (let's add one that imports an algorithm from SIMA?)

This is looking nice! One suggestion that I have is to support sequential application of multiple cleaners. I expect that people will commonly wish to combine a few different Cleaners. For example, someone might wish first to merge overlapping ROIs, then to remove ROIs that are below a certain size threshold, then remove ROIs that are not sufficiently round in shape. Someone else might wish to do some, but not all of these operations, as well as some other cleaning operations, such as smoothing the boundaries of the ROIs. This could be done either by allowing a SourceExtractionMethod to have multiple cleaners (e.g. in SIMA, we append post-processing steps), or by designing natural way to compose multiple cleaners into one (e.g. a CompositeCleaner subclass of Cleaner). Making this as natural as possible should encourage the development nice modular Cleaner subclasses that can be usefully combined.

Thanks @pkaifosh ! I think a CompositeCleaner or something like it is a great idea! If it's literally just going to be a list of Cleaners, I'd probably skip the subclass and just allow SourceExtractionMethod to accept a single Cleaner, or a list of Cleaners, as you say. One question: do you think these are typically commutative and associative operations? And if not, is there any checking we should do to ensure they are performed in the correct sequence?

I would not assume these operations to be commutative. For example, filtering ROIs based on a minimum size would have a different effect if done before instead of after merging overlapping ROIs. I would recommend that the operations simply be performed in the order specified by the user's construction of the list of Cleaners. In order that the user specifies should be valid, since the clean method's input and return type are the same, so I don't think there is anything that needs to be checked here.

Great, makes sense, sounds good. So technically a user could request a sequence of Cleaners that, in the order provided, have an unintended result, but I agree, because of the inputs/outputs it will always at least be a "valid" sequence, so it's up to the user to make sure it does something reasonable.

Thanks again for the review, @pkaifosh I added support for sequence of Cleaners, and more generally refactored the cleaning to be a little more generic (as it applies to all of these algorithms) and flexible (as you suggested). Along with several other enhancements and fixes.
I am going to merge this version in, but will create a few issues with simple extensions and enhancements that we should explore next.


Set cpus in code python

Hi,
I want to speed up the face_recognition so i want to use 4 cpus for this process. how can i set it in code.

Hi @emlacuden,
It's not as simple as passing in a parameter. You have to write the code to do multi-processing yourself. The details are going to depend heavily on what exactly you want to do.
You can look at the command-line interface code as an example of splitting up work between cpus. You can also read my article on multi-processing to learn more about how to code this in Python.

Thank you so much for your supported. I have a one more question: Anyway for me to run the face_recognition with cuda under GPU to run faster?

Sure. If you compile dlib with CUDA support, it will take advantage of it automatically for the face encoding step.
The only problem is the face detection step doesn't currently take advantage of it and it's the slowest step in the process. So the speed improvement might not be that great depending on your use case. Dlib also supports a different way of doing face detection that does use CUDA, but it's not currently exposed via python so this library isn't using it yet.


Handle styles that are not direct children of templates correctly

Find the correct spot to add "included" styles in the template by
keeping track of which "concrete" style in the template we have
encountered and inserting the "included" styles before them.
Fixes #4975

Still investigating a few busted cases in Safari 10 and 9

I also like how this adheres more closely to the cascade I'd expect to find when applying something like:
<style include="first-shared-style">
/* styles that override some of the shared styles */
</style>
<style include="second-shared-style-with-more-overrides">
/* a fourth override */
</style>

Thanks for the quick attention to this!


Unable to Export Chatglm3 Model to ONNX Format in Optimum

System Info
Optimum Version: 1.18.0
Python Version: 3.8
Platform: Windows, x86_64

Who can help?
@michaelbenayoun @JingyaHuang @echarlaix
I am writing to report an issue I encountered while attempting to export a Chatglm3 model to ONNX format using Optimum.
Information

[X] The official example scripts
[ ] My own modified scripts

Tasks

[X] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[ ] My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)
optimum-cli export onnx --model THUDM/chatglm3-6b chatglm_optimum_onnx/ --trust-remote-code
Expected behavior
I would expect Optimum to successfully export the chatglm3 model to ONNX format without encountering any errors or issues.

Hi, THUDM/chatglm3-6b is not a Transformers model and the export is expected to fail. Could you share your export log here?

"optimum-cli export onnx --model THUDM/chatglm3-6b --framework pt --task text-generation-with-past ./chatglm_onnx --trust-remote-code"
Above command line is used to export models in ONNX format, but I got error like
"ValueError: Trying to export a chatglm model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as custom_onnx_configs. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type chatglm to be supported natively in the ONNX export."
Actually I am not getting how to do ONNX export, if possible can you provide me steps to follow to export and if available share any scripts to download .
Here is a snippet of export log

Kindly help me in this regards, let me know if you have any concerns


Add javascript between

What steps will reproduce the problem?
https://developers.google.com/+/web/+1button/
Add javascript between
What do you get instead?

Additional info
BaseHtml::jsFile() has empty strings inside

Isn't it invalid to have script within a script tag that also has a src attribute?

http://stackoverflow.com/questions/6528325/what-does-a-script-tag-with-src-and-content-mean#6528343
can't you just add another tag fore the one with src?

I've read it, not sure if it's true. I don't know why Google is using this approach, if anyone has a clue the feedback is welcome. @cebe that's what i am using.

I don't see any examples at Google with both an src & innerHtml. As @Alex-Code states, this is an unexpected practice which we prefer not to implement. You can use Yii's functions registerJs (Yii::$app->view->registerJs) for the innerHTML configuration objections.
This corresponds to Googles examples https://developers.google.com/+/web/+1button/#examples


Documentation cleanup

Coverage increased (+10.61%) to 10.61% when pulling 38885d2e89fc19bd0b0fcdb0a42aaac2ed436650 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+25.6%) to 25.6% when pulling f5b0200fce8bbefbc21681beab5cebf7e755fe31 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+26.34%) to 26.34% when pulling a058db21716cf651e396a81d437c0972f01333fd on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+29.77%) to 29.77% when pulling d3d54dd9b8582066dcaf4ee909065379683905bf on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+34.4%) to 34.4% when pulling 9b271890e3e9fb37d3774ef3c2a65052f9e41e80 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.99%) to 32.99% when pulling 79d58020f21338684ba54852e9ba5730c4ee7b2e on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.66%) to 32.66% when pulling 15eb3ed4737404dbd5db9de554adec093f180d40 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+31.67%) to 31.67% when pulling 41df11f9b378b880f136c7dc0e30c8f465bd3077 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+29.14%) to 29.14% when pulling 9929bca4a42539fb2993dcce598913feb83ad227 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+28.92%) to 28.92% when pulling ad59b535f38a489f87ce259318cdb1beaadea764 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.64%) to 32.64% when pulling dc1ecdcedecfe8305ecc3461ee4673d3a3740b79 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.87%) to 32.87% when pulling 74fa9b08c1ac820c926da9fc2771775340686135 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.87%) to 32.87% when pulling 9e8424a6827d1fcde34eaa5df79e81ef24d96068 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.87%) to 32.87% when pulling 9e8424a6827d1fcde34eaa5df79e81ef24d96068 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.87%) to 32.87% when pulling 9e8424a6827d1fcde34eaa5df79e81ef24d96068 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.64%) to 32.64% when pulling 707d379a6f250ed96a142128f94131bd9ce9445b on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+32.64%) to 32.64% when pulling 707d379a6f250ed96a142128f94131bd9ce9445b on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+34.24%) to 34.24% when pulling abbfb6d6ec5f3a674b928eb837ae19fa8fc0e38f on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+35.97%) to 35.97% when pulling 4f0717ace170ed74317c53f679e1dcb4a7dfbf16 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.18%) to 39.18% when pulling b6110aea5652efe918303c7301ef30ad8c428667 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.15%) to 39.15% when pulling 4c17c52e3791d7ad4883c865e0bb382f33ef7695 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.15%) to 39.15% when pulling 4c17c52e3791d7ad4883c865e0bb382f33ef7695 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.15%) to 39.15% when pulling 087ef22e3986a2a9b97d37e4ffab2d993d874695 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.23%) to 39.23% when pulling af31a995ff4e81603f6aa4908f9ae2ff150276e8 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.23%) to 39.23% when pulling af31a995ff4e81603f6aa4908f9ae2ff150276e8 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+39.23%) to 39.23% when pulling af31a995ff4e81603f6aa4908f9ae2ff150276e8 on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+38.61%) to 38.61% when pulling ffbf3974c8c5df4cc5befa7208626b067861729f on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+38.61%) to 38.61% when pulling ffbf3974c8c5df4cc5befa7208626b067861729f on documentation_cleanup into efe900e6ac8953ff7fa743fc49bdd317927ba830 on master.

Coverage increased (+38.61%) to 38.61% when pulling a37faf307b258a86c2a28fb28513ef88e369e552 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+38.24%) to 38.24% when pulling a37faf307b258a86c2a28fb28513ef88e369e552 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+38.24%) to 38.24% when pulling a37faf307b258a86c2a28fb28513ef88e369e552 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+52.94%) to 52.94% when pulling 8a142ffa363a4483843b01e0c30d726879e6f121 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+71.96%) to 71.96% when pulling 10e06a29f18abcda9071baab098e41299141954e on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+71.89%) to 71.89% when pulling f3e8b268c8ac74e2e4be37e2d609507fefcdd794 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+72.0%) to 72.0% when pulling dfebb5758792799ca011c14908b8bfe12752d66e on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+92.98%) to 92.98% when pulling ca2d688f4c43f495a993e6398e334531884bae3f on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+97.73%) to 97.73% when pulling 808e3fb833f14c66518e566c1405df36c6a2a1ab on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+97.73%) to 97.73% when pulling e30e78685c7b87f0383f11eb5b023e3eee23d110 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+98.25%) to 98.25% when pulling 3bb3d4d1cf892e8c44f36a96614aed0ca5ea5877 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.13%) to 99.13% when pulling 3bb3d4d1cf892e8c44f36a96614aed0ca5ea5877 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.3%) to 99.3% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 311df1d83f4d16a840f8a0cb802cb036b52c8dfd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.47%) to 99.47% when pulling 995a43bee19cea9ee8ac15a951a96d7427f38d1e on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 1e31720a0bbe6f0b56632860dce2b167f75b4897 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 1e31720a0bbe6f0b56632860dce2b167f75b4897 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 1e31720a0bbe6f0b56632860dce2b167f75b4897 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

@kirillseva Haha, thanks. What do you mean, like pretend_now_is?

Phase 2 of this PR is done. Now I just have to re-factor the tower and add literate documentation.

yeah, like timecop. Amazed it didn't exist in testthat?

Didn't look too carefully, but I don't see it.

Coverage increased (+100.0%) to 100.0% when pulling 6e11662d9399f3c39ad107321d568848bfb96993 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 6e11662d9399f3c39ad107321d568848bfb96993 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 6e11662d9399f3c39ad107321d568848bfb96993 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 074ff40771b2ab88872fedfc8013d54686bcb067 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 121f39f50dabe079afb0f6696e8166eb4bbba840 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 121f39f50dabe079afb0f6696e8166eb4bbba840 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 121f39f50dabe079afb0f6696e8166eb4bbba840 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 8892a265791f93c644ff8f1729f3fb46c86c7741 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 1da1d0e30193b38036d591f315aea0f3172f1d67 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling da6ae65c60f50daef4a9715317fe961a0dba46da on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 78b35f7efbac63abb05cd560d574c04e27be14ae on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling c53648900aa03f6a29b900c2cdb5270a59d1a6f1 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling c53648900aa03f6a29b900c2cdb5270a59d1a6f1 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling c53648900aa03f6a29b900c2cdb5270a59d1a6f1 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling c5cb32e6763e51b7d5338116724bba5b9b5407e4 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling f397a83b68fb54c124faacbcfa69739e0b881b9a on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 54aef513017ab8fddbb39ec6d351288977bbb1fd on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling ebd59a14b37c05ab061303ac43500c5c40b8b09e on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling a65467327374d6172d5f9ad4cc824f64ffa3ac15 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling a65467327374d6172d5f9ad4cc824f64ffa3ac15 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 4aeed673ff4ad57435223dba81bdd16b05e1b369 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling d6c9976e914ed1c813b6e2cee2c2e2129250ca7d on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling d6c9976e914ed1c813b6e2cee2c2e2129250ca7d on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling ced5c042a59ce4284ce2ca6256eb49e0bd74b035 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 27f1d9ac817980aaf10bd7026b75de0ef671e08c on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 166f874652b5df01519ab0ba172e17887d96b1e5 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 166f874652b5df01519ab0ba172e17887d96b1e5 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling 166f874652b5df01519ab0ba172e17887d96b1e5 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling e59e84342304c5ee424ff3b7087ac547c3c3ac22 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+100.0%) to 100.0% when pulling f6f3f0783f88d30137c4d24b503c528876d90661 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.

Coverage increased (+99.85%) to 99.85% when pulling be5c70c893b3e1fabcfbbdec4b82ef81b58d9e04 on documentation_cleanup into 1e596079d5f92117b0b6264ca658921e625bd371 on master.


This is very much a wip - I've tested parts of this with user triggers, but it needs some in-game testing (which I can't do right now because servers are down).  I'm planning to add a trigger for Fresh Puff 3 (2 puffs with effects, 6 "washed" away).  I realistically won't be able to get back to this until Thursday at the earliest though, so I'm throwing this up now in case someone else has a chance to play around with it or comment before then.
For Fresh Puff 2, the predominant strat I've seen is this.  There is an uptime strat for boss = ice, puffs = cardinals, but it requires coordinated movement between the two players with lightning puffs.  One option is to provide a shorter alert for that scenario without a resolution suggested, but it would be inconsistent with the rest of the trigger.  And the rest of the resolutions are pretty standard (or the only possible resolution).  So I tried to compromise by creating output strings that users could easily modify for this scenario, but.... yeah, definitely open to feedback.

For Fresh Puff 2, the predominant strat I've seen is this.

Personally, I've seen another strategy being used more commonly (probably the uptime one you referred to).  This mechanic is going to be tough to call because there are various "correct" ways to solve it, but they rely on everyone following the same plan and fall apart when players follow different plans at the same time.  This might need to be an optional trigger that is disabled by default, like the TEA Wormhole strategy.

This mechanic is going to be tough to call because there are various "correct" ways to solve it, but they rely on everyone following the same plan and fall apart when players follow different plans at the same time. This might need to be an optional trigger that is disabled by default, like the TEA Wormhole strategy.

I'll give some more thought today to the various options here and try to summarize them for discussion.

If there were a set of basic callouts that indicated the boss action (blue cross or green donut) along with the puff spawn pattern (cardinals or intercardinals) it could be left up to the user to customize the call so it matches their preferred strategy.  E.g., if the default call is something like "boss intercard safe + intercard puffs" and the user changes it to "pull puffs diagonally to corners + stand between yellow and boss" to match the strat diagram you linked for that combination.

If there were a set of basic callouts that indicated the boss action (blue cross or green donut) along with the puff spawn pattern (cardinals or intercardinals) it could be left up to the user to customize the call so it matches their preferred strategy. E.g., if the default call is something like "boss intercard safe + intercard puffs" and the user changes it to "pull puffs diagonally to corners + stand between yellow and boss" to match the strat diagram you linked for that combination.

I batted it around today, and landed the same place you did.  Not as useful out of the box, but avoids giving incorrect info if a person is using a different strat.  I do think it makes sense to call the boss and then the user's specific tether location/color, rather than just generally "cardinal puffs" or "intercard puffs."  And then have separate output strings for all 8 boss+puffcolor+location combos to let the user fully customize for their strat.  So like:
        bait: {           en: '${boss} - ${dir} ${puff}',         },         bossIce: {           en: 'Boss Blue (intercard safe)',         },         bossWind: {           en: 'Boss Green (middle safe)',         },  [...]         bossIceBlueCardinalPuff: {           en: 'Blue Puff (bait)',         },         bossIceBlueIntercardPuff: {           en: 'Blue Puff (bait)',         }, [...]
Still not expecting to be able to test this until Thurs, so staying wip for now.

OK, this should be ready for merge consideration.  Added Puff 3, cleaned up some trigger conflicts, and tested in-game.
@xiashtra  I haven't popped into savage yet, so wondering if maybe you have logs or could confirm some ID changes in savage?  The ones we'd need to map (or confirm haven't changed are):
Abilities:

7766: 'Fresh Puff' (from Silkie)
775E: 'Slippery Soap' (from Silkie)
776E: 'Brim Over' (from Eastern Ewer)
776F: 'Rinse' (from Eastern Ewer, repeated; sometimes targets Silken Puff)

Effects (Silken Puffs):

CE9: 'Bracing Suds'
CEA: 'Chilling Suds'
CEB: 'Fizzling Suds'

I'm happy to incorporate these revisions into the savage trigger file with this PR, or defer to you if you prefer to do so.

OK, this should be ready for merge consideration. Added Puff 3, cleaned up some trigger conflicts, and tested in-game.
@xiashtra I haven't popped into savage yet, so wondering if maybe you have logs or could confirm some ID changes in savage? The ones we'd need to map (or confirm haven't changed are):
Abilities:

7766: 'Fresh Puff' (from Silkie)
775E: 'Slippery Soap' (from Silkie)
776E: 'Brim Over' (from Eastern Ewer)
776F: 'Rinse' (from Eastern Ewer, repeated; sometimes targets Silken Puff)

Effects (Silken Puffs):

CE9: 'Bracing Suds'
CEA: 'Chilling Suds'
CEB: 'Fizzling Suds'

I'm happy to incorporate these revisions into the savage trigger file with this PR, or defer to you if you prefer to do so.

7766 => 7789
775E => 7781
776E => 7791
776F => 7792
CE9, CEA, CEB no change (status effects seem to be the same between normal and savage in general)

7766 => 7789 775E => 7781 776E => 7791 776F => 7792
CE9, CEA, CEB no change (status effects seem to be the same between normal and savage in general)

Thanks, much appreciated!

Updated with savage triggers/changes.

@quisquous Any comments or concerns on this one?

Looks good in general, one tiny comment.  Sorry for the delay in getting back to this.

Looks good in general, one tiny comment. Sorry for the delay in getting back to this.

No worries!


@warn instead of @assert

use the postsolve solution only when it is smaller than the incumbent
add keyword max_fw_iter_postsolve
warning if tree.lb > primal - dual_gap

other than the x_raw (optional to remove it in this PR) looks good, can be merged

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@88b8da8). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #112   +/-   ##
=======================================
  Coverage        ?   68.67%
=======================================
  Files           ?       12
  Lines           ?      964
  Branches        ?        0
=======================================
  Hits            ?      662
  Misses          ?      302
  Partials        ?        0

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Images and a chart

Now that I've got k8s-prometheus-adapter up and working, I am utterly convinced of its necessity.
However, getting it working wasn't straightforward as the linked example is a bit old, and I was lacking in some prometheus and kubernetes-investigation skills that I have learned along the way.
I think two things would help to make k8s-prometheus-adapter easier to get going with:

Official images built and made available on quay/dockerhub/other.
A helm chart added to https://github.com/kubernetes/charts

This would give any docs/walkthroughs something to work from (eg, "this walkthrough uses chart version x and image version y") to reduce any version-related snafus.
Given that I think I have the basis of a working chart (I started with https://github.com/madeden/charts/tree/master/custom-metrics-apiserver and have tinkered), I think I can be useful there. Also, I'm keen to document my findings somewhere useful, probably by adding bits to the walkthrough. (In particular, how to get this working with metrics from the nginx-ingress-controller).
However, without images, the above becomes rather tricky. I notice that https://hub.docker.com/r/directxman12/k8s-prometheus-adapter-amd64/tags/ does have a quite recent "latest", but nothing else. Even just tagging with the Git SHA would be super useful.
Once those images exist, I'd been keen to contribute a chart to the charts repo, and update the walkthrough accordingly (for anyone using helm).

There are official images built by the CI (directxman12/k8s-prometheus-adapter-${ARCH}), but there was a hiccup in that (as you noticed) due to an issue with what appeared to be github rate limiting.  I'll tag another release to trigger another tag.
I'd be happy to have an official chart submitted, let me know if you submit a PR.  I'd also love any contributions to the walkthrough :-).

I've submitted a Helm chart to to charts/incubator: https://github.com/helm/charts/pull/7159

@DirectXMan12 I think this issue can be closed now. prometheus-adapter is now in the official chart repository under stable/prometheus-adapter.

Amazing stuff.
Yup, I agree this can now be closed.
Perhaps worth adding a link to that in the docs somewhere, but I guess this issue sort of achieves that anyway.


Can not Install: Missing query-engine-debian-openssl-1.1.x

Env info:
Running Ubuntu 18.04 in Windows 10 WSL 2.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

Globally installed prisma2:
<EMAIL_ADDRESS>binary version: f608db3b9e4f50f9a384356e532357b0a525969a
package.json
  "devDependencies": {
    "prisma2": "^2.0.0-preview022",
    "ts-node": "^8.6.2",
    "typescript": "^3.7.5"
  },
  "dependencies": {
    "@prisma/client": "^2.0.0-preview022"
  }

Error
><EMAIL_ADDRESS>postinstall [project]/node_modules/@prisma/client
> node scripts/postinstall.js

Error: Error: Command failed with ENOENT:[project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable_raw_queries cli
--dmmf
spawn [project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT

Reproduce:
Run: npm install
><EMAIL_ADDRESS>install [project]/node_modules/prisma2
> node download-build/index.js

> Downloading Prisma engines for debian-openssl-1.1.x [====================] 100%

><EMAIL_ADDRESS>postinstall [project]/node_modules/@prisma/client
> node scripts/postinstall.js

Error: Error: Command failed with ENOENT:[project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable_raw_queries cli
--dmmf
spawn [project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT
npm WARN<EMAIL_ADDRESS>No repository field.

added 11 packages from 42 contributors and audited 11 packages in 7.457s
found 0 vulnerabilities

You can see debian-openssl-1.1.x  was apparently saved successfully but after the operation, I do not see it in the node_modules/prisma2 directory:
[user]@DESKTOP: [project]/node_modules/prisma2$ ls -lah
total 12K
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 .
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 ..
-rwxrwxrwx 1 [user] [user]     1.1K Oct 26  1985 README.md
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 build
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 download-build
-rwxrwxrwx 1 [user] [user]      4 Feb 18 17:22 download-done
-rwxrwxrwx 1 [user] [user]      4.1K Feb 18 17:22 package.json
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 prisma-client

Running as sudo will produce the same error.

Quickly tried to reproduce this on WSL (1), and could not - there the binaries were successfully downloaded and a Prisma Client could be generated with the steps mentioned in https://github.com/prisma/prisma2/blob/master/docs/getting-started/start-from-scratch-with-empty-db/quickstart-prisma-migrate.md (which you linked to in Slack).
@pantharshit00 please try to reproduce this with WSL2 (https://docs.microsoft.com/en-us/windows/wsl/wsl2-install).
(@KyleTryon If you are not depending on WSL, Prisma works fine in normal Windows. It will download different binaries, that should work just fine. Maybe that is a temporary workaround for you.)

I uninstalled ubuntu and reinstalled it for a fresh WSL 2 box and tried again. This time I got a different error, then re-ran the installation with no error shown.
user@DESKTOP:[project]$ sudo npm install

><EMAIL_ADDRESS>install [project]/node_modules/prisma2
> node download-build/index.js

> Downloading Prisma engines for debian-openssl-1.1.x [====================] 100%

><EMAIL_ADDRESS>postinstall [project]/node_modules/@prisma/client
> node scripts/postinstall.js

GeneratorError: Error: EPERM: operation not permitted, copyfile '[project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x' -><EMAIL_ADDRESS>    at GeneratorProcess.handleResponse ([project]/node_modules/prisma2/build/index.js:2:177310)
    at LineStream.<anonymous> ([project]/node_modules/prisma2/build/index.js:2:176926)
    at LineStream.emit (events.js:321:20)
    at LineStream.EventEmitter.emit (domain.js:485:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:273:9)
    at LineStream.Readable.push (_stream_readable.js:214:10)
    at LineStream.Transform.push (_stream_transform.js:152:32)
    at LineStream._pushBuffer ([project]/node_modules/prisma2/build/index.js:2:840724)
    at LineStream._transform ([project]/node_modules/prisma2/build/index.js:2:840543) {
  code: -32000,
  data: null
}

You can now start using Prisma Client in your code:

'''
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()
'''

Explore the full API: http://pris.ly/d/client

^C
user@DESKTOP:[project]$ sudo npm install
npm WARN<EMAIL_ADDRESS>No repository field.

audited 11 packages in 0.47s
found 0 vulnerabilities

user@DESKTOP:[project]$

Everything is now working fine 👍  Was able to run:
npx prisma2 migrate save --name 'init' --experimental
npx prisma2 migrate up --experimental
npx prisma2 generate
npx ts-node index.ts

Thanks everyone 🙏

Hm, we might want to investigate this anyway - the EPERM error also is not the best experience ;)

sudo npm i -g prisma2

Same problem on ArchLinux.

Same problem inside docker
Error: Error: Command failed with ENOENT: /app/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable-raw-queries cli dmmf
spawn /app/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT

Also on Windows an WSL @unlight? If not, please open a new issue and include all available information so we can try to reproduce this.

Can you all please try again with the latest version preview024?

@pantharshit00 The preview024 is also broken with docker. It gives the same error.

@krn0x2 Can you please your dockerfile here?

same issue for alpine 3.11 and 2.0.0-preview024 and 2.0.0-preview025:
$ cat Dockerfile:
RUN apk add --no-cache --virtual .build-deps \
		build-base \
		git \
		python \
	&& apk add --no-cache \
		nodejs-current \
		nodejs-npm \
		openssl \
	&& npm install \
	&& apk del .build-deps

docker build and docker run:
Error: Error: Command failed with ENOENT: /houston/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable-raw-queries cli dmmf
spawn /houston/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>build: `npx prisma2 generate && babel src -d dist --copy-files`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-03-27T15_10_42_738Z-debug.log

node -v
v13.8.0
npm --version
6.13.7

cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.3
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

openssl version
OpenSSL 1.1.1d  10 Sep 2019

@pantharshit00  please take a look ^

if i add to my dockerfile:
# Download and install glibc
RUN apk add --update curl && \
	curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
	curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" && \
	curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" && \
	apk add glibc-bin.apk glibc.apk && \
	/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \
	echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
	apk del curl && \
	rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*

from https://github.com/prisma/prisma2/issues/702#issuecomment-569778198
it works!

@andriisoldatenko We do not compile for alpine yet so I would advice you to use a different docker image.

I tried andriisoldatenko suggested above with node:12-alpine, however doesn't work for me.

@pantharshit00 I tried node:slim, it works for my nodejs app with prisma2. However, the image is still kind of big. Is there a way that node:apline could work for nodesjs app with prisma2 Docker build? What missing dependices should I add?
For node:12-alpine, my Docker build got error:
Step 27/31 : RUN npx prisma2 generate  ---> Running in fb0918ffb9ed Error: Error: Command failed with ENOENT<EMAIL_ADDRESS>--enable-raw-queries cli dmmf spawn<EMAIL_ADDRESS>ENOENT The command '/bin/sh -c npx prisma2 generate' returned a non-zero code: 1
I even added
RUN apk update && apk add openssl
at step 22.

@yleigh You will need to add glibc as binaries are based on that. Alpine only comes with musl and rust with musl is not that straight forward so it may take some time for us to release alpine support so no timeline on that.
A community member posted steps that worked for them here: https://github.com/prisma/prisma/issues/702#issuecomment-569778198
or you can compile the binaries for Alpine as one of the other community members did: https://github.com/prisma/prisma/issues/702#issuecomment-599121308

Also having the same issue inside node:13 and node:13-slim

@Tenkir Can you please share your Dockerfile?

Getting the same issue, it's trying to download musl-openssl-1.1.x from this url: https://binaries.prisma.sh/master/afd294205618b1c825b013ba6f5a6ebe4aa4a514/musl-openssl-1.1.x/query-engine.gz but the url returns NoSuchKey error

With node:slime, in Dockerfile I added this and fixed the issue:
RUN apt-get -qy update && apt-get -qy install openssl

I am tested this out and it works:

I used the following Dockerfile:
FROM node:12-alpine

ENV DEBUG *

RUN npm install -g @prisma/cli

RUN prisma version

Also, the binaries are not stored at https://binaries.prisma.sh/master/afd294205618b1c825b013ba6f5a6ebe4aa4a514/musl-openssl-1.1.x/query-engine.gz that scheme is wrong. Url from the correct schema: https://binaries.prisma.sh/master/0c2ec197653b278b2978845ef958db88824cd82e/linux-musl/migration-engine.gz

I have the same issue in nixos
when trying to run npx prisma migrate save --name init --experimental
Error: Get config Error: Command failed with ENOENT: [project<EMAIL_ADDRESS>cli get-config
spawn [project<EMAIL_ADDRESS>ENOENT

@husseinraoouf, Please open a new issue with possibly a reproduction and details about your OS

same issue in docker
dockerfile
Error Message
root@8bcd4d7dfab7:/usr/src/app# sudo npx prisma generate Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Error: Get config<EMAIL_ADDRESS>error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
`
FROM node:10.20.1-slim@sha256:05d1d270480b6e99753076b6656bb5a37edb7ca31af20c008568a556bc82d2a8
RUN  apt-get update
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV PATH=/usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install --silent
COPY prisma /usr/src/app/prisma
COPY . /usr/src/app
EXPOSE 4001
CMD npm run start:dev
`

Closing as old.
Please open a new issue if you experience this with a more recent version of Prisma.

In my case arch these commands helped:
rm -rf node_modules
npm i
npx prisma generate

Downloading Prisma engines for Node-API for debian-openssl-1.1.x [                    ] 0%Error: request to https://binaries.prisma.sh/all_commits/ceb5c99003b99c9ee2c1d2e618e359c14aef2ea5/debian-openssl-1.1.x/prisma-fmt.gz.sha256 failed, reason: unable to verify the first certificate
Still not resolved in prisma version 4.9.0, Ubuntu 20.04.5 LTS

@saharshg I think I might be able to help you, but could you open a new issue here first?
Please make sure to mention your Node.js version and environment info in the template.


New structure

First code splitting. I've organized the functions as it follows:

main.sh.in: core functions and top-level stuff.
pkgs.sh.in: package related functions.
deps.sh.in: dependency related functions.
cache.sh.in: cache related functions.
info.sh.in: info related functions.
utils.sh.in: utility functions like messages, etc.
checks.sh.in: group all checkings together.

I've sourced all theses files from the main script. If you want to test it locally you can change functiondir from /usr/share/pacaur to ./libpacaur. Obviously PKGBUILD must be changed to properly install pacaur with these changes.
I need some feedback about this organization.

My only complaint so far is that the .in extension is specific to cmake (as stated by Alad in #443), which doesn't make sense here. Could you rename these files? Then it's all green for me.

Done!

I think you also need to adjust the main pacaur file for new paths :)

I was fast... nobody saw it. :P


Run pluralize on only the last segment of a name

Fixes https://github.com/graphile-contrib/pg-simplify-inflector/issues/21.
"For any special cases in pluralize, if your table name contains more than one word they will get pluralized incorrectly. For example the table species would show up in the schema as singular type Species, but the table plant_species would show up as type PlantSpecy."
After this PR, pluralize and singularize will only be run on the final segment of a word, so special cased words will return proper results.

@benjie I think the current schema.graphqls are outdated, running test.sh on master gives quite a few changes to the output schema


iptables: No chain/target/match by that name.

I get the following warning/error after running cd /opt && git clone https://github.com/ab77/netflix-proxy.git && cd netflix-proxy && ./build.sh on Ubuntu 14.04 x64 droplet on digitalocean:
WARNING: enabling DNS recursion...
allow-recursion { trusted; };
recursion yes;
additional-from-auth yes;
additional-from-cache yes;
/opt/netflix-proxy /opt/netflix-proxy
iptables: No chain/target/match by that name.

I solved the issue by installing docker on digitalocean droplet


safe-vested: cache allocations

It loads the allocations JSON once and stores a trimmed version in cache using a global variable inside the strategy file.

@ChaituVR here is the subsequent PR, that implements the optimization the way we agreed on


Open (SetCommState): The parameter is incorrect

"serialport": "^6.2.0"
NodeJS Version: 8.9.4
Operating System and Hardware Platform: Windows 10 / STM32F

Summary of Problem
I am getting the following error when I try to open a port to communicate with a STM32F microcontroller through usb.

Steps and Code to Reproduce the Issue
Here is the code that sets the parameters and tries to open the port.

I'm able to communicate with the usb device using a serial terminal communication software such as Termite and hercules. However, when I try to use my nodeJs application with node-serialport I get the mentioned error on Windows 10, but it works fine on Windows 7.
Does anybody know a work around this issues?
Thanks in advance.

I have this same issue.

Ok here is how to reproduce. On your USB device, make the mistake of setting the databits to 0 and say parity to 8. I.e. its not a supportable setup. For this badly configured device, windows serialport detects it in the get line encoding and then fails as above. Once I had corrected the device's default line encoding, it just works. OSX was not sensitive to this, just windows.

I had the same issue and it was solved according to the following link:
https://community.st.com/s/question/0D50X00009XkfnjSAB/problem-solved-with-usb-cdc


JUST FOR TEST

Coverage increased (+29.0%) to 75.0% when pulling f308eb93ab6789896a480ea68b0b192c14f7b186 on yiyi/test_vscode_ci into bf872480e952a59b418c707827aef55ea66861e9 on master.

Coverage increased (+29.0%) to 75.0% when pulling f308eb93ab6789896a480ea68b0b192c14f7b186 on yiyi/test_vscode_ci into bf872480e952a59b418c707827aef55ea66861e9 on master.

Coverage increased (+29.0%) to 75.0% when pulling f308eb93ab6789896a480ea68b0b192c14f7b186 on yiyi/test_vscode_ci into bf872480e952a59b418c707827aef55ea66861e9 on master.


hit enter when running listr will get the same duplicated output as using console.log

I don't think we can actually do something about that. Have to check though if the enter could be catched by log-update.
@sindresorhus Any ideas?

I have looked into log-update, it has the enter pressing problem.
And I tried to fix it by adding this before running a listr:
const keypress = require('keypress');
const stdin = process.stdin;
keypress(stdin);
stdin.setRawMode(true);
stdin.resume();
stdin.setEncoding('utf8');
stdin.on('keypress', (ch, key) => {
	if (key && key.ctrl && key.name === 'c') {
		process.exit(0); // should mimic `<ctrl>-c`
	}
});
// should setRawMode to false after listr

I am looking for a better solution.

Yes, you would have to enable raw mode, which disables all other default behavior. I don't think it's worth doing that.

I agree with Sindre. If someone presses enter, then he presses enter. It's really an edge case and doesn't appear on normal use.

Actually, I am not expecting someone to mess up listr rendering. I think I am just gonna add this feature into my own project. Thanks for your advices.


SAMZA-1790: LocalContainerRunner should not extend AbstractApplicationRunner.

LocalContainerRunner is the launcher for the process running SamzaContainer in YARN. It extends the AbstractApplicationRunner since the container was using ApplicationRunner#getStreamSpec to create StreamSpecs from config to create the High Level API DAG. It doesn't implement any of the other APIs from the ApplicationRunner.
With SAMZA-1659 and SAMZA-1745, SamzaContainer no longer needs access to StreamSpec to create and execute the High Level API DAG. We can now clean up the LocalContainerRunner implementation so that it doesn't need to implement the ApplicationRunner interface.

cc. @nickpan47 @vjagadish1989 @xinyuiscool for review.

Just to confirm, this is not the intended end state of the container runner main, simply a step to rewind the hack we did before, right? SAMZA-1168 talks about launching StreamProcessor in container. In the end state, we want a proper implementation of application runner to launch the StreamProcessor in the container process, with start(); and waitForFinish(). Could you open a JIRA to track the end state of the container refactor effort?
Otherwise, lgtm. Thanks!

@nickpan47 Right, this is just to undo the "extends ApplicationRunner" and revert to a clean state, as a simple SamzaContainer runner process. We should still move towards using StreamProcessor in YARN as well. We can use "SAMZA-1168: Migrate yarn local runner to use StreamProcessor" to track that.


FR: Provide example code snippets for using AA-SDK with different signer types

Is your feature request related to a problem? Please describe.
It's hard to understand how we can use the SDK with different signer types. Currently I've only seen EOA signer being used.
Describe the solution you'd like
Would be great if we can get code snippets in Readme or in an "example scripts" folder on how to use it with other signer types. Preferably examples for these signers:

Passkeys
Social ( OAuth)
JWT
Auth0
Magic
Web3Auth
Privy
Dynamic
Portal
Turnkey
Rollup
Fireblocks

For anyone following this, this will be included with the docs site that's shipping soon

This issue is mostly done actually! we're sourcing docs from the various signer providers and having them write their own within our docs site. I'll close this issue this week once we merge our staging branch into this one


Added CD release notes 1.57.x

Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.
Description

Please describe your changes: __________________________________
Jira/GitHub Issue numbers (if any): ______________________________
Preview links/images (Internal contributors only): __________________

PR lifecycle
We aim to merge PRs within one week or less, but delays happen sometimes.
If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.
PRs must meet these requirements to be merged:

[ ] Successful preview build.
[ ] Code owner review.
[ ] No merge conflicts.
[ ] Release notes/new features docs: Feature/version released to at least one prod environment.

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

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66ed23fc36cd16f6655426fd--harness-developer.netlify.app

We need to add the following to the release notes:

https://harness.atlassian.net/browse/PIPE-20617

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66f16bec33a5bb0d6e3d37cb--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66fa677d31b2171bb2c45e40--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://66fa678d44839c07289cb713--harness-developer.netlify.app


Get an error when query to ABAP CDS contains read by association

Hello!
I've used ABAPCleaner for last 3 months and that is super cool tool thank you a lot!
I found one bug when I tried to clean/format piece of code which contains select by association in ABAP CDS view.
Error you can see at the screenshot

I can't refactor this command it is usual read by association for me.
Maybe somebody can suggest how to refactor such code, but I think that is a bug.

Hi Kronrir,
thanks for opening this issue! Actually this error is just about the colon ":" inside the brackets [ ... INNER : WHERE ... ], so "refactoring" would simply mean to remove this colon, getting [ ... INNER WHERE ... ].
With such a colon, you could do things like this:
    CONSTANTS lc_id1 TYPE s_conn_id VALUE '1234'.
    CONSTANTS lc_id2 TYPE s_conn_id VALUE '5678'.

    SELECT \_spfli[ (1) INNER WHERE :
         connid > @lc_id1 ]-connid AS connid FROM demo_cds_assoc_scarr AS scarr INTO @DATA(result1),
         connid < @lc_id2 ]-connid AS connid FROM demo_cds_assoc_scarr AS scarr INTO @DATA(result2).
        " do something with result1 and result2
      ENDSELECT.
    ENDSELECT.

So you'd have one opening [, but two closing ], and one SELECT, but two ENDSELECT, and that would be very hard for ABAP cleaner to process (and for humans to read).
However, strictly speaking, in this case, the colon doesn't harm so much, because there is no comma, therefore it is just a "chain with one element" and the opening bracket is only closed once. I shall adjust ABAP cleaner to accept these cases. Nevertheless, I think there is no reason to have this colon here.
Kind regards,
Jörg-Michael

Ok, agree with you in this case I reworked query and read data directly from CDS which is associated from root CDS, that was not a problem.
It will be nice if ABAP cleaner can process that colon correctly because sometimes read by association very helpfull.
Thank you.

Hi Kronir,
I am not sure whether I understand you point: How does removing the chain colon change the way how data is read here? From what I see in the ABAP documentation on attributes in Path Expressions, there is no need to put a colon between INNER and WHERE.
Kind regards,
Jörg-Michael

Hi Kronrir,
thanks again for bringing this up – in version 1.7.0, which was just released, ABAP cleaner now "tolerates" chain colons inside of parentheses and brackets if no comma is found (i.e. in "chain of one" cases), so your example above wouldn't trigger a "parse error" anymore.
Kind regards,
Jörg-Michael


Terminal task runner opens new cmd.exe window when run on a windows machine

Change version to 2.0.0 in tasks.json
Run a build using Ctrl+Shift+B on a windows machine
Result:
VS code opens a new cmd.exe window like it is trying to exec something
Expected:
It shows the output in the built-in terminal "window" at the bottom of the VS code window
It is really frustrating to have this build window pop up and then go away when the build is done and even worse that I don't get any of the output from it because the window goes away and the built-in terminal "window" only shows the text "Press any key to close the terminal"

VSCode Version: Code 1.11.2 (6eaebe3b9c70406d67c97779468c324a7a95db0e, 2017-04-13T08:03:11.395Z)
OS Version: Windows_NT ia32 10.0.14393
Extensions:

Extension
Author
Version

EditorConfig
EditorConfig
0.6.2

tslint
eg2
0.8.1

Steps to Reproduce:

@artsterb what's in your settings.json?

@artsterb and please provide the tasks.json as well.


The GoogleARCore plugin (https://github.com/google-ar-unreal/UnrealEngine.git)  disappeared

Please try using this URL instead, and let me know how it goes: https://github.com/google-ar/arcore-unreal-sdk


CUDNN 5.1 Speedup?

The CuDNN download page says that CuDNN 5.1 is supposed to give a 2.7x speedup for VGG style convnets. However, simply by downloading, extracting and keeping CuDNN 5.1 files in the path, and re-running luarocks install cudnn, I am unable to observe any speedup.
cudnn.version gives me 5103, but on a Titan X(Maxwell), I fail to see any speedup. Is it only for the newer generation(Pascal) of GPUs?

@dasguptar do you set cudnn.benchmark = true ? be careful with 5.1 and benchmark mode, the new fast algorithms can hurt accuracy.

@szagoruyko without cudnn.benchmark = true and/or cudnn.fastest=true, I get speeds that are slower than CuDNN 5.0. Otherwise, I get pretty much the same speed as with CuDNN 5.0. I thought the newer CuDNN was supposed to give a speedup for VGG style convnets.. :open_mouth:
P.S. A tangential question, but why do the fast algorithms hurt accuracy?

@dasguptar cudnn.benchmark = true is enough, no need for fastest. See cudnn 5.1 manual for explanation why.

@szagoruyko , hmm, thanks for the pointers, but this still doesn't explain my original question.
Why might I not be seeing any speedup using CuDNN 5.1? Is it because I'm on a Maxwell card?

I have old benchmarking data laying around. For vgg_a from convnet-benchmarks it was 475 ms on cudnn v5 and 348ms on cudnn v5.1 on Titan X. You have to use NONFUSED_WINO algorithm to get 348 ms, and that requires setting cudnn.benchmark=true. 2.7x claim compares cudnn v4 on K40 and cudnn v5.1 on M40 (same thing as Titan X, basically). If you are comparing the same hardware, performance gains are more modest.

@dasguptar Hi, I've been training my model with
cudnn.fastest = true
cudnn.benchmark = true

And recently I could not repeat my results anymore (the results are much worse than before). Is it possible because of the upgrade of Torch and CUDNN 5.1? I'm currently using the newest version of torch and cudnn 5.1.
I'm not very familiar with cudnn.torch. Would you please give me some advice? Thank you!


Initial Foundry integration

As mentioned in #105, this allows for:

tests to be written in either Solidity or JS (I have ported the FreeCollectModule tests so far)
deployment scripts to be written Solidity and can be run with forge script + anvil to get a local environment (although that still requires a bit more polish)
CI to also run forge test

Obviously all of the Hardhat tooling still works. This provides a way to slowly move to Foundry or to get the best of both worlds.
There was sufficient interest from Twitter so figured I'd open the PR :)

Madness, great work!
Won't be merging this just yet as we have some things in the pipeline to cover first, but this is a sick PR!

Great contribution @devanonon - Thanks! :herb:

This is an amazing contribution-- we're currently working on something similar, so to avoid merge conflicts and the like, closing this now.
Thanks a ton for your contribution to the Lens Protocol @devanonon, your engagement is amazing and happy to work with you further!


Issue with AzCopy in automated program

I keep getting the same error when I try to automate the azcopy process.
"failed to parse user input due to error: the inferred source/destination combination is currently not supported. Please post an issue on Github if support for this scenario is desired"

My goal is to create a python script that will automatically transfer data when I run it. The SAS that I am using is not expired and I am unsure of the issue. Everything I have commented out is something I have tried to fix it.
My Code:
import subprocess
import os
import sys
#Works oncommand line by manually writing command, but not in program.
try:
    #key = input("Please insert SAS: ")
    key = 'SASKEY'
    #file_path = input("Please insert the full file path where the data is located: ")
    container = "container_name"
    #exepath = "azcopy"
    local_dir = "/dir/subdir"
    endpoint = "https://myblob.blob.core.windows.net/"+container

#Subprocess that performs data transfer to storage from the desired path
    #myscript="azcopy" + " cp " + "\""+ local_dir + "\" " + "\""+endpoint + key + "\"" + " '\"'"
    #print(myscript)
    #subprocess.call(myscript)
    #command = 'azcopy'+' cp '+'\"'+local_dir+'\" '+'\"'+endpoint+key+'\" '+'--recursive=true'
    #print(command)
    #print(['azcopy', 'cp','\"'+local_dir+'\"', '\"'+endpoint+key+'\"', '--recursive=true'])
    #exit(0)
    #subprocess.call(command)
    subprocess.call(['azcopy', 'cp', '"/home/dir/subdir/"', '"https://myblob.blob.core.windows.net/container?[SASKEY]"'])#,'\"'+local_dir+'\"', '\"'+endpoint+key+'\"', '--recursive=true'], stderr=subprocess.STDOUT)
    print('Transfer Complete.')

#Exception for exit error
except subprocess.CalledProcessError as e:
     raise RuntimeError("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
#Exception for EOF error, would be caused by missing token
except EOFError as error:
    print('Error with token')
#When an unexpected error has occured.
# except Exception as e:
#     print(str(e) + 'Unknown error has occured')
exit(0)

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

ID: 15911160-5ba2-fb0a-0b24-16b3857e20ce
Version Independent ID: d925bc9f-f825-2f82-168c-6c30d716b9ce
Content: Copy or move data to Azure Storage by using AzCopy v10
Content Source: articles/storage/common/storage-use-azcopy-v10.md
Service: storage
Sub-service: common
GitHub Login: @normesta
Microsoft Alias: normesta

@buzzkillionair please provide the link to the documentation you are following so we can better assist.

@MicahMcKittrick-MSFT  https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 is what I followed and then I used the help function within azcopy.

Thanks for that. I have assigned this to our storage engineer to look into further.

@buzzkillionair  Apologies for delay in responding here! I'd recommend posting your question in https://azure.microsoft.com/en-in/support/community/ since it's not directly related to the documentation. We'll follow up there. We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.