Copying code from ghc-mod rather than depending on it is very fragile

There must be a better way to support your use case than to outright duplicate the code. Maybe we can work together to add whatever you need to the exported API? I'm ghc-mod's maintainer so I might be able to help ;)

Great! The code duplicated from ghc-mod is only used to set ghc flags according to the project's cabal file. I don't remember exactly, but I think the main reason I had to duplicate it was to fix the issue in ghc-mod where the new binary cabal format wasn't supported. It seems like this has been fixed as of the last few weeks, so I think I'll be able to remove the duplicated code.
I'll make a comment here when I know for certain what (if anything) I would need to be exposed in ghc-mod.

On Tue, Apr 28, 2015 at 07:50:33AM -0700, Izzy Meckler wrote:

Great! The code duplicated from ghc-mod is only used to set ghc
flags according to the project's cabal file. I don't remember exactly,
but I think the main reason I had to duplicate it was to fix the issue
in ghc-mod where the new binary cabal format wasn't supported.

That's odd because when I tried mote I still got the error that was
symptomatic of the Cabal-1.22 trouble.

It
seems like this has been fixed as of the last few weeks, so I think
I'll be able to remove the duplicated code.

Yeah that's all supported now.
You copied some quite old code I have since rewritten and it's a lot
more precise now (I hope), even has native support for cabal
components without requiring user intervention.

I'll make a comment here when I know for certain what (if anything)
I would need to be exposed in ghc-mod.

Ok, cool.

That's odd because when I tried mote I still got the error that was symptomatic of the Cabal-1.22 trouble.

Did you install cabalparse? This was my workaround hack to address the 1.22 problem.

Ah right, that's probably it.

Which version of ghc-mod should I depend on? Is it on hackage?

Well you'll have to build against the development version until I release it if you need ghc 7.10 and cabal>1.22 support. Otherwise the one from hackage is fine. Though if you need any API additions then you'll have to build against a development version anyways.
I guess the best way to solve this would be to add a flag to mote's cabal file, something like ghc-mod-devl, set that to default to true and in that flag depend on ghc-mod == 0 (which is the version of ghc-mod from master). Cabal will then and then try to find the development version (you can make it available using cabal sandbox add-source) and fall back to that flag being false if it can't find it. In which case you would depend on ghc-mod >= 5.2 or whatever.
You can then use your existing module doing the ghc-mod stuff with ghc-mod-5.2.x.x and use the new stuff with the devel version by setting CPP defines when the flag is set/unset or by using some hs-source-dirs sorcery.

BTW did you not get the E-Mail I sent you a few days ago?

I did not. It's in this image. http://parametricity.com/images/back.jpg

Yeah, that's where I sent it before. I sent you another one. According to my mail sever it was delivered. Maybe check spam or something?


Subnet replaced during upgrade under PRC

Describe what happened
The following example causes a replacement without any changes to the program in the Subnet resource when upgrading from anything before 5.79 to anything after 5.80 under PRC.
This is not the case under non-PRC. The cause is the addition of a new parameter default_outbound_access_enabled in TF with the following schema:
"default_outbound_access_enabled": {
	Type:     pluginsdk.TypeBool,
	Default:  true,
	Optional: true,
	ForceNew: true,
},

When the provider runs an update with the parameter not present in the state, it forces a replacement.
Unfortunately this is the truthful behaviour in TF but only under -refresh=false:
provider "azurerm" {
  features {}
  version = "3.85.0" // upgrade to 3.115.0
}

resource "azurerm_resource_group" "exampleResourceGroup" {
  name     = "exampleResourceGroup"
  location = "East US"
}

resource "azurerm_virtual_network" "exampleVirtualNetwork" {
  name                = "exampleVirtualNetwork"
  address_space       = ["<IP_ADDRESS>/16"]
  location            = azurerm_resource_group.exampleResourceGroup.location
  resource_group_name = azurerm_resource_group.exampleResourceGroup.name
}

resource "azurerm_subnet" "exampleSubnet" {
  name                 = "exampleSubnet"
  resource_group_name  = azurerm_resource_group.exampleResourceGroup.name
  virtual_network_name = azurerm_virtual_network.exampleVirtualNetwork.name
  address_prefixes     = ["<IP_ADDRESS>/24"]
}

Sample program
name: network
runtime: yaml
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: East US

  exampleVirtualNetwork:
    type: azure:network:VirtualNetwork
    properties:
      addressSpaces:
        - <IP_ADDRESS>/16
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}

  exampleSubnet:
    type: azure:network:Subnet
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      virtualNetworkName: ${exampleVirtualNetwork.name}
      addressPrefixes:
        - <IP_ADDRESS>/24

Log output
No response
Affected Resource(s)
No response
Output of pulumi about
.
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

We could solve this with a TransformFromState, similar to https://github.com/pulumi/pulumi-azure/pull/2150
This could lead to inaccurate state but the parameter does have a default and if the user really cared about that state, they'd refresh it.


Add example for decoding list of nodes

There are usually list of same named nodes in the XMLs I often interact with. Such as below
<foo>
  <bar>
    <baz>1</baz>
  </bar>
  <bar>
    <baz>2</baz>
  </bar>
  <bar>
    <baz>3</baz>
    <qux>A</qux>
  </bar>
</foo>

Couldn't figure out how to parse those list of bar s when writing decoders from cursors.
case class Baz(v: String)

implicit val bazD: Decoder[Baz] =
  Decoder.fromCursor(_.text.as[String]).map(Baz)

case class Qux(v: String)

implicit val quxD: Decoder[Qux] =
  Decoder.fromCursor(_.text.as[String]).map(Qux)

case class Bar(baz: Baz, qux: Option[Qux])

implicit val barD: Decoder[Bar] =
  Decoder.fromCursor { c =>
    (
      c.down("baz").as[Baz],
      c.down("qux").as[Option[Qux]]
    ).mapN(Bar.apply)
  }

case class Foo(bar: List[Bar])

implicit val fooD: Decoder[Foo] =
  Decoder.fromCursor { c =>
    c.down("bar")
      .as[???] // How to decode the list of nodes here?
      .map(Foo.apply)
  }

 .as[List[Bar]] doesn't work because List decoders are expecting comma separated strings as I understand.
Maybe we can add an example to decoders to how to decode such nodes.

Nice spot. This is actually a problem.
I've just opened a PR to fix this providing a prover Decoder[List[T]] implementation.
Let me know what do you think about it
https://github.com/geirolz/cats-xml/pull/138


Install FMT on MacOS

Brew fmt11 is not supported.
ccache brings in fmt11 from brew.
The brew fmt11 headers are taking precedence over bundled headers.
Bundle fmt and remove ccache.
We will fix the header include issue in https://github.com/facebookincubator/velox/pull/10920 and add ccache back.
Resolves https://github.com/facebookincubator/velox/pull/10904

@assignUser thanks for the feedback!

pleas squash the commits.

Why the bit will squash them anyway before pushing?

@czentgr, @assignUser suggested we could download ccache instead. I implemented this.


Juno: Android Oreo : Workload automation AndEMark benchmark failed to run

Juno: Android Oreo : Workload automation AndEMark benchmark failed to run
https://bugs.linaro.org/show_bug.cgi?id=3405

@setrofim One of the observations i noticed is

The timing of click on - Start- button is not perfect as i could see actions performed by Ui Automator on the screen
Updating number of  threads from default 6 to 1 is happening
The run waits at - Start- button and timeouts.

When i clicked manually on the start button the run was able to finish.
It is not a problem of Android Oreo.
Could be Ui Automator.
I will pull latest code and will give a try.
Thank  you.

@setrofim Tested manually on Android Oreo with latest Workload automation master.
The manual run of AndEbench works and it is complete to run.
It is the problem with  Automation script which not getting click on start button on time.
Here is the screen record while running Workload automation on Juno running Android Oreo.
AndEbench automation
https://youtu.be/Acvq-ZUIEDg

AndEMark has not been ported to WA3; as we've had no requests for this, assuming that this is no longer relevant. If that is not the case, please re-open as a request to port AndEMark to WA3.


Missing Translation in BC and MB - "Welcome to ____" topic detail

In both BC and MB, when I go to topics > Welcome to BC/MB > click on a topic, I expect the text below the image and above the large title to read "Welcome to BC/MB" in the respective language. Instead, I see it in English.
Example from MB/French

Example from BC/Punjabi

Acceptance Criteria

[ ]  Change all of these subheaders to read "Welcome to BC/MB" in their respective languages.

Steps for QA:

Go to BC side / English
Go to topics
Open "Welcome to BC" topic
click on any of the topics
change language to all languages
Observe that the small text below the image is not in English but rather in the respective language
repeat above with MB side and check in French.

If the problem has to do with capitalization (in cases where that language uses the English alphabet), here are the translated titles in capital French:

Also seen in MB > French > Soutien familial et specialise > any topic shows "Family and specialized support"

I can confirm that the issue has been resolved. I was expecting to see the change that the "Welcome to BC" tagline under the image header was in the correct languages for both BC and Manitoba and I confirm it is.


Content feedback: Update the solution with Windows Virtual Desktop as RDP solution

Hi Team,
I would recommend to update design with Windows Virtual Desktop as preferred remote desktop / access solution and remove the Apache Guacamole part.
Best regards
Ben
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 06e1dc54-d828-b7ee-9d32-7d43b83966a9
Version Independent ID: 4be88949-4cba-8269-fd78-2cd19884d603
Content: A computer-aided engineering service - Azure Example Scenarios
Content Source: docs/example-scenario/apps/hpc-saas.md
Service: architecture-center
Sub-service: example-scenario
GitHub Login: @alexbuckgit
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#289933

Thank you for your feedback. We have created internal ticket 24401 to track and investigate this issue.

#please-close


Override bread view section

Version information

Laravel: v7.29.3
Voyager: v1.x-dev 5753a2c
PHP: 7.2
Database: MySQL 14.14

