feat: support streaming in node JS SDK

Re: #430
This pull request introduces significant enhancements to the FliptEvaluationClient in the flipt-client-node package, including support for both polling and streaming fetch modes, and refactors to improve code readability and maintainability. The most important changes include modifications to the client initialization, the addition of streaming support, and updates to the testing suite to accommodate these new features.
Enhancements to FliptEvaluationClient:

Client Initialization:

Added support for namespace and fetchMode parameters in the client constructor and initialization method. (flipt-client-node/src/index.ts) [1] [2]
Updated the fetcher function to accept a URL and options, including an abort signal. (flipt-client-node/src/index.ts) [1] [2]

Streaming Support:

Introduced methods for starting and stopping streaming updates, including handling of streaming responses and abort signals. (flipt-client-node/src/index.ts) [1] [2]
Added new interfaces StreamChunk and StreamResult to handle streaming data. (flipt-client-node/src/internal/models.ts)

Updates to Testing Suite:

Refactoring Tests:

Moved client initialization inside a runTests function to support both polling and streaming fetch modes. (flipt-client-node/__tests__/evaluation.test.ts) [1] [2] [3]
Adjusted test teardown to ensure the client is properly closed, including awaiting the close operation. (flipt-client-node/__tests__/evaluation.test.ts)

Additional Changes:

Interface Updates:

Modified IFetcherOptions to include an optional signal property for aborting requests. (flipt-client-node/src/models.ts)
Added fetchMode to ClientOptions to specify whether to use polling or streaming. (flipt-client-node/src/models.ts) [1] [2]

These changes improve the flexibility and robustness of the FliptEvaluationClient, allowing it to better handle different use cases and environments.

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

Project coverage is 84.09%. Comparing base (40022f7) to head (0bd80bc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #452   +/-   ##
=======================================
  Coverage   84.09%   84.09%
=======================================
  Files           8        8
  Lines        3936     3936
=======================================
  Hits         3310     3310
  Misses        626      626

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

nice!
One thing that worry me is the error handling in startStreamingUpdates. Let's say there is an network error for a minute for any reason and then a recover. What will happen to the Flipt client and how user could recover from it?

yeah good point. we should likely add some reconnect/retry logic for both streaming and polling. it would be great to be smarter about error handling in general, like if its a 401 or 404 error because of bad auth token or invalid URL then it should exit quickly with error. but if its a transient networking error then we should try to reconnect. will look into how we can support this


Porfolio List (Parent)

@ecuarezma Okay, finally got @jscarpelli3 's PR in. This one does a lot of the same stuff. See if merging with his fixes your images.

@ecuarezma I worked on this a bit and got the images showing. We may have to finesse the CSS but at least it's up and running. Check out the changes I made and if you're around Monday we can go over them.


Upgrade for Keycloak 23 compatibility + WIP restore UI through ConfiguredProvider

compatibility with Keycloak 23.x
WIP to restore UI through ConfiguredProvider as required by Keycloak 23.x

https://github.com/keycloak/keycloak/issues/15344
https://github.com/keycloak/keycloak/discussions/11849
https://github.com/keycloak/keycloak/issues/17958

TODO
https://github.com/keycloak/keycloak/issues/25814
Usability - split fields in subsections

Figure out a way to split field in subsections

Inherit OOTB SAML IdP fields/UI

Figure out a way to restore OOTB SAML fields (currently hardcoded in SamlConnectSettings.ts)

Hi Nicola, would you be interested in becoming a team member/official maintainer for this package? Unfortunately as everyone noticed I have no time to work with Keycloak anymore. If you're ok with that please send me an email at lscorciaIGNORETHISgmailcom. Thanks for your sustained work!

Hi Nicola, I'm using the keycloak provider with version 20 of Keycloak. How can I migrate my setup to version 23 with your version? If you need support for other developments I can eventually contribe.
Thanks,
Fabiana

Hi Nicola, I'm using the keycloak provider with version 20 of Keycloak. How can I migrate my setup to version 23 with your version? If you need support for other developments I can eventually contribute. Thanks, Fabiana

Hi @fabva79 the upgrade just consists of replacing the old JAR with the new one, but as reported in the PR the interface is still not 100% functional due to Keycloak "removing" such feature in latest releases - discussion ongoing in ref. https://github.com/keycloak/keycloak/discussions/25862
In other terms: if you don't need to change the SPID settings and you can just keep the existing ones, it should be enough to update the JAR of the provider and that's it.


[AutoPR containerregistry/resource-manager] Add ContextPath and source location URL for encode task and run type, support for pull request based triggers

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4026

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/2871


Hi I am attempting to do exactly as you say in the sample but I get this error in the console: Please log in via your web browser and try again. I already put the mail and password as environment variables but this keeps happening.  Hope you can help me!

How to reproduce these conditions
Sample name or URL where you found the bug
Failing Function code used (including require/import commands at the top)
Steps to set up and reproduce

Sample data pasted or attached as JSON (not an image)

Security rules used

Debug output
Errors in the console logs
Screenshots
Expected behavior

Actual behavior

Hey, please fill out the issue template and list in detail the steps you took, then reopen this issue.


[Feature Request]: Revisit the design of the 'tooltip' and make it more configurable to include more text in an easier to read format

Provide a clear and concise description of what the problem is.
The tooltip feature allows multiple datapoints and text to be added to it through layer configuration, but the format of the popup is limiting
Provide a clear and concise description of what you want to happen.
We need design options that will allow for more text to be displayed in an easy to read format.
Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.
For example, it would be useful to see much more in-depth information from a Kobo form submission when a user clicks on the map. Some users have also requested narrative text to be visible in the popup. I will link to some examples of text we'd want to include.

Hi @JulienPathtech.
One current example is from ACLED reports which have been integrated in Myanmar. The report includes a couple of sentences of text that a user has to scroll within a small window to see as of now. See this layer as an example:
https://prism-mmr-demo.surge.sh/?hazardLayerIds=conflict_fatalities

Text:

Number of fatalities in an armed conflict incident: 2
Date: 2023-05-19
Event type: Explosions/Remote violence
Sub event type: Air/drone strike
Source: Myanmar Pressphoto Agency
Details: On 19 May 2023, in In Pin village (Pakokku township, Pakokku district, Magway region), the Earthquake People's Defense Force attacked military soldiers stationed in the village with Energa bombs attached to a drone. Two military soldiers were killed.

A second example is for our regional deployment in Dakar (RBD) where the Cadre Harmonise data layers show multiple statistics in the tooltip.
https://prism-rbd.surge.sh/?baselineLayerId=ch_phase

Text:

Population in phase 1: 62683
Population in phase 2: 125063
Population in phase 3: 102655
Population in phase 4: 81256
Population in phase 5: 1817
Population in phase 3 to 5: 185728
Reference period start: 2022-10-01
Reference period end: 2023-01-31

I'd like to get some design options before we start creating any solutions. Generally, I think having an option to configure a larger window for some layers is desirable, and then to have formatting options within that window.

@ericboucher - here's a quick mockup of a formatted tooltip for CH data in the RBD example


Add support for all timezones for timestamp type and Fix bug related to numpy type check

np.dtype('datetime64[ns, UTC]') is not a numpy type. Therefore, we were getting the type error. I have also added a proper conversion of of timestamps from various Timezones to 'UTC'. Since that is a standard which we follow in core.
Also added unit tests to validate and catch similar exception in future.
With new changes:

TIMESTAMP type with different timezones would be accepted and converted to GMT/UTC time which is assumed/followed in omnisci core
Increase unit tests coverage

Relates to #219
fixes #253

@andrewseidl @randyzwitch PR is ready for a review now.


RangeError: Maximum call stack size exceeded

Dear Community,
out of nowhere, the "RangeError Maximum call stack size exceeded" error came up when running yarn dev. I have spent hours on researching the issue but could not find a solution. It never happened before.
I double checked that I am not displaying or logging any large object. I am not using Axios (we use apollo, which worked perfectly fine), and also here I am not working with large objects.
Here is the stacktrace.

I have cleaned the Yarn cache (yarn clean cache --all), deleted the nodejs Modules Folder as well as the .nuxt Folder and the Yarn.lock file and I have re-installed it with just running "yarn" -> "yarn dev". The build succeeds, but the error persists. I have also restarted the machine and cleared the browser cache. I have also tried it on different routes, even on static pages.

Has anybody experienced this before and solved it?
Thank you!

in my case, it was because i uase setInterval inside the nuxt method async fetch()


Make build configuration caching enabled by default

#7 introduced the caching of build configuration, disabled by default
This issue is about enabling it by default.
This won't happen until the configuration cache is itself enabled by default in Gradle core.
This may take a while.

Fixed in v2.0-beta.1


add support for lightline colorschemes

As mentioned here, having the ability to use lightline's colorschemes would be a nice feature to have.

I think they will have to be ported . Those colprscemes are written in vimscript you are oviously not hoping to interprete them...

I think they will have to be ported . Those colprscemes are written in vimscript you are oviously not hoping to interprete them...

t you are oviously not hoping to interprete them...

Yeah obviously not. The themes in lightline's main repo should and will be ported. This issue's aim is to discuss the possibility of using lightline's highlight groups in lualine.
The gruvbox theme I am using comes with both airline and lightline themes supplied, it would be great to have support for them.
But keep in mind this thread is for discussion only, I should remove the help wanted label.
Using lightline colorschemes will be redundant when https://github.com/hoob3rt/lualine.nvim/pull/26 is implemented correctly.

t you are oviously not hoping to interprete them...

Yeah obviously not. The themes in lightline's main repo should and will be ported. This issue's aim is to discuss the possibility of using lightline's highlight groups in lualine.
The gruvbox theme I am using comes with both airline and lightline themes supplied, it would be great to have support for them.
But keep in mind this thread is for discussion only, I should remove the help wanted label.
Using lightline colorschemes will be redundant when https://github.com/hoob3rt/lualine.nvim/pull/26 is implemented correctly.

Do you mean that after #26 in implemented, there will be no colour schemes any more? Or will they be optional? My opinion is that, if #26 is actually successful, colour schemes should be dropped. This will relieve future maintenance significantly.

Do you mean that after #26 in implemented, there will be no colour schemes any more? Or will they be optional? My opinion is that, if #26 is actually successful, colour schemes should be dropped. This will relieve future maintenance significantly.

My opinion is that, if #26 is actually successful, colour schemes should be dropped.

I donn't think it should be droped . I shouldn't be forced to use same colorscheme on both editor and statusline . I should be able to chose separately.
Also I don't think themes require much maintanace .

My opinion is that, if #26 is actually successful, colour schemes should be dropped.

I donn't think it should be droped . I shouldn't be forced to use same colorscheme on both editor and statusline . I should be able to chose separately.
Also I don't think themes require much maintanace .

perfectly fine also, just make sure there is an option if we want to opt in matching the colorscheme on editor and statusline. I personally like the consistency that it would bring, but understandably there will be others that like more variety.

perfectly fine also, just make sure there is an option if we want to opt in matching the colorscheme on editor and statusline. I personally like the consistency that it would bring, but understandably there will be others that like more variety.

perfectly fine also, just make sure there is an option if we want to opt in matching the colorscheme on editor and statusline. I personally like the consistency that it would bring, but understandably there will be others that like more variety.

Yes there will be. I think providing some popular themes out of the box is nice but you will also be able to set theme=auto to keep things easy and consistent

perfectly fine also, just make sure there is an option if we want to opt in matching the colorscheme on editor and statusline. I personally like the consistency that it would bring, but understandably there will be others that like more variety.

Yes there will be. I think providing some popular themes out of the box is nice but you will also be able to set theme=auto to keep things easy and consistent

lightline to lualine theme converter
link
Open the file in vim with lightline installed. Just change the theme name on top . And run :luafile %
you will have theme_name.lua file on you directory with the theme .

lightline to lualine theme converter
link
Open the file in vim with lightline installed. Just change the theme name on top . And run :luafile %
you will have theme_name.lua file on you directory with the theme .

@shadmansaleh the link and usage to your theme converter should be in the readme imo

the link and usage to your theme converter should be in the readme imo

Ha ha . I had written it as a throwaway script when I was conberting themes. As it was doing a pretty good job I shared it as a gist so it might be helpful if someone else is converting themes . When I was writting it I had no intention of sharing it . So it's horrible to look at . If you want to put it in README.md you can . The gist has uses instructions . So putting the link should be enough . Maybe in contributing.md insted of README.md.


Is there a way to test if a promise object calls a function

I'm trying to test a function which doesnt return anything but executes a callback
export const project_list = function(data,res){
  return db.any(queries.ProjectList)
    .then(function(results){
      let newResults = project_list_cleaner(results)
      res(null,newResults)
    })
    .catch(function(err){
      res(err)
    })
}

I did try
  it('should retrieve a list',function(){
    return expect(project_list(data,res)).to.eventually.be.false
  })

but it fails correctly because the function does not return anything but executes the callback.
Is there a way i can check if the promise executes the given callback?
Thanks,

It sounds like you are not looking for a library that tests promises, but instead a library that tests Node-style callbacks. No, that is not what this library is for.


Hire Options Page

[ ] Again on all devices hero section to fit on the screen (above the fold) - you could make the menu height smaller and/or reduce the padding within the section.

[ ] Make any paragraph text the same size  - prefer the smaller size from the screenshot below.

[x] Make all buttons the same font and capitalised like they are on the home page.

Like this:

Not this: (change to above style - Bebas & all capitals)

[ ] These images on hover should go into colour - colour versions should already be tagged in Zeplin

Again on all devices hero section to fit on the screen (above the fold) - you could make the menu height smaller and/or reduce the padding within the section.-->> Here you mean by the padding of the header?

@kpierduta  These images on hover should go into colour - colour versions should already be tagged in Zeplin----> Colored images are not available to us with zeplin.


Add language setting

Suggested new feature or improvement
There is no language setting in this. The Chinese version is bad so I want to change it to English version
Scenario
User can change language in setting
Additional details
No response

Duplicate of #708


Enabling LTO (Link time optimizations) reduces binary size when using core abstractions

Adding to rustc options -C lto reduces the size from for example:
Using core clamp function: 559K
The same but with lto enabled: 5.8K
Also note that the actual size of the binary is: 3.8K
Maybe enabling lto allows you to use some core abstractions without bloating the binary.
Hope it helps.

@cdecompilador I like how you purposefully not mention that the size increase from 3.8k to 3.9k without any code modifications just by enabling LTO Kappa

Sorry it wasn't on purpose), that happens because lto does some inlinings than even telling the compiler not to inline it does. I hope still the information is useful, for example you can use math functions without implement them by yourself and also  tell the compiler to disable checkings on casting to reduce the code size even more.


kubelet/container: Refactor runtime cache.

Rmove unnecessary caching loop. Replace with smaller cache time.
@vmarmol @dchen1107 @yujuhong
I read the kubelet log, the original startUpdatingCache() is creating 20 GetPods operations within 2s, and most of them are unnecessary.

Assigning to @yujuhong; feel free to pass around, of course.

FYI, I have a PR under review to fix bugs in the runtime cache (#7749).
I am in favor of removing the updating thread in general. It is a performance optimization, but I have not yet seen concrete proof that we need it (and what update interval we should use). It'd be nice to have a performance comparison though. @vmarmol, what do you think (since you suggested the async update originally in #4592)?

The reason this exists is that we were observing high latency (seconds) of Docker operations when we were doing a lot of creations. Having the async cache update meant that all read operations returned immediately and we only suffered the cache miss the first time. If we use a typical cache we suffer the cache miss every time the information ages out. Outside of potentially more resource usage, is there a concern with the many calls to GetPods()?

@vmarmol OK, thanks for explanation. I think then that will depend on the frequency and the pattern of the requests. I think the async will benefits only when the requests are constantly frequent. I don't think we have that pattern now, do we? I agree with @yujuhong we need more concrete performance bench or examples to verify this.

I can see that the async updates may lower the average cache miss penalty. The problem is that I don't have a good grasp on the overall performance impact. The resource usage could be a factor too if the node is resource constrained, and the frequency of aysnc updates is also debatable.
Since we don't have any data to support removing the async update, I suggest we leave it as is until proved otherwise :)

+1 to leaving alone a until we see an issue :)
I agree about the performance metrics though. We introduced this trying to schedule a bunch (50-100) pods from an RC. These came from different updates and it led us to call GetPods() a ton and this had very high latency. This reduced the latency to start these pods by over 60%. See the PR that introduced it #4592 and the issue that it targetted #4119.

@vmarmol @yujuhong Thank you for finding the issues! +1 for leaving it. I will try to run some experiments later to get some data :)

