Shared Props proposal

Shared Props in LiveVue
Problem Statement
When building applications with LiveVue and LiveView, developers frequently need to pass the same props (like flash and current_user) to multiple components. This creates unnecessary repetition in both LiveView and Vue components.
Current Approach
Here's how developers currently handle common props:
Layout Component:

<template>
  <Flash :flash="flash" />

    <slot />

</template>

LiveView Component:
# my_app_web/live/home.ex
defmodule MyAppWeb do
  use MyAppWeb, :live_view

  def mount(_params, _session, socket) do
    # current_user comes from live_session and MyAppWeb.UserAuth
    {:ok, socket}
  end

  def render(assigns) do
    ~H"""
    <.vue
      v-component="HomeLive"
      v-socket={@socket}
      flash={@flash}
      current_user={@current_user}
    />
    """
  end
end

Page Component Options
Developers currently have two approaches for handling these props in page components:
1. Explicit Props Declaration

<template>
  <Layout v-bind="{ flash, current_user }">

  </Layout>
</template>

2. Using $attrs
<template>
  <Layout v-bind="$attrs">

  </Layout>
</template>

Limitations of Current Approach

Repetitive prop declarations in every component
Manual prop drilling through component hierarchies
Increased boilerplate in LiveView templates

Proposed Solution
We propose adding a shared option to make common props globally available to all LiveVue components.
Option 1: Module-Level Configuration
# In your web.ex or similar
defp html_helpers do
  quote do
    use LiveVue, shared: [:flash, :current_user]
  end
end

Option 2: Application-Level Configuration
# config/config.exs
config :live_vue, shared: [:flash, :current_user]

Updated Component Usage
With either configuration approach, components can access shared props through the useLiveVue hook:
<template>
  <Flash :flash="vue.shared.flash" />

    <slot />

</template>

Open Questions

Handle optional vs. required shared props
Should shared props live under vue.shared or directly in the useLiveVue return value?
Should we provide a way to opt-out of shared props for specific components?
Are we ok with this just being a LV only functionality? (Since we only have access to the @socket in a LV)

Thank you @bjufre for a detailed proposal.
I've faced that challenge by myself, so I fully agree it would be nice to have a solution.
Comments on your proposal
Page Component Options

Developers currently have two approaches for handling these props in page components:

There's a third (not documented) option:

This basically allows to treat top-level props as "store" and use them as needed. It also aligns with shared props in Inertia.js
Just, currently props, slots and handlers are kept under .vue key in useLiveVue to avoid polluting a hook object. It's a little inconvenient to access... since it's an undocumented feature we could move all of them up, so they could be used like live.props etc? We could also create a helper useLiveProps() but if it would be as simple as useLiveVue().props then probably it wouldn't be needed.
Proposed solution

We propose adding a shared option to make common props globally available to all LiveVue components

I like it! Just, when designing APIs I'm thinking about finding similarities to existing Vue features. That one kinda reminds me of v-bind={}. Maybe instead naming it "shared" we could:

Add option to .vue called v-bind with that usage:  v-bind={[:current_user, :flash]} -> shortcut for writing current_user={@current_user} flash={@flash}
Allow for configuring it in both config.exs and use LiveVue like this:

# In your web.ex or similar
defp html_helpers do
  quote do
    use LiveVue, bind: [:flash, :current_user]
  end
end

# config/config.exs
config :live_vue, bind: [:flash, :current_user]

If used in both <.vue> and a global config, we would merge these arrays. If used

What do you think? Is that name understandable?
Open questions

Handle optional vs. required shared props

What do you mean? It it would be not defined in @socket, then we'd send null as value. If that prop is declared as required on the client-side, then user will get a warning.

Should shared props live under vue.shared or directly in the useLiveVue return value?

I would get rid of vue and put it directly in useLiveVue, like useLiveVue().props. We might even create a global property $live to be used in templates without explicitly calling useLiveVue()

Should we provide a way to opt-out of shared props for specific components?

I don't see a reason. That feature should be used sparingly. On the client side, unused props are put in $attrs and by default passed down to the first child component. Developer can "Catch" that prop by explicitly defining it and then drilling won't happen.

Are we ok with this just being a LV only functionality? (Since we only have access to the @socket in a LV)

Yes
Besides, I have my own questions:

What if we would like to rename a prop? I believe the most common case is snake_case -> camelCase translation. Probably we don't need to worry about this just yet, as it's not critical?

What if we'd like to have a shared prop that's not an assign in the socket? Eg a function returning something. Currently it always requires using on_mount hook to calculate assign first, or doing it explicitly in each mount. But maybe it's also not an issue?

And a note to myself:

Doing assigns = assign(assigns, :key, value) inside the LiveVue component always sets assigns.__changed__.key to true, since LV is not able to understand if that value was updated or not. This results in LV sending :key prop on every diff, even if not necessary. But since we'd have access to socket.assigns.__changed__, I could just synchronize relevant keys to avoid performance hit.

After a few days, I believe it's not the right call to implement v-bind syntax like this. It's an additional way of passing props that's less flexible and transparent what happens under the hood. I think name "shared" better reflects the intention, and also it follows Interia.js naming. Just, these two things are left:

What if we would like to rename a prop? I believe the most common case is snake_case -> camelCase translation. Probably we don't need to worry about this just yet, as it's not critical?

What if we'd like to have a shared prop that's not an assign in the socket? Eg a function returning something. Currently it always requires using on_mount hook to calculate assign first, or doing it explicitly in each mount. But maybe it's also not an issue?

After a few days, I believe it's not the right call to implement v-bind syntax like this. It's an additional way of passing props that's less flexible and transparent what happens under the hood. I think name "shared" better reflects the intention, and also it follows Interia.js naming.

