Further modularize the pdf.js npm package

Given that pdf.js was once built as a PDF rendering library for Firefox and bundled with the application, I understand that bundle size was never a top priority. On the other hand, pdf.js is still (and maybe more than ever) the first choice for developers who work on web applications that need to process or render PDF documents in some way. There is a myriad of questions on StackOverflow around how to bundle the huge pdfjs CommonJS  modules with applications.
@robrez suggested to deploy at least tree-shakeable ES modules along with the CJS modules in 2017 (#10317), but the ticket has received little attention despite 33 thumb-ups. There is a module called @bundled-es-modules/pdfjs-dist on npm that claims to "bundle and expose" pdfjs as an ES module, but I think they're really only wrapping the pre-built pdf.js library (which is still only default-exporting and relying on that built-in require()), i.e. no tree-shaking advantage over the original library.
I spent many hours browsing the source code of pdf.js, and my greatest concerns with regard to reducing the bundle size are:

the highly generic API which even abstracts the different types of input sources from the caller
the hardcoded worker module resolution
the runtime evaluation of the PDFJSDev.* configuration variables

As an application developer, I probably don't need or want a PDF library to handle input abstraction (including different buffer formats, downloading from network streams, node.js integration, etc.) for me. I would probably prefer direct access to the underlying processor and provide my PDF data directly in its single, preferred buffer format. That, together with working tree-shaking, would probably already remove a big part from the resulting bundle.
The worker module resolution is a similar case. The published version of the library relies on a hardcoded (yet dynamic) require() which bundlers cannot replace with their own module resolution due to the sheer number of evaluated options. Again, I think this should better be handled outside the library, by the caller, who knows better about the (single, actual) environment.
And lastly, the whole PDFJSDev variable system could contribute to smaller bundle sizes if only it would qualify for build-time evaluation and dead code removal. Maybe I am missing something, but I have a feeling that the configuration (which is currently an object and runtime-processed with helpers like .test() and .eval() on top) could just as well be replaced with something more common like process.env variables, which bundlers like webpack or rollup would then evaluate earlier, at build time, so that unused code could be identified and removed from the bundle.
I think this whole topic deserves more attention than it is currently receiving. I would be willing to contribute a fair share, but it would need more volunteers, and contact to somebody who is more familiar with the code would surely speed things up.

I think the problem so far has been that most contributors work on the library itself and are not too familiar with the myriad of bundling tools. In the beginning we supported multiple bundling tools that contributors helped to implement, but this became complex quite soon, so we simplified this in order for it to be maintainable for us. I think we're all open to suggestions for improved bundling, but we rely on the community here to provide us with feedback and patches since this isn't something we work with often. We're happy to review any patches to improve the current situation, but we do want to focus on maintainability as well.

I think the problem so far has been that most contributors work on the library itself and are not too familiar with the myriad of bundling tools. In the beginning we supported multiple bundling tools that contributors helped to implement, but this became complex quite soon, so we simplified this in order for it to be maintainable for us. I think we're all open to suggestions for improved bundling, but we rely on the community here to provide us with feedback and patches since this isn't something we work with often. We're happy to review any patches to improve the current situation, but we do want to focus on maintainability as well.

Given that pdf.js was once built as a PDF rendering library for Firefox and bundled with the application,

Well, please note that this is still the main reason for this library to exist :-)
As mentioned in https://github.com/mozilla/pdf.js/issues/12900#issuecomment-766397559, over the last few years we've purposely removed a lot of overall complexity related to bundling since that's allowed quite a bit of clean-up/simplification of old code.

the highly generic API which even abstracts the different types of input sources from the caller

Note that having one unified API-surface significantly simplifies both maintenance and support, not to mention that by not providing direct access to "lower"-level code we can much more easily make changes and implement new features.
Basically, we really want to avoid a situation where a significant portion of the underlying code is part of the official API-surface.

the hardcoded worker module resolution
[...]
The worker module resolution is a similar case. The published version of the library relies on a hardcoded (yet dynamic) require()

Note that this part in only relevant for Node.js environments, where Web Workers aren't available...

which bundlers cannot replace with their own module resolution due to the sheer number of evaluated options.

... for every other use-case, i.e. in browsers, note that you're not supposed to load the pdf.worker.js file manually since that will lead to very poor performance (since all parsing should run in a worker-thread).
Hence you should either use the workerSrc option to point its location, or use the workerPort option (see e.g. the Webpack use case in pdfjs-dist), or even provide your own PDFWorker-instance when calling getDocument (note the JSDocs here).

the runtime evaluation of the PDFJSDev.* configuration variables
[...]
Maybe I am missing something, but I have a feeling that the configuration (which is currently an object and runtime-processed with helpers like .test() and .eval() on top) could just as well be replaced with something

Huh, but those are evaluated when the library is built rather than at runtime!?

While you can obviously always create your own build of the PDF.js library, where you remove e.g. the network-code that you don't need, I'm a bit worried that trying to officially support such a thing in our builds could quickly lead to a very high maintainable/support-burden for the few regular PDF.js contributors.

Given that pdf.js was once built as a PDF rendering library for Firefox and bundled with the application,

Well, please note that this is still the main reason for this library to exist :-)
As mentioned in https://github.com/mozilla/pdf.js/issues/12900#issuecomment-766397559, over the last few years we've purposely removed a lot of overall complexity related to bundling since that's allowed quite a bit of clean-up/simplification of old code.

the highly generic API which even abstracts the different types of input sources from the caller

Note that having one unified API-surface significantly simplifies both maintenance and support, not to mention that by not providing direct access to "lower"-level code we can much more easily make changes and implement new features.
Basically, we really want to avoid a situation where a significant portion of the underlying code is part of the official API-surface.

the hardcoded worker module resolution
[...]
The worker module resolution is a similar case. The published version of the library relies on a hardcoded (yet dynamic) require()

Note that this part in only relevant for Node.js environments, where Web Workers aren't available...

which bundlers cannot replace with their own module resolution due to the sheer number of evaluated options.

... for every other use-case, i.e. in browsers, note that you're not supposed to load the pdf.worker.js file manually since that will lead to very poor performance (since all parsing should run in a worker-thread).
Hence you should either use the workerSrc option to point its location, or use the workerPort option (see e.g. the Webpack use case in pdfjs-dist), or even provide your own PDFWorker-instance when calling getDocument (note the JSDocs here).

the runtime evaluation of the PDFJSDev.* configuration variables
[...]
Maybe I am missing something, but I have a feeling that the configuration (which is currently an object and runtime-processed with helpers like .test() and .eval() on top) could just as well be replaced with something

Huh, but those are evaluated when the library is built rather than at runtime!?

While you can obviously always create your own build of the PDF.js library, where you remove e.g. the network-code that you don't need, I'm a bit worried that trying to officially support such a thing in our builds could quickly lead to a very high maintainable/support-burden for the few regular PDF.js contributors.

I'm going to close this issue since there are currently no actionable points in here. Hopefully it does shed some light on the current situation and in which areas we will review contributions. Thanks.

this is a good idea


Referee: Circular argument for rate of long period EBs?

In the referee's comments, they say:

In the first paragraph of Section 3.1, it is mentioned that the light
curves of known EBs and other known false positives are excluded from the
analysis. What would happen if these were left in the sample? Also, later in
the paper (Section 7), you use the detected Kepler EBs to estimate the number
of EB signals you should expect to see in your analysis. It does not seem like
you took into account the fact that you had already removed a large sample of
the known EBs prior to the analysis (which would then serve to decrease the
number of EB signals you should expect to detect).

@timothydmorton do you have any comments about this? I can probably write something but anything would help.

This is actually a good point that I missed.  When I calibrate the binary star population parameters using the Kepler EB detections, I try to roughly match the number and period distribution of Kepler EBs with P < 1000d.  However, when predicting the number of EBs we should see in our search, I should take into account that you have excluded from the search the known Kepler EBs, which include, e.g., 10 systems with periods > 1000d, presumably most of which are likely single or double eclipses.
The complication with trying to correct for this is that my query to count "detected" EBs in my simulated sample is the following:
dfm_q = 'n_pri < 3 and n_sec < 3 and ' +\
        '(((n_pri==0 or snr_pri < 15) and snr_sec > 15) or ' +\
        '((n_sec==0 or snr_sec < 15)  and snr_pri > 15))'
dfm_q += ' and ((T14_pri < 2.5 and n_pri > 0) or (T14_sec < 2.5 and n_sec > 0))'

That is, I require there to be a primary XOR a secondary (showing both a detectable primary and secondary will exclude a detection), as well as < 3 of whichever it is.  So in order to properly account for how many previously identified Kepler EBs should go into my count as "already detected before our search," I need to know how many of the catalogued Kepler EBs pass this query.  It would be nice if both a primary & secondary were required to get in the Kepler EB catalog, but this is likely not the case...  I'll skim the Kepler EB docs/papers to see if I can figure this out (doesn't seem like the catalog columns contain enough info to answer this question).

Yeah... the catalog that I used was Kirk et al. and the selection function is definitely a little complicated. I don't think that we need to do anything too drastic. We should just have some argument about the order of magnitude of this effect.

OK... so then the gist of this issue that by assuming (in effect) that all of the Kepler EBs that we have excluded from our search have either at least 3 eclipses or a primary and a secondary, we are slightly overpredicting the number of EBs that should be in our sample.  If we were to correct for this effect, our number of predicted EBs in our sample should decrease by a few.  But focusing on the effect on FPPs (the whole point of this exercise), ignoring this effect will cause us to overestimate FPP, which is a conservative thing to do.  Do you want me to put something in the ref response and/or document to this effect?

Yeah. I think that that would be sufficient. If you don't mind trying to draft something, that would be awesome! Thanks!

Done.  Added a paragraph to the end of S7, and a note in the ref response.

I think that there is one other point. If the light curves or population of EBs that we remove from the sample are qualitatively different from the ones left over then there might be a problem too. Let me think about this and draft something to say cause I'm not even making sense to myself right now...


Confusing info for prerelease package

Go to: https://www.nuget.org/packages/EntityFramework/6.2.0-beta1
I find the following confusing:

What does this even mean? It says "There is a newer prerelease version of this package available.
See the version list below for details." but as far I can see this is the latest version.

There are in fact newer pre-release versions available. However, they are unlisted. The fix is to not take unlisted package versions into consideration when determining whether this message should be shown.


TSAN C Build Failed

https://grpc-testing.appspot.com/job/gRPC_pull_requests/4085/config=tsan,language=c,platform=linux/console

Looks like fixed.


Bug: Typing of '@' character is not possible on whole system when agent is running

Describe the bug
When HASS.Agent is running on my Windows 10 machine, I am no longer able to type '@' chars. I am using a german keyboard, and the Agent is somehow blocking the typing. On a german keyboard the shortcut for '@' is 'Alt Gr + Q'. For example typing of a '€' is pretty similar: 'Alt Gr + E' and is working fine. When I quit the Agent by clicking on the tray icon, it will immediately work again. I have no quickactions configured, I only have a single dummy sensor.
To Reproduce
Steps to reproduce the behavior:

Boot machine with Agent on autostart.
Wait when Agent is started
Try to type '@' char -> not working

Expected behavior
When no shortcuts are configured, it should not affect typing of any characters on a keyboard.
Screenshots
If applicable, add screenshots to help explain your problem.
Misc info (please complete the following information):

Windows build (ideally screenshot/info of winver.exe output): 22H2 19045.3208
Windows' UI language: German
HASS.Agent version: 2022.14.0

Please check what's applicable (multiple answers possible):

[x] Installed via installer
[ ] Installed manually
[x] Problem occurs in HASS.Agent
[ ] Problem occurs in Satellite Service

Possible duplicate of https://github.com/LAB02-Research/HASS.Agent/issues/292 & https://github.com/LAB02-Research/HASS.Agent/issues/225 & https://github.com/LAB02-Research/HASS.Agent/issues/122
Could you please try and configure different HotKey as https://github.com/LAB02-Research/HASS.Agent/issues/225#issuecomment-1387646483 suggested?
At some point this will be probably addressed by having a warning notification for German keyboard layouts.

Thank you very much, that solved my problem.

argl.... I was wondering for months whats wrong with my Gaming Keyboard or its driver that off all things the @ sign is not working sometimes....
then I look around in search of something different and find this thread.... yeah well, that explains it and also why @ works in the RDP connection to my laptop, but not on my PC, which my brain stored as "sometimes its working".
Thanks!
one problem less.


feat(react-shape): ✨ add throttle to size and position

Description
使用requestAnimationFrame来减少React Node render

