[Oct 14] Move jupyterhub-home-nfs into the 2i2c-org GitHub repo

In https://github.com/sunu/jupyter-home-nfs/issues/2, we agreed to move the jupyter-home-nfs project (which provides per-user home directory quotas) into the 2i2c-org GitHub org. This ticket is to make that actually happen.
Definition of done

[ ] Repository has been moved into the 2i2c-org

Hey @sunu - I remember you said you were OOO at the beginning of Oct. Since this issue requires us to coordinate a little, can you recommend a date we can do this?

Hi @sgibson91, yes, I'll be OOO from tomorrow and all of next week. We can do the move on Monday 14th October if that works for you.

The project is now in the 2i2c GitHub org! 🎉 https://github.com/2i2c-org/jupyter-home-nfs


adding code coverage to readme/pull requests

Fixes #65

This may be a little more challenging for the app (ES6) code. ember-cli and broccoli-jscs are written in ES5 so they don't have to deal with this issue.
I've added coverage to ember-cli-materialize using blanket, and the number (and corresponding PR check) is quite useful. The sourcemaps are wrong because it's the transpiled modules that are instrumented for coverage -- I'll get that fixed in ember-cli-blanket one of these days :)

@mike-north / @kellyselden - what's the consensus here?  I haven't had much to do with code coverage before - happy for you guys to make a decision here

@hhff This is currently dead in the water. I forgot about babel transpiling, which make this non-trivial. We can close or keep open for when I have time to take another stab at it.

Let's close it for now - we've got an issue as a reminder :+1:
thankyou @kellyselden !