Completely agree with this 🙏

What if we would like to rename a prop? I believe the most common case is snake_case -> camelCase translation. Probably we don't need to worry about this just yet, as it's not critical?

I think that right now we can postpone the decision for this, but I also think that we can also use something like:
# In your web.ex or similar
defp html_helpers do
  quote do
    use LiveVue, shared: [:flash, {:current_user, "currentUser}]
  end
end

WDYT?

What if we'd like to have a shared prop that's not an assign in the socket? Eg a function returning something. Currently it always requires using on_mount hook to calculate assign first, or doing it explicitly in each mount. But maybe it's also not an issue?

I think I'm not fully understanding, could you provide an example/use case so that I can understand where you're coming from? 🙏

I think I'm not fully understanding, could you provide an example/use case so that I can understand where you're coming from? 🙏

It's about the case where you don't have an assign in the socket, yet you'd like to pass it as a prop. On the other hand it probably doesn't make a lot of sense 😄
Anyway I have an idea. Let's provide a very easy way to share props from socket to vue using your suggested syntax, but let's also leave a "backdoor" functionality for customizing that process.
What exactly I have in mind:
config :live_vue, shared_props: [:flash, :current_user]

Could be a shortcut for writing
config :live_vue, before_render: {LiveVue.SharedProps, :assign_props, [:flash, :current_user]}

so if you want to simply use shared props you can do it! But if you'd like to make case conversion or load something directly from DB, without storing it in the socket etc, then you can do it as well by implementing your own module.
What do you think @bjufre ?

@Valian sounds good!
Sorry for the late reply, but end of year has been really crazy!
How do you want to do this? Want me to try and take a stab at it?


HTTPS GET/POST with different CA certificate

To access the Kubernetes API from within a Kubernetes cluster, one uses HTTPS with a non-standard Certificate Authority (CA) whose certificate is provided on the filesystem. Here is documentation about how you do so when you're using curl.
From my reading of eventuals/http.h we don't support using an alternative CA, which means we can't use eventuals::http to access the Kubernetes API.
Feature request: make it possible to use a different CA certificate. 🙂
For now, I'll use this workaround instead.

Note: related to #173 since both need to be fixed before we can access the Kubernetes API with eventuals::http.

https://github.com/3rdparty/eventuals/pull/179


Caching on ListComponentTypes appears to have errors when using multiple Alarm Types

What happened:
I noticed an issue with the caching on the ListComponentTypes used by GetAlarms where it’s returning the wrong cached result after the server boots up.  GetAlarms should return 1 entry for each alarm. The workspace has 6 alarms that are of a component type that extends com.amazon.iotsitewise.alarm called com.j.construction.alarm.  The first time data is pulled it shows just 6, but when a refresh occurs it shows all 6 entries twice.
What you expected to happen:
After refresh there should still only be 6 entries
How to reproduce it (as minimally and precisely as possible):
Work space with zero basic alarms
Work space with zero alarms derived from basic alarm
workspace with zero sitewise alarms
workspace with 1+ alarms derived from sitewise alarms
Use GetAlarm query and display it in a Table Panel and get 1+ entries
Refresh data query and get 2 times 1+ entries
Screenshots

Enhanced Logs
Added logging in get alarms of the basicComponentType returned on: https://github.com/grafana/grafana-iot-twinmaker-app/blob/11172022_Release/pkg/plugin/twinmaker/handler.go#L484 and sitewiseComponentType returned on https://github.com/grafana/grafana-iot-twinmaker-app/blob/11172022_Release/pkg/plugin/twinmaker/handler.go#L497
First pull logs:
ogger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:51:39.28193045Z level=info msg=“basic component types found: {\n ComponentTypeSummaries: [{\n   Arn: \“arn:aws:iottwinmaker:us-east-1:iotrociaccount:workspace/AmazonOwnedTypesWorkspace/component-type/com.amazon.iotsitewise.alarm\“,\n   ComponentTypeId: \“com.amazon.iotsitewise.alarm\“,\n   CreationDateTime: 2022-06-15 00:57:17.495 +0000 UTC,\n   Description: \“iotsitewise alarm native component type\“,\n   Status: {\n    Error: {\n\n    },\n    State: \“ACTIVE\“\n   },\n   UpdateDateTime: 2022-06-15 00:57:17.495 +0000 UTC\n  }],\n WorkspaceId: \“JDemo\“\n}”
logger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:51:39.517052546Z level=info msg=“sitewise component types found: {\n ComponentTypeSummaries: [{\n   Arn: \“arn:aws:iottwinmaker:us-east-1:282301944532:workspace/JDemo/component-type/com.j.construction.alarm\“,\n   ComponentTypeId: \“com.j.construction.alarm\“,\n   CreationDateTime: 2022-07-12 01:10:12.323 +0000 UTC,\n   Description: \“J construction alarm type\“,\n   Status: {\n    Error: {\n\n    },\n    State: \“ACTIVE\“\n   },\n   UpdateDateTime: 2022-07-12 01:10:12.323 +0000 UTC\n  }],\n WorkspaceId: \“JDemo\“\n}”
Second pull logs (note cache comment in logs):
logger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:52:31.158936973Z level=debug msg=“using cached value” key=ListComponentTypes~JDemo///com.amazon.iottwinmaker.alarm.basic@
logger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:52:31.159047101Z level=info msg=“basic component types found: {\n ComponentTypeSummaries: [{\n   Arn: \“arn:aws:iottwinmaker:us-east-1:282301944532:workspace/JDemo/component-type/com.j.construction.alarm\“,\n   ComponentTypeId: \“com.j.construction.alarm\“,\n   CreationDateTime: 2022-07-12 01:10:12.323 +0000 UTC,\n   Description: \“Jconstruction alarm type\“,\n   Status: {\n    Error: {\n\n    },\n    State: \“ACTIVE\“\n   },\n   UpdateDateTime: 2022-07-12 01:10:12.323 +0000 UTC\n  }],\n WorkspaceId: \“JDemo\“\n}”
logger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:52:31.159078839Z level=debug msg=“using cached value” key=ListComponentTypes~JDemo///com.amazon.iotsitewise.alarm@
logger=plugin.grafana-iot-twinmaker-datasource t=2022-11-16T22:52:31.159155796Z level=info msg=“sitewise component types found: {\n ComponentTypeSummaries: [{\n   Arn: \“arn:aws:iottwinmaker:us-east-1:282301944532:workspace/JDemo/component-type/com.j.construction.alarm\“,\n   ComponentTypeId: \“com.j.construction.alarm\“,\n   CreationDateTime: 2022-07-12 01:10:12.323 +0000 UTC,\n   Description: \“J construction alarm type\“,\n   Status: {\n    Error: {\n\n    },\n    State: \“ACTIVE\“\n   },\n   UpdateDateTime: 2022-07-12 01:10:12.323 +0000 UTC\n  }],\n WorkspaceId: \“JDemo\“\n}”
Anything else we need to know?:
Environment:

Grafana version:

Plugin version:

OS Grafana is installed on:

User OS & Browser:

Others:

I retested this using the original dataset and it's still occurring on main branch.


Square logos

Overview
We need a square logo to use on social media.  We have created some and this is the issue where they can be found.
Action
Attach square logos as a comment to this issue.

@ExperimentsInHonesty Two logo variations have been uploaded. We need to follow up and figure out finalized brand & logo colors.

Logos and social media assets to be found here: https://drive.google.com/open?id=1U-r0Y_s8QhHE5PXu2d4KR53cNP9mCYpj

Gave @chalimar access to upload logo to repository and org.

Assets uploaded to Repository & Org:


Allow overriding service_provider on docker::run

Its possible to override the service_provider when managing the docker
daemon in case the defaults in params.pp aren't correct, but not when
defining a container using docker::run. This change adds a new
service_provider parameter to the run defined type, so that containers
can also be managed in these situations.
Fixes garethr/garethr-docker#755

Implemented in new upstream by https://github.com/puppetlabs/puppetlabs-docker/commit/a77179b52f2818e9e52059233c4f80725107892d


How to install Jay ?

Hello,
i would like to use Jay Command line tool on windows but even after following the instructions, i can't do a simple jay-h: Unknown command.
How sould i add it to the windows path ?
Thanks

Just add to the path where Jay.go is.
For me it's :
C:\Users\aqt\go\src\github.com\blue-jay\jay


Adds Integration Testsuite for all supported runtimes, upgrades some deps

See src/it/README.md for details on what the TS does and how.
Some components and dependencies changes to be looked at:

Thorntail upgraded from 2.2.1 to 2.5.0. I needed that for better Arquillian support. I figure we already established with CQs that this runtime dependency is not a problem.
Adds a dependency on RestEasy 4.3.0.Final
Adds dependency on maven-failsafe-plugin
Lifts Java requirement from 1.8 to 11

It works for all runtimes on Linux
It correctly hit the Helidon package problem, so it made me rebase. It also hit an error message from Liberty which I whitelisted. More on whitelisting is in src/it/README.md.
...

Results :

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:34 min
[INFO] Finished at: 2020-01-17T16:28:23+01:00

It is 24 integration tests for runtimes, 1 smoke check for the API before it all goes to runtimes and 5 unit tests.
The time it takes is pretty nice, but mind you I have all the artifacts cached in my local .m2 repo and I am running it on a fairly powerful workstation. When run fresh, it obviously downloads the Internet and takes much more time.
Ping @rdebusscher @cealsair @Emily-Jiang for thoughts.
Windows
Test suite fully supports Windows, although Payara does not pass because it doesn't start. See below.
Windows: Tests run: 30, Failures: 4, Errors: 0, Skipped: 0

Runtime
Windows TS status
Comment

Thorntail
:heavy_check_mark:

Liberty
:heavy_check_mark:

Payara
:x:
Payara issue; doesn't start

Kumuluzee
:heavy_check_mark:

Tomee
:heavy_check_mark:

Payara issue 4445
Payara fails not because of the test suite, but because of Payara.
@rdebusscher , could you follow up with your peers on (no examples selected, simplest case):
C:\tmp\payara\demo
λ mvn clean package && java -jar target/demo-microbundle.jar
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ demo ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ demo ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to C:\tmp\payara\demo\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ demo ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\tmp\payara\demo\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ demo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ demo ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ demo ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/Administrator/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Packaging webapp
[INFO] Assembling webapp [demo] in [C:\tmp\payara\demo\target\demo]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\tmp\payara\demo\src\main\webapp]
[INFO] Webapp assembled in [41 msecs]
[INFO] Building war: C:\tmp\payara\demo\target\demo.war
[INFO]
[INFO] --- payara-micro-maven-plugin:1.0.1:bundle (default) @ demo ---
[INFO] Configured Artifact: fish.payara.extras:payara-micro:5.194:jar
[INFO] Unpacking C:\Users\Administrator\.m2\repository\fish\payara\extras\payara-micro\5.194\payara-micro-5.194.jar to C:\tmp\payara\demo\target\extracted-payaramicro with includes "" and excludes ""
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] Configured Artifact: com.example:demo:1.0-SNAPSHOT:war
[INFO] Copying demo.war to C:\tmp\payara\demo\target\extracted-payaramicro\MICRO-INF\deploy\ROOT.war
[INFO] Building jar: C:\tmp\payara\demo\target\demo-microbundle.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.567 s
[INFO] Finished at: 2020-01-20T01:59:54-08:00
[INFO] ------------------------------------------------------------------------
Jan 20, 2020 1:59:55 AM fish.payara.micro.PayaraMicro main
SEVERE: null
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:50)
        at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:114)
        at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:73)
        at fish.payara.micro.boot.PayaraMicroLauncher.create(PayaraMicroLauncher.java:87)
        at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:71)
        at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:397)