Motivation and Context
React shape node 在node position和size 更新时会触发多次render，实际并没有必要

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Enhancement (changes that improvement of current feature or performance)
[ ] Refactoring (changes that neither fixes a bug nor adds a feature)
[ ] Test Case (changes that add missing tests or correct existing tests)
[ ] Code style optimization (changes that do not affect the meaning of the code)
[ ] Docs (changes that only update documentation)
[ ] Chore (changes that don't modify src or test files)

Self Check before Merge

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
0

Relevant Lines:
0

💛  - Coveralls


Piecewise aliasing check may break since random point is only in one component

aliasing would be if g had been the zero function, right?
julia> f = Fun(x->sin(3000x),Interval())
Fun{Ultraspherical{0},Float64}([6.9123e-16,0.024614,2.00485e-16,0.0245932,-3.80905e-16,0.0245514,-1.56165e-16,0.0244885,-5.02903e-16,0.024404  …  -3.83374e-16,-7.3302e-16,8.10116e-16,-2.56762e-16,3.88578e-16,1.1988e-15,-3.38271e-16,2.54271e-16,4.52763e-16,-9.52131e-16],Ultraspherical{0}(Interval{Float64}(-1.0,1.0)))

julia> f.coefficients[:] = 0.;

julia> f.coefficients[300] = 2.0;

julia> g = Fun(x->f[x],Interval())
Fun{Ultraspherical{0},Float64}([-1.4368e-15,1.78116e-15,-3.94716e-15,-5.45003e-15,-5.99497e-15,-3.81497e-15,-5.78823e-15,-3.7787e-15,-2.95757e-15,-8.12579e-15  …  -1.00247e-15,2.60289e-14,-6.53816e-16,2.32211e-14,9.71093e-16,2.31197e-14,1.81013e-15,2.24712e-14,-7.52087e-16,2.25431e-14],Ultraspherical{0}(Interval{Float64}(-1.0,1.0)))

julia> g.coefficients[300]
2.0000000000000084

julia> length(g), length(f)
(512,32769)

Aliasing is how cos(100x) looks like 1 if you underresolve
Fun(t->cos(100t),Fourier,10).coefficients == [1.0,0.0,-0.0,-0.0,0.0,0.0,-0.0,-0.0,0.0,-0.0]

The constructor double checks a random point to ensure the approximation matches there.  But a single random point is not enough when there are multiple components.

On 3 Jan 2015, at 5:16 pm, Gustavo Goretkin<EMAIL_ADDRESS>wrote:
aliasing would be if g had been the zero function, right?
julia> f = Fun(x->sin(3000x),Interval())
Fun{Ultraspherical{0},Float64}([6.9123e-16,0.024614,2.00485e-16,0.0245932,-3.80905e-16,0.0245514,-1.56165e-16,0.0244885,-5.02903e-16,0.024404  …  -3.83374e-16,-7.3302e-16,8.10116e-16,-2.56762e-16,3.88578e-16,1.1988e-15,-3.38271e-16,2.54271e-16,4.52763e-16,-9.52131e-16],Ultraspherical{0}(Interval{Float64}(-1.0,1.0)))
julia> f.coefficients[:] = 0.;
julia> f.coefficients[300] = 2.0;
julia> g = Fun(x->f[x],Interval())
Fun{Ultraspherical{0},Float64}([-1.4368e-15,1.78116e-15,-3.94716e-15,-5.45003e-15,-5.99497e-15,-3.81497e-15,-5.78823e-15,-3.7787e-15,-2.95757e-15,-8.12579e-15  …  -1.00247e-15,2.60289e-14,-6.53816e-16,2.32211e-14,9.71093e-16,2.31197e-14,1.81013e-15,2.24712e-14,-7.52087e-16,2.25431e-14],Ultraspherical{0}(Interval{Float64}(-1.0,1.0)))
julia> g.coefficients[300]
2.0000000000000084
julia> length(g), length(f)
(512,32769)
—
Reply to this email directly or view it on GitHub https://github.com/ApproxFun/ApproxFun.jl/issues/118#issuecomment-68585073.

One needs to take a random point per piece. I am not sure how you are constructing piecewise polynomial approximations, but I was expecting it to resolve each piece independently and then concatenate them together.

That would be a more efficient way to do it but requires specializing the constructor.  Instead, ArraySpace just overrides points and transform, calling the standard constructor.  Here the points are a union of points in each subpiece and the transform then splits the values by piece, calls transform for each subpiece, then interlaces the coefficients.
The benefit of this approach is “PiecewiseSpace” is just another space for most components (\, etc.), so that no special treatment is required.  The cost is more coefficients than needed when the resolution on one piece is << the resolution on the other piece.  The other cost is having to repeatedly interlace and deinterlace coefficients.  But doing \ in infinite-dimensions seems to only make sense with this interlacing approach.

A simple work around to this problem is that each space overrides a “checkpoints” routine, which defaults to a single random point in the domain, but then piecewise can return one rand point per subpiece.

On 13 Jan 2015, at 3:40 pm, Alex Townsend<EMAIL_ADDRESS>wrote:
One needs to take a random point per piece. I am not sure how you are constructing piecewise polynomial approximations, but I was expecting it to resolve each piece independently and then concatenate them together.
—
Reply to this email directly or view it on GitHub https://github.com/ApproxFun/ApproxFun.jl/issues/118#issuecomment-69835591.

Right, got it. Thanks.  checkpoints() sounds OK.


Docs/integrating into frameworks

Hello,
I am new to contributing to open source so I am not sure if I am doing this correctly.  But, I have created an angular 4 version of this template
https://getmdl.io/templates/dashboard/index.html
and was hoping you might like to add it to your resources?
anyway, thanks much.
Please let me know how to proceed, thanks!

MDL is no longer being maintained. Material Components for Web has superseded it.
We also never directly supported framework integrations of any kind. They have always been, in MDL's point of view, something developers do if they need to but not something we encouraged. MDL was designed for very static page purposes, not highly dynamic content.
It's good to know that you've been able to adapt it to work in Angular. However at this time we aren't updating the microsite any further beyond possibly one push with a new component if the time can be found to do the update process internally.
Thank you.

Thanks much,
Let me know if there is anything else I can do to help contribute to the project.
Jake

On Sep 12, 2017, at 2:45 PM, Jonathan Garbee<EMAIL_ADDRESS>wrote:
MDL is no longer being maintained. Material Components for Web has superseded it.
We also never directly supported framework integrations of any kind. They have always been, in MDL's point of view, something developers do if they need to but not something we encouraged. MDL was designed for very static page purposes, not highly dynamic content.
It's good to know that you've been able to adapt it to work in Angular. However at this time we aren't updating the microsite any further beyond possibly one push with a new component if the time can be found to do the update process internally.
Thank you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/google/material-design-lite/pull/5154#issuecomment-328841349, or mute the thread https://github.com/notifications/unsubscribe-auth/AT-3Fr0sYBWd_TThmXPbhdiUYtqgzgdzks5shnzcgaJpZM4PUhId.


Small changes to Gutenberg documentation 2.x

First off, hello! Thanks for submitting a PR. We love/welcome PRs (especially if it's your first). Have any questions? Read this section in CONTRIBUTING.md
Issue

No issue - just added the same things as in #1884

@palmiak Are you sure about the $is_preview parameter? I know it’s in ACF and it’s passed down to the function, but when I tested it, it never changed and always had the default value false. Also in Gutenberg, there’s no mention of an $is_preview parameter:
https://github.com/WordPress/gutenberg/blob/c123f1d80ffbdf4c7cd5f8fcf17ecd0dab42f54e/lib/class-wp-block-type.php#L108
So I’m not sure whether this actually works or whether I’m doing something totally wrong 🤔.

$is_preview is more a part of ACF_Blocks rather than Gutenberg itself https://www.advancedcustomfields.com/resources/acf_register_block/ -> Registering a block with callback.
It works like a charm - I had to add a custom JS event just for backend. Thank to this is was quite easy.

I know that it’s a part of ACF Blocks. I looked at what the ACF Blocks feature does in the code, and I didn’t see how $is_preview really works the first time, because I only looked at ACF_Blocks::render_callback(). But now I saw, depending on whether it’s an AJAX request or not, it will use either ACF_Blocks::render_callback() or ACF_Blocks::ajax_render_block_preview().


[BUG] FormatException in ResourceIdentifier

Library name and version
Azure.Core 1.28.0
Describe the bug
When a storage account network is set up with this feature https://azure.microsoft.com/en-us/updates/storage-resource-instance-rules-preview/ and set up to allow
All in current tenant or
All in current subscription or
All in current resource group,
the resource path that is shown in the JSON of the storage account is of the format
"/subscriptions/*/resourcegroups/*/providers/Microsoft.DataFactory/factories/*" where I assume represents the choice that has been made in the settings.
so when trying to access this property StorageAccountData.NetworkRuleSet.ResourceAccessRules[0].ResourceId (the index that the rule specified with the in its path) we get format exception because when calling the Parse function in ResourceIdentifier class which in turn calls CheckSubscriptionFormat and checks if the format is a guid format, it fails.
https://github.com/Azure/azure-sdk-for-net/blob/bc94ecb05d18c04645b92dde10c18f2755336a46/sdk/core/Azure.Core/src/ResourceIdentifier.cs#L179-L184
Expected behavior
ResourceIdentifier should support path with *
Actual behavior
We get format exception
Reproduction Steps
create storage account and add a new Resource instances in Networking tab with All in tenant
Environment
No response

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

@ArthurMa1978 no,
I updated the ticket without all the nonsense that was there.
With the new feature mentioned above, we get back this exact resource id
/subscriptions/*/resourcegroups/*/providers/Microsoft.DataFactory/factories/*
Meaning that subscription Id, resource group name and resource name can be a wildcard.

Hey @ArthurMa1978, any update on this?

@omri-muszkal a resource identifier cannot contain any wildcard, if contains then this is not a resource identifier but a string.
Can you let me know which SDK are you using and hit exception?

@ArthurMa1978 it's Azure.ResourceManager.Storage
It should be treated as a string, not a resource identifier. It may contain a legitimate resource identifier, but in many cases it will have wildcards.

Hi @shaneochotny , @ArthurMa1978 Since the original issue account is deleted, I'll reply to you two.
This feature is supported now, please use the lateste package.
    var storage = (await resourceGroup.GetStorageAccounts().GetAsync("rgName")).Value;
    storage.Data.NetworkRuleSet.ResourceAccessRules.Add(
        new StorageAccountResourceAccessRule() { TenantId = Guid.Parse(tenantId), ResourceId = new ResourceIdentifier("/subscriptions/*/resourcegroups/*/providers/Microsoft.Purview/Accounts/*") });
    storage = await storage.UpdateAsync(new StorageAccountPatch()
    {
        NetworkRuleSet = storage.Data.NetworkRuleSet
    });


webpack 2 command line arguments are lost

Hi,
Webpack 2 dictates the way of passing custom command line arguments:
https://github.com/webpack/webpack/issues/2254
So we can have dynamic configs.
I've tried to apply the same logic to the configs which are processed using webpack-config, but found that it doesn't work as expected.
Here is the repository to reproduce the issue:
https://github.com/PavelPolyakov/webpack-config-env-issue
Basically, when I run webpack and pass the variable env.hello, I want my base config to be extended.
During the run, I see that it is invoked twice, first time the env variable is there, but the second time I have some Config object.

I'd appreciate a help, maybe I'm doing something wrong.
Regards,

hi @mdreizin, do you think it's an incorrect behaviour or I do something wrong?

Experiencing the same issue. The first time the configuration is called, things work correctly. After that, the env arguments from the cli are lost

@PavelPolyakov @ianks I'm really sorry that you were waiting for long time. I didn't have free time to contribute this project.
Please update to 7.1.0 and let me know whether it works for your or not.


Remove sanitize_path

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

Please upload report for BASE (main@c590080). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #554   +/-   ##
=======================================
  Coverage        ?   99.38%
=======================================
  Files           ?       83
  Lines           ?     2286
  Branches        ?      226
=======================================
  Hits            ?     2272
  Misses          ?        7
  Partials        ?        7

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


Email entity issue

So I was testing training on some data, and I got ValueError indicates contaminated data.
Then I found some email contains dot will generate error(before @).
for example:
('hello.world@gmail.com',{'entities':[(0, 21, 'EMAIL')]})  # doesnt work
('helloworld@gmail.com',{'entities':[(0, 20, 'EMAIL')]}) # works
Any idea why it happened?

Thanks @RobinXL
I'm surfacing same kind of error related while training NER.
I found these kinds of NE context including period between alphabetical tokens cause errors in spacy train command.
James P.Gordon
mmap.info

I reported this problem at this issue. https://github.com/explosion/spaCy/issues/3756#issuecomment-627344482

Hi @RobinXL
I found this error is coming from spaCy's CNN trainer.
Let us wait the major version up of spaCy.
I'd close this issue.


gpu_memory_fraction for tf.contrib.lean Estimators stopped working in tensorflow 1.1.0

I was updating to Tensorflow 1.1.0 to use the tf.estimator API and I found, that I couldn't get it to use less than the full GPU RAM for one process.
I was trying to find out where the issue is and found, that also the tf.contrib.lean.Estimators had the same problem.
Here a code snippet to reproduce the issue:
import tensorflow as tf
import numpy as np
from tensorflow.contrib.learn import DNNClassifier
import os

tf.logging.set_verbosity(tf.logging.INFO)

from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)

feature_columns = [tf.contrib.layers.real_valued_column("x", dimension=mnist.train.images.shape[1])]
model = DNNClassifier(hidden_units=[10,10],
                      feature_columns=feature_columns,
                      n_classes=10,
                      config=tf.contrib.learn.RunConfig(gpu_memory_fraction=0.1))

input_fn_train = tf.contrib.learn.io.numpy_input_fn(
                                x={"x":mnist.train.images.reshape([-1,28,28,1]).astype(np.float32)[:1000]},
                                y=np.argmax(mnist.train.labels[:1000],1).astype(np.int32),
                                batch_size=50,
                                num_epochs=50,
                                )

model.fit(input_fn=input_fn_train)

With tensorflow 1.0.1 it works as expected and only allocated 1/10 of the GPU RAM, but in tensorflow 1.1.0 it ignores this parameter.
I also check with the code from the MNIST for ML beginners code  and used the GPUOptions when initializing the session:
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.1)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

It works as expected in both verions.
Somehow this GPU options is not set correctly when using the tf.contib.learn.Estimator framework OR The gpu_memory is allocated before this call.
I asked this before on the tensorflow discuss group and I was told that is is a bug.

This problem affects managed_session use generally, and not only through Estimator. The per_process_gpu_memory_fraction and the allow_growth settings have no effect.

This should be fixed at the head. Could you please give it a try?

Built from head (dbb78c7783c32f8f3dc86364dc10d7d51cf61277), this does not seem to work for me.
  session_config=tf.ConfigProto(
          allow_soft_placement=True,
          log_device_placement=False)
  # session_config.gpu_options.allow_growth = True
  session_config.gpu_options.per_process_gpu_memory_fraction = 0.40

  saver = tf.train.Saver(
      max_to_keep=50,
      write_version=2 ,
      sharded=True,)

  init_op = tf.global_variables_initializer()
  sv = tf.train.Supervisor(
      saver=saver,
      save_model_secs=model_params['checkpoint_interval'],
      save_summaries_secs=model_params['report_interval'],
      init_op=init_op,
      logdir=model_params['checkpoint_dir'])

  with sv.managed_session(config=session_config) as sess:

[1] TITAN X (Pascal) | 54'C,  22 % | 11672 / 12189 MB | asher(11117M)
The above worked previously, but please let me know if I've missed a change.

Having the same issue here.
And I notice that "config_pb2.ConfigProto(allow_soft_placement=True)" of "monitored_session" in lines 965-975 of estimator.py has no gpu memory config
Revise the config to incorporate gpu memory fraction can manually control gpu memory usage again
ex. config.gpu_options.per_process_gpu_memory_fraction = 0.3

Rebuilt from 7937fb34dbd9fd04dc878eefa6ccfe00d1262f2e and this behavior has changed. I'm not sure that it's quite correct - perhaps it's using the allow_growth option instead of per_process_gpu_memory_fraction?
[1] TITAN X (Pascal) | 62'C,  29 % | 12049 / 12189 MB | asher(457M)
is the result of:
session_config.gpu_options.per_process_gpu_memory_fraction = 0.40
Which I would expect to reserve 40% of the available memory.

Has this issue been fixed? Seems like gpu_memory_fraction still has no effect in r1.2 and r1.3

It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly.

This is fixed in r1.4 using the tf.Estimator, eg.
config = tf.ConfigProto(gpu_options=tf.GPUOptions(per_process_gpu_memory_fraction=0.5))
trainingConfig = tf.estimator.RunConfig(session_config=config)
estimator = tf.estimator.Estimator(config=trainingConfig, ...)

will work as desired. I don't think it's expected to be fixed in the deprecated tf.contrib.learn.Estimator.


fix ovsd driver failing to init

The logic was reversed for checking if driver info was already in db
Signed-off-by: Chris Plock<EMAIL_ADDRESS>

build PR

the weird logic for the err check:
https://github.com/contiv/netplugin/blob/master/core/error.go#L81

build pr

actually think the usage is correct . . .despite the PR working for me


Testing ubi go 1.20.5

This pull request has been automatically closed due to 30 days of inactivity. If you believe this was done in error, please feel free to reopen the PR or reach out to the BT team for further assistance. Thank you for your contributions!


[BUG] ConnectionResetError: [Errno 104] Connection reset by peer

Describe the bug
I run your program on a Flask server, so it's running constantly.
And once in a while I get this error:
Apr 12 17:28:25 muffon waitress-serve[1438302]: Exception in thread session-packet-receiver:
Apr 12 17:28:25 muffon waitress-serve[1438302]: Traceback (most recent call last):
Apr 12 17:28:25 muffon waitress-serve[1438302]:   File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
Apr 12 17:28:25 muffon waitress-serve[1438302]:     self.run()
Apr 12 17:28:25 muffon waitress-serve[1438302]:   File "/usr/local/lib/python3.10/threading.py", line 946, in run
Apr 12 17:28:25 muffon waitress-serve[1438302]:     self._target(*self._args, **self._kwargs)
Apr 12 17:28:25 muffon waitress-serve[1438302]:   File "/usr/local/lib/python3.10/site-packages/librespot/core.py", line 1632, in run
Apr 12 17:28:25 muffon waitress-serve[1438302]:     packet = self.__session.cipher_pair.receive_encoded(
Apr 12 17:28:25 muffon waitress-serve[1438302]:   File "/usr/local/lib/python3.10/site-packages/librespot/crypto.py", line 58, in receive_encoded
Apr 12 17:28:25 muffon waitress-serve[1438302]:     header_bytes = self.__receive_cipher.decrypt(connection.read(3))
Apr 12 17:28:25 muffon waitress-serve[1438302]:   File "/usr/local/lib/python3.10/site-packages/librespot/core.py", line 1536, in read
Apr 12 17:28:25 muffon waitress-serve[1438302]:     return self.__socket.recv(length)
Apr 12 17:28:25 muffon waitress-serve[1438302]: ConnectionResetError: [Errno 104] Connection reset by peer

And then the program stops working.
I try to handle the error, but it doesn't seem to be handled.
Could you improve this connection reset logic?
To Reproduce

Create Session
Get it running constantly
Call session.content_feeder().load() for days
One day it returns an error and stops working

Expected behavior
I expect this error to be handled and connection to be restored.
Client Information (please complete the following information):

OS: Debian 11
Python Version [3.10.2]
Library Version [0.0.7]

ConnectionResetError was not being handled, so I was added.
622483655ca90806235a85a8346f1cb925749a3e

@kokarare1212 Good. thank you.
When will the next version be released?

Yes, I have released it.
https://github.com/kokarare1212/librespot-python/releases/tag/v0.0.8


chore(main): release 0.1.20

Auto generated release
0.1.20 (2024-06-20)
Build System

deps-dev: bump laravel/pint from 1.16.0 to 1.16.1 (#70) (5b8b5c6)

Continuous Integration

add github-actions to dependabot checks (#68) (7d84cca)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.1.20
:sunflower:


add get_stored_account to append vec

Problem
total account state is exceeding available ram on validators
Summary of Changes
Add get_stored_account to storage apis to allow efficiently returning AccountSharedData at an arbitrary offset.
Fixes #

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

Project coverage is 81.8%. Comparing base (79e316e) to head (a4eddad).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #508   +/-   ##
=======================================
  Coverage    81.8%    81.8%
=======================================
  Files         843      843
  Lines      228586   228662   +76
=======================================
+ Hits       187124   187221   +97
+ Misses      41462    41441   -21


HeadlessJs doesnt start javascript task if the app is closed

[x] Review the documentation: https://facebook.github.io/react-native
[x] Search for existing issues: https://github.com/facebook/react-native/issues
[x] Use the latest React Native release: https://github.com/facebook/react-native/releases

Environment
React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
Memory: 7.63 GB / 15.89 GB
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version  <IP_ADDRESS> AI-173.4907809
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
I am starting HeadlessJs task using broadcast receiver and listening for sms messages, which works fine completely when the app is in foreground or in background but if the app is closed then HeadlessJs task doesnt fire or trigger.
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or     share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

Hello there 👋 this issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.
Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗


update maven javadoc 3.1.0, work with jdk8

The failing Travis CI is definetly not your fault and I have reviewed every single line of your patch. Therefore I discussed it with Michael Stahl and we decided to rebase & merge anyway and that I will fix any existing problem afterwards..
Thanks again for your patch, very welcome! :-)

Thanks again for your help, I struggled with Travis and the GitHub procedure, so I merged it manually and will simply close it now via front-end. ;-)

You're welcome.


read receipts

is there a way to enable read receipts using this plugin?

You can set Disposition-Notification-To header
`def headerMap = ["Disposition-Notification-To":"yourmailid"]
mailService.sendMail {
to toAddressList
subject subjectStr
cc ccAddressList
bcc bccAddressList
headers headerMap
html content
}`


Typescript integration and common steps gives Dependency graph error

I took the example provided here : https://github.com/TheBrainFamily/cypress-cucumber-typescript-example
I just added a simple step file in cypress/integration/common/common.ts
File content is just a simple step
import { Given } from "cypress-cucumber-preprocessor/steps/index";

Given(/I initialize/, () => {
    console.log("INITIALIZE")
  });

When executing the feature, I get the following error:

Error: Can't walk dependency graph: Cannot find module 'cypress-cucumber-preprocessor/steps/index' from 'C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\cypress\integration\common\common.ts'
    required by C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\cypress\integration\common\common.ts
    at C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\node_modules\resolve\lib\async.js:146:35
    at processDirs (C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\node_modules\resolve\lib\async.js:299:39)
    at isdir (C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\node_modules\resolve\lib\async.js:306:32)
    at C:\GIT\cypress-cucumber-typescript-example\cypress-cucumber-typescript-example\node_modules\resolve\lib\async.js:34:69
    at callback (C:\Users\danie_o306gx1\AppData\Local\Cypress\Cache\8.7.0\Cypress\resources\app\packages\server\node_modules\graceful-fs\polyfills.js:289:20)
    at FSReqCallback.oncomplete (fs.js:192:21)

Versions

Cypress version: v8.7.0
Preprocessor version: v4.3.1
Node version: v16.13.0

Nevermind, the problem was with the import.  Changing it from
import { Given } from "cypress-cucumber-preprocessor/steps/index";
to
import { Given } from "cypress-cucumber-preprocessor/steps/index";
fixed the problem


HTTP: New WebSocket API

This will be a long run feature for new Gatling generation, planned for next year.

[x] Checks should target one single incoming message
[x] It should be possible to perform multiple validations and captures on a given incoming message (e.g. capturing data from multiple JSON branches)
[x] It should be possible to set up sequences of checks
[x] It should be possible to set up multiple sequences of checks
[x] It should be possible to define optional matching criteria so that check would ignore un-correlated incoming messages
[x] It should be possible to auto-reconnect on next user action when the WebSocket gets closed by the server
[x] It should be possible to define a post-connect sequence (eg auth) that would be triggered on auto-reconnect

ex:
exec(ws("Connect")
  .connect("wss://host:port/path")
  // blocks the flow
  // it can wait for a sequence of messages, it will then block until all succeed or one fails
  // order is meaningful
  .wait(1 second)(
    wsTextMessage.check(someCheck1, someCheck2),
    wsTextMessage.check(someCheck1, someCheck2)
  )
 // sequence to be performed on (re-)connect (optional)
 .onConnected {
    exec(ws("sentAuthData").sentTextMessage("someText")
      .wait(1 second)(
        wsTextMessage
          // optional, used to filter incoming messages and tell push messages appart
          // always match by default
          .matching(someCheckWithoutSaveAs)
          .check(someCheck)
      ))
 }
).exec(ws("SendMessage1")
  .sendTextMessage("someText")
  .wait(1 second)(
    wsTextMessage.check(someCheck))
)

wip happens here: https://github.com/gatling/gatling/tree/master/gatling-http/src/main/scala/io/gatling/http/action/ws2
sample here: https://github.com/gatling/gatling/blob/master/gatling-http/src/test/scala/io/gatling/http/Ws2CompileTest.scala

feedback welcome

Hi, what happened to the non blocking checks? From what I see in new WebSocket API, all checks are blocking main HTTP flow.

@Sejten Not sure if we'll continue supporting async checks for this one support. So far, the only users who gave us feedback on WebSocket support (both old and new one) is that they don't use non-blocking checks. The ones who are interested in async checks actually want to use WebSockets, not for web apps, but for message broking, similar to what we have for JMS.
Feedback welcome.

I have a problem similar to the one described in this ticket: I want to simulate  a mix of http REST and websocket calls to communicate with an app. With async checks I would be able to create simulation that alternately sends REST calls and receives websocket responses.

Supporting async checks introduces a lot of complexity. I don't think we from GatlingCorp will work on this outside a contract any time soon. Then, contributions would be very welcome!

I am wondering, what's the differences between auto-reconnect in the new API and wsReconnect in current 2.2.5 version?

Any plans to support byte message checks? Or even merely to save the raw byte array from a WebSockets response in the scenario session?

@johnsonexosite It works the same way, except new API can replay an applicative connection sequence (ex: auth).
@reidconnor Yes, we'd like to have binary frames check for final version in Gatling 3. But working on that is not a priority atm, unless we get a customer who needs it. Contribs welcome!

I'm new to Gatling, I'm just starting to investigate it as jmeter is using too much CPU to handle websocket messages, but async message handling would be essential. Is it really being removed? How are we to handle sites which send messages unpredictably? Maybe I'm missing the point cos I'm new to Scala and Gatling, but the reason I'm considering it is so I don't have to have a polling "sleep" loop for these unexpected messages (as doing so is using too much CPU on my jmeter engines, I need an async message handling mechanism instead. I'm used to webload which has a great async handling mechanism for websockets)

Is it really being removed?

It's not being "removed". The WebSocket support is being re-written for Gatling 3 as the version in Gatling 2 has some issues that couldn't be fixed. Support for async checks hasn't been re-implemented yet. See comments above on how to make it happen faster.

I'm used to webload which has a great async handling mechanism for websockets

Suggestions on design of such API welcome then

I have service which doesn't send any response on connect method and after sending pingMessage.
In that case, I would like to avoid adding following line.
ws2 protocol should support sendTextMesssage without adding any checks. Checks should not be mandatory.
.wait(1 second) (
ws2.checkTextMessage("PingMessageResponse").check(regex(""" """))
)

regarding "Checks should target one single incoming message" - I have a check on ws().open like this one: https://gist.github.com/mz0/65a8b24769f05577449e9636b6cdfc35
SUT on the first connection fires 43 messages (which draw UI) of which I'm interested in 17 listed in the transform check. When I tried to split this check in two I missed many messages - websocket debug log indicated that subsequent check was set 15ms after the previous one.


Organize vars in voted_sensors_update.h.

Describe problem solved by the proposed pull request
This PR is copy/paste only to organize a few vars, simplify the diff in PR #11874, and advance PR #9756
Additional context
See PR #11857.

Thanks @dagar!


Fx: Specialize exchange rates into Buy and Sell (and Mid).

Applies to forward as well as spot, so should be applied to parent class (but NB change to Forward elsewhere)

This issue was addressed a number of years ago for spot rates, which are further subdivided into buy, mid, and sell.  Currency forward rate has not been subdivided in the same way in the ontology, however.  None of the definitions we found in IND fct discussions broke forward exchange rates down in this manner, because they occur sometime in the future; buy, mid, and sell rates are typically for a specific day or window that is near term / current.
I recommend that we close this, since the work was done for spot rates.  If a future use case identifies the need for the same divisions for forward rates, we can reopen it or create a new issue at that time.


Add metal3ci user to image userdata

This adds a metal3ci user to image userdata. The airshipci user will still be created and used by the scripts. This additional user will let us swap over to using the metal3ci user once images have been built with both users.

There's a user variable CI_SSH_USER_NAME which will eventually be switched to 'metal3ci' instead of 'airshipci', I will update that variable after we've swapped over fully to that user, so this user will be parameterized in the template later to be consistent across the scripts, but it's a 2 step process. Will merge this and check the image build is all good.


Provide i18n with gettext

It would be useful to wrap every public message with gettext function to allow i18n for application.

1

+1
For those interrested, I've made a gist showing how to catch click exceptions and translate them.
It's quick and dirty (use regexps), but right now it does the job:
https://gist.github.com/lapause/ed148b2b1481f83f39c5
To core developers: if you don't want to implement i18n, you could create one exception class by error type (±3 inheriting from UsageError, ±14 from BadParameter) and use attributes to store dynamic elements (parameter and file names/types.... By doing so it would allow developers to just trap exceptions of interrest to them and re-raise them with customized messages without having to mess with regexps depending of the exact messages used by the library.
To core developers (2): I'm pretty sure my monkey patching of the click.Command.main is not the best way to go, but http://click.pocoo.org/4/exceptions/ could really benefit from a real life example of how to invoke directly on a command declared with multiple arguments, decorators...

Agreed, I'd like to see this too. However, I suppose this would also require a much more fine-grained exception hierarchy, one class for each error message. Right now some parts of click raise such generic ones as RuntimeError.

I think you're supposed to subclass Command so you can override main properly, and then pass the subclass like @click.command(cls=TranslatingCommand).

+1

I'm playing around with click in Mailman 3 to replace our homegrown cli parsing code.  All of our help text is marked with _() and we use flufl.i18n to do the actual run time translations.  I may have more opinions as I get farther along, but for now I don't see any real problem with option help text.  E.g. this works fine:
@click.option(
    '-v', '--verbose',
    is_flag=True, default=False,
    help=_('Display more debugging information to the log file.'))

It gets tricky in one place: use of the function's docstring for the help prologue.  Python only assigns unadorned strings to __doc__.  So there's no good way to mark the help prologue for translation, extraction and also use it in click.
Of course, I might be missing a lot as I've just started digging in. ;)

Should this be implemented in click itself or as part of click-contrib?
Also, command() and group() have help parameters so you could do
@click.command(cls=TranslatingCommand, help=_('translatable string'))
def func():
    # No docstring here.
    pass

This issue appears to be asking for i18n on Click's internal messages, such as exception strings. There should be nothing preventing use of i18n on your own strings.

What I meant was should this be built into click or should there be a separate library?

What you're showing isn't related to what's being asked for. Nothing has to change for what you're showing. Internal message have to be wrapped for what's being asked for.

I'm asking if translating the strings should be built in.

There's no other option, so I don't understand why you're asking.

So I think what needs to be done is to wrap messages that the user might see with _ (gettext) and leave it at that for now.

I'd like to work on this.

#1829 wraps strings that Click shows to a CLI application user with gettext / ngettext. It does not wrap error messages intended for developers. It does not provide any translation files (pot, po, mo).
A project can now translate Click's strings along with their own by generating a pot file, such as with Babel: pip install click; pybabel -o click.pot path/to/click, then combining this catalog with their other message catalogs when loading their translations.
There are still some strings, such as the parameter type in help text (text, integer, etc.), that are not wrapped because they're defined at import time and would require a more complex setup to mark the string for translation then translate it from a variable later at runtime.
From reading the Python docs, it seems like we should be using gettext.translations("click").gettext() instead of the top-level gettext.gettext() to keep our messages out of the default domain. However, as soon as you do that, Python expects the mo files to actually exist. It seems like at that point Click needs to provide an API, probably on click.Context, for specifying where translations are and possibly to override the user's language as well.
From my experience with WTForms, maintaining the translations vastly complicates things. PRs come in at random making changes that are impossible to validate unless we have other trusted speakers of the language. Writing the API to manage translations at runtime is also complicated, I'm not sure if WTForms is a good example or not, and Django's implementation is even more complex.
In conclusion, I think this is good enough for now. It allows a project that wants to provide translations for their CLI to translate messages output by Click, without adding more maintenance to Click at this time.

I think ideally click actually shipped its own translations.. maybe we could have a public project on weblate or transifex to crowd-source the actual translations?

We should probably discuss that in a maintainer meeting. I don't have the bandwidth to maintain that, or even figure out how to implement it, so someone else would need to volunteer to do it long term. From maintaining WTForms, I know it's not straightforward to make sure everything's available to contributors installing locallay and when pushing builds.


#333 Moving dependencies to Dev dependencies

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please also include any acceptance criteria if you have any.

Made some dependencies to dev dependencies

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce
the testing if necessary.
Before PR's can be merged they will need to be tested by QA and approved where
applicable. To flag the change to QA assign @XGovFormBuilder/qa as one of the reviewers.

[ ] Build, run and run smoke tests

Checklist:

[ ] My changes do not introduce any new linting errors
[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes
[x] I have rebased onto main and there are no code conflicts

This change looks fine to me, codewise. But as this isn't a package that people download and install is there a massive need/benefit for this refactor?

Hi @RichardBray, any particular package you're concerned about, The issue linked to this MR might give some clarification #333

Reading the issue the code makes much more sense now. I was worried things were being moved around for preference but I wasn't aware unused packages were being installed and there was a desire to build a production only image of the project.


Pool margin fix

Closes: https://github.com/input-output-hk/cardano-node/issues/1063
Relevant issue: https://github.com/input-output-hk/cardano-ledger-specs/issues/1508

bors merge


Added Sonarr to list of supported apps

Really basic pull request. just to avoid user confusion.

Merged. Thanks!


Build Data selling functionality

As a user, I want to be able to easily switch data selling on, so that I can start to earn money.
Acceptance criteria: As a user, I can easily switch on data selling which allows me to make money from the choices that I've made.

This story depends on completion of the front-end ability to turn data on (design #174)

close. too vague. will create more specific stories.


Remove accumulo-test jar containing ITs from binary tarball assembly

I noticed while testing 2.0.0-rc2 that we still have the binary tarball assembly ship the accumulo-test jar. Since most of the useful downstream testing utilities are now in https://github.com/apache/accumulo-testing, this jar just contains our ITs... which isn't useful to ship in the tarball.
We should trim the fat and strip this out of any further releases after 2.0.0.

Is this as simple as removing the dependency in the assemble pom file or does there need to be more trimming?

Is this as simple as removing the dependency in the assemble pom file or does there need to be more trimming?

I think so, but I would do a build to check for warnings from the assembly plugin to be sure, and verify the output tarball. There may need to be changes to the assembly descriptor xml file, too... but maybe not.
The main reason for posting this here, was to solicit feedback. May want to start a discussion on the dev list before taking action, to be sure nobody objects.

Everything still seems to work as expected after doing a quick build and test. No warnings given.

@Manno15  - It seems like you may have done some work on this. Can this issue be closed?

@dlmarion Yes. It apparently was removed from the pom in #1517.


Property of datatype string[] is not recognized as a "vectorizable" property

If the schema contains a property of dataType string[] and this is the only property that is not excluded from vectorization, the schema will fail to load with the following error message (property names and class names are also not vectorized):
weaviate.exceptions.UnexpectedStatusCodeException: Create class! Unexpected status code: 422, with response body:
{'error': [{'message': "module 'text2vec-contextionary': invalid combination of properties: invalid properties: didn't find a
single property which is of type string or text and is not excluded from indexing. In addition the class name is excluded
from vectorization as well, meaning that it cannot be used to determine the vector position. To fix this, set 'vectorizeClassName'
to true if the class name is contextionary-valid. Alternatively add at least contextionary-valid text/string property which is not
excluded from indexing."}]}

Which version is this running on? I think this should be fixed in the latest RCs?

Happened on both the v1.8.0-rc.2 and 1.7.2

Ok, thanks, I was sure that we had fixed this. I'll investigate.

FYI: This is the issue that tracked this and the supposed fix was contained in v1.8.0-rc.2: https://github.com/semi-technologies/weaviate/issues/1673
Maybe we missed something, I'll get back to this after investigating.

@Micha using v1.8.0-rc.2 the following works fine for me:
curl localhost:8080/v1/schema -X POST -d '  {
            "class": "Test",
            "vectorizer": "text2vec-contextionary",
            "moduleConfig": {
                "text2vec-contextionary": {
                    "vectorizeClassName": false
                }
            },
            "properties": [
                {
                    "description": "NA",
                    "name": "name",
                    "dataType": [
                        "string[]"
                    ],
                    "indexInverted": false,
                    "moduleConfig": {
                        "text2vec-contextionary": {
                            "vectorizePropertyName": false
                        }
                    }
                }
            ]
        }
' -H 'content-type: application/json'
{"class":"Test","invertedIndexConfig":{"cleanupIntervalSeconds":60},"moduleConfig":{"text2vec-contextionary":{"vectorizeClassName":false}},"properties":[{"dataType":["string[]"],"description":"NA","indexInverted":false,"moduleConfig":{"text2vec-contextionary":{"skip":false,"vectorizePropertyName":false}},"name":"name"}],"shardingConfig":{"virtualPerPhysical":128,"desiredCount":1,"actualCount":1,"desiredVirtualCount":128,"actualVirtualCount":128,"key":"_id","strategy":"hash","function":"murmur3"},"vectorIndexConfig":{"skip":false,"cleanupIntervalSeconds":300,"maxConnections":64,"efConstruction":128,"ef":-1,"vectorCacheMaxObjects":2000000},"vectorIndexType":"hnsw","vectorizer":"text2vec-contextionary"}

Does your class differ from mine?

Give me an hour, I can test then

I have a class called Product that has two normal properties and one reference prop. Of the two normal properties, name is of type string but is not vectorized, the other is called brandSearchTags and is of type string[] - this property is vectorized.
This is the schema (at least the part that is giving the problem:
{
    "classes": [
        {
            "class": "Product",
            "vectorizer": "text2vec-contextionary",
            "moduleConfig": {
                "text2vec-contextionary": {
                    "vectorizeClassName": false
                }
            },
            "properties": [
                {
                    "description": "name",
                    "name": "name",
                    "dataType": [
                        "string"
                    ],
                    "indexInverted": true,
                    "moduleConfig": {
                        "text2vec-contextionary": {
                            "skip": true,
                            "vectorizePropertyName": false
                        }
                    }
                },
                {
                    "description": "brandSearchTags",
                    "name": "brandSearchTags",
                    "dataType": [
                        "string[]"
                    ],
                    "indexInverted": true,
                    "moduleConfig": {
                        "text2vec-contextionary": {
                            "skip": false,
                            "vectorizePropertyName": false
                        }
                    }
                },
                {
                    "description": "NA",
                    "name": "hasDescription",
                    "dataType": [
                        "Description"
                    ],
                    "indexInverted": true,
                    "moduleConfig": {
                        "text2vec-contextionary": {
                            "skip": false,
                            "vectorizePropertyName": false
                        }
                    }
                }
            ]
        },

This is the error message that I get:
weaviate.exceptions.UnexpectedStatusCodeException: Create class! Unexpected status code: 422,
with response body: {'error': [{'message': "module 'text2vec-contextionary': invalid combination of
properties: invalid properties: didn't find a single property which is of type string or text and is not
excluded from indexing. In addition the class name is excluded from vectorization as well, meaning
that it cannot be used to determine the vector position. To fix this, set 'vectorizeClassName' to true
if the class name is contextionary-valid. Alternatively add at least contextionary-valid text/string
property which is not excluded from indexing."}]}

I am using weaviate:1.8.0-rc.2


TC-1672 sqllite db init

@bxf12315, could you please provide a description for the purpose of this PR ?

@bxf12315 Thanks for creating this PR.
I couldn't find endpoints I could test and verify. If it is an error on my side could you please point me to which are the rest endpoints to be used?
If the endpoints are still to be done here are some ideas:

We can have an endpoint GET /user-preferences/selected-sboms that return an array of 0 to 4 elements. e.g.:

[
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
}
]

Each time the UI will need to update those 4 selected SBOM the UI can send a PUT request with the new 4 selected sboms. e.g. PUT /user-preferences/selected-sboms with a body like

[
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
}
]

The token always arrives to the backend and the backend could decode the token and extract the username or userid, or any other field that we might find appropriate.
It would be nice to have the whole thing done in this PR so we avoid having multiple PRs.
What do you think?

@bxf12315 Thanks for creating this PR. I couldn't find endpoints I could test and verify. If it is an error on my side could you please point me to which are the rest endpoints to be used?
If the endpoints are still to be done here are some ideas:

We can have an endpoint GET /user-preferences/selected-sboms that return an array of 0 to 4 elements. e.g.:

[
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
}
]

Each time the UI will need to update those 4 selected SBOM the UI can send a PUT request with the new 4 selected sboms. e.g. PUT /user-preferences/selected-sboms with a body like

[
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
},
{
"sbom_id": "abcd",
"sbom_name": "xyz"
}
]

The token always arrives to the backend and the backend could decode the token and extract the username or userid, or any other field that we might find appropriate.
It would be nice to have the whole thing done in this PR so we avoid having multiple PRs.
What do you think?

I added  endpoint and helm change, helm needs test.
I think we do not needs add special one like selected-sboms, The user_preferences is a whole, and we only need to access the entire user_preferences by using the ID.

Or rather than:
{
  "sbom1":  "my_sbom_id_1",
  "sbom2":  "my_sbom_id_2",
  "sbom3":  "my_sbom_id_3"
  "sbom4":  "my_sbom_id_4"
}

we could use:
{
  "sbom1_id":  "my_sbom_id_1",
  "sbom2_id":  "my_sbom_id_2",
  "sbom3_id":  "my_sbom_id_3"
  "sbom4_id":  "my_sbom_id_4"
}

@bxf12315 may I ask you please to synchronize this branch with the latest changes of the main branch?

@bxf12315 may I ask you please to synchronize this branch with the latest changes of the main branch?

@bxf12315 may I ask you please to synchronize this branch with the latest changes of the main branch?

Done

@mrizzi After my previous comment are addressed I was planning to squash and merge this PR. Is there anything you would recommend in regards to the changes to the helm chart done in this PR? I can see the gh tests of helm is failing and acknowledge the fact that you worked on the helm charts more than me so your opinion would be very welcome


Task: Get repository working from 'main' branch.

[x] Tag current master branch to archive state before merge.
[x] Per generally accepted guidelines for git naming, rename 'master' --> 'main'.
[x] Merge 'uptane_docusaurus' into 'main'
[x] Fix CI workflows to point to 'main' instead of 'uptane_docusaurus'
[x] Configure github to serve page from 'main' branch.
[x] Set default branch to 'main'

Complete. Working now. For people working on the tickets, we may need to notify them to make pull requests to the 'main' branch.

Phil I think as you have admin level access you now can directly change the
branch to the main for those PRs, I think there should be an option at
the top under every PR
On Mon, 30 Oct 2023, 18:37 Philip Lapczynski, @.***>
wrote:

Closed #112 https://github.com/uptane/uptane.github.io/issues/112 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/uptane/uptane.github.io/issues/112#event-10807481161,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APLHP3VYN2KDSCVK52OEUYLYB6RBVAVCNFSM6AAAAAA6V5ZLZ2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHAYDONBYGEYTMMI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@Abhijay007 - looks like I have the power! Thanks for pointing that out.


CfnPrivateEndpoint for a dedicated cluster or serverless instance

According to the document, the private endpoint could for a dedicated cluster or a serverless instance.
Looking at CfnPrivateEndpoint, it's not clear to me how to control if it's provisioned for a dedicated cluster or a serverless instance.
If I create a PrivateEndpoint like this:
  EndpointEEF1FD8F:
    Type: MongoDB::Atlas::PrivateEndpoint
    Properties:
      Profile: my-mongo-profile
      GroupId:
        Fn::GetAtt:
          - ServerlessInstanceprojectServerlessInstanceFFBB5263
          - Id
      Region: us-east-1
      PrivateEndpoints:
        - VpcId: vpc-1f5b7e78
          SubnetIds:
            - subnet-071c85610846aa9c0
            - subnet-0ef7ac49e1edb06e4
            - subnet-0e2177a10a166f87d

And check the console, it 's actually a private endpoint for a dedicated cluster.

Please clarify how to create a private endpoint for a serverless instance instead.
To Reproduce
Steps to reproduce the behavior:
Create the CfnPrivateEndpoint as provided in:
https://github.com/mongodb/awscdk-resources-mongodbatlas/blob/257987ec6132bdffaf929fe8c9a80b7936e3ffd9/examples/l1-resources/private-endpoint.ts#L13-L30
Expected behavior
To clarify how to control whether it's for a dedicated cluster or a serverless instance.
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following information:

CFN resource version
AWS region where you are running the CFN stack
CDK constructor type and version
Copy of the output of cdk synth

Additional context
Add any other context about the problem here.

hello @pahud we have the Serverless Private Endpoint in a separated resource, we are planning to start with the development within the next weeks.

@Adelmar92 Awesome! I got it. Thank you.

hello @pahud i inform you that the CloudFormation resource and CDK named MongoDB::Atlas::ServerlessPrivateEndpoint has been already deployed

@Adelmar92 When will this be published? The issue is closed, but currently the problem still exists. Current version 1.2.0 does not offer a CfnServerlessPrivateEndpoint. Please advise.


[WAS-518] - Updated AWS setup script

I updated the setup script. Previously we were storing the WAS details on local files. I added an S3 bucket to store values for --delete operation.

Upgraded Dockerfile/kubectl version to 1.24
Added an S3 bucket as <CLUSTER_NAME>-creds-<ACCOUNT_ID>
It stores

GET_CLUSTER_NAME
GET_REGION
TERRAFORM_BUCKET
MINIO_ACCESS_KEY
MINIO_SECRET_KEY
DYNAMODB_TABLE:
EFS_FS_ID
RESOURCE_INFO_BUCKET
NODE_FILES_BUCKET
BASE_URL
RESOURCE_MANAGER_URL
NODEFILES_MANAGER_URL
ENDPOINT_MANAGER_URL
ENDPOINT_INFO_URL
RESTART_URL

values.

Added an option for the script as --get-creds to check the current values.

I couldn't reproduce EKS removing issue but it seems there is no error in the script now.
☑☑☑□□ Phase 3 of 5: Delete Dependencies
Deleting Ingress Controller                                             [  ✔  ]
Deleting Metrics Server                                                 [  ✔  ]
Deleting Cluster Autoscaler                                             [  ✔  ]
Deleting all namespace resources                                        [  ✔  ]
Deleting EFS Storage System                                             [  ✔  ]

☑☑☑☑□ Phase 4 of 5: Delete Amazon Kubernetes Cluster (EKS)
Deleting EKS                                                            [  ✔  ]

☑☑☑☑☑ Phase 5 of 5: Cleanup
Deleting Terraform S3 Bucket                                            [  ✔  ]
Deleting Dynamodb Terraform Table                                       [  ✔  ]
Cleaning Configuration - Resetting Back To Default                      [  ✔  ]

Deleted EKS Cluster and Wolfram Application Server. Our warmest appreciation to you for running Wolfram Application Server on Amazon environment. Thank You!

[sudo] password for cenka:

This is tested. Good to go.

Merging this pull request as these changes are released along with the 3.1.4 version


Update applocal.ps1

Fix #2801 , chinese char path fail

Thanks for the PR!
I don't totally understand the problem this fixes, and this doesn't currently work on my machine:
D:\src\vcpkg> set-content -path foo.txt -value "" -encoding UTF
Set-Content : Cannot bind parameter 'Encoding'. Cannot convert value "UTF" to type "Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding". Error: "The identifier name UTF cannot be processed because it is either too similar or identical to the following enumerator names: UTF8, UTF7, UTF32. Use a more specific identifier name."
At line:1 char:47
+ set-content -path foo.txt -value "" -encoding UTF
+                                               ~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-Content], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SetContentCommand

The created file in this case is blank regardless of the -encoding setting, so I don't see how this could possibly fix any issue. Is the issue that $copiedFilesLog has chinese characters in the path?

sorry, the correct value is UTF8
PS C:\Users\xiali.000> set-content -path foo.txt -value "" -encoding UTF8
PS C:\Users\xiali.000>

Hi @shadowxiali
There are some concerns regarding this change, see comments on #5301.
Explicitly, do you know if these changes introduce Byte Order Marks?

Thanks for this PR!


Medical hud isnt working

Description

Medical hud isnt correctly working, No health is being displayed.
Reproduction

Get medical hud
Equip medical hud
No health bars above people.
Screenshots

Additional context

Hello!

lmao

dupe btw https://github.com/space-wizards/space-station-14/issues/4967

Medical HUD’s functionality is not coded yet.


Issue220

solving issue #220 and #231 at the same time

Hi @shajoezhu , thanks for submitting this.  Run the scripts/run_tests.py script locally to run the same tests that Travis CI does.  It both enforces code style and runs the tests to make sure there are no regressions.  Once those tests are passing, your code will be a bit easier for us to evaluate.  Also, you are going to need to squash your commits down to one commit before we are going to be able to merge your change.

This is a great start, thanks @shajoezhu. Some comments:

The code needs to be PEP8 compliant before it will pass the tests. You can check if your code passes the tests by running python scripts/run_tests.py.
We're using camelCase for all variables in this project. This is because the protocol itself uses camelCase, so we're pretty much stuck with it (having a mixed camelCase and snake_case project is not much fun for anybody). Please change all the variables to use camelCase.
Please clean up any stray print()s or commented out code lines.
Please squash commits down to one commit by rebasing against upstream/master.

Travis is not happy :(

-0: This needs a complete, self-contained description.
From the commit history, it's not clear whether you're trying to solve #220 or #231 (or both).

Joe and I are working through this one @Naburimannu, hopefully it'll be ready for general review soon.

Thanks Jerome - look forward to it :)

Looks great, thanks @shajoezhu!
+1.

(This is ready for wider review BTW - can you have a look now please @Naburimannu?)

@dcolligan, can you review this please?


use route as root span name in hapi instrumentation

Is your feature request related to a problem? Please describe

Currently the root span name is set by the http instrumentation to a generic name like HTTP GET. Additionally, http.route of the root span is set to the actual http pathname and not the route. So, something like http.route: /events/123 instead of http.route: /events/{eventId}.
This makes traces hard to identify (in Honeycomb in this case):

The actual hapi route is buried somewhat deep in the trace:

Describe the solution you'd like to see

Similarly to the way it's done for Koa (#327) and Express (#176, #273) the root span name should be renamed once the route has been determined and http.route should be set to the actual route at that point.
Describe alternatives you've considered

None
Thank you for your work on OpenTelemetry and all these instrumentations :)

hi,
I would like to work on this.

hi,
I would like to work on this.

assigned, thx


Step 1 for multi language page

Reading English content from en.json

Multi-language flow implemented and working for French, Korean and Thai


Fix website deployment

After the last QUnit release, I updated the website but it has not deployed properly. I investigated the webhooks, but the ones responsible for deploying the website have all return 202 statuses. After a few spaced out retries, it is still saying "Accepted" but not deploying.
@gnarf any chance you can help out here? I know you had fixed our issue last time something similar happened.

This has been resolved.


100% CPU usage when working with a high number of workspaces

We noticed a flaw in the Java SDK. When interacting with a large number of workspaces, the rate-limiting algorithm consume 100% CPU. After profiling our server we noticed that 96% of the CPU is spent on BaseMemoryMetricsDataStore$MaintenanceJob.run(). Particularly the methods updateCurrentQueueSize and updateNumberOfLastMinuteRequests. I believe this is because our app deals with a large number of workspaces (~8,000) and the maintenance job runs every 50ms.
As a temporary solution, we are considering turning off stats on MethodConfig.
Any other suggestion to mitigate/fix the issue?
The Slack SDK version
1.18.0
Java Runtime version
(Paste the output of java -version)
OS info
Linux
Steps to reproduce:
Create an app that unfurl links from ~8,000 workspaces.
Expected result:
Reasonable CPU usage.
Actual result:
100% CPU usage after running for 16h.
The CPU usage progressively increases until the server restarts.

Hi @sidneyamani, thanks for writing in! Also, being installed into 8K workspaces is quite fantastic 👏

As a temporary solution, we are considering turning off stats on MethodConfig.

Yes, you're right. Changing the option should mitigate the issue for you. The downside is that, if your app relies on the smart rate limiter that MethodsClient offers, your app may start having rate-limited errors for heavily used Web API endpoints (especially Tier 1 and Tier 2 ones).

Any other suggestion to mitigate/fix the issue?

This should be definitely improved on this SDK side. I'm thinking of adding a few more options to customize/optimize the behavior to cover your great use case. Let me share a few points in my mind right now:

For managing a large-scale metrics data, we recommend the Redis backend implementation. However, the one also has the same issue as of v1.18. We will add a new option to enable developers to run the metrics data maintenance job in an offline host, which does not handle incoming requests from Slack. This should be available for the use cases like yours.
If statsEnabled is false (like your workaround), the background cleanerExecutor job should be disabled too. We may want to have a kind of NoopMetricsDatastore for the use case.

Let us know if you have any other suggestions or comments. If everything goes well, we will come up with pull requests for improvements and ship a new version by the end of this week. I hope this timeline works for you.

Hey Kazuhiro,
Thanks your quick reply.

We will add a new option to enable developers to run the metrics data maintenance job in an offline host, which does not handle incoming requests from Slack. This approach needs be available for the use cases like yours.

We should be able to setup an offline host to achieve run the maintenance job. However, I'm afraid that running that task every 50ms may lead  lead to a similar outcome.

Let us know if you have any other suggestions or comments.

I don't understand the role of the maintenance job enough to suggest anything with confidence.
There a few things I find surprising though:

The 50ms interval seems short and arbitrary. Is there a reason the job needs to be run so frequently? Would making the interval configurable make sense?
Every maintenance job run goes through all the known (workspace, method-name) pairs that may have had a requests and update their number of requests and current queue size.  Could we instead maintain a set of (workspaces, methods-name) pairs for which a request was seen since the last maintenance job run and only process these?

If everything goes well, we will come up with pull requests for improvements and ship a new version by the end of this week. I hope this timeline works for you.

Thanks so much for being so responsive.

@sidneyamani Thanks for your quick reply.

The 50ms interval seems short and arbitrary. Is there a reason the job needs to be run so frequently? Would making the interval configurable make sense?

Yes, this is so true. I forgot to mention this in my last reply but I'm planning to revisit the internal and also make it configurable. Just to share the context, the reason why I chose the extremely short period for this is to support all the tiers even including the chat.postMessage special tier. That being said, the 50ms was just decided by my testing results with a small number of installations, without a great consideration for scalability.

Every maintenance job run goes through all the known (workspace, method-name) pairs that may have had a requests and update their number of requests and current queue size. Could we instead maintain a set of (workspaces, methods-name) pairs for which a request was seen since the last maintenance job run and only process these?

This is also a great suggestion! I'll add this optimization as well.
Thanks for these great inputs!

Thanks for being patient about this issue. I just submitted a pull request eliminating this issue #934 .
While reviewing the current implementation again, I concluded that we don't need to run the background maintenance thread every 50 milliseconds at all. I've changed the default interval from 50 to 1,000 milliseconds in the PR. Also, I've improved the logic to skip the team IDs that don't have any updates since the previous maintenance execution (thanks for the suggestion!).
With these changes, the CPU usage issue here should be completely resolved (or at least significantly improved) even with the default settings. If a developer would like to adjust the interval / prefers the previous behavior, now it's also possible to set their own custom values to metrics datastore in constructor.
I haven't observed any critical downside by the change so far. The only impact should be that the rate limiter can be slightly modest about API execution in a burst-traffic situation.
@sidneyamani
I just published the latest revision including the changes in the PR as 1.19.0-SNAPSHOT: https://oss.sonatype.org/content/repositories/snapshots/com/slack/api/slack-api-client/1.19.0-SNAPSHOT/
If you have a chance to try it out, your feedback would be greatly appreciated. Either way, we are going to release v1.19.0 including the fix within two business days.

Thanks so much for fixing the issue.
FYI, we noticed that disabling stats doesn't make much of a difference (with version 1.18.0). The CPU usage still increases linearly as the number of workspaces goes up.
We are looking forward to trying the new SDK (1.19.0). Unfortunately, given our release process we won't have time to test the new SDK before its release, but I'll definitely give you an update once we have 1.19.0 running on our production environment.

@sidneyamani

FYI, we noticed that disabling stats doesn't make much of a difference (with version 1.18.0). The CPU usage still increases linearly as the number of workspaces goes up.

Thanks for sharing this. I will look into the logic more to identify the reason of this.
By the way, does your app use only MethodsClient? Aren't SCIMClient and AuditClient used?

Hi @sidneyamani, I've merged the PR #934 and released a new version - v1.19.0 onto the Maven Central repository.
I hope the version works very well for your app. Also, if the default configuration isn't great enough for you, you can adjust the behavior by:

Set rateLimiterBackgroundJobIntervalMillis to a longer value than 1,000 milliseconds (the default)
statsEnabled: false to either SlackConfig or MethodsConfig etc.
Refer to the release note for more details. https://github.com/slackapi/java-slack-sdk/releases/tag/v1.19.0

The first one won't cause any big problem. The only downside would be the rate limiter in this SDK can be more conservative on the intervals between the same API calls. As for the second one, with this way, your app will be responsible for handling rate-limited error patterns.
Thanks again for reporting this issue. I hope the fix I applied this time helps.

Hey Kazuhiro,
Thanks so much for the fix. We've been running it in production for a week and the CPU is sitting around 10% now. The CPU still increases linearly but the slope is a lot gentler. We haven't reenabled stats yet though. I'll let you know if reenabling stats causes leads to any unexpected behaviour.


Does not seem to support multiple auth guards

I have a channel that is private which 2 model types can access.
Let's say I have a Teacher and a Student Model.
Now both Teacher and Student can access the ClassRoom channel but the server wont work correctly if the Student and the Teacher have the same ID;
PresenceChannel.php
// The ID of the user connecting
$userId = (string) $channelData['user_id'];

This means functionality like joining, here and leaving wont work correctly.
To test this out, I altered the subscribe methods to the following;
// The ID of the user connecting
$userId = (string) $channelData['user_id'] . isset($channelData['user_info']['id']) ? '_' . $channelData['user_info']['id'] : '';

Which resolved the issue.
I've not been unable to unearth where $channelData['user_id'] is defined whether it be in the Echo lib, Laravel's channel auth or in your package and was hoping for some guidance in where this is located?

You have to use the presence channel like Laravel explains, but you will be altering the id parameter, like adding student: or teacher: before the ID and removing them if you want to process them further. See docs here: https://laravel.com/docs/8.x/broadcasting#authorizing-presence-channels

Sorry but this should not be closed. Returning data from the channel auth only alters the data from the user_info value, user_id remains the same as the authenticated model.
This, however can be achieved by overriding some of the packages classes outlined below;
Firstly, in the config/websockets.php file, the channel_manager needs to be overridden;
/*
 * Channel Manager
 * This class handles how channel persistence is handled.
 * By default, persistence is stored in an array by the running webserver.
 * The only requirement is that the class should implement
 * `ChannelManager` interface provided by this package.
 */
 'channel_manager' => \App\WebSockets\ArrayChannelManager::class,

The new ArrayChannelManager class should override the default determineChannelClass method;
<?php

namespace App\WebSockets;

use App\WebSockets\Channels\PresenceChannel;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\Channel;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManagers\ArrayChannelManager as LaravelWebSocketsArrayChannelManager;
use BeyondCode\LaravelWebSockets\WebSockets\Channels\PrivateChannel;
use Illuminate\Support\Str;

class ArrayChannelManager extends LaravelWebSocketsArrayChannelManager implements ChannelManager
{
    /**
     * @param string $channelName
     * @return string
     */
    protected function determineChannelClass(string $channelName): string
    {
        if (Str::startsWith($channelName, 'private-')) {
            return PrivateChannel::class;
        }

        if (Str::startsWith($channelName, 'presence-')) {
            return PresenceChannel::class;
        }

        return Channel::class;
    }

}

This method should return a newly defined PresenceChannel class;
<?php

namespace App\Utils\WebSockets\Channels;

use Ratchet\ConnectionInterface;
use stdClass;

class PresenceChannel extends \BeyondCode\LaravelWebSockets\WebSockets\Channels\PresenceChannel
{

    /**
     * @param ConnectionInterface $connection
     * @param stdClass $payload
     * @throws \BeyondCode\LaravelWebSockets\WebSockets\Exceptions\InvalidSignature
     */
    public function subscribe(ConnectionInterface $connection, stdClass $payload)
    {
        $this->verifySignature($connection, $payload);

        $this->saveConnection($connection);

        $channelData = json_decode($payload->channel_data, true);

        // The ID of the user connecting
        $userId = $this->getUserId($channelData);

        // Re-set the user id in case it changed in the `getUserId` method
        $channelData['user_id'] = $userId;

        // Check if the user was already connected to the channel before storing the connection in the state
        $userFirstConnection = ! isset($this->users[$userId]);

        // Add or replace the user info in the state
        $this->users[$userId] = $channelData['user_info'] ?? [];

        // Add the socket ID to user ID map in the state
        $this->sockets[$connection->socketId] = $userId;

        // Send the success event
        $connection->send(json_encode([
            'event' => 'pusher_internal:subscription_succeeded',
            'channel' => $this->channelName,
            'data' => json_encode($this->getChannelData()),
        ]));

        // The `pusher_internal:member_added` event is triggered when a user joins a channel.
        // It's quite possible that a user can have multiple connections to the same channel
        // (for example by having multiple browser tabs open)
        // and in this case the events will only be triggered when the first tab is opened.
        if ($userFirstConnection) {
            $this->broadcastToOthers($connection, [
                'event' => 'pusher_internal:member_added',
                'channel' => $this->channelName,
                'data' => json_encode($channelData),
            ]);
        }
    }

    /**
     * Get the correct prefix based on the user data
     * @param $channelData
     * @return string
     */
    protected function getUserId($channelData)
    {
        if(isset($channelData['user_info']['identifier']))
        {
             return $channelData['user_info']['identifier'] . ':' . $channelData['user_id'];
        }

        return (string) $channelData['user_id'];
    }

}

Here, we define a new method getUserId($channelData), which checks to see if an identifier element is passed from the channel authentication closure. If it is, prepend it and then re-define the user id value in the $channelData array.

Package 1.x or 2.x?

Currently using ^1.8.

After more digging to get this working with v2 I was able to see that the above can be achieved by simply overriding a method on each of the models;
/**
 * @return mixed|string
 */
public function getAuthIdentifier()
{
    return 'candidate:' . $this->{$this->getAuthIdentifierName()};
}

This returned value will be used when populating the user_id value. It also does not appear to disturb and of the auth functionality.

@lukesnowden  with this solution my application breaks
becouse it retrun
auth()->id()  // candidate.1

auth()->user()->id // 1

so everywhere we need to change auth()->id() to auth()->user()->id

better use
public function getAuthIdentifierForBroadcasting()
{
return 'candidate:' . $this->{$this->getAuthIdentifierName()};
}


Feature: Kata creation in pairs (or groups)

Feature
Ability to create katas in pairs or groups so multiple people can participate on creation of a single kata.
Rationale
Many newbies on Codwars creates new katas which are rather simple or are duplicates. IMHO more experienced users should rather help them to create something more interesting (or supervise them) instead of telling them (or complaining) about duplication. However, there isn't an easy way to do it.
Implemenation
I don't have a precise idea how this should be implemented so let's discuss it here :)

I would think this could be done using the kumite interface. Basically you could start a kumite, go back and forth and once its ready you would create a kata from the kumite, causing the kumite to become private so that the answer isn't visible anymore.

Thanks @jhoffner you're right I'll try it out next time and write about my experience.
Regards,
suic


JobName as .sql file in config file

It would be nice to have the ability to address a .sql query file as JobName in config file.

Hello @diegomsg ,
thanks, for the suggestion. What is your usecase? What is preventing you from sourcing a query from a file using the tools of your shell. E.g. bash:
odbc2parquet --dsn test_db out.par "$(cat query.sql)"

Great. Didn't try this before.
Didn't even know that I could call file content inside function with "$(cat query.sql)"
Had just a few problems withe commented .sql files using -- characters. Searching how to fix without reviewing all queries. Some help with that?
The queries are used in sqlcmd batch scripts.

How about parsing them and emitting them without the comments?
import sqlparse

sql_example = """--comment
SELECT * from test;
INSERT INTO test VALUES ('
-- test
a
');
 """
print sqlparse.format(sql_example, strip_comments=True).strip()

Taken from this Stack Overflow Question: https://stackoverflow.com/questions/5871791/howto-clean-comments-from-raw-sql-file
BEST, Markus

Thanks.
I was able to query to parquet using your tool in windows terminal.
odbc2parquet query --dsn $odbc_connected_server output_file.par "$(Get-Content ($query_folder + '\' + $query) -Encoding utf8)"
The comments inside sql queries were striped using R, rewriting multiple files
`
library(stringr)
library(purrr)
Define function
remove_comments <- function(file_path) {
Read files
sql_text <- readLines(file_path, encoding = "latin1")
Remove comments
sql_text <- str_remove_all(sql_text, "--.$")
sql_text <- str_remove_all(sql_text, "/\.?\/")
Uncommented files
return(sql_text)
}
Define folder
folder_path <- "complete\folder\path"
List sql files in folder
sql_files <- list.files(folder_path, pattern = "\.sql$", full.names = TRUE)
Remove comments
sql_texts <- map(sql_files, remove_comments)
Write to files
walk2(sql_files, sql_texts, ~writeLines(.y, .x))
`


Patch useLocalStorage setting the right initial value to avoid a hydration error

fixes #340 (if we want to fix it with a patch to usehooks-ts)

It doesn't work for me too. But it works if I copy-paste hook to hooks directory and change storedValue to initialValue
And it shows initial value for some milliseconds
https://github.com/scaffold-eth/scaffold-eth-2/assets/25638585/3999f6b8-2c78-4c6a-aecf-adeca00ffa56

@damianmarti yes
I found solution: yarnpkg/berry#4231 (comment) this helped. If I change resolutions to<EMAIL_ADDRESS>"patch:usehooks-ts@npm:^2.7.2#./.yarn/patches/usehooks-ts-npm-2.7.2-fceffe0e43.patch" it works

I'm not sure about it. Maybe @sverps @carletex or @technophile-04 have something to say...

I had the same issue as @rin-st , seems like the patch generated a faulty resolutions line (with a url-encoded ^ sign, rather than the actual one). I committed the fix from @rin-st , I think we can merge it like this :+1:

It works! Thank you all!