@kellyselden if we just care about a number, I can put something in place :). The source maps will be messed up due to blanket.js instrumenting the transpiled modules (which don't exist as separate files in the build pipeline)
Example:

PRs are instrumented: https://coveralls.io/github/mike-north/ember-cli-materialize
The source maps are messed up https://coveralls.io/builds/3495221/source?filename=addon%2Fcomponents%2Fmd-input-date.js (this is because ES5 source is instrumented, and projected onto ES6 files)

I believe the overall coverage number (and even module coverage number) to still be quite useful, particularly in terms of making sure coverage doesn't drop significantly

honestly I think if we've got overall coverage then that would help a bunch tbh @mike-north


Build instruction for SeLion is not clear

I tried following http://paypal.github.io/SeLion/html/documentation.html#buildingSelion to build SeLion.
But I was blocked for multiple times.

While building ios-driver for precondition, I need more clear information how to do it.
After getting ios-driver ready, blocked while running
mvn clean install -DSELION_SELENIUM_HOST=
I always got error info like this

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SeLion Parent POM ................................. SUCCESS [1.919s]
[INFO] SeLion Project BOM ................................ SUCCESS [0.036s]
[INFO] SeLion Client ..................................... FAILURE [30.085s]
[INFO] SeLion Grid ....................................... SKIPPED
[INFO] SeLion Code Generator Maven Mojo .................. SKIPPED
[INFO] SeLion Archetype .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.326s
[INFO] Finished at: Mon Sep 15 16:07:48 CST 2014
[INFO] Final Memory: 32M/368M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project SeLion: Execution default-test of goal org.apa
che.maven.plugins:maven-surefire-plugin:2.17:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\Java\jdk1.7.0_40\jre\bin\java -XX:MaxPermSize=128m -XX:-UseSplitVerifier -jar D:\workspace\SeLion\client\target\surefire\s
urefirebooter3754694759072562222.jar D:\workspace\SeLion\client\target\surefire\surefire2098405363173608294tmp D:\workspace\SeLion\client\target\surefire\surefi
re_07125297575698861365tmp"
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :SeLion

So last, I skip test and got it built finally.
I made a change in README about how did I build it on Windows platform.
Here's a link of my commit: https://github.com/bingwei/SeLion/commit/20170621b08fdaa4982c695472474c4e0c7ad1eb
I suggest to update SeLion build document on this part.

mvn clean test -DsuiteXmlFile=src/test/resources/SampleSuite.xml -DSELION_SELENIUM_RUN_LOCALLY=true
Try running with the -DSELION_SELENIUM_RUN_LOCALLY=true.
I got it running fine with this. Selion is looking for a remote grid, so you can just specify it to run locally.


Add tooling support for injecting collective channels.

After brainstorming with @okkwon we're going to explore synthesizing a @__set_collective_channels function that takes a set of !hal.channels as input for use during invocation. The intent is for binding layers (python, pjrt, etc) to use that to inject their own channels that they've coordinated with the orchestration layer (whatever that may be). We can make programs compiled using this work in the various command line tools by adding support in iree/tooling/context_util.c or iree/tooling/device_util.c for parsing a repeated list of --channel= flags and then calling the exported setter to allow the user to specify the topology directly prior to invocation.
Another approach would be to take the channels as arguments on each entry functions. This would make the invocation stateless (besides all the other state we have) such that each invocation within the same context could have a different set of channels, but that too is a special mode unique to certain frontends that we may not want to generalize (it breaks command buffer reuse, etc). In that model instead of having a --channel= flag we would have --input=channel(...) as a special case that would create them and pass them in along with other arguments. Pending @okkwon's investigation on how this may integrate we can decide exactly which path to take. The setter route would be most canonical with our other uses today so I'm assuming that for now.
--
When going the setter route:

[ ] Add --channel= flag
[ ] Parse each flag into iree_hal_channel_params_t and create a iree_hal_channel_t
[ ] Call @__set_collective_channels when available (verify channel count, whether it exists, etc to give good errors)

We'll want to be able to have the queue affinity specified on each flag too for when we have multiple queues backed by different physical devices. The exact format of what we need will depend on some investigations @okkwon is doing as to how best to specify the topology here. We could experiment with placeholders for special values if we need to as well as things that make automation easier to bring up when scripting (allow substitution of environment variables or whatnot).
The other half of this work is synthesizing the @__set_collective_channels function in the compiler. This would be similar to what we do during ABI generation where we turn tensor functions into ones taking !hal.buffer_view and !hal.fence, or create the tflite bindings support functions. That'll likely differ per frontend and live somewhere in the input processing pipeline - how mhlo thinks of channels is weird and specific and not something we can generalize to other frontends (ideally mhlo would just have channels as a concept instead of relying on attributes spread across the IR to implicitly define them).
Example synthesized function:
util.global private @__channel_0 : !hal.channel
util.global private @__channel_1 : !hal.channel
func.func public @__set_collective_channels(%arg0: !hal.channel, %arg: !hal.channel) {
  util.global.store %arg0, @__channel_0 : !hal.channel
  util.global.store %arg1, @__channel_1 : !hal.channel
  return
}
...
  %channel_0 = util.global.load @__channel_0 : !hal.channel
  <<do collective thing>>(%channel_0)
  %channel_1 = util.global.load @__channel_1 : !hal.channel
  <<do collective thing>>(%channel_1)

(since we want to put the !hal.channel type on the public API we'll probably need an equivalent hal.channel.import/export op as we have with fences and buffers to effectively cast these to the higher-level flow/etc types)

Thanks for your brain dump. :-) It is a very interesting approach for having a channel as an abstraction between the main process and the IREE code side.
One down side I can think of is the fact that we need to introspect the MLIR code or rely on the code generator side to know what channels we want to pass as a flag. The code produce such as JAX would know the exact details of the channels to pass since it does the data partitioning, but it still needs to do the book keeping or code inspection.
Another difficulty might be the support of dynamic channel creation. This wouldn't be a problem in the near future, but when the program code wants to create a channel dynamically with a group of ranks, the case can't be easily supported by the flag.
Another approach I can think of is to use the host information. This is basically to provide a 1:1 mapping between IP/Port and the rank ID. This seems to be the minimum information to support NCCL channel creation without broadcasting the unique ID of the root process of the group, since every node already knows about the IDs of the other processes. With this approach, we can keep the channel creation logic in the MLIR code and don't need to make the information escape out of the code. (I am assuming that knowing the IP address and port will work for multiple NCCL channel creation, which I believe so.)
Here is an illustration of the case with multiple independent collective ops.
// mhlo level
%all_reduce = "mhlo.all_reduce"(%in) ({
  ^bb0(%arg0: tensor<f32> , %arg1: tensor<f32>):
    %add = mhlo.add %arg0, %arg1 : tensor<f32>
    mhlo.return %add : tensor<f32>
  }) {channel_handle = #mhlo.channel_handle<handle = 483, type = 1>, replica_groups = dense<[[0, 1], [2, 3]]> : tensor<2x2xi64>, use_global_device_ids} : (tensor<2304xf32>) -> tensor<2304xf32>

The groups [0, 1] and [2, 3] are independent during the communication. The flow level code would look like:
// 0, 1, 2, 4 are a global rank ID and there are two independent collective ops with two subgroups.
// membership check
%is_in_0_1 = ... // check the rank ID is in [0, 1]
%is_in_2_3 = ... // check the rank ID is in [2, 3]
// conditional collective operations based on the membership check
scf.if %is_in_0_1
  %channel_0_1 = flow.create_channel group=<[0,1]> affinity=...
  flow.allreduce ..., %channel_0_1
scf.if %is_in_2_3
  %channel_2_3 = flow.create_channel group=<[2,3]> affinity=...
  flow.allreduce ..., %channel_2_3

We can further extend the group concept as a separate operation just like MPI does.
%cst = arith.const dense<[0, 1]> : tensor<2xi64>
%group_0_1 = flow.create_collective_group %cst -> !hal.collective_group
%channel_0_1 = flow.create_channel_with_group %group_0_1
...

In this way, we can support the dynamic group creation. The dynamic aspect will arise when the number of ranks is given as a runtime value.
(Note that I didn't include nccl group start/end calls around the independent communication ops since it is beyond of the discussion here.)

Yeah, the dynamic channel creation scenario is not imminent. The issue will come up when we want to support the number of processes as a dynamic value, similarly to OpenMP where the number of processes is a runtime value.
One critical issue I have is there is no easy way to inject a channel to NCCL. I tried to inject a user provided IP address and port into NCCL using NCCL_COMM_ID, but it didn't work; the main reason is NCCL_COMM_ID is used only for the global communicator. To support injecting we need to modify the NCCL source.
If we can create our own repo for a customized NCCL, I'd rather add a NCCL API to create a channel. This would simplify the issue, since the problem is specific to the NCCL environment.

Dynamic channel count is fine - we can pass !util.list to functions and fetch the channels we need.
I'm not sure I see any issues here - what we need from an API perspective doesn't change regardless of how channels are created: we just need a simple setter that allows the hosting layer to provide a list of channels to use.

Maybe I think too much including the hosting layer implementation. :)
The second approach, where we specify the information about the channel participants, has a limitation since we can't create a communicator using the vanilla NCCL. Currently the only way to inject : into NCCL is NCCL_COMM_ID. I tried this and it didn't work well because it is supposed to be used only for creating the global communicator.
The first approach provides a clean separation from the hosting layer and IREE doesn't need to worry about how a channel is created. But it comes with a few things we need to consider.

The hosting layer creates a channel. Now the hosting layer also needs to be linked with NCCL to create a communicator. The IREE runtime already uses the NCCL library, so the situation is like two independent layers are using the same NCCL library. Both must use the same NCCL library.
The hosting layer needs to inspect the code to collect the channels.
Testing becomes difficult since now we need a hosting layer to test. It would be great if we can test our side without deploying any host layer (PJRT or something else).

The root problem that motivated the approaches is that NCCL does not provided a way to broadcast the unique ID to the other processes in the host space. For me, it would be great if NCCL provides a way, just like other communication library, such as MPI. One way is to implement a simple key/value store as an interim solution and treat it as an extension to NCCL but not as a burden for the IREE runtime. (This is mainly to make progress on my side to support the full MHLO ops. We can revisit the first approach as an enhancement step once we have a full PJRT integration.)

I think it's worth the exercise of looking into the NCCL code to demystify things - there's not really any magic in the communicator IDs besides a field literally called magic that's just for consistency checking :P
A root in NCCL is (effectively) just a listening socket - all other participants with rank>0 just connect to that socket. ncclGetUniqueId returns an automatically selected socket addr (random if, random port), while NCCL_COMM_ID lets you specify a socket addr. That's it.
When doing fancy broadcasting/etc as part of bringup all you're doing is letting each process pick its own socket addr (calling ncclGetUniqueId) and then exchanging them, but if instead you assign each process a socket addr (setting NCCL_COMM_ID) you get the same results: each process you want as a root has an assigned socket addr and is listening on it and other processes know about it and connect.
In the code, bootstrapNetInit is what either picks its own socket addr or parses the NCCL_COMM_ID provided - the result is stored in bootstrapNetIfAddr:
https://sourcegraph.com/github.com/NVIDIA/nccl@f3d51667838f7542df8ea32ea4e144d812b3ed7c/-/blob/src/bootstrap.cc?L30-54
The code paths then diverge a bit:
If letting NCCL self-select an address when you call ncclGetUniqueId it uses that bootstrapNetIfAddr from above (which may be from NCCL_COMM_ID!) and calls bootstrapCreateRoot, which is the thing that actually listens on the socket (the most important part):
https://sourcegraph.com/github.com/NVIDIA/nccl@f3d51667838f7542df8ea32ea4e144d812b3ed7c/-/blob/src/bootstrap.cc?L200-201
If specifying an address then ncclGetUniqueId just turns into an identity using the specified address and instead it is ncclCommInitRankDev that calls bootstrapCreateRoot when myrank == 0:
https://sourcegraph.com/github.com/NVIDIA/nccl@f3d5166/-/blob/src/init.cc?L1142-1145&subtree=true
In both cases the only load-bearing thing is that bootstrapCreateRoot is called with the local address and it creates the listening socket.
It'd of course be nice if there was a NCCL API for saying bind to this address (ncclSetUniqueId), but in lieu of that using setenv to set NCCL_COMM_ID, calling ncclGetUniqueId to have NCCL parse that/generate the magic, and then calling ncclCommInitRankDev once gives you precise control over the creation of the listening socket that's required.
 But only somewhat: AFAICT it's only used for sanity checking and the value is semantically meaningless (https://sourcegraph.com/github.com/NVIDIA/nccl@f3d5166/-/blob/src/misc/socket.cc?L427:20&subtree=true). This is where a C API would help but otherwise the NCCL IDs are well-formed and we can poke them:
struct ncclBootstrapHandle {
  uint64_t magic;
  union ncclSocketAddress addr;
};
static_assert(sizeof(struct ncclBootstrapHandle) <= sizeof(ncclUniqueId), "Bootstrap handle is too large to fit inside NCCL unique ID");

So if we call ncclGetUniqueId to parse an address and get back random magic we can then just set the magic to 0/whatever and we have a valid deterministic ncclUniqueId we can use. No need to exchange peer-to-peer after the fact as prior to any child processes being launched we can control the ncclUniqueId of all of them.

Not saying we actually do that (poke magic) but for basic test orchestration it would be enough - whatever is launching the processes knows the address of where each process is being launched (in testing likely all localhost) and can pick whatever ports it wants. Normal bsd sockets stuff - either limit to one process cluster at a time and use fixed ports or do bog standard socket probing to find open port ranges in the orchestration layer. Each process gets a list of all the other addresses/ports as args and can then open/bind communicators as needed. This would work on the command line just fine and you can have a bash script that hardcodes the ports and reproducibly brings up clusters. Sure it won't scale across a datacenter but we aren't trying to scale IREE's testing infra like that anyway - that's for the layers above IREE to do - this is about finding a way to test all this stuff without needing to integrate large projects/build out lots of infrastructure. Testing clusters of network services is classically done like this, and hopefully you can see that all we're doing (in the complex case of multiple roots) is setting up a peer-to-peer topology network service.
Beyond that there's a large spectrum between that simple approach and key-value stores and other heavyweight stuff. Named pipes and such are usually used for things like this in smaller settings (local machine or NFS) and work with (practically) just fopen/fread/fwrite. Moving one step beyond that bsd sockets has zero deps and would let us exchange over remote machines with a single orchestrator address (all children connect to the assigned root and post their ncclUniqueId + read back all the others). It's what NCCL is doing itself so it's not introducing any requirements NCCL doesn't already have.
But I think if wanting to build something more "real" instead of just for testing then we should just use NCCL itself to exchange addresses: the orchestrator can be the root and all children can participate in an all-gather. This doesn't mean the orchestrator needs to link in NCCL and call it directly - it can use the HAL! This would let it work across any backend we have with collectives support (CPU/ROCM/etc) as if we can all-gather a buffer of user data we can also all-gather a buffer of addresses. Interestingly, NCCL uses itself to do some of this kind of work during startup (https://sourcegraph.com/github.com/NVIDIA/nccl@f3d5166/-/blob/src/init.cc?L574&subtree=true). In other words, instead of using MPI or whatnot to pass things around we can use NCCL in the same way via the HAL.
So the orchestrator could create a HAL device, create a channel using iree_hal_channel_create as root (rank=0, count=child count), query its own channel ID (we can have an iree_hal_channel_query_id(iree_byte_span_t out_buffer) method to return it), launch all the child processes with a flag set to the queried ID, and submit a command buffer with iree_hal_command_buffer_collective(...IREE_HAL_COLLECTIVE_KIND_ALL_GATHER...) - each child process would do the same. Now all processes (including the orchestrator) are connected and have each other's NCCL IDs as generated from NCCL itself and that can be used to create any number of other channel groups. This whole thing could be wrapped up in iree/tooling/collective_util.h to make it turn-key in our tools (iree-run-module/iree-benchmark-module/etc). In this model NCCL_COMM_ID is only used for the orchestrator ID and there are zero additional deps. The orchestrator could be in python or whatever calling through the runtime python bindings, though a simple C tool would be easiest.

So now if we have a way for all processes to get all other processes' root IDs we can create arbitrary subgroups as needed by emitting the __set_collective_channels function or something like it. The easiest thing would be to pass in the full set of coordination channels such that we could completely control the behavior in the model itself with an __init_collective_channels(%self_id: i32, %all_participants: !util.list<!hal.channel>). New channels could be created if we add the hal.channel.id query and then implement the TODO for letting us pass that ID on creation: https://github.com/google/iree/blob/5fa81548dd01941ecc3487ed37c36343c4ccf178/compiler/src/iree/compiler/Dialect/HAL/IR/HALOps.td/#L699). This turns the channels we've setup into (expensive) sockets: the code we emit can send/recv/etc to individual participants in whatever way they want. Could look something like:
util.global private @group_1_2 : !hal.channel
func.func @__init_collective_channels(%self_id: i32, %all_participants: !util.list<!hal.channel>) {
  // form a group with participants 1,2, only participants 1 and 2 do this and 1 becomes the root:
  scf.if %self_id == 1 || %self_id == 2 ... {
    %p1 = util.list.get %all_participants[%c1] : !util.list<!hal.channel>
    %p1_id = hal.channel.id %p1 : !hal.channel -> !util.buffer
    %sub_rank = arith.subi %self_id, %c1 : i32  // rebase to [0, 1] ranks
    %group_1_2 = hal.channel.create %p1_id ... rank=%sub_rank : !hal.channel
    util.global.store %group_1_2, @group_1_2 : !hal.channel
  }
}

...but it's just a program and it can do whatever kind of configuration it wants.
The only thing the user does in this case is get the processes participating together and everything else is controlled by the program we emit so no need for side-channel metadata and such.
Now when it comes to hosting layers they can do whatever they want but will bottom out on this. If they want to use MPI to exchange IDs/addresses, or use key-value stores, or protobufs over gRPC, or whatever they can. Instead of using our helper they can call iree_hal_channel_create with params derived in whatever way they can for each participant.
Knowing the exact calling behavior from PJRT would help us figure out a command line tool that could do this for us - I'm imagining iree-launch-multi-device --device=cuda://0 --device=cuda://1 -- iree-run-module --module=module.vmfb --input=.... or something that would play the role of orchestrator by creating the root channel, forking off the post--- binary with the appropriate --device= and root channel ID, and then wait for it to complete - not sure if we want to include sharding of arguments and such in that or not though. Or an iree-launch-cluster that would take addresses and an iree-cluster-server that would listen and fork as needed for multi-host stuff but with effectively the same behavior (launch-cluster would connect to each daemon, send the params, and then they'd all-gather using the launcher address).
I'd estimate it'd take me a day or two to build something like those launchers (I've written 5 iree-* tools and have become exceedingly efficient at it lol), but if we could specify how we wanted them to behave that'd make it easier to ensure it worked for what you needed. We could also then agree on the spec of the function we emit in the compiler for constructing the groups - to start it could just take one channel and use it in place of the default one.

Yes, I did some more exploration about the NCCL calls over the weekend since my initial attempt to workaround to get the uniqueID from NCCL_COMM_ID. I injected a list of address and port pairs and created uniqued IDs in advance, but it didn't work as I expected;
ncclCommInitRankDev() didn't call bootstrapCreateRoot() because when it is called NCCL_COMM_ID is cleared.
So when the socket is open depends on the present of NCCL_COMM_ID. When it is used, a socket is open in ncclCommInitRankDev(), but for the other case, it is open in ncclGetUniqueId().
We may be able to find a solution by calling those two functions with the same NCCL_COMM_ID, but my debugging experience taught me that this can be very hacky knowing that the behavior is really the NCCL's implementation detail. What if the NCCL implementation is changed?
When I searched through the NCCL github issue pages for the right usage of the NCCL_COMM_ID, I learned that its usage is for the global communicator. A user reported that this can't be used for the cases where nodes are in different subnets due to another quirk in implementation details.
I am inclined to a distributed key/value store since its implementation cost is very low. I expect I can implement and integrate one to the IREE CUDA NCCL implementation in a week or two. This also works for all the systems with multiple nodes. So, this can be used for a single-host and multi-host usages. So until we start digging the performance with a real system for a customer use case, I think it can serve us well.
The user command will be like:
kvs_server <port>  # launching in the server
iree-run-module --kvs=<addr>:<port> ... &
iree-run-module --kvs=<addr>:<port> ... &

or using an environmental variable
export IREE_CUDA_NCCL_KVS=<addr>:<port>
...commands...

We can also make the root host to launch it as a service during the runtime.
The client interface to the store is like

connect(addr, port)
get(key)
set(key, value)

This can be made pluggable by using a predefined name for a dynamic library, e.g., `lib-kvs.so, which implements the above functions. The implementation can be a user choice. It can be a shared file in NFS, redis, grpc, socket, MPI, or so on.
This is how the Gloo project made the abstraction.
In summary, I think the key/value store interface is simple, extensible, and cheap to implement (one or two weeks) to augment the NCCL's missing part.
Here is a feature table:

Solution
coverage
performance
implementation cost
Notes

MPI
most but not google3!
high
medium (dlopen)
Nice to have as a debugging tool

Key/Value interface
all
good or high
low (2 weeks with a gRPC impl.)

shared file
single host
low
low (no external deps)
perf varies on FS perf.

NCCL hack
all
high
high (need to define what the hosting layer does.)
Fragile

socket
all
high
can be tricky to support the all environments with different interconnect medium

Once we have a full feature to support TF and JAX use cases, we should definitely revisit this part as performance investigation.

Regarding the multi process launcher, there are some tools we may reuse: mpirun or GNU parallel. There may be more but we can start with these tools first. (mpirun doesn't require the program is built with an MPI library so we can just use it as a launcher program.)
Thanks again for the comments! It is really amusing to see you dig so much in the NCCL library. :) :p


fix: Excess bottom rows not lost post dragging or resizing widgets.

Pull Request Template
Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request.

Description

Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation
and context. List any dependencies that are required for this change.

Fixes # (issue)

if no issue exists, please create an issue and ask the maintainers about this first

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
Please also list any relevant details for your test configuration.

Test A
Test B

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

Test coverage results :test_tube:
:green_circle: Total coverage has increased
// Code coverage diff between base branch:release and head branch: fix/canvas-bottom-row

Status
File
% Stmts
% Branch
% Funcs
% Lines

:green_circle:
total
55.29 (0)
37.14 (0.01)
34.33 (0)
55.81 (0.01)

:green_circle:
app/client/src/components/editorComponents/DropTargetComponent.tsx
89.19 (0.78)
71.15 (5.19)
90.91 (0.91)
88.89 (0.83)

:red_circle:
app/client/src/utils/autocomplete/TernServer.ts
52.71 (-0.23)
40.83 (-0.84)
36.21 (0)
56.74 (-0.25)

@marks0351 any update here, Are we waiting for any discussions. Can we take a call on this?

@somangshu there is another existing bug i found when dev testing this. need some time to fix that too. will move this PR to draft for the time being.

Understood, Also the PR description is not at all descriptive, We should also make sure to do so

This was a partial fix of use cases which were pushed as part of #9054. closing this PR.


La Mulana Remake has texture issues

Please describe your issue as accurately as possible. If you run into a problem with a binary release, make sure to test with latest master as well.
Important: When reporting an issue with a specific game or application, such as crashes or rendering issues, please include log files and a D3D11/D3D9 Apitrace (see https://github.com/apitrace/apitrace) so that the issue can be reproduced.
In order to create a trace for D3D11/D3D10: Run wine apitrace.exe trace -a dxgi YOURGAME.exe.
In order to create a trace for D3D9: Follow https://github.com/Joshua-Ashton/d9vk/wiki/Making-a-Trace.
DO NOT use DXVK together with apitrace!
Software information
La-Mulana (GOG)
System information

GPU: GeForce GTX 960
Driver: 430.34.0
Wine version: 4.13 TKG
DXVK version: https://github.com/Joshua-Ashton/d9vk/commit/b25eaf65e7731d42263b78d091de672cdc791e05

Apitrace file(s)
https://drive.google.com/file/d/10wgBnODbGwOQHWuOj6QQOgtuPHPLnv_u/view?usp=sharing
Log files

d3d9.log: LaMulanaWin_d3d9.log

d3d11.log: N/A

dxgi.log: N/A

Hello. D9VK is producing textures which appear to be incorrect.
D9VK:

Windows:

Thanks.
EDIT: Changed trace to tar.xz.

Looks like the textures are fine in the trace, but the game is now crashing just before the first area.

Looks like this issue is fixed as of https://github.com/Joshua-Ashton/d9vk/commit/0f7f87a75303c4669f27a8d9ea704dc37ad5bae6.
Closing #291.


Opt in policy to use 201 status code for methods named "Create"?

Or document it anyway.

Nah, if you return Created or Created


Issue with Token Not Being Saved in Nuxt After Successful Authentication

Description:
Hello, I encountered an issue. When using authmode = token, after successfully logging in, PHP returns the following response: {"token":"38|DV5bepJbux3wk9qXGqhrtnoN3VWt55lv1J1BlizCc2429b66"}. However, Nuxt does not save the token.

Hello @happyjonny
use the fortify-sanctum package, no config needed and it resolves your issue.


Customised Search input

@AllenFang Do you please have an example of using a custom searchField ? I can't get my input text field to call the right onSearchChange function onKeyUp.

Hey @abdelmoula, did you resolve your issue? And if yes, how?

hey @saesh  yeah basically what I did is to add custom searchField then specify the function to call onKeyup which is props.search. example :
in options add this line
searchField: this.customSearchField,
then create the custom search function :
customSearchField(props) {
return (

);
},

Ah ok, thanks!
I can't find anything on a custom search field in the docs, that is why I am asking. options.searchField is the option prop on BootstrapTable?

Ah ok, thanks!
I can't find anything on a custom search field in the docs. That is why I am asking. options.searchField is the prop on BootstrapTable?

@saesh  yeah the props are defined in BootstrapTable.

thanks @abdelmoula, and @saesh, you can also check here to learn how to custom search, and this is a docs missing, I'll update it, thank you both :)

Document updated http://allenfang.github.io/react-bootstrap-table/custom.html#searchfield
Sorry for forgetting mention here.


Adding Ubuntu release support change.

I had to temp revert ubuntu on c3os master as it seems to not work (see https://github.com/c3os-io/c3os/pull/106 ), @vipsharm did you tried it before extending the changes here?

closing, ubuntu is now tracked


Fix markdown link

Coverage remained the same at 100.0% when pulling 614228cc810e79e9270f48ea2e2acf7877d0e885 on lex111:patch-1 into 48de82ca24d4cb24a464f7cc9e72884a208b9d5c on gitalk:master.


orOnCondition not set OR

I have two tables. For example user and engage(have 2 related fields user1,user2).
When I try write relation:
public function getEngages() {
return $this->hasMany(Engage::className(), ['user1' => 'id'])->orOnCondition(['user2' => $this->id]);
}
it generates code:
SELECT * FROM engage WHERE (user1=1) AND (user2=1)",

this is expected because onCondition is added to where using AND.
What you try to do here is a relation using two different attributes with OR. This is not possible to declare properly because eager loading and JOIN does not work in this case.
If you still want to apply the condition for the simple case of lazy loading you have to use orWhere().

sorry to comment on a closed issue but i want to know why the eager loading fails to recognize the orOnCondition to properly wrap the condition

@fernandezekiel relation definition has  to be generic and not bound to a specific record like it is done here by passing $this->id. You can not turn this into an SQL query for eager loading.
The relation is defined using the fields user1 and id. This will give you a set of records that are fixed related records, onCondition is to further reduce this set of related records by additional conditions. It is not meant to replace or extend the relation definition thus it is added to the original relation condition with AND.
orOnCondition() in this case will add user2 = 1 condition to the exising onCondition. As there is none that will result in simply user2 = 1 to be the onCondition.
hope thats clear :)

i have a slightly difference case, i'm not even passing $this->id
here's my relation
    public function getAuthRoles()
    {
        return $this->hasMany(AuthRole::className(), ['id' => 'auth_role_id'])->orOnCondition(['auth_role.title' => 'Authenticated'])->via('authRoleUsers');
    }

it produces the same kind of SQL as if i used andOnCondtion

this is normal because orOncondition will adjust the condition that is additinal to the condition that defines the relation. As you have not called onCondition before it, orOnCondition can not add anything.
return $this->hasMany(AuthRole::className(), ['id' => 'auth_role_id'])->onCondition(['a' => 'b'])->orOnCondition(['auth_role.title' => 'Authenticated'])->via('authRoleUsers');

Would give  you a query like
JOIN ... ON id = auth_role_id AND (a= 'b' OR auth_role.title = 'Authenticated')

+1 Same issue as @fernandezekiel
There is no 'OR' option immediately after the initial where clause
e.g.
return $this->hasOne(Modelname::className(), [])->orOnCondition(['variable' => 'value']);
SELECT * FROM schema.tablename WHERE (0=1) AND "variable" = 'value'
--
Note:
orOnCondition produces AND
I want OR
e.g.
SELECT * FROM schema.tablename WHERE (0=1) OR "variable" = 'value'


removing EventLoopGroup and ServerChannelFactory as injected depenenc…

Experimental PR to test performance after removing EventLoopGroup /  ServerChannelFactory as provided dependency in Server.scala

Codecov Report

Merging #1122 (2c7c158) into main (0dca97d) will decrease coverage by 1.28%.
The diff coverage is 16.32%.

@@            Coverage Diff             @@
##             main    #1122      +/-   ##
==========================================
- Coverage   58.02%   56.73%   -1.29%
==========================================
  Files          74       74
  Lines        2368     2464      +96
  Branches       70       84      +14
==========================================
+ Hits         1374     1398      +24
- Misses        994     1066      +72

Impacted Files
Coverage Δ

zio-http/src/main/scala/zhttp/service/Server.scala
41.46% <14.28%> (-6.43%)
:arrow_down:

...ala/zhttp/service/transport/TransportFactory.scala
17.14% <17.14%> (ø)

zio-http/src/main/scala/zhttp/http/Http.scala
65.38% <0.00%> (-9.30%)
:arrow_down:

zio-http/src/main/scala/zhttp/http/HExit.scala
71.87% <0.00%> (-4.13%)
:arrow_down:

...io-http/src/main/scala/zhttp/service/Handler.scala
75.00% <0.00%> (-3.27%)
:arrow_down:

...main/scala/zhttp/http/headers/HeaderModifier.scala
17.44% <0.00%> (-1.17%)
:arrow_down:

...io-http/src/main/scala/zhttp/http/IsResponse.scala

zio-http/src/main/scala/zhttp/service/Client.scala
86.20% <0.00%> (+1.35%)
:arrow_up:

zio-http/src/main/scala/zhttp/http/Response.scala
85.50% <0.00%> (+2.96%)
:arrow_up:

Continue to review full report at Codecov.

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


Add tactile_paving:colour to moreFields of kerb.json

Description, Motivation & Context
Tactile paving often comes in distinct colours (most often yellow and red). These colours can be used by people with residual vision to know if there is a traffic signal (red paving) or not (yellow paving). Of course this may depend on local legislation, in some countries both colours might be used interchangeably.
This is why I'm putting it in more fields. It's also not easy to survey it from aerials, but it can be surveyed by EveryDoor users (if they get this field from here).
Related issues
None
Links and data
Relevant OSM Wiki links:
No wiki page currently
Relevant tag usage stats:
1654 usages globally, as of 2024-10-22 (https://taginfo.openstreetmap.org/keys/tactile_paving%3Acolour#overview)
Checklist and Test-Documentation Template
Read on to get your PR merged faster…
Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.
This is how it works:

After you submit your PR, the system will create a preview and comment on your PR:

🍱 You can preview the tagging presets of this pull request here.
If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

Once the preview is ready, use it to test your changes.

Now copy the snippet below into a new comment and fill out the blanks.

Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/tordans/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

Test-Documentation
Preview links & Sidebar Screenshots

Search
N/A
Info-i
It should get the value from the item, if I'm not mistaken, https://wiki.openstreetmap.org/wiki/Item:Q22646.

Wording

[x] American English
[x] name, aliases (if present) use Title Case
[N/A] terms (if present) use lower case, sorted A-Z

In general that looks good. But I am not sure if this is a field that we would want all countries to have. In Germany all tactile pavings are white, so this would not be something that I would want to promote to add to the data. This is a "moreFields" field, so we don't really promote it (in iD)…
Does anyone know an easy way to analyse usage per country? In https://github.com/openstreetmap/id-tagging-schema/pull/1201 we have those two query that do something similar, maybe someone can modify them to be used for cases like this?
https://qlever.cs.uni-freiburg.de/osm-planet/ZD2Ojb , https://qlever.cs.uni-freiburg.de/osm-planet/SEaFiO
I have the same question for https://github.com/openstreetmap/id-tagging-schema/pull/1327 to look at country data for the key. It's a bit more pressing there because its a field, not a moreField.

It isn't needed currently. It can be seen from local Taginfo instances, since it is used in very few places. Mostly concentrated a single city or two in each country.
Data as of 2024-12-27
USA - 970
Hong Kong - 969
Bulgaria - 464
Rest of the world - 134

I think we should add this as a preset that is only enabled in opt in countries. But I don't see any reason not to merge this once we have it focused like this.


Getter/Setter, inheritance and $ReadOnly interacting incorrectly

Whenever you inherit from a class (doesn't matter what the parent class contains. And use getter/setter - or even just a getter- you cannot access these functions when passing the object with $ReadOnly
export class SomeThing{
}

class Test extends SomeThing {
    get name(): string {
        return "test";
    }
}

function test(data: $ReadOnly<Test>) {
    console.log(data.name)
}

Gives this error:

Error:(28, 22) Cannot get data.name because property name is missing in  Test [1].

Removing the inheritance - or removing the $ReadOnly<> modifier makes it work. While i expect it to just work
Flow-bin version: 0.196.3

PS: try-flow is not working on my system right now, but the example is simple enough to check directly I think?


Credentials.anonymous(reuseExisting = true) not work

How frequently does the bug occur?
Always
Description
Expected results
use the same anonymous user ID with every session
Actual Results
every time I log in with the anonymous user Realm generates a new user with a different ID so I can not trace the user
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
var app by mutableStateOf( App.create("appid"))
val anonymousCredentials = Credentials.anonymous(reuseExisting = true)
user = app.login(anonymousCredentials)
println("userId"+user!!.id)
Version
kotlin SDK 1.16.0
What Atlas App Services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
No
Platform OS and version(s)
windows 10
Build environment
Android Studio version: ...
Android Build Tools version: ...
Gradle version: ...

This is a duplicate of https://github.com/realm/realm-core/issues/7709.


Float Unsigned not listed on mysql

System information:

Windows 10
Version <IP_ADDRESS>008302047
N/A

Connection specification:

mySQL
MariaDB JDBC driver
no

When I'll append a new field on table structure on mysql cannot select float unsigned type
To reproduce open any table in a Mysql database and add Create New Column and will notice the Data Type list

Float unsigned is going to be removed from MySQL acccording the article https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html.

Hmmm...I confess I don't know this update for future versions.
But how DBeaver will be deal with old versions of mysql/maria ?
Probably if is possible, they need to check version in use, to show/remove the option.

Thank you for the report. The ticket is added in future releases.

Data type list is provided by MySQL JDBC driver. Thus it depends on driver version.
Anyhow, you can specify FLOAT UNSIGNED as column type manually.
Potentially we could add extra data types to MySQL connections. But I don't think we should as actual list of supported type depends on too many factors (server version, fork type, driver configuration, etc).


This would make a beautiful custom element!

Could simplify your initialization code to make a declarative baseline:
<dual-range-input>
  <input type="range" min="0" max="100" step="1" value="25" id="min" />
  <input type="range" min="0" max="100" step="1" value="75" id="max" />
</dual-range-input>

https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements

I got interested in the complexity of making it work for any number of ranges, not just two. So here is a pen, and it is an HTML custom element.
https://codepen.io/Merri/pen/MYgKrJV

At the moment of writing it is not perfect yet, but gives very similar result. The pen uses only vanilla CSS and vanilla JS. I retained compatible CSS variable naming style, but there are a few differences due to simplifying / harmonizing things.
<range-inputs min="2" max="19">
    <input type="range" value="4">
    <input type="range" value="9" style="--dri-track-end-color: crimson;">
    <input type="range" value="11" style="--dri-track-start-color: crimson;">
    <input type="range" value="16">
</range-inputs>

Things still to fix:

Notice when new ranges are added/removed. This to support component based UI libraries that mangle the DOM.
The Math floor vs ceil logic to allow setting all values to same. Currently only using floor. To work correctly I think it should use ceil when the value increases, and floor when it decreases.
I reduced complexity of the gradient to a simple percentage and it currently doesn't account for the thumb. So maybe positioned a bit incorrectly!

It also probably has some odd solutions in it.

Hey,
I'll be honest, I don't really see the advantage of a web component. But I'm willing to publish one along the current version.
For now, I added a simple recipe for folks that want to use a web component.
https://github.com/Stanko/dual-range-input?tab=readme-ov-file#webcomponent
Do you think exposing this in the library would be enough?
Haha this is insane @Merri, thank you for sharing!

You can avoid a lot of React duplication by using a custom element: https://stackblitz.com/edit/vitejs-vite-udntz7
Just the component code here, and it is enough to make React work with the custom element:
export const DualRangeInput = forwardRef<RangeInputs, Props>(function (
	{ className, onValues, initialValue1, initialValue2, value1, value2, ...props },
	ref
) {
	const input1 = useRef<HTMLInputElement>(null)
	const input2 = useRef<HTMLInputElement>(null)

	const onChange = useCallback(() => {
		if (onValues) {
			onValues({ value1: Number(input1.current?.value ?? NaN), value2: Number(input2.current?.value ?? NaN) })
		}
	}, [onValues])

	return (
		<range-inputs ref={ref} class={className} {...props}>
			<input
				ref={input1}
				type="range"
				step={props.step}
				defaultValue={initialValue1}
				onChange={onChange}
				value={value1}
			/>
			<input
				ref={input2}
				type="range"
				step={props.step}
				defaultValue={initialValue2}
				onChange={onChange}
				value={value2}
			/>
		</range-inputs>
	)
})

In my thinking when it comes to anything that can be implemented "native-like" React's role is:

Server side HTML
Developer experience, convenience

So just a syntactic sugar layer to make things easier to use.


problems with v1.0.0-RC10

Hi,
While trying to update to v1.0.0-RC10 I noticed a problem.
I think it might be related to redis, but I don't know how exactly.
$product object is cached in redis for 60 seconds
            $product_data = json_decode(strip_tags(LocalizerService::getLocalized($product->getMasterData()->getCurrent()->getDescription(), $request->getLocale())), true);

            if (null === $product_data) {
                throw new NotFoundHttpException('no description for product id ('.$product_id.')');
            }

If I visit the product page sometimes I get this error, sometimes no.
This behaviour doesn't occur in  v1.0.0-RC9.
Any ideas?
Best regards,
Michal

I would need more detailed information about your problem. We could start a direct chat using our public support channel: https://www.hipchat.com/gCOStFSHE

Okay, after some analysis we found the problem.
In RC10 I fixed a bug for direct access to a language in the LocalizedString object. Now the LocalizedString correctly uses the Graceful-Flag. This broke the workaround code in the getLocalized function of the LocalizerService written by @eventhorizonpl .
To fix the issue he now uses something like this:
function getLocalized($object, $locale)
{
    $fallbackLocale = 'fr';
    $context = Context::of()->setLanguages([$locale, $fallbackLocale])->setGraceful(true);

    return (string)$object->get($context);
}


Isaacs, Reginald R.: date of birth + death are missing

https://jila.zb.uzh.ch/resource/actor:E36972CB-BAF4-387F-908D-1C54C89F1A56
The dates are present in the GND but seem to have been lost in JILA?

Updated

The dates are still missing?

They show up at my end. What are you seeing?

 Seems to be solved.

This issue can be closed, thanks

thanks,


The loss scale

@lidq92 Thanks for your sharing. I found that :
if self.loss_type == 'mixed':             loss = [loss_a(mapped_score[d], y[d]) + loss_m(relative_score[d], y[d]) +                         F.l1_loss(aligned_score[d], y[d]) / self.scale[d] for d in range(len(y))]
mapped_score[d]：0--1
mapped_score[d]：0--1
aligned_score[d]：1--5
y：1--5
The scale is not uniform, do you need to scale before calculating? I can't understand why the first and second terms are not divided by self.scale[d], but the third term is divided by self.scale[d]. Thank you very much!!

I found that the values are the same before and after normalization.I closed the issue.
min_y = Info['scores'][0, :].min() loss_a(mapped_score[d], y[d]) = loss_a(mapped_score[d], (y[d]-min_y)/self.scale[d] )
loss_m(relative_score[d], y[d]) = loss_m(relative_score[d], (y[d]-min_y)/self.scale[d])
F.l1_loss(aligned_score[d], y[d]) / self.scale[d]        = F.l1_loss((aligned_score[d] - min_y)/self.scale[d], (y[d]-min_y)/self.scale[d]))

@ciwei123 The reason is that loss_a and loss_m are range-independent.


-p package_name not working as it tests all packages

Hi!
I tried the following commands to make tarpaulin only test a certain package of my workspace.

cargo tarpaulin --skip-clean -p myapp-import --workspace
cargo tarpaulin --skip-clean -p myapp-import
cd import && cargo tarpaulin --skip-clean -p myapp-import --exclude-files ../*

Output:
user@Air-von-user myapp % cargo tarpaulin --skip-clean -p myapp-import --workspace
Jan 07 13:46:07.314  INFO cargo_tarpaulin::config: Creating config
Jan 07 13:46:07.803  INFO cargo_tarpaulin: Running Tarpaulin
Jan 07 13:46:07.803  INFO cargo_tarpaulin: Building project
warning: /Users/user/Documents/Code/myapp/calc/Cargo.toml: unused manifest key: dependencies.serde_json.ref
    Finished test [unoptimized + debuginfo] target(s) in 0.31s
Jan 07 13:46:14.258  INFO cargo_tarpaulin::process_handling: running /Users/user/Documents/Code/myapp/target/debug/deps/myapp_calc-020fc14a34535aa8
Jan 07 13:46:14.258  INFO cargo_tarpaulin::process_handling: Setting LLVM_PROFILE_FILE

running 21 tests
test calc::test_parse_dec ... ok
...

Workspace Cargo.toml
[workspace]
members = [
    "calc",
    "storage",
    "import",
    "wasm_app"
]
exclude = ["wasm_app"]
resolver = "2"

import/Cargo.toml
[package]
name = "myapp-import"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

Versions:
cargo-tarpaulin-tarpaulin 0.27.2
macOS 14.2.1 (23C71)

So I've tested out cargo tarpaulin --skip-clean -p myapp-import with a project with your configuration and it works fine. Maybe check for something like a tarpaulin.config that may interfere or rerun and report back if it's still an issue.
--workspace will always cause all tests in a workspace to be ran so you don't want that! Also, if your workspace crate uses other crates in the workspace as dependencies you may see them pop up in results but it still shouldn't run their tests.
cargo tarpaulin --skip-clean -p myapp-import
Apr 27 12:02:05.639  INFO cargo_tarpaulin::config: Creating config
Apr 27 12:02:05.656  INFO cargo_tarpaulin: Running Tarpaulin
Apr 27 12:02:05.657  INFO cargo_tarpaulin: Building project
    Finished test [unoptimized + debuginfo] target(s) in 0.00s
Apr 27 12:02:05.714  INFO cargo_tarpaulin::process_handling::linux: Launching test
Apr 27 12:02:05.715  INFO cargo_tarpaulin::process_handling: running /home/daniel/personal/meta/dummy/target/debug/deps/myapp_import-50e306123074ea22

running 1 test
test tests::it_works ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

Apr 27 12:02:06.401  INFO cargo_tarpaulin::report: Coverage Results:
|| Uncovered Lines:
|| Tested/Total Lines:
|| import/src/lib.rs: 2/2 +0.00%
||
100.00% coverage, 2/2 lines covered, +0.00% change in coverage


[cognitive] update dev_requirements for ink recognizer

Currently breaking the CI build

Can one of the admins verify this patch?

will be fixed in #8672


Remove temporary switch 'dwarfeh'

It was introduced in P.R. #5305 to help debugging dwarfeh,
however it was supposed to be a temporary switch, but made it into
a release.  Some tests that started to depend on it where also amended.
Luckily it was never documented so we just remove it.
@WalterBright : This isn't a revert of your P.R. since there are two changes (This looks like a bugfix and this isn't 100% related to the switch) which seemed unrelated to the switch itself

There's at least one open regression bug filed due to the switch to dwarf eh.  I don't think a release or two of allowing a command-line switch to exist to fall back to the old way is a problem, rather actually a good idea.

I agree, however DWARF EH is enabled by default with no way to disable it. This switch has no effect on what happens as you can see in the backend code. It is just ignored.

Yup.. I didn't look deeper, sorry.  I'd be more in favor of fixing it so the switch worked than removing it.

Do we want to continue to support DM_EH ? It looks like we're on the way to drop it, as only Win64, OpenBSD and Solaris are still using it.
Also the purpose of the switch was to enable DWARF conditionally during debugging. I guess @WalterBright had good reasons not to provide an user-facing mean to switch back to DM_EH once Dwarf support was in ?

After https://github.com/D-Programming-Language/dmd/pull/5510 is pulled, I'm fine with pulling this one. DM_EH will continue as Win64 uses it, and we may need it to support some random platform that doesn't have Dwarf.

There's at least one open regression bug filed due to the switch to dwarf eh.

I presume you mean https://issues.dlang.org/show_bug.cgi?id=15779, but that isn't about the -dwarfeh compiler switch.

I don't think a release or two of allowing a command-line switch to exist to fall back to the old way is a problem, rather actually a good idea.

I don't see a further point to the switch, and any code that decided to throw an undocumented switch is not supported.

That's the bug, and it's not directly about the switch, but if the switch worked, then the regression would have an easy work around until fixed.  Sadly, it doesn't and so there isn't.

Well there's an easy workaround for this one: Remove the -gx switch.
Also, there might be some other bug in -gx, as @marenz mentioned he had two ref bool parameter being swapped.

but if the switch worked, then the regression would have an easy work around until fixed.

The switch enables dwarf eh, it does not disable it, so it would be of no use for the regression. But a simpler workaround is available - don't use -gx.

So it fails under archs which don't support DWARFEH because it produces a different error message.
How do you feel about excluding those from the test at the moment (printing a message) ?

Auto-merge toggled on

Auto-merge toggled off

Until it actually passes on all platforms, no reason to be giving it higher priority build status.

Blocked on https://github.com/D-Programming-Language/dmd/pull/5510#issuecomment-196453739

Need to fix the Darwin_64_32 target, seems to be a checkwhitespace problem. Otherwise looks ready.

@WalterBright See my comment here.
Dwarf EH wasn't enabled by default on this platform, and when I tried to, it resulted in a segfault in checkwhitespace. On the last run it seemed to be a bus error. Nevertheless, I don't see how that could be caused by removing -dwarfeh, so I assume it's a problem in the implementation on OSX32.

I thought it was enabled. Looks like I have more work to do.

Rebased on master / fixed / green.

Auto-merge toggled on


[nginx-ingress-controller]: Avoid sync without a reachable master

fixes #1233

@bprashanth this fixes the revert

LGTM


Add a disk

I reviewed the docs but didn't see anyway to configure an additional disk.  I need to test an LVM role and I need a second disk device.  Is this possible?

On top of the issue @apatard mentioned, the biggest caveat of passing commands to VirtualBox directly is that you would have to write some extra code to clean up. And running molecule prepare again will fail because the file already exists, and createmedium and createhd commands do not have flags to overwrite the file or skip creation gracefully.
I found it best to use Vagrant to configure extra disks. One line to add a 10GB disk that will be managed by Vagrant:
instance_raw_config_args:
  - 'vm.disk :disk, name: "mySmallDisk", size: "10GB"'

Vagrant documentation: https://developer.hashicorp.com/vagrant/docs/disks/configuration


Option to delete domains

If you create a domain in the new ui, but you want to delete it you are not able to do so because there isn't a way to do it in the ui.

Wasn't this in @broham89's original designs as a trashcan/X beside the edit icon?

Yes, when the user goes into the create/edit page in domain page there should be a delete and warning  at the bottom.

Closing in favor of #399


Implement hook timeout guard with Promise.race

Fixes #155

@nael-fridhi Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@nael-fridhi Thank you for signing the Contributor License Agreement!

Slightly edited this PR (but could not edit it myself). Now superseded with https://github.com/projectriff/node-function-invoker/pull/157.


Highligher for array of points?

Often you have arrays of points, representing polygons.
Do you think it'd be possible to detect such arrays in the output buffer and create a highlighter for that? Hover over each point is nice to pick out individual points, but maybe if you hovered over the array brackets it displayed everything?
Challenge is that some points you want to just display a point set, some times segments. Maybe simple toggle modes in the visualizer?

It would be feasible to add a regexp for arrays of points (containing nothing but points). But then you also want to know which coordinates correspond to a specific visualized point.

but maybe if you hovered over the array brackets it displayed everything?
That is a good idea.

I need to poke into your visualisation engine for this extension. I expect when I start poking more into this I'll want to add more visualizers. (For the new InstancePath etc.)
I'd rather send our PRs than open requests.

It would probably be best to have a better extensible highlighter infrastructure (use registered highlighters instead of a if conditions).
It's a bit tricky, because it is scattered in several places:

New entities are added in ace/mode-ruby_sketchup to make the tokenizer recognize them as a token (→  element) instead of splitting them into several tokens.
The highlighter uses regular expressions to find tokens that can be highlighted and extract the data/identifier (entity id or coordinates)
The highlighter adds event listeners so that hovering such tokens passes the data/id to Ruby.

Arrays cannot be recognized by regular expressions because they stretch over multiple html elements (multiple tokens). I have some working code that uses a different approach and traverses the html nodes.

Added branch feature-highlight_array

Merged feature branch with commit eb18ea953fc552b1a9fe1433f67606da39886a68


refactor: replace num dependency with num-traits

Summary
closes #17
Content

Scope:

[x] Code

Type of change:

[x] Refactor

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.11%. Comparing base (c19fb8a) to head (110c9cf).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk      #18      +/-   ##
==========================================
+ Coverage   78.04%   78.11%   +0.07%
==========================================
  Files           3        3
  Lines         296      297       +1
==========================================
+ Hits          231      232       +1
  Misses         65       65

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Stripe bindings v1.20.2 break Stripe Mock

Test failures:
  1) StripeMock::Instance behaves like Card Token Mocking Direct Token Creation generates and reads a card token for update customer
     Failure/Error: cus.save
     NoMethodError:
       undefined method `delete_if' for nil:NilClass
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     # ./lib/stripe_mock/request_handlers/customers.rb:49:in `update_customer'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:32:in `block (3 levels) in <top (required)>'

  2) StripeMock::Instance behaves like Card Token Mocking Stripe::Token generates and reads a card token for update customer
     Failure/Error: cus.save
     NoMethodError:
       undefined method `delete_if' for nil:NilClass
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     # ./lib/stripe_mock/request_handlers/customers.rb:49:in `update_customer'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:81:in `block (3 levels) in <top (required)>'

  3) StripeMock::Instance behaves like Card Token Mocking Stripe::Token generates a card token created from customer
     Failure/Error: cus.save
     NoMethodError:
       undefined method `delete_if' for nil:NilClass
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     # ./lib/stripe_mock/request_handlers/customers.rb:49:in `update_customer'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:100:in `block (3 levels) in <top (required)>'

  4) StripeMock::Instance behaves like Customer API updates a stripe customer's card
     Failure/Error: original.save
     NoMethodError:
       undefined method `delete_if' for nil:NilClass
     Shared Example Group: "Customer API" called from ./spec/support/stripe_examples.rb:13
     # ./lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     # ./lib/stripe_mock/request_handlers/customers.rb:49:in `update_customer'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/customer_examples.rb:226:in `block (2 levels) in <top (required)>'

  5) StripeMock::Instance behaves like Invoice API updating an invoice updates a stripe invoice
     Failure/Error: invoice.save
     TypeError:
       0 is not a symbol
     Shared Example Group: "Invoice API" called from ./spec/support/stripe_examples.rb:15
     # ./spec/shared_stripe_examples/invoice_examples.rb:35:in `block (3 levels) in <top (required)>'

  6) StripeMock::Instance behaves like Customer Subscriptions updating a subscription overrides trial length when trial end is set
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/instance.rb:104:in `assert_existence'
     # ./lib/stripe_mock/request_handlers/subscriptions.rb:67:in `update_subscription'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:378:in `block (3 levels) in <top (required)>'

  7) StripeMock::Instance behaves like Customer Subscriptions updating a subscription returns without a trial when trial_end is set to 'now'
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/instance.rb:104:in `assert_existence'
     # ./lib/stripe_mock/request_handlers/subscriptions.rb:67:in `update_subscription'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:392:in `block (3 levels) in <top (required)>'

  8) StripeMock::Instance behaves like Customer Subscriptions updating a subscription changes an active subscription to a trial when trial_end is set
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/instance.rb:104:in `assert_existence'
     # ./lib/stripe_mock/request_handlers/subscriptions.rb:67:in `update_subscription'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:409:in `block (3 levels) in <top (required)>'

  9) StripeMock::Instance behaves like Customer Subscriptions updating a subscription raises error when trial_end is not an integer or 'now'
     Failure/Error: expect { sub.save }.to raise_error {|e|

       expected: 400
            got: 404

       (compared using ==)
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./spec/shared_stripe_examples/subscription_examples.rb:426:in `block (3 levels) in <top (required)>'

  10) StripeMock::Instance behaves like Customer Subscriptions metadata creates a stripe customer and subscribes them to a plan with meta data
     Failure/Error: expect(subscription.save).to be_a Stripe::Subscription
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/instance.rb:104:in `assert_existence'
     # ./lib/stripe_mock/request_handlers/subscriptions.rb:67:in `update_subscription'
     # ./lib/stripe_mock/instance.rb:83:in `mock_request'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:582:in `block (3 levels) in <top (required)>'

  11) StripeMock Server behaves like Card Token Mocking Direct Token Creation generates and reads a card token for update customer
     Failure/Error: cus.save
     Jimson::Client::Error::ServerError:
       Server error -32099: Server application error: undefined method `delete_if' for nil:NilClass at /Users/peter/devel/stripe-ruby-mock/lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:32:in `block (3 levels) in <top (required)>'

  12) StripeMock Server behaves like Card Token Mocking Stripe::Token generates and reads a card token for update customer
     Failure/Error: cus.save
     Jimson::Client::Error::ServerError:
       Server error -32099: Server application error: undefined method `delete_if' for nil:NilClass at /Users/peter/devel/stripe-ruby-mock/lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:81:in `block (3 levels) in <top (required)>'

  13) StripeMock Server behaves like Card Token Mocking Stripe::Token generates a card token created from customer
     Failure/Error: cus.save
     Jimson::Client::Error::ServerError:
       Server error -32099: Server application error: undefined method `delete_if' for nil:NilClass at /Users/peter/devel/stripe-ruby-mock/lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     Shared Example Group: "Card Token Mocking" called from ./spec/support/stripe_examples.rb:9
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/card_token_examples.rb:100:in `block (3 levels) in <top (required)>'

  14) StripeMock Server behaves like Customer API updates a stripe customer's card
     Failure/Error: original.save
     Jimson::Client::Error::ServerError:
       Server error -32099: Server application error: undefined method `delete_if' for nil:NilClass at /Users/peter/devel/stripe-ruby-mock/lib/stripe_mock/request_handlers/helpers/card_helpers.rb:27:in `add_card_to_object'
     Shared Example Group: "Customer API" called from ./spec/support/stripe_examples.rb:13
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/customer_examples.rb:226:in `block (2 levels) in <top (required)>'

  15) StripeMock Server behaves like Customer Subscriptions updating a subscription overrides trial length when trial end is set
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/client.rb:20:in `block (2 levels) in mock_request'
     # ./lib/stripe_mock/client.rb:17:in `tap'
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:378:in `block (3 levels) in <top (required)>'

  16) StripeMock Server behaves like Customer Subscriptions updating a subscription returns without a trial when trial_end is set to 'now'
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/client.rb:20:in `block (2 levels) in mock_request'
     # ./lib/stripe_mock/client.rb:17:in `tap'
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:392:in `block (3 levels) in <top (required)>'

  17) StripeMock Server behaves like Customer Subscriptions updating a subscription changes an active subscription to a trial when trial_end is set
     Failure/Error: sub.save
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/client.rb:20:in `block (2 levels) in mock_request'
     # ./lib/stripe_mock/client.rb:17:in `tap'
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:409:in `block (3 levels) in <top (required)>'

  18) StripeMock Server behaves like Customer Subscriptions updating a subscription raises error when trial_end is not an integer or 'now'
     Failure/Error: expect { sub.save }.to raise_error {|e|

       expected: 400
            got: 404

       (compared using ==)
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./spec/shared_stripe_examples/subscription_examples.rb:426:in `block (3 levels) in <top (required)>'

  19) StripeMock Server behaves like Customer Subscriptions metadata creates a stripe customer and subscribes them to a plan with meta data
     Failure/Error: expect(subscription.save).to be_a Stripe::Subscription
     Stripe::InvalidRequestError:
       No such plan: {}
     Shared Example Group: "Customer Subscriptions" called from ./spec/support/stripe_examples.rb:22
     # ./lib/stripe_mock/client.rb:20:in `block (2 levels) in mock_request'
     # ./lib/stripe_mock/client.rb:17:in `tap'
     # ./lib/stripe_mock/client.rb:17:in `block in mock_request'
     # ./lib/stripe_mock/client.rb:86:in `timeout_wrap'
     # ./lib/stripe_mock/client.rb:16:in `mock_request'
     # ./lib/stripe_mock/api/client.rb:35:in `redirect_to_mock_server'
     # ./lib/stripe_mock/api/instance.rb:22:in `call'
     # ./lib/stripe_mock/api/instance.rb:22:in `block in alias_stripe_method'
     # ./spec/shared_stripe_examples/subscription_examples.rb:582:in `block (3 levels) in <top (required)>'