@vmarmol, I agreed that the cache itself helps relieve the load, but I was uncertain about the effect of the async updating thread. More benchmarking would be good. FYI, I added some general description of the runtime cache, and some very basic unit tests in my PR (#7749).

@yujuhong I am not sure about the async loop as well. Seems that in the old issue, the pods are created in a burst. Which may or may not take advantage of the async loop based on how long actually the burst period is.


Include Virtual

I was browsing extensions for classic ASP and so glad that I found this.  Does this work for "nclude virtual"?  I have many pages using "include virtual" instead.  That would be wonderful if it works for "include virtual".
<!--#include virtual="include/utilities.asp" -->
Thank you,

I think we can make this happen. Here's my thought on how it'd search for a virtual path:

Allow virtual paths to be set by the user with a setting
If no paths are set by the user, search for the folder and try and include the file by inferring the path based on the search. Ideally we could provide a warning on the include that indicated that the path is inferred.

I'm glad you find it useful.  I do plan on making it better as time goes on but it's a side project.  We have a lot of ASP still at my company and it's better to have something than nothing so far.

Thank you for the quick response.  Great Work!
This is one important of the features that doesn't work in the Dreamweaver.  With your "ASP-Classic-Support" and the "Classic ASP Syntaxes and Snippets" nearly perfect what I need for editing the Classic ASP pages.  I am trying to find a CSS Extension that can pickup (Intellisense) all the CSS classes both Linked [] and embedded [] for ASP pages , but not luck.  Any suggestions?

Unfortunately I don't think there's a solution right now for CSS.  But this is something I intend to help with when I can implement #4.

Actually @milacay regarding the CSS completion: I just testing this extension and it works!  You can add asp as a language option to provide CSS completion for your ASP files.

Unfortunately, that "IntelliSense for CSS class names in HTML" doesn't work for me.  I have the CSS style file link below, and it didn't detect any CSS class from that file (I know the CSS link it works, confirmed with Dreamweaver, same test file).  ASP language doesn't list under "Supported Language Modes" for that extension.  Do I have to edit somewhere to support ASP language?  (Sorry, I just started playing the Visual Studio Code last few days).
<link href="../Dir/Dir2/Styles.css" rel="stylesheet" type="text/css" />
Thanks again for your time helping out.

Figured it out now.  The asp files need to be in the WorkSpace.  :)
Really appreciated your time.  Thank you so much!

I have been using this plug-in since I found it (3 weeks ago) and I really like it.  I can't wait for the "include virtual" feature to be released.  As you mentioned "Allow virtual paths to be set by the user with a setting" would work just fine.  Thank you for awesome plug-in.

This is exactly what I am looking for, plus the nested includes as mentioned by Issue #11  .  It's incredible to still find so much support for ASP Classic.  I admit I am one of those that still uses it everyday just because I like it.  The virtual path could be a per-workspace setting, i.e. it assumes the root folder is the workspace root level, so virtual="/config.asp" finds the config.asp file in the root of the workspace.

Sorry it took so long. Include virtual is now implemented.  You'll find a new setting where you can set up your virtual paths:

Here you are setting up the virtual root directory and the root physical (absolute) directory that it should point to.  Let me know if there are any problems getting this to work.

Looking into this, apologies for that @milacay.

no problem.  Thank you!

You should see a corrected version to update to now @milacay. Thanks for bringing this to my attention!

Thanks for implemented the correct version on VS Code.  I tested the Virtual Paths feature, but it was not able to get it working.  Let's me describe  what I have tried so far:
Brief info of my environment:
My "include" full path on the IIS sever is C:\inetpub\wwwroot\Apps\include.
My mapped the drive (P) on my laptop to the server (C):  P:\inetpub\wwwroot\Apps\include.
I included the virtual directory like this <!--#include virtual="include/FunctionXYZ.asp" -->  every page and it is working.
I have tried to following settings for the new Virtual Paths option, but no success and received OUTPUT error: __TypeError: localIncludes is not iterable__.
1)

