Spatial graph function

Here's that spatial_graph function I had mentioned @giovp and @Mirkazemi.
I figure it should probably be named something different to make sure it's clear it would only work for hex wells.

Oh, sorry, I had completely missed your comment here!

It looks great!

Thanks! Can I ask why you used leiden clustering on this?

One first improvement could be to expose a parameters that explicitly ask for the number of rings in the neighbors

This should be easy enough. I'm curious as to whether this it's better to leave this up to whatever algorithm is being used however, since the one step graph has some nice properties. It'd probably be important to include distance in the multistep graph.

Btw, how do I push to this specific PR from my local repo?

This should be fairly straight forward. If you're using the github cli, I think it should just be:
gh pr checkout 1383
# whatever changes
git push

Let me know if that gives you errors, since it might be a repository permissions issue.

@ivirshup @giovp i have updated the function, now it can process non-visium coordinates and have the number of rings option for visium.
https://github.com/theislab/spatial-tools/blob/graph/notebooks/build_spatial_graph.ipynb

That's great, I'll add Isaac to that project so he can see code (repo is private). Let's discuss whether to integrate in scanpy at next meeting! Thank you Sergei !

Hey! I was just getting back to this, and I'm not sure I agree with all the choices made in the updates. For example, I would probably rather have separate functions for different spatial neighbor strategies. Also this won't work if coord_type isn't "visium".
Should I be making changes to this PR, or are you relying on it?
hexagonal connectivity
I would propose a separate function just for visium data, maybe called visium_connectivity. It works with the assumption of a hexagonal grid. This removes the neigh, radius, and coord_type arguments.
I think if we have an argument for n_rings there should be some way to weight the connectivity graph by how many steps away each extra point is. Also I'm pretty sure the current implementation of n_rings is incorrect when n_rings>2.
Without weighting, I think it should be more like this:
def walk_nsteps(adj, n):
    """Expand adjacency matrix adj by walking out n steps from each node."""
    adj = adj.astype(bool)
    cur_step = adj
    result = adj.copy()
    for i in range(n):
        cur_step = adj @ cur_step
        cur_step.setdiag(False)
        result = result + cur_step
    return result

 An example showing this works
import networkx as nx
from scipy import sparse
from matplotlib import pyplot as plt
import numpy as np

def walk_nsteps(adj, n):
    """Expand adjacency matrix adj by walking out n steps from each node."""
    adj = adj.astype(bool)
    cur_step = adj
    result = adj.copy()
    for i in range(n):
        cur_step = adj @ cur_step
        cur_step.setdiag(False)
        result = result + cur_step
    return result

# Test data (path graph)

G = nx.Graph()
G.add_nodes_from([0,1,2,3])
G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4)])
adj = nx.adjacency_matrix(G).astype(bool)

fig, axes = plt.subplots(nrows=3)
# Fixed circle layout
pos = {i: (np.cos(-np.pi + (np.pi * i) / 4), np.sin(-np.pi + (np.pi * i) / 4)) for i in range(5)}

for n, ax in enumerate(axes):
    nx.draw(
        nx.Graph(walk_nsteps(adj, n)),
        pos=pos,
        ax=ax,
    )

plt.show()

Radius/ n-neighbors coordinates
I'm a little less sure about this use case. Since cells come in all shapes and sizes, I'm not sure if representing each cell as a centroid with a fixed radius or number of neighbors is the way to go. That said, maybe it is.
This could be a separate function spatial_connectivity? In this case, I think it would also be useful to return a distance matrix.

About adding all powers of adjacency matrix - i implemented it at first as you did, but then i thought that it was redundant and changed to the present variant. My thought was that hexagonal connectivity structure would allow to get all paths of less than n_rings with only n_rings power. And this works in practice, but i agree that there can be some edge cases with isolated node blocks.

@Koncopd here's an example of the current implementation breaking down at n=3
def walk_nsteps_current(adj, n=1):
    adj = adj.copy()
    if n > 1:
        # get up to n_rings order connections
        adj += adj ** n
        adj.setdiag(0)
        adj.eliminate_zeros()
        adj.data[:] = 1.0
    return adj

fig, axes = plt.subplots(nrows=3)
# Fixed circle layout
pos = {i: (np.cos(-np.pi + (np.pi * i) / 4), np.sin(-np.pi + (np.pi * i) / 4)) for i in range(5)}

for n, ax in enumerate(axes):
    nx.draw(
        nx.Graph(walk_nsteps_current(adj, n + 1)),  # making sure we start at 1
        pos=pos,
        ax=ax,
    )

plt.show()

For n=3 you're missing the neighbors at depth=2. Basically, you're just jumping to the 3rd step, instead of accumulating neighbors up to that step.

Yes, but if we have hexagonal connections, then, for example, n-1 path will be counted because of this

Just reading along.... if all you want is to find neighbors within a certain number of hops, then non-zero values of powers of the adjacency matrix is a bit inefficient i think. There should be simple breadth-first-search or depth-first-search algorithms implemented in networkx I imagine. And if you're bent on this approach, adding self-loops (diag = 1) will mean you can just do powers.

I'm sorry but I'm not sure I'm following you guys in the discussion, although from the figure it does seem that @Koncopd implementation is missing the n=2.
Regarding radius, this is definitely super useful for anything that is not a grid, and also agree that a distance matrix can be useful, maybe then creating a graph by binarizing that distance matrix based on a threshold?

@LuckyMD thanks for your comment.
So it seems that it is enough to do this
adj.setdiag(1) # or 2?
adj += adj ** n
adj.setdiag(0)
adj.eliminate_zeros()
adj.data[:] = 1.0

And this should eliminate all edge cases.

@Koncopd yes, I believe that should cover everything (maybe test to make sure I'm not missing sth here). However, I still think taking adjacency matrix powers will not be as fast as a BFS/DFS.

@LuckyMD matrix multiplication on sparse matrices is actually a pretty efficient version of breadth first search, as used by graphBLAS. Here's an example for a BFS from a specific point (which you can expand to all points by using the identity matrix):

@Koncopd, I think that should work, since you're adding a self edge so you have redundancy at each step.
A separate point of contention on handling it like this: do you want the first step neighbors to have the same weight as the second step neighbors? My assumption would be no.

Btw, I've separated the visium and non-visium case (since they don't share much code), added tests for the visium case, and removed the warnings. I've rebased so I could re-use some test data from another PR.

@LuckyMD matrix multiplication on sparse matrices is actually a pretty efficient version of breadth first search, as used by graphBLAS.

Hmm... i had no idea it was more efficient than using queues, but Figure 10 suggests otherwise. Matrix multiplication definitely seems easier.

do you want the first step neighbors to have the same weight as the second step neighbors?

You could keep these separate by binarizing the adjacency matrix before doing the multiplication. The neighbors that are only reachable via the Nth-hop should always have a 1 in the N-th matrix product that way.

You could keep these separate by binarizing the adjacency matrix before doing the multiplication. The neighbors that are only reachable via the Nth-hop should always have a 1 in the N-th matrix product that way.

Thats a problem with this strategy. Since it's an undirected graph, a node is it's own second neighbor. Since it's a hexagonal grid my first neighbors are also my second neighbors as well as my nth neighbors (in most cases, if there are edges or missing cells this might not be the case). We would either have to do our own BFS which precludes back tracking (i.e. for each search from each node remove previously visited edges), or we could take the difference of the edge sets at each update. Taking the difference would probably be easier.

With self-loops a node is also its first neighbor. That means if you binarize the adjacency matrix and you have a 1 in the adjacency matrix after taking some power, that means there is only 1 way to get to that neighbor and it must thus only be reachable in the N-th hope (N being the power you just multiplied with). You could therefore also just look for the 1s in the matrix after every multiplication.... that might be a bit easier than taking the difference.

Just checked this, and some of the members of the nth ring have more than one neighbor in the nth-1, so checking for values of one doesn't quite work. Also I've been collecting some functions for set operations on sparse indices so taking the difference was quite easy 😉
Here's the check:

 Code
import scanpy as sc
from sparse_wrapper._core.coordinate_ops import difference_indices
import numpy as np
from scipy import sparse

def find_steps_val(adj, n_steps):
    """Finding positions with value of 1."""
    cur = adj.astype(int)
    diffs = [adj.copy()]
    for i in range(n_steps):
        cur.data[:] = 1
        cur = adj @ cur
        diffs.append(cur == 1)
    return diffs

def find_steps(adj, n_steps):
    """Finding differences in sparsity patterns."""
    diffs = [adj.copy()]
    prev = adj + sparse.eye(adj.shape[0])
    for i in range(n_steps):
        cur = prev @ adj
        diffs.append(difference_indices(cur, prev))
        prev = cur
    return diffs

adata = sc.datasets.visium_sge("V1_Adult_Mouse_Brain")
sc.pp.visium_connectivity(adata)
adj = adata.obsp["spatial_connectivity"]

N = 3

diff_res = find_steps(adj, N-1)
val_res = find_steps_val(adj, N-1)

for i in range(N):
    adata.obs[f"val_res_{i}"] = np.ravel(val_res[i][50, :].toarray()).astype(int)
    adata.obs[f"diff_res_{i}"] = np.ravel(diff_res[i][50, :].toarray()).astype(int)

sc.pl.spatial(
    adata,
    color = [f"val_res_{i}" for i in range(N)] + [f"diff_res_{i}" for i in range(N)],
    ncols=N
)

This is a plot of the neighbors of the 50th well at steps 1, 2, and 3 from each method. Top is finding positions that equaled 1, bottom is taking the differences of the sparsity patterns.

Either way, these look kinda pretty:

from operator import add
from functools import reduce

cells = np.random.choice(adata.n_obs, 20, replace=False)
adata.obs["fireworks"] = (
    reduce(add, (diff_res[i][cells] * (3 - i) for i in range(3)))
    .max(axis=0)
    .toarray()
    .ravel()
)
sc.pl.spatial(adata, color="fireworks", cmap="inferno")

some of the members of the nth ring have more than one neighbor in the nth-1