Caused by: java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
        at java.base/java.util.Properties.loadConvert(Properties.java:654)
        at java.base/java.util.Properties.load0(Properties.java:454)
        at java.base/java.util.Properties.load(Properties.java:404)
        at fish.payara.micro.impl.PayaraMicroImpl.setBootProperties(PayaraMicroImpl.java:2567)
        at fish.payara.micro.impl.PayaraMicroImpl.create(PayaraMicroImpl.java:205)
        at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:200)
        ... 10 more

Please?
System

Windows 2019
OpenJDK Runtime Environment (build 11.0.1-redhat+13-LTS)
Apache Maven 3.6.0

Hello, @rdebusscher , could you run the TS and review the MR? I would like to have it merged eventually :smiley:
Most importantly, could you run tests and see whether it works on Mac?

A general feedback: Thread.sleep was used in many places. Can it be replaced by Awaitability?

A general feedback: Thread.sleep was used in many places. Can it be replaced by Awaitability?

@Emily-Jiang Do you mean https://github.com/awaitility/awaitility ?
Could you elaborate more on what exactly is wrong with sleep in a loop until a condition OR timeout is reached? Given the usual dangers of Interruption and context - which I find kinda irrelevant in this particular code's context.
I would like to have some reasoning for adding yet another library...

A general feedback: Thread.sleep was used in many places. Can it be replaced by Awaitability?