Finished in 31.62 seconds (files took 0.91173 seconds to load)
490 examples, 19 failures, 2 pending

Failed examples:

rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Card Token Mocking Direct Token Creation generates and reads a card token for update customer
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Card Token Mocking Stripe::Token generates and reads a card token for update customer
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Card Token Mocking Stripe::Token generates a card token created from customer
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer API updates a stripe customer's card
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Invoice API updating an invoice updates a stripe invoice
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer Subscriptions updating a subscription overrides trial length when trial end is set
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer Subscriptions updating a subscription returns without a trial when trial_end is set to 'now'
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer Subscriptions updating a subscription changes an active subscription to a trial when trial_end is set
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer Subscriptions updating a subscription raises error when trial_end is not an integer or 'now'
rspec ./spec/instance_spec.rb:4 # StripeMock::Instance behaves like Customer Subscriptions metadata creates a stripe customer and subscribes them to a plan with meta data
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Card Token Mocking Direct Token Creation generates and reads a card token for update customer
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Card Token Mocking Stripe::Token generates and reads a card token for update customer
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Card Token Mocking Stripe::Token generates a card token created from customer
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer API updates a stripe customer's card
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer Subscriptions updating a subscription overrides trial length when trial end is set
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer Subscriptions updating a subscription returns without a trial when trial_end is set to 'now'
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer Subscriptions updating a subscription changes an active subscription to a trial when trial_end is set
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer Subscriptions updating a subscription raises error when trial_end is not an integer or 'now'
rspec ./spec/server_spec.rb:4 # StripeMock Server behaves like Customer Subscriptions metadata creates a stripe customer and subscribes them to a plan with meta data