Damn... yeah, that won't work then. Back to differences of adjacency matrices then i guess.
It looks as though your functions are replicating what I assume is going on in the backend of networkx anyway. Are you trying to avoid the heavy dependency or why replicate the effort? I would assume that once we need things like label propagation (maybe to denoise label assignment after deconvolving spatial spots?) then networkx might come in handy, no?

It looks as though your functions are replicating what I assume is going on in the backend of networkx anyway.

So that repo is actually me trying to make it so we can have CSR and CSC matrices that act the same as numpy ndarrays. Those functions are just some building blocks for broadcast operations on those arrays, which are otherwise implemented in C++ in scipy.
A lot of this could probably be done with networkx. networkx is just very slow, since it's all pure python.

A lot of this could probably be done with networkx. networkx is just very slow, since it's all pure python.

Ah, I wasn't aware of that. Cool... then just trying to work with arrays I guess. I hope using spatial graphs doesn't require more than some basic operations in that case.

quick practical comment on this very interesting discussion.
@ivirshup shall we have this here or moved to the other package under development? We need to take a decision on this because we'll have to see how it works with rest of functions. Pinging @Koncopd as well.
Sorry to put pressure but we are on a tight schedule 😅

I'd like to add this function plus tests to scanpy. I think I'll leave out n_rings argument and the radius_neighbors functions until there are clear use-cases. I would recommend just having a copy of the code in spatial-tools, which can be deduplicated later.

ok that's great, thank you! The radius_neighbors have very clear applications in fish-like data, and we are assmebling a tutorial to show exactly that. The n-rings as well especially in the context of cell-cell communication (although did not check that systematically yet). So shall we add this functionality to spatial-tools ?

I could probably be convinced to include radius_neighbors. I'd mainly need a test case. My initial opposition was that (1) it's a pretty trivial implementation and (2) without a real example I'm not sure if it's missing any obvious edge cases.
For n-rings, I think that walking some steps from each node generalizes beyond graph construction, and might be reasonable to have as a separate method. I also haven't seen any recommendations about how to weigh the edges, which I think is pretty important.

Yeah the edge weighing is definitely not clear we would've to test that. ok so only tests are missing ?

ok, after talking with @davidsebfischer we definitely want to have both radius as well as n_rings and also have graph transform functions so to weight edges differently (based on different kernels).
I'd suggest to keep the function in spatial-tools and then decide what to port to scanpy.
@ivirshup regarding use cases (for radius, n_rings, and edge weighing) there are multiple ones from graph convolutional networks application, but it could be interesting also just for the other graph analysis that we have implemented in spatial-tools. We'd have to do extensive interpretation of results of course to prove that it really is useful.

super interesting discussion btw.
I think this can be closed


introduce document state to JSON conversion

As we talked earlier, I introduce toJson method to convert document state to JSON.
This implementation is slightly different from the original slide.

instead of using object with duplicate key to represent JSON document with conflict, valid JSON object with no duplicate key is used. This avoids reimplementing JSON library and enable to use Circe.

conflicted RegNode can be resolved into JSON with user-specified RegNodeConflictResolver.
In this PR include LLW (last write wins) and PreserveAllAsArray strategy.

LLW can be used for general usage. It chooses latest Replica ID value and does not change JSON structure.
PreserveAllAsArray preserves all conflicted values and represent them as JSON array. It is useful for debug,that is my original motivation, and may be useful for client-side conflict resolution.
This is Figure 1. example.
using LWW strategy
import eu.timepit.crjdt.circe.syntax._
import RegNodeConflictResolver.LWW
replica.document.toJson
//{
//  "key": "C"
//}

using PreserveAllAsArray strategy
import eu.timepit.crjdt.circe.syntax._
import RegNodeConflictResolver.PreserveAllAsArray
replica.document.toJson
//{
//  "key": ["B", "C"]
//}

Current coverage is 95.57% (diff: 83.72%)

Merging #12 into master will decrease coverage by 2.78%

@@             master        #12   diff @@
==========================================
  Files             8         11     +3
  Lines           183        226    +43
  Methods         178        217    +39
  Messages          0          0
  Branches          5          9     +4
==========================================
+ Hits            180        216    +36
- Misses            3         10     +7
  Partials          0          0

Powered by Codecov. Last update fee7525...ceaab40

@fthomas Before start to fix lint errors I want your opinion for this proposal at design level.

LGTM, thanks @TanUkkii007! I like that the user can choose how to resolve conflicts in registers and if necessary implement their custom conflict resolution function.

@fthomas Thanks! Then I will start to fix the issues.

@TanUkkii007 I'm sorry for all the build failures with Scala.js. Scala.js tests were kind of unstable before your PR.

@fthomas It seems NodeToJsonSpec I added is relatively heavy. I will try to mitigate build failure by reducing JSON size.

The latest Travis build succeeded. Can I merge now?

@fthomas I have just noticed that MapNode and ListNode could conflict with duplicate key.
BranchNode can have duplicate keys (or duplicate index for ListNode) when updated with different type values.
For example, for each replica updating "key" field with object and string,
val p1 = p0
    .applyCmd(doc.downField("key") := `{}`)
    .applyCmd(doc.downField("key").downField("key2") := "D")
val q1 = q0.applyCmd(doc.downField("key") := "C")
merge(p1, q1)

results in duplicate keys RegT(StrK(key)) and MapT(StrK(key)) respectively.
MapNode(
  Map(
    MapT(DocK) -> MapNode(
      Map(
        RegT(StrK(key)) -> RegNode(Map(Id(2,q) -> Str(C))),
        MapT(StrK(key)) -> MapNode(Map(RegT(StrK(key2)) -> RegNode(Map(Id(3,p) -> Str(D)))),Map(StrK(key2) -> Set(Id(3,p))))
      ),
      Map(StrK(key) -> Set(Id(2,p), Id(3,p), Id(2,q)))
    )
  ),
  Map(DocK -> Set(Id(1,p), Id(2,p), Id(3,p), Id(2,q)))
)

Current implementation does not handle duplicate key so must be fixed.

Good catch @TanUkkii007! I need to read the paper again to find out if it says something about duplicated keys that point to different data types. How about we merge this PR now and open another issue for the duplicated key bug? I don't want to hold on this PR because of that issue.

@fthomas OK. I will read the paper again too.

Nice find @TanUkkii007, perhaps @ept would wind this useful as well.

From Lemma 7,

If o_a and o_c are assignments to the same cursor, we use the commutativity of updates to a partial function: child[id1 􏰀→ val1 ][id2 􏰀→ val2 ] = child[id2 􏰀→ val2 ][id1 􏰀→ val1 ] provided that id1 ̸= id2. Since operation IDs (Lamport timestamps) are unique, two concurrent assignments add two different keys to the mapping, and their order is immaterial.

so keys can duplicate but have different IDs.
I am trying to understand the following line.

Since operation IDs (Lamport timestamps) are unique, two concurrent assignments add two different keys to the mapping

In crjdt keys in MapNode#children are different because they have different types, not ID since StrK does not encode Id. It seems crjdt works properly with StrK without Id. StrK may need Id when converting MapNode with duplicate keys to JOSN with last-write-wins conflict resolution, because It depends on the ID order.

@fthomas Would you tell me what prevents this PR being merged?

Lack of free time on my side. Sorry for the delay!

Sorry for my impatience:)
I will open the known issues.


add support for Links in Tasks

Currently, when writing tasks, if a task contains a link, such as "Watch this video: https://www.youtube.com/", I need to copy the link, open another window, and paste.
It would be cool if when I type something like  "Watch this [video](link)"  (using Markdown syntax or similar), it automatically converts to  "Watch this video".
If you need more explanation about this idea, contact me,  nice project :)

this is a neat idea, thanks for the issue! but i won't code it.
if you want to send a PR, i will definetly approve it if it works smoothly.

We can do this in typescript, to interpret the markedown according to the links, for common services such as X, tiktok and youtube

maybe this is what we're looking for ? https://github.com/remarkjs/react-markdown
It would be possible to treat the whole task input as markdown and parse it properly using this library

Maybe this is what we're looking for? https://github.com/remarkjs/react-markdown.
It would be possible to treat the whole task input as Markdown and parse it properly using this library.

PS: Maybe this idea is not the best one because we can't render JSX on the value input, and we'll probably need to refactor the whole structure to separate editing/showing. But I'll leave it here anyways.

I'm not sure if this library converts the text to react components while typing, if not we should confirm if that's ok to format the text only when the user hits enter if so I could work on this implementation.

how hard is it to accomplish twitter/x link logic? it feels like the smoothest UX among the current options. example below:
https://github.com/LukeberryPi/phived/assets/98068247/aaf19052-4a4b-4b5b-8b29-ccb468fc458d