@Emily-Jiang Do you mean https://github.com/awaitility/awaitility ?
Could you elaborate more on what exactly is wrong with sleep in a loop until a condition OR timeout is reached? Given the usual dangers of Interruption and context - which I find kinda irrelevant in this particular code's context.
I would like to have some reasoning for adding yet another library...

Resolved during call. The code is actually O.K.

@rdebusscher @Emily-Jiang
This is ready for another review. Changes addressed in the last commit. As usual, when it comes to bugs, please, do downvote the PR into oblivion as necessary :)
When it comes to missing features or hypothetically missing features, I would kindly ask to not block the PR on those and to open Issues for future PRs.

Works after the update too...
Linux
$ mvn clean verify -Pthorntail -Dskip.integration.tests=false -DSTARTER_TS_WORKSPACE=/dev/shm/

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10:58 min
[INFO] Finished at: 2020-02-04T12:40:24+01:00
[INFO] ------------------------------------------------------------------------

Windows
C:\Users\Administrator\source\microprofile-starter (tests -> origin)
λ mvn clean verify -Pthorntail -Dskip.integration.tests=false -DSTARTER_TS_WORKSPACE=C:\tmp\

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  20:33 min
[INFO] Finished at: 2020-02-04T04:04:11-08:00
[INFO] ------------------------------------------------------------------------

Those 4 failures on Windows are a known Payara bug: https://github.com/payara/Payara/issues/4445


Dropped isomorphic-fetch in favor of cross-fetch

isomorphic-fetch has a bug that prevents it from running in a react native environment. Since it is no longer maintained, it will never be fixed. That also means dependencies are outdated. cross-fetch is React Native compatible.

Oh awesome, thanks!


Always collect sparsely in TaxonomyFacets & switch to dense if there are enough unique labels

Description
Right now (at least int IntTaxonomyFacets), we choose an integer array for counting if the number of hits is greater than 10% of the index; else we count sparsely. Counting densely may still not be a good idea if we have a huge number of hits but they only belong to a few labels - in effect making the values sparse.
We can use something like DocIdSetBuilder does: At first it uses a sparse structure to gather documents, and then upgrades to a non-sparse bit set once enough hits match.
FloatTaxonomyFacets seems to always collect densely. Maybe it's also worth adding this decision making to the parent class instead?

@Shradha26 I would like to pick this task up in case you are not already working on it.
In your benchmark/efforts, have you tried to test if these sparse vs dense arrays provide any benefit at all? Basically, could it be the case that, the performance in both is basically the same. In that case, we can just stick to one and simplify the logic..

I think we also must factor in the size (cardinality) of the taxonomy ordinals for that dimension.  E.g. a color field that has at most a few hundred unique values really should use dense collection?  The memory is bounded and small, and CPU cost is lower for dense collection.

Could we make the collection dynamic?  Collect into a sparse structure at first, and if it gets too big, switch to dense.

I am not actively working on this problem as of now.
I am still in the process of figuring out what would be the correct thing to test/do here as a first step. Jotting down some thoughts that I had.

We could try the Collect into a sparse structure at first, and if it gets too big, switch to dense. experiment. It adds a costs to the setValue call when it will have to suddenly switch to a dense structure. But that should be fine? It is all within the same query. So no cases of a single query in a sea of queries suddenly being too slow. What heuristic on when to switch to use here?
Do we need to make the setValue call operation thread safe? How will that work with the dynamic changing?

luceneutil needs to be hacked to record JFR stats for determining if this change improves the heap allocation or not.

Could we make the collection dynamic? Collect into a sparse structure at first, and if it gets too big, switch to dense.

+1 to exploring this approach. Right now it's all up-front heuristic based. If it proves cheap enough to switch, it could be a good compromise to switch directions as we get more information by visiting the collected hits.


