cannot create tap device: ioctl: device or resource busy

Hello! I'm trying to run wsl-vpnkit on our company laptops (which use multiple VPNs on the host), but I'm encountering the following issue:
+ VPNKIT_GATEWAY_IP=<IP_ADDRESS>
+ VPNKIT_HOST_IP=<IP_ADDRESS>
+ VPNKIT_LOCAL_IP=<IP_ADDRESS>
+ TAP_MAC_ADDR=5a:94:ef:e4:0c:ee
+ VMEXEC_PATH=/app/wsl-vm
+ GVPROXY_PATH=/app/wsl-gvproxy.exe
+ TAP_NAME=wsltap
+ CHECK_HOST=example.com
+ CHECK_DNS=<IP_ADDRESS>
+ DEBUG=0
+ set +x
+ WSL2_TAP_NAME=eth0
+ WSL2_GATEWAY_IP=<IP_ADDRESS>
+ '[' 0 -eq 0 ]
+ set +x
ioctl(TUNSETIFF): Resource busy
ioctl(TUNSETIFF): Resource busy
RTNETLINK answers: File exists
starting vm and gvproxy...
ERRO[0000] cannot create tap device: ioctl: device or resource busy
started vm and gvproxy
ERRO[0001] cannot create tap device: ioctl: device or resource busy
check: ✔ ping success to IPv4 WSL 2 gateway / Windows host (<IP_ADDRESS>)
check: ✔ ping success to IPv4 Windows host (<IP_ADDRESS>)
check: ✔ ping success to IPv4 gateway (<IP_ADDRESS>)
check: ❌ nslookup fail for example.com A using <IP_ADDRESS>
check: ❌ nslookup fail for example.com A using <IP_ADDRESS>
ERRO[0002] cannot create tap device: ioctl: device or resource busy
ERRO[0003] cannot create tap device: ioctl: device or resource busy
ERRO[0004] cannot create tap device: ioctl: device or resource busy
ERRO[0005] cannot create tap device: ioctl: device or resource busy
ERRO[0006] cannot create tap device: ioctl: device or resource busy
check: ❌ nslookup fail for example.com A using <IP_ADDRESS>
ping: bad address 'example.com'
check: ❌ ping fail to IPv4 external host domain (example.com)
check: ✔ ping success to IPv4 external host IP (<IP_ADDRESS>)
check: ✔ nslookup success for example.com AAAA using <IP_ADDRESS>
check: ✔ nslookup success for example.com AAAA using <IP_ADDRESS>
ERRO[0007] cannot create tap device: ioctl: device or resource busy
ERRO[0008] cannot create tap device: ioctl: device or resource busy
ERRO[0009] cannot create tap device: ioctl: device or resource busy
ERRO[0010] cannot create tap device: ioctl: device or resource busy

@Asmilex Does this persist after a restart? What do you get when running ip addr?

Restarting doesn't seem to solve the problem, unfortunately.
Result of ip addr (wsl-vpnkit distro):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 92:c0:19:8e:0c:d4 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether d6:02:32:e1:c3:90 brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip <IP_ADDRESS> brd <IP_ADDRESS>
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit <IP_ADDRESS> brd <IP_ADDRESS>
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1310 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:4d:25:ba brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/20 brd <IP_ADDRESS> scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fe4d:25ba/64 scope link
       valid_lft forever preferred_lft forever
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:81:0a:25:e1 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0
       valid_lft forever preferred_lft forever
10: wsltap: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 46:52:f6:2d:53:31 brd ff:ff:ff:ff:ff:ff

To be fair I suspect this is a consequence of the extremelly weird network setup of the company, and is not produced by wsl-vpnkit.

Is that ip addr result after stopping wsl-vpnkit? If so, can you try sudo ip tuntap del wsltap mode tap

Ah, I might got it confused, excuse me. This is the result of ip addr from Ubuntu:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 32:dc:f3:93:45:b9 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:cf:66:22:82:31 brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip <IP_ADDRESS> brd <IP_ADDRESS>
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit <IP_ADDRESS> brd <IP_ADDRESS>
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1310 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:f2:48:dd brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/20 brd <IP_ADDRESS> scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fef2:48dd/64 scope link
       valid_lft forever preferred_lft forever
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:6a:f5:54:0d brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0
       valid_lft forever preferred_lft forever

With the service active:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 32:dc:f3:93:45:b9 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:cf:66:22:82:31 brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip <IP_ADDRESS> brd <IP_ADDRESS>
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit <IP_ADDRESS> brd <IP_ADDRESS>
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1310 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:f2:48:dd brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/20 brd <IP_ADDRESS> scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fef2:48dd/64 scope link
       valid_lft forever preferred_lft forever
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:6a:f5:54:0d brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/16 brd <IP_ADDRESS> scope global docker0
       valid_lft forever preferred_lft forever
11: wsltap: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 5a:94:ef:e4:0c:ee brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/24 scope global wsltap
       valid_lft forever preferred_lft forever
    inet6 fe80::5894:efff:fee4:cee/64 scope link
       valid_lft forever preferred_lft forever

Running sudo ip tuntap del wsltap mode tap throws ioctl(TUNSETIFF): Device or resource busy

I'll close this issue since we're no longer trying to use this solution. In any case, thank you for your help

i would be interested in what solution you are using now. Because i am running into exactly the same issue

i would be interested in what solution you are using now. Because i am running into exactly the same issue

I had this issue also.  It occurred when attempting to run the vpnkit when I was not connected to the VPN. As soon as I connected and ran, it worked great.


Modifying an IAMMember deletes the resource and doesn't recreate it.

Describe what happened
When modifying the name of a gcp.projects.IAMMember, the resource is deleted on changes.
The same thing happens with gcp.serviceaccount.IAMMember.
Pulumi deletes the old resource, and the create action "succeeds", but the resource is not actually created.
To reproduce:

pulumi up the code below
Check the users associated with the project with gcloud projects get-iam-policy ticket-5866 --flatten="bindings[].members" --format="table(bindings.members)"
Make a change to projectMember name (say, ticket-5866 -> ticket-5866foo)
Run another pulumi up
Check the users again using the same gcloud command.

Sample program
import * as gcp from "@pulumi/gcp";

// Project to house all this stuff
const ticketProject = new gcp.organizations.Project(
  "ticketProject",
  {
    name: "Ticket 5866",
    // deletionPolicy: "DELETE",
    projectId: "ticket-5866",
    orgId: "<REPLACE_WITH_ORG_ID>",
  },
  {
    retainOnDelete: true,
  },
);

// IAMMember
const projectMember = new gcp.projects.IAMMember("ticket-5866", {
  project: ticketProject.id,
  role: "roles/editor",
  member<EMAIL_ADDRESS>});

Log output
change-iam-member.txt
Affected Resource(s)

gcp.projects.IAMMember
gcp.serviceaccount.IAMMember

Output of pulumi about
Tested with pulumi v3.113.0 and v3.134.1, and with pulumi/gcp 8.3.1.
CLI
Version      3.134.1
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  gcp     8.3.1
language  nodejs  unknown

Host
OS       nixos
Version  24.05 (Uakari)
Arch     x86_64

This project is written in nodejs: executable='/nix/store/ilkfhnqz4xczrliqjva8770x2svbfznd-nodejs-20.14.0/bin/node' version='v20.14.0'

Current Stack: stooj/5866/dev

TYPE                               URN
pulumi:pulumi:Stack                urn:pulumi:dev::5866::pulumi:pulumi:Stack::5866-dev
pulumi:providers:gcp               urn:pulumi:dev::5866::pulumi:providers:gcp::default_8_3_1
gcp:organizations/project:Project  urn:pulumi:dev::5866::gcp:organizations/project:Project::ticketProject
gcp:projects/iAMMember:IAMMember   urn:pulumi:dev::5866::gcp:projects/iAMMember:IAMMember::ticket-5866foo

Found no pending operations associated with dev

Backend
Name           pulumi.com
URL            https://app.pulumi.com/stooj
User           stooj
Organizations  stooj, team-ce
Token type     personal

Dependencies:
NAME            VERSION
typescript      5.6.2
@pulumi/gcp     8.3.1
@pulumi/pulumi  3.134.1
@types/node     18.19.53

Pulumi locates its logs in /tmp by default

Additional context
A pulumi up --refresh will fix this, but since pulumi thinks the recreation succeeds the user isn't given any warning that things didn't actually work.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Hi @stooj - thank you for filing this issue. It sounds like there's a workaround for in the meantime but we'll take a look.

This sounds like a structural resource which needs DeleteBeforeReplace in the schema.

Changing the name of the pulumi resource changes the URN, so pulumi removes the old resource and creates a new one.
But because nothing on the GCP side is changing, GCP doesn't see any differences.
And pulumi creates first, then deletes. So what I think is happening is:

Pulumi sees a new URN and marks the old one for deletion, the new one for creation
Pulumi asks GCP to create a new object: {"a" = 1, "b" = 2}
GCP already has that object so returns a success
Pulumi then asks GCP to delete the old object: {"a" = 1, "b" = 2}

This issue wouldn't happen if any other properties were changed on the resource.
But Pulumi deleting resources without alerting the user is a footgun that we should warn the user about. Can the engine detect a URN change when nothing else is changed?
Do we support changing the names of resources?

Sure, I agree that using aliases are the fix.
But we need to protect users from this if they don't know they need to use aliases, because at the moment pulumi deletes resources without telling you about it.

We reverted DeleteBeforeReplace by default for these resources: https://github.com/pulumi/pulumi-gcp/pull/2595
However, it looks like the IAMMember can have an unconditional DeleteBeforeReplace - it seems unlikely that it ever works without DeleteBeforeReplace

@VenelinMartinov yep, I can do that later.
@stooj I would say after that you need a pulumi/pulumi ticket because this is about comparing selfLinks to determine replacement strategy versus the urn.