some UI ideas. the floating "open external" icon helps with long links (or even a long task that doesn't show any of the link!). i also noticed that on the twitter compose box, when i type "twitter.com" it becomes styled as a link, but isn't actually clickable. it only becomes clickable when you post it. this interaction could be triggered on phived when you blur "from" the task (click another element or the background) to achieve a similar effect.

the aforementioned twitter compose link interaction illustrated
https://github.com/LukeberryPi/phived/assets/98068247/741b5085-bdce-4f43-bcd7-74da02d0fbff

i did code it after all! some updates. i don't want to support markdown because it sounds a bit overkill. if the goal is to support links, we display a button on hover if there's any links in the task. if you click the button you visit the link in a new tab.
any thoughts? @gabrielvsc
https://github.com/LukeberryPi/phived/assets/98068247/502b1e8f-c08f-4194-8d37-25f641d2b083

seeking public opinion rn
https://x.com/LukeberryPi/status/1765871164532899853?s=20

this is pretty much solved, closing
https://github.com/LukeberryPi/phived/assets/98068247/4eb7b6f3-9895-4f42-867b-3dfe98ebed1e


pythonRelaxDepsHook fails to find the appropriate wheel file

Describe the bug
As discovered in https://github.com/NixOS/nixpkgs/pull/198321, pythonRelaxDepsHook has a very specific method of selecting *.whl files:
https://github.com/NixOS/nixpkgs/blob/15491e727dbde6cd4d1c9b1579d64164dd8054df/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh#L63-L68
and this is problematic in derivations where -- for whatever reason -- the whl file naming deviates from this unofficial convention. For example, in tensorflow-bin the pname is "tensorflow", but the whl file is named "tensorflow_cpu-2.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" which doesn't match against pythonRelaxDepsHook's whl file search.
Steps To Reproduce
Steps to reproduce the behavior:

try to build python3Packages.tensorflow-bin from commit https://github.com/NixOS/nixpkgs/pull/198321/commits/627246f4f923490ffe152f5dcaee268d9eda0bca on PR https://github.com/NixOS/nixpkgs/pull/198321.

Expected behavior
pythonRelaxDepsHook to work.
Screenshots
n/a
Additional context
n/a
Notify maintainers

@thiagokokada
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.0-1092-gcp, Ubuntu, 18.04.6 LTS (Bionic Beaver), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(sam.ainsworth): `"home-manager, nixgl"`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

The initial use case for pythonRelaxDepsHook was for packages being built in Nix, not repackaging wheels to use in Nix.
But this is an interesting use case nonetheless. Now I am thinking what would happen if we simply blindly run the script for all wheels in the directory.

I just tried renaming my whl file in preBuild and this helps pythonRelaxDepsHook to find the whl file, but now there's a new error Missing tensorflow-2.9.1.dist-info/RECORD file in the step here:
https://github.com/NixOS/nixpkgs/blob/15491e727dbde6cd4d1c9b1579d64164dd8054df/pkgs/development/interpreters/python/hooks/python-relax-deps-hook.sh#L69
So really what we need is a way for pythonRelaxDepsHook to respect whl files with non-standard wheel names.

But this is an interesting use case nonetheless. Now I am thinking what would happen if we simply blindly run the script for all wheels in the directory.

Yeah this seems like a pretty straightforward fix!


[OSCI] Adds new author zhiyinl

Description
Adds new author zhiyinl
Issues Resolved
[List any issues this PR will resolve]
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.

Closing as we are past deadline and there are outstanding changes.


Event Countdown

Counts down to hacking end date/time (November 14th, 10AM)
If date/time is before November 12th at 4:30 PM, swap it to "hacking starts in : HH:MM:SS"
If date/time is past the end date and time, message should be "Hacking has ended"

According to the hackathon schedule in notion, its gonna be 48 hours but that's a draft so it might change later. For now, just do 48 hours. And yes if the time is between start and end, we're showing a "hacking ends in HH:MM:SS" message like in Figma


Fix the correct number of command line arguments check.

I think we need to add a test for this.

Do you have any suggestions where I could do this kind of test? It might be part of the unit tests or what do you mean exactly?

Do we really need this limit? I prefer to remove this condition.

@LaszloLango The fixed-length arrays file_names and exec_snapshot_file_names rely on JERRY_MAX_COMMAND_LINE_ARGS. Actually, these arrays are the reason for the existence of this macro. Since we cannot rely on dynamic memory allocation, there has to be a fixed limit, for now at least.

@akiss77, I see. Thanks for the explanation. The patch looks good to me.

Landed (2221c00ad97f856dd464233ab6d99678f61cb466)


Firefox : "connection interrupted while the page was loading"

hello everyone,
i having an issue since a while now, it was on 0.3 and and on the 0.4 as well,
the issue is happening Only on firefox,
i am getting a connection as expected, but at some point the connection just drop.
and i am getiing that error :
connection to wss://mydomain.com/wss2/NNN/?myIdUser=1 was interrupted while the page was loading.

Possibly this bug? https://bugzilla.mozilla.org/show_bug.cgi?id=712329

yes it seems to be it, is there a solution?

https://stackoverflow.com/a/23784296/753926

thanks, i will try this :)

it didn't helped :/

Closed for inactivity.


HBASE-26015 Should implement getRegionServers(boolean) method in Asyn…

…cAdmin

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 39s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+0 :ok:
mvndep
0m 23s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 38s
master passed

+1 :green_heart:
compile
4m 47s
master passed

+1 :green_heart:
checkstyle
1m 40s
master passed

+1 :green_heart:
spotbugs
3m 37s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 21s
the patch passed

+1 :green_heart:
compile
4m 52s
the patch passed

+1 :green_heart:
javac
4m 52s
the patch passed

-0 :warning:
checkstyle
0m 31s
hbase-client: The patch generated 1 new + 9 unchanged - 0 fixed = 10 total (was 9)

-0 :warning:
checkstyle
1m 11s
hbase-server: The patch generated 1 new + 1 unchanged - 0 fixed = 2 total (was 1)

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
hadoopcheck
22m  6s
Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.

+1 :green_heart:
spotbugs
4m  0s
the patch passed

_ Other Tests _

+1 :green_heart:
asflicense
0m 26s
The patch does not generate ASF License warnings.

63m 12s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile

uname
Linux 96d3e49e717f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9f4177f7b4

Default Java
AdoptOpenJDK-1.8.0_282-b08

checkstyle
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-client.txt

checkstyle
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt

Max. process+thread count
96 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/console

versions
git=2.17.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 29s
Docker mode activated.

-0 :warning:
yetus
0m  4s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 23s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 24s
master passed

+1 :green_heart:
compile
1m 42s
master passed

+1 :green_heart:
shadedjars
8m 12s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  8s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 16s
the patch passed

+1 :green_heart:
compile
1m 44s
the patch passed

+1 :green_heart:
javac
1m 44s
the patch passed

+1 :green_heart:
shadedjars
8m  9s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  8s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
1m 18s
hbase-client in the patch passed.

-1 :x:
unit
126m 44s
hbase-server in the patch failed.

162m 12s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux 0fc4609bbcb5 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9f4177f7b4

Default Java
AdoptOpenJDK-11.0.10+9

unit
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt

Test Results
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/testReport/

Max. process+thread count
3340 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 28s
Docker mode activated.

-0 :warning:
yetus
0m  3s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 23s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
3m 50s
master passed

+1 :green_heart:
compile
1m 26s
master passed

+1 :green_heart:
shadedjars
8m 12s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  3s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 16s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
3m 43s
the patch passed

+1 :green_heart:
compile
1m 27s
the patch passed

+1 :green_heart:
javac
1m 27s
the patch passed

+1 :green_heart:
shadedjars
8m 12s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  1s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
1m 14s
hbase-client in the patch passed.

-1 :x:
unit
133m 58s
hbase-server in the patch failed.

167m 32s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux ca002acbf142 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9f4177f7b4

Default Java
AdoptOpenJDK-1.8.0_282-b08

unit
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt

Test Results
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/testReport/

Max. process+thread count
3238 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/1/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Oh, please fix the checkstyle issue?
Thanks.

Oh, please fix the checkstyle issue?
Thanks.

OK! I hope I won’t forget checkstyle next time

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 17s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+0 :ok:
mvndep
0m 26s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 59s
master passed

+1 :green_heart:
compile
5m  2s
master passed

+1 :green_heart:
checkstyle
1m 53s
master passed

+1 :green_heart:
spotbugs
3m 51s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 13s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 17s
the patch passed

+1 :green_heart:
compile
5m  7s
the patch passed

+1 :green_heart:
javac
5m  7s
the patch passed

+1 :green_heart:
checkstyle
1m 56s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
hadoopcheck
24m 27s
Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.

+1 :green_heart:
spotbugs
4m 30s
the patch passed

_ Other Tests _

+1 :green_heart:
asflicense
0m 26s
The patch does not generate ASF License warnings.

68m 59s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile

uname
Linux 2e51d70b011d 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9a324bd4d0

Default Java
AdoptOpenJDK-1.8.0_282-b08

Max. process+thread count
96 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/console

versions
git=2.17.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 30s
Docker mode activated.

-0 :warning:
yetus
0m  2s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 27s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 17s
master passed

+1 :green_heart:
compile
1m 44s
master passed

+1 :green_heart:
shadedjars
8m 27s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  7s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 21s
the patch passed

+1 :green_heart:
compile
1m 58s
the patch passed

+1 :green_heart:
javac
1m 58s
the patch passed

+1 :green_heart:
shadedjars
8m 40s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  8s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
1m 20s
hbase-client in the patch passed.

+1 :green_heart:
unit
129m  1s
hbase-server in the patch passed.

165m 24s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux dfca4451065a 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9a324bd4d0

Default Java
AdoptOpenJDK-11.0.10+9

Test Results
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/testReport/

Max. process+thread count
3462 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 10s
Docker mode activated.

-0 :warning:
yetus
0m  2s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 22s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
3m 54s
master passed

+1 :green_heart:
compile
1m 30s
master passed

+1 :green_heart:
shadedjars
8m 22s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  3s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
3m 42s
the patch passed

+1 :green_heart:
compile
1m 37s
the patch passed

+1 :green_heart:
javac
1m 37s
the patch passed

+1 :green_heart:
shadedjars
8m 25s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
1m  5s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
1m 23s
hbase-client in the patch passed.

+1 :green_heart:
unit
140m 23s
hbase-server in the patch passed.

175m 34s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/3406

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux 6c922db200f4 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 9a324bd4d0

Default Java
AdoptOpenJDK-1.8.0_282-b08

Test Results
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/testReport/

Max. process+thread count
3741 (vs. ulimit of 30000)

modules
C: hbase-client hbase-server U: .

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3406/2/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


NSURLProtocol and NSURLSession do not guarantee delegate dispatch order and thread

My last CI build failed in the test execution phase; I've seen this several times over the past few months.
2017-04-14T17:18:29.7225794Z Non-passing Tests:
2017-04-14T17:18:29.7225794Z
2017-04-14T17:18:29.7225794Z ##[error]:     NSURLSessionTests::DataTaskWithURL_WithCompletionHandler [Failed]
2017-04-14T17:18:29.7225794Z
2017-04-14T17:18:29.7225794Z Summary: Total=112, Passed=111, Failed=1, Blocked=0, Not Run=0, Skipped=0
2017-04-14T17:18:29.8913424Z ##[error]Process completed with exit code 1.