[Task]: Installation guide and Getting started notebook discrepancies

What is the motivation for this task?
Please correct me if I am wrong but I believe the getting started notebook here may provide an incorrect installation guide.

The guide provides installation through PyPI or from source. Installation from source provides anomallib v1.0.0.dev0 and installation through PyPI provides anomalib v0.7.0.

As a result, the subsequent package imports immediately proceeding the library installation provided in the notebook will not work and therefore new users following this guide can no longer proceed to learn how to use the anomalib library:
from anomalib import TaskType
from anomalib.data import MVTec
from anomalib.data.utils import read_image
from anomalib.deploy import ExportType, OpenVINOInferencer
from anomalib.engine import Engine
from anomalib.models import Padim

For example,
TaskType is no longer a class in the init file of src/anomalib in version 0.7.0 and as a result from anomalib import TaskType yields:
ImportError: cannot import name 'TaskType' from 'anomalib'
Same issue happens with from anomalib.deploy import ExportType, OpenVINOInferencer which yields
  File "c:\....\anomalib/test.py", line 3, in <module>
    from anomalib.deploy import ExportType, OpenVINOInferencer
  File "C:\....\anomalib\deploy\__init__.py", line 6, in <module>
    from .export import ExportMode, export, get_metadata, get_model_metadata
  File "C:\....\anomalib\deploy\export.py", line 23, in <module>
    from anomalib.models.components import AnomalyModule
  File "C:\....\anomalib\models\__init__.py", line 33, in <module>
    from anomalib.models.uflow import Uflow
  File "C:\....\anomalib\models\uflow\__init__.py", line 6, in <module>
    from .lightning_model import Uflow, UflowLightning
  File "C:\....\anomalib\models\uflow\lightning_model.py", line 19, in <module>
    from anomalib.models.uflow.torch_model import UflowModel
  File "C:\....\anomalib\models\uflow\torch_model.py", line 43, in <module>
    class UflowModel(nn.Module):
  File "C:\....\anomalib\models\uflow\torch_model.py", line 46, in UflowModel
    input_size: tuple[int, int] = (448, 448),
TypeError: 'type' object is not subscriptable

The package imports in the notebook do not work with anomalib v.0.7.0 OR anomalib v1.0.0.dev0, which version was this notebook written for?
Describe the solution you'd like
It would be great for all new users of this library, such as myself, if this could please be updated as new users will not be familiar with these classes and their locations.
It may be prudent to change the install guide to a fixed version which works with the notebook provided. The link to install instruction here is broken.
Additional context
No response

I'm also having the same issue that NO module named 'lighting'

I'm also having the same issue that NO module named 'lighting'

@Fan1fei if you follow the following instructions it should install ligthning
git clone https://github.com/openvinotoolkit/anomalib.git
cd anomalib
pip install -e .
anomalib install -v

This issue is now complete as the version is pushed to pypi
https://github.com/openvinotoolkit/anomalib/pull/1799

To use other subcommand using anomalib install
Could not find anomalib. To use this feature, ensure that you have anomalib installed.
Could not find openvino. To use this feature, ensure that you have openvino installed.
To use comet logger install it using pip install comet-ml
To use any logger install it using anomalib install -v
/usr/local/lib/python3.10/dist-packages/anomalib/cli/install.py:63: UserWarning: Torch Version will be selected as 2.2.0.
torch_install_args = get_torch_install_args(torch_requirement)
/usr/local/lib/python3.10/dist-packages/anomalib/cli/utils/installation.py:271: UserWarning: Installed CUDA version is v12.2.
v11.8 <= Supported CUDA version <= v12.1.
This script will use CUDA v12.1.
However, this may not be safe, and you are advised to install the correct version of CUDA.
For more details, refer to https://pytorch.org/get-started/locally/
cuda_version = update_cuda_version_with_available_torch_cuda_build(cuda_version, torch_version)
⠋ Installing packages...  This may take a few minutes.
[11:21:44] Installation list: ['gitpython', 'anomalib', 'tox', 'timm<=1.0.7,>=1.0.7',
Same issue. This issue occurring in the google colab. It shows these logs and shell completes running. In both scenarios using pip and from source. %anomalib doesn't work as I use !anomalib install -v. Still having same problem. @samet-akcay


German Date format is not correct.

Bug, feature request, or proposal:
German Date format is not correct.
What is the expected behavior?
I am trying to use German Date picker format in my project and the format currently supported is 1.1.2017. which is false. FYI .I have upgraded my project to material beta 12.
What is the current behavior?
It should ideally be for e.g. 01.01.2017.
What are the steps to reproduce?
http://plnkr.co/edit/t1yMm5DhUa2soxB82dWh?p=preview
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
material beta 12
Is there anything else we should know?
no

See https://material.angular.io/components/datepicker/overview#internationalization


core/workflow-testing

Modify github actions to run cypress and vitest. We currently don't have any tests at the moment so this is low priority.

I will add a dummy test for Cypress (e2e) and Vitest (unit-testing) in the appropriate locations, probably just the example ones given from the course slides.
I will then run them just from the terminal to make sure they work as intended, and add the command to run these tests to the Workflow.
More useful tests can later be added to the test scripts.

Project already has example tests to run
e2e tests are run with npm run test:e2e and Unit Tests are run with npm run test:unit

vitest.config.js had wrong path to import vite.config.js, don't know why, fixed it but not sure if that will mess anything up when the code gets merged and you guys try running it? Like, I don't know if that was just an error on my machine?

Commands to run tests work as expected, now just need to add these to the Actions Workflow

Not sure if there is a certain way of adding more commands and I've never used .yaml before so I just appended the run test commands after the npm run build command.

#23 PR Opened and workflow ran successfully, just waiting for any reviewers comments


Strand in a google chrome extension?

Hi,
I would like to use strand in a google chrome extension I am currently developing. I have installed strand via bower etc. as per the documentation and imported the strand.html file in the head of my popup.html file.
In the popup.html file I have included two strand buttons. When I go to try the extension out in the browser all the strand files are being imported into the head. However the buttons are not output correctly, instead just the text of the buttons is displayed. If I view the popup.html directly from the browser then it is all fine and the strand buttons display correctly.
I'm not sure if this has something to do with CSP of chrome extensions? I have tried using polybuild a open source github repo to resolve this issue but have had no luck.
Is there anything you would recommend? Have you come across this issue before?
Thanks,
Fraser

potentially CSP, but i'm also not sure what the packaging requirements are for a chrome extension, so i'm suspicious if its just ignoring the other local files when its built.
Another option would be to use google's vulcanize tool to bundle everything into a single html file (in this case that would be popup i'd imagine)