Description:
Hi, I was trying to add something to the bread views, I followed the documentation exactly but there is an error. I tried this with different projects I have but throws the same error.
Additional context
Just follow the steps, create the file resources/views/vendor/voyager/bread/edit-add.blade.php, copy and paste the code in the documentation

In Laravel you cannot override and extend a view, that causes a loop.
If you want to override the view for all BREAD you can't use @extends if you want to override it for a single BREAD than you have to put the file in the right folder like:

resources/views/vendor/voyager/posts/edit-add.blade.php

BTW I tried to have that fixed in Laravel but I had no idea how to write a test for it and probably it doesn't bother enough people.
https://github.com/laravel/framework/pull/33123

@MrCrayon So is there a way to add a component to the edit-add.blade.php for all BREADs without having to override every single BREAD?

As said it's a Laravel problem, so you will have more luck asking in a Laravel forum.
As far as I know these are the options:

Patch the framework, best solution if done upstream but quite annoying if you have to keep up to date a fork.
Find a way to tell extend to include the view from vendor and do not use the overridden one to avoid the loop.
I did this in the past adding Voyager views folder to views paths, I can't give you the details now because I'm not near a computer.
Copy the content of the view and add what you need.


Utilize Next.js localization features

See if it makes sense to use Next.js locale features
If not, use pages/[lang]

I've been talking to some colleagues to gather some experiences with this way of solving the language support, and the feedback is really good. Let's try out this mechanism and see how it works. It's not that much configuration needed, and should be easy enough to revert if it doesn't work for us.


Proper editor for Map Item

Map Items need to appear different for whether the IsMoney checkbox is checked or not.

added in https://github.com/RogueCollab/RogueEssence/commit/56e519708fae67849c6018a1bce974e22d8eeeb3


add results for wde experiments on cifar10

upload the results for the cifar10 experiments.
todo: upload the checkpoints

checkpoints uploaded


Partial solution for the "Comment-like substrings"-problem

This patch introduces a new attribute called greedy. The
attribute is a simple boolean flag. If there is no match
for a greedy pattern it can concatenate the next two tokens
into a single string and try to match on this string again.
If a match is found on the second attempt, then the old tokens are
deleted and replaced by the new match.
This solves the "Comment-like substrings"-problem for exactly one
comment at very little cost. With this patch the following code is
highlighted correctly:
"foo /* bar */ baz"; "foo // bar";
/lala"test"sdf/;

This approach fails if there are more than one comments inside the
string:
"foo /* bar */ baz /* bar */ baz";

My previous attempts at this (#444, #334) were too big in terms of code size and the performance impact was too large. This time I reduced it to the bare minimum (41 lines) and the performance should be almost identical. It is only a partial solution, but it should fix most cases, where a comment-like substring appears unintentionally in a piece of code.

Don't think I didn't care about this PR. I just know @LeaVerou has a strong opinion about this so I consider only her can take a decision. I hope you're not closing because of a lack of interest.

Sorry I closed it by accident. I locally updated my gh-pages branch to the newest version of prism and deleted this commit in the process. I should have put the commit in a separate branch. It is now reopened.

Hi @LeaVerou, there seems to be renewed interest in solving this issue #307. I think this PR is a compromise between a full blown LR parser, which is what @foo123 seems to be suggesting, and the regex only approach of Prism. The performance impact should be negligible.

@zeitgeist87, the prism-grammar suggestion is just an add-on (which handles these cases among others) but for a solution to this issue with prism itself, i suggested delimited-block tokens (as in here https://github.com/PrismJS/prism/issues/412), which simply require a small state machine (since they have to keep state untill their pattern closes), instead of a parser machine (as in the add-on)

@foo123 sorry I didn't mean to misrepresent your prism-grammar project.
Concerning your suggestion of delimited-block tokens. I think something like this was already discussed a few months ago and the consensus was, that the added size and complexity isn't really worth it. Prism aims to be a pure small and fast regex highlighter. It does not have to be totally correct. If you want to parse a language without any errors, you need something at least as powerful as a LR(1) parser and Prism is not designed to do that.

@zeitgeist87 no problem
Agree "Prism aims to be a pure small and fast regex highlighter", but disagree
"It does not have to be totally correct". One is not asking to do context-sensitive parsing but this is about lexical analysis, highlight comments CDATA, strings, literal regexes correctly (which are all over the place). If this is not done it is not good (and of course Prism is not alone in that, and afaik many people are not happy with these highlighters not highlighting).
However since these tokens are blocks (in the sense mentioned earlier) it needs a kind of state to be kept so "parser" knows it is inise a block and match.
And it is not much additional code (for what i suggested dont know about other approach). One only has a generic block tokenizer and just passes to it the different start and end paterns (for the different block tokens represented in the language model), so it is just one additional function (and a small one that is)
A highlighter needs to highlight not parse in general, however if highlighting requires some parsing to be done correctly it should be done. Let me give a personal example, i was creating a template engine and wanted to avoid having a full parser for speed and size reasons, however i indeed implemented all the parser parts necessary for the engine to do what it was supposed to do (instead of working half the time, lets say) And it still does not have a full parser (for example function arguments are not tokenised separately but passed as one argument, but there is no problem there for what the engine is supposed to achieve, see what i mean).

@foo123 Yes a full blown parser is probably not necessary. I would love to see something like delimited-block tokens for prism. You could implement it and make a PR...

@zeitgeist87
If the devs here want me to do a PR for this i could try, else it is just a suggestion, among others. Cheers!

Sorry I'm so late to this!
Great idea!!
Does this solve the "foo /**/ bar" problem? I think this type of thing is our most common highlighting fail that I see on random websites using Prism (especially recently, as I was reading gulp tutorials :p ).
In terms of size or quality, the code looks ok to me. :) I don’t currently have the time to read it carefully though. @Golmote, what do you think?

Btw @Golmote, if you, applying your strictest code review criteria, think this is ok (and it does indeed fix the "foo /**/ bar" problem), you have the ok from me to merge it :)
(Yoohoo, 3 years later we’re finally fixing this issue!! (at least for most cases). So happy!)

@LeaVerou if you are refering to my last comment/suggestion, yes it solves that problem exactly with what is described
(if not ignore this comment)

@foo123 Another reason that Prism does not work with a parser, is that a parser generally fails in invalid code. A syntax highlighter needs to work well with invalid code (i.e. highlight most of it as correctly as possible), as any code being typed in an editor goes through invalid states. Not to mention that tons of code examples on the Web are actually invalid. Prism is not a linter, neither does it need to be. I see Prism all the time in websites I visit, and I notice very few failures (and almost always of the kind this PR solves).
That said, I would like being able to define tokens by start, end and escape and a state machine with 2 states shouldn’t take too much code. If you want to give it a shot, a PR would be nice. However, if it’s a huge PR that adds a couple hundred lines, chances are it won’t be merged. Not only because it increases complexity and download size, but also because every line added to Prism Core increases the effort required for future contributors and maintainers. We are very liberal with accepting PRs for language definitions, styles and plugins, but very strict when it comes to Core changes, especially extensive ones.

@LeaVerou , ok i'm working on sth ele right now but i will make a PR as soon as i can for the delimited tokens suggestion
About the other things, every highlighter (invluding Prism) does some klind of parsing. For example using just regexes is parsing. The way invalid code is highlighted is an option (for example it can be bypassed, or highlighted as is). Personaly i would prefer the highlighter to highlight correct code and highlight incvalid code in a different way (i think this is the reason d' etre of highlighting, highlight what is relevant to a given language semanticaly, but opinions can vary on this)

Btw @Golmote, if you, applying your strictest code review criteria, think this is ok, you have the ok from me to merge it :)
(Yoohoo, 3 years later we’re finally fixing this issue!! (at least for most cases). So happy!)
Edit: Just looked at the samples more clearly, yup, it definitely does work on "foo /**/ bar". Awesome!

@Golmote If you can find the time, could you please review this PR. I think it is a nice solution and it has potential, but it is also quite complicated and definitely needs a review. There is no rush, though. I just wanted to "ping" the PR again.

I hope we can get this merged at some point, I really like this functionality.
@zeitgeist87, it would make it easier to review if you added some comments though. It's really hard to follow as it currently stands. (and yes, I'm fully aware that I don't add enough comments either, I'm not saying it won't be merged without them, just that it might speed things up)

I'll make my best to find some time to review this properly by the end of the week.

it would make it easier to review if you added some comments though. It's really hard to follow as it currently stands.

To be honest I find it hard to understand my own code after all this time :smile:. I will review it again and add more comments.

To be honest I find it hard to understand my own code after all this time :smile:

Yeah, this is exactly why comments are useful :P

I'll make my best to find some time to review this properly by the end of the week.

Thanks! It's really appreciated. I'll add more comments to make the intended functionality clear.

Ok so apart from my tiny comment related to the condition, this looks good to me. I still feel quite frustrated by the fact we aren't actually completely solving the issue, but I guess this is better than nothing.
Maybe you could add a few tests for the C-like and the JS components, so that we can ensure it works and it will continue to work in the future. ;)

Ok so apart from my tiny comment related to the condition, this looks good to me.

Nice! Thanks for the review.

I still feel quite frustrated by the fact we aren't actually completely solving the issue, but I guess this is better than nothing.

I tend to see it more like the perfect compromise. Prism is supposed to be lightweight.

Maybe you could add a few tests for the C-like and the JS components, so that we can ensure it works and it will continue to work in the future. ;)

I'll get right on to it.

Is this completely backwards compatible? Can we think of any cases that would be highlighted correctly in the past but not after this is merged?

Is this completely backwards compatible? Can we think of any cases that would be highlighted correctly in the past but not after this is merged?

I can't think of any situation where it would make things worse. It also passes all of the tests in our test-suite.

I am really excited about this. I've fixed the small issues you pointed out. Can we merge it?

While writing the documentation for the greedy-property, I had an idea for a better name. What do you think of the name backtrack: true?

Yay! Congrats team!! This is fantastic!
Neither greedy nor backtrack describe what it does, just how it works. I think it's worth it to bikeshed the name a bit, as we can't change it easily once people start using it.