Another hit on 4/17 daily build release configuration.

rather than disable the tests, we want to understand why the delegate callback ordering is unreliable.

I'm renaming this bug to cover what's going on.

NSURLSession should kick off its delegate callbacks and wait for them to complete
NSURLProtocol_WinHTTP is violating the suggested threading rules set out on the reference platform. It should kick off its client callbacks on the client thread.

To quote the reference documentation,

In addition, an NSURLProtocol subclass is expected to call the various methods of the NSURLProtocolClient protocol from the client thread, including all of the following:
-URLProtocol:wasRedirectedToRequest:redirectResponse:
-URLProtocol:didReceiveResponse:cacheStoragePolicy:
-URLProtocol:didLoadData:
-URLProtocolDidFinishLoading:
-URLProtocol:didFailWithError:
-URLProtocol:didReceiveAuthenticationChallenge:
-URLProtocol:didCancelAuthenticationChallenge:

We are not doing so (2), so in combination with (1) we are seeing inconsistent delegate reporting order.

Since @ms-jihua is taking over the NSURLProtocol_WinHTTP implementation in 1705, I'm re-assigning this to her.

The tests have been disabled in the meantime.


azure/virtual-machines/sizes-previous-gen - Section "A-series - compute-intensive instances" should be removed

TOPIC: azure/virtual-machines/sizes-previous-gen
A-series - compute-intensive instances section should be removed.
A8-11 sizes seem to be no longer available in Azure portal, checked via create a VM UI- looked in West US 2 and East US.
Document Note edit needed: says A8-11 slated for removal in March '21. so note should be updated

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

ID: 616242df-d3da-e9b3-73b0-fba7ae7a28a7
Version Independent ID: 33587769-6f9d-af7c-3fc1-08676adc860b
Content: Azure VM sizes - previous generations - Azure Virtual Machines
Content Source: articles/virtual-machines/sizes-previous-gen.md
Service: virtual-machines
Sub-service: sizes
GitHub Login: @mimckitt
Microsoft Alias: mimckitt

@eric-camplin Thanks for the feedback! We are currently investigating and will update you shortly.

Thanks for bringing this to our attention. I have created a PR with the update, it will be reviewed by the author first and changes will then be merged after their approval.
Thanks for improving our documentation! Just so you know, it's also possible to make these changes yourself, if you are interested. Doing so will improve our documentation, and it will add you as a contributor to the document.
In case you're interested, these are the steps to do so:

Navigate to the page of interest
Select the "Edit" button at the top right of the page
Select the "Pencil" icon on the right
Modify the text within the text box in markdown format - more info: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
Name your file change and provide a description, if necessary
Select "Propose file change"
Select "Create pull request" on the 'Comparing changes' page
Select "Create pull request" on the 'Open a pull request' page
You can find a GIF that demonstrates the end-to-end process for submitting changes here: https://aka.ms/editsqldocs.


undefined: GetCFTypeLoggingConfig

 # github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cloudformation
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/cftype.go:39:16: undefined: CFTypeLoggingConfigPtrOutput
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/cftype.go:110:17: undefined: CFTypeLoggingConfig
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/cftype.go:147:16: undefined: CFTypeLoggingConfigPtrInput
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/cftype.go:176:17: undefined: CFTypeLoggingConfig
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/cftype.go:190:16: undefined: CFTypeLoggingConfigPtrInput
    /home/sam/go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v4@v4.3.0/go/aws/cloudformation/getCFType.go:76:19: undefined: GetCFTypeLoggingConfig

error: an unhandled error occurred: program exited with non-zero exit code: 2
Expected behavior
pulumi to compile
Current behavior
erroring out during pulumi up
Steps to reproduce
eks.NewCluster(ctx, "eks", &eks.ClusterArgs{ 			EnabledClusterLogTypes: pulumi.StringArray{ 				pulumi.String("api"), 				pulumi.String("audit"), 				pulumi.String("authenticator"), 			}, }
Context (Environment)
Trying to deploy EKS
Affected feature
From 4.1.0 any release affected including 4.3.1, unable to use Pulumi with AWS

Dupe of https://github.com/pulumi/pulumi-aws/issues/1492

thank you very much @stack72  @justinvp


Limit the number of nested plugins

I know that django-cms allows to limit the number of plugins inside a placeholder, but I need to limit the number of the nested plugins.
I spent some time on how to do and then I found a possible solution, that I call inception plugin, see below.
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.template.response import SimpleTemplateResponse
import models

class CMSPluginMaxPluginAllowed(CMSPluginBase):
    max_plugins = None

    def add_view(self, request, form_url='', extra_context=None):
        num_children = len([v for v in self.parent.get_children() if v.get_plugin_instance()[0] is not None])
        if self.max_plugins and num_children >= self.max_plugins:
                return SimpleTemplateResponse('djangocms_inception/max_reached.html', {
                    'num_allowed': self.max_plugins,
                })
        return super(CMSPluginMaxPluginAllowed, self).add_view(request, form_url, extra_context)

class ParentPlugin(CMSPluginBase):
    admin_preview = False
    model = models.ParentModel
    render_template = "djangocms_inception/parent.html"
    allow_children = True
    child_classes = ['ChildPlugin']

plugin_pool.register_plugin(ParentPlugin)

class ChildPlugin(CMSPluginMaxPluginAllowed):
    admin_preview = False
    model = models.ChildModel
    render_template = "djangocms_inception/child.html"
    require_parent = True
    parent_classes = ['ParentPlugin']
    allow_children = True
    child_classes = ['SweetChildPlugin']
    max_plugins = 3

plugin_pool.register_plugin(ChildPlugin)

class SweetChildPlugin(CMSPluginMaxPluginAllowed):
    admin_preview = False
    model = models.SweetChild
    name = "SweetChild"
    render_template = "djangocms_inception/sweetchild.html"
    require_parent = True
    parent_classes = ['ChildPlugin']
    max_plugins = 1

plugin_pool.register_plugin(SweetChildPlugin)

My thoughts are:

Is it a good choice using the add_view method?
Are there any other solutions?
It could be interesting to have this kind of feature in django-cms, what do you think about it?

Thanks!

@cstrap I need to limit the number of the nested plugins too! My case is more complex which I described in #4591 . You can look this issue and may be you will inspire to modify your code for implement your and me needs :)

@vivazzi well, if I understood your issue, a solution could be the following.
I rewrote the code using naming on your example on #4591 :
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.template.response import SimpleTemplateResponse

import models

class CMSPluginBaseWithMaxNum(CMSPluginBase):
    max_num = None

    def add_view(self, request, form_url='', extra_context=None):

        if self.max_num:
            # Placeholders don't have a parent, plugins have it
            if self.parent:
                num_allowed = len([v for v in self.parent.get_children() if v.get_plugin_instance()[0] is not None])
            else:
                num_allowed = len([v for v in self.placeholder.get_plugins() if v.get_plugin_instance()[0] is not None and v.get_plugin_name() == self.name])

            if num_allowed >= self.max_num:
                # max_reached is a simple template like "
Error! Plugins allowed: {{ max_num }}
"
                return SimpleTemplateResponse('djangocms_popupwindow/max_reached.html', {
                    'max_num': self.max_num,
                })

        return super(CMSPluginBaseWithMaxNum, self).add_view(request, form_url, extra_context)

class WrappedPlugin(CMSPluginBaseWithMaxNum):
    admin_preview = False
    model = models.Wrapped
    name = "WrappedPlugin"
    render_template = "djangocms_popupwindow/wrapped.html"
    allow_children = True
    child_classes = ['ContentOfPopupWindowPlugin', 'ContentOfPopupWindowLimitPlugin']
    max_num = 1

plugin_pool.register_plugin(WrappedPlugin)

class ContentOfPopupWindowPlugin(CMSPluginBase):
    admin_preview = False
    model = models.ContentOfPopupWindow
    name = "ContentOfPopupWindow"
    render_template = "djangocms_popupwindow/template.html"
    require_parent = True
    parent_classes = ['WrappedPlugin']

plugin_pool.register_plugin(ContentOfPopupWindowPlugin)

class ContentOfPopupWindowLimitPlugin(CMSPluginBaseWithMaxNum):
    admin_preview = False
    model = models.Larghezza
    name = "ContentOfPopupWindow"
    render_template = "djangocms_popupwindow/template.html"
    require_parent = True
    parent_classes = ['WrappedPlugin']
    max_num = 3

plugin_pool.register_plugin(ContentOfPopupWindowLimitPlugin)

It seems to work :-)
I didn't mention my environment:
django==1.6.11
django-cms==3.0.16

Yep, It lacks of tests, but as you can see, I've some thoughts.

Little upgrade: the solution to the issue is a bit more complicated.
The "copy'n'paste" between plugins - django-cms>=3.2 - doesn't take care on max_num on CMSPluginBaseWithMaxNum class.
I think that there are some things related to JavaScript, but it's next step and depends on time, I'll go deeper.

I have the same problem. I want to limit the number of nested plugins a user can add. Do you still didn't have a solution in django-cms for this?

I needed something similar and made a quick workaround by overriding the template.
Simply add max_children = <number> to your Plugin class and create a new dragitem.html template in your templates folder templates/cms/toolbar/ to override the existing Django CMS template. See the diff below:
This nicely disabled the + icon when the maximum number of children has been reached.
--- env/lib/python3.5/site-packages/cms/templates/cms/toolbar/dragitem.html       2016-09-15 12:06:26.132803200 +0200
+++ templates/cms/toolbar/dragitem.html    2017-02-08 12:26:59.343312100 +0100
@@ -9,6 +9,17 @@
         {% if plugin.child_plugin_instances %} cms-dragitem-collapsable{% endif %}">
         {% language request.toolbar.toolbar_language %}
         {% if not disabled_child %}
+            {% with max_children=plugin.get_plugin_instance.1.max_children child_count=plugin.child_plugin_instances|length %}
+                {% if max_children %}
+
= max_children %} cms-btn-disabled{% endif %}">
+                        {% if child_count >= max_children %}
+
+                        {% else %}
+
+                        {% endif %}
+