I just have missed something.  Please advise.

I am still using this extension daily and it is awesome.  Any chance the the "include virtual" setting will release soon? :)

Any chance that you have look into that quick fix for the "include virtual"? You have the feature built already, but just need to fix a small error somewhere.  Much appreciated!

This extension is like a life-saving oasis for handling sizable, time-honoured Classic ASP projects! The virtual path fix would be awsome.
Just for reference, ASPFellow has Virtual Paths working


Requires python 3.10

Hi, really excited to give this new tracking algorithm a try!
I tried installing it into a conda environment with python 3.9 but got the following error when running the exemplary code:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[8], line 4
      1 import torch
      3 from trackastra.utils import normalize
----> 4 from trackastra.model import Trackastra
      5 from trackastra.tracking import graph_to_ctc, graph_to_napari_tracks
      6 from trackastra.data import test_data_bacteria

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/model/__init__.py:4](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/model/__init__.py#line=3)
      1 # ruff: noqa: F401
      3 from .model import TrackingTransformer
----> 4 from .model_api import Trackastra

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/model/model_api.py:10](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/model/model_api.py#line=9)
      7 from pydantic import validate_call
      8 from tqdm import tqdm
---> 10 from ..data import build_windows, get_features
     11 from ..tracking import build_graph, track_greedy
     12 from ..utils import normalize

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/__init__.py:4](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/__init__.py#line=3)
      1 # ruff: noqa: F401
      3 from .augmentations import AugmentationPipeline, RandomCrop
----> 4 from .data import (
      5     CTCData,
      6     _ctc_lineages,
      7     # load_ctc_data_from_subfolders,
      8     collate_sequence_padding,
      9     extract_features_regionprops,
     10 )
     11 from .example_data import example_data_bacteria, example_data_fluo_3d, example_data_hela
     12 from .sampler import (
     13     BalancedBatchSampler,
     14     BalancedDataModule,
     15     BalancedDistributedSampler,
     16 )

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/data.py:23](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/data.py#line=22)
     20 from tqdm import tqdm
     22 from ..utils import blockwise_sum, normalize
---> 23 from . import wrfeat
     24 from ._check_ctc import _check_ctc, _get_node_attributes
     25 from .augmentations import AugmentationPipeline, RandomCrop

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/wrfeat.py:21](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/wrfeat.py#line=20)
     18 from skimage.measure import regionprops, regionprops_table
     19 from tqdm import tqdm
---> 21 from trackastra.data.utils import load_tiff_timeseries
     23 logger = logging.getLogger(__name__)
     25 _PROPERTIES = {
     26     "regionprops": (
     27         "area",
   (...)
     38     ),
     39 }

File [~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/utils.py:19](http://localhost:8888/lab/tree/Documents/20240417_viral_aneuploidy_analysis_mitosis_sisterCellLinking/SCRIPTS/~/opt/anaconda3/envs/20240529_testing_new_tracking_weigert/lib/python3.9/site-packages/trackastra/data/utils.py#line=18)
     11 from tqdm import tqdm
     13 logger = logging.getLogger(__name__)
     16 @validate_call
     17 def load_tiff_timeseries(
     18     dir: Path,
---> 19     dtype: str | type | None = None,
     20     downscale: tuple[int, ...] | None = None,
     21     start_frame: int = 0,
     22     end_frame: int | None = None,
     23 ) -> np.ndarray:
     24     """Loads a folder of `.tif` or `.tiff` files into a numpy array.
     25     Each file is interpreted as a frame of a time series.
     26
   (...)
     35         np.ndarray: The loaded data.
     36     """
     37     # TODO make safe for label arrays

TypeError: unsupported operand type(s) for |: 'type' and 'type'

I think this is related to an issue with python < 3.10, therefore I created a new environment with python=3.10 and installed everything again. Now it's running without any issues! So maybe good to indicate python >= 3.10 in the instructions (currently it says python >= 3.9).
Also, the installation of napari will not install PyQt5 which means that no napari viewer window will open (without an error message). Maybe also worth mentioning in the installation instructions to install PyQt5 (or put it in the dependencies)?
The tracking results are really nice, thanks a lot for creating this new resource!

Hi @mimuelle ,
This should be fixed in c8b8380. Thanks for the bug report and hope trackastra will be useful for you - any feedback is very welcome!


allow float inputs

Coverage increased (+0.03%) to 91.931% when pulling c7bcde4778e2d9fcecdd31606657dead837a024f on gabrielburnworth:staging into dac2a81bcc7b4c1432755755e9e0bef287ab129e on FarmBot:staging.


Easier version bump

Automate the process for bumping the extension's version. Can now use npm-version.
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]

Closes #36

Try it locally and it works. Thanks for the implementation.
I approved this PR, so please merge when convenient!


sleep in 100ms increments

Signed-off-by: Phil Davis<EMAIL_ADDRESS>Description
Try reducing the sleep time to 100msec

Superseded


Cannot start server with ./digits-devserver

Hi!
(Working on Ubuntu 14.04 AMI on EC2 instance g2.2xlarge)
So I installed CUDA 7 and c/p-ed the cuDNN files there and also of course installed caffe as described - everything seems to be fine.
Now I installed DIGITS and I assume that ./digits-devserver is supposed to start a server listening to port 5000.
But accessing the service via my browser by http://[IP]:5000 is not working - seems like there is nothing listening.
Also sudo netstat -tapen does not list any process that would be listening on 5000.
Furthermore - running ./digits-devserver won't ask me or show me anything - quote:

NOTE: The first time DIGITS is run, you will be asked for the location of some directories. It should look something like the following: ...

All I see is:
ubuntu@ip-172-31-15-133:~/digits$ ./digits-devserver
 ___ ___ ___ ___ _____ ___
 |   \_ _/ __|_ _|_   _/ __|
 | |) | | (_ || |  | | \__ \
 |___/___\___|___| |_| |___/

Welcome to the DIGITS config module.

Where is caffe installed?
        (enter "SYS" if installed system-wide)
        [default is /home/ubuntu/caffe]
(q to quit) >>>

Now what is this config module anyway? I can't find any documentation on how to interact with it. Is it of any use for troubleshooting this issue?
Any ideas what to do or how to figure out what's the problem?
Kind Regards
Raffael

I assume you figured it out since you closed the issue. Any suggestions on improvements to the CLI?

Somehow I didn't get that I am supposed to respond to the question ... I interpreted the instructions as a statement. But in hindsight it seems pretty obvious.


[FEAT]: Confluence Document collector integration

What would you like to see?
Add to data connectors the ability to connect to a confluence workspace and collect pages and information. This can be done via the Atlassian API or a PAT

closed by #1181


Fix timestamp overflow adjustment in WebVTT segments

RFC 8216 §3.5 warns us of the possibility of overflow in MPEG timestamps.  We try to address this warning by checking the MPEG timestamp value in the X-TIMESTAMP-MAP header against the values found in earlier segments.  If a segment appears with an MPEG timestamp lower than those found before, we treat this as overflow condition
and perform an appropriate fixup.  This would have worked well, if it weren’t for the fact that in some streams empty segments may appear with a bogus, non-monotone MPEG timestamp.  This has been observed in the wild; see https://www.byutv.org/player/037d9221-8799-4508-8a00-d218c6df052b/dwight-in-shining-armor-fancy-pants.
Perhaps it might be prudent to remove the overflow handling entirely, given how vanishingly rare this case is expected to be.  It does seem that the perfect is the enemy of the good.

Boilerplate (original code, bug fix)
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

I am the original author of this code and I am willing to release it under Unlicense

What is the purpose of your pull request?

Bug fix

Perhaps it might be prudent to remove the overflow handling entirely, given how vanishingly rare this case is expected to be. It does seem that the perfect is the enemy of the good.

I am going to merge this for now, but I'm also concerned that this (and the dedup) logic may get more and more complex as we encounter more edge-cases in the wild

There is indeed an even gnarlier corner case that isn’t going to be handled correctly by this code: when the MPEG timestamp overflows twice with no intervening cues. But I doubt we’re ever going to hit the overflow even once: it requires 26 hours of material for overflow to trigger. If we even ever encounter streams that long, I doubt they are going to have subtitles.
And I might be misreading the RFC text anyway. What the spec says about overflow is:

When synchronizing WebVTT with PES timestamps, clients SHOULD account for cases where the 33-bit PES timestamps have wrapped and the WebVTT cue times have not.

Maybe this means the wrap-around is allowed to manifest not in the WebVTT segment header, but only in the actual MPEG container, in which case this whole adjustment is entirely unnecessary. I must say this is pretty poorly worded.


增加中间参数

['middleware' => [[FooMiddleware::class, 123]]]可以向中间件传入参数

[This message is created by hyperf-bot]
Hi @wujingke, this is a READ-ONLY repository, please submit your Pull Request to hyperf/hyperf repository, this Pull Request will close automatically.


How to apply modules.conf changes

I am a little new to docker and linux so please forgive what is a likely a very simple/silly problem. I need to remove the
<module name="connectban">
on line 685 in modules.conf. I know you can load in a custom inspircd.conf by passing it into the docker run command but I don't how to provide a custom modules.conf. I did try directly editing the file in the container with the commands
docker exec -it inspircd /bin/sh
vi /inspircd/conf/modules.conf
(Removed the line and save)
docker restart inspircd

I also tried modifying the /conf/modules.conf file (not inside the inspircd folder) but that didn't work either. However the configuration changes were not loaded, I also changed the ban message just to see and that didn't change either. What is the correct way to make the needed modifications to the file?
As an additional question, how would I go about clearing bans? My local computer has been banned due to some software I'm working on attempting to connect to the server and now I can't connect which is definitely slowing down my debugging :P

You can pass the -v flag to docker to replace a config file like this: -v /path/to/my/modules.conf:/inspircd/conf/modules.conf.
That said rather than unload connectban you probably want to add an exception for your local address. You can do this with a generic config include.
https://github.com/inspircd/inspircd-docker/?tab=readme-ov-file#generic-configuration-includes
https://docs.inspircd.org/3/configuration/#exception

@SadieCat Thank you very much for that information. I have one other quick question, sorry still just trying to get my head around how this is intended to work. I was able to pass in my customized modules.conf, but when I attempted to additionally pass in a inspircd.conf file I get an error
sh: can't open './conf/config.sh': No such file or directory
I'd like to just get a copy of the default inspircd.conf that comes with the container if none is specified and just make a few tweaks to it. The inspircd.conf I used was the one provided in the repo with the basic config values set (admin email, name, etc). This was the command I ran.
docker run --name ircd -p 6667:6667 -v /home/kenji/docker-images/irc/modules.conf:/inspircd/conf/modules.conf -v /home/kenji/docker-images/irc/inspircd.conf:/inspircd/conf/inspircd.conf inspircd/inspircd-docker
Any help is much appreciated. Thank you!


use stored procedures?

I'm working with a database where all access is via stored procedures.
Is is possible to use this system to invoke stored procedures with parameters and possibly get back a resultset?

Unfortunately no. Only passive stored function support is available, meaning you can return a result based on columular data, and nothing in the query params.
http://restsql.org/doc/SqlResourceRules.html
For example, select name, address, compute_zipplusfour(zip) from customer. Where zip is a column on customer.

ok, thanks


Find since

Add support of since parameter to /find request(s)

Coverage decreased (-0.05%) to 84.944% when pulling 850c19ba74050a7b5bfe99a322f785d58597f5cf on find-since into 5431f80e84bd40a38c849a3f7ce4cb5522d3d72d on master.


Update CONTRIBUTING.md with technical things

WIP
Added some text to CONTRIBUTING.md, more coming!
Comments/Feedback?

/cc @marcustisater @ai

Note: Mostly copied from html5boilerplate.

Yup, looks good. Bootstrap has a very good contributing README files as well.


No known conditions for "./server" specifier in "react-streaming" package

So I am using react-streaming to handle the SSR bit for Houdini's react router and have run into an issue - hopefully its a quick fix.
In short, I am running into a situation where I am using vite's ssrLoadModule to import a file that relies on react-streaming/server. This causes vite to complain that /server isn't an exported subpath since the import is being treated as a "browser" context (presumably since the ssr flag isn't set during dev). If I modify the published package.json to include a browser entry for /server then everything works on my end.
Is that something you would consider? If so, I'd gladly submit a PR that makes the one-line change. I just wanted to open up the conversation before doing that.

👍 Seems like the PR is going to be tiny, so I'd suggest you create the PR and we continue the disucssion over there. I expect the PR to be merged quickly.
Closing in favor of your upcoming PR.


feat (Azure): support Azure deployment selection

I'd like to add the support of Azure deployment selection to give the same model switching experience when using Azure openAI service.
This patch probably won't break anything when CUSTOM_MODELS is not set.
User can use - to hide all internal models and use + to add azure deployments in CUSTOM_MODELS.

When there is a request for an available model, replace the deployment in the AZURE_URL.
When there is a request for an unavailable model, for example the summary scenario, use the default deployment in the AZURE_URL.

Make both for openai not only azure. it will better because in future, its not only text models based,(eg tts,dalle)

Also take for reference: https://github.com/Yidadaa/ChatGPT-Next-Web/pull/3206#issuecomment-1807525917 and https://github.com/Yidadaa/ChatGPT-Next-Web/pull/3206#issuecomment-1807529197.

Also take for reference: #3206 (comment) and #3206 (comment).

From my current understanding of the code, probably an advanced configuration is need to achieve that. Current CUSTOM_MODELS mechanism is not enough.
For example:
[
  {
    "api_provider": "openai",
    "base_url": "https://api.openai.com",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "openai",
    "base_url": "https://proxy.foo.bar",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "azure",
    "base_url": "https://{resource-name-1}.openai.azure.com/openai/deployments/",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "azure",
    "base_url": "https://{resource-name-2}.openai.azure.com/openai/deployments/",
    "api_key": "XXXXXX",
    "models": [...]
  }
]

Add both for openai aswell not only azure. it will better because in future, its not only text models based,(eg tts,dalle)

I didn't quite get your point. It seems openAI APIs are quite consistent. All APIs share the same base url and model is passed as a request parameter. There is no need to generate url based on model.
I saw there is a PR working on TTS https://github.com/Yidadaa/ChatGPT-Next-Web/pull/3258#issue-1991354310. let me check how the server side will be implemented and adapt some changes if possible.

Add both for openai aswell not only azure. it will better because in future, its not only text models based,(eg tts,dalle)

I didn't quite get your point. It seems openAI APIs are quite consistent. All APIs share the same base url and model is passed as a request parameter. There is no need to generate url based on model.
I saw there is a PR working on TTS #3258 (comment). let me check how the server side will be implemented and adapt some changes if possible.

this one sorry I was replying on phone
When there is a request for an unavailable model, for example the [summary scenario](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/9da455a7eabcf22c3cbdb8bfe0ec3203a869e4e9/app/store/chat.ts#L85), use the default deployment in the AZURE_URL.
actually this - > https://github.com/Yidadaa/ChatGPT-Next-Web/pull/3260#issuecomment-1809728956

Also take for reference: #3206 (comment) and #3206 (comment).

From my current understanding of the code, probably an advanced configuration is need to achieve that. Current CUSTOM_MODELS mechanism is not enough.
For example:
[
  {
    "api_provider": "openai",
    "base_url": "https://api.openai.com",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "openai",
    "base_url": "https://proxy.foo.bar",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "azure",
    "base_url": "https://{resource-name-1}.openai.azure.com/openai/deployments/",
    "api_key": "XXXXXX",
    "models": [...]
  },
  {
    "api_provider": "azure",
    "base_url": "https://{resource-name-2}.openai.azure.com/openai/deployments/",
    "api_key": "XXXXXX",
    "models": [...]
  }
]

I think this schema is quite good. May further add "name" field to it, to give each model group a semantic meaning, e.g. OpenAI, OpenAI Proxy, Azure JP, Azure US, etc.
Then in chat model selection window, we can group the models according to their providers:

OpenAI

<Include all default OpenAI models (An option that could be disabled)>
<Some other custom models>

OpenAI Proxy (e.g. api2d)

gpt-3.5-turbo
gpt-4

Azure-JP (no gpt-4 deployment currently available, but good network quality)

gpt-3.5-turbo
gpt-3.5-turbo-16k

Azure-US (providing more models, including gpt-4, whisper, etc.)

gpt-3.5-turbo
gpt-3.5-turbo-16k
gpt-4
gpt-4-32k

Claude

<Include all Claude models>

LLAMA

<Include all llama models>

Same model name could be repeatedly used in multiple groups, so we can decide which gpt-3.5-turbo model to use from different providers.

Add both for openai aswell not only azure. it will better because in future, its not only text models based,(eg tts,dalle)

I didn't quite get your point. It seems openAI APIs are quite consistent. All APIs share the same base url and model is passed as a request parameter. There is no need to generate url based on model.
I saw there is a PR working on TTS #3258 (comment). let me check how the server side will be implemented and adapt some changes if possible.

this one When there is a request for an unavailable model, for example the [summary scenario](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/9da455a7eabcf22c3cbdb8bfe0ec3203a869e4e9/app/store/chat.ts#L85), use the default deployment in the AZURE_URL. actually this - > #3260 (comment)
sorry I was replying on phone that first comments

Add both for openai aswell not only azure. it will better because in future, its not only text models based,(eg tts,dalle)

I didn't quite get your point. It seems openAI APIs are quite consistent. All APIs share the same base url and model is passed as a request parameter. There is no need to generate url based on model.
I saw there is a PR working on TTS #3258 (comment). let me check how the server side will be implemented and adapt some changes if possible.

this one When there is a request for an unavailable model, for example the [summary scenario](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/9da455a7eabcf22c3cbdb8bfe0ec3203a869e4e9/app/store/chat.ts#L85), use the default deployment in the AZURE_URL. actually this - > #3260 (comment)
sorry I was replying on phone that first comments

Oh, that makes sense to me. Thanks

i also has same issue on it.

https://github.com/Yidadaa/ChatGPT-Next-Web/pull/3344
I have already created a PR (Pull Request), which has resolved the issue.
Two changes:

Added a new configuration item: AZURE_OPENAI_MODEL_MAPPER
Extended the configuration item: AZURE_URL

The changes are as follows:
AZURE_URL (optional)

Example: https://{azure-resource-url}/openai/deployments/{deploy-name}
Example: https://xxx.openai.azure.com/openai/deployments/{deploy-name}

Azure deploy url.
If {deploy-name} is using the template mode, then it will automatically replace the path based on the model selected by the client.
If your model name is different from the deployment name, then you need to set the AZURE_OPENAI_MODEL_MAPPER parameter.
AZURE_OPENAI_MODEL_MAPPER (optional)

Default: Empty
Example: gpt-3.5-turbo=gpt-35-turbo means map gpt-3.5-turbo to gpt-35-turbo

If you are deploying ChatGPT using Azure OpenAI, it is recommended to set the AZURE_OPENAI_MODEL_MAPPER.
The session summarization feature relies on the gpt-3.5-turbo model, unless the name of your Azure deployment is the same as it.


LDTSI does not handle missing GOFS CICE data correctly

Code is supposed to "give up" if a recent GOFS CICE file cannot be found, and instead fall back on legacy Air Force SSMI algorithm.  But the code does not give up on GOFS, and instead searches far back in time (basically an infinite loop).

This has been fixed with pull request #151


Craft tries to send a notification even if the criteria is not met

notifications.php
return [
    'notifications' => [
        [
            'class' => \craft\elements\Entry::class,
            'event' => \craft\elements\Entry::EVENT_AFTER_SAVE,
            'criteria' => [
                'section' => 'channelReservations'
            ],
            'notification' => \app\notifications\TableReservationReceivedAdmin::class,
        ]
    ],
];

I have to guard it with an additional conditional in notifications/NotificationName.php:
notifications/NotificationName.php
    public function via()
    {
        $entry = $this->event->sender;
        $queryEmail = $entry->queryEmail;

        if ($this->event->isNew && $entry->section === 'channelReservations') {
            return [
                'mail' => $queryEmail,
            ];
        }

        return [];
    }

Im experiencing the same issue here.
I believe some sort of guard like the one @Saboteur777 has implemented is needed in the root notifications.php file when the events for each configured notification are being registered.
I will submit a PR at some point today.

Same issue here. I'm relying on a condition within my toMail function instead.

Probably could safely remove 'criteria' from the config.php file, there is no implementation that I can see in the source (partial or otherwise).

Sorry for the late reply, we took this one in our Craft 4 release and we removed the criteria in the config file


bower is missing dist folder

Hello,
when installing html2canvas via bower, version 1.0.0-rc.1 "dist" folder is missing. Files from "dist" are those to be used in our build. I know we can build the dist files ourselves, but it would be really convenient to have the pre-build versions as well.
Is it possible to have version of html2canvas released with dist folder included?
Any other workaround will be much appreciated.
Thanks.

+1

Return dist folder please.
Previous issues about that: #706 #711


Load config files only once, allow configuration via module variable

Hi Kwyn,
Just made a few minor edits -- let me know your thoughts.
The biggest change I made was pulling out the settings.loadIndicorc() call and ensuring that process only happens once on module import. I don't think it's necessary for that check to happen on every API call.
The other change made was exposing indico.apiKey and indico.privateCloud to the main user as yet another alternative means of configuration.  For many people this is much more straightforward than a config file or an environment variable.
var indico = require('indico')
indico.apiKey = 'YOUR_API_KEY'

indico.sentiment('text').then(function(res) {
    console.log(res);
});

Finally reorganized some of the tests (mainly moved more tests into the "integration" folder, since almost all of the tests require an internet connection).

Would appreciate a code review when you get a chance! Then we can go ahead and start collapsing down these PRs to prepare for a merge to master.

TODO:

[ ] Documentation updates


Include link to PPT paper on PPT readme

See https://iopscience.iop.org/article/10.3847/2515-5172/ad4da1

Besides including the link as a reference, we should add a specific request for people to cite it in their papers when making use of the template.

We could copy-paste bib-code from here to the readme
https://ui.adsabs.harvard.edu/abs/2024RNAAS...8..141O/exportcitation

Github docs about code citation
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files


Query results slows down whole application

Issue Type: Bug
If query returns lots of columns (over 20) and rows (over 20), whole applications becomes very slow. Result grid has approx. 1-2 second of lag in scrolling and also the query editor has similiar lag when trying to type something.
SQL Operations Studio version: sqlops 0.32.9 (8004776eff330e8980b473b6a2f6faf607164005, 2018-09-19T05:11:56.160Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz (8 x 2295)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
15.91GB (2.64GB free)

Process Argv
C:\Program Files\SQL Operations Studio\sqlops.exe

Screen Reader
no

VM
0%

Extensions: none

I have been having this bug for last two versions.

Still valid with new version. Returning over 50 rows will slow down the application a lot. Even typing into query window lags ~1-2 seconds for every character.

I experience performance issues and typing lag in the application when my notebook grows to a reasonable size. For example, I have 6 text blocks with markdown and 7 code blocks, with all output cleared.  Typing in existing or new text blocks in this notebook is subject to ~1 sec lag per keystroke, but cursor manipulation with arrow keys within the same blocks is fast and experiences no lag.
The experience of a notebook performing steadily worse the larger it gets is consistent with my experience on current & prior versions, since Notebook support was added.

My issue was resolved by computer change. I think this might be caused by some of the Windows UI settings.

Closing this issue as the original issue was mitigated through work around.  @aasimkhan30 is planning some perf improvements in query editor so hopefully we can root cause any underlying problems remaining in this use case.  Thanks!


[flink] Add tests for scan.mode=from-snapshot-full

Purpose
Complete the flink batch and streaming tests for scan.mode=from-snapshot-full

Please rebase master

Please rebase master

Thanks, rebased. @JingsongLi


question about withOnBindViewHolderListener

Does withOnBindViewHolderListener from fastAdapter  ignore the method bindView from ItemModel?
In the following example, When I use fastAdapter.withOnBindViewHolderListener, the button doesn't have an on click listener because the bindView method in ItemModel is ignored.
Do I need to redo all of the view binding in fastAdapter.withOnBindViewHolderListener?
In the activity class:
fastAdapter.withOnBindViewHolderListener(new FastAdapter.OnBindViewHolderListener() {
            @Override
            public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
                if (viewHolder instanceof ItemModel.ViewHolder) {
                    ItemReCyclerFastAdapter.ViewHolder thisViewHolder = (ItemModel.ViewHolder) viewHolder;
                    ItemModel item = itemAdapter.getItem(position);
                    ItemAttribute row = item.getModel();
                    thisViewHolder.title.setText("something");
                }
            }
        });

ItemModel class:
public void bindView(ViewHolder viewHolder) {
     viewHolder.button.setOnClickListener(new someListener);
    // More view binding
}

@stonecold123 you create a new implementation of the OnBindViewHolderListener which does not call:
getItem(position).bindView(viewHolder);

https://github.com/mikepenz/FastAdapter/blob/develop/library/src/main/java/com/mikepenz/fastadapter/FastAdapter.java#L1651
You could also just extend the OnBindViewHolderListenerImpl and add your logic (don't forget to call the super)

Thank you, fixed with your first suggestion. Regarding the second approach OnBindViewHolderListenerImpl, what class should I extend the OnBindViewHolderListenerImpl?

@stonecold123 great.
public class MyOnBindViewHolderListener extends OnBindViewHolderListenerImpl {
...
}

@mikepenz OnBindViewHolderListenerImpl is not static class, how can I extend that?

@yolapop why would you need it?

So, this is not valid anymore?
public class MyOnBindViewHolderListener extends OnBindViewHolderListenerImpl {
...
}

In my case, I want to get the item's identifier and position when bindView

@yolapop why don't you do this simply in the item's onBind method?

Can't.. because all my items are generic.
Anyway I've copied & pasted OnBindViewHolderListenerImpl. It works now.
Thank you for the help @mikepenz

@yolapop sounds interesting. The MaterialDrawer also builds heavily on flexible generic items.
I wonder the specific usecase where the item specific methods do not work


System audio gets muted/reduced in Unity due to audio communications protocol.

I've just merged in all the latest upstream changes from master, I have audio successfully going through Unity and coming out of an AudioSource spatially in the environment. However, I still notice that when the WebRTC stream connects my system audio gets reduced or muted, due to it claiming audio via the 'Communications Protocol' in windows.
I thought that once audio was going through Unity, then it would not touch that communication protocol, or anything to do with system audio whatsoever. Is that not true? Or is something wrong on my end?
We've been running this in Altspace in beta test and have found that users who have a bluetooth or usb headset plugin will have their 'Windows Audio Service' crash when a WebRTC stream connects. I assume that is caused by it affecting the communication protocol, or system audio in some way. Have you heard of any issues similar to that?
Also, I am working now on getting our code ready to PR back, we have been on a bit of detour past 3 weeks due to a big Altspace event.

I've just tried master with some Surface Headphones (bluetooth), after disabling other devices to make sure it picks it. I called from our Unity sample VideoChat scene (Unity editor x64 Desktop) to our sample TestAppUWP (UWP ARM Release) and have audio and video working as expected.

For the bluetooth crashing issue I have been trying to get more feedback from the users that claimed to have encountered it. Turns out it is actually hard for them to reproduce, so it could be related to something deeper than WebRTC, drivers of their headset or other. Since neither of you haven't heard anything of it, I'll assume it may not be related to this for now, until I get more logs from them.
About the audio muting, I made a mistake and was actually not running the test with the latest from master properly. It no longer lowers the system sound. But I've actually encountered a new issue that is worse. My 'protected void OnAudioFilterRead(float[] data, int channels)' method in AudioRenderer.cs is getting called, from the appropriate audio source, but the data array is filled with all zeroes. So I am not getting any sound at all. But it is registering the correct RemotAudioTrack and it is calling that method. Just all zeroes in the data array. Do you have any ideas on what that could be caused by? I switch it back to the Release2 dll's and sound comes through without issue.

@rygo6-MS is that happening in the Unity editor or inside a deployed app? Between 2.0.0 and master, the audio-related changes are:

For Windows Desktop, we now use ADM2 by default, which is a different audio engine (#507). You can fall back to ADM1 like 2.0.0 by calling Library.UseAudioDeviceModule(AudioDeviceModule.LegacyModule).
For Windows UWP, we now use a custom audio mixer (74bece9) to be able to disable the default audio output to system speakers and have only the audio injected into the Unity DSP pipeline. That might have caused a regression.

@rygo6-MS

is that happening in the Unity editor or inside a deployed app

More generally, what platform (UWP, Unity editor, Win32 app, ...) are you using for sending and what for receiving? Note that there might be an issue with the sending app (some problem with mic capture) as well as with the receiving one.

Calling Library.UsedAudioDeviceModule = AudioDeviceModule.LegacyModule; does give me back my sound.
But I assume using ADM2 would be better? This is a subject I was going to bring up in another ticket, but sound streaming through MRWebRTC would encounter periodic "time dilation", speeding up or slowing down. Does ADM2 help with that?
How would I go about getting ADM2 to work? I am trying this in the Unity Editor and also a build. No sound in either on Win10 x64. I also have this issue in the Altspace codebase, as well as a smaller test Unity application with nothing but MRWebRTC and the code to signal to our backend.
Our stream currently comes from a Chrome browser plugin being routed through Janus VideoRoom on Azure.

ADM2 is only for Windows Desktop, and is essentially for us a workaround for some annoying behavior of ADM1 which fails its initialization if any unsupported device is even plugged in to the host machine, even if unused. What that means is a user with e.g. an Azure Kinect DK (unsupported because of the 7-microphone array) plugged in to their PC will see ADM1 fail at startup and make MixedReality-WebRTC unusable. In terms of functionalities, I don't think there's a large difference between ADM1 and ADM2 though.
About the time dilatation it is with ADM1 right? Unfortunately that doesn't ring a bell, and would be an issue to investigate with Google. But their policy is to not put work into ADM1, so unlikely to get fixed anyway.
We have little to no idea why ADM2 would produce all-zero buffers. The only time that happened to me in the past is when audio negotiation was not done correctly and the audio track was either not sending or more likely was software-muted (there is a mute feature at the audio track level). Another possibility is overly aggressive or misconfigured echo cancellation (AEC) discarding all recorded sound. In all cases unfortunately we don't expose much in terms of tweaking.
For audio muffling, entirely untested code but you could try setting the recording and playback devices in GlobalFactory::InitializeImplNoLock() as the default one kDefaultDevice (and not the default communication one kDefaultCommunicationDevice, which is the default value for both):
- return webrtc::CreateWindowsCoreAudioAudioDeviceModule();
+ rtc::scoped_refptr<webrtc::AudioDeviceModule> adm2 = webrtc::CreateWindowsCoreAudioAudioDeviceModule();
+ adm2->SetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice);
+ adm2->SetRecordingDevice(webrtc::AudioDeviceModule::kDefaultDevice);
+ return adm2;

So I've not been able to figure out what causes ADM2 not to work. I enable LegacyModule, sound works, then enable DefaultModule, sound doesn't work. No errors I can discern in the unity logs. In trying to debug this into C++ there looks to be a lot of log checks on the native mrsAudioTrackReadBufferRead method. Is there a way to get the output of those C++ logs while running as a Unity plugin? Or is there any other way I could pull some other logs from a deeper level to debug?

Those are piped to OutputDebugString() in Debug so attaching a debugger should allow you to see the messages, in the Visual Studio Output window for example.

attaching a debugger

Also note that you have to set the debugger to debug native code. The default Unity debugger won't show you the native output.

Yes I meant actually attaching manually a native debugger to the Unity Editor native x64 process (or your application process if you're using a build).

I figured this out. ADM2 does not work for me if I have more than one audio output enabled in Windows. I must disable all the others ones like so:

May be because I have a lot of audio outputs? I have:

USB DAC
motherboard audio
monitor audio
Valve Index audio
Oculus Audio
bigscreen virtualized audio
voicemod virtualized audio

I may be an atypical audio use case since I have all the VR headsets, all the VR apps which make virtualized audio outputs (Bigscreen and Voicemod) and three separate physical DAC's. But, would be nice to sort this out. I assume it may be something with it not knowing which to select from all the options.

Does that work with any one source selected? Or only with this one? Otherwise said, is it a problem with the number of sources, or is there a specific one of them causing troubles?

It seems to work with any source. Just only one can be enabled at a time.

I want to bump this again, as we've encountered a small percentage of users now that have the same issue as myself. They go no sound on PC unless they disable all audio outputs except for one. It is looking like I will either have to switch AltSpace back to ADM1 and deal with the crashing, ADM1 would just outright hard crash for a number of users. Or I will have to try to debug this issue with ADM2.
Any ideas on what could be the cause of this in ADM2?
Or do you know if the crashing issues of ADM1 have been fixed upstream?

Sorry, I don't have easy fixes to suggest - ADMs are contained in the WebRTC implementation and I am not incredibly familiar with them, so your guesses are as good as mine here. On top of that, we haven't managed to reproduce the issue on our devices so we can't really debug this. If you can look into the code and check what is going wrong, or find a specific device/configuration that is causing this, that would be a great help.
There has been no work on ADM1 on our end - it's deprecated by Google so we have switched to ADM2 as the recommended way to go. But if you already have some simple crash fix that you can merge we'd be happy to take it.


Error when upload results with model having vars

Hi,
I have an issue while using dbt 1.3 and dbt artifacts 2.2. The dbt_artifacts.upload_results(results) throw errors when my invocation has vars in it e.g I ran this dbt run --select mymodel --vars "{'daterange_start':'2022-11-14', 'daterange_end':'2022-11-14'}"
Snowflake errors said this is an invalid insert, because of the single quote.

Is there a way to fix it already?

@Hoanglinh1201  I have seen a similar comment before. It does fail when dbt runs with parameters. Do you have a query that is failing? I can take a look when I have some free time.

The fix for this was pushed yesterday and released in 2.2.1.
I had the same issue and it's because the quotes within that method of passing vars wasn't being escaped.

Hi @Hoanglinh1201 thanks for reaching out and sorry it's taken so long to get back to you. Thanks to @smitsrr for providing you with more details, and to @nhrebinka for offering to help. It sounds like this has now been resolved, so I'm going to close this issue, but please feel free to re-open it and let me know if that's not the case.


SharePoint 2010 Transform via CSOM

Category
[ ] Bug
[X] Enhancement
Expected or Desired Behavior
Transform SharePoint 2010 to SharePoint Online - Thread for notes, thoughts and POC.

Current findings, initial transform failed with multiple exceptions. The CSOM API lacks the following properties:

Web.URL (Source of majority of the faults) - have a plan to work around this
Web.GetLists - doesn't exist, had to fall back to Web.Lists.GetByTitle
Web.WebTemplate - bypassed

Currently, I have had to bypass a few methods, multi-lingual support for the "pages" name, the ability to check web template and asset transfer not working (possibly due to bypasses).
2010 CSOM Reference: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee544361%28v%3doffice.14%29
However, despite this and a few hacks managed to get something transformed using a super basic example:

Nice!!
You can reuse code from the below method to detect the version and if needed use alternative code paths.
public static bool HasMinimalServerLibraryVersion(this ClientRuntimeContext clientContext, Version minimallyRequiredVersion)
        {
            bool hasMinimalVersion = false;
#if !ONPREMISES
            try
            {
                clientContext.ExecuteQueryRetry();
                hasMinimalVersion = clientContext.ServerLibraryVersion.CompareTo(minimallyRequiredVersion) >= 0;
            }
            catch (PropertyOrFieldNotInitializedException)
            {
                // swallow the exception.
            }
#else
            try
            {
                Uri urlUri = new Uri(clientContext.Url);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create($"{urlUri.Scheme}://{urlUri.DnsSafeHost}:{urlUri.Port}/_vti_pvt/service.cnf");
                request.UseDefaultCredentials = true;

                var response = request.GetResponse();

                using (var dataStream = response.GetResponseStream())
                {
                    // Open the stream using a StreamReader for easy access.
                    using (System.IO.StreamReader reader = new System.IO.StreamReader(dataStream))
                    {
                        // Read the content.Will be in this format
                        // vti_encoding:SR|utf8-nl
                        // vti_extenderversion: SR | <IP_ADDRESS>05

                        string version = reader.ReadToEnd().Split('|')[2].Trim();

                        // Only compare the first three digits
                        var compareToVersion = new Version(minimallyRequiredVersion.Major, minimallyRequiredVersion.Minor, minimallyRequiredVersion.Build, 0);
                        hasMinimalVersion = new Version(version.Split('.')[0].ToInt32(), 0, version.Split('.')[3].ToInt32(), 0).CompareTo(compareToVersion) >= 0;
                    }
                }
            }
            catch (WebException ex)
            {
                Log.Warning(Constants.LOGGING_SOURCE, CoreResources.ClientContextExtensions_HasMinimalServerLibraryVersion_Error, ex.ToDetailedString(clientContext));
            }
#endif
            return hasMinimalVersion;
        }

lol I just wrote extension method:
public static bool IsSharePoint2010(this Web web)
        {
            // Use the missing URL property from CSOM to determine if this is SharePoint 2010s
            try
            {
                web.EnsureProperty(p => p.Url);
                return false;

            }catch(Exception ex)
            {
                return true;
            }
        }

cool, thanks.

@pkbullock : I've added some properties to the BaseTransformationInformation to help understand the source/target setup better. You can reuse these if you need them to differentiate 2010.

        /// <summary>
        /// Indicates if this transformation spans farms (on-prem to online tenant, online tenant A to online tenant B)
        /// </summary>
        internal bool IsCrossFarmTransformation { get; set; }

        /// <summary>
        /// SharePoint version of the source
        /// </summary>
        internal SPVersion SourceVersion { get; set; }

        /// <summary>
        /// SharePoint version of the target
        /// </summary>
        internal SPVersion TargetVersion { get; set; }

public enum SPVersion
    {
        SPO = 0,
        SP2019 = 1,
        SP2016 = 2,
        SP2013 = 3,
        SP2010 = 4
    }

Ok cool, I’ll merge those into my fork on way home.
Thanks, one question do you have to hand or know of a reference for the minimum versions of SharePoint with the above code couple blocks above?
Get Outlook for iOShttps://aka.ms/o0ukef

From: Bert Jansen<EMAIL_ADDRESS>Sent: Wednesday, June 12, 2019 1:13 pm
To: SharePoint/sp-dev-modernization
Cc: Paul Bullock; Mention
Subject: Re: [SharePoint/sp-dev-modernization] SharePoint 2010 Transform via CSOM (#183)
@pkbullockhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpkbullock&data=02|01|paul.bullock%40capacreative.co.uk|6c34bddd8f5b4cf496d108d6ef2f5d5d|b65b38dfdc4640ca92b9547172742753|0|0|636959384050244164&sdata=qXoA9Nl6EU6JhSlVfnfEX8E7Te07fBZngjJG3jwHzZ8%3D&reserved=0 : I've added some properties to the BaseTransformationInformation to help understand the source/target setup better. You can reuse these if you need them to differentiate 2010.
    /// <summary>
    /// Indicates if this transformation spans farms (on-prem to online tenant, online tenant A to online tenant B)
    /// </summary>
    internal bool IsCrossFarmTransformation { get; set; }

    /// <summary>
    /// SharePoint version of the source
    /// </summary>
    internal SPVersion SourceVersion { get; set; }

    /// <summary>
    /// SharePoint version of the target
    /// </summary>
    internal SPVersion TargetVersion { get; set; }

public enum SPVersion
{
SPO = 0,
SP2019 = 1,
SP2016 = 2,
SP2013 = 3,
SP2010 = 4
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSharePoint%2Fsp-dev-modernization%2Fissues%2F183%3Femail_source%3Dnotifications%26email_token%3DACC7Z4L6E4YNC3S5TSRVN63P2DR6DA5CNFSM4HXDHQO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXQGRTQ%23issuecomment-501246158&data=02|01|paul.bullock%40capacreative.co.uk|6c34bddd8f5b4cf496d108d6ef2f5d5d|b65b38dfdc4640ca92b9547172742753|0|0|636959384050254172&sdata=9%2BuXezmnXf5PMAQOQdf%2BRJYvtGvaf8qivFjvAo3MA%2BA%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACC7Z4NM7BGALJV4G7KRXMTP2DR6DANCNFSM4HXDHQOQ&data=02|01|paul.bullock%40capacreative.co.uk|6c34bddd8f5b4cf496d108d6ef2f5d5d|b65b38dfdc4640ca92b9547172742753|0|0|636959384050254172&sdata=5mNjkqd5JhAdeepfoY4OecAR8viqpRcX5PB1kr2A5l8%3D&reserved=0.

I don't see anything more specific inside a given SP version...so for now let's stick with checking the base version as set with the SPVersion enum.

Just an update - in testing the asset transfer doesn't work because the OpenBinaryStream method does not exist on the API. I will be in the next few days creating extension methods for calls that need work arounds and use the above to switch between them :)

Let's hope we don't hit any roadblocks. As plan B we could as well fall back to some of the classic asmx endpoints in case there's no CSOM option available.

Status:

Had to do some changes to SPVersion to make it more global to the app + caching.
Got asset transfer and page layout analyser working.
Next Challange: ZoneId and Export Mode for webparts are not available as properties, this is used in PublishingPage analyser. We may need to implement #167 with some tweaks. I cannot see a simple way to solve this with CSOM, WebServices. Also this may affect SP2013, partially on SP2016, since it looks like these properties were added earlier this year. Continuing to investigate. @jansenbe have you encountered this or does PnP-SItes-Core have anything that we can use.

I think we can live without ZoneId, I'll need to investigate the export mode

@jansenbe this affects the ability to link the page layout mapping and the location of the web part in client side page. Code affected: (https://github.com/SharePoint/sp-dev-modernization/blob/5035f031c8e24eba6d6e3b0df61ec2c1fb85bcd4/Tools/SharePoint.Modernization/SharePointPnP.Modernization.Framework/Pages/PublishingPage.cs#L298)[https://github.com/SharePoint/sp-dev-modernization/blob/5035f031c8e24eba6d6e3b0df61ec2c1fb85bcd4/Tools/SharePoint.Modernization/SharePointPnP.Modernization.Framework/Pages/PublishingPage.cs#L298] also export in that region of code.

Slowly moving forward... managed to get ZoneID and some export data from Web Service calls.

Need to validate export property if they are the same as it returned something similar.
Still need to parse the WS responses and extract the relevant metadata to preserve web part locations.
Lots more testing needed - realised my on-prem testing is too narrow in its cases.
😊

@pkbullock : July release will be released on July 1st / 2nd which implies that possible PR's you want to be included should get in by end of next week. If you feel you need more time than you simply wait for the August release window.

Just an update, workaround web part retrieval with web service calls.

Closing this issue now that the preview support has been merged. Thx @pkbullock :-)


FAPI-CIBA Realm Settings (CIBA Policy) overriden by Client Settings

The design document for FAPI-CIBA states that it requires Realm Settings for CIBA called CIBA Policy and it can be overriden by each Client Setting.
However, the current CIBA prototype implementation does not support the Client Setting for CIBA that can override the Realm Setting for CIBA.
The goal of this issue is to implement on the CIBA prototype implementation this override by following the design document for FAPI-CIBA.

@tnorimat: I can work on it

Thank you @akoserwal akoserwal

@akoserwal I've add the specification of this issues here.
What to do
Current CIBA prototype implementation has already supported the following parameters CIBA standard document defined.

Backchannel Token Delivery Mode
Expires In
Interval
Authentication Requested User Hint

These parameters are realized as CIBA Policy that can be set per Realm.
What we want to do is that we can set these parameters also per Client.
If the above parameters are set on Client, ones set on Realm are ignored.
If not, parameters set on Realm are used.
These parameter settings' specification (eg. what value is accepted, initial value) per Client are the same as per Realm.
Codes of current CIBA prototype implementation referfing these parameters have to be modified to look at the parameter setting on Client at first.
UI
On current client's "Settings" UI, new "CIBA Policy Overrides" pain is introduced like "Authentication Flow Overrides"
Where to look if we  introduce new client setting
AFAIK, entities we need to look at when we introduce new client setting are as follows.

Representation
It stands for the format in representating Client.
This format is used when communicating between keycloak and other entities.

[1] ClientRepresentation
It is Client's Representation.
When we access Client by Admin REST API(namely, on Admin Console), this ClientRepresentation is used.

Model
It stands for the format used when keycloak's internal program treats Client.

[2]  ClientModel
It is Client's Model

Store
It stands for the format used when keycloak's internal program stores Client.

Infinispan Cache
Used when storing Client in memory

[3] ClientAdapter(infinispan)

JPA:
Used when storing Client in persistent storage

[4] ClientAdapter(jpa)
[5] ClientEntity(jpa)

OIDC Extension
It extends Client so that it can be treated as OIDC conformant Client

Representation

[6] OIDCClientRepresentation
It stands for the format in representating OIDC conformant Client.
This format is used when communicating between keycloak and other entities in OIDC manner
eg.
When we access Client by OIDC Dynamic Client Registration, this OIDCClientRepresentation is used.

Representation/Model

[7] OIDCAdvancedConfigWrapper
It works as the wrapper between ClientRepresentation and OIDCClientRepresentation
[8] DescriptionConverter
It converts the Client representation between ClientRepresentation and OIDCClientRepresentation.
[9] OIDCConfigAttributes
It define keys used to store/access OIDC related parameter to ClientRepresentation's map object called Attribute and ClientModel's map object also callled Attribute.

UI

[10] client.js
[11] client-detail.html
[12] admin-messages_en.properties

In this issue, we need not modify [3][4][5].
Reference
The PRs about overriding per Realm settings by per Client settings are as follows :

https://github.com/keycloak/keycloak/pull/6581
https://github.com/keycloak/keycloak/pull/7065

@tnorimat thank you, for the information. I'll go over them and follow up with you If I face any issues.

I've merged @akoserwal 's work and taken over it to complete this feature by adding arquillian integration tests afterwards.

merged https://github.com/keycloak/keycloak/pull/7679 includes per client settings.


drivers: flash: shell: add "flash copy" command

Add a flash copy command, capable of copying a region in one flash device to a region on the same or another flash device. The caller must erase the destination prior to copying.
This is useful for evaluating mcuboot on devices with little on-chip resources that are not capable of running more elaborate image management services (e.g. via bluetooth or networking).
Additionally, it's useful for evaluating mcuboot on devices with one or more images stored on external spi flash.
The flash copy command syntax is
flash copy <src_dev> <dst_dev> <src_offs> <dest_offs> <size>

E.g.
flash copy flash@0 flash-controller@abcd1234 0x1234 0x5678 21012
Copied 21012 bytes from flash@0:1234 to flash-controller@abcd1234:5678

Probably should check to verify that the regions do not overlap before doing the write (which would be erm... tricky), and also should check the CRCs of source and destination before doing the write (to see if they are equivalent).
Are we missing a generic flash_copy() algorithm in Zephyr? This could really be 1 function call shared by lots of different code.

It's weird how GH duplicated my responses as comments. Oh well

included <zephyr/internal/syscall_handler.h> for userspace support in z_vrfy_flash_copy()

used non-const array, which somehow fixed qemu_cortex_m0

cleaned-up commit messages

fixed formatting issues

@de-nordic, @nordicjm - please take a look

@nordicjm - had to wrap one long line. Please re-ack when you have a moment.

It isn't clear to me where the erase is happening

Erase (if necessary) is called by the user separately. Both that and write verification were originally included here but were later externalized based on reviews.


[Snyk] Upgrade @lit-protocol/lit-node-client from 2.2.40 to 2.2.41

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade @lit-protocol/lit-node-client from 2.2.40 to 2.2.41.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 22 days ago, on 2023-07-10.

Release notes

Package name: @lit-protocol/lit-node-client

2.2.41 - 2023-07-10

2.2.40 - 2023-07-08

    from @lit-protocol/lit-node-client GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Superseded by #326


Client connections leaked with long-poll GETs

I'm not sure if this is a hyper, tokio_timer or general futures issue, it seems similar to #1353  - but that suggests this is fixed by using no_proto on the Client, and I see the same problem whether or not I use no_proto .
Originally raised as https://github.com/jimmycuadra/rust-etcd/issues/20, but managed to isolate it to hyper.
The trigger seems to be using tokio_timer::Timeout on a Client.get() that has returned the headers with Chunked-Encoding but no chunks received yet.
Nothing obvious in trace-level logs.
Repro instructions (on Linux - not tried on any other platforms), mostly cribbed from the rust-etcd repo:

Start an etcd instance running locally (assuming you have docker, docker run --net=host -d quay.io/coreos/etcd:v2.2.0 works)
Run this simple etcd client code (below) that loops watching for changes to a key.
Observe leaking TCP connections - I view through sudo netstat - plant | grep 2379 (and eventually you'll run out of ports).

extern crate hyper;
extern crate tokio_core;
#[macro_use]
extern crate log;
extern crate env_logger;
extern crate futures;
extern crate tokio_timer;

use std::time::Duration;
use futures::future::Future;
use futures::Stream;
use tokio_core::reactor;
use tokio_timer::{Timer, TimeoutError};
use hyper::{Client, Uri};
use std::error::Error;

// Dummy error type to handle this
#[derive(Debug)]
enum MyError {
    Timeout,
    Other(String),
}

impl std::fmt::Display for MyError {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
        write!(f, "{}", self.description())
    }
}

impl Error for MyError {
    fn description(&self) -> &str {
        match *self {
            MyError::Timeout => "Timeout",
            MyError::Other(ref s) => s,
        }
    }
}

impl<T> From<TimeoutError<T>> for MyError {
    fn from(_error: TimeoutError<T>) -> MyError {
        MyError::Timeout
    }
}

impl From<hyper::Error> for MyError {
    fn from(error: hyper::Error) -> MyError {
        MyError::Other(error.description().to_string())
    }
}

fn main() {
    env_logger::init().unwrap();

    let mut core = reactor::Core::new().unwrap();

    let client = Client::new(&core.handle());

    let mut idx = 0;
    loop {
        let url_str = format!(
            "http://localhost:2379/v2/keys/foo?waitIndex={}&wait=true&recursive=true",
            idx
        );
        let url = url_str.parse::<Uri>().unwrap();
        debug!("Kicking off watch for index: {}", idx);
        let timer = Timer::default();
        let cur_idx = idx;
        let work: Box<Future<Item = (), Error = MyError>> = Box::new(
            timer.timeout(
                client
                    .get(url)
                    .map_err(|e| MyError::Other(e.description().to_string()))
                    .and_then(|response| {
                        let status = response.status();
                        response
                            .body()
                            .concat2()
                            .map_err(|e| MyError::Other(format!("Body parse error: {}", e)))
                            .and_then(move |ref _body| if status == hyper::StatusCode::Ok {
                                idx += 1;
                                Ok(())
                            } else {
                                Err(MyError::Other("Bad response from etcd".to_string()))
                            })
                    })
                    .map(|_| {
                        debug!("Completed watch for index {}", cur_idx);
                    }),
                Duration::from_secs(3),
            ),
        );
        let res = core.run(work);

        match res {
            Ok(_) => debug!("Spotted change from etcd"),
            Err(MyError::Timeout) => info!("Timeout"),
            Err(MyError::Other(e)) => error!(" error from etcd: {}", e),
        }
    }
}

no_proto isn't the default.

Ah - apologies, so it isn't (double negatives confused me!).  Just tried enabling no_proto() and makes no difference.

Does the response that comes back include a response body?

PS, don't call Timer::default() in a loop. That is creating a worker thread every single time. Create it once outside the loop.

@seanmonstar No, no body at all - it's a polling GET that returns when a change is detected (see under "Waiting for a change" at https://coreos.com/etcd/docs/latest/v2/api.html), and it's expected in our real use case that most of the time it would time out with no body.
Thanks for the performance tip on Timer::default(), though that isn't the cause.
I've tried doing some code reading and debugging but I'm finding the hyper code quite tricky to get my head around!

This has been fixed when the no_proto config is set on the Client. The new dispatcher will soon be the default, fixing this for everyone.

Sorry to dispute - but pulling from the latest master (8f6931b3), and switching to use no_proto(), I still see the same problem with the above script.  So there must be another bug..
Would you prefer this reopened or a new issue?

In fact, I can repro on master by patching your new test as follows.  The key is to return a chunked-encoding with no content-length and no body.  With this code, the drop_client_closes_idle_connections test hangs forever (because the connection never drops).
--- a/tests/client.rs
+++ b/tests/client.rs
@@ -673,8 +673,9 @@ mod dispatch_impl {
             sock.set_write_timeout(Some(Duration::from_secs(5))).unwrap();
             let mut buf = [0; 4096];
             sock.read(&mut buf).expect("read 1");
-            let body =[b'x'; 64];
-            write!(sock, "HTTP/1.1 200 OK\r\nContent-Length: {}\r\n\r\n", body.len()).expect("write head");
+            // let body =[b'x'; 64];
+            let body = vec![];
+            write!(sock, "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n").expect("write head");
             let _ = sock.write_all(&body);
             let _ = tx1.send(());

Ah yes, this is different! Not idle connections, but rather an active connection when the Response or the Body related to it has been dropped.

Ok, new patch fixes the test case you provided.

Yes, that works!  Thanks so much for the speedy fixes.


Verify Inji build on windows machine

Verify if Inji can be built seamlessly on Windows machine as a developer

This bugs has been moved to Jira.
Link to Jira bug: https://mosip.atlassian.net/browse/MOSIP-26894


Was receiving an error on 'make' until I added #define BOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT

During 'make' I was getting an error about some static assertion that will always throw (boost 1.58).  In any event, I added the above #define and the problem was resolved.

This defect description lacks details to extent it is not very useful. Specifying how exactly the problem can be reproduced and which error message you observed would greatly improve it.

Closing; not actionable as is.


Private constructor is accessible outside of the class

TypeScript Version:  3.0.0-dev

Search Terms: private constructor, constructor access
Code
class E {
  private constructor() { }
}

const x = E.constructor();

Expected behavior:
We should get TS2673 Constructor of class 'E' is private and only accessible within the class declaration. or TS2341 Property 'constructor' is private and only accessible within class 'E'..
This is important for the singleton pattern. A common way to enforce the singleton pattern is using private constructor, but due to this bug, it is not possible to completely restrict instantiation out of the class.
Actual behavior: No error is given, the code is compiled to JS successfully.
Playground Link: N/A
Possible Cause: I have tried some debugging, and it seems that the reason is that the ModifierFlags for the constructor is not kept (even for the private constructor, it seems that getDeclarationModifierFlagsFromSymbol gives ModifierFlags.None.
With some guidance, I can also help with fixing the bug.

@jcalz Oh, I see. I totally agree with you about the confusing naming. Thanks.


set label

I have errors but do not know if this is linked.
The description of the letsencrypt companion says:

The "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen" label - set this label on the docker-gen container to tell the docker-letsencrypt-nginx-proxy-companion container to use it as the docker-gen when it's split from nginx (separate containers).

source: https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion#optional-container-environment-variables
We do not set this label. Should we better?

Yes we do, if check our nginx container in https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion/blob/master/docker-compose.yml you can check that.


Automatically adding tsling ignore directive.

It's currently very hard to use tsd and tslint together, especially in automated builds with Gulp etc. as tslint lacks option to ignore certain files.
As implementing ignore option in tslint seems to stuck (palantir/tslint#73) I thought that maybe it could be handled on tsd side by automatically adding ignore header so the file is not linted.

This won't be merged since it's subjective, but you're welcome to continue using your own fork. Another thing is, you can actually just modify tsd.d.ts yourself before the task in your gulpfile.


Fix missing parameter error when creating credential offer

Codecov Report

Merging #571 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #571   +/-   ##
=======================================
  Coverage   96.75%   96.75%
=======================================
  Files         240      240
  Lines       12753    12753
=======================================
  Hits        12339    12339
  Misses        414      414


Cannot Create a Group with Json serialization

Tested Versions:

pravega/schemaregistry:0.2.0
pravega/schemaregistry:0.4.0

Problem description
POST: http://{schema registry uri}:9092/v1/groups
{
   "groupName": "mygroup",
   "groupProperties": {
      "serializationFormat":{
         "serializationFormat":"Json"
      },
      "compatibility":{
         "policy":"BackwardTransitive"
      },
      "allowMultipleTypes":false,
      "properties":{ }
   }
}

HTTP 400 Error when creating a group using the "Json" serialization format. Server Output:
[grizzly-http-server-0] WARN  i.p.s.s.r.r.AbstractResource - Bad argument for request createGroup failed with exception: . null. {}
HTTP 500 Error when creating a group with a "JSON" or "json" serialization format.
2022-09-06 17:46:22,042 278827 [RestServer RUNNING] WARN  i.p.s.s.r.r.AbstractResource - Request createGroup failed with exception:  failed with Internal Server error.
java.lang.NullPointerException: null
	at io.pravega.schemaregistry.contract.transform.ModelHelper.decode(ModelHelper.java:65)
	at io.pravega.schemaregistry.contract.transform.ModelHelper.decode(ModelHelper.java:251)
	at io.pravega.schemaregistry.server.rest.resources.GroupResourceImpl.lambda$createGroup$10(GroupResourceImpl.java:138)
	at io.pravega.schemaregistry.server.rest.resources.AbstractResource.lambda$withAuthorization$1(AbstractResource.java:77)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)

Problem location
API Rest Controller for Groups (POST), possibility the i.p.s.s.r.r.AbstractResource.
Suggestions for an improvement
The user gets no feedback in the HTTP return as to what happened, only the return code. There is an unhandled exception when using invalid serialization formats and it is not clear to me if the schema registry is able to create schemas with the JSON serialization format or if there is another validation error preventing the group from being defined.
The current payload is based of the (invalid) example provided here https://pravega.io/docs/snapshot/schema-registry/rest-usage

I found the error was coming from the following line of code throwing an IllegalArgumentException with no message in it. Resulting in the "null. {}" message being returned to the user.
        Preconditions.checkArgument(isValidCompatibilityForFormat(groupProperties.getSerializationFormat(), groupProperties.getCompatibility()));

src: https://github.com/pravega/schema-registry/blob/master/server/src/main/java/io/pravega/schemaregistry/service/SchemaRegistryService.java#L143
The source of this issue seems to be the inconsistent usage of the isValidCompatibilityForFormat method.
    private boolean isValidCompatibilityForFormat(SerializationFormat serializationFormat, Compatibility compatibility) {
        switch (serializationFormat) {
            case Avro:
                return true;
            case Protobuf:
                // Only Allow Any or Deny All are allowed values.
            case Json:
                // Only Allow Any or Deny All are allowed values.
            case Custom:
                // Only Allow Any or Deny All are allowed values.
            case Any:
                return compatibility.getType().equals(Compatibility.Type.AllowAny) || compatibility.getType().equals(Compatibility.Type.DenyAll);
            default:
                throw new IllegalArgumentException("Unknown serialization format");
        }
    }

src: https://github.com/pravega/schema-registry/blob/0072abf26e6e09dbe30ab246933e84e6e3b18bdf/server/src/main/java/io/pravega/schemaregistry/service/SchemaRegistryService.java#L647
It is documented to return a boolean if the schema is valid, however, it also throws an IllegalArgumentException to trigger the 400 return code. Throwing the exception actually gives the user an idea of what failed, however, actually returning false in the function results in the higher level Preconditions.checkArgument returning an IllegalArgumentException except with no message description.
With that said, an ideal HTTP 400 error message would have been "Compatibility Type must be 'AllowAll' or 'DenyAll' for ".
Updating the compatibility type to "AllowAll" fixed my issue in this case, where the following provided me a HTTP 201 return.
{
    "groupName": "mygroup",
    "groupProperties": {
        "serializationFormat": {
            "serializationFormat": "Json"
        },
        "compatibility": {
            "policy": "AllowAny"
        },
        "allowMultipleTypes": true,
        "properties": {}
    }
}

This would be extremely helpful to have documented in the

https://github.com/pravega/schema-registry/wiki/REST-API-Usage-Samples
https://github.com/pravega/schema-registry/wiki/REST-documentation

I will leave this issue open to associate an improvement PR to these suggestions.

@tsteinholz, thank you for the input. We will have a look on this and will work accordingly.


VarUInt and VarInt Traits over Write

#272 adds a nice API pattern for exposing Ion binary encoding primitives to Write.  I suggest we do the same for VarInt and VarUInt and the call-sites in the issue would be much nicer.

Not related to this change, but I think we should use a similar API pattern for these "encoders".
Originally posted by @almann in https://github.com/amzn/ion-rust/pull/272#discussion_r644437967

They should also probably return number of bytes written.