How about ignoreOtherMatches or something shorter along those lines.
BTW, I love the expression "to bikeshed something". I had never heard it before. I had to look it up on Wikipedia.

How about important: true or privileged: true

Haha, we use that expression all the time in the CSS WG to mean "endless discussions about the name of a new feature". :)
important or privileged are on the right track in the sense that they attempt to describe the purpose instead of the way, but are still confusing.
Just throwing some ideas in the brainstorming: What about something centered around nesting? You would use this flag in tokens that can be nested inside other tokens, right? If not, can we find a general description about which tokens this will be used in? It will help us a lot in coming up with a good name.

this property should be set on every token, that may contain other tokens.

Well, every token that can contain other tokens which could also contain the same token. Otherwise one could just nest it in the grammar.
I think we're on to something here :)

Here is my description:
It is for tokens, that match arbitrary content between start and end markers, because the content can contain stuff that could be matched by other tokens. The Problem is, that Prism has to execute its tokens in order. It the token in the content matches first, the outer token cannot match any more.

It is for tokens, that match arbitrary content between start and end markers, because the content can contain stuff that could be matched by other tokens. The Problem is, that Prism has to execute its tokens in order. It the token in the content matches first, the outer token cannot match any more.

I have no idea what this is saying, and I've even seen the code.
I think you're too close to the implementation right now to write good docs. This is not a flaw, it happens to almost everyone.
Ideally, someone else should write the docs for this, and you could review to correct factual mistakes.
I might give it a shot later on, if nobody is available, but I would be very grateful to anyone who offers.

How about:
Enable this flag to cancel out tokens that come earlier in the language definition if they appear inside this token. For example, comments are parsed first, but if the string /* foo */ appears inside a string, you would not want it to be highlighted as a comment. Use this flag with restraint, as it incurs a small performance overhead.
Just an idea to get us started, I'm not saying it's perfect!

I have no idea what this is saying, and I've even seen the code.

It's probably because of my bad English. At least in part...

Ideally, someone else should write the docs for this

Probably a good idea, but the above text, was not my proposal for the documentation. This is my draft:

greedy

This is a boolean attribute. It is intended to solve a common problem with
		patterns that match long strings like comments, regex or string literals. For
		example a comment enclosed by a string should be highlighted as a string.
		However, if the pattern for comments is executed before the pattern for strings, then
		the comment is highlighted and the string cannot match anymore.

"my /* comment */ string"

		The greedy-property allows a pattern to ignore previous matches of other patterns, and
		overwrite them when necessary. The following example demonstrates its usage:

'string': {
	pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
	greedy: true
}

The English was correct, the problem was it read like code written in natural language.
The docs you're suggesting are much better though, so I retract my statement. :)
Now if only we can decide on a good name :)

container? Cause it may contain other tokens?

nonesting because we want to prevent the nested tokens from being highlighted...

I still think important is quite good, because it kind of has the same meaning in CSS. The order of the rules in CSS is significant. The rules further down overwrite earlier properties. With !important the rule cannot be overwritten any more by following rules.
It is kind of the same with Prism, only in reverse. The rules that come first are the most important ones. With the property important: true we can increase the importance of rules lower down in the chain.

We could even make it an integer important: 5, so that a token can only replace less important tokens.

I think important is a bit confusing.
nonesting is hard to parse (I first read it as "none sting" and was scratching my head as to what you meant)

What about global: true? Instead of matching against local string snippets between previous matches, it matches globally on the whole text. In the process it overwrites previous matches that happen to conflict with the new match.

I've just found a bug related to this. It is quite limited, because the second slash has to be followed by [,.;]:
var test = 1 / 4 + "/,  bug";

This / 4 + "/ is incorrectly highlighted as a regex. A possible fix would be, to prevent greedy patterns from deleting tokens created by other greedy patterns. I'll work on it.


Falsely detected macro if if condition starts with !(

Code like this is falsely recognized as macro:
if !(a && b) {}
if !(n - 2) % 3 == 0 {}

And this results in wrong syntax highlighting:

Nice catch and thank you very much for the report.
I found that some other expressions involving keywords other than if were affected by the same underlying problem (match was one). The fix I've published to version 0.8.1 should resolve it, so simply update your package in Atom.
If you are still seeing the incorrect matching behaviour, please reopen this issue.


docs: Some @overrides for the onLoad() function are missing in the code snippets.

Current bug behavior
example : flame_svg documentation
Some other code snippets have these missing @overides for onLoad() function
Can I submit a PR on this?

Sure, go ahead


Docker 1.12-rc2 complains if CONFIG_IP_VS is not set in kernel, please update contrib/check-config.sh

A user reported the following error to me when starting docker:
WARN[0089] Running modprobe ip_vs failed with message: modprobe: WARNING: Module ip_vs not found in directory /lib/modules/4.4.1-vanilla-docker-1, error:
exit status 1
ERRO[0089] Could not get ipvs family information from the kernel. It is possible that ipvs is not enabled in your kernel. Native loadbalancing will not
work until this is fixed.
ERRO[0000] Failed to write to /proc/sys/net/ipv4/vs/conntrack: open /proc/sys/net/ipv4/vs/conntrack: no such file or directory
Can you please update the checker as requested?
?Also, for my information, is this a required setting, or will Docker work without it?
Thanks for your time,
William

@williamh It's required for swarm routing to work.

Ok, cool, thanks for the explanation. :-)

Where have you got this error message?
I've setup a swarm-mode cluster without any error messages but load balancing did not work - I later realized that my kernel is compiled without ip_vs which likely caused the problems.

Adding to check-config in #24047


feat: support custom instance names for consistent hashing

When using the consistent hashing routing provided by kitex, if the instance addresses obtained from service discovery change, it causes rebalancing, which means recalculating the request routing to instances. However, in some cases, although the IP addresses change, the instances themselves remain the same (for example, update stateful containers in Kubernetes with local disks allocated and some cache data stored). Therefore, we want to use consistent hashing to route requests to the same containers.
In this PR, we add a GetName function to the Consistent Loadbalancer creation options. At the same time, when calculating the consistent hash key for downstream instances, the function attempts to obtain the instance name associated with the IP addresses, rather than using the IP addresses directly. In this way, consistent hashing can still be achieved even if the IP addresses change.
What type of PR is this?
feat: A new feature

Check the PR title.