+                {% else %}

                 {% if not allow_children %}
@@ -17,6 +28,8 @@

                 {% endif %}

+                {% endif %}
+            {% endwith %}

I'll wrap this as PR when I added a test.

@joeribekker looking good! Any progress with the PR?

Any news? Any other solution than overwrite dragitem.html ?

Just curious, is there any feedback from the Django CMS core devs on this?

What is the progress about this issue? Is there a solution now?

This worked for me, thanks
from django.shortcuts import render
from cms.plugin_pool import plugin_pool
from cms.plugin_base import CMSPluginBase

class CMSPluginBaseWithMaxNum(CMSPluginBase):
    """
    This is a pluginbase extension that allows to
    set max amount of plugins.
    Just need to extend this class with the child
    component and set the max_num desired
    """

    max_num = None

    def add_view(self,request, form_url='', extra_context=None):

        if self.max_num:
            # Placeholders don't have a parent, plugins have it
            if self._cms_initial_attributes['parent']:
                num_allowed = len([v for v in self._cms_initial_attributes['parent'].get_children() if v.get_plugin_instance()[0] is not None])
            else:
                num_allowed = len([v for v in self.placeholder.get_plugins() if v.get_plugin_instance()[0] is not None and v.get_plugin_name() == self.name])

            if num_allowed >= self.max_num:
                return render(request , "path/to/your/max_reached_template.html", {
                    'max_num': self.max_num,
                })
        return super(CMSPluginBaseWithMaxNum, self).add_view(request, form_url, extra_context)

@plugin_pool.register_plugin
class ParentPlugin(CMSPluginBase):
    name = "Darth Vader"
    render_template = PLUGINS_DIRECTORY + "parent_tempalte.html"
    allow_children = True
    child_classes = ['ChildPlugin', ]

@plugin_pool.register_plugin
class ChildPlugin(CMSPluginBaseWithMaxNum):
    name = "Luke"
    render_template = PLUGINS_DIRECTORY + "child_tempalte.html"
    require_parent = True
    parent_classes = ['ParentPlugin']
    max_num = 2

any updates??

will this be supported in a future version?

@andre-dasilva I can imagine to limit the number of child plugins of a parent in a future version. Use cases might be:

Plugins that need a specific number of content blocks or "slots" (say, "title", "summary", "content" filling those with the first to third children) but cannot handle more children. From a usability viewpoint this might be confusing since changing the order of the plugins
Limit the number of items (e.g., not more than three buttons to close a panel, not more than x columns in a row)