The breaking change was introduced in stripe/stripe-ruby#217, specifically in https://github.com/stripe/stripe-ruby/commit/03abd88f0c4d15f466f18b1d324d57489db2a51b. I haven't narrowed down exactly what the problem is, but I suspect we're just no longer handling nested hashes like the parent code expects.

Looks like I'm seeing the same sorts of test failures.

Yep, I'm getting this too.
Interesting/possibly-related bit: I get a different error when I try an immediate fetch and save:
[7] website(#<Subscriptions::UpdateService>) »  Stripe::Customer.retrieve('test_cus_3').save
TypeError: 0 is not a symbol
from /home/theoretick/.gem/ruby/2.1.2/gems/stripe-1.20.3/lib/stripe/stripe_object.rb:215:in `define_method'

From what I can tell it is some issue with how stripe-ruby-mock is passing the serialized values to the update action:
From: /home/theoretick/.gem/ruby/2.1.2/gems/stripe-1.20.3/lib/stripe/api_operations/update.rb @ line 11 Stripe::APIOperations::Update#save:

     4: def save(params={})
     5:   values = self.class.serialize_params(self).merge(params)
     6:
     7:   if values.length > 0
     8:     values.delete(:id)
     9:
    10:     response, opts = request(:post, url, values)
 => 11:     binding.pry
    12:     refresh_from(response, opts)
    13:   end
    14:   self
    15: end

[1] website(#<Stripe::Customer>  »  values
=> {
           :card => "test_tok_5",
        :sources => {
    :data => nil
  },
  :subscriptions => {
    :data => {
      0 => {
            :plan => {},
        :metadata => {}
      }
    }
  }
}
[2] website(#<Stripe::Customer>) »  response
=> {
            :email =><EMAIL_ADDRESS>      :description => "a description",
           :object => "customer",
          :created =><PHONE_NUMBER>,
               :id => "test_cus_3",
         :livemode => false,
       :delinquent => false,
         :discount => nil,
  :account_balance => 0,
          :sources => {
    :data => nil
  },
    :subscriptions => {
    :data => {
      0 => {
            :plan => {},
        :metadata => {}
      }
    }
  },
   :default_source => "test_cc_2",
             :card => "test_tok_5"
}

As can be seen above subscriptions.data is a hash, not an array.  This eventually hits convert_to_stripe_object and freaks out trying to dynamically create a method with 0, leading to the above TypeError

:wave: Any progress here?

all this errors already fixed in stripe-1.21.0 branch. Master branch still working on stripe 1.20.1. I recommend  switch to new branch or wait merging 1.21.0 to master.

I'm still receiving the "0 is not a symbol" error when I update a user with a new valid source/credit card token on the stripe-1.21.0 branch. I'm using stripe 1.21.0. Here's the code I'm using:
token = stripe_helper.generate_card_token(number: '4012888888881881')
customer = Stripe::Customer.create({source: token, email<EMAIL_ADDRESS>customer = Stripe::Customer.retrieve(customer.id)
customer.source = stripe_helper.generate_card_token(number: '4242424242424242')
customer.save #error

@psusmars I just ran this code, exactly as yours, and it works perfectly :
token = stripe_helper.generate_card_token(number: '4012888888881881')
customer = Stripe::Customer.create({source: token, email<EMAIL_ADDRESS>customer = Stripe::Customer.retrieve(customer.id)
customer.source = stripe_helper.generate_card_token(number: '4242424242424242')
customer.save
=> #<Stripe::Customer:0x3fd26838d914 id=test_cus_5> JSON: {
  "id": "test_cus_5",
  "email"<EMAIL_ADDRESS>  "description": "an auto-generated stripe customer data mock",
  etc.

May I ask, is this issue resolved for you, and if not .. can you please show me the code you are running, and its results ?  Thank You.

@kathyonu I pulled out my exact scenario with any calls that I make to stripe:
Stripe::Plan.create(
  id: "XXX",
  amount: 1200,
  currency: 'usd',
  interval: 'month',
  name: "test",
)
customer_attributes = {
                description: "TEST",
                email<EMAIL_ADDRESS>                source:  stripe_helper.generate_card_token(number: '4012888888881881')
              }
customer = Stripe::Customer.create(customer_attributes)
sub = customer.subscriptions.create(plan: "XXX", prorate: true)
source = customer.sources.retrieve(customer.default_source)
# confirms the check

customer = Stripe::Customer.retrieve(customer.id)
customer.source = stripe_helper.generate_card_token(number: '4242424242424242')
customer.save #errors here

@psusmars Once again, your code works on my system. I provide you the full code with the tests in place, below.  Can you please test this in your system, and show me the results if it fails ?
Also, is there any chance at all that you have not actually upgraded the gem to 1.21.0 ??  or your Gemfile.lock is still using it ?  Here is what I have, and it passes :
require 'stripe_mock'

describe 'Subscription API' do

  let(:stripe_helper) { StripeMock.create_test_helper }

  before(:each) do
    StripeMock.start
  end

  after(:each) do
    StripeMock.stop
  end

   it 'creates a plan, a customer, no charge, add a new card' do
    Stripe::Plan.create(
      id:       'platinum',
      amount:   900,
      currency: 'usd',
      interval: 'month',
      name:     'Platinum',
    )
    customer_attributes = {
      email<EMAIL_ADDRESS>      source: stripe_helper.generate_card_token(
        last4: '1881',
        exp_month: 11,
        exp_year: 2021,
        description: 'entering my card number',
      )
    }
    customer = Stripe::Customer.create(customer_attributes)
    subscription = customer.subscriptions.create(plan: 'platinum', prorate: true)
    source       = customer.sources.retrieve(customer.default_source)
    expect(customer.id).to match /^test_cus_3/
    expect(subscription.id).to match /^test_su_4/
    expect(source.id).to match /^test_cc_2/

    customer = Stripe::Customer.retrieve(customer.id)
    expect(customer.id).to match /^test_cus_3/
    expect(customer.sources.first.id).to match /^test_cc_2/
    expect(customer.sources.data.first.last4).to eq '1881'
    expect(customer.subscriptions.first.id).to match /^test_su_4/
    expect(customer.subscriptions.data.first.id).to match /^test_su_4/

    customer.subscriptions { include[]=data }
    customer.subscriptions.data { include[]=plans }
    expect(customer.subscriptions.first.plan.name).to eq 'Platinum'
    expect(customer.subscriptions.first.id).to match /^test_su_4/
    expect(customer.subscriptions.first.customer).to match /^test_cus_3/
    expect(customer.subscriptions.first.plan.id).to eq 'platinum'
    expect(customer.sources.total_count).to eq 1

    new_card_token = stripe_helper.generate_card_token(
            last4: '4242',
        exp_month: 11,
         exp_year: 2022,
      description: 'new card'
    )
    customer.sources.create(source: new_card_token)
    customer.save
    twocardcustomer = Stripe::Customer.retrieve(customer.id)
    customer.sources { include[]=total_count }
    expect(twocardcustomer.sources.total_count).to eq 2
    expect(twocardcustomer.id).to match /^test_cus_3/
    expect(twocardcustomer.email).to eq<EMAIL_ADDRESS>    expect(twocardcustomer.description).to eq 'an auto-generated stripe customer data mock'
    expect(twocardcustomer.sources.first.id).to match /^test_cc_2/
    expect(twocardcustomer.sources.data.first.id).to match /^test_cc_2/
    expect(twocardcustomer.sources.data.second.id).to match /^test_cc_6/
    expect(twocardcustomer.default_source).to match /^test_cc_2/
    expect(twocardcustomer.sources.data[0].last4).to eq '1881'
    expect(twocardcustomer.sources.data[0].exp_month).to eq 11
    expect(twocardcustomer.sources.data[0].exp_year).to eq 2021
    expect(twocardcustomer.sources.data[1].last4).to eq '4242'
    expect(twocardcustomer.sources.data[1].exp_month).to eq 11
    expect(twocardcustomer.sources.data[1].exp_year).to eq 2022
    expect(twocardcustomer.object).to eq 'customer'
    expect(twocardcustomer.livemode).to eq false
  end
end

Does this resolves things for you ?

@kathyonu I took your code exactly, copied it to a new ruby vm and was able to get it to run on the 1.21.0 branch. Thanks for responding, I apologize if I wasted any of your time.

@psusmars  again, your code works on my system. I provide you the full code with the tests in place, below.  Can you please test this in your system, and show me the results if it fails ?
Also, is there any chance at all that you have not actually upgraded the gem to 1.21.0 ??  or your Gemfile.lock is still using it ?  Here is what I have, and it passes :
require 'stripe_mock'

describe 'Subscription API' do

  let(:stripe_helper) { StripeMock.create_test_helper }

  before(:each) do
    StripeMock.start
  end

  after(:each) do
    StripeMock.stop
  end

   it 'creates a plan, a customer, no charge, add a new card' do
    Stripe::Plan.create(
      id:       'platinum',
      amount:   900,
      currency: 'usd',
      interval: 'month',
      name:     'Platinum',
    )
    customer_attributes = {
      email<EMAIL_ADDRESS>      source: stripe_helper.generate_card_token(
        last4: '1881',
        exp_month: 11,
        exp_year: 2021,
        description: 'entering my card number',
      )
    }
    customer = Stripe::Customer.create(customer_attributes)
    subscription = customer.subscriptions.create(plan: 'platinum', prorate: true)
    source       = customer.sources.retrieve(customer.default_source)
    expect(customer.id).to match /^test_cus_3/
    expect(subscription.id).to match /^test_su_4/
    expect(source.id).to match /^test_cc_2/

    customer = Stripe::Customer.retrieve(customer.id)
    expect(customer.id).to match /^test_cus_3/
    expect(customer.sources.first.id).to match /^test_cc_2/
    expect(customer.sources.data.first.last4).to eq '1881'
    expect(customer.subscriptions.first.id).to match /^test_su_4/
    expect(customer.subscriptions.data.first.id).to match /^test_su_4/

    customer.subscriptions { include[]=data }
    customer.subscriptions.data { include[]=plans }
    expect(customer.subscriptions.first.plan.name).to eq 'Platinum'
    expect(customer.subscriptions.first.id).to match /^test_su_4/
    expect(customer.subscriptions.first.customer).to match /^test_cus_3/
    expect(customer.subscriptions.first.plan.id).to eq 'platinum'
    expect(customer.sources.total_count).to eq 1

    new_card_token = stripe_helper.generate_card_token(
            last4: '4242',
        exp_month: 11,
         exp_year: 2022,
      description: 'new card'
    )
    customer.sources.create(source: new_card_token)
    customer.save
    twocardcustomer = Stripe::Customer.retrieve(customer.id)
    customer.sources { include[]=total_count }
    expect(twocardcustomer.sources.total_count).to eq 2
    expect(twocardcustomer.id).to match /^test_cus_3/
    expect(twocardcustomer.email).to eq<EMAIL_ADDRESS>    expect(twocardcustomer.description).to eq 'an auto-generated stripe customer data mock'
    expect(twocardcustomer.sources.first.id).to match /^test_cc_2/
    expect(twocardcustomer.sources.data.first.id).to match /^test_cc_2/
    expect(twocardcustomer.sources.data.second.id).to match /^test_cc_6/
    expect(twocardcustomer.default_source).to match /^test_cc_2/
    expect(twocardcustomer.sources.data[0].last4).to eq '1881'
    expect(twocardcustomer.sources.data[0].exp_month).to eq 11
    expect(twocardcustomer.sources.data[0].exp_year).to eq 2021
    expect(twocardcustomer.sources.data[1].last4).to eq '4242'
    expect(twocardcustomer.sources.data[1].exp_month).to eq 11
    expect(twocardcustomer.sources.data[1].exp_year).to eq 2022
    expect(twocardcustomer.object).to eq 'customer'
    expect(twocardcustomer.livemode).to eq false
  end
end

Does this resolves things for you ?

@kathyonu I had meant to not delete my post. I just ran your exact code against my machine that was generating the errors and I saw 0 issues. It should be noted that I was running my code within a "MiniTest" generated test. So I'll just put these into Rspect tests in the app that is having the issues.

@psusmars : mee thinks you misunderstand, that note to you, removed a repeated posting, is me doing exactly that, i somehow duplicated that big code post, so i removed it  and just let you know by changing the post.  Also, i have no clue why you think you might have wasted me time.  my gig on these things is, if i can solve your problem, i learn in the process, and i can apply the learnings to our production app if applicable.

I believe this issue can be closed.


Allow to set buildmode

Hi!
I am integrating Go code in my codebase and exposing its functions in a shared library file (.so).
It would be nice to be able to set the buildmode, like in my case c-shared, or c-archive for example.
There's no hurry in my case, in the meantime I've made my own builder, based on this library.

Hi @toverux, could you provide an example of the command that would be used to set this build mode?

Hello, sorry I didn't respond back then.
I was simply passing the -buildmode c-shared option to build a shared library (.so/.dll) useable from another program (in my case Node.js with FFI). So, not an app, but the build process is the same except for just this option!
See : https://github.com/vladimirvivien/go-cshared-examples


Saving fails almost silently when required fields are left empty

- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
If a user tries to save an item with an empty required field, the save button appears to do nothing at all. If you look closely (and aren't color blind), you may notice that one or more field labels have turned red. This is the only indication of why saving fails, and it can be really easy to miss, especially if the fields in question are offscreen.
- If the current behavior is a bug, please provide the steps to reproduce.

Create a new post on cms-demo. (<--That link will take you straight to the new post page.)
Without adding any content, click Save.
See that Title and Body labels turn red, but no other feedback is given.

- What is the expected behavior?
At minimum, a general error message that says something like, "Oops, you've missed a required field. Please complete before saving." It would also be helpful to have a more noticeable, accessible indicator on the offending fields.
- Please mention your CMS, node.js, and operating system version.
True on all versions I know of, in any browser.

I don't have any fields marked as required, still running into this issue.

Video snippet from a user test wherein this bug was seen. It's a bit confusing to watch as you only hear me speaking and not the test participant as well.
http://share.neutyp.com/1k393r2o0V1m

@dardub Do you have all of your fields marked as required: false? It's not immediately obvious that all fields are required by default.

Hi, I'd love to pick this one up if it hasn't been assigned already.

Sweet! If you have any questions, feel free to ask here or in Gitter.

I didn't realize that fields are required by default. That seems like an
anti-pattern to me. For instance in html fields are not required until
specifically added.
On Tue, Oct 3, 2017 at 4:46 PM Jessica Parsons<EMAIL_ADDRESS>wrote:

@dardub https://github.com/dardub Do you have all of your fields marked
as required: false? It's not immediately obvious that all fields are
required by default.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/netlify/netlify-cms/issues/649#issuecomment-334011176,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAiTPwdVwnJ2N4PPjvqng34v6RFhtsChks5sosdvgaJpZM4Ps6w3
.

Totally agree.
@aquibm great to hear! Be sure to consider which fields play critical roles, and what happens when they're missing. I believe this only applies to the title field, but there may be edge cases that I'm not thinking of.

Hey @erquhart, I've done a quick first pass by surfacing up errors for fields that are required and flashing a notification when we back out of persisting the entry due to validation errors.
If we wish to flash a notification specially for empty required fields, we could modify the fieldsErrors map in the entryDraft to include a type for each error against a field rather than just a string describing the error to the user. This way, when persisting the entry we could select whether there have been any empty required field errors and flash the notification before backing out.
Please let me know if I'm headed in the right direction or if you have a better approach.

This happens for me when all the fields are complete too. Definitely seems like a bug.

@dioptre this issue centered around the old 0.x UI, if you're experiencing something like this in the current CMS (2.0 or newer), please open a new issue so we can hunt it down 👍.


Blog on agile management geared towards product managers

This was suggested to me by a couple of people.

I started an outline and might be able to draft content by tomorrow. Otherwise I'll move it to next sprint