https://github.com/pulumi/pulumi-gcp/pull/2650

@stooj I think https://github.com/pulumi/pulumi/issues/15982 captures the problem

@stooj I believe @rshade has worked around the issue in https://github.com/pulumi/pulumi-gcp/pull/2650 which should be out in the next release


Installed pretty-quick

Current dependencies on/for this PR:

main

PR #93   👈

PR #94

This comment was auto-generated by Graphite.


Plugins repo should have a way to run tests on Windows

Currently plugins only seem to run their tests on Linux and macOS, so it's possible that on Windows development hosts things don't work and we wouldn't know.

Having Windows test infrastructure will also be critical once the Windows plugin API and tooling stabilize and we want to publish Windows plugins.


[DO NOT MERGE] Consolidate config

This PR is an attempt at consolidating configuration retrieval and setting within the config plugin. This would enable developers to replace their config plugin with another plugin, one potentially backed by a database, and therefore would allow users to deploy a cluster of dokku instances backed by a single configuration database.

Added the --export option to dokku config.
Switch to config:set where possible.
Use eval (oooo evil) to set config env vars in the current context.

Todo:

Remove all remaining checks for ENV files.
Add dokku config:has ENV_VAR method.
Fix cases where we are concatenating the raw ENV files for docker container runs.

@michaelshobbs what is the sed stuff here supposed to be doing?

Figured out the issue and now everything is consolidated!

That sed stuff reformats shell export statements to the docker env file format.
from https://docs.docker.com/reference/commandline/run/
The --env-file flag takes a filename as an argument and expects each line to be in the VAR=VAL format, mimicking the argument passed to --env. Comment lines need only be prefixed with #

Yeah, I figured it out and everything should be fine now :)

I get why from a code perspective we would want to do this. However, I'm uncomfortable with how often we are calling dokku from within dokku. The more we do this the longer traces get and the hard it is to troubleshoot issues. This is obviously one of the shortcomings with bash. Just my opinion though.
What if we had an export_config()function and --export called that? Then we could use that function internally as well?

The point of this is so that we can replace the config plugin with something else. If we just shove it into the common functions, that doesn't really help the matter.

Why not put the function in the config plugin and that was other plugins can implement it?

As in put it in a functions file and source that in other plugins when needed?

Yeah. I don't like the cross plugin sourcing bit, but again, we're doing this in bash....so....compromises?

I think this is good to merge, @michaelshobbs ?


Is initial maxIndex = -1 in BoundingBoxesUnpacker.swift right? then, I'd like to know the reason.

Version
0.1.3, and also latest commits
Problem Area
react-native-pytorch-core (core package)
Steps to Reproduce

create object detection model .ptl file
put the model file at src/app/models/ and input the ModelInfo in models/index.tsx
build and run the project
Fatal error: Index out of range happens

I'm enjoying to do real-time object detection on ios device because of great PyTorch live that you've been making.
I'm a beginner at Swift, so I don't know what maxIndex value= -1 indicates.
After changed maxIndex value -1 ⇨ 0, this error never happen.
So, I thought the value = 0 is right one.
Could you tell me whether the maxIndex value = -1 is correct and  then the reason  Maxindex = -1 is set, thanks in advance.
Expected Results
"Fatal error: Index out of range" doesn't happen
Code example, screenshot, or link to repository

@SomaKishimoto good catch! This is definitely a bug. I will fix it and thanks for reporting!

@SomaKishimoto Fix is pushed and I will close the issue for now. Feel free to reopen or create new one if you are seeing other issue!


MW: Adding a provider with incorrect connection creds, prevents provider entry in MIQ DB

After adding a provide with invalid port number, querying the MIQ DB showed that there were no entries for the provider. It was not until a 2nd provider with correct creds was added AND a "Refresh" occurred that both providers had entries in the DB.
Repro:

Add provider with incorrect port number. Note that the provider is listed in the MIQ Providers list.
Query the MIQ middleware_servers table, and note that there is no entry for the added provider.
Wait some time, and query middleware_servers dagain noticing still no provider.
Wait a bit more time, and the add a 2nd provider, which correct creds (correct port)
Query middleware_servers table PRIOR to the 2nd provider Refresh, and notice no entries
On 2nd provider "Refresh items and relationships", wait until Last Refresh shows that refresh happened.
Query DB again and notice the (2) provider entries.

Expected the 1st provider to have had an entry in the middleware_servers table prior to a success Refresh on the 2nd provider. If the 2nd provider was never Refreshed successfully, would there have ever been an entry for the1st provider (that was added with wrong port)?

@mattmahoneyrh the providers are not in the middleware_servers table. they are in ext_management_systems table. adding a provider with incorrect credentials prevents its inventory fetching (a.k.a the refresh operation) from hawkular, and hence middleware_servers table cannot be populated with servers information. based on the above it sounds like not a bug to me, but rather an incorrect testing scenario and the issue can be closed. if anything was misunderstood, please clarify.

As described by abonas, works as expected. Thus, closing.
Thanks for the clarification.


Please add back the function to close scrcpy, and still have your phone's screen turned off!!

[ ] I have checked that a similar feature request does not already exist.

Is your feature request related to a problem? Please describe.
Whenever I press ctrl + o (or alt + o in the new 'fixed' version), it'll turn off the screen; right? But when I close the application, it turns the screen right back on!
Describe the solution you'd like
While that might seem nice, I'd rather have the function to make it stay off when I close the application so I can play an idle game on my phone without it using minimal phone power; and I'm not forced to have it open on my computer for the screen to be off!
Describe alternatives you've considered
I've been using version 1.14 until this function is added, as it's there by 'default'.

If I correctly understand your request, it is fixed by #1670 on dev branch.
You could try with scrcpy-server posted here (for another issue, but it includes this fix): https://github.com/Genymobile/scrcpy/issues/1468#issuecomment-691715573
Please confirm that it fixes your problem.

It's not 'fixed'. Tried even the latest version, and doesn't allow me to turn off my phone's display while having the program closed.

#1764?


Output as RGBW for driving multicolor LEDs.

For home automation purposes it would be great to have the possibility to convert a color not only to R, G and B but also to a red, green, blue and white component. Probably even to two different whites at the same time where each white has a different temperature.
(For the R, G, and B the wave lengths and/or exact colors should be adjustable)

I'm not familiar with this color space, not sure if @svgeesus is. Could you provide any more information about it?

It's not really a color space: this is for home / building automation purposes where you have colored LEDs or LED strips. Many of those don't only contain a red, green and blue LED, but also a white one as producing white by 100% R, G and B isn't as bright as needed for room lighting purposes as well as it's CRI is bad and getting the mixture right for an intended color temperature is nearly impossible at the home automation level (no calibration and the curves are depending on device specifics that are mostly unknown).
Some LEDs even have two white channels, each with a different color temperature. This allows human centric lighting (HCL) where the color temperature in the room mimics the color temperature of the sun.
I'd like to use color.js at the @CometVisu to convert colors between the visualization where user controls the settings and the output to the LED actors.
So the task is similar to generate the K channel of the CYMK color space used for printers. But as I'm "printing" with light I need the W channel of RGBW. :)

The problem is that you want to output the intensities of LEDs, which mix to create a color. But you don't know:

the transfer function (relationship between signal intensity, which is typically PWM ratio for driving multicolor LEDS, and output light intensity
the chromaticity of the color produced by each LED.

Without that colorimetric basis, it is not possible to convert from a color to LED signal levels.
You would need measuring equipment - a light meter, and a spectrophotometer, to measure the intensity produced by each LED at each wavelength (and measure that, at various intensities).

@ChristianMayer Do note that conversion of a color to CMYK is similarly not straightforward, it depends on which CMYK space you'd be converting to, there are hundreds of CMYK spaces, based on inks, paper type etc. You may find math on the Web about generally "converting RGB from/to CMYK" but those have no actual meaning, e.g. they produce CMYK colors that cannot be printed by any printer (such as sRGB #0FF).
I wonder if the LED strips you're working with may have some information about what color space they produce, or even what absolute color values their primaries are in (the color space can then be calculated).

Taking one example of a LED strip from a well known manufacturer I find this specification: https://dammedia.osram.info/media/resource/hires/osram-dam-15999374/LINEARlight Flex Colormix RGBW V2.pdf
There you can see that the color temperature of the white LED is depending on the product type (you can get e.g. 2700 K) with a maximum (= 100% PWM) of 697 lm/m.
The red has a wave length of 622 nm with a 100% intensity of 80 lm/m, the green 534 nm with 196 lm/m and the blue 468 nm with 21 lm/m.
The dimming curve is depending on the LED driver. Very common is a logarithmic transfer curve but there are also drivers that can be set up to be linear or logarithmic or even some obscure custom mode.
In the perfect world I'd expect a user to use a spectrometer and get a full profile in a ICC file. Then it would be straight forward (at least in the RGB case) to convert an sRGB value to the LED driver settings. There's no difference to a computer screen here.
But in a real word application the most common use case would be to input the R, G and B wave lengths, the maximal intensities and the shape of the transfer curve (and in the RGBW case the color temperature of the white LED). This should be good enough for 99% of all cases and I guess no one would complain that the room lighting is > 3 DeltaE from the intended value chosen on the computer display.

The red has a wave length of 622 nm with a 100% intensity of 80 lm/m, the green 534 nm with 196 lm/m and the blue 468 nm with 21 lm/m.

Thanks for providing the data sheet. Those are dominant (i.e. peak) wavelengths. These are not single-wavelength sources. So that is not enough info to calculate the colorimetry. They would need to be measured at all wavelengths, to calculate that.

In the perfect world I'd expect a user to use a spectrometer and get a full profile in a ICC file.

No, you would probably (unless they are very non-linear) not need to make multiple measurements like with CMYK. You would just need the full spectrum, from which can be calculated the CIE XYZ value.

Example RGB LED spectra. Calculating CIE XYZ requires knowing the value at all wavelengths (sampled at least every 10nm) then multiplying by the three XYZ weighting functions and lastly doing a numerical integration to get the area under each of the three curves.

The wikipedia article that is showing graph it stating with it

FWHM spectral bandwidth is approximately 24–27 nm for all three colors.

According to Nyquist the 10 nm measurement step width is just enough to measure these peaks. So for real world lighting applications it's sufficient to assume that the LED is monochromatic.
A high sophisticated user might want to use measured xy-coordinates instead of the wave length. But an ordinary user would just use the wave lengths from the specification instead (and by that neglecting aging as well).

Seems that it is not quite that simple


Bachelor Thesis link

Can not find any link to the mentioned Thesis. Can you provide one?

Link: https://github.com/MoritzM00/Bachelor-Thesis/releases/tag/v1.0.7
Unfortunately, the thesis is written in german, which is why I didn‘t link it in this repo‘s Readme.

hey cool, for german readers anyway. I would link it anyway for those lucky enough to understand german.


Allow Clearance::BackDoor in development environments

I noticed the commit https://github.com/thoughtbot/clearance/commit/372c1514b892815914535d462409a354e1540964 restricts usage of Clearance::BackDoor to unit testing. Could this be modified to allow use in development environment, while this creates a security flaw in a production environment, it'd be useful for quickly switching between test accounts in development mode and is worth considering (as long as its kept off by default). Would a pull request be accepted for this change?

Yes, discussed here as well - https://github.com/thoughtbot/clearance/issues/825
I could see either of these approaches probably working:

Expand the list of envs where its allowed to be any of: test, development, ci
Allow configuration of allowed envs, default to those

I like the second approach better as it gives the developer more control. Could we just ask the developer to pass an array into the initializer and if empty or nil default to test and development and ci?

Yes, discussed here as well - #825
I could see either of these approaches probably working:

Expand the list of envs where its allowed to be any of: test, development, ci
Allow configuration of allowed envs, default to those

Fixed via https://github.com/thoughtbot/clearance/pull/830


#594 Fix the questionStartedOnPreviousTest issue

This PR fix the issue BECKy was seeing: "You cannot amend your answer for this question as it was started on a previous test".
The problem was the comparison between the object timestamp and the NULL value.
By moving the function from computed to a method, and calling it from the CREATED fixed the issue.

With regards the question above, what we have implemented right now is perfect. No change needed. We should lock questions that a candidate previously answered, but not lock questions they previously saw but didn't answer.


Provide safe wrappers for thread notification API

Furi provides access to FreeRTOS Task Notification feature which can be used for syncronization between threads.
Task notifications act as u32 bitmask, so can be used to signal multiple potential interesting states on the target thread.

Accidentally merged. Rolled back main and created #190.


chore: make port status script work again

@jcommelin what's the status / purpose of this?

Someone broke the yaml file. But it's no longer relevant, since the port is over. So let's close this.


VALIDATION ERROR - ADD MODEL IN LABEL STUDIO

When I want to add the model inside label studio it tells me that
Successfully connected to http://<IP_ADDRESS>:9090/ but it doesn't look like a valid ML backend. Reason: 500 Server Error: INTERNAL SERVER ERROR for url: http://<IP_ADDRESS>:9090/setup.
Check the ML backend server console logs to check the status. There might be
something wrong with your model or it might be incompatible with the current labeling configuration
I am working with label studio 1.8.1

Same.
Seem's like even dummy example doesn't work now.
I've checked latest (from b73a229b68836abb622188d1eecd307f9fcfc5d6) label-studio-ml-backend, build from pypi with 1.8.0, 1.8.1 versions of ls. =(


comments update

Coverage decreased (-0.1%) to 50.904% when pulling edfada9970e76395b8c8bfd38510b61c5009e8ac on lcestou:patch-5 into 1a140d21e2b9403b54ed0d793608c817f9f6c15d on TimothyLuke:master.


enable healthcare samples

solves #21471

@maririos
do i need to run tests locally to get recorded tests for the samples?

/azp run net - textanalytics - tests

@mohamedshabanofficial

do i need to run tests locally to get recorded tests for the samples?

No. Although our samples run as tests, we don't record them because they are meant to be run only in live environments or scenarios. So for example, only in our nightly builds. It happens thanks for this https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatch.cs#L13
A way to test it locally is by setting an environment variable AZURE_TEST_MODE:live. Our you could use the CI to test it for you (although you can't debug).
I just queue a build that will ran the samples. Hopefully they will pass


Qstag dev (Graphlets)

This now creates Graphlets() as a sub-class of Activity_Graph().
With attributes:
Activity_Graph.Graphlets._local_histogram (list)
Activity_Graph.Graphlets._local_codebook (list)
Activity_Graph.Graphlets._local_graphlets (dict)
utils.graph2dot(Activity_Graph, loc) now prints the Activity_Graph to a file location.
Please test ./scripts/qstag_example.py and merge?
Or let me know if you require any alterations?

@PDuckworth would you be able to turn the example ./scripts/qstag_example.py into an actual unit test? @yianni has implemented trillions of tests in https://github.com/strands-project/strands_qsr_lib/tree/master/qsr_lib/tests so there are plenty of examples.

Then, @cdondrup you should know about this ;-)

As this is not really ready for merge (spoken with Paul) and will be triggering the unittests on jenkins every time there is a push I will reject the PR.
If someone needs this in alpha state then pull from @PDuckworth branch.

Nothing wrong with unit testing it every time, I'd say. I use open PRs a lot to make sure I make the right changes.

Can run them locally without the need to commit and use jenkins.
see Running unit tests

yes, but then you run them in your own environment, and not a clean fresh installed ubuntu, so you'll miss all the dependency-checks, that account for about 70% of all fails ;-)


Port to Python 3 (and remain compatible with Python 2.7)

:+1: @mitsuhiko It would be great to have support for python3.

@mitsuhiko this PR has been open for almost two years, is anything going to happen here? I'm hesitant to install off Github and prefer official PyPI releases...

It looks like this project is abandoned.

FTR for people arriving here: there is https://github.com/YPlan/python-geoip which is the same as this package but is Python2/3 compatible. The changes are really minor, everything works the same. Enjoy!


[NEW-FEATURE] Customizable export/import in AxoData

When exporting/importing data in AxoData, adding the option to choose which data will be exported.
Maybe using a table with all the data header and checkboxes.

/cib

Branch 112-_NEW-FEATURE_Customizable_export/import_in_AxoData created!


keras 3.0.5

keras 3.0.5
Destination channel: Defaults
Links

PKG-4035
dev_url (pypi): https://github.com/keras-team/keras/tree/v3.0.5
conda-forge: https://github.com/conda-forge/keras-feedstock/blob/main/recipe/meta.yaml
pypi: https://pypi.org/project/keras/3.0.5

Explanation of changes:

updated recipe to version >3 using conda-forge
removed all unnecessary files
patch to set the default backend to pytorch (as per customer request)
script to remove leftover file keras.json before building (otherwise it will override the backend choice)

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_1d2gm_hjkr/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:27: host_section_needs_exact_pinnings: output "keras-base": Linked libraries host should have exact version pinnings.
clone/recipe/meta.yaml:27: build_tools_must_be_in_build: output "keras-base": The build tool pkg-config is not in the build section.
clone/recipe/meta.yaml:1: missing_description: The recipe is missing a description
clone/recipe/meta.yaml:1: missing_license_file: The recipe is missing the about/license_file or about/license_url key.
clone/recipe/meta.yaml:58: avoid_noarch: noarch: python packages should be avoided

===== ERRORS =====

clone/recipe/meta.yaml:1: missing_license: The recipe is missing the about/license key.
clone/recipe/install_base.sh:1: pip_install_args: output "keras-base": pip install should be run with --no-deps and --no-build-isolation.
clone/recipe/meta.yaml:1: missing_dev_url: The recipe is missing a dev_url
clone/recipe/meta.yaml:0: missing_section: The about section is missing.
clone/recipe/meta.yaml:1: missing_imports_or_run_test_py: output "keras-gpu": Python packages require imports or a python test file in tests.
clone/recipe/meta.yaml:95: missing_python: For pypi packages, python should be present in the host and run sections. Missing in {}
clone/recipe/install_base.bat:1: uses_setup_py: output "keras": python setup.py install is deprecated.
clone/recipe/meta.yaml:1: missing_documentation: The recipe is missing a doc_url or doc_source_url
clone/recipe/meta.yaml:1: missing_tests: output "keras-gpu": No tests were found.
clone/recipe/meta.yaml:1: missing_pip_check: For pypi packages, pip check should be present in the test commands
clone/recipe/meta.yaml:1: missing_license_family: The recipe is missing the about/license_family key.
clone/recipe/meta.yaml:1: missing_summary: The recipe is missing a summary
clone/recipe/meta.yaml:1: missing_python_build_tool: output "keras-gpu": Python packages require a python build tool such as setuptools.
clone/recipe/meta.yaml:1: missing_python: For pypi packages, python should be present in the host and run sections. Missing in {}
clone/recipe/meta.yaml:1: missing_wheel: For pypi packages, wheel should be present in the host section
clone/recipe/meta.yaml:1: missing_home: The recipe is missing a homepage URL
clone/recipe/meta.yaml:73: missing_imports_or_run_test_py: output "keras": Python packages require imports or a python test file in tests.
clone/recipe/install_base.bat:1: uses_setup_py: output "keras-base": python setup.py install is deprecated.
clone/recipe/install_base.sh:1: pip_install_args: output "keras": pip install should be run with --no-deps and --no-build-isolation.
===== Final Report: =====
19 Errors and 5 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_4fpkho1dlh/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:48: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
clone/recipe/meta.yaml:63: http_url: http://keras.io is not https
===== Final Report: =====
2 Errors and 0 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_5527tuelc4/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:64: http_url: http://keras.io is not https
clone/recipe/meta.yaml:49: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
===== Final Report: =====
2 Errors and 0 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_62ue0903tn/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:65: http_url: http://keras.io is not https
clone/recipe/meta.yaml:50: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
===== Final Report: =====
2 Errors and 0 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_8cy8wfzfsl/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:52: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
===== Final Report: =====
1 Error and 0 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(124): `conda run conda-lint /tmp/abs_b4999tp9ne/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:59: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
===== Final Report: =====
1 Error and 0 Warnings were found

As discussed in slack, the other two packages were removed a long time ago, and tensorflow has a dependency on keras minor version which prevents auto-updates from happening with the backend changed. (the user has to manually install tensorflow too). However as @ViridianMelody pointed out, when tensorflow is updated to a supported version users will have to manually set the backend.

IMHO the better way would be to remove the patch and tell snowflake to set the backend to pytorch themselves, but I'll leave that for discussion since the package needs to be delivered tomorrow

IMHO the better way would be to remove the patch and tell snowflake to set the backend to pytorch themselves, but I'll leave that for discussion since the package needs to be delivered tomorrow

@danpetry we can do that.

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_fc9d6pz7sw/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:19: patch_unnecessary: patch should not be in build when source/patches is not set
===== Final Report: =====
1 Error and 0 Warnings were found

When they update, their backend will change from tensorflow to pytorch without them noticing.

I mislead @psteyer with this suggestion:

The new users of Keras would see their default backend set to torch because tensorflow is not available. They can install this version, and they'll be able to use it with torch.
The previous users, would have their config in place with the correct backend, however, if they update, the correct version of tensorflow is not available. They should not update it.

However, your concern about the consistency of user experience made me think, thank you, and I'll restore the default behavior of keras.

All concerns addressed. This is ready for another review. Thank you @danpetry and @skupr-anaconda !

pinning and tests updated.
I think I've resolved all the comments.
Waiting for other reviews.
I will merge before the end of the week.


Transfer CSV files to a String or an Object

I want to thank Tim for a great addon to Ember, I was also thinking how can I read the CSV files, I've tried with dataURI, but I have a little problem

data:application/vnd.ms-excel;base64,RGF0ZSBhbmQgVGltZSwwNSBPY3QgMjAxNiAgIDA5OjE3D

Should I open it with a some kind javascript library? or can I convert it to String using the ember or just javascript?
Greetings, Rafał

vnd.ms-excel is in the MS excel format, not CSV, so that's :/

I've analyzed this file and it's not a proper csv file, it's a comma separated values, is there a way to read it as a text file?

I'm not sure exactly- I would ask on stack overflow, since this isn't really an issue with the library.


fix(docs): correct broken link in blog post

fix(docs): correct broken link in blog post

Updated the link in the 'unbounded-consumption.md' file to point to the correct documentation section.

Thanks!
On Tue, Dec 31, 2024, 7:15 PM Michael @.***> wrote:

Merged #2522 https://github.com/promptfoo/promptfoo/pull/2522 into main.
—
Reply to this email directly, view it on GitHub
https://github.com/promptfoo/promptfoo/pull/2522#event-15792632378, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACLYJUONGS4USFOWBGPIML2INMW3AVCNFSM6AAAAABUOF2FT6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVG44TENRTGIZTOOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Remove hypersistence dependency

This dependency will be problematic for a Quarkus upgrade.
It looks to me that it can be safely removed.

I know we had some issues when we looked at removing it in the past. Did you test this against a prod db and checked if it worked fine?

I relied mostly on the test suite, but will do check with the prod backup as well and see if I can spot any issues.

I did click around with production data and did not encounter any issues.


test: Go all in on Hubble

Enable hubble/hubble-cli/hubble-relay in the end-to-end testing
by default.
Set global.registry properly by splitting the image into 2 parts.

Signed-off-by: Michi Mutsuzaki<EMAIL_ADDRESS>

Coverage decreased (-0.009%) to 42.543% when pulling bd463c34afe12e049c79761fb5102bb3e53758ed on pr/michi/test into a7f8fc8f68ba16aff545eabef33d0d3f8914079c on master.

@gandro how about just doing kubectl delete -f on the yaml file used to deploy cilium?
kubectl.Delete(ciliumFilename)

@gandro how about just doing kubectl delete -f on the yaml file used to deploy cilium?
kubectl.Delete(ciliumFilename)

Yes, that's what we currently do in K8sHubble. The deployment manager that I linked to also does the same, but many tests are not using it yet. One example usage is this one:
https://github.com/cilium/cilium/blob/e0fbe8a49805f9e41c945e4bb197833eb6c27800/test/k8sT/DatapathConfiguration.go#L58
But most other testsuite are not using it yet, since it is a recent addition.

got it that makes sense. in that case i guess i should migrate existing tests to use deployment manager first.

blocked on https://github.com/cilium/cilium/pull/11330 as well

had an offline conversation with @gandro and others. we'll enable embedded hubble to start with, and then follow up with cli/relay later.

test-me-please


cargo fullstack issues on Windows

After following the instruction to the point where I used cargo fullstack I encountered this:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', .cargo/bin/fullstack.rs:17:10

I found out the problem probably has to do something with this:
〉which yarn
╭───┬──────┬──────────────────────────────────┬──────────╮
│ # │ arg  │               path               │ built-in │
├───┼──────┼──────────────────────────────────┼──────────┤
│ 0 │ yarn │ C:\Program Files\nodejs\yarn.CMD │ false    │
╰───┴──────┴──────────────────────────────────┴──────────╯

After some research I found some fitting issues..
#issuecomment-368300622
https://github.com/rust-lang/rust/issues/94743
For now the only idea I have to fix this, would be some Windows specific code to check for .CMD or maybe use which, which should support that?

This problem can be easily fixed by adding the .cmd extension.
In addition to that, the yarn install location has to be added to the PATH environment variable.
#[cfg(windows)]
pub const YARN: &'static str = "yarn.cmd";

#[cfg(not(windows))]
pub const YARN: &'static str = "yarn";

Command::new(YARN)

Another problem is that Command::new("..").arg("fullstack") calls cargo tsync instead of  tsync -i .. -o ...
It's probably a cargo bug because calling the .exe directly works fine and gives expected results.
One way to fix this is to change the [[bin]] section in Cargo.toml
[[bin]]
name = "tsync"
path = ".cargo/bin/tsync.rs"

The problem with tsync is that when yarn is invoked from cargo tsync, the PATH has more stuff on it and prioritizes the wrong binary named "tsync":
C:\code\my-create-rust-app\.cargo\.build\debug\deps\tsync.exe  // wrong one, not normally on PATH
C:\code\my-create-rust-app\.cargo\.build\debug\tsync.exe       // wrong one, not normally on PATH
C:\Users\lynn\.cargo\bin\tsync.exe                             // right one

(I got this by modifying the yarn script in package.json to "tsync": "where tsync && tsync -i ...")
So instead of yarn actually calling tsync, it calls cargo tsync again, recursing until it gets confused and dies:
Running `yarn tsync` in `$project_dir/frontend/`...
yarn run v1.22.15
$ tsync -i ../backend -o ./src/types/rust.d.ts
Running `yarn tsync` in `$project_dir/frontend/`...
$ tsync -i ../backend -o ./src/types/rust.d.ts
Running `yarn tsync` in `$project_dir/frontend/`...
$ tsync -i ../backend -o ./src/types/rust.d.ts
Running `yarn tsync` in `$project_dir/frontend/`...
$ tsync -i ../backend -o ./src/types/rust.d.ts
Running `yarn tsync` in `$project_dir/frontend/`...
...

I can't think of a good fix. Maybe we can call %USERPROFILE%\.cargo\bin\tsync explicitly somehow?
The fix @mayhemdot seems to hint at is to rename the wrapper under [[bin]] to something else (like "teesync" 😄):
  [[bin]]
- name = "tsync"
+ name = "teesync"
  path = ".cargo/bin/tsync.rs"

Now delete .cargo\.build\debug\deps\tsync.exe and .cargo\.build\debug\tsync.exe, and run cargo run --bin teesync instead of cargo tsync.

These issues were fixed in #128 and #66
closing, feel free to re-open if it's still a problem


Tell in the doc to install binutils-dev

I compiled honggfuzz from source because not present in the debian packages. I did not read in the official honggfuzz that it requires binutils to work and I required to watch this unofficial video https://www.youtube.com/watch?v=6OBXJtEe-d8 to understand.
Please could you provide instruction to ask to people to install with apt install binutils-dev on debian in order to build from source.
If really you do not have the time, I could update the readme alone.

Assign me to this issue if you want.

Hey, sure, please add it to docs.


ERR: read_csv with dtype on empty data, #12048.

ERR: read_csv with dtype specified on empty data
closes #12048.

pls add a whatsnew note in bug-fixes.
also, pls run the asv suite for parsing to see if any perf issues.

merged via https://github.com/pydata/pandas/commit/ab3291d7ddbe821733f199c6ce414d7a6b9c18e0
thanks!


parsedmarc: 8.6.4 -> 8.7.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for parsedmarc is: Python module and CLI utility for parsing DMARC reports
meta.homepage for parsedmarc is: https://domainaware.github.io/parsedmarc/
meta.changelog for parsedmarc is: https://github.com/domainaware/parsedmarc/blob/master/CHANGELOG.md#870
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
Warning: a test defined in passthru.tests did not pass
found 8.7.0 with grep in /nix/store/jcn5iz0n9giw5zwwq5cdj4qaqzhjkx9z-python3.11-parsedmarc-8.7.0
found 8.7.0 in filename of file in /nix/store/jcn5iz0n9giw5zwwq5cdj4qaqzhjkx9z-python3.11-parsedmarc-8.7.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath
parsedmarc
python311Packages.parsedmarc

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/jcn5iz0n9giw5zwwq5cdj4qaqzhjkx9z-python3.11-parsedmarc-8.7.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A parsedmarc https://github.com/r-ryantm/nixpkgs/archive/cc714e43a469952b5be1b85357518825a99b9e94.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/cc714e43a469952b5be1b85357518825a99b9e94#parsedmarc

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/jcn5iz0n9giw5zwwq5cdj4qaqzhjkx9z-python3.11-parsedmarc-8.7.0
ls -la /nix/store/jcn5iz0n9giw5zwwq5cdj4qaqzhjkx9z-python3.11-parsedmarc-8.7.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

parsedmarc (python311Packages.parsedmarc)

Maintainer pings
cc @talyz for testing.

8.8.0 is out.


Update to React 16.x

It would be great if all libraries could be updated to the last major version. Or would you accept a Pull Request for this?

You can just clone the repository and do yarn && yarn upgrade. These versions work fine
  "dependencies": {
    "mobx": "^5.0.3",
    "mobx-react": "^5.2.3",
    "mobx-react-devtools": "^6.0.1",
    "react": "^16.4.1",
    "react-dom": "^16.4.1",
  }

Will update dependencies once we can use stage 2 decorators
Op wo 12 sep. 2018 om 12:40 schreef Baruch<EMAIL_ADDRESS>
You can just clone the repository and do yarn && yarn upgrade. These
versions work fine
"dependencies": {
"mobx": "^5.0.3",
"mobx-react": "^5.2.3",
"mobx-react-devtools": "^6.0.1",
"react": "^16.4.1",
"react-dom": "^16.4.1",
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx-react-boilerplate/issues/18#issuecomment-420600456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvGhIbGXdg7iS_bxk59JxrQE4V8BMp_ks5uaOSPgaJpZM4RkgTT
.

This was fixed a while ago


Add sidebar to markdown text editor

As a publisher
I need to add and format content with markdown
So that it appears on GOV.UK
This is only to add the sidebar to the markdown editor found in the create and edit screen in content publisher.
Ticket: https://trello.com/c/EHO8aGQs/345-add-sidebar-to-markdown-text-editor
Screenshots

@soniaturcotte I think @DilwoarH opened them all manually to take the screenshot ;-).

@soniaturcotte I think @DilwoarH opened them all manually to take the screenshot ;-).

Yes I figured that, but we should only be opening one at a time. So if you have acronyms open, and you select tables, it automatically closes acronyms. I think this might come with the accordion component. Is that right @alex-ju

I would say option one is fine if we are going to get the component in soon.
Final comment, the copy at the beginning should be
Formatting
Full markdown guidance
As per the content document: https://docs.google.com/document/d/1RHvAf1MEjwOuR4POpcLAkhBQWLejYhe4WOyVCAdCb0I/edit

@soniaturcotte - updated

@alex-ju we had a think about using a locale file, but without going all the way and creating a custom DSL. Most of the guidance could be specified using markdown and injected into the component after rendering it, but we thought it wasn't worth the effort for now - let's see how often it changes :-).

The decision to not include the guidance was discussed in length with @benthorner. The main reason why this was not done was that of the following:

Markdown guidance is not content that will change very frequently and there work/effort/time required would not be justified
The markdown guidance is a part of a component which means logic would need to be implemented on a component level and the current structure of components do not support an additional file for content.


Issues #129 #132: Added redirect to docs for latest launchpad template

@ALRubinger take a look and let me know what you think

d8506d013cffafc073861be8864a1b2aafb8f7f9


Research functions that extracts label ID

Research the following two functions. These functions extract label ID from graphid.

How can we stop that while keeping the function working as before?
Would that be compatible with your solution?
Give some examples of cypher queries that uses these functions in its query plan tree.

entity_exists in cypher_utils.c
get_label_name in agtype.c
filter_vertices_on_label_id in cypher_clause.c

I will do 3.

I would like to work on this

I would like to work on 1st function

I would like to work on 2nd function

I think I have something really good here.
Skipping the part of how I discovered it, (you can test it yourself)
The first vertex created of any graph in any database with any name, any label, any number of properties and any values have this particular id:<PHONE_NUMBER>31969
Now when you create a vertex with the same label again, the next vertex simply gets the +1 id. (SAME LABEL IS IMPORTANT).
However, when you create a vertex with another label (the label name does not matter, neither do the properties), it will get exactly this id:<PHONE_NUMBER>842625
And the difference of the id of the first vertex with first label and id of the first vertex with second label is exactly:<PHONE_NUMBER>10656
Now this is important.
Again, next when you create a vertex with second label (any properties) it will simply get second label vertex 1 id + 1 id.
When you create a vertex with a third label (new label), it will get exactly this id irrespective of the properties:<PHONE_NUMBER>553281
Again the difference of first vertex of third label and first vertex of second label is exactly:<PHONE_NUMBER>10656
Again, if you create another vertex with third label it will get first vertex of third label + 1 id.
If you create a vertex with a new label (fourth label), again, irrespective of properties it will get exactly this id:<PHONE_NUMBER>263937
And again the difference of ids of first vertex of fourth label and first vertex of third label is exactly:<PHONE_NUMBER>10656
My point being, vertex ids are not exactly tied to labels in the sense that they are tied of label names. Instead, they are tied to which numberth created label it was.
Ids of vertices with first label of any created graph start with:<PHONE_NUMBER>31969
Then its a simple incrementing series for all next vertices.
In case a vertex is deleted, its id is not reused, instead, the next created vertex gets the incremented last used id.
Ids of vertices with second label of any created graph start with:<PHONE_NUMBER>842625
Then it simply increments for all next vertices.
And the difference between any two labels (their first vertices) is always<PHONE_NUMBER>10656.
It seems this is how AGE keeps track of which label to look into.
For example if there's a query
MATCH (n:second_label) RETURN n
Then it can simply look for vertices with ids starting from<PHONE_NUMBER>31969 +<PHONE_NUMBER>10656.

The first vertex created of any graph in any database with any name, any label, any number of properties and any values have this particular id:<PHONE_NUMBER>31969

This isn't completely accurate.
Id's of vertices are tied to the label id. The first label table that is created in any graph is the _ag_label_vertex with id = 1 and the second is _ag_label_edge with id = 2.
After applying a bit mask in the label id the vertex/edge id is generated and combined with a sequence you get the incremented id's of the different vertices and edges.
However your comment was a bit incorrect because the first vertex doesn't always have the id you provided. If you create a vertex with no label the resulting id will be<PHONE_NUMBER>10657 because thats the resulting number after applying the bit shift mask to the number 1 (since 1 is the label id for the vertices that have no labels).
So basically id's are entirely tied by the label id, and that is tied to the order of creating different labels, always starting at 3 for the first label created (since 1 and 2 are reserved when we create the graph by the default labels). After applying the mask you get the different ids of vertices and edges.
I think the reason that the different id's have that mathimatical property that you provided, is entirely based on the mask that we are using and it is not helpful by itself since it is just a side effect of the creating process.

I've been investigating these functions, and here are some queries that we can use for debugging:
1. entity_exists
This function checks if a variable has been deleted and returns true or false if an entity still exists.
Query
SELECT * FROM cypher('graph_name', $$
MATCH (x:Developer)
CREATE (x)-[r:PARTICIPATES]->(p:Project)
RETURN x
$$) AS (vertex agtype);

2. get_label_name
This function returns the label name, it's used in the AGE functions startNode and endNode()
Query
SELECT * FROM cypher('graph_name', $$
    MATCH (d:Developer)-[r]-(p:Project)
    RETURN startNode(r), endNode(r)
$$) as (start_node agtype, end_node agtype);

I'll look more into these functions and their query plan trees to think of solutions for label ID

@WendelLana Very good. Can you find a way to make these functions work without extracting label ID?

So i researched the above 3 functions and here is what I found:

The entitiy_exists() function uses the macro GET_LABEL_ID which takes the bit shifted label_id and reverses the procedure to get the label_id . Here is the macro: (((uint64)id) >> ENTRY_ID_BITS)
The get_label_name() function calls the get_graphid_label_id() function that follows the above logic :
return (int32)(((uint64)gid) >> ENTRY_ID_BITS);
The filter_vertices_on_label_id() function creates a function call for the function _extract_label_id. That function calls the same function as get_label_name() to get the label_id.

According to my solution all of these functions would stay the same but they function arguments would change to include the value from the new column that I suggested instead of the id. The value of the new column would hold the label_id after the bit shift so we can minimize the changes that we would need apply to the code.

3. filter_vertices_on_label_id
This function is used internally by the following query:
MATCH(:Person)-[:IN]->(t:Title) RETURN t

The QPT is:
 Gather  (cost=735883.94..1181947.48 rows=104664 width=32)
   Workers Planned: 2
   ->  Parallel Hash Join  (cost=734883.94..1170481.08 rows=43610 width=32)
         Hash Cond: (_age_default_alias_0.end_id = t.id)
         ->  Parallel Seq Scan on "IN" _age_default_alias_0  (cost=0.00..284748.30 rows=43610 width=8)
               Filter: ((_extract_label_id(start_id))::integer = 4)
         ->  Parallel Hash  (cost=533288.42..533288.42 rows=4145242 width=270)
               ->  Parallel Seq Scan on "Title" t  (cost=0.00..533288.42 rows=4145242 width=270)

The function adds filter condition in a query plan. In the above QPT, this line Filter: ((_extract_label_id(start_id))::integer = 4)  is built by it.
Because person is filtered by only label (i.e. (:Person)) and no property filter or variable is used, internally the Person table is not joined with the IN table. The _extract_label_id can tell which label start_id belongs to, and eliminates the join.
In order to drop the concept of graphid, we will need to stop using the function _extract_label_id. One alternative is to actually to the join. Except, not with the Person table. A duplicate table of Person can be used. It can be trimmed to have only ID column and indexed strategically, to reduce the join time. This solution is discussed in detail in issue #1021.

I've analyzed the query plan trees for the queries that I provied before, I'll write them here.
In the entity_exists function query that returns false, we have the following query plan:
                                        QUERY PLAN
-------------------------------------------------------------------------------------------
 Custom Scan (Cypher Create)  (cost=0.00..0.00 rows=0 width=32)
   ->  Subquery Scan on _  (cost=0.00..0.00 rows=1 width=32)
         ->  Result  (cost=0.00..0.00 rows=0 width=256)
               ->  Custom Scan (Cypher Delete)  (cost=0.00..0.00 rows=0 width=32)
                     ->  Subquery Scan on __1  (cost=0.00..343.00 rows=1200 width=32)
                           ->  Seq Scan on "Dev" x  (cost=0.00..331.00 rows=1200 width=64)
(6 rows)

In the entity_exists function query that returns true, we have the following query plan:
                                   QUERY PLAN
---------------------------------------------------------------------------------
 Custom Scan (Cypher Create)  (cost=0.00..0.00 rows=0 width=32)
   ->  Subquery Scan on _  (cost=0.00..1549.00 rows=1200 width=32)
         ->  Seq Scan on "Developer" x  (cost=0.00..1537.00 rows=1200 width=224)
(3 rows)

In the get_label_name function query, we have the following query plan:
                                                    QUERY PLAN
-------------------------------------------------------------------------------------------------------------------
 Gather  (cost=1000.00..37915106.89 rows=139750 width=64)
   Workers Planned: 2
   ->  Nested Loop  (cost=0.00..37900131.89 rows=58229 width=64)
         Join Filter: (((r.start_id = d.id) AND (r.end_id = p.id)) OR ((r.end_id = d.id) AND (r.start_id = p.id)))
         ->  Parallel Append  (cost=0.00..35.46 rows=809 width=56)
               ->  Parallel Seq Scan on "PARTICIPATES" r_2  (cost=0.00..15.71 rows=571 width=56)
               ->  Parallel Seq Scan on "FRIENDS_WITH" r_3  (cost=0.00..15.71 rows=571 width=56)
               ->  Parallel Seq Scan on _ag_label_edge r_1  (cost=0.00..0.00 rows=1 width=56)
         ->  Nested Loop  (cost=0.00..18047.00 rows=1440000 width=16)
               ->  Seq Scan on "Developer" d  (cost=0.00..22.00 rows=1200 width=8)
               ->  Materialize  (cost=0.00..28.00 rows=1200 width=8)
                     ->  Seq Scan on "Project" p  (cost=0.00..22.00 rows=1200 width=8)
(12 rows)

As the QPT shows, they don't utilize the _extract_label_id function, and there's only a simple join filter to scan the edge table. I believe your solution would work just fine with all these functions.
Additionally, I believe there is no need to duplicate the each label table, Person for example, because the column properties is already present in the _ag_label_vertex table. However, I'm still analyzing how much code we would need to change to ensure everything continues to work.
My ideia is that the query plan would first scan the Person table with only the IDs, and then in some cases, scan ag_label_vertex, and in other cases, simply filter by the properties in ag_label_vertex.

@WendelLana These functions dp extract label ID. But, they don't use a function that shows up in QPT (like _extract_label_id). Rather the functions being used for extraction are internal C function (not exported Postgres function). Interesting find. Good work.
Could you look for the internal functions where label is extracted? You can take a hint from panos's comment above. Then, let us now if the solution I proposed can be adopted there.

So i researched the above 3 functions and here is what I found:

The entitiy_exists() function uses the macro GET_LABEL_ID which takes the bit shifted label_id and reverses the procedure to get the label_id . Here is the macro: (((uint64)id) >> ENTRY_ID_BITS)
The get_label_name() function calls the get_graphid_label_id() function that follows the above logic :
return (int32)(((uint64)gid) >> ENTRY_ID_BITS);
The filter_vertices_on_label_id() function creates a function call for the function _extract_label_id. That function calls the same function as get_label_name() to get the label_id.

According to my solution all of these functions would stay the same but they function arguments would change to include the value from the new column that I suggested instead of the id. The value of the new column would hold the label_id after the bit shift so we can minimize the changes that we would need apply to the code.

@panosfol
Could you elaborate more? Whichever function will pass the value from the new column to these three functions, how would it access the new column value data? Consider what data the caller function already have access to in its context.

@rafsun42 you are right I will look into it!

As Panos pointed out, these functions use the graphid to retrieve the label ID. I believe your solution wouldn't work, because right now it extracts the label ID from the graphid and then it gets the specific vertex lable table (schema.vertex_label).
If graphid becomes a simple sequential ID or just the entry ID, we could utilize a junction table that stores each vertex ID and the label OID. This way, when searching for the label ID with the vertex ID in these functions, we can scan this junction table and find its label OID. Then, it can scan the correct label table and retrieve all the information of the vertex.

As of currently, the ids carry 2 types of information.
1.) The label
2.) The sequence
I believe irrespective of the type of query, _extract_label_id is used whenever a vertex is returned.
I can prove this in the form of an example.
Let's start by creating 2 vertices in the graph with 2 different labels.
So the contents of _ag_label_vertex are

Next, I'll update the label id of John from "1125899906842625" to "844424930131970".
So the new contents are: -

The contents of person_1 and person_2 respectively are: -

Now, if we perform some simple MATCH queries
Such as
MATCH (n) RETURN n;
MATCH (n:person_1) RETURN n;
MATCH (n:person_2) RETURN n;
You'll see even if we filter by person_2, the label actually is person_1

Which implies, even in queries where I am filtering by specifying the label "person_2", the search is made on the person_2 table, but the label is decided by extracting the label_id through the id only.
It is done by bitshifting the id towards right by (32+16) numbers (macro ENTRY_ID_BITS)

Since as of currently, the ids carry 2 kinds of information: sequence, and label id
The solution can be separating the two kinds of information.
There can be an sequence_id, which is just for sequence
And a label_id which is just for labels.
The separation of information could be achieved by a new column, or through a junction table.

3. filter_vertices_on_label_id
This function is used internally by the following query:
MATCH (:Person)-[e:IN]->(:Title{primaryTitle:'Inception'}) RETURN e

The QPT is:
 Gather  (cost=569028.74..853951.48 rows=105 width=32)
   Workers Planned: 2
   ->  Parallel Hash Join  (cost=568028.74..852940.98 rows=44 width=32)
         Hash Cond: (e.end_id = _age_default_alias_0.id)
         ->  Parallel Seq Scan on "IN" e  (cost=0.00..284748.30 rows=43610 width=29)
               Filter: ((_extract_label_id(start_id))::integer = 4)
         ->  Parallel Hash  (cost=567965.30..567965.30 rows=5075 width=8)
               ->  Parallel Seq Scan on "Title" _age_default_alias_0  (cost=0.00..567965.30 rows=5075 width=8)
                     Filter: (properties @> agtype_build_map('primaryTitle'::text, '"Inception"'::agtype))

The function adds filter condition in a query plan. In the above QPT, this line Filter: ((_extract_label_id(start_id))::integer = 4)  is built by it.
Because person is filtered by only label (i.e. (:Person)) and no property filter or variable is used, internally the Person table is not joined with the IN table. The _extract_label_id can tell which label start_id belongs to, and eliminates the join.
In order to drop the concept of graphid, we will need to stop using the function _extract_label_id. One alternative is to actually to the join. Except, not with the Person table. A duplicate table of Person can be used. It can be trimmed to have only ID column and indexed strategically, to reduce the join time.
So, Person table will have a duplicate Person_hash. It will only have the ID column. Dropping the properties column will make the join faster since each disk read can load more rows now. The ID column, then, will be indexed by hash method, so a hash join can be performed. A combination of less data to load from disk and hash index, the join can be made faster than a regular join (which is performed from Title).
@panosfol @Zainab-Saad @WendelLana @CapnSpek What do you guys think of this solution? Can the other two functions that you researched adopt this solution?

From my understanding this solution would need us know the label_name in order to find the correct duplicate table. Therefore I've researched in which of the above 3 functions (entity_exists(), get_label_name(), filter_vertices_on_label_id()) we have access to the label_name and in what context are they called.
First, the entity_exists() function is called by merge_vertex() and create_vertex(), both of which have as argument cypher_target_node struct that has char *label_name as field, therefore we can actually access the label_name in the context that entity_exists() is being called.
The filter_vertices_on_label_id() has char *label as argument, so we actually have the label_name in the context of the function. And finally the get_label_name() is being called by the age_startnode() and age_endnode() in the executor stage and it doesn't have a way to access the label_name without using the graphid. The problem is that the age_startnode() and age_endnode() are not internal C functions and their usage is to take an edge and return either the start node or the end node. The only way to accomplish that right now is through the node's ID, because that's the only information that the edge is holding for its 2 vertices.
In order to remove completely the graphid utility we need to come up with a way specifically for the edge structure because the get_label_name() function is being called by the 2 functions (age_startnode(), age_endnode()) that have only an edge as argument. Or change/remove those 2 functions completely.

Please note that the label_name parameter in the cypher_target_node struct may not always contain a value. This situation arises, for example, when using the provided queries in my previous comment. The presence of the label in the CREATE clause of the query affects whether the label_name parameter will have a value in create_vertex, so in cases where the variable is declared in the MATCH clause and referenced again in the CREATE clause, the label cannot be added again, resulting in an empty field for the label_name parameter.
@rafsun42 Therefore, I believe we would have to scan a junction table (with all vertices ID and label ID) or each duplicate of the label table (that only has the vertex ID, the Label_hash) to get the label table ID or label name. As presented, we could use a trimmed and indexed table by hash method to make this scan faster.

@WendelLana If we store label_id as a column in the vertex tables along with id and properties column, would it be possible to make entity_exist work without using the junction table, or Label_hash?

@rafsun42 I don't believe so, in this context, we only have access to the user input. Therefore to get all things stored about the vertex it would need a scan.


Lines around vector based objects and broken animations

I'm having some issues with exporting through bodymovin
Some of my files are working great with exporting and others not so much.
When working in after effects, I have been importing my ai files and working off those layers..
Also I have been using transparent backgrounds, which are needed for the website i am building.
When exporting after this, the animation doesn't work properly and there sometimes lines around vectors and sometimes no lines around vector objects.
I then went ahead and changed my aftereffects file from AI layers to be all PNG Layers when exporting this way, animations with vector objects come out with lines around them similar to a gif on a web page. Now 2 of my animations with vector objects worked great, and one animation exported has lines around it.. Ive tried everything I know about changing it and there's not much info out there so now I am reaching out
Thank you,
Haley

There are two possibilities you can choose.
Ideally, you should convert your .ai layers in After Effects to shapes. (right click each layer and select "Create Shape from Vector Layer").
This way your shapes will be exported as vectors and you won't need rasterized images.
The issue with this option, is that sometimes AE adds an unnecessary extra path and a merge group you need to erase manually since merge paths are not yet supported by the plugin.
The other option is, as you did, use pngs. But AE doesn't handle transparency correctly when exporting pngs. So after you export, you can go to the images folder and replace the exported pngs with your original pngs.
Let me know if this makes sense.

Thank you!
I have been changing all .ai layers to shapes, guess I could manually erase but that would take a lot of time.
As far as the PNG option, I have been replacing exported images with original images in two ways.
One renaming my originals to the same name as exported in the folder. Keeping them with in the folder.
Two by dragging the exported pngs to photoshop and swapping the exported with the original and saving the exported file. (meaning I drag the exported into photoshop, open up my originals, drag the original layer into the exported file then delete the exported layer and save the exported file)
When I do this I hope and pray it works but the animation is some how messed up and no longer works but the lines are gone
Thank you

Hi, did you get it working?

Hello, I've just run into this same issue.
Need to export lots of pngs but they all have the edge around them (especially soft edge alpha).
Any chance the export from After Effects can be fixed to use "fixed" alpha channel rather than "premultiplied"? Like the options you get in the "Render/Output" menu?
https://forums.adobe.com/thread/1064300
A workaround is saving all as Quick Export png in Photoshop, as long as those layers match the filename output by the AE Original Asset name (which is an awesome addition by the way), but it's always nice to remove any extra steps in the process.
Thanks!

I have it on my todo list.
There is a PR with a solution to this but I haven't found the time yet to fix it.
I'll take it probably in a couple of weeks.


Update README.md

I've copied the updated url for the repo
pls assign hacktoberfest label to it

I've copied the updated url for the repo
pls assign hacktoberfest label to it

Thanks for your Contribution!
Keep Contributing!
Gove a Star to this project if you like this!
Happy Hacktober!


Update TypeScript type definition

It looks like the TypeScript type definition for tap is not updated in @types/tap . I found the last version of @types/tap to be 15.0.7 which does not match the latest node-tap version I am using which is 16.3.2.
Thank you
DefinitelyTyped/types/tap - GitHub
@types/tap - npm

See https://github.com/tapjs/node-tap/issues/825#issuecomment-1155404538


Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS on inheritance

I was trying to create error that calls initialize of basic Exception (and extending it) class with one parameter.
I wanted to construct error message inside my custom exception and pass it to basic Exception class.
I got:
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

And execution timeout of course in browser.
Here is the code that activates this issue:
class CustomError < Exception
  def initialize(@param : String)
    initialize "You are not allowed to pass this custom param: #{@param}"
  end
end

raise CustomError.new "important_field"

@idchlife I believe the problem is that you're calling initialize itself, thus ending in a stack level too deep situation (and since is part of a exception, not able to catch it properly)
What you want to achieve is done by the usage of super keyword:
https://play.crystal-lang.org/#/r/1m7y
class CustomError < Exception
  def initialize(@param : String)
    super "You are not allowed to pass this custom param: #{@param}"
  end
end

raise CustomError.new "important_field"

@luislavena  Thank you! You are totally right.


checkFeatureSupport version comparison

I am using version 10.01 of exiftool.
I constructed the ExifTool with Feature.STAY_OPEN.
The version compare section of the checkFeatureSupport method uses a string compare and it returns false for supported.
Please change the versions to double or float for the comparison.
Existing code
if (ver != null && ver.compareTo(feature.version) >= 0) {
supported = Boolean.TRUE;
log("\t\tFound ExifTool version %s, feature %s is SUPPORTED.",
ver, feature);
} else {
supported = Boolean.FALSE;
log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
ver, feature);
}
My solution
if(ver != null){
double verDouble = Double.parseDouble(ver);
double featureVerDouble = Double.parseDouble(feature.version);
			if(verDouble >= featureVerDouble){
				supported = Boolean.TRUE;
				log("\t\tFound ExifTool version %s, feature %s is SUPPORTED.",
					ver, feature);
			}else {
				supported = Boolean.FALSE;
				log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
						ver, feature);
			}
		} else {
			supported = Boolean.FALSE;
			log("\t\tFound ExifTool version %s, feature %s is NOT SUPPORTED.",
					ver, feature);
		}

Parsing the version as a double is incorrect because doubles 8.4 > 8.36 which is not true for version numbers.
I suggest wrapping the strings in the maven comparable version class DefaultArtifactVersion as described here: http://stackoverflow.com/a/6640972/276093


[CI only] increase timeout to wait for oCIS server

Note: oC10 core and apps CI has 600 second (10 minute) max wait. We had times in the past where it took ages to fetch docker images. It seemed to happen in nightly CI, I guess when all the drone agents would start fresh from "nothing" at something like 1am in the morning. They would all be handed multiple pipelines that would all start fetching the similar set of docker images.
Anyway, if someone gets more than 300 second delay, we can keep increasing the wait!


Gsuites Group Settings Scanner

Thanks for opening a Pull Request!
Here's a handy checklist to ensure your PR goes smoothly.

[ ] I signed Google's Contributor License Agreement
[ ] My code conforms to Google's python style.
[ ] My PR at a minimum doesn't decrease unit-test coverage (if applicable).
[ ] My PR has been functionally tested.
[ ] All of the unit-tests still pass.
[ ] Running pylint --rcfile=pylintrc passes.

These guidelines and more can be found in our contributing guidelines.

@ahoying @blueandgold Can you guys please help me out at some point today with a first pass through.  I have other issues to deal with today but by tonight will be blocked without a review on this


How on earth do I get aws_cognito_identity_pool_id to auto-populate in aws-exports.js?

Amplify CLI Version
4.49.0
What AWS Services are you utilizing?
Amplify, Dynamo, S3
Provide additional details e.g. code snippets
Calling Storage.put in my app is failing because aws_cognito_identity_pool_id isn't defined in my aws-exports.js file.  I can manually edit   my local aws-exports.js to define the correct aws_cognito_identity_pool_id, and calling s3 works fine after that (locally), but editing an auto-generated file like aws-exports.js is obviously not ideal.  I don't want to have to check it in.
I tried importing an existing auth into my development environment, but doing that forces me to "remove" the existing auth, which deletes all the templates that define how to create my app's auth scheme.  And it looks like I will have to manually reconfigure the auth for my other environments if I go that route, too.
Is there a config file or template someplace where I can simply add the correct identity pool id that I want the app to use with my existing user pool.. without blowing away the definition of my existing user pool?  So it'll automagically show up in aws-exports.js when it gets auto-generated?  That would be ideal.
Thanks.

Hi @Trevor-mc2 the aws-exports.js file should be generated anytime you run amplify init, amplify push, amplify pull or amplify env checkout. Have you run one of those commands since adding auth to your project?

Oh yes, for sure.  I have definitely regenerated aws-exports.js multiple times since adding auth.  I've run all of those commands at one point or another.  I even tried deleting the file to be sure it was being recreated...
But the aws_cognito_identity_pool_id associated with my user pool still isn't being automagically added to aws-exports.js...  which if why I'm wondering if there's something I can do to get it to show up in that file.
Thanks.

Okay, so.. what part of the Amplify setup process links the id pool with the user pool?  I had this working once, but the Amplify defaults for username were case-sensitive, so I had to delete that auth setup and create a new one.  And now I don't get an id pool id injected into my aws-exports.js file.
Is there a way to add that user-pool-to-identity-pool association in an Amplify config file someplace?  Ideally without having to delete my entire user pool and re-create it from scratch (again) with the Amplify CLI?
Thanks.  Appreciate you getting back to me, @edwardfoyle

So..  I was exploring the options in amplify auth update and came across this:
Do you want to enable any of the following capabilities?
Do you want to use an OAuth flow?
I want to learn more.

When you create a user pool in Amazon Cognito and configure a domain for it, Amazon Cognito automatically provisions a hosted web UI to let you add sign-up and sign-in pages to your app. Selecting "No" will remove any existing OAuth configuration.
Do you want to use an OAuth flow? No
Warning! Your existing IdentityPool: undefined will be deleted upon the next “amplify push”!

That "undefined" IdentityPool value explains why my app no longer has an identity pool defined in aws-exports.js.  So apparently I need to choose to add an OAuth flow if I want Amplify to automatically configure an identity pool...
...
I did some research, and found a bug where someone else complained about the creation of an identity pool when adding an OAuth flow:
"I set up auth with Cloud API only, an Identity Pool was not created. I then added redirect URIs to OAuth and suddenly it deployed an Identity Pool."
https://github.com/aws-amplify/amplify-cli/issues/4657
...
So I  set up an OAuth login flow in my existing app, and did an amplify push, and despite all that, aws_cognito_identity_pool_id is still not being added to my aws-exports.js file.  Running aws cognito-identity list-identity-pools --max-results 60 in the CLI shows no new identity pool was added.  Sad times in Amplify-land.  Any ideas?
...
The saga continues..  I set up a fresh Amplify project from scratch.  Added Auth.  With OAuth integration.  That project also generated an aws-exports.js file without an entry for aws_cognito_identity_pool_id.  Unless I'm missing something.
I'm running the very latest version of Amplify CLI: 4.50.0.
...
Last year, the first time I set up a new Amplify project, the time it worked, the setup process generated a file called amplify/backend/awscloudformation/nested-cloudformation-stack.yml, and that defined identityPoolName as one of the parameters that defined my auth stack.  I don't see anything like that in the template that defines my new auth stack.
...
The plot thickens... I tried adding storage to the brand new Amplify project, and got this error, which I also cannot find a solution to:
Current auth configuration is: userPoolOnly, but identityPoolAndUserPool was required.
So...  How on earth do I get the auth config set correctly?  Nothing in the current myAuth-cloudformation-template.yml file even mentions an identity pool id, though I do see the entry for authSelections - but I don't imagine anything good will happen if I manually change it from "userPoolOnly" to "identityPoolAndUserPool" without defining the identity pool someplace.

Oh interesting.  I still don't see the identity pool in aws-config (in my brand-new project), but when I created a new Amplify project from scratch, the yml template for the Auth did contain a section that defined an identity pool:
  # BEGIN IDENTITY POOL RESOURCES

  IdentityPool:
  # Always created
    Type: AWS::Cognito::IdentityPool
    Properties:
      IdentityPoolName: !If [ShouldNotCreateEnvResources, 'test_identitypool_abcd123', !Join ['',['test_identitypool_abcd123', '__', !Ref env]]]

"Always created"... Hah.  Haha.
Now, looking at my current system's Auth template, I see no such thing.  No mention of identity pools.  That template looks real old, though... it looks nothing like the one that Amplify just generated for my new project.  My original template file starts with AWSTemplateFormatVersion: 2010-09-09 so...  maybe it's just way too far out of date?  Is it possible to upgrade the old system's auth template format without borking everything?  Or do I need to remove the old Auth, define a new Auth in my old system, and make everyone set up a new login? (that seems excessive to me)

@Trevor-mc2 when you set up auth, did you select Default configuration in response to this question:
 Do you want to use the default authentication and security configuration? (Use arrow keys)
❯ Default configuration
  Default configuration with Social Provider (Federation)
  Manual configuration

You can also update this by running amplify update auth => select Walkthrough all the auth configuration => ensure User Sign-Up, Sign-In, connected with AWS IAM controls is selected => step through remaining config without changing anything.
It sounds like the auth resource is configured with just a User Pool and doing the above should add an identity pool as well

O. M. G.  I had never tried the default Auth configuration.  🤦♂
Nor had I tried enabling AWS IAM controls for my user pool.  A million thanks.  That's what ended up working for me.
Mostly working, anyway.  In case it helps any one else, the missing piece was, when trying to push (after running amplify auth update), was to find a solution for this deployment error:

UPDATE_FAILED               UserPool                                            AWS::Cognito::UserPool     Mon May 03 2021 18:49:32 GMT-0700 (Pacific Daylight Time) Updates are not allowed for property - UsernameConfiguration. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: null; Proxy: null)

That error was because the CLI didn't add the UsernameConfiguration section to the cloudformation-template, and my original auth was set to CaseSensitive: false (which is the opposite of the default when nothing is specified in the config).
But first thing amplify auth update warns you about is that "certain attributes may not be overwritten if you choose to use defaults settings" so I wasn't surprised.  And the first two or three users pools I made all had to be deleted because of that silent, secret default (seriously, nobody wants case-sensitive usernames), so I had already figured out where to insert the UsernameConfiguration value that I wanted to use instead.
Thanks so much for the assist!  I'm all good now.


SDK is returning Authentication failed When User is in Forced password/ Password reset state.

Describe the bug?
When User is in Forced password/ Password reset state. Sometimes SDK is detecting correctly and returning password reset state but after doing multiple rounds of testing found out many times SDK is returning Authentication failed state.
Steps to reproduce on OKTA-IDX Sample app:

Login into the app.
Call /api/v1/users/UserID/lifecycle/expire_password?tempPassword=true to set a temp password for the user via Postman.
Login into the app again.
Sometimes We will get Authentication failed and sometimes we will get correct state which is password reset state.

What is expected to happen?
SDK should always return Forced password state if user is in password reset state.
I check that by using remediations[.reenrollAuthenticator].
What is the actual behavior?
SDK should return Forced password state which is happening few times. I check that by using remediations[.reenrollAuthenticator].
But Many times SDK just returns authentication failed and remediations does not contain reenrollAuthenticator.
As a result we are not asking user to reset their password instead we are showing authentication failed which is misleading because User may think the credential is wrong.
Reproduction Steps?
Steps to reproduce on OKTA-IDX Sample app:
Login into the app.
Call /api/v1/users/UserID/lifecycle/expire_password?tempPassword=true to set a temp password for the user via Postman.
Login into the app again.
Sometimes We will get Authentication failed and sometimes we will get correct state which is password reset state.
Additional Information?
No response
SDK Version(s)
3.0.5
Build Information
No response

I believe the response you get may depend upon the workflow being followed. For the most part, expired or reset passwords should enable the user to step through the authentication process and reenrol their password within the SDK.
If you deactivate and then reactivate the user, they will receive an "Authentication Failed" error until they activate their account using the activation email.
There are some circumstances where you will receive an error indicating the "Flow continued on another tab".  This may occur when authentication begins in the mobile application, but an activation email takes them to enrol their password within the web browser.  When this occurs, the authentication session on the mobile client will terminate.  If you're encountering this situation, you would need to restart the sign in process on the mobile client.
Did this answer your questions @Sushree-nayak-2022? I'd be more than happy to go into this in more detail, especially if I knew more about your specific policy settings which may be influencing the sign in flow.

@Sushree-nayak-2022 One thing I did notice is that the API will often return HTTP status codes >= 400 accompanied by a proper JSON payload. However, this status code was resulting in the SDK throwing an error response, instead of allowing the client to render UI to address the error.
I've just released OktaIdx 3.0.6 which ensures valid IDX responses can still be processed by clients, even when the HTTP status code indicates an error occurred.
I'm not sure if this will unblock you, but I'd suggest you give it a try to see if it helps.

Thanks @mikenachbaur-okta , Thanks for the update.
I can still see the issue.
This is what I did on IDX sample app(This is just an example. sometime authentication failed comes on 2nd try as well.)

User state now is PASSWORD EXPIRED
Login with username and temp password -> Detected its pass expired case. But I  will not change the password at this point.I will cancel
Login again with username and temp password -> Detected its pass expired case. But I  will not change the password at this point.I will cancel
Login again with username and temp password -> Detected its pass expired case. But I  will not change the password at this point.I will cancel
Login again with username and temp password -> Authentication failed

I checked if account is locked at this point but the account status was still showing PASSWORD EXPIRED

@Sushree-nayak-2022 I know we communicated through other channels on this, and other issues you were facing. I was wondering if you're still experiencing problems, or if I could close this ticket?

I'm going to close this ticket, since I believe it has since been resolved, but please feel free to reopen it if this is not the case.


[#136029251]service editing: add "service updated" flash message & tests

Story https://www.pivotaltracker.com/story/show/136029251
(tl;dr we're adding a flash message that says "You’ve edited your service. The changes are now live on the Digital Marketplace.")

:+1: after a rebase


Select return values

I propose to add the return map type of function,
eg:func (m *DbMap) Select(query string, args ...interface{}) ([]map, error),What about that?

I agree with coopernurse that this wouldn't be very convenient. The goal with gorp is to map values into a struct or slice type.
Closing this issue.


📦 Prepare 0.8.0 release

Includes a sneaky #[non_exhaustive] annotation on viceroy_lib::Error to prevent future new variants from requiring major version bumps.

Tagged, released, and updated for the next version


Support Kubernetes 1.2

Mostly new parameters, some of them really needed in 1.2 (ie. --hairpin-mode
for kubelet) ; but also some lost parameters (ie. "--etcd-config" isn't
supported anymore in 1.2, api-server lost "--cluster-name" option, ...), which
needed some care (ie. wrapping their uses with if $minimum_version) sinc
kubernetes won't start with unknown command line flags.
I don't have a < 1.2.0 cluster anymore to test against, but all new options
are enclosed by "<% if @minimum_version.to_f >= 1.2 -%>" in templates, and
I manualy verified the absence of functional changes with "$minimum_version
= 1.0" on a copy of my old configs.

Thank you @bpineau


[Bug]: apache_beam.ml.inference.sklearn_inference_it_test.SklearnInference.test_sklearn_mnist_classification fails because of the removal of headers from the input file

What happened?
#23018 this removes the skip_header_lines from the ReadFromText to make the example simple and clear.
header line/column names from the csv file used in the example needs to be deleted as part of #23018. I made the change to the input CSV by removing the column names. Before #23018 merges, there will be some PostCommits failures due to AssertionError(caused by change to the input CSV).  #23054 solves it.
Issue Priority
Priority: 1
Issue Component
Component: sdk-py-core

Can close this PR if https://github.com/apache/beam/pull/23018 gets merged