[x] This PR title match the format: <type>(optional scope): <description>
[x] The description of this PR title is user-oriented and clear enough for others to understand.
[x] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.
在使用 kitex 提供的一致性 hash 路由时，如果从服务发现获取到的实例地址发生了变化，会导致 rebalance，即重新计算请求到实例的路由。但是在某些情况下虽然 IP 地址发生了变化，但是实际上实例本身还是原来那一个（例如，Kubernetes 中的有状态容器，分配了本地盘，并存储了一些缓存数据），所以我们希望使用一致性哈希将请求路由到相同的容器。
在此 PR 中，我们向 Consistent Loadbalancer 创建选项中添加了一个 GetName 函数。同时在计算下游实例的一致性哈希键时，调用该函数尝试获取与 IP 地址对应的实例名称，而不是直接使用 IP 地址。这样即使 IP 地址发生变化，也可以实现一致性哈希。
(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):
(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

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

请问是企业用户吗，有状态的服务会在服务注册时将name带上吗

请问是企业用户吗，有状态的服务会在服务注册时将name带上吗

不会，目前的实现是通过这个服务的一个接口获取到 name。

讨论结果：首先 k8s 是支持 statefulset 变更时，IP 地址不变的。这个需求本身应该在运维层面解决，一般来说，服务发现都无视主机/容器名字的。所以 close 了


How to change the display when passing in a list of objects and multiple select of objects?

I can make the control work with strings, but I need to pass in the list of objects, use the itemBuilder to create a widget from each object, and present that list to the user on the screen in the control. I'm using Choice.prompt but I can't find any way to customize the display before the user clicks to go modal and make their selection.  How do I get it to stop doing .toString() on the object and allow me to customize it?

Hi there! Here's an example that you might find inspiring:
https://github.com/davigmacode/flutter_choice/blob/main/example/lib/prompt/anchor.dart


Tests for report download and is_ready method

Coverage increased (+0.6%) to 89.685% when pulling 5e3a53031fe6ea2be214e2b906a8e55d74624e3a on mevinbabuc:reports into 55bcccadedc29d5344fa6f239ce46755d1fe8cda on numberly:master.

Can you make another release as the tests are in too ?

Thanks for the tests! 0.7.0 tagged and released. :+1:


Added form validation

Check if the email is lowercase
Description: This pull request adds a check to make sure that email addresses are lowercase before they are submitted.
Changes

Added form validation to the contact form.
Added a check to make sure that email addresses are lowercase before they are submitted.
Updated the CSS to display error messages.

@Tufahel I worked with my partner on this but the project was too small for my partner to make any commit

@Tufahel I worked with my partner on this but the project was too small for my partner to make any commit

@ticoniq, Sorry I can't help you in this regard. I only can judge your actions, such as commit history. In every pair-programming activity, there is a way to do it with your partner.  Thanks and Happy Coding!!! 😃

@Tufahel I worked with my partner on this but the project was too small for my partner to make any commit

@ticoniq, Sorry I can't help you in this regard. I only can judge your actions, such as commit history. In every pair-programming activity, there is a way to do it with your partner.  Thanks and Happy Coding!!! 😃

As I said earlier i and my partner worked on the code together, it was just 10 to 15 lines of code, and my partner could"nt make any commit

@Tufahel As I said earlier i and my partner worked on the code together, it was just 10 to 15 lines of code, and my partner could"nt make any commit


Use same sintax of peg.js or antlr

It would be great for usability purposes to use the same syntax of antlr or peg.js, in that way we could reuse grammar already created.
I think that antlr syntax would be a little bit better since is already supported by some IDEs and syntax highliters

This software based on the original formulation of Bryan Ford peg.pdf with the same orginal syntax.
From wikipedia article Parsing expression grammar:
The formalism was introduced by Bryan Ford in 2004.
I don't plan to change anything.

Against the background of the fact that Google is losing interest in their own software product (Dart web platform) and reduces the funds for development, I am more than sure that this will not help to increase the popularity of the Dart.
I do not see any reason that would have to spend my free time on something that is not in demand.


[SPARK-37822][SQL] StringSplit should return an array on non-null elements

What changes were proposed in this pull request?
Currently, split returns the data type ArrayType(StringType) which means the resultant array can contain nullable elements. However I do not see any case where the array can contain nulls.
In the case where either the provided string or delimiter is NULL, the output will be a NULL array. In case of empty string or no chars between delemiters, the output array will contain empty strings but never NULLs. So I propose we change the return type of split to mark elements as non-null.

Why are the changes needed?
Provides a more accurate return type for split

Does this PR introduce any user-facing change?
Yes, schema for queries using split will change to show an array of non-null elements.

How was this patch tested?
Trivial change. Manually tested with Spark shell
scala> spark.sql("SELECT split('a,b,c', ',')").printSchema
root
 |-- split(a,b,c, ,, -1): array (nullable = false)
 |    |-- element: string (containsNull = false)

I can't think of a better test case than just testing StringSplit().dataType == Array(StringType, containsNull = false) at which point, it is just duplicating the actual definition of StringSplit.

cc: @cloud-fan @dongjoon-hyun

thanks, merging to master!

Thanks @cloud-fan for the quick turnaround!

I don't think a backport is necessary. This is not a bug, just a small improvement.


fix: readme description

:tada: This PR is included in version 0.4.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Move repeated functions to multi.utils package

Probably want to use multi.utils:: to be clear.

Pretty much all existing things moved now. Keep this in mind though for future.


Focus on code split

One-line PR description:

Issue link:

Other comments:

@ravisantoshgudimetla , can you take a look at Wei's comments. Otherwise, its lgtm.


Why the index.html in directory dist still contains ?

I create a project using vue-cli and it create index.html in directory dist when i run npm run build.
But the index.html is like this:

I think the index.html should be like this:

Am I wrong?
BTW, what's the manifest.js and vendor.js for?

What you are describing is prerendering, which is outside the scope of this build. You can however use prerender-spa-plugin to add this functionality. It's been tested with Vue and works very well!
The vendor.js file is where we keep common dependencies that will not change very often, such as Vue. The app.js file is for your actual application code. Then the manifest.js file is required by Webpack so that they can correctly work together and bust caches properly.

I think prerender-spa-plugin is for spa prerendering, what I want is building correct production outcome, do you have any other suggestions?
Many thanks.

As a primary maintainer of both this template and that plugin, trust me - it's what you're looking for. 😉 This template produces a SPA and if you want the "correct production outcome" written to index.html, you have to prerender it.

I tried your suggestion and it works.
Thanks again for you patient help.


sg_generate_figure fails after update to v2.3

After update to v2.3, sg_generate_figure fails.
command:
sg_generate_figure -path-results ~/spinegeneric/ds002902-download_results/results
output:
Processing: DWI_RD.csv
Loop across subjects: 100%|████████████████| 236/236 [00:00<00:00, 377.98iter/s]
Subjects removed: []
Traceback (most recent call last):
  File "/usr/local/spine-generic/venv/bin/sg_generate_figure", line 11, in <module>
    load_entry_point('spinegeneric==2.3', 'console_scripts', 'sg_generate_figure')()
  File "/usr/local/spine-generic/venv/lib/python3.7/site-packages/spinegeneric/cli/generate_figure.py", line 567, in main
    ax = add_flag(i, flags[c], ax)
  File "/usr/local/spine-generic/venv/lib/python3.7/site-packages/spinegeneric/cli/generate_figure.py", line 287, in add_flag
    img = _get_flag(name)
  File "/usr/local/spine-generic/venv/lib/python3.7/site-packages/spinegeneric/cli/generate_figure.py", line 284, in _get_flag
    with importlib.resources.path(spinegeneric.flags, f'{name}.png') as path_flags:
NameError: name 'importlib' is not defined

(I did update in spine-generic directory by)
git checkout master
git fetch
git pull
pip install ./

Thanks @valosekj i was rushing a bit too much-- i'll fix these issues and add more tests


[Error] TypeError: Readable.from is not a function

I'm building a new angular project and add @angular/pwa package, install http-server to my project
I got TypeError: Readable.from is not a function error
Environment Versions
OS Type: Windows 7 Pro
Node version: V12.2.0
http-server version: V14.0.0
Steps to reproduce

ng new pwa
ng @angular/pwa
npm install http-server
ng build --prod
http-server

(Starting up http-server, serving ./public

http-server version: 14.0.0

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://<IP_ADDRESS>:8080
  http://<IP_ADDRESS>:8080
  http://<IP_ADDRESS>:8080
  http://<IP_ADDRESS>:8080
Hit CTRL-C to stop the server)

but after opened the http://<IP_ADDRESS>:8080
I got the errors in vsc terminal as below, and the web page remained blank.
[2021-10-22T09:43:28.096Z]  "GET /" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36"
(node:1996) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
C:\Users\alan_yu\AppData\Roaming\npm\node_modules\http-server\lib\core\index.js:246
          stream = Readable.from(bytes)
                            ^

TypeError: Readable.from is not a function
    at serve (C:\Users\alan_yu\AppData\Roaming\npm\node_modules\http-server\lib\core\index.js:246:29)
    at C:\Users\alan_yu\AppData\Roaming\npm\node_modules\http-server\lib\core\index.js:419:13
    at FSReqCallback.oncomplete (fs.js:149:5)

I met the same error and the answer is helpful, thanks all:)


Hotkey to execute query in the current line

Hi, thanks for the extension!
It would be very convinient to allow to execute the current query by pressing some hotkey instead of each time mouseovering on jq -> to output or jq -> to editor.
For example:
CTRL-ENTER jq -> to output
SHIFT-ENTER jq -> to editor

Today I published this enhancement.


[Readme] - Container image link doesn't work.

Version:
Git branches: master, 5.1 and 5.2
Problem component
Github readme
Description
The readme (since 5.1) has a Container images section that includes a link.
ghcr.io/epicgames/pixel-streaming-signalling-server which links to
https://github.com/orgs/EpicGames/packages/container/package/pixel-streaming-signalling-server
Both the text and the link underneath lead me to a 404.
Either the url is incorrect, or it needs account permissions (like access to UE source code).
If the latter, could you add a note that this image is not fully public like the rest of this repo?

Looks good to me, send to prod @EpicGames/developers

Link is behind permissions and will need updating.

@timbotimbo Yes, those container images need you to be part of Epic's Github org so we have added some text mentioning that. https://github.com/EpicGames/PixelStreamingInfrastructure/pull/248


Color rendering inconsistent across different monitor configurations

In this example there is a large green area on the screen. When referenced on my 72ppi external monitor then tested with my retina laptop, I get the following diff where all areas of color are slightly different...   (It's hard to see but even the pink color is slightly different and causing a diff)

What if add '--disable-gpu' to chromeFlags?

I will try that and let you know.

YES!!!!!!!!!!    💯 ⚡✨
This is great!   Thank you!


The default encoding in HtmlDocument is Encoding.Default which causes problems

1. Description
The default encoding in HtmlDocument is Encoding.Default which causes problems, better to just use UTF8 ?
2. Exception

no exception

3. Fiddle or Project
var web = new HtmlWeb();
doc = web.Load("https://www.mstack.nl");

The title should actually be:

Which is in html:
<title>MSTACK – next level consulting and development</title>

But when debugging the internals from HtmlWeb, it's:
<title>MSTACK â next level consulting and development</title>

Which looks like:

HAP: latest
NET version: net6.0 & netstandard2.0

这是来自QQ邮箱的假期自动回复邮件。

您好，你的邮件已收到。
亮亮

It's clear, thank you. I'll use your code.


Testing a rule

I plan to create some rules. How can I test a rule in a GUI? I want to see if my rule displays the content as I expect it to be. I'm not much of a developer so it's difficult for me to visualize it through the CLI.

The easiest I can think of, is to just run miniflux and add the rss in question. Then you can edit the rule file and reload the content using some of the latest entries.


Unified Compressed Pointer

added ability for compressed pointer to use full 32 bits for addressing in single tier mode and use 31 bits for addressing in multi-tier mode

This change is

cachelib/allocator/memory/CompressedPtr.h line 49 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
why this description is repeated?

fixed

cachelib/allocator/memory/CompressedPtr.h line 82 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
why +1? we have the same total addressable memory in total - half for each tier, right?
Can you add some test for this?

I changed kNumTierIdxOffset to 31 from 32.

cachelib/allocator/memory/CompressedPtr.h line 82 at r1 (raw file):
Previously, guptask (Sounak Gupta) wrote…
I changed kNumTierIdxOffset to 31 from 32.

kNumSlabIdxBits = kNumTierIdxOffset (31) - kNumAllocIdxBits (16)

cachelib/allocator/memory/CompressedPtr.h line 139 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
is this assert correct? with tier ID bit, we have less bits for slab, right?
You could also add ASSERT for tid I guess (< 2).

In single tier mode, CompressedPtr doesn't reserve the 32nd bit for tier id. In this PR, kNumTierIdxOffset was changed from 32 to 31. So kNumSlabIdxBits = kNumTierIdxOffset - kNumAllocIdxBits = 31-16 = 15.

cachelib/allocator/tests/AllocatorMemoryTiersTest.h line 139 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
why this is removed?

moving to a separate commit since this fix is not directly related to CompressedPtr PR

cachelib/allocator/memory/CompressedPtr.h line 214 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
you can drop ? true : false part

done

cachelib/allocator/memory/CompressedPtr.h line 216 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
why not just use isMultiTIered?

done

cachelib/allocator/memory/CompressedPtr.h line 226 at r1 (raw file):
Previously, igchor (Igor Chorążewicz) wrote…
same here

done

done. regression not observed.


Storing (camera) array data fails (ParameterWithSetpoints)

If I understood correctly, ArrayParameter is deprecated and ParameterWithSetpoints is now the way to describe multidimensional parameters like 2D images coming from a camera for example. However I can't find a way of storing this data neither using a Loop nor the DataSaver functionality.
I would prefer saving it using the Loop functionality, since we plan to work with the HDF5 backend for disk storage, that as far as I can see currently is not supported by the DataSaver.
Steps to reproduce

Create Instrument with a ParameterWithSetpoints field. Here I am choosing an camera like example, that provides the parameter img with the setpoints x and y.

import numpy as np
from qcodes import Parameter, ParameterWithSetpoints, Instrument
from qcodes.utils.validators import Arrays, Numbers

class DummyImage(ParameterWithSetpoints):

    def get_raw(self):
        nx = self.root_instrument.nx()
        ny = self.root_instrument.ny()
        return np.random.randint(0, 9, size=(ny, nx))

class DummyCamera(Instrument):
    def __init__(self, name: str, nx=3, ny=4, **kwargs):
        super().__init__(name, **kwargs)

        self.add_parameter(name="nx",
                           initial_value=nx,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="ny",
                           initial_value=ny,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="x",
                           vals=Arrays(shape=(self.nx.get,)),
                           get_cmd=lambda: np.arange(self.nx()))

        self.add_parameter(name="y",
                           vals=Arrays(shape=(self.ny.get,)),
                           get_cmd=lambda: np.arange(self.ny()))

        self.add_parameter(name="img",
                           parameter_class=DummyImage,
                           setpoints=(self.y, self.x),
                           vals=Arrays(shape=(self.ny.get, self.nx.get)))

cam = DummyCamera("cam")

Create a parameter to vary in the measurement.

t = Parameter(name="t", set_cmd=None)

(Option I) Start a loop and try to store the data to the automatically created dataset.

from qcodes.loops import Loop

loop = Loop(t[0:10:1]).each(cam.img)
loop.run()

(Option II) Start a measurement and try to store the data using the DataSaver.

from qcodes import Measurement

meas = Measurement()
meas.register_parameter(t)
meas.register_parameter(cam.img, setpoints=(t,))

with meas.run() as datasaver:
    for set_t in np.arange(10):
        t.set(set_t)
        get_img = cam.img.get()

        datasaver.add_result((t, set_t), (cam.img, get_img))

Expected behaviour
Data is stored in a multidimensional array
Actual behaviour
For the storage attempt using the Loop following error is raised:
TypeError: only size-1 arrays can be converted to Python scalars

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "E:\sciebo\QuantumMetrology\Personal\Thorsten Groh\Code\Misc\test_qcodes\issue_minimal_example.py", line 63, in <module>
    loop.run()

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\loops.py", line 716, in run
    self._run_wrapper()

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\loops.py", line 765, in _run_wrapper
    self._run_loop(*args, **kwargs)

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\loops.py", line 855, in _run_loop
    current_values=new_values)

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\actions.py", line 167, in __call__
    self.store(loop_indices, out_dict)

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\data\data_set.py", line 405, in store
    self.arrays[array_id][loop_indices] = value

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\data\data_array.py", line 341, in __setitem__
    self.ndarray.__setitem__(loop_indices, value)