Excellent, thanks Dan the google vulcanize tool did the trick.
Another quick question. When I use vulcanize it generates a html file and a js file. Do I need the js file? If I include this file too then the strand elements fail to display again. I imagine I don't need the js file if everything gets imported via strand.html?

as you can see we havent heavily tested in CSP... grid does a lot of internal rewriting for item pooling so thats likely the culprit.  Is there any way to get a better trace in your setup?

closing due to inactivity. Please reach out via internal channels if you need additional support.


Generate and install CMake config

Analog to https://github.com/stack-of-tasks/eigenpy/issues/98

I will try to work on it but it will require some work to cast all the pkg-config files as standard CMake dependency.

Solved by #1067


System.Systemd.Daemon.Internal module that is Socket-agnostic?

In my project I am currently integrating systemd-Support, I don't use the Network.Socket interface provided by network, but System.Socket of socket.
Therefore I have to convert Sockets from a network's Socket to a socket Socket, which is kind of ugly and depends on a deprecated function:
import Control.Concurrent.MVar (newMVar, takeMVar)
import qualified Network.Socket as S
import System.Socket hiding (Error (..))
import System.Socket.Family.Inet6
import System.Socket.Type.Stream
import System.Socket.Protocol.TCP
import System.Socket.Unsafe (Socket (..))

sockConvert :: S.Socket -> IO (Socket Inet6 Stream TCP)
sockConvert s = S.fdSocket s >>= (fmap Socket . newMVar . fromIntegral)

Also it requires for me to have an additional dependency in my executable which increases maintenance.
Since it is pretty easy to construct a Socket from a File Descriptor in most socket-librarys, my suggestion is to expose a new internal module that more or less always returns a File Descriptor instead of a Socket. This then could be used as a backend to System.Systemd.Daemon, so the API would not change at all.
I think #6 should be resolved first. If you think this is a good idea, I probably could be bothered to implement it.

Okay, better Idea:

System.Systemd.Daemon stays as is (⇒ we maintain compatibility)
System.Systemd.Daemon.Fd file descriptor based versions of the following functions:

storeFd
notifyWithFd
getActivatedSockets
getActivatedSocketsWithNames


Feature: NATS Fine Tuning

🔖 Feature description
Introduce consumer and stream replicas configuration: In clustered mode, NATS allows for the setup of multiple consumers and stream replicas, enhancing scalability and fault tolerance by distributing workload and data across multiple instances. In non-clustered mode, these configurations ensure reliability and resilience by providing redundancy and failover mechanisms, enabling seamless operation even in the event of node failures or network disruptions.
🎤 Pitch / Usecases
NATS ensures robust data persistence for messages, safeguarding their integrity and availability within the platform
🔄 Alternative
No response
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

AB#9929

Potential duplicates:

[#5253] Feature: Notifier behind nats (64.58%)

Potential duplicates:

[#5253] Feature: Notifier behind nats (64.58%)

Potential duplicates:

[#5253] Feature: Notifier behind nats (64.58%)


Support for custom relabeling_configs

Add support for custom relabelings with the relabel_configs property. This PR is heavily based on #843.
It doesn't seems like __param_target was available when using MetricRelabelConfigs, with this change I was able to scrape the blackbox exporter and correctly attaching labels.
This change manipulates the relabel_config  property that prometheus-operator tries to automate by using selectors. Let me know if this is something this project would consider as a useful feature or not.

Oh, sorry the last week has been quite busy.  We have used my fork in production so this haven't been a priority for me. It's okay for me if you want to take over 👍 😄

I'm currently pretty swamped with work, so I unfortunately can't get to this right now.

@brancz I can try to give it a shot if that is ok. I was wondering how do you see this being abstracted though, do you think we should model it as a property in the ServiceMonitorSpec, something entirely new like a BlackboxMonitorSpec, or?

I was thinking towards something like a BlackboxMonitor, yes! :slightly_smiling_face: Thinking a bit more about it, it might make sense to open an issue first where we can get some people to comment on a design, but in general I think you can go ahead and think of an API object definition that you envision, and suggest it in an issue. Then we discuss it together and then it can be implemented. Sounds good?

First-class support for Blackbox sounds very cool :) May I also suggest tackling (now or later) the problem of authentication for blackbox-monitored targets?
I contemplated the idea of passing credentials through the exporter but that was shut down in https://github.com/prometheus/blackbox_exporter/issues/290.
Assuming that prometheus-operator is willing to generate the blackbox.yml config file for blackbox_exporter, it could define its own module definitions and handle auth secrets in a clean fashion.
My current solution is to generate the blackbox.yml file dynamically with a unique (hashed) module name for each authenticated target.

I was thinking of drawing the line at the Prometheus config, so that a BlackboxMonitor would configure the appropriate relabeling rules for first class support for Blackbox monitoring without having to learn the intrinsics of relabeling. The Blackbox configuration I don’t believe is something we can or should automate, but documenting it properly and providing examples is something we should definitely do.


Add initial e2e test app

Adds minimal text entry, clear test.
This is meant to serve as base upon which a comprehensive set of text
entry tests can be built. Once flutter/flutter#9383 is resolved, a set
of key-event based input tests can be built.

Sending out as proof of concept for initial thoughts.

@cbracken What's the status of this PR?

I'm going to need to do #9383 first -- I'll keep the patch but drop the PR until that's ready to clean out the queue.


progress HTTP error

this error occurs at startup:
Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.
‘GET /progress HTTP/1.1’ 200 -
instead of openai api key I used local llm running through lm studio, and its documentation says that instead of openai api key you can use ‘http://localhost:1234/v1/’
what is the problem and how to fix it ?

same error


Please add a link to the repo/issues from the comment form

Please add some text along the lines of:
"Please consider opening an issue with this extension here instead of leaving a negative review. Many authors will respond quickly and do their best to fix issues you have. Almost all VSCode extensions are provided free and developed by authors in their spare time."
A negative review (ie less than 5 stars) currently has a massive impact on an extension's ranking when sorted by rating. My extension has dropped way down because a user had an issue which was nothing to do with the extension, and that I could easily have explained through an issue.
Please remember that the huge, free, open source extension ecosystem is one of the main reasons for VSCode's popularity. Having your hard worked trashed overnight is very demotivating.

related: https://github.com/microsoft/vscode/issues/94744#issuecomment-689660902

This makes good sense.


md-checkbox not working when used with mdSuffix and text is selected in input

Bug, feature request, or proposal:
Bug
What is the expected behavior?
The checkbox should select and deslect when clicked
What is the current behavior?
The checkbox has an inconsitent state, most of the time resetting to the previous value
What are the steps to reproduce?
Open https://plnkr.co/edit/RMcOcdXapnkfOCo0ls1Z?p=preview
Click on the checkbox, it will not change its state correctly
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest
Is there anything else we should know?

It looks like this is working as expected now as seen here.


Jan 8th 2024 MicroProfile Marketing video for YouTube

Here is the link to the video for upload to YouTube. Please update the Meeting Minutes with a link to the recording.
Thanks!

https://youtu.be/20WGuKF4dvI


Add Results ServiceMonitor to pipeline-service

Adds two service monitors to pipeline-service for Tekton Results api and watcher.

This is WIP as we need two labels for the api and watcher services added upstream to get propagated downstream and into infra-deployments.

@enarha, @yftacherzog is working on a guide about how to add service monitors. I think this PR is a good candidate for testing it.

Sure. I can use that.
There is also https://github.com/redhat-appstudio/infra-deployments/blob/main/components/monitoring/README.md

Sure. I can use that. There is also https://github.com/redhat-appstudio/infra-deployments/blob/main/components/monitoring/README.md

That's the one I updated. I also shared a demo with you that we plan to be presented soon.

@yftacherzog It's been a while, but I just updated the PR based on the presentation you've shared with me.

/lgtm

/retest-required

/test appstudio-e2e-tests

/lgtm

/assign @adambkaplan
/assign @Roming22
currently only these two are in the owners file, and thus are the only two that can officially approve via
/approve

@Roming22 Updated.

/test appstudio-e2e-tests

/test appstudio-hac-e2e-tests

/retest

/test appstudio-hac-e2e-tests

/test appstudio-e2e-tests

/lgtm


Darken background color of selected text/content

The actual background color of the selected text/content is too light, which can be difficult to locate.
Screenshot :

Done for next release.
Screenshot :


Library not loaded: @rpath/PocketSVG.framework/PocketSVG

I can build my demo app but unable to run on a device. I get the following:
dyld: Library not loaded: @rpath/PocketSVG.framework/PocketSVG   Referenced from: /var/containers/Bundle/Application/D9192E4B-C3DA-4520-AF0C-C9B10545F85C/RNArkitApp.app/RNArkitApp   Reason: image not found

I have the PocketSVG.xcodeproj added per the manual instructions. Is there an extra step that I'm missing?
react-native-cli: 2.0.1
react-native: 0.57.8
react-native-arkit: ^0.9.0
react: 16.6.3
Xcode version: 10.1 (10B61)
iOS version: 12
Device: iPhone X

I have the same issue

I also have this issue in only slightly updated framework versions from what the original poster had.
I was able to hackily get around it by removing PocketSVG and any references to it in the RCTARKit project. It means you cannot use the ARKit.Shape component but, I do not currently need to use it, even though it would be nice to have it working.
I am sure there is some way to ensure the dependency is properly filled, but I did not feel like spending my time figuring that out yet.

 The "iOS > Manual Installation" section of the readme covers all that is needed. I figured most of it out without seeing that, except for the last step where PocketSVG ios is added as an embedded binary.

sorry for the pocketsvg integration. I know its not super clean and only really needed for one small feature: It enables you to create easy 3d objects by using a 2d svg shape and extrude it.

No worries macrozone. It is a pretty nice addition. Worth the few seconds it takes to setup the dependencies manually.


Distribution version

This version of the link walker can be used externally, since it doesn't require access to the LDAP server.
It should not be merged until we have solved both internal and external distribution.

Will not merge at this time - how to support both internal and external use not solved.


vosviewer: add version 1.6.18

Closes #8878

Relates to #XXXX

[ ] I have read the Contributing Guide.

Hi I have created a manifest for VOSviewer but it depends on jre8. I think all java related software has been moved to java bucket. how to solve the dependecy issue?

I have tested Eclipse Temurin JRE with Hotspot 8 but no luck. Seems like it depends on Oracle Java 8 to start

/verify

Update: I tried oraclejre8 in java bucket but it does not work

seems like a full jre8 installation via https://www.java.com/en/download/ is required

Update: I tried oraclejre8 in java bucket but it does not work

Probably related to this issue: https://github.com/ScoopInstaller/Java/issues/119

I have tested Eclipse Temurin JRE with Hotspot 8 but no luck. Seems like it depends on Oracle Java 8 to start

I installed openjre via winget so maybe Java is required for this program

Update: I tried oraclejre8 in java bucket but it does not work

seems like a full jre8 installation via java.com/en/download is required

Probably related to this issue: ScoopInstaller/Java#119

Agreed. Just found that termuin jre installed via winget will not add Oracle Java related registry keys. After manually changing it now worked as expected

So maybe add a notes to ScoopInstaller/Java#119? Or waiting for java bucket to add support? but as I have seen that there is no progress since 2020.

So maybe add a notes to ScoopInstaller/Java#119? Or waiting for java bucket to add support? but as I have seen that there is no progress since 2020.

I think adding notes should be fine.
I am not an expert on Java. I am not really sure why Java bucket's maintainer did not solve that, maybe they have some other concerns.

So maybe add a notes to ScoopInstaller/Java#119? Or waiting for java bucket to add support? but as I have seen that there is no progress since 2020.

I think adding notes should be fine.
I am not an expert on Java. I am not really sure why Java bucket's maintainer did not solve that, maybe they have some other concerns.

Added

Should I remove her suggestion in manifest?

Should I remove jre suggestion in manifest?

Yes. Please remove it.


[Nox.Generator] Localization Dto Data Model

relates to #907
relates to #936

Dto Data Model
We will create an additional class model (EF) for each Entity that contains all localized fields, for example, for Country Entity, if the Description and ShortDescription are localized fields, then we will have:
  public class CountryLocalizedDto
  {
      public int CountryId { get; set; } // Primary & Foreign key
      public string CultureCode { get; set; } // Primary Key
      public string Description { get; set; }
      public string ShortDescription { get; set; }
  }

Tasks

Create a new template : <Entity>LocalizedDto
Generate a new Model, for All Entities that have at least one localized field (exclude owned entities)
In the EntityDto namespace
Add the Entity key  - {KeyNameId} (For now support only entities with single key)
Add the CultureCode Property (will be set as Primary Key with the Entity Foreign Key)
Add an attribute for each localized field, with the proper Nox.Type Primitive Type
Register the Dbset on the Dto DbContext
Configure the new entity in DtoDbcontext

https://regusit.atlassian.net/browse/MP-9632


[WIP} Move stored preds in callbacks to CPU

EpochScoring with caching by skorch keeps predictions in the GPU memory if model is on GPU. This can cause out of memory problems (it is a known problem: https://github.com/skorch-dev/skorch/issues/509)
This PR should fix that via a workaround on our side. Can you test it @AKiessner ? Basically callbacks should work fine again wrt to GPU memory.

Also decided to directly call module forward in the predict_with_window_inds_and_ys functions to avoid further overhead, may also speed up scoring @gemeinl . We may wanna consider merging these functions and parts of the predict_trials function as well to avoid duplicate code (like a predict_with_window_inds_and_ys  function in scoring that gets iterator and model, is called by other functions)

Ya judging from discussion in issue linked above, they would need somebody to implement an option how to postprocess preds in epoch scoring. And until that is done, expect you to extend as we do in case it is not implemented there.
So merging this now as seems to work for @AKiessner  again


Testing equipment data [Feature]

Would it be possible to keep track of the ratio of public versus private testing numbers? I work with a group that is tasked with increasing testing capability.  The private and public labs use different equipment, and we are trying to determine the ratio of testing taking place between the different types of equipment. I can provide more detail privately if necessary.

@vukosim There are definitely no other people that can help with updating - I am the volunteer data analyst, so all data-related work is done by me. Having said that, I suppose I might as well volunteer to do the updating - that strategy worked well enough with the Mpumalanga district data ;-). Looking at the url for the testing data, it looks like it is specifically limited to national level data (which it obviously is when you look at it) - making me wonder whether there may be a similar source on provincial level?

@vaibhavijames: are you normally updating this dataset?

Hi @lizelgreyling, yes, I have been updating that data. I think there might be some NICD reports with the provincial data- I'll see if I can find some of that for you.

@lizelgreyling Check out these reports and see if they have the information you need. The Weekly Testing Summary reports at the bottom have some testing data by province, so they might be helpful. The Private Consultation reports should also have some private testing data.
Let me know what else I can do!
https://www.nicd.ac.za/diseases-a-z-index/covid-19/surveillance-reports/

Here's a sample of the Weekly Testing Summary
https://www.nicd.ac.za/wp-content/uploads/2020/06/NICD-COVID-19-Testing-Summary_-Week-24-2020-Final.pdf

@vaibhavijames Thank you! This is very useful.

@lizelgreyling please see the data that @vaibhavijames put up nicd_hospital_surveillance_data.csv
You might want to update the adoption file so that we know who is updating one. @vaibhavijames Great work.

Thank you @vukosim ! I will keep working on extracting the data from the NICD reports. I'll see if I can get some of the provincial testing data into a csv

Thanks @vaibhavijames! I will stop updating now.

@vaibhavijames - are you still updating this dataset?

@lizelgreyling I meant to keep it updated, but with my school year starting I have not been able to. Would you be able to help? Thank you so much