More specific requirements (like those of @vivazzi in #4591) will be better solved for that specific plugin by customizing the plugin's get_child_classes method (in @vivazzi 's case to only allow a class only if it does net yet have a child of the same class).
A path forward might be @joeribekker 's starting point with adding a max_children property to the parent class. @jedie , you voted this down. Is there a specific reason?

After looking at this for a moment my solution would run along the following way (versions 3.x only):
class LimitNumberOfChildrenMixin:
    max_children = None

   def get_child_classes(cls, slot, page, instance=None):
       if instance is not None:  # get child classes for a specific instance?
          if cls.max_children <= instance.num_children():  # already fully populated?
              return []  # Allow no more children
       return super().get_child_classes(cls, slot, page, instance)

Then to you custom parent plugin just add the LimitNumberOfChildrenMixin.

I have looked at the source code. django CMS already provides to option to restrict parents or children based on a specific plugin instance. For performance reasons these restrictions are cached per plugin class. There's a switch to turn of caching, e.g., to allow additions of children based on the instance current number of children.
Here's a mixing which you might try:
class LimitNumberOfChildrenMixin:
    # turn of class-based restrictions cache for plugins using this mixing
    cache_child_classes = False
    # allow for children
    allow_children = True

    @classmethod
    def get_child_classes(cls, slot, page, instance=None):
        max_children = getattr(cls, "max_children", None)  # Number of children limited?
        if instance is not None and max_children is not None:
            if instance.num_children() >= max_children:
                return [""]  # No not allow any child classes for this instance
        return super().get_child_classes(slot, page, instance)

and use it this way:
@plugin_pool.register_plugin
class ParentPlugin(LimitNumberOfChildrenMixin , CMSPluginBase):
    name = "Darth Vader"
    render_template = PLUGINS_DIRECTORY + "parent_tempalte.html"
    max_children = 3


update trantor to 1.1.1

update trantor to 1.1.1

What does your PR fix? Fixes #
none

Which triplets are supported/not supported? Have you updated the CI baseline?
x64-windows

Does your PR follow the maintainer guide?
yes

Why do you rewrite these two files?

update trantor version from 1.1.0 to 1.1.1

Why do you rewrite these two files?

update trantor version from 1.1.0 to 1.1.1

You just need to update the changes instead of rewriting all contents.
For example, you can only update Version field 1.1.0 as 1.1.1  in CONTROL file. Since there are no any changes about other fields.

You just need to update the changes instead of rewriting all contents.
For example, you can only update Version field 1.1.0 as 1.1.1  in CONTROL file. Since there are no any changes about other fields.

You just need to update the changes instead of rewriting all contents.
For example, you can only update Version field 1.1.0 as 1.1.1 in CONTROL file. Since there are no any changes about other fields.

done

You just need to update the changes instead of rewriting all contents.
For example, you can only update Version field 1.1.0 as 1.1.1 in CONTROL file. Since there are no any changes about other fields.

done

LGTM now, thanks for your PR @kkzi.

LGTM now, thanks for your PR @kkzi.


[ISSUE #4395] cryptor plugin support multi fieldNames.

Cryptor plugin: fieldNames supports multi fields (mapType will turn to all option).

field map to value of a single field (Compatible with older versions)
all map to another JSON with whole fields;

Make sure that:

[x] You have read the contribution guidelines.
[x] You submit test cases (unit or integration tests) that back your changes.
[x] Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #4426 (3f1edcb) into master (f88127f) will decrease coverage by 0.07%.
The diff coverage is 59.01%.

@@             Coverage Diff              @@
##             master    #4426      +/-   ##
============================================
- Coverage     68.04%   67.98%   -0.07%
- Complexity     7500     7501       +1
============================================
  Files          1023     1024       +1
  Lines         29005    29017      +12
  Branches       2592     2592
============================================
- Hits          19736    19726      -10
- Misses         7720     7737      +17
- Partials       1549     1554       +5

Impacted Files
Coverage Δ

...ter/plugin/cryptor/CryptorPluginConfiguration.java
100.00% <ø> (ø)

...pache/shenyu/plugin/cryptor/utils/CryptorUtil.java
19.44% <28.57%> (+6.40%)
:arrow_up:

...g/apache/shenyu/plugin/cryptor/utils/JsonUtil.java
63.63% <62.50%> (+2.09%)
:arrow_up:

...he/shenyu/plugin/cryptor/strategy/MapTypeEnum.java
77.77% <65.21%> (-22.23%)
:arrow_down:

...u/plugin/cryptor/plugin/AbstractCryptorPlugin.java
69.23% <69.23%> (ø)

...yu/plugin/cryptor/plugin/CryptorRequestPlugin.java
76.92% <100.00%> (ø)

...u/plugin/cryptor/plugin/CryptorResponsePlugin.java
44.44% <100.00%> (ø)

...ache/shenyu/plugin/grpc/cache/GrpcClientCache.java
68.75% <0.00%> (-31.25%)
:arrow_down:

...a/org/apache/shenyu/common/utils/VersionUtils.java
21.27% <0.00%> (-6.39%)
:arrow_down:

... and 19 more

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


Missing explicit type on non-exported symbol?

I have code something like this
// things.ts
export type ThingDef = {
    size: number;
};

const createThingDefs = <T extends Record<string, ThingDef>>(defs: T): { readonly [K in keyof T]: ThingDef } => defs;

export const kThingInfo = createThingDefs({
  bear: { size: 20 },
  chicken: { size: 1 },
} as const);

export type ThingType = keyof typeof kThingInfo;

// index.ts
import { kThingInfo, ThingType } from './things.js';

export { ThingType };

export function getThingSize(type: ThingType): number {
  return kThingInfo[type].size;
}

The only things I want to export is the type ThingType and getThingSize but jsr complains about kThingInfo even though AFAICT it's not public and shouldn't need to be
❯ npx jsr publish --dry-run
Checking for slow types in the public API...
error[missing-explicit-type]: missing explicit type in the public API
 --> /Users/gman/temp/delme-jsr-test/things.ts:7:14
  |
7 | export const kThingInfo = createThingDefs({
  |              ^^^^^^^^^^ this symbol is missing an explicit type
  |
  = hint: add an explicit type annotation to the symbol

  info: all symbols in the public API must have an explicit type
  docs: https://jsr.io/go/slow-type-missing-explicit-type

Same issue here, with a failing Github action if it helps. It’s especially curious as of the three errors, one is using satisfies and one could be simply inferred which should not cause slow types.


New package: PrettyChairmarks v1.0.0

Registering package: PrettyChairmarks
Repository: https://github.com/astrozot/PrettyChairmarks.jl
Created by: @astrozot
Version: v1.0.0
Commit: 9cd7cc9d21ce747880b41ab7a9adc8ac894ce531
Git reference: HEAD
Description: A version of Chairmarks with nice histograms
Release notes:

Initial release.

[noblock] Very nice! I just want to tag @LilithHafner to make sure she has no issues with this registration in terms of the Chairmarks branding, or would prefer this to be a PR to Chairmarks instead of an independent package.

[noblock] Thanks for the ping! I support this registration. @astrozot already offered to contribute this to Chairmarks in https://github.com/LilithHafner/Chairmarks.jl/issues/108 (thank you), and I think this sort of package is a great way to handle varying stylistic preferences.


Screencap on the Readme

Final result:
https://github.com/axa-group/Parsr/blob/feature/screencap-on-readme/README.md


port Arithmetic operations

Contributing to #284
All common static methods are currently on an Arithmetic class under src/core/lib.

Those changes have been made. The only change in behaviour is that by using src/core/lib/Delim's DELIM_OPTIONS, Space is now the default delimiter for these ops, rather than Line feed. I can reorder on the fly for these options if you think it's necessary?

Maybe you could just add another export to Delim.mjs which has line feed first? Line feed should probably be the default for these ops.

Done


Not able to created Digital Ocean machine when enabling - Backups/Ipv6 and private networking.

Not able to created Digital Ocean machine when enabling - Backups/Ipv6 and private networking.
Steps to reproduce the problem:
Create a Digital Ocean machine , by choosing all defaults and additionally enable Backups/Ipv6 and private networking.
Machine creation fails with following error message:
"open /var/lib/cattle/machine/4c9a587f-1861-463e-b7c7-abb917cea33c/machines/test456: no such file or directory"
Also the machine in Digital Ocean is getting created with name -"true"  , seems like invalid arguments are being passed .
time="2015-04-09T20:01:42Z" level=info msg="Cmd slice: [create -d digitalocean --digitalocean-image ubuntu-14-04-x64 --digitalocean-size 512mb --digitalocean-region nyc
3 --digitalocean-access-token ********* --digitalocean-ipv6 true --digitalocean-private-networking true --digitalocean-backups true test456]"
time="2015-04-09T20:01:42Z" level=info msg="stdout: time=\"2015-04-09T20:01:42Z\" level=\"info\" msg=\"Creating CA: /var/lib/cattle/machine/4c9a587f-1861-463e-b7c7-abb9
17cea33c/certs/ca.pem\" " resourceId: ="1ph98"
time="2015-04-09T20:01:42Z" level=info msg="stdout: time=\"2015-04-09T20:01:42Z\" level=\"info\" msg=\"Creating client certificate: /var/lib/cattle/machine/4c9a587f-186
1-463e-b7c7-abb917cea33c/certs/cert.pem\" " resourceId: ="1ph98"
2015-04-09 20:01:42,577 ERROR [:] [] [] [] [torService-5168] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [1]
2015-04-09 20:01:42,578 ERROR [:] [] [] [] [torService-5390] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [119] count [5]
2015-04-09 20:01:42,578 ERROR [:] [] [] [] [torService-5298] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [118] count [4]
2015-04-09 20:01:42,578 ERROR [:] [] [] [] [torService-5482] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [101] count [2]
2015-04-09 20:01:42,578 ERROR [:] [] [] [] [torService-5402] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [117] count [1]
time="2015-04-09T20:01:43Z" level=info msg="stdout: time=\"2015-04-09T20:01:43Z\" level=\"info\" msg=\"Creating SSH key...\" " resourceId: ="1ph98"
time="2015-04-09T20:01:43Z" level=info msg="stdout: time=\"2015-04-09T20:01:43Z\" level=\"info\" msg=\"Creating Digital Ocean droplet...\" " resourceId: ="1ph98"
time="2015-04-09T20:01:46Z" level=info msg="stdout: time=\"2015-04-09T20:01:46Z\" level=\"info\" msg=\"Waiting for SSH...\" " resourceId: ="1ph98"
`time="2015-04-09T20:04:41Z" level=info msg="stdout: time=\"2015-04-09T20:04:41Z\" level=\"info\" msg=\"\\\"true\\\" has been created and is now the active machine.\" "
resourceId: ="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="stdout: time=\"2015-04-09T20:04:41Z\" level=\"info\" msg=\"To point your Docker client at it, run this in your shell: eval \
\\"$(docker-machine env true)\\\"\" " resourceId: ="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="Machine Created" machineExternalId="4c9a587f-1861-463e-b7c7-abb917cea33c" resourceId="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="Creating and uploading extracted machine config" resourceId="1ph98"
time="2015-04-09T20:04:41Z" level=error msg="Error processing event" err="open /var/lib/cattle/machine/4c9a587f-1861-463e-b7c7-abb917cea33c/machines/test456: no such fi
le or directory" eventId="ff6bd508-dd25-4c07-b500-594b1af828db" eventName="physicalhost.create;handler=goMachineService" resourceId="1ph98

time="2015-04-09T20:04:41Z" level=info msg="stdout: time=\"2015-04-09T20:04:41Z\" level=\"info\" msg=\"\\\"true\\\" has been created and is now the active machine.\" "
resourceId: ="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="stdout: time=\"2015-04-09T20:04:41Z\" level=\"info\" msg=\"To point your Docker client at it, run this in your shell: eval \
\\"$(docker-machine env true)\\\"\" " resourceId: ="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="Machine Created" machineExternalId="4c9a587f-1861-463e-b7c7-abb917cea33c" resourceId="1ph98"
time="2015-04-09T20:04:41Z" level=info msg="Creating and uploading extracted machine config" resourceId="1ph98"
time="2015-04-09T20:04:41Z" level=error msg="Error processing event" err="open /var/lib/cattle/machine/4c9a587f-1861-463e-b7c7-abb917cea33c/machines/test456: no such fi
le or directory" eventId="ff6bd508-dd25-4c07-b500-594b1af828db" eventName="physicalhost.create;handler=goMachineService" resourceId="1ph98

I've created a docker machine bug for the fact that docker machine is creating a machine with the name 'true' instead of the actual name.

@deniseschannon This isn't necessarily a bug in docker/machine, I think we're just constructing the wrong command line and they should be --digitalocean-ipv6 or maybe --digitalocean-ipv6=true, not --digitalocean-ipv6 true.  The name is not a flag so it's just picking up one of those trues as a the name in the CLI parsing.

@will-chan: @cjellick confirmed that it should be =true.  I will disable the checkboxes in the UI for now until this is fixed.

FYI, Completely omitting the value and just passing the --digitalocean-ipv6 is valid too.
This will make autogenerating code for all handlers a little more difficult, but we'll cross that bridge when we come to it.

@tfiduccia Disabled the fields in the UI for now, please leave this open pending actual fix and re-enabling.

The checkbox fields are dimmed and not accessible.  Sending over to Will for fix before we turn them back on.

Tested with Server Version - V0.16.0
Able to deploy a Digital Ocean machine successfully with enabling Backups/Ipv6 and private networking options.


[Question] which deployment to specify in the config

Hello,
I found our bosh deployments by logging into the director on the bosh command line and doing this:
cfadmin@pivotal-ubuntu:~/datadogconfigoss/datadog-config-oss-master$ bosh deployments
Acting as user 'director' on 'microbosh-fd6868b53306451573eb'

+----------------------------------------------+-------------------------------+-------------------------------------------------+--------------+
| Name                                         | Release(s)                    | Stemcell(s)                                     | Cloud Config |
+----------------------------------------------+-------------------------------+-------------------------------------------------+--------------+
| cf-9f66ec3b92e86035c0a2                      | cf-autoscaling/28             | bosh-vsphere-esxi-ubuntu-trusty-go_agent/3146   | none         |
|                                              | cf-mysql/23                   |                                                 |              |
|                                              | cf/225.3                      |                                                 |              |
|                                              | diego/0.1441.1                |                                                 |              |
|                                              | etcd/18                       |                                                 |              |
|                                              | garden-linux/0.330.0          |                                                 |              |
|                                              | notifications-ui/10           |                                                 |              |
|                                              | notifications/19              |                                                 |              |
|                                              | push-apps-manager-release/397 |                                                 |

So I entered that information into the config file:
cf_deployment:
  deployment: "cf-9f66ec3b92e86035c0a2"
  bosh_deployment: "bosh"
  services_deployment: "cf-9f66ec3b92e86035c0a2-services"
  micro_deployment: "cf-micro-deployment-example"
  health_screen_image: "microbosh/0"
  router_elb_name: "cf-router"
  domain_url: "https://ops.pcf.example.com"

And from the datadog-config-oss-master directory I run the 'bundle install' command (which installs a bunch of gems) and then attempt to run the rake command which gives me:
pcfadmin@pivotal-ubuntu:~/datadogconfigoss/datadog-config-oss-master$ rake  cf-9f66ec3b92e86035c0a2:push --trace
rake aborted!
Don't know how to build task 'cf-9f66ec3b92e86035c0a2:push' (see --tasks)
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/task_manager.rb:62:in `[]'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:149:in `invoke_task'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/bin/rake:23:in `load'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/bin/rake:23:in `<main>'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/home/pcfadmin/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

What am I doing wrong? And how can I get this command to execute correctly?
thanks

This messed me up to
top line cf_deployment:   === Deployment name
So you have to change that to make the name actually change for the rake command.

To clarify what @bhudlemeyer said: if you run rake -T you'll see your options:
rake cf_deployment:console                               # A console with some useful variables
rake cf_deployment:delete_unknown                        # Delete dashboards and alerts that are not represented in local templates for Cf_deployment
rake cf_deployment:emit[metric]                          # emit data to datadog for testing purposes (note this WILL affect graphs and alerts)
rake cf_deployment:eval_alert[path]                      # Evaluate the alert at path under the Cf_deployment config and print to stdout
rake cf_deployment:eval_dashboard[path]                  # Evaluate the dashboard at path under the Cf_deployment config and print to stdout
rake cf_deployment:eval_screen[path]                     # Evaluate the screen at path under the Cf_deployment config and print to stdout
rake cf_deployment:get_alert_json_erb[alert_id,path]     # Make a json template for the specified alert at the given file path
rake cf_deployment:get_dashboard_json_erb[dash_id,path]  # Make a json template for the specified dashboard at the given file path
rake cf_deployment:get_screen_json_erb[screen_id,path]   # Make a json template for the specified screen at the given file path
rake cf_deployment:list_unknown                          # List dashboards and alerts that are not represented in local templates for Cf_deployment
rake cf_deployment:push                                  # Push Cf_deployment Datadog Config

I think you want rake cf_deployment:push, or to rename your deployment to something catchier. :smile:

No activity for two months; closing.


Review CRUD

@ChopperLee2011 Please review what we have now.
I see something strange for example, that the implemented hooks are very different with the other official connectors, like https://github.com/strongloop/loopback-connector-redis/blob/master/lib/redis.js.
Please talk with @CCharlieLi .

i create a new branch  module-uuid (https://github.com/Wiredcraft/loopback-connector-couchbase3/tree/module-uuid)  with the list points:

add uuid for module when create or update method do not have one.
the lib code seem wrap up all the thing to promise, but the test still use callback. And also kind of not have a clean view.

So is it ready to release? Did you test it in any other projects we are working on?

@makara  use it in the ams project, seem still need other feature, and #11 is the most needed feature as a use (me) , the exists api passed the test but not cover all in our project right now

Can you send me a pull request when you think it's ready.

Can you also build a benchmark test.

Sending to @CCharlieLi .
@CCharlieLi, I implemented a few more connector methods. Please add test for all of them:

Figure our how a model instance invoke each of the methods and test each of them.
Put the tests for each method in a separate describe().

Yes, on it.

Methods hook in DataAccessObject. FYI.

*idName(model)   //get id name from model
*getIdValue(m, data)
//get id value
*setIdValue(m, data, value)
//set id by giving value
*byIdQuery(m, id)
//generate query by giving id
*isWhereByGivenId(Model, where, idValue)
// if it's where of giving id
*getConnector()
// get Connector instance
*create(data, options, cb) -> connector.create
// Create an instance of Model with given data and save to the attached data source.
updateOrCreate/upsert(data, options, cb) ->  connector.updateOrCreate/connector.findOne-updateAttributes
// Update or insert a model instance
findOrCreate(query, data, options, cb) ->  connector.findOrCreate/ findOne - connector.create
//Find one record or create it using data provided
exists(id, options, cb) -> connector.count
//Check whether a model instance exists in database
*findById(id, filter, options, cb) -> findOne
//Find model instance by ID.
*findByIds(ids, query, options, cb)
//Find model instances by ids -> find
all() -> find
//alias function for backwards compat.
*find(query, options, cb) -> connector.all
//Find all instances of Model that match the specified query.
findOne(query, options, cb) -> find
//Find one record
*remove/deleteAll/destroyAll(where, options, cb) -> connector.destroyAll
//Destroy all matching records.
*removeById/destroyById/deleteById(id, options, cb) -> remove
//Delete the record with the specified ID.
count(where, options, cb) -> connector.count
//Return count of matched records.
save(options, cb) -> connector.save
//Save instance.
*update/updateAll(where, data, options, cb) -> connector.update
//Update multiple instances that match the where clause
remove/delete/destroy -> Model.deleteAll/connector.destroy
//Delete object from persistence

Done, closing.


Select a exact match from a list on tab pressed

When type a text as "Value " then "Value"  will automatically selected

Please provide more information and a plunkr demonstrating the issue. Without this information, we cannot confirm the bug nor help you.
Closing for now


Onboarding wizard feedback

Hey, been following along and am excited for this project. I gave it a spin on and had some feedback for the onboarding/new project process, figured it made sense to group it all here.

Compared to other frameworks, it was a bit unexpected that we clone a template repo, run a command, and then it spits out a new sub-repo. It took me a second to realize what was happening. I figure there are eventual plans to do this fully within a CLI, just wanted to point out my confusion.
Enter your package name: package name is such an overloaded term I thought it was asking for a bundle ID. Maybe it could be phrased as "Swift Package name" to be unambiguous.
Some of the console output seemed distracting, like it just printed out ~/dev/hummingbird-template a few times.
It would be great if the console output used colors to separate some of the information.
Enter the folder created and run 'swift run' to build and run your server. coupled with my confusion earlier about how this creates a sub-directory with the scaffolded project, I was thinking "what folder"? Could it explicitly tell me which folder to open?
Then open 'localhost:8080' on your web browser. I don't think the CLI needs to say this since swift run already outputs this too.
When I run swift run it actually outputs [HummingbirdCore] Server started and listening on <IP_ADDRESS>:8080, it would be nice if it said localhost:8080 for consistency. VSCode also seems to stumble trying to CMD+click opening <IP_ADDRESS>:8080 into the browser so it would probably work better with localhost like other frameworks use.

Other than that everything worked! Excited to follow along.

Hey, been following along and am excited for this project. I gave it a spin on and had some feedback for the onboarding/new project process, figured it made sense to group it all here.

Compared to other frameworks, it was a bit unexpected that we clone a template repo, run a command, and then it spits out a new sub-repo. It took me a second to realize what was happening. I figure there are eventual plans to do this fully within a CLI, just wanted to point out my confusion.

If you run the configure.sh command without any parameters it should edit the template in place. I have to play with this a little to get it right.

Enter your package name: package name is such an overloaded term I thought it was asking for a bundle ID. Maybe it could be phrased as "Swift Package name" to be unambiguous.

Fair point

Some of the console output seemed distracting, like it just printed out ~/dev/hummingbird-template a few times.

Yes this could be cleaned up

It would be great if the console output used colors to separate some of the information.

👍

Enter the folder created and run 'swift run' to build and run your server. coupled with my confusion earlier about how this creates a sub-directory with the scaffolded project, I was thinking "what folder"? Could it explicitly tell me which folder to open?

👍

Then open 'localhost:8080' on your web browser. I don't think the CLI needs to say this since swift run already outputs this too.

The two addresses being printed out are different addresses. When I say open localhost:8080 that is the address your web client should open as that is where the server is running.
The address being printed out when you run the server is the address the server is listening on. Because you are running both client and server on the same machine they happen to be the same. But the server could also be listening on <IP_ADDRESS>:8080, which indicates it will accept clients from any address.

When I run swift run it actually outputs [HummingbirdCore] Server started and listening on <IP_ADDRESS>:8080, it would be nice if it said localhost:8080 for consistency. VSCode also seems to stumble trying to CMD+click opening <IP_ADDRESS>:8080 into the browser so it would probably work better with localhost like other frameworks use.

Using a host name for your listen address has performance impacts and should not be encouraged.

Other than that everything worked! Excited to follow along.

Thank you for taking your time to put your thoughts down. Hopefully we can get this right over time.

1: You're right, looking through my shell history I aborted the first configure and then tried again by adding the package name but can't remember why. 😅
6: I think at least formatting the address as http://localhost:8080 will make it CMD+Clickable in the terminal.
7: That makes sense. In my head I was comparing against Ktor which outputs:
2024-10-03 10:15:30.034 [main] INFO  Application - Application started in 0.329 seconds.
2024-10-03 10:15:30.139 [main] INFO  Application - Responding at http://localhost:8080

Thank you for taking your time to put your thoughts down. Hopefully we can get this right over time.

No problem! If you turn any of these suggestions into Issues I'm happy to take a stab at some of them while I play around with this some more.

Note, clean up this: https://docs.hummingbird.codes/2.0/documentation/hummingbird/gettingstarted/#Creating-a-new-local-project-from-the-starting-template

Tidied up output text, to hopefully make it clearer what is happening
Fixed
Fixed
Not implemented yet, not sure colours really help but did add spaces to separate sections
Edited text to include folder name, unless you are already in the folder


Feature: Add feedback button and pop-up

Overview
This PR:

Adds the feedback button
Adds the NPS feedback, that is triggered automatically based on user activity
Ensures we collect the Age Group value for MSA users (GDPR Compliance)
Ensures we collect the tenant policies specified for an enterprise user (GDPR compliance)

Fixes #1092, #1052
Demo
Feedback button

Feedback pop-up

Testing Instructions
Testing the feedback button

Navigate to the "Got Feedback" tab and select it.
Fill in the feedback form
Attempt the same using different accounts (i.e AAD and MSA)

Testing the NPS pop up

Load Graph Explorer and interact with the page for a minute (this is important, you must be active on the page for longer than a minute)
Navigate out of the page (e.g open a new tab)
Return to Graph Explorer and interact with a component
Observe the pop up appears requesting your feedback
Fill in the form and submit

##Notes
The forms do not have a dark mode/high contrast mode setting

question: When the policy call returns that a user is not allowed to give feedback, do we still show the pop-up feedback question?
question: Should we keep the 'Got feedback?' button hidden / disabled until we find out whether someone is allowed to give feedback?

question: When the policy call returns that a user is not allowed to give feedback, do we still show the pop-up feedback question?
question: Should we keep the 'Got feedback?' button hidden / disabled until we find out whether someone is allowed to give feedback?

The ability to display the forms based on AADC requirements and tenant policies is controlled by OCV. When we send the values, they decide whether the form pops up or not...  and whether when the user clicks on the feedback button, a form will be displayed or not.
They have some sort of callback function that should help us hide the button in a case where a user can't give us their feedback. I'm looking into how to implement that function


SDK initializes but doesn't send any info to Datadog

Describe what happened
SDK looks like it initializes, but the Datadog Rum site is stuck in the "Verify installation" phase and says "Waiting for data...".
Steps to reproduce the issue:
My index.js file looks like this:
import 'react-native-gesture-handler';
import { AppRegistry } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
import {
  DdSdkReactNative,
  DdSdkReactNativeConfiguration,
  DdLogs,
} from 'dd-sdk-reactnative';

AppRegistry.registerRunnable(appName, async (props) => {
  const config = new DdSdkReactNativeConfiguration(
    'MY_CLIENT_TOKEN',
    'dev',
    'MY_APPLICATION_ID',
    true,
    true,
    true,
  );
  config.nativeCrashReportEnabled = true;
  config.sampleRate = 100;

  DdSdkReactNative.initialize(config)
    .then(() => {
      console.log('success');
      DdLogs.info('The RN Sdk was properly initialized', {
        bar: 'xyz',
        foo: 42,
      });

      DdSdkReactNative.setUser({
        email<EMAIL_ADDRESS>        id: '1337',
        name: 'Xavier',
        type: 'premium',
      });

      DdSdkReactNative.setAttributes({ campaign: 'react-native-bs' });
    })
    .catch((err) => {
      console.log('Error in DD SDK', err);
    });
  AppRegistry.registerComponent(appName, () => App);
  AppRegistry.runApplication(appName, props);
});

It makes it to the console.log('success') line, but nothing shows up in Datadog.
Environment
Running inside iOS Simulator
Describe what you expected:
Because the initialization looks like it succeeded, I would expect some data to start flowing to Datadog. Does this not work from an iOS simulator?
Additional context
My package.json file:
{
  "name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.13.2",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/drawer": "^5.11.4",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "axios": "^0.21.1",
    "color": "^3.1.3",
    "dd-sdk-reactnative": "^1.0.0-beta1",
    "formik": "^2.2.6",
    "immutability-helper": "^3.1.1",
    "lodash.filter": "^4.6.0",
    "react": "16.13.1",
    "react-moment": "^1.1.1",
    "react-native": "0.63.4",
    "react-native-config": "^1.4.1",
    "react-native-elements": "^3.1.0",
    "react-native-fs": "^2.18.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-inappbrowser-reborn": "^3.5.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-loading-spinner-overlay": "^2.0.0",
    "react-native-modal": "^11.6.1",
    "react-native-paper": "^4.8.1",
    "react-native-reanimated": "^1.13.3",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.16.1",
    "react-native-sensitive-info": "^6.0.0-alpha.9",
    "react-native-vector-icons": "^7.1.0",
    "react-redux": "^7.2.2",
    "reanimated-bottom-sheet": "^1.0.0-alpha.22",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "styled-components": "^5.2.3",
    "tailwind-rn": "^3.0.1",
    "yup": "^0.32.8"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "detox": "^18.0.2",
    "eslint": "^7.16.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-detox": "^1.0.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.21.5",
    "eslint-plugin-react-hooks": "^4.2.0",
    "eslint-plugin-sort-keys-fix": "^1.1.1",
    "jest": "^26.6.3",
    "jest-circus": "^26.6.3",
    "metro-react-native-babel-preset": "^0.59.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

Hello @millro04!  Do you see nothing in both Logs and RUM or only in RUM? Just for the reference, Logs feature is located here https://app.datadoghq.com/logs.

@0xnm I have a follow up questions to this. My experience so far is that using DdLogs the log will end up under Logs while for example console.error will be found under RUM. Is this a correct assumption? Thanks!

Hi @karlerikjonatan. Yes, console.error will produce error in RUM. DdLogs will forward everything to the Logs, but if it is DdLogs#error, then entry will be propagated to both Logs and RUM.

@0xnm is it expected to work seamlessly as well with https://app.datadoghq.eu/logs ?
I provided config.site = "EU" but I'm not sure I've initialized it in the proper react-native section

Hello @zeph! Yes, it should work seamlessly, you have to provide it before initialize is called https://github.com/DataDog/dd-sdk-reactnative/blob/009f5370097f52b697e909c0ddab7105666259c8/example/index.tsx#L27

Same issue here, stuck in 'Waiting for data'.
I just set up the SDK, it initializes. I instrumented the event tracker and can see DdRum.addAction(...) being called, but nothing seems to be sent over the network. Don't see any logs in Xcode from the native module either. Tried both on simulator, and on tesflight release on device.
Is there a way to debug the native layer to see what's going on?

Hi @0xnm, thanks for the quick reply! Yes I do see "The RN Sdk was properly initialized" in Datadog Logs now. Thanks for the clarification there. My only other question is that in Datadog RUM it says that there are still 0 user sessions. What counts as a user session/when does data start getting tracked in RUM? Thanks!

@millro04 Currently definition RUM requires to have at least 1 active view, so to activate the session at least 1 view should be started. You can either start view with our manual instrumentation DdRum#startView (and then stop with DdRum#stopView, more examples here https://github.com/DataDog/dd-sdk-reactnative/blob/main/README.md#manual-instrumentation) to track screens or use auto-instrumentation - currently only React Navigation is supported, you can find example here: https://github.com/DataDog/dd-sdk-reactnative/blob/main/README.md#track-view-navigation.

@0xnm solved, I had fiddled with the network-security-config due to the fact that we have a private endpoint (with its own SSL CA) to call to... doing so, we prevented the application and any library in it to reach out to the "normal internet endpoints"... now it is fixed, works like a charme


Method to set the headers for all request

I was wondering if it's possible to add a new method to set the headers for all requests. Now, for every request I have to do something like:

// Pass the headers with the authentication token
Response response = client.get(path: URLS.projects, headers: headers)

...

// Pass again the same headers
Response response = client.post(path: URLS.projects, headers: headers) {
    json name: project.name,
               description: project.description
}

I would be great to have a method to set the headers or to add a new header for all request. With that method I could do:
RESTClient client = new RESTClient(serverUrl)
client.setHeaders([Authorization: 'my-auth-token'])

What do you think?

I think headers provided in the method parameters should override any default headers.

As per 6 Sept 2016 (Groovy 2.4.7), client.httpClient generates an error (unkown property). I've used restClient.defaultRequestHeaders['headername'] = 'headervalue' instead


Google sign in is not working in android m

Google sign in is not working in android m, but works for lower versions

Are you running the sample app provided here, or your own application?  Can you describe in what way it does not work on Android M?

I am creating my own application.

Created project in google console and enabled the  Google+ API.

Added the configuration file in my project generated by using google consloe.

Added below dependencies
'com.google.android.gms:play-services-plus:8.4.0'
'com.google.android.gms:play-services-auth:8.4.0'

Followed all the steps, still it's not working only in Android M.

Can you try running the sample from this repository on your Android M device and confirm that it works?  It's hard to debug your own app, which may have different error cases.

I created new project id in google console and now its working fine. Thanks for your valuable feedback and quick response.


Tells deploy to skip backup trough SKIP_BACKUP env var

Sometimes I know what I'am doing and I don't want to to a full database backup on deploy. This happens when I change something small on a view, for example.

@maurogeorge done.

@marcioj @tomasmuller looks good to me. Could you guys review and merge plz.

:+1:


New content in CA policies not covered here

The Client Apps section doesn't have the new settings below Mobile apps and desktop clients. I've been looking for info on when I'd want to employ these.
The Client Apps section doesn't list Excel Online under the Target Service column (this is why I came to this page as this seems to be new)

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

ID: 0073f5a8-daf6-7f14-127f-e0c9d80af78d
Version Independent ID: d6d0afdf-3619-ca03-718b-a40bfd07bab9
Content: Azure Active Directory conditional access settings reference
Content Source: articles/active-directory/conditional-access/technical-reference.md
Service: active-directory
GitHub Login: @MarkusVi
Microsoft Alias: markvi

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

HI @Pickell, thanks for your feedback. I have staged an update for the client apps condition section. You can find more information about this condition here.
Excel Online is a client app and only requires a supported browser.
#please-close

@Pickell We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

Much appreciated!
Derek Pickell
INFRASTRUCTURE SPECIALIST
Desktop Services - Hardware & OS
Desktop & Collaboration, Shared Enterprise Services
11th Floor, 444 St. Mary's Avenue, Winnipeg, MB
The Great-West Life Assurance Company
Tel:<PHONE_NUMBER> (office)
Email : derek.pickell<EMAIL_ADDRESS>Vacation Alert:
Dec 14th,  Dec 20th & 21st , Dec 31st
From: Markus Vilcinskas<EMAIL_ADDRESS>Sent: Thursday, December 13, 2018 5:47 PM
To: MicrosoftDocs/azure-docs<EMAIL_ADDRESS>Cc: Pickell, Derek<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [EXT] Re: [MicrosoftDocs/azure-docs] New content in CA policies not covered here (#19887)
HI @Pickellhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Pickell&d=DwMFaQ&c=WOw_-MBzs743TEfXwfA7Tw&r=6_oqvblwIDtJFXo47_p883D2CQDjNSmF7PjJh40uNgw&m=ydf7MDcDUDaMQz4md9fhVfe2Vlybzbhth1L7REx3b0Q&s=42hNh5TUSA65zfRbRNtcPBf7n5f12EJ0uyNSiPiygV4&e=, thanks for your feedback. I have staged an update for the client apps condition section. You can find more information about this condition herehttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.microsoft.com_azure_active-2Ddirectory_conditional-2Daccess_conditions-23client-2Dapps&d=DwMFaQ&c=WOw_-MBzs743TEfXwfA7Tw&r=6_oqvblwIDtJFXo47_p883D2CQDjNSmF7PjJh40uNgw&m=ydf7MDcDUDaMQz4md9fhVfe2Vlybzbhth1L7REx3b0Q&s=rhuL5GyX9SDK-4mt3r5qXrVHTsGKkexawGFYxwVWEi0&e=.
Excel Online is a client app and only requires a supported browserhttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.microsoft.com_azure_active-2Ddirectory_conditional-2Daccess_technical-2Dreference-23supported-2Dbrowsers&d=DwMFaQ&c=WOw_-MBzs743TEfXwfA7Tw&r=6_oqvblwIDtJFXo47_p883D2CQDjNSmF7PjJh40uNgw&m=ydf7MDcDUDaMQz4md9fhVfe2Vlybzbhth1L7REx3b0Q&s=y1TmZDIKxcYTLqjBnaxlE5DNTOoSVt66n7FDJMfhw_I&e=.
#please-close
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MicrosoftDocs_azure-2Ddocs_issues_19887-23issuecomment-2D447162481&d=DwMFaQ&c=WOw_-MBzs743TEfXwfA7Tw&r=6_oqvblwIDtJFXo47_p883D2CQDjNSmF7PjJh40uNgw&m=ydf7MDcDUDaMQz4md9fhVfe2Vlybzbhth1L7REx3b0Q&s=7ihPHtm5qmCh6stuRPM5v_L2bcjz3NJ82JZHFMz_bIM&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AoEKpSIYLU-2D7ImZfa1gTU0-5F3f6z1xGnTks5u4ub0gaJpZM4Y-5FTjk&d=DwMFaQ&c=WOw_-MBzs743TEfXwfA7Tw&r=6_oqvblwIDtJFXo47_p883D2CQDjNSmF7PjJh40uNgw&m=ydf7MDcDUDaMQz4md9fhVfe2Vlybzbhth1L7REx3b0Q&s=ME7pEUS7KK1u6YWFa2Vp3YZtrJURvYF4NF9VeZHKs1Q&e=.