ValueError: setting an array element with a sequence.

This seems to be related to the open issue #627 , where the workaround of converting the data to a python tuple is provided. This however is not suitable for large amounts of data like MP camera images. Is there any update on this?
For the storage attempt using the DataSaver following error is raised:
WARNING:qcodes.dataset.measurements:An exception occured in measurement with guid: aaaaaaaa-0000-0000-0000-0174d592e780;
Traceback:
Traceback (most recent call last):
  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 301, in _validate_result_deps
    self._interdeps.validate_subset(list(results_dict.keys()))
  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\descriptions\dependencies.py", line 456, in validate_subset
    raise DependencyError(param, missing_deps)
qcodes.dataset.descriptions.dependencies.DependencyError: cam_img has the following dependencies that are missing: {'cam_x', 'cam_y'}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "E:\sciebo\QuantumMetrology\Personal\Thorsten Groh\Code\Misc\test_qcodes\issue_minimal_example.py", line 79, in <module>
    datasaver.add_result((t, set_t), (cam.img, get_img))
  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 141, in add_result
    self._validate_result_deps(results_dict)
  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 304, in _validate_result_deps
    'are missing.') from err
ValueError: Can not add result, some required parameters are missing.

Starting experimental run with id: 4.
Traceback (most recent call last):

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 301, in _validate_result_deps
    self._interdeps.validate_subset(list(results_dict.keys()))

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\descriptions\dependencies.py", line 456, in validate_subset
    raise DependencyError(param, missing_deps)

DependencyError: cam_img has the following dependencies that are missing: {'cam_x', 'cam_y'}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "E:\sciebo\QuantumMetrology\Personal\Thorsten Groh\Code\Misc\test_qcodes\issue_minimal_example.py", line 79, in <module>
    datasaver.add_result((t, set_t), (cam.img, get_img))

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 141, in add_result
    self._validate_result_deps(results_dict)

  File "C:\tools\Anaconda3\lib\site-packages\qcodes\dataset\measurements.py", line 304, in _validate_result_deps
    'are missing.') from err

ValueError: Can not add result, some required parameters are missing.

The datasaver is apparently expecting {'cam_x', 'cam_y'} to be set as well. In this case these however should stay constant during the run, the camera is generally not providing the image pixel by pixel. This is were ArrayParameter sounds to be the more suited class to take. Is there a way to flag these parameters as constant?
I wonder if anybody encountered this problem before. Is there some driver implementing this behavior already? I looked through the spectrum analyzers, oscilloscopes drivers, but couldn't find anything suited. The Andor DU401 driver in the contrib_drivers repo is using python lists to return the data, the TPS 2012 is using ArrayParameter.
I would be grateful for any ideas.
P.S.: Thanks a lot for this wonderful work here. I'm really looking forward to use QCoDeS more extensively in the lab.

Both the Array parameters and the ParameterWithSetpoints intend for you to supply setpoints. QCoDeS was mostly designed with the idea in mind that you want to have explicit dependencies on all axis. There is currently no support for specifiying non changing setpoint axis but that is a resonable request.
The Loop is part of the old legacy dataset and does not support ParameterWithSetpoint. I would recommend against ever using it.
However, for now I would suggest that you simply use a Parameter with a Array validator
Something like this
import numpy as np
from qcodes import Parameter, ParameterWithSetpoints, Instrument
from qcodes.utils.validators import Arrays, Numbers

class DummyImage(Parameter):

    def get_raw(self):
        nx = self.root_instrument.nx()
        ny = self.root_instrument.ny()
        return np.random.randint(0, 9, size=(ny, nx))

class DummyCamera(Instrument):
    def __init__(self, name: str, nx=3, ny=4, **kwargs):
        super().__init__(name, **kwargs)

        self.add_parameter(name="nx",
                           initial_value=nx,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="ny",
                           initial_value=ny,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="img",
                           parameter_class=DummyImage,
                           vals=Arrays(shape=(self.ny.get, self.nx.get)))

cam = DummyCamera("cam1")

meas = Measurement(exp=exp)

meas.register_parameter(cam.img)
with meas.run() as datasaver:
    datasaver.add_result((cam.img, cam.img()))

datasaver.dataset.get_parameter_data()
{'cam1_img': {'cam1_img': array([[[2, 0, 3],
          [3, 7, 2],
          [2, 3, 5],
          [4, 5, 3]]])}}

Note however, that the build in plotting in QCoDeS does not currently know how to plot this
due to the missing setpoints

Thanks, that at least stores the data now.
However if providing a setpoint parameter that is varied from shot to shot, and registering it to the measurement, the resulting dataset has a quite storage hungry format of the set values.
This
import numpy as np
from qcodes import (Parameter, ParameterWithSetpoints, Instrument, Measurement,
                    load_or_create_experiment)
from qcodes.utils.validators import Arrays, Numbers
from pprint import pprint

class DummyImage(Parameter):
    def get_raw(self):
        nx = self.root_instrument.nx()
        ny = self.root_instrument.ny()
        return np.random.randint(0, 9, size=(ny, nx))

class DummyCamera(Instrument):
    def __init__(self, name: str, nx=3, ny=4, **kwargs):
        super().__init__(name, **kwargs)

        self.add_parameter(name="nx",
                           initial_value=nx,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="ny",
                           initial_value=ny,
                           vals=Numbers(0),
                           get_cmd=None,
                           set_cmd=None)

        self.add_parameter(name="img",
                           parameter_class=DummyImage,
                           vals=Arrays(shape=(self.ny.get, self.nx.get)))

cam = DummyCamera("cam")
t = Parameter("t", set_cmd=None)

exp = load_or_create_experiment(experiment_name="Test", sample_name="Test")
meas = Measurement(exp=exp)

meas.register_parameter(t)
meas.register_parameter(cam.img, (t,))

with meas.run() as datasaver:
    for t1 in np.arange(0, 5, 1):
        t.set(t1)
        datasaver.add_result((t, t1), (cam.img, cam.img()))

    data = datasaver.dataset

pprint(data.get_parameter_data())

returns
Starting experimental run with id: 6.
{'cam_img': {'cam_img': array([[[8, 2, 0],
        [5, 2, 5],
        [1, 2, 3],
        [6, 4, 5]],

       [[2, 4, 6],
        [0, 4, 4],
        [6, 4, 4],
        [5, 3, 5]],

       [[2, 8, 4],
        [3, 3, 1],
        [6, 4, 5],
        [8, 2, 2]],

       [[2, 2, 2],
        [8, 7, 3],
        [6, 0, 5],
        [8, 7, 4]],

       [[1, 0, 7],
        [8, 2, 3],
        [1, 7, 7],
        [1, 2, 2]]]),
             't': array([[[0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.],
        [0., 0., 0.]],

       [[1., 1., 1.],
        [1., 1., 1.],
        [1., 1., 1.],
        [1., 1., 1.]],

       [[2., 2., 2.],
        [2., 2., 2.],
        [2., 2., 2.],
        [2., 2., 2.]],

       [[3., 3., 3.],
        [3., 3., 3.],
        [3., 3., 3.],
        [3., 3., 3.]],

       [[4., 4., 4.],
        [4., 4., 4.],
        [4., 4., 4.],
        [4., 4., 4.]]])}}

Is this necessary for the logic of the dependencies? This would get a little bit inconvinient and space inefficient for large image data for example. Or is this just the returned representation and the database is storing the data more efficient?

@ThorstenGroh Those extra values of the t setpoint are not actually storred within the database. They are expanded on load time by get_parameter_data

Okay, that is nice. I think, I can close this now then. Thanks a lot for the quick help.


Read of netCDF file fails with units attribute that is not of type string

When opening a netCDF file which has a variable that has a units attribute with a definition of integer 1, xarray fails to open the file:
~/bin/miniconda3/envs/py37_crucial/lib/python3.8/site-packages/xarray/conventions.py in _update_bounds_attributes(variables)
    379     for v in variables.values():
    380         attrs = v.attrs
--> 381         has_date_units = "units" in attrs and "since" in attrs["units"]
    382         if has_date_units and "bounds" in attrs:
    383             if attrs["bounds"] in variables:

TypeError: argument of type 'numpy.int64' is not iterable

This because line 381 will search for the word "since" in an integer type which fails. Of course assigning a integer as units attribute is not wise, but some people tend to assign integer 1 for variables which have no units.

Yes, that could probably be updated to
- has_date_units = "units" in attrs and "since" in attrs["units"]
+ has_date_units = "units" in attrs and and isinstance(attrs["units"], str) and "since" in attrs["units"]

are you interested to send in a PR?

I have an NC file lying around so I can easily test it. I will send a PR in coming days.

Keep in mind that the NetCDF user guide "strongly recommends" that units be a character string. The CF Conventions requires the units to be a character string. I think in xarray you can set decode_cf=False or decode_times=False in the various open_* methods to turn off this interpretation if you need things to work right now.

Hmmm... but see http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#units
 The conforming unit for quantities that represent fractions, or parts of a whole, is "1".

@dcherian Often I find it a little easier to understand the Conformance Document, bullet point two says:

The type of the units attribute is a string that must be recognizable by the udunits package. Exceptions are the units level, layer, and sigma_level.

This shouldn't prevent xarray from doing something useful with non conforming files if it can.

Should be fixed by #7085. Please reopen, if this is still an issue.


[WIP][SPARK-47353][SQL] Enable collation support for the Mode expression

What changes were proposed in this pull request?
Central Change to Mode eval Algorithm:

Update to eval Method: The eval method now checks if the column being looked at is string with non-default collation and if so, uses a TreeMap to manage keys and counts. - TreeMap takes a comparator to determine equality, so supports an efficient combination of counts by keys equal under that comparator but that were not by the OpenHashMap, which uses the default physical equality.

Minor Change to Mode:

Introduction of collationId: A new lazy value collationId is computed from the dataType of the child expression, used to fetch the appropriate collation comparator when collationEnabled is true.

Unit Test Enhancements: Significant additions to CollationStringExpressionsSuite to test new functionality including:

Tests for the Mode function when handling strings with different collation settings.

Benchmark Updates:

Enhanced the CollationBenchmark classes to include benchmarks for the new mode functionality with and without collation settings, as well as numerical types.

Why are the changes needed?

Ensures consistency in handling string comparisons under various collation settings.
Improves global usability by enabling compatibility with different collation standards.

Does this PR introduce any user-facing change?
Yes, this PR introduces the following user-facing changes:

Adds a new collationEnabled property to the Mode expression.
Users can now specify collation settings for the Mode expression to customize its behavior.

How was this patch tested?
This patch was tested through a combination of new and existing unit and end-to-end SQL tests.

Unit Tests:

CollationStringExpressionsSuite:

TODO/WIP: Make the newly added tests more in the same design pattern as the existing tests

Added multiple test cases to verify that the Mode function correctly handles strings with different collation settings.
Specifically, tests include:

UTF8_BINARY_LCASE Collation: Verified that the function behaves as expected when processing lower-case-sensitive data.
Null Handling: Included tests for correct handling of null values with various collation settings.

Benchmark Tests:

TODO DISCUSS PERFORMANCE

Manual Testing:

 ./build/mvn -DskipTests clean package
export SPARK_HOME=/Users/gideon/repos/spark
$SPARK_HOME/bin/spark-shell
   spark.sqlContext.setConf("spark.sql.collation.enabled", "true")
    import org.apache.spark.sql.types.StringType
    import org.apache.spark.sql.functions
    import spark.implicits._
    val data = Seq(("Def"), ("def"), ("DEF"), ("abc"), ("abc"))
    val df = data.toDF("word")
    val dfLC = df.withColumn("word",
      col("word").cast(StringType("UTF8_BINARY_LCASE")))
    val dfLCA = dfLC.agg(org.apache.spark.sql.functions.mode(functions.col("word")).as("count"))
    dfLCA.show()
/*
BEFORE:
-----+
|count|
+-----+
|  abc|
+-----+

AFTER:
+-----+
|count|
+-----+
|  Def|
+-----+

*/

Continuous Integration (CI):

The patch passed all relevant Continuous Integration (CI) checks, including:

Unit test suite
Benchmark suite [TODO RUN AND ATTACH RESULTS]

Was this patch authored or co-authored using generative AI tooling?
No, but the PR Description was co-authored with Chat-GPT.
What is left to do before taking off the WIP tag?

[ ] Discuss/analyze performance in PR Description
[ ] Make sure benchmarks invoke the function enough times to have non-zero values in the benchmark results
[ ] Run benchmarks in GHA and add resultant benchmark reports to Pull Request
[x] Make the newly added tests more in the same design pattern as the existing tests
[x] Make the newly added tests cover all collations
[ ] Figure out within group return value (EG if lower case collation, between  Seq(("Def"), ("def"), ("def"), ("DEF"), ("abc"), ("abc"), ("abc")), is Def, DEF, or def the answer?
Choices are

First in data frame (Def)
Within group Mode:
Arbitrary/ Undefined
Physical ordering
Need to check but I think it is arbitrary in mode

@uros-db This is ready for the initial round of review. Let me know what you think!
I left two todos, that I will add to this branch in the next day or two. They are:

finish the function to benchmark performance impact
since null is not a valid key for tree map, I have to add support for mode to be null, even when mode is on a string column, in which case the hash map gets copied over to treetop). I will then modify the test for this, accordingly.

This feature has been very interesting. Thanks for letting me claim it!

Can you fill the PR description please

Can you fill the PR description please

@HyukjinKwon done.

just another quick note based on your previous PRs - no need to force push and disrupt the commit history, in general I think it's easier to follow changes in this PR as we comment & resolve conversations, and look at commits as they come

kudos for your effort on this ticket! I left some comments
also, please try to ensure that your code doesn't introduce any breaking changes (for example, I see that SQLQueryTestSuite has a failing test for Mode) before requesting thorough review
however, it's also good to verify the approach as soon as possible - so I would advise making these fixes and committing the benchmark results

@uros-db Thanks for the review! I hear you that I should have waited before I brought in the other reviewers.
Thanks for initial feedback!

just another quick note based on your previous PRs - no need to force push and disrupt the commit history, in general I think it's easier to follow changes in this PR as we comment & resolve conversations, and look at commits as they come

@uros-db The issue I run into is then I can't rebase with master realistically, as there will be a large number of rounds of conflict resolution, instead of one round before and after the squashed commit. Do you mind if I go back to continuously squashing all my commits, for this reason?


KFP components throw error when processing parent operations during Python DSL export

Describe the issue
When chaining non-generic KFP components, an error is thrown in processor_kfp.py line 511, citing AttributeError: 'ComponentReference' object has no attribute 'after'. Digging into this a bit further, it's clear that the factory function that is the result of loading a component is actually a FKP TaskSpec object and not a ContainerOp object like the generic components are.
To Reproduce
Steps to reproduce the behavior:

Create a KFP pipeline and chain 2+ non-generic operators
Click on export or submit
See error

Screenshots or log output
Log Output

    Traceback (most recent call last):
      File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/elyra/pipeline/processor_kfp.py", line 506, in _cc_pipeline
        op.after(parent_op)
    AttributeError: 'TaskSpec' object has no attribute 'after'
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/elyra/pipeline/handlers.py", line 52, in post
    pipeline_exported_path = await PipelineProcessorManager.instance().export(
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/elyra/pipeline/processor.py", line 99, in export
    res = await asyncio.get_event_loop().run_in_executor(
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/elyra/pipeline/processor_kfp.py", line 306, in export
    defined_pipeline = self._cc_pipeline(pipeline,
  File "/Users/kierstenstokes/miniconda3/envs/dev1/lib/python3.9/site-packages/elyra/pipeline/processor_kfp.py", line 508, in _cc_pipeline
    op.component_ref.after(parent_op)
AttributeError: 'ComponentReference' object has no attribute 'after'</pre>

Expected behavior
Will need to figure out how to process parent operations properly for these components.
Deployment information
Describe what you've deployed and how:

Elyra version: rc1

As evidenced by the title change, this issue is only affecting an export to KFP Python DSL format. It's clear that a change to the jinja template for this format will be required, but will need to spend some more time researching exactly what that is.
For now, it may be best to remove the option to export to DSL, since users will still have the option to export to YAML if needed.

Do you have the source code for this in a branch somewhere?

Non-generic components are rendered as TaskSpec objects, and the DSL throws an error at the op.after function in processor_kfp.py:504, even though the same function succeeds when run during the 'submit' process.

See https://github.com/elyra-ai/elyra/issues/2301 for explanation


The function is defined in the .c file. Using vscode-clangd to go to the definition does not take effect.

Please describe the problem.
For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html
Installing clangd in Theia and VSCode is the same problem
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
Logs
Please attach the clangd stderr log if you can. (Usually available from the editor)
If possible, run with --log=verbose - note that the logs will include the contents of open files!
If this is a crash, try to put llvm-symbolizer on your PATH per the troubleshooting instructions.
System information
Output of clangd --version: 16.0.0
Editor/LSP plugin: vscode-clangd 0.1.24
Operating system: Windows 10

Please take another look at the bug report template, and actually provide the requested information. In particular:

If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).

and

Please attach the clangd stderr log if you can. (Usually available from the editor)

Your project doesn't have a compile_commands.json file.
Please have a look at https://clangd.llvm.org/installation#project-setup.
Note that finding a definition in a different translation unit requires background indexing to work, so compile_flags.txt is not sufficient, compile_commands.json needs to be used.

Your project doesn't have a compile_commands.json file.
Please have a look at https://clangd.llvm.org/installation#project-setup.
Note that finding a definition in a different translation unit requires background indexing to work, so compile_flags.txt is not sufficient, compile_commands.json needs to be used.

I was also troubled by this problem untill I saw your answer. Thank you for your this !


conditional access operators

This adds ?..
When used on the LHS of an assignment (=, +=, etc.)`, the entire assignment will evaluate to null without the RHS executing.
x?.y.z will always result in a runtime if x is null (as null.z is performed.) This behaviour varies depending on which version of BYOND you are using: http://www.byond.com/forum/post/2667038?hla=Willox#comment25786061. I chose the sane one.
closes https://github.com/wixoaGit/OpenDream/issues/106

I also touched up a few of the opcode handlers which were pushing/popping different amounts of values depending on which branch they took. Caused problems in situations like return L[2] *= 15 , where null would be returned instead of the list's new value.

Conflicts

conflicts fixed

Would you like me to pull my const_expr branch onto this before merging it? It cleans up the expressions namespace into separate files and adds support for (most) constant expressions in switch statement conditions.
https://github.com/willox/OpenDream/compare/conditionals...const_expr
Otherwise I'll just PR it after this is merged.

Make that another PR


Does not work on new laptop

Hi,
I use this add-on extensively on my main tower PC, yet on a new laptop i recently purchased, this add-on will now work. Once F5/F6 is pressed an error message pops up as follows:

"Windows_ can not find 'python'. Make sure you typed the name correctly, and then try again"

I have installed python in the laptop, yet this error still occurs.
Looking forward to hearing back soon,
John Fletcher

When you installed python, did you check off the option for adding it to your PATH variable during the installation?

I simply reinstalled python and ticked the box, glad it's fixed now. Thank you, and keep up the good work!


Beta label is almost invisible

Describe the bug
The "beta" label near the logo became black and it's almost invisible.
How to Reproduce
Have a look at https://studio.asyncapi.com

Expected behavior
I was expecting it to be visible. I think it used to be cyan or white 🤔

Right! Most likely some patch bump changed the styles, because it was always green :thinking:

@fmvilas @magicmatatjahu it looks like the text-teal-500 class doesn't exist anymore in the default.min.css file (Is that file sourced from the react component?) Comparing the version on @magicmatatjahu's PR with the live version, it looks like a class was added in front of each class, .aui-root which I think is causing some of the styles to fail.

It is interesting too that the text-pink-500 class loads from the tailwind.css source but the text-teal-500 class doesn't. I wonder why?
(Also, my apologies if this is not my place to investigate, I am interested in learning how the CSS workflow is on our products which is why I am trying to figure out what the bug is here! I hope that is okay 😃   and forgive me if the solution has already been found)

Awesome! Thanks for the breakdown @magicmatatjahu and glad the issue is resolved! 😄


[3.9-PM] Support for Parametric Maps and AI Results Visualization: Enable display and analysis of parametric maps and AI results

What feature or change would you like to see made?

Implement support for loading and displaying parametric maps within the OHIF viewer
Enable overlaying AI results, such as probabilities or predictions, as parametric maps on top of the primary image data
Connecting the colorbar or legend for visualizing the color mapping and values of the parametric map data
Provide rendering controls and options to customize the color mapping, opacity, and appearance of the parametric map overlay

Why should we prioritize this feature?
Visualizing and interacting with parametric maps and AI results is crucial for medical imaging applications in research and clinical settings. Prioritizing this feature positions OHIF as a powerful platform for exploring and analyzing AI-generated data like probability maps or later on RTDosemaps.

Here is the data and how it renders in 3d slicer https://www.dropbox.com/scl/fo/x18i4nnvbxnokcf140jbk/AMcfA04DK_1oa0hJ_C_7DTQ?rlkey=lkc5e3fr0zpjn6lwesz9x9iar&dl=0

@sedghi which specific file in the dropbox folder referenced above are you referring to as "parametric map"?

There is one called image_proba.dcm

Thank you. I just wanted to confirm this is a parametric map and not a probability SEG.

Hmm, what is probability SEG? Like partial segmentation?

DICOM SEG can be binary or fractional, with fractional reflecting probability or partial occupancy. You can see here: https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.20.2.html#table_C.8.20-2 and here https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.<IP_ADDRESS>.html.


Change username

Description: CodePair set the username of each user as a random anonymous name. (e.g. well-made giraffe). If uses can modify their name after getting a random name, it will be useful.
Why:
When many people access same document, the names of all users are completely anonymous and random so we can't infer who the anonymous user is in real world.
Supposing there is three members named "David", "Mike", "Sarah", they will get random names like "occasional monkey", "funny puppy", "happy giraffee" on CodePair. In this case, members can't infer who "occasional monkey" is.

Hi, I checked this issue and bring some suggestion here. The use case is like this;

User still has anonymous animal name at the first time.
There's a small text input field right next to share button. Anonymous animal name is the default value.
User can change the animal name to whatever they want.
Once Text Input is focus off, Yorkie's UpdateMetadata works and change the user's name.
List Popup of PeerList, PeerListItem will be changed as metadata changed ( => I have to check this point, as I'm not sure UpdateMetadata-related-something in codepair trigger some redux action)

Simple Material UI screenshot below.

Is it acceptable or am I miss something?

@ppeeou That sounds reasonable. But it means there would be some tweak in the order of the images. However, I think that's
more helpful for the user, so I check that point.

Hi, I would like to try this issue based on the idea discussed here if that's ok.

You can edit your name in the Settings popup.


Grpc error

Codecov Report

Merging #22 (7a72b44) into master (d441787) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #22   +/-   ##
=======================================
  Coverage   21.40%   21.40%
=======================================
  Files          11       11
  Lines         285      285
=======================================
  Hits           61       61
  Misses        222      222
  Partials        2        2

Flag
Coverage Δ

unittests
21.40% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

server/grpc/error/error.go
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


fix(parser):support vector expressions

Task Description

Close #33
Solution Description

Passed Regressions

Unittest

Upgrade Compatibility
Other Information
Repair bug vector expressions,
The bug is caused by call_list is not used in rule
Release Note

add test :
select t from foo where (a,b,c) in ((1,2,3),(2,3,4))

please add test like:
select t from foo where (a,b,c) in ((1,2,3),(2,3,4))

Already add test

LGTM


Move grpc plugin out of internal subdirectory

To create a version of protoc-gen-go with additional generator
plugins, it is necessary to make a copy of the main package. This
change moves the GRPC plugin out of the internal subdirectory, so it
can be imported and registered by a copied protoc-gen-go.
See issue #147.
Discussion on README wording welcome. In fact, mentioning the plugin interface in the README serves to publicize it: should the caveats be moved to comments on RegisterPlugin?

Let me take care of #147. It's a little more involved.

Thanks! I guess it didn't turn out to be more involved :-)


Add Overall Timeout policy

Description
Library uses only timeout-per-try and all responsibility rests with the client.
But It'll be better to add an overall-timeout-policy to concentrate full responsibility in the library.
Suggested ordering of overall-timeout-policy at the below image:

All additional information see at:
https://github.com/App-vNext/Polly/wiki/Timeout
https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory#use-case-applying-timeouts

I'll take it when I'm done issue #14.
I read the theory. Everything seems to be clear.

The tricky part is this thing. The HttpClient has its own timeout also which could be considered as a kind of overall timeout too. We need to find a way how to make them work together correctly.

Done. Thanks to @NYMEZIDE
Will be released in version v2.0.0.
See milestone v2.0.0


Health - Microsoft 365 network connectivity

Hi together
How can we download the following report over powershell?, please add in the documentation about health state in teams:

I was not able to find it here:
https://learn.microsoft.com/en-us/microsoftteams/teams-analytics-and-reports/teams-reporting-reference?view=o365-worldwide

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

ID: e2202664-dfd1-d700-f72a-2262593d92bc
Version Independent ID: 795f9821-b46d-0414-8569-d4d3513bbf04
Content: Verify service health for Microsoft Teams - Microsoft Teams
Content Source: Teams/service-health.md
Service: msteams
GitHub Login: @MikePlumleyMSFT
Microsoft Alias: mikeplum

Thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


Running multiple commands with a tiny/no delay reports success, but doesn't update DB

We've had this reported via a customer (I am from Tebex/Buycraft), but we've recently released a new feature called 'push commands' - this means rather than polling for commands to run, we push them to the server over http.
As a side-effect, multiple commands will run near-instantaneously (basically as fast as the server can do it!).
When this happens with LP commands, it looks like the LP permission handles the command, but the DB isn't being updated:
[12:00:31] [Server thread/INFO]: [BuycraftX] Dispatching command 'lp user b444150b-be76-4e5f-b815-397a386e1794 parent add main_ExtCommands main' for player 'valese'.
[12:00:31] [Server thread/INFO]: [BuycraftX] Dispatching command 'lp user b444150b-be76-4e5f-b815-397a386e1794 parent add supporter' for player 'valese'.
[12:00:31] [Server thread/INFO]: [BuycraftX] Dispatching command 'liquidsafe userupdate valese' for player 'valese'.
[12:00:31] [pool-12-thread-1/INFO]: [LP] valese now inherits permissions from main_extcommands in context server=main.
[12:00:31] [luckperms-worker-47/INFO]: [LuckPerms] [Messaging] Sending log with id: 5c4a159a-d1cf-42b4-b131-1eaaf0b5cad5
[12:00:31] [luckperms-worker-51/INFO]: [LuckPerms] [Messaging] Sending user ping for 'valese' with id: ef216680-3d9d-4938-91c5-909542e748f6
[12:00:31] [pool-12-thread-1/INFO]: [LP] valese now inherits permissions from supporter in context global.
[12:00:31] [luckperms-worker-51/INFO]: [LuckPerms] [Messaging] Sending log with id: c3afb358-6e09-48d4-838c-7f639ba505dd
[12:00:31] [luckperms-worker-51/INFO]: [LuckPerms] [Messaging] Sending user ping for 'valese' with id: 44503794-2dd6-4413-adc0-8acc5f625b7f

The logs suggest the permissions should be there, but when we check the DB or check in-game, only the supporter perm is applied.
If we send the commands one at a time, the exact same commands using the same HTTP push mechanism, but send them one at a time with a few seconds between them, then they all apply correctly, so it appears that sending them with no delay between isn't being handled by LP?

LP handles its commands async. Everything else would be insane. Though that has the downside, that commands ran too quickly will get lost.
If I remember correctly there was a rationale behind it why the commands don’t wait for eachother in the background. @lucko will have to answer that.
In the meantime if a fix is urgent, just wait. Or use the API.

A fix for this would be great @lucko or perhaps a config toggle as it's causing quite the issues for our production environment, where we execute several commands at once via BuyCraft.

Though that has the downside, that commands ran too quickly will get lost.

Definitely not intended

Thanks for confirming @lucko - if you want any info about what we're doing to generate the commands, let me know.

Hey, I've been unable to reproduce this so far using the latest dev build of LP.
Which version were you testing with?

Testing was done on build 4.3.109
Do let me know if you'd like this tested on the latest builds @lucko

Yes please - not sure what would've fixed it, but I haven't been able to reproduce despite testing various different approaches.
My test code is:
var console = server.getConsoleSender();

function dispatchCommand(command) {
	server.dispatchCommand(console, command);
}

Commands.create()
	.assertOp()
	.handler(function(c) {
		for (var i = 0; i < 50; i++) {
			dispatchCommand("lp user c1d60c50-70b5-4722-8057-87767557e50d permission set test-" + i);
		}
	})
	.registerAndBind(registry, "lptest");

[16:29:05 INFO]: Done (3.867s)! For help, type "help"
[16:29:05 INFO]: Timings Reset
[16:29:09 INFO]: [helper-js] [LOADER] Reloaded script: lptest.js
> lptest
[16:29:11 INFO]: [LP] Set test-0 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-1 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-2 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-3 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-4 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-5 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-6 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-7 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-8 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-9 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-10 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-11 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-12 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-13 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-14 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-15 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-16 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-17 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-18 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-19 to true for luck in context global.
[16:29:11 INFO]: [LP] Set test-20 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-21 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-22 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-23 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-24 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-25 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-26 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-27 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-28 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-29 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-30 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-31 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-32 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-33 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-34 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-35 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-36 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-37 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-38 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-39 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-40 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-41 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-42 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-43 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-44 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-45 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-46 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-47 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-48 to true for luck in context global.
[16:29:12 INFO]: [LP] Set test-49 to true for luck in context global.
> lp user luck permission info
[16:29:17 INFO]: [LP] luck's Permissions:  (page 1 of 3 - 50 entries)
[16:29:17 INFO]: > test-0 (true)
[16:29:17 INFO]: > test-1 (true)
[16:29:17 INFO]: > test-10 (true)
[16:29:17 INFO]: > test-11 (true)
[16:29:17 INFO]: > test-12 (true)
[16:29:17 INFO]: > test-13 (true)
[16:29:17 INFO]: > test-14 (true)
[16:29:17 INFO]: > test-15 (true)
[16:29:17 INFO]: > test-16 (true)
[16:29:17 INFO]: > test-17 (true)
[16:29:17 INFO]: > test-18 (true)
[16:29:17 INFO]: > test-19 (true)
[16:29:17 INFO]: > test-2 (true)
[16:29:17 INFO]: > test-20 (true)
[16:29:17 INFO]: > test-21 (true)
[16:29:17 INFO]: > test-22 (true)
[16:29:17 INFO]: > test-23 (true)
[16:29:17 INFO]: > test-24 (true)
[16:29:17 INFO]: > test-25 (true)
>

I've tested:

With the target player online
With the target player offline
With groups

It's not possible to (easily) test executing the commands concurrently, as Spigot/Paper blocks async command execution. I assume Buycraft isn't doing this anyway.
Some info about how the commands are being generated / dispatched would be useful though @liam-wiltshire  - I'm only really assuming they're being called from the server thread?

https://github.com/BuycraftPlugin/BuycraftX/
You can look at src of their plugin here

@lucko @liam-wiltshire
This is absolutely 100% still a problem.
BuyCraft push commands simply do not work with LuckPerms.
Disabling push commands returns everything to perfection.
Latest test environment:
PaperSpigot: Build 624
LuckPerms: Build 4.4.16
BuyCraft: Latest as of https://github.com/BuycraftPlugin/BuycraftX/commit/8b38fe51767b9868d705bd86df4d86f55a818ae4

@lucko @liam-wiltshire
What can we do about this?
BuyCraft is still executing commands far too fast.
@lucko how would you recommend this be diagnosed. It's been happening even more often when using a remote MySQL database.
What can we do to properly debug what is going on.

Workaround here:
https://github.com/lucko/LuckPerms/issues/1700

@liam-wiltshire Any way you could possibly set me up with a way to test the push commands function?


Cannot overwrite read only files anymore #104651

This PR fixes #104651

Fix looks good. I have verified that this indeed fixes the issue on Windows -> approved.


Add: Check for network speed

The script handles slow networks really badly, as timings are hardcoded here and there. It would be nice to run a wget or maybe ping when running deploy.sh to check if the internet is slow. In case it is, let the user know that the script might not execute as expected.

wget is not part of Git bash... so it requires to be added later ;)
This article (in french...) explains how to check it with different tools: https://korben.info/mesurez-votre-debit-internet-en-ligne-de-commande.html
Or in English this thread: https://askubuntu.com/questions/104755/how-to-check-internet-speed-via-terminal

Column Average Dload
Command:
IPv4 uniquement :
$ curl --max-time 8 -4 -o /dev/null https://bouygues.testdebit.info/10G.iso -w "%{speed_download}\n" >> stats.log
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 9536M    1 96.0M    0     0  12.0M      0  0:13:14  0:00:07  0:13:07 13.5M
curl: (28) Operation timed out after 8000 milliseconds with 100745216 out of<PHONE_NUMBER>0 bytes received

$ curl -4 -o /dev/null https://bouygues.testdebit.info/1G.iso -w "%{speed_download}\n" >> stats.log
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  953M  100  953M    0     0  12.9M      0  0:01:13  0:01:13 --:--:-- 14.0M

$ curl -4 -o /dev/null https://bouygues.testdebit.info/100M.iso -w "%{speed_download}\n" >> stats.log
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 95.3M  100 95.3M    0     0  12.5M      0  0:00:07  0:00:07 --:--:-- 13.3M

Output a file with Average Dload in it: %{speed_download} the average download speed that curl measured for the complete download in bytes per second.
Last line should be last test.


Use Case 1 & 2

Use case 1: https://build.fhir.org/ig/IHE/ITI.PIXm/branches/master/volume-1.html#141421-retrieving-documents-from-other-domains

It seems odd that the use case title is "retrieving documents from other domains".  It is really "finding a patient's ID in another domain (to enable retrieving documents)"
The last sentence in this section is really the first thing that happens in time:  the patient is registered by the ADT to get an MRN.   Other things are also out-of-order.  Re-arrange the section so the events are chronological.  i.e. 1. ADT creates MRN. 2. allergy information is stored under that MRN, 3. Accident happens. 4. driver's license via ITI-104 5. PIX Mgr cross-references the IDs, 6. PIXm query & response, etc

Use case 2: https://build.fhir.org/ig/IHE/ITI.PIXm/branches/master/volume-1.html#141422-providing-documents-for-other-domains
I don't see the value of this use case for PIXm:

The first sentence (providing documents) has nothing to do with PIXm
The second sentence (PIXm query to enable retrieving a doc) is really use case 1

Is there a reason why we are just not reusing the Use cases from PIX? https://profiles.ihe.net/ITI/TF/Volume1/ch-5.html#5.3   (even if we copy them rather than referring to them...)

Copied the first use case (Multiple ID Domains in a Single Facility Process Flow) to the IG and converted the flow to plantuml. The other use case descriptions https://profiles.ihe.net/ITI/TF/Volume1/ch-5.html#5.3 do not seem to be relevant for PIXm, since they describe the update notification and PIX options.

refactored the use case section by adapting the use case from https://profiles.ihe.net/ITI/TF/Volume1/ch-5.html. See commit number fba93e9.


Feature/simplify styles imports

Related issue
--> #157
Scope of work
Merge internal components styles into their parent styles.
Screenshots of visual changes
-none
Checklist

[ ] I followed composition rules for my component
[ ] I tested the component in most common device sizes (can be tested in Storybook from viewport addon in top menu)

Thanks for help! It's ready to merge!


As an author I want to make posts.

Authors can now create posts through POST /author/post
Post author is inferred from the Authentication Token header.
Required JSON body fields:

text

Optional JSON body fields:

public (default = false)
fof (default = false)

Images aren't handled and are being left to the next milestone.


Asset compiling

I would like to contribute but having problem on the asset compiling, I use yarn watch but it seem like it keep generate all the asset files ( after yarn watch , tons of css and js file waiting to commit ).
what's the better way to handle this ?

You can use git assume ;)
In your ~/.gitconfig, put these lines :
[alias]
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
So, after that, you can execute in terminal "git assume {{ file_or_directory_you_want_to_assume }}" to ignore the file / directory in your commit