GTP: Go Text Protocol

We need to be able to understand 👂  and "speak" 🗣  GTP.

GTP at Sensei's Library
Commands section at the official specification page
Command references at the GNU GO Documentation

GTP is supported by various clients and engines. GNU GO seems to be the go-to choice if we want the quasi-standard. So it seems a good idea to find out how GTP works by playing around with it in GNU GO.
Download source files for GNU GO from this site (direct download link for gnugo-3.8.tar.gz).
Build gnugo by running ./configure, then make, then make install. Now you can start GNU GO in the terminal using gnugo. To start it in GTP-mode use gnugo --mode gtp. Now you have to use GTP-commands, see some commands to try out at the bottom of the Sensei's Library GTP site.
🤔  What makes me wonder, there seems to be no support for turn-by-turn management in GTP. There is no method get_current_player or something like that. black can just submit arbitrarily many moves without getting an error like "it's not your turn". Either I haven't found the option to turn this on yet, or it'd be our task to create a game controller logic around it.

I wrote Gunnar Farnebäck (he is hosting the GTP specification page) about this lack of turn-by-turn management in GTP. His response:

The idea is that a controller asks the two players for moves alternately and drives the entire process. The players have no way to submit moves or query anything. They can only receive information from the controller and respond to commands to generate a move.
It is of course possible to integrate the controller with one of the players if it should be inconvenient to have a separate controller but that doesn't change the mental model.


Log sources

Overview
Print out the sources for each person, event, and bill on their respective detail page.
Checklist

[ ] PR has a descriptive enough title to be useful in changelogs

Demo

Testing Instructions

Navigate to the detail page for a person, event, or bill
Open the console to check if it's source has been printed
Follow link(s) present

Handles #910

At time of writing, I haven't been able to test bill detail pages. The thought is that I need the secrets file for my scraper.

Superseded by #940


Upgrade alidns to eliminate mod error

Codecov Report
Patch coverage is 100.00% of modified lines.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Files Changed
Coverage

cmd/builder/utils/context.go
100.00%

cmd/builder/utils/env.go
100.00%

cmd/builder/utils/validation.go
100.00%

:loudspeaker: Thoughts on this report? Let us know!.


Add bower support

Using impress.js is easy and I can download the source code to edit my presentation. But I have to go to github and search impress.js every time I want to make a presentation. I find out the better way to download the code with bower install impress.js.
It's much easier than git clone https://github.com/bartaz/Impress.js or click the button and uncompress the file. It would be great to add these in readme so that everyone knows how to use the source :smiley:

Hi @tobegit3hub, in an effort to clear up older issues/PRs we are pinging back to know if you are still tracking this request.
To give a little bit of context, recently a decision was made in the project to make the development more active and the first task is to clear up older issues like this one to see if the OP is still interested in keep it going.
I edited the title for better SEO, this request seems to be related to bower support.

I edited the title for better SEO, this request seems to be related to bower support.
I guess we don't need to wait for feedback to close this issue, since the project already supports bower, see https://github.com/impress/impress.js/blob/8e4888385355059d60b608a19245bd300752bb86/bower.json

Great. Thanks @FagnerMartinsBrack :smiley:


Fix image size in PDF post export

What type of PR is this? (check all applicable)

[x] Refactor
[ ] Feature
[x] Bug Fix
[x] Optimization
[ ] Documentation Update

Related Issue #226
Closes #226

Screenshots, Recordings

Tested Feature??

[x] In Real Device.
[x] In Emulator

Hi @vaishnavi-2301 , the reason for converting from delta to markdown and then to HTML was i couldn't find a library which directly converts from delta to HTML. The library handles lot of formatting stuff which would be difficult to write manually. If you remove that part, lot of other formatting like headings, lists, .. won't work.


Sync state

Add a new method which will allow to synchronously do a set state, e.g.
this.setStateSync({val:x})
or replace old asynchronous method with this one.
more details in the RFC.
PS. I apologize, due to some circumstance change, I might not be able to keep an eye on RFC but I will still leave it here, maybe someone will make a new pull request out of it and keep working with that.
PPS. I plan to cancel my account and since I am not sure if that will also delete my pull request I will leave a copy of the RFC here too.
I apologize if I caused inconvenience.

Start Date: (2017-12-15)
RFC PR: (leave this empty)
React Issue: (leave this empty)
Summary
Add support for synchronous state in React: (1) Either replace the existing asynchronous setState method, or (2) Add a new function which should synchronously set state.
Basic example
this.setState({val: newVal}) // Now react should synchronously update state instead of asynchronously
or
this.setStateSync({val: newVal}) // Now react should synchronously update state instead of asynchronously
Motivation
The motivation is that it is much easier to reason about application state when the function which modifies state does this synchronously.
Nobody will disagree that react's asynchronous setState has caused lot of confusion among developers.
Even given the solution react has - like setState with a function(which gives access to a so called "pending state"), still doesn't prove that there can't be any gotchas (or edge cases) when managing state asynchronously.
Ask people why are they using mobx for example.
Drawbacks
Honestly I can't think of any drawbacks which would outweigh the advantages that synchronous setState would have.
Adoption strategy
If you directly change the existing setState with a synchronous one this seems like a breaking change, if you add a new synchronous setState function this doesn't seem to be a breaking change.
How we teach this
It will be much easier to teach about it than the existing asynchronous setState.

Can you revert your first commit (https://github.com/reactjs/rfcs/pull/9/commits/a0a8563c8af5c7fe2c4e6f764b37412339a99f0d) please? I think they’d like to keep the template for future RFCs.

@j-f1 what will happen with rfc doc I created then in that case? (I am not very seasoned in git)

Async state one of the major performance boosts in the React, When I asked about this in the past my request was rejected from Dan Abramov by explaining to me how should I correctly update the state, then I didn't faced any problems with the state management

I'd like to push back on this RFC just a bit. Async state is a huge performance boost to React overall. A synchronous state setter would block the thread, and that's not something we really want to do. You may have many other components competing for resources at the same time and being able to defer computation is a big win.
I will agree that setState has been confusing for many people, but there are very few quirks in React to know about. I think knowing that setState is async and has two function signatures is an acceptable quirk to have. Learning how to use these two signatures appropriately is important for React devs and honestly something I believe every person using React should know. Personally, I'd rather improve education on the topic than create a third method and force people to understand all three.
Lastly, not many computations in setState should be synchronous in general. You should be able to write your functions in such a way as to derive your future computations based on the current state and what you wish to do. If, you need synchronicity, this is where the second argument callback is useful, as it will essentially act as a means of making the nextState available to you since we know it will have been computed by the time the callback is fired. If you are chaining many computations in the callbacks of setState, it may be a code smell. There is probably a better architecture available to solve your problems.

referring to setState callback which @kyleshevlin mentioned.
In this example

 constructor(props)
  {
   super(props);
   this.state={val:0}
  }

  click(){
    this.setState({val:1}, ()=>{console.log(this.state.val)})
     this.setState({val:2})
  }

Say you want to get value on console but are interested in that only when you assigned 1 to value - hence the callback. What will be output in your opinion of above code? answer: 2.
So is this not confusing that user might have thought that hey in setState I am assigning value 1, now I specify a function in callback which should fire when the value is set to 1. However, in reality that function is called when value was assigned 2.
Isn't that confusing?
Maybe those are the kind of things OP referred to.

@david-jam I meant that you could nest another setState within your callback. The way you have written that, someone who knows and understands React would know that the objects { value: 1 } and { value: 2 } would be merged into one object before the update occurs.

@kyleshevlin then it is a bit confusing why tie a callback with a particular function invocation if that callback might not be called when the function change takes effect e.g. like with
   this.setState({value:1}, ()=>{console.log(this.state.val)})
I am just saying naively a user might be expecting hey, I called set state and this is callback I want to fire when the value I specified in set state is set. otherwise why not just use componentDidUpdate?

@david-jam Using setState callback should not be naive. It's advanced feature which is not required in regular code (I used it twice in large applications).

@TrySound so you say it is not possible to arrive at a gotcha situation with current approach of async react state management? (that you would not arrive with a sync state). I am asking out of curiosity not criticizing someone or smth.

@david-jam I wouldn't say it's difficult, however it requires some knowledge about how API works. That's I meant as "naive". Just follow rules and nobody will get hurt.

@TrySound even if you know how API works I think it is beyond doubt that it is easier to manage app state when that is synchronous.

Easier !== better. Programming is hard AFAIK. But if you know things you CAN work with them.

@TrySound of course easier is better in this case, why introduce unnecessary complexity? Anyway we are heading in a different direction now so I will finish of my discussion here with this comment.
I don't have specific example which would show that in some situation using async set state could cause bug - or would not be suitable for some situation. If such cases don't exist, good for react. But I am not sure.

Here's the thing. It's necessary complexity for future react features.

To sum this up:

React state is intentionally set asynchronous: https://github.com/facebook/react/issues/11527#issuecomment-360199710. This is part of the reason React is fast enough for most use cases. We don't want to regress on that.
For corner cases where you need to force a sync render due to some browser API, there is ReactDOM.flushSync(() => { /* call setState here */ }).
Regardless, with Hooks setting state synchronously still wouldn’t update the captured values, negating the original motivation.

Therefore, closing.


python310Packages.python-homewizard-energy: 1.1.0 -> 1.1.1

Description of changes
https://github.com/dcsbl/python-homewizard-energy/releases

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 198087 run on x86_64-linux 1

3 packages built:

home-assistant-component-tests.homewizard
python310Packages.python-homewizard-energy
python39Packages.python-homewizard-energy


Use Guava HashMultiset

Guava's HashMultiset class would make it much faster to preprocess text. I'd suggest converting the raw tokens from languagetool to a HashMultiset before any further processing, and using the entrySet() method to process each distinct token only once during normalization, filtering etc.

I intentionally started with the mindset of not putting in to many dependencies. But if people are interested in performance (outside of better data structures/algorithms), I'd probably hook in GS collections (now Eclipse collections) :)

Coming back to this, I now realize I misunderstood your initial intent. I realize you were talking about the normalization phase and NOT optimizing the tokenization phase. It should be pretty straight forward to speed that part of the code base up. I'll look into it. :)


API Add an AttributesHTML trait

This idea emerged out https://github.com/silverstripe/silverstripe-assets/pull/458#discussion_r663646460
The idea is that we would extract common pattern into trait to make them re-usable and reduce code duplication.
Parent issue

[ ] https://github.com/silverstripe/silverstripe-framework/issues/10032

I've fix the linting issues and rebased with the 4 branch.


Update zone configuration for gcloud setup

The nvidia-tesla-p100 accelerator is not available in the gcloud us-west2-b zone, but is available in the us-west1-b zone (see https://cloud.google.com/compute/docs/gpus/#gpus-list). Not sure when this changed. Therefore, it appears that the us-west1-b zone should work for both regular and budget set-up options.

Thanks for the tip :)


Video call triggers again (Jitsi self-hosted)

My Setup

Operating System: Manjaro Linux 5.8.16-2
App Version: 3.0.4
Installation type: pacman

[x] I have tested with the latest version
[x] I can simulate the issue easily

Description
I started a video call in the evening (say 9 pm). I end the call with the hang up button in jitsi and leave the tab open (see screenshot). Then I put my computer to sleep overnight. The next morning my friend gets a new call.

It also shows me that I started a call, which I did not.

Expected Behavior
Only trigger the call when the button to call is actually clicked.

I experienced same issue, but I think it's Rocket Chat server issue, because in my case RC RM application was involved.

@ankar84 as the client that triggerd a new call? or did it just show the call?

@ankar84 as the client that triggerd a new call? or did it just show the call?

Actually few clients of my server experienced that issue, not me.
And as I understand, there was a call in mobile application, call was finished. And after some time there appeared another call, that no-one start.
All circumstances of that issue is unknown currently.

We had that same issue and what triggered it was an automated server restart after updates

We had that same issue and what triggered it was an automated server restart after updates

Very interesting.
@sampaiodiego @pierre-lehnen-rc can you take a look at that issue?

We can confirm this issue on Win 10 using client 3.0.6.
It seems to start after Upgrade to client 3.x and affects just 2 users...

Recently a lot of our users got affected by that issue.
I'll try to make reproduce script to get the root cause of that issue.

That bug creates call button every 1 minute

That's really annoying and users get angry about that.
Here some another users with that problem https://open.rocket.chat/channel/support?msg=EgWZ4BAaGqPY4JSzy

jitsi:updateTimeout is a root cause for that!
And it's RocketChat issue, not Electron issus
["{\"msg\":\"method\",\"method\":\"jitsi:updateTimeout\",\"params\":[\"gYFnyDxfwdDom9jeRiodE4TwMg4i729GoH\"],\"id\":\"65\"}"]

I definitely figure out that issue!
It is a Web client issue for sure, so @ggazzo FYI.
I'm on 3.7.1 now, but I see, that 3.8.1 involved to and some 3.9 version too.
##Root cause
If Call contextual bar remain open and all call participants except one (with Call contextual bar open) leave that call, then after 3-5 minutes that calls buttons repeat to create in chat every single minute by jitsi:updateTimeout from websocket of that alone user in call, or more accurate by jitsi:updateTimeout of Call contextual bar.

##Solution
It might be solved with https://github.com/RocketChat/Rocket.Chat/pull/21004 by @yash-rajpal who fixed that with close that Call contextual bar after call started. So I believe 3.12.1 and higher may not be affected.
##Workaround
Advice your users always close that Call contextual bar after call is started or update to 3.12.1+

I have that bug somehow on recent 3.14 Rocket.Chat version with Call contextual bar closed right after call is started.
I don't know all conditions right now, but definitely "Click to Join!" button every minute flood is present in 3.14!
If I find a reproduce way I will open separate issue in main RC repo.

Also related
https://github.com/RocketChat/Rocket.Chat/issues/12148
https://github.com/RocketChat/Rocket.Chat/issues/18136

@ankar84
Hi!
You have same problem?
I have this problem too
So far there is no solution for this problem?

@ankar84
Hi!
You have same problem?
I have this problem too
So far there is no solution for this problem?

Yeah
But we today updated to 3.15.0
Let's see

@ankar84
Hi!
You have same problem?
I have this problem too
So far there is no solution for this problem?

Yeah
But we today updated to 3.15.0
Let's see

@ankar84
I have 3.15.0..
The problem is still relevant...

That and related issues could be fixed in https://github.com/RocketChat/Rocket.Chat/pull/22277

Same issue here

any hope this will be fixed ?

any hope this will be fixed ?

It's fixed on the next Rocket.Chat version, which will be released next week.

any hope this will be fixed ?

It's fixed on the next Rocket.Chat version, which will be released next week.

I hope you are right, Pierre!


Add S390x as a supported architecture

Add s390x as a supported architecture:

boostcpp.jam

Add s390x to list of deduced architectures

Thanks @nealef


Update use-fleet-behind-a-proxy.md

I can't find "Agent Environment Vars" under the "Advanced Options", but only under "Cluster Configuration":

@emilianolangella what version are you running?
I checked an instance running v2.7 and Agent Environment Variables is located as described in the current docs.
If you're on v2.8, then when we update the versioned pages we only need to update v2.8 and not any further back.

I have 2.8.3.

Rebased and applied change specified in https://github.com/rancher/rancher-docs/pull/1285#discussion_r1612173303.
cc: @LucasSaintarbor @martyav @sunilarjun


Convert PDF to Markdown or LaTeX

In order to extend, modify or translate the game, it would be nice to convert PDF prompts to Markdown or LaTeX format, to simplify the management

Agreed. I'm most of the way through #1 , in which I'm adapting the PDFs to HTML, and I'm wishing they were in another form as well.  Accepting this as a good issue to fix.

Now that mystery.knightlab.com exists, I think we'll close this.  We don't have internal resources for translations, and the database itself really would need to be translated, not just the prompts (see #4) which makes that unfortunately too big a task -- although we welcome people who are so motivated to adapt this to work for other languages.


[8.x] Add morphOnly and morphExcept feature to MorphTo

Why
We have a use case that cannot be solved actually.
We have a lot of Comment and we want to eager load only specific morphable types. Actually, all types are eager loaded.
Example:
The Comment model can morph to Post or Video.
We want to fetch all Comment with commentable only if the commentable_type is type of Post::class.
We don't want to eager load Video::class firstly because the relation is not used and secondly to save memory and database queries.
Proposal
Adding 2 features to MorphTo:

morphOnly(array $types)

Eager load only given morph types

morphExcept(array $types)

Prevent eager load of given morph types

To make this behavior easily understandable by developers, it seems that the best place to call these functions is in the with() callback:
$comments = Comment::with(['commentable' => function (MorphTo $morphTo) {
                $morphTo->morphOnly([Post::class]);
                // $morphTo->morphExcept([Video::class]);
            }])
            ->get();

The main challenge here is that the dictionary containing relations to eager load is built before we can interact with it. In other words, the dictionary is already built in the with callback.
Then the getResultsByType() function will eager load all morph types present in the dictionary. And this is exactly what we want to avoid here. To prevent undesirable eager loads by the getResultsByType() function, morph types that must not be eager loaded are moved to $exclusionDictionary.
Update
I have found a better way to prevent relation initialization directly in initRelation() function.

This can solve some heavy performances issues on morphable eager loads
I have added tests that cover this behavior
Functions can be renamed if they seem ambiguous to you
I did my best to add these features by limiting changes as much as possible.

Update
I have found a better way to prevent relation initialization directly in initRelation() function. It's a lot cleaner now.

@damiencriado How is this different from constraining eager loading of morphTo relationships?

@damiencriado How is this different from constraining eager loading of morphTo relationships?

This is different because constrain adds constraints to the morphable type root query.
In this example, the Post query is executed with the eager constraints + given constrain whereNull.
$comments = Comment::with(['commentable' => function (MorphTo $morphTo) {
    $morphTo->constrain([Post::class => function (Builder $query) {
        $query->whereNull('foo');
    }]);
}])->get();

In my use case and using morphExcept the Post query is not executed at all. And the commentable relation of Comment is not loaded. Giving the ability to lazy load it further.

We've fixed the build on 8.x so please rebase and mark as ready when tests pass. Thanks!

@driesvints It seems that the CI is still broken 😕

I'm sure I'm missing something but why not just:
$comments = Comment::with(['commentable'])->where('commentable_type', Post::class)->get();

@taylorotwell It will doesn't work for this use case because this query will only fetch Comment where type is Post.
What I want to achieve here is to fetch all Comment (regardless of type) while only eagerloading the commentable relation when the type is Post. This will save us unnecessary queries and the Comment collection will be much lighter.

This?
    $comments = Comment::all()
        ->tap(fn ($comments) => $comments
                ->where('commentable_type', Post::class)
                ->each
                ->load(['commentable']));

Thanks for the trick @taylorotwell, it seem to works as expected !

Glad to hear it!


feat(#226): Parse Bytecode Labels

Parse bytecode labes and save them into XMIR. The back transformation isn't implemented yet and we leave it for the future development.
Closes: #226.

History:

feat(#226): Split BytecodeInstruction on CommandInstruction and MarkLabelInstruction
feat(#226): finish with test for 226 issue
feat(#226): mark labels
feat(#226): handle labels at the beggining and at the end of methods that used without conditional jumps
feat(#226): add XmlCommand
feat(#226): add one more puzzle
feat(#226): save labels as instruction arguments
feat(#226): remove the puzzle for 226 issue
feat(#226): fix some qulice suggestions
feat(#226): fix all qulice suggestions

PR-Codex overview
This PR focuses on improving the code diff for the XML representation of bytecode instructions and labels.
Detailed summary

Added XmlCommand interface to represent bytecode instructions or labels in XML form.
Renamed XmlInstruction to XmlCommand for clarity.
Added XmlLabel class to handle XML representation of bytecode labels.
Implemented writeTo method in XmlCommand and XmlLabel to write instructions and labels to the bytecode method.
Added MarkLabelInstruction class to represent bytecode label instructions.
Added commands method in XmlMethod to return a list of XmlCommand objects.
Added tests for parsing if statements and labels in the bytecode.

The following files were skipped due to too many changes: src/main/java/org/eolang/jeo/representation/directives/DirectivesMethod.java, src/main/java/org/eolang/jeo/representation/bytecode/BytecodeInstruction.java, src/main/java/org/eolang/jeo/representation/bytecode/CommandInstruction.java

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@rultor merge

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 3min)


Parameters:  Add missing "in", and simplify sentence.

"in" was missing from the sentence.  Also "defined above" seemed
superfluous because it's evident from the context, so let's
simplify the sentence.

@gunnarx: I saw this just now and can accept it. But, before that, can you please sign the CLA? It's a legal requirement, one-time only. Thank you!

@gunnarx - we can't be accepting PRs without you signing the CLA. If you're unable to sign the CLA, we may have to close this PR without merging your changes.

Closing for lack of a CLA

Yeah I did not want to sign a CLA at this point.
But no problem, you can fix the typos yourself, I don't claim copyright to the text I provided.

(sorry logged in with another account, answer was from gunnarx)


Use enums for actions

It's better for minification since enums become numbers in transpiled code. It's also more TypeScript-y

I was actually thinking about that a while ago and the reason I didn't use them is the dev tools. It's not clear what action type is used due of the enum numbering and really makes it difficult to debug because of that. What do you think?
This is how the dev tools currently look like:

This is when using enums:

Well, it would be almost impossible for dev tool to know what the original name of those enums are...
So I guess it's a tradeoff.

See interesting discussion about string type enums here: https://github.com/Microsoft/TypeScript/issues/3192
Using the example there the Action code would look like this:
type ActionTypesEnum = "ADD_TO_CART" | "REMOVE_FROM_CART";
export const ActionTypes = {
    ADD_TO_CART: "ADD_TO_CART" as ActionTypesEnum,
    REMOVE_FROM_CART: "REMOVE_FROM_CART" as ActionTypesEnum
};

This gives an enum-like usage in the reducer, but has the above boilerplate in the action creator. Would definitely be nicer with a clean string enum syntax...

I see! But that's not landed in the language yet, right?

Unfortunately no. You can only use the above example code to mimic the same behaviour.
I'm still contemplating if this is better than plain old strings...

I've updated the code to use this enum-like style. Although it's not as neat (and clean) and enums I agree that it's much easier and safer to consume in reducers. Even though it doesn't benefit minificaiton I like the result and think it's better than the previous unsafe string constants.
Thanks for the feedback!
Here's the commit: https://github.com/InfomediaLtd/angular2-redux-example/issues/5 (Sorry I forgot to link to this issue during commit)

Cool! 👍🍺

Hello, could you please explain what do you mean by "much easier and safer to consume"? I've checked the commit with typings but reducers still take action as "any" so no help from TS editor here. And switch works well with both typed or simple strings. The only difference is you can do a typo while doing "boilerplate" when defining those string literals. At least in this case - maybe using strongly typed actions but it would add even more code which so the question is if it's worth it. Thank you.

Maybe we can use string enum:
enum CartActionTypes {
    ADD_TO_CART= 'ADD_TO_CART',
    REMOVE_FROM_CART = 'REMOVE_FROM_CART'
}

@xcatliu I agree. Much better! Would you like to create a PR?


Difference between searching and fetching tracks

The Track object returned by getVideo() seems to return duration in seconds, while search functions such as searchOne() return duration in milliseconds.

fixed in the latest version


CSP issue caused by new Function('')

AngularJS is in LTS mode
We are no longer accepting changes that are not critical bug fixes into this project.
See https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c for more detail.

I'm submitting a ...

[ ] regression from 1.7.0
[X] security issue
[ ] issue caused by a new browser version
[ ] other

Current behavior:  I got csp-report: {"blocked-uri": "eval"} pointing on 2 lines of Code from angular.js

function noUnsafeEval() {
try {
// eslint-disable-next-line no-new, no-new-func
new Function('');
return false;
} catch (e) {
return true;
}
}

// eslint-disable-next-line no-new-func
var fn = (new Function('$filter',
'getStringValue',
'ifDefined',
'plus',
fnString))(
this.$filter,
getStringValue,
ifDefined,
plusFn);

Expected / new behavior: Not having "new Function('')" in the code and so not having csp-reports

Minimal reproduction of the problem with instructions:

AngularJS version: 1.7.8

**Browser: All

Anything else:

See https://docs.angularjs.org/api/ng/directive/ngCsp.


Cannot receive depth frames consistently

Required Info

Camera Model
D435i

Firmware Version
<IP_ADDRESS>

Operating System & Version
Ubuntu 18.04 LTS

Kernel Version (Linux Only)
5.4.0-51-generic

Platform
PC

SDK Version
2.39.0

Language
C++

Segment
General

Issue Description
I was able to run my code and collect depth information from the device then after a few days I was not. During those few days I did not use the camera. On realsense-viewer I am rarely able to receive depth frames for certain image size and frame rate configurations  but not for others. In other words, most of the time realsense-viewer says no frames received regardless of configuration. I tried with other versions of realsense-viewer(2.39, 2.38, 2.27) and on a windows pc the problem persists on those platforms as well. On the other hand, I can consistently receive color and motion frames on realsense-viewer. However, I cannot receive color frame with my C++ code with which I used to.

Hi @msaliharslan   The fact that you have problems on both Ubuntu and Windows computers would suggest that something external to the computers is involved that is used with both computers - for example, the camera firmware driver (stored inside the camera hardware, not on individual computers) or the USB cable.
If the camera is able to at least be detected, a good first step would be to perform a Gold Reset of the camera to return it to its factory-new configuration.  If the calibration table stored inside the camera is corrupted then a Gold Reset can also correct tha problem.
You can perform a Gold Reset using a program called CustomRW that is part of the Dynamic Calibrator camera calibration tool.   You can install this tool on Linux by following the instructions on page 14 onward of the tool's user guide.
https://www.intel.com/content/www/us/en/support/articles/000026723/emerging-technologies/intel-realsense-technology.html
Once the tool is installed, you can launch CustomRW in the Gold Reset mode with the command below:
Intel.RealSense.CustomRW -g

I followed the instructions and made a gold reset to the device, but, unfortunately it did not work. Nothing has changed.

Thank you very much for the tests.  When you use the RealSense Viewer, do you have the camera plugged into a USB 3 port?  If you do, is the camera being correctly detected as USB 3?
You can tell this by looking at the number beside the camera name at the top of the options side-panel.  If it says '3.2' then it is a USB3 connection.  If it says '2.1' then it is being mis-identified as being a slower and more limited USB2 connection.

Yes

Thank you.  I see that you have depth, color and IMU all enabled at the same time in your image, and a Frames not received error on the depth stream.
Problems when all three of these stream types are active is a known-about issue.  It can be corrected in Python and C++ applications written by RealSense users, but I am not aware of a solution for the RealSense Viewer.
You should be able to successfully display color, depth and IMU simultaneously in the rs-multicam example program though, as tests that I have conducted have consistently shown that it does not experience this problem.  The rs-multicam program can display color, depth and IMU panels from a single attached D435i camera too.
https://github.com/IntelRealSense/librealsense/tree/master/examples/multicam

Screenshot is just a sample, I had tried only enabling the stereo module too, it did not work as well. Also, my own c++ application cannot receive any frames either.  rs-multicam example says "please connect one or more device", however, other examples (rs-align, rs-capture, C/depth, C/distance) see the device but says "Frame didn't arrive within 15000". C/color example runs and gets RGB  frames.

This time I was lucky enough to receive depth frames(still the problem remains). However, I noticed another issue which is the left side of the depth frame is missing as if depth frame is slightly slided to right. Do you think this is related to the original problem? Also, on graph it says that on average 55 frames drop per second, is this normal?

There have been a couple of recent cases involving Frames didn't arrived within 15000 that were resolved by updating to the currently latest SDK and firmware.  I see you have the latest SDK 2.39.0.  Are you also using the latest camera firmware <IP_ADDRESS> please?

It is already running with <IP_ADDRESS>

I do not know if this has any significance, I hope it is a clue: 848 x 480 resolution is more problematic than the others. I had received depth frames for all other resolutions(still not consistent) but this one. Also, note that after trying to enable depth stream with this resolution, the others do not work either from then on.

I have investigated your case carefully.  The fact that the camera has problems on both Ubuntu and Windows and on multiple Viewer versions leads me to suspect the camera firmware driver that is stored inside the camera.
As the camera can be detected by the Viewer, could you try the steps below please:

Download the firmware bin file for 5.12.7100 from the link below.

https://dev.intelrealsense.com/docs/firmware-releases#section-d400-series-firmware-downloads

Launch the RealSense Viewer program and go to the More icon near the top of the options side-panel.  Select the Update Firmware menu option.

A file selection window will open.  Select the Signed_Image_UVC_5_12_7_100.bin file from the location that you downloaded it to.  The camera will then downgrade to the <IP_ADDRESS> firmware version.

Bear in mind that RealSense cameras can only have their firmware downgraded 20 times before they can only be upgraded to a newer version once the limit is used up.  So the downgrade operation should not be performed multiple times.

Test the camera to see whether it now works normally with the RealSense Viewer and your C++ program.  If it does work normally, you can use the Install Recommended Firmware option with Viewer version 2.39.0 to re-upgrade to firmware <IP_ADDRESS>.  If it then stops working then you will still have the ability to re-downgrade to <IP_ADDRESS>, as you will have used very little of the camera firmware downgrade limit at this point.

I am sorry to say that downgrading to <IP_ADDRESS> via realsense-viewer as you suggested did not change anything.

Thanks again for the further update.  On Windows, can you confirm whether you experience the problems if you download the standalone executable .exe version of the Viewer from the Assets list at the bottom of the details listing for SDK 2.39.0?
https://github.com/IntelRealSense/librealsense/releases/tag/v2.39.0

The Intel.RealSense.Viewer.exe file should be launched from the location that you downloaded it to by double-leftclicking on the file, and not the Viewer launch icon on the Windows desktop.

When I said I tried on windows I already used that version of the realsense-viewer. Sorry for misleading you.

It is okay!  :)
May I also ask whether you connect the camera to a USB hub when you use the camera with your Ubuntu and Windows PCs, or do you connect the camera directly to the USB port on the computer?

Directly to computer

Thank you very much for your patience.   Next, please see whether the camera is detected if the command rs-enumerate-devices is used.

output.txt
Camera can be detected. I added the output of the program also, copied here.

Well it is not affected by orientation of the cable. Also, I have an update, my c++ code works with librealsense version 2.28.1 but not with 2.38 an 2.39. However, there are regular frame drops both for RGB and depth. On realsense-viewer 2.28.1 depth frames arrive except for 848 x 480 resolution. Moreover, after trying to enable this resolution, frames does not arrive for any other resolutions as well and my c++ code stops working until I un-plug & re-plug the device.

In the RealSense Viewer, are you able to receive infrared frames successfully in the same way that you can with color and motion frames?
Also in the Viewer, could you test whether performing a hardware reset before you begin streaming makes a difference?   you can do this by going to the More option at the top of the Viewer's options side-panel and selecting Hardware Reset from its drop-down menu.

Hardware reset has no effect, but after trying to enable at 848 x 480 hardware reset makes other resolutions work just like re-plugging. For infrared frames, they behave like depth, i.e. they work fine for resolutions other than 848 x 480. At 848 x 480 one set of infrared frames (one from each) arrives after about 5-7 seconds. However, IR pattern is not visible in the images. Disabling emitter or enabling just one infrared does not change anything.
I believe my issue is very similar to #3376, for that case 640 x 480  is problematic, for me it is 848 x 480.

At this point it may be worth trying to build librealsense from source code with the RSUSB method that is not dependent on kernel versions or Linux versions and does not need patching.  This should determine whether or not the problem is related to the kernel, since RSUSB does not rely on the kernel to operate.  RSUSB is enabled by using the CMake build flag -DFORCE_RSUSB_BACKEND=true
https://github.com/IntelRealSense/librealsense/issues/6368#issuecomment-636316279

848 x 480 resolution still is not working

I have researched the case completely again from the beginning but cannot find an explanation for the behavior.  So I will consult with Intel about it.   Thanks again for your patience.

Hi again @msaliharslan   I have received guidance for your case.

Please use the latest SDK and firmware versions.

Please try running Dynamic Calibration on your camera.

As you have access to a Windows PC, it will be easiest to use the Dynamic Calibrator tool if you download the Windows version from the link below.  The user guide for the tool can also be found at this link.
https://downloadcenter.intel.com/download/29618/Intel-RealSense-D400-Series-Dynamic-Calibration-Tool
If you would prefer to use the Linux version of the Dynamic Calibrator tool, page 14 onward of the user guide has Linux installation instructions.

Dynamic calibration did the trick, now it works!! Thank you.

Great news - thanks for the update!   :)


feat: Update app.py

This is the updated and final app.py

@anindita2000 also complete the PR Template and update the PR Title as mentioned above in the comment.


query error from hudi external table which contains array data type

Steps to reproduce the behavior (Required)

create hudi table in spark-sql, with parquet file system and gzip compression:

create table hudi_parquet_gzip(
 uuid int,
 col_boolean boolean,
 col_int int,
 col_long long,
 col_float float,
 col_double double,
 col_decimal decimal(38,18),
 col_date date,
 col_timestamp timestamp,
 col_string string,
 col_binary binary,
 col_array array<int>,
 col_struct struct<a:string,b:int>,
 col_map map<string,int>
 ) USING hudi
 TBLPROPERTIES(
  type = 'cow',
  primarykey = 'uuid');

 insert into hudi_parquet_gzip select 1,true,1,1.01,1.001,1.0001,10000000000.0000000001,cast('2020-01-01' as date),cast('2020-01-01 00:00:01' as timestamp),'Top 10 Unsolved Mysteries of Paleontological Dinosaurs, Did You Know?',cast('1110001010101011001001' as binary),array(1,10,100),null,null;
 insert into hudi_parquet_gzip select 2,false,2,2.02,2.002,2.0002,20000000000.0000000002,cast('2020-02-01' as date),cast('2020-02-01 00:00:02' as timestamp),'Xi Jinping, general secretary of the Communist Party of China Central Committee, called on Tuesday for unrelenting efforts in exercising full and rigorous governance over the Party, saying that the CPC will continue to show zero tolerance for corruption.',cast('1110001010101011001001' as binary),array(2,20,200),null,null;
 insert into hudi_parquet_gzip select 3,true,3,3.03,3.003,3.0003,30000000000.0000000003,cast('2020-03-01' as date),cast('2020-03-01 00:00:04' as timestamp),'Nation raises caution on overseas packages',cast('1110001010101011001001' as binary),array(3,30,300),null,null;
 insert into hudi_parquet_gzip select 4,false,4,4.04,4.004,4.0004,40000000000.0000000004,cast('2020-04-01' as date),cast('2020-04-01 00:00:04' as timestamp),'Shanghai, Shenzhen register most newly listed firms in 2021',cast('1110001010101011001001' as binary),array(4,40,400),null,null;
 insert into hudi_parquet_gzip select 5,true,5,5.05,5.005,5.0005,50000000000.0000000005,cast('2020-05-01' as date),cast('2020-05-01 00:00:05' as timestamp),'A total of 4,685 companies have been listed on the A-share market in China as of Dec 31, 2021, with 46 percent of them based in Beijing, Shanghai, Shenzhen, Hangzhou, Suzhou, Guangzhou, Ningbo, Nanjing, Wuxi, and Chengdu, said a report of National Business Daily on Wednesday.',cast('1110001010101011001001' as binary),array(5,50,500),null,null;
 insert into hudi_parquet_gzip select 6,false,6,6.06,6.006,6.0006,60000000000.0000000006,cast('2020-06-01' as date),cast('2020-06-01 00:00:06' as timestamp),'The development of enterprises, as well as the push of local governments, has boosted the listings, the report said. For example, in early 2018, Central China''s Hubei province launched a plan to double its listed companies by including the listing of enterprises into the government''s annual performance assessment.',cast('1110001010101011001001' as binary),array(6,60,600),null,null;
 insert into hudi_parquet_gzip select 7,true,7,7.07,7.007,7.0007,70000000000.0000000007,cast('2020-07-01' as date),cast('2020-07-01 00:00:07' as timestamp),'Most listed companies in the top 10 cities come from industries such as information technology, electronics, mechanical equipment, medical biology, and electric power equipment, with information technology bearing most listed companies.',cast('1110001010101011001001' as binary),array(7,70,700),null,null;
 insert into hudi_parquet_gzip select 8,false,8,8.08,8.008,8.0008,80000000000.0000000008,cast('2020-08-01' as date),cast('2020-08-01 00:00:08' as timestamp),'Citi report finds MNC mood in China buoyant',cast('1110001010101011001001' as binary),array(8,80,800),null,null;
 insert into hudi_parquet_gzip select 9,true,9,9.09,9.009,9.0009,90000000000.0000000009,cast('2020-09-01' as date),cast('2020-09-01 00:00:09' as timestamp),'Xi: China, Russia major champions of multilateralism, global justice',cast('1110001010101011001001' as binary),array(9,90,900),null,null;
 insert into hudi_parquet_gzip select 10,false,10,10.10,10.010,10.00010,100000000000.00000000010,cast('2020-10-01' as date),cast('2020-10-01 00:00:10' as timestamp),'Volkswagen deliveries hit by chip shortages',cast('1110001010101011001001' as binary),array(10,100,1000),null,null;
 insert into hudi_parquet_gzip select 11,true,11,11.11,11.011,11.00011,110000000000.00000000011,cast('2020-11-01' as date),cast('2020-11-01 00:00:11' as timestamp),'Light installations featuring the tiger, the Chinese zodiac animal for the upcoming lunar year, will be set up in the main plaza.',cast('1110001010101011001001' as binary),array(11,110,1100),null,null;
 insert into hudi_parquet_gzip select 12,false,12,12.12,12.012,12.00012,120000000000.00000000012,cast('2020-12-01' as date),cast('2020-10-01 00:00:10' as timestamp),'The annual lantern show at Yuyuan Garden, a historic tourist site in Shanghai, will kick off on Tuesday and run through Feb 28.',cast('1110001010101011001001' as binary),array(12,120,1200),null,null;
 insert into hudi_parquet_gzip select 13,null,null,null,null,null,null,null,null,null,null,null,null,null;
 insert into hudi_parquet_gzip select 14,null,null,null,null,null,12345678901234567890.123456789012345678,null,null,'',null,null,null,null;

create hudi external table in starrocks:

create external table ex_hudi_tbl_array(
 uuid int,
 col_array array<int>
)ENGINE=hudi
properties (
"resource" = "hudi_emr_tn",
"table" = "hudi_parquet_gzip",
"database" = "hudi_db");

select from hudi external table returned error:

mysql> select * from ex_hudi_tbl_array;
ERROR 1064 (HY000): mismatched row count: 1 vs 7

Expected behavior (Required)
return the right result
Real behavior (Required)
return error
StarRocks version (Required)

You can get the StarRocks version by executing SQL select current_version()

mysql> select current_version();
+------------------------+
| current_version()      |
+------------------------+
| QA_TEST_MASTER ac2c40e |
+------------------------+
1 row in set (0.00 sec)

i will fix it

This case is ok which also contains array type:
create external table ex_hudi_tbl0 (
 uuid int
 ,col_boolean boolean
 ,col_int int
 ,col_long bigint
 ,col_float float
 ,col_double double
 ,col_decimal decimal(38,18)
 ,col_date date
 ,col_string string
 ,col_array array<int>
 ,col_binary varchar(200))
 ENGINE=hudi
 properties (
 "resource" = "hudi_emr_tn",
 "table" = "hudi_parquet_gzip",
 "database" = "hudi_db") ;

mysql> select col_boolean,col_int,col_long,col_float,col_double,col_decimal,col_date,col_string,col_array,col_binary from ex_hudi_tbl0 order by col_int limit 5;
+-------------+---------+----------+-----------+------------+-----------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------------------+
| col_boolean | col_int | col_long | col_float | col_double | col_decimal                             | col_date   | col_string                                                                                | col_array  | col_binary             |
+-------------+---------+----------+-----------+------------+-----------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------------------+
|        NULL |    NULL |     NULL |      NULL |       NULL |                                    NULL | NULL       | NULL                                                                                | NULL       | NULL                   |
|        NULL |    NULL |     NULL |      NULL |       NULL |<PHONE_NUMBER>1234567890.123456789012345678 | NULL       |                                                                                | NULL       | NULL                   |
|           1 |       1 |        1 |     1.001 |     1.0001 |<PHONE_NUMBER>0.000000000100000000 | 2020-01-01 | Top 10 Unsolved Mysteries of Paleontological Dinosaurs, Did You Know?                                                                                | [1,10,100] |<PHONE_NUMBER>101011001001 |
|           0 |       2 |        2 |     2.002 |     2.0002 |<PHONE_NUMBER>0.000000000200000000 | 2020-02-01 | Xi Jinping, general secretary of the Communist Party of China Central Committee, called on Tuesday for unrelenting efforts in exercising full and rigorous governance over the Party, saying that the CPC will continue to show zero tolerance for corruption. | [2,20,200] |<PHONE_NUMBER>101011001001 |
|           1 |       3 |        3 |     3.003 |     3.0003 |<PHONE_NUMBER>0.000000000300000000 | 2020-03-01 | Nation raises caution on overseas packages                                                                                | [3,30,300] |<PHONE_NUMBER>101011001001 |
+-------------+---------+----------+-----------+------------+-----------------------------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------------------+
5 rows in set (0.02 sec)


Circuit Playground simulator treats button A and pin A1 as the same input

Add code (or blocks) for handling a click of pin A1:

input.pinA1.onEvent(ButtonEvent.Click, function () {
    light.pixels.setAll(Colors.Red)
})

Click on button A
Observe lights turn red (per handler for pin A1)
Add a handler for click of button A to the end of the code:

input.buttonA.onEvent(ButtonEvent.Click, function () {
    light.pixels.setAll(Colors.Blue)
})

Click on pin A1
Observe lights turn blue (per handler for button A)

Same thing happens with button B and pin A2.

@elinor-fung please file the Adafruit CPX issues on https://github.com/microsoft/pxt-adafruit

Does this happen on the hardware as well?

Transferred to pxt-adafruit: https://github.com/Microsoft/pxt-adafruit/issues/683


Add redirects management tool and update _redirects file for all localizations

This PR proposes a new script tool to manage _redirects. In addition, update _redirects to remove invalid links and to add all redirects for associated localization languages.

related issue: #42654

When previously provided pages disappear, we've added redirect to related documents.
These redirects are listed in https://github.com/kubernetes/website/blob/main/static/_redirects, and currently, there are around 400 entries.
I believe there are several issues in maintaining this _redirects file.

Some redirects lead to incorrect or non-existent links, and these are not being properly managed.
Kubernetes documentation is localized in more than 10 languages, but these redirects hardly address links in localized languages. Managing this has become a significant challenge. Due to the syntax of _redirects (Netlify), wildcard handling is difficult for localization.
Additionally, there are problems like the list not being sorted, and there's no policy on when to stop a particular redirect. (this tool does not address this issue yet.)

Therefore, the proposed Python program verifies the content of the redirects, regenerates them according to localization, and automatically creates the _redirects.

It checks the list of redirects for inaccessible URLs and ensures that contributors only provide accessible addresses.
If redirects for English are added, it automatically generates redirects for other languages, ensuring that future localization contributors don't have to worry about redirects.

For a easier review process, I recorded what is / how to use Video.

https://www.youtube.com/watch?v=ThuhFgOFesk

Based on this tool, I found following invalid redirects.

 (PTAL the redirects I removed ----- are actually useless or not)
-----/docs/concepts/service-catalog/,/docs/concepts/extend-kubernetes/service-catalog/,301
-----/docs/reference/generated/cloud-controller-manager/,/docs/reference/command-line-tools-reference/cloud-controller-manager/,301
-----/docs/reference/generated/kubernetes-api/v1.15/,https://v1-15.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/,301
-----/docs/reference/generated/kubernetes-api/v1.16/,https://v1-16.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/,301
-----/docs/reference/generated/kubernetes-api/v1.17/,https://v1-17.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/,301
-----/docs/reference/generated/kubernetes-api/v1.18/,https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/,301
/docs/reference/glossary/maintainer/,/docs/reference/glossary/?community=true#term-approver,301
-----/docs/setup/on-premises-vm/cloudstack/,/docs/setup/production-environment/on-premises-vm/cloudstack/,301
-----/docs/setup/on-premises-vm/dcos/,/docs/setup/production-environment/on-premises-vm/dcos/,301
-----/docs/setup/on-premises-vm/ovirt/,/docs/setup/production-environment/on-premises-vm/ovirt/,301
/docs/tasks/administer-cluster/kubeadm-upgrade-ha/,/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/,301
/docs/tasks/administer-cluster/out-of-resource/memory-available.sh,/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/,301
-----/docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set/,/docs/tasks/run-application/upgrade-pet-set-to-stateful-set/,301
/events/,/community,301
/image-registry-change/,/blog/2023/03/10/image-registry-redirect/,302
/image-registry-redirect/,/blog/2023/03/10/image-registry-redirect/,302
/media/,/community,301
/news/,/community,301
-----/no/docs/,/no/docs/home/,301!

/area web-development

I hope to receive reviews from @kubernetes/sig-docs-leads. I believe we need a consensus for this kind of approach. (how to manage the redirects)

As a tech lead for SIG Docs, I'd take a steer from the localization subproject. What does the localization subproject conclude about these proposed changes?

This doesn't look to me like a viable/sustainable approach for managing redirects.
If you have tried the current scripts/linkchecker.py script, you will see that
we are able to run link checks along with redirect checks using a simpler method.
That tool is not perfect, lacking support to check blog paths or support to parse
examples path or static redirects (such as '/dockershim'). However, it is a good
starting point for further improvements. I am not a big fan of adding a lot of
tools overlapping with each other.
Speaking of redirects for localized contents, I had a proposal 4 years ago (https://github.com/kubernetes/website/pull/18374). It is a much simpler approach
to make sure that we (the 10+ localization teams) don't need to prefix each and
every link target with a language code. The ref and relref shortcode are there
just for this purpose. The proposal wasn't quite received by the reviewers, I believe.
It looks like a huge churn to the whole site. However, it is a solution that,
once applied, will benefit the whole community in the long run.

@seokho-son, would you be willing to open an issue for this? We might also want to make a GitHub Discussion to run through the different options.

@seokho-son, would you be willing to open an issue for this? We might also want to make a GitHub Discussion to run through the different options.

Hi @sftim I opened an issue for this. :)
https://github.com/kubernetes/website/issues/42654
I haven't opened a Discussion yet. I think we can still use #42654 to explore other viable options. If we encounter too many diverse options and discussions, I'll open a new Discussion. is it ok?

Hi @tengqm, thanks for sharing your insight! I remember you mentioned the redirects issue several times in multiple PRs.

If you have tried the current scripts/linkchecker.py script, you will see that
we are able to run link checks along with redirect checks using a simpler method.
That tool is not perfect, lacking support to check blog paths or support to parse
examples path or static redirects (such as '/dockershim'). However, it is a good
starting point for further improvements. I am not a big fan of adding a lot of
tools overlapping with each other.

I'm aware of linkchecker.py, but I believe the purpose of this tool differs slightly. My aim is to ensure that both contributors and maintainers generate a correct _redirects file every time they modify it. By doing so, we can be confident that there are no issues with _redirects and that localization is properly managed. From this perspective, I see it as a sustainable approach, though it's not fully automated, unfortunately.

Speaking of redirects for localized contents, I had a proposal 4 years ago (https://github.com/kubernetes/website/pull/18374). It is a much simpler approach
to make sure that we (the 10+ localization teams) don't need to prefix each and
every link target with a language code. The ref and relref shortcode are there
just for this purpose. The proposal wasn't quite received by the reviewers, I believe.
It looks like a huge churn to the whole site. However, it is a solution that,
once applied, will benefit the whole community in the long run.

If we have a simpler automated way like the option you suggested, I'd love to see it implemented. But, I guess changing huge churn to the whole site is also a challenge. Considering it is just to handle only the redirects.

I'm not yet convinced that the _redirects can be auto-generated.
Even if there is a slight possibility, I'm worrying that it will introduce more subtle bugs than benefits.

Well, there do exist a good opportunity to check if there are invalid/dangling redirect entries, and that could be a simpler tool.

I'm not yet convinced that the _redirects can be auto-generated. Even if there is a slight possibility, I'm worrying that it will introduce more subtle bugs than benefits.

@tengqm Sorry for delayed response. (too many works ;) )
I'd like to clarify your comment:

I'm not yet convinced that the _redirects can be auto-generated.

Are you suggesting that _redirects is difficult to auto-generate regardless of the tool introduced in this PR?
Or are you implying that the tool proposed might not generate appropriate _redirects?
For your information, the _redirects file in this PR was solely generated by the proposed tool without any manual adjustments. I've tested its output using the Redirects Playground https://play.netlify.com/redirects, and it validated successfully.
FYI: the _redirects file is in this PR was generated (and not touched manually) by the proposed tool.
Tested the result with https://play.netlify.com/redirects Redirects Playground.
And it says validation is success.

Even if there is a slight possibility, I'm worrying that it will introduce more subtle bugs than benefits.

Do you expect an alternative suggestion? Or are you hoping for improvements to the current tool? (or just need verification?)

I'm afraid that the _redirects file is an expression of intent rather than something you can summarize from existing data. For example, when we are renaming a file, say 'topology-aware-hints.md', to 'topology-aware-routing.md', this renaming is an intent. We add an entry to the _redirects file so that anyone who had bookmarked the previous URL can still access the new file rather than receiving a 404. This change (and the intent) cannot be magically captured by any automation file. Yes, we can create a change record for this somewhere and then having the automation tool to regenerate the _redirects file. Do you believe this indirection is bringing us any benefit? Isn't it good enough to just add an entry to the _redirects file instead?
There are some more complicated scenarios. Some localization teams may want to add a redirect entry for a particular page, some teams may believe it is not necessary. Do we have a generic solution to this?
I'm not in favor of any over-engineering effort that brings in little to no advantages, but turns a simple issue to a complex one. It looks like we solved a problem. But, we didn't. We are creating a new asset that is, when broken, much more difficult to resolve than the original one.

@tengqm Thanks for the comment. Let me share my opinion on your comment. :)

I'm afraid that the _redirects file is an expression of intent rather than something you can summarize from existing data. For example, when we are renaming a file, say 'topology-aware-hints.md', to 'topology-aware-routing.md', this renaming is an intent. We add an entry to the _redirects file so that anyone who had bookmarked the previous URL can still access the new file rather than receiving a 404. This change (and the intent) cannot be magically captured by any automation file.

I agree. (and I assume you know the intention of this tool is not to generate redirects by automatically guessing those intents)

Yes, we can create a change record for this somewhere and then having the automation tool to regenerate the _redirects file. Do you believe this indirection is bringing us any benefit? Isn't it good enough to just add an entry to the _redirects file instead?

Based on the current status of contributions and management of redirects, I believe this indirection is bringing us benefit especially for localization aspects.

Localization contributors (or main maintaining contributors) seem unable to actively respond to redirect changes for English pages. If a redirect is added to an English page, and there are (several) localized documents corresponding to that English page, redirects are mostly required for those localized pages as well.
If not addressed, 404 errors occur in the localized pages. (Once the localization team realizes the 404, they typically add redirects for the localized pages then, or they overlook it.)

Moreover, when a contributor adds (or modifies) a redirect for an English page, they tend to not include redirects for all related localized pages together (the contributor is hard to check which localized pages are related).

Furthermore, when a related localized document is newly added in situations where there is an existing redirect to the English page, the localization contributor tends to not add the necessary redirect (for this part, we can guide localization contributors). Anyway, Localization efforts usually face challenges because the number of contributors for non-English content is generally smaller than for English content. We'd better reduce efforts on maintaining localizations.

As @sftim mentioned above, for localization, there isn't active discussion or guidance on handling redirects.
(There's a need to discuss solutions // The fact that the discussion hasn't taken place yet is my guilty. ;) )
Anyway, I'd say the tool will at least help localization contributors not to worry about redirect changes on English pages.

There are some more complicated scenarios. Some localization teams may want to add a redirect entry for a particular page, some teams may believe it is not necessary. Do we have a generic solution to this?

This tool does not provide a generic solution for the scenarios (yet).
However, up until now, I haven't found the scenario (Some localization teams may want to add a redirect entry for a particular page) in the existing _redirects file, except for a few special cases (/pt/* /pt-br/:splat, /zh/* /zh-cn/:splat). I assume that localization teams haven't been using _redirects solely for redirecting localized pages.
Anyway, If we need, this tool can provide a section for exceptions.

I'm not in favor of any over-engineering effort that brings in little to no advantages, but turns a simple issue to a complex one. It looks like we solved a problem. But, we didn't. We are creating a new asset that is, when broken, much more difficult to resolve than the original one.

Sure, we don't need over-engineering. :) I am not saying that this tool should be included. We need to take a better way if we have.
I'm uncertain about the potential breaking points you mentioned. The indirect file feels intuitive (at least to me), since it is similar with the original _redirect. I don't perceive it as complicated. However, the source code of this tool itself might appear intricate, possibly because I'm not a seasoned developer. Any guidance on this would be greatly appreciated.

If a redirect is added to an English page, and there are (several) localized documents corresponding to that English page, redirects are mostly required for those localized pages as well.

Suppose we have content/en/docs/foo/page1.md relocated to content/en/docs/bar/page2.md, and a redirect entry is added to _redirects file for this change. How does this change impact the content/<lang>/foo/page1.md ? I don't get it. Aren't we using localized page for links?

when a contributor adds (or modifies) a redirect for an English page, they tend to not include redirects for all related localized pages together (the contributor is hard to check which localized pages are related).

Then, what are we supposed to do in this case? Add redirects for all localizations? For each and every English redirect records, we add 10+ more redirect records for all other languages?

when a related localized document is newly added in situations where there is an existing redirect to the English page, the localization contributor tends to not add the necessary redirect ...

Adding redirects for all localizations is a terrible idea. We could have saved that huge effort since Hugo already provided ref and relref shortcode for this. Why don't we use the builtin mechanism? Maintaining a huge, and ever-growing _redirects file is not fun. Please consider the long term impact.
Why don't we explore the "native" multilingual support from Hugo? I don't think changing the English upstream to use ref or relref is that hard. It will save a huge amount of time for all localization teams. The sad thing is that this approach is not well understood by some approvers.

I don't think changing the English upstream to use ref or relref is that hard.

We can do that, but even if we do, we still need to manage redirects and to make that work across different localizations. For example, we redirect some removed pages to the closest still-relevant page. We also have shortlinks like https://k8s.io/dockerfile and (if it existed) https://k8s.io/uk/dockerfile

To clarify, if we switch to ref or relref directives, we will be using the relative path to the markdown files as links. There won't be a huge burden to manage redirects. A link either works or it doesn't. Once we fix the link in the English page, we don't have to fix it for any localization teams.

It seems that this PR has not achieved further consensus, and it looks like it's time to close it. I hope the tooling example from this PR has been helpful in broadening our perspectives. Thanks for the discussion. @tengqm @sftim  I think further discussion can be made in other PRs or issues. I will be utilizing the script personally to update static/_redirects. :)
/close


Allow multiple content classes

I noticed an issue when vex.baseClassNames.content was set to a string containing multiple classes.
For example...
vex.baseClassNames.content = 'vex-content' (works fine)
vs.
vex.baseClassNames.content = 'vex-content vex-content-auto hs-modal' (breaks)
The culprit was $(@).parents(".#{vex.baseClassNames.content}") which tries to form a selector '.vex-content vex-content-auto hs-modal' Needless to say, this doesn't work.
The solution was to add a utility method getBaseClassesAsSelector to vex. It's job is to simply split/join and return our properly formatted selector .vex-content.vex-content-auto.hs-modal
@timmfin @zackbloom @gusvargas @b-ash

:boat:

Hey @mstenquist, thanks so much for this!
I think this is a great suggestion, but your particular implementation strikes me as a little strange. Rather than have the method getBaseClassesAsSelector return a the content selector specifically, I think it would make more sense to pass in the string of the base class and have it return the selector. That way this could be used for more classes than just vex.baseClassNames.content. Also, I think the name would make more sense as getSelectorFromBaseClass.
So altogether, it would look something like this:
vex.getSelectorFromBaseClass(vex.baseClassNames.content)

@adamschwartz Ooo.. I like that. Thanks for the feedback.


Package Review and Refactor

Kartal

NavigationExtension warning issue fixed.
Some logical code fixed.
Variable warnings fixed.
Example Folder
Migrated Android V2 embedding.
Upgraded NullSafety.

@AhmetMelihSerter thank youu so much i merged this pr


high_volubility.py: chunk sizes

It is possible to modify the size of the chunks for the first, second and third extraction steps with the --chunk_sizes argument, however the new_onset_*_minutes function used to compute the onsets to extract those chunks only exists for 2 (second extraction step) and 5 (third extraction step) minutes:

in new_onsets_two_minutes the new onset seems to be later than the given onset, meaning the extracted chunk which was supposed to be centered on the smaller chunks starts in the middle of the smaller chunk, is that on purpose?
in in new_onsets_five_minutes the new onset is 2 minutes before the current onset, no matter the length asked for (it could be that the --chunk_sizes argument was [10.0, 120.0, 120.0] and then none of the chunks would contain the data based on which they were ranked)

I don't know which behavior was expected, but the second one at least can be conflicting with what the script is supposed to output.

@alecristia - you will know best how this is supposed to work?

new_onset_two_minutes and new_onset_five_minutes were former functions that have been removed a long time ago. They have been merged into one single function called new_onsets.
These changes have been made during the whole refactoring/debugging of high_volubility.py : here
I'd be happy to explain the process of the current version of high_volubility.py if something is not clear.

in new_onsets_two_minutes the new onset seems to be later than the given onset, meaning the extracted chunk which was supposed to be centered on the smaller chunks starts in the middle of the smaller chunk, is that on purpose?

in new_onsets_two_minutes the new onset seems to be later than the given onset, meaning the extracted chunk which was supposed to be centered on the smaller chunks starts in the middle of the smaller chunk, is that on purpose?

With the following parameters :
a) a wav file of 3000 seconds
b) --chunk_sizes 10.0 120.0 300.0
c) --nb_chunks 2
d) --step 600

We compute the onsets of the 10 seconds chunks (each of them being separated by 600 sec), these onsets are :
[145.0, 745.0, 1345.0, 1945.0, 2545.0]

We keep the nb_chunks * 2 of them that contain the most speech, and we compute the onsets of the new chunks (sorted by amount of speech) :
[690.0, 90.0, 1290.0, 2490.0]

745 became 690, 145 became 90, etc ... :

We keep the nb_chunks of them that contain the most speech, and we compute the onsets of the new chunks (the ones that will be returned by the script) :

[600.0, 0.0]
690 became 600, 90 became 0, etc ...
Going back to first list of onsets ([145.0, 745.0, 1345.0, 1945.0, 2545.0]), we see that we chose :

The second one, whose first chunk was starting at 745 (centered at 750).
The first one, whose first chunk was starting at 145.0 (centered at 150).


Thick / Double Fraction Bar showing up

Trying to write some simple fractions to the screen, but
(a) a double lined fraction bar keeps showing up - my config is pretty standard (using latest 0.9.0 katex version), and using the below expression.
Note: The issue is definitely the "type" of line (looks like a "double border"), and not the thickness - see third image.
(b) the division symbol is misaligned when the font is small, but gets resolved when the font is bigger (not a big deal, jw if there is an easy fix)
$\\frac{1}{2} \\div \\frac{3}{4}$

Any ideas if I'm doing something wrong, or if this is a known issue?
Thanks

#1249 (also in 0.10.0-alpha) addressed the first part. @ronkok did you still plan to tweak \sqrt? Would anyone else on this thread like to retest on the latest KaTeX to see if the issues are resolved?

Great! Marking this resolved. Feel free to open a new issue if there are any remaining problems.


[Run Plugin] Rewrite ConvertInput

Summary of the Pull Request
What is this about:
Convert string unit representation to enum and then use single UnitsNet.UnitConverter.Convert
What is include in the PR:

Removed ParsesInputForAbbreviations and its tests as it's not needed for the new implementation

How does someone test / validate:

Run tests
Test manually for regressions

Quality Checklist

[ ] Linked issue: #xxx
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@ThiefZero
Any concerns with a new approach?

@ThiefZero
Any concerns with a new approach?

My only concern is how I wrote such a convoluted solution and did not see a simpler/cleaner way such as this.
Great job. This is brilliant 👌.

this sounds approved, correct?


[kiali] move to v1.18 to address compatibility fixes for istio 1.6

Manual cherry-pick because this auto-cherry-pick failed: https://github.com/istio/istio/pull/23676
(cherry picked from commit ff77aa24363513406773e2cc7c7261931fad7faa)
Signed-off-by: John Mazzitelli<EMAIL_ADDRESS>

@jmazzitelli: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio_release-1.6
1faee63f74707de0f3a01f66ae6c7eb56d782abb
link
/test gencheck_istio_release-1.6

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jmazzitelli: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio_release-1.6
1faee63f74707de0f3a01f66ae6c7eb56d782abb
link
/test gencheck_istio_release-1.6

unit-tests_istio_release-1.6
1faee63f74707de0f3a01f66ae6c7eb56d782abb
link
/test unit-tests_istio_release-1.6

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

The gencheck failed - even though I cherry-picked a PR in which make gen was already run. So, to make it happy, I ran make gen for this PR. The only change make gen made was it reverted back one of the changes (shrug):
diff --git a/operator/cmd/mesh/testdata/profile-dump/output/all_off.yaml b/operator/cmd/mesh/testdata/profile-dump/output/all_off.yaml
index 629104943..42d82394b 100644
--- a/operator/cmd/mesh/testdata/profile-dump/output/all_off.yaml
+++ b/operator/cmd/mesh/testdata/profile-dump/output/all_off.yaml
@@ -407,7 +407,7 @@ spec:
         private_key_file: /kiali-cert/key.pem
       service:
         annotations: {}
-      tag: v1.18
+      tag: v1.15

I don't know why make gen generated a file with the old tag. This PR is moving that tag forward to v1.18. But I committed it to make the gencheck happy. But it seems wrong to me (??).

@howardjohn Any thoughts?

@jacob-delgado
I have reviewed this manual cherrypick and it is correct from an environments WG perspective.
I am not sure, from a T&R perspective, why the cherry-pick failed. I don't think a failed cherry-pick should hold up a merge to a release branch though if a maintainer for the directory under management has reviewed the manual cherrypick.

Sounds good to me.


Modifying an existing stored procedure needs an ALTER option

SQL Operations Studio Version: sqlops 0.23.6 (8a3011756318a2ded1e6e84332230a2b2bf9c544, 2017-11-06T21:51:43.232Z)
OS Version: Windows_NT x64 10.0.14393

I really like this product so far!!!!
Steps to Reproduce:
1.Open a database -> Programmability -> Stored Procedures -> Right click on an existing procedure
2.The available options are CREATE and DELETE, we need an option for ALTER

Closing as a duplicate of #118. We can use that one as a tracking issue. Thanks for reporting!


Fix build error of NetSparkle.Samples.NetFramework.WinForms

Moving to .NET Framework 4.6.2 due to:
error : Project '..\NetSparkle\NetSparkle.csproj' targets 'net8.0;net7.0;net6.0;netstandard2.0;net462'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.5.2'.

Enable Auto-generate binding redirects due to:
Consider app.config remapping of assembly "System.Runtime.CompilerServices.Unsafe, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "<IP_ADDRESS>" [] to Version "<IP_ADDRESS>" [src\bin\Debug\NetSparkle\net462\System.Runtime.CompilerServices.Unsafe.dll] to solve conflict and get rid of warning.

Thank you!!


Connectors: Break DSN into constituent parts

I think we should also allow user to specify DSN since it allows user to set lot more connection parameters. One option could be to flip the screen with a button. See superset's db connector for reference:

May be we can skip SSL parameter and let user specify schema in the hostname ?

👍  to Anshul's comment about keeping DSN as and advanced property as well.


Timer Processor to checkpoint ack level

Timer processor to checkpoint ack level frequently.
Timer processor to use addition 64bit for sequence number for same time resolution.

I am not sure why we need an ackManager for timers. Since as assign timestamps under the lock and never do timers in the past, to advance the ackLevel for the timer it suffices to check if there are no timers between the previous ackLevel and now. Are we trying to avoid querying Cassandra for this check?

At this time the main purpose of ack manager is to keep track of in progress tasks and making sure there is nothing left before when we move ack level. We could use cassandra query to figure that out  but we are trying to reduce these range queries as much as possible.


demo onnx f32->f8 conversion diff between spec and ref impl

Added TestFPConversion.py test showing that for the "UZ" f8 types the onnx reference implementation of conversion from f32 +/-INF differs from the spec: reference implementation converts +/-INF to +/-MAX whereas the spec says they should convert to NaN.
See issue #2369.

closing this PR because I don't plan to merge it


Click event not working with DragOverlay

I am trying to add delete functionality for each sortable item. It works fine as long as I don't use the DragOverlay component. The moment I add the DragOverlay component, the click events to do get fired at all (not just for the button, but for the the whole sortable item).
Package Versions
"@dnd-kit/core": "^3.1.1",
"@dnd-kit/modifiers": "^3.0.0",
"@dnd-kit/sortable": "^4.0.0",

Sandbox
https://codesandbox.io/s/test-dnd-kit-forked-42tnt
Comment the line <DragOverlay>{activeId ? <Item id={activeId} /> : null}</DragOverlay> and remove works

This isn't a bug, it's expected behavior that the onClick event wouldn't fire when you use DragOverlay because the drag overlay component gets rendered on drag start on top of your sortable item.
You have a few options to solve this. You can add an activation constraint to either delay or wait until you drag a certain distance before activating the drag event, or you could also use a drag handle.

For anyone in the future encountering the same issue. Please see HelKye's response here with the data-no-dnd="true" solution. It works.

Thanks to this post , I could solve this problem.
I hope this information helps!
import { DndContext, KeyboardSensor, MouseSensor, useSensor, useSensors } from '@dnd-kit/core'
import { SortableContext } from '@dnd-kit/sortable'
React.FC = { //
const mouseSensor = useSensor(MouseSensor, {
    activationConstraint: {
      distance: 10, // Enable sort function when dragging 10px   💡 here!!!
    },
  })
const keyboardSensor = useSensor(KeyboardSensor)
const sensors = useSensors(mouseSensor, keyboardSensor)  💡 here!!!

<DndContext sensors={sensors}> // 💡 here!!! sensors is important !!!! 🐈⬛
          <SortableContext
            items={values.map((value) => {
              return value.position
            })}
          >
            {values &&
              values.length > 0 &&
              values.map((value) => {
                return (
                  <SortableImage
                    //position={value.position}
                    //image={value.image}
                    //removeDispatch={removeDispatch}
                    //sortDispatch={sortDispatch}
                    key={value.position}
                  />
                )
              })}
          </SortableContext>
</DndContext>

interface SortableImageProps {
  id?: number
  position: number
  image: string
  removeDispatch: (event: any, item: any) => void
  sortDispatch: (event: any, item: any) => void
}

function SortableImage(props: SortableImageProps) {
  const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: props.position })

  const style = {
    transform: CSS.Transform.toString(transform),
    transition,
  }

  return (

      <Image key={props.position} src={props.image} width={143} height={103} alt="image" />

        <button
          className={styles.sortable_image_delete}
          onClick={(event) =>
            props.removeDispatch(event, { id: props.id, position: props.position, image: props.image })
          }
        >
          <svg width="15" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" className={styles.svg}>
            <path d="M2.99998 -0.000206962C2.7441 -0.000206962 2.48794 0.0972617 2.29294 0.292762L0.292945 2.29276C-0.0980552 2.68376 -0.0980552 3.31682 0.292945 3.70682L7.58591 10.9998L0.292945 18.2928C-0.0980552 18.6838 -0.0980552 19.3168 0.292945 19.7068L2.29294 21.7068C2.68394 22.0978 3.31701 22.0978 3.70701 21.7068L11 14.4139L18.2929 21.7068C18.6829 22.0978 19.317 22.0978 19.707 21.7068L21.707 19.7068C22.098 19.3158 22.098 18.6828 21.707 18.2928L14.414 10.9998L21.707 3.70682C22.098 3.31682 22.098 2.68276 21.707 2.29276L19.707 0.292762C19.316 -0.0982383 18.6829 -0.0982383 18.2929 0.292762L11 7.58573L3.70701 0.292762C3.51151 0.0972617 3.25585 -0.000206962 2.99998 -0.000206962Z"></path>
          </svg>
        </button>
        <button
          className={styles.sortable_image_sort}
          onClick={(event) => props.sortDispatch(event, { id: props.id, position: props.position, image: props.image })}
        >
          <svg viewBox="0 0 20 20" width="25">
            <path d="M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z"></path>
          </svg>
        </button>

  )
}

export default SortableImage

Thanks,  works for me.

I used MouseSensoir Options. It was work for me
const sensors = useSensors(useSensor(MouseSensor,{activationConstraint:{distance:10}}), useSensor(TouchSensor));

Thanks, it works for me

Thank you, Neco3! Was using the delay activation constraint and that kept giving more issues! Using the distance constraint solved everything!

I think there should be a default behavior or default sensor to detect click and drag difference. This is very common case.

if you are using "PointerSensor" then remove it, after commenting, it is worked for me.
const sensors = useSensors(
    //useSensor(PointerSensor),
    useSensor(TouchSensor),
    useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }),
    useSensor(MouseSensor, { activationConstraint: { distance: 10 } })
  );


Volatility incoming - Bollinger bands width

Alerts - Volatility incoming - Bollinger bands width < X value

Hello, can you provide a windows installation tutorial, especially the way to Schedule Python Scripts and the way to create a DNS ?
Many thanks !

Hello,
Currently, installation instructions and support for this program are only available for Linux environments. I’d recommend setting up the program on a Linux system, as this is where it’s been tested and optimized. If you have access to a Linux machine (whether a dedicated machine or on a virtual machine with a dual-boot setup), I’ll be glad to assist you with the installation steps and provide any guidance you need.
Thank you for your understanding, and let me know if you decide to proceed with a Linux setup!


Add bucket env variables to admin frontend

The communications bucket is required uploading communications. The
others have been added now as they will be useful soon and it's a bit
confusing to debug when it's not available.

I think buckets need to be added to the stack dependencies, similar to how we do it in the supplier app stack

:tada:

:+1:


Add support for multi dimension range partitioning

Description
This PR adds support for range partitioning on multiple dimensions. It extends on the
concept and implementation of single dimension range partitioning.
The new partition type added is range which corresponds to a set of Dimension Range Partition classes. single_dim is now treated as a range type partition with a single partition dimension.
The start and end values of a DimensionRangeShardSpec are represented
by StringTuples, where each String in the tuple is the value of a partition dimension.
For example, the following could be the start and end values of some shards for
partition dimensions [country, city]:

Shard Number
Start [country, city]
End [country, city] (exclusive)

1
null
["France", "Paris"]

2
["France", "Paris"]
["UK", "London"]

3
["UK", "London"]
null

Thus, null < ["France", "Paris"] < ["UK", "London"] < null
In the above shards,

all rows with no country specified (e.g. the rows [null, null], [null, "city A"] ) would exist in shard 1
all rows for country "Algeria" would exist in shard 1
all rows for country "Italy" would exist in shard 2
all rows for country "Zimbabwe" would exist in shard 3

Please note:

null is used to represent both overall start and overall end (same as current behaviour for single_dim)
null is used to mark the overall start/end whereas a tuple of nulls (e.g. [null, null])
can be a valid tuple of dimension values.
After the changes here, single_dim would be treated as a special case of range.
The single dimension classes have been retained for backward compatibility
but all new/existing code must use the new DimensionRange partition classes.
Partitioning done with type range and a single partition dimension would still create shard specs
of type single_dim

For API compatibility, the following partition specs are equivalent:
{
  "type": "single_dim",
  "partitionDimension": "dim1"
}

{
  "type": "range",
  "partitionDimensions": ["dim1"]
}

Major Code Changes

Add StringTuple to represent the tuple of dimension values in an InputRow
Add DimensionRangePartitionsSpec, super class of SingleDimensionPartitionsSpec
Add DimensionRangeShardSpec, super class of SingleDimensionShardSpec
Add DimensionRangeBucketShardSpec, BuildingDimensionRangeShardSpec
Create instances of DimensionRangeBucketShardSpec when bucketing rows into partitions in
RangePartitionAnalysis
Use StringTuple instead of String when creating partition ranges
In DimensionRangeShardSpec, check ranges of only the first dimension when pruning partitions

Changes not in this PR

Multi dim partitioning changes for indexing-hadoop classes

Changes in follow up PR

Docs changes for the new multi dim partitioning

This PR has:

[ ] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[x] been tested in a test Druid cluster.

The overall design / API looks good based on the PR description (I haven't looked at the code). It'll be a great feature.
I wanted to ask about compatibility during rolling updates and rollbacks:

If someone updates to the new version, but doesn't use the new feature (i.e. they keep submitting ingest specs with single_dim shard specs), will that lead to segments getting written with single_dim or multi_dim shard specs? Hopefully it's single_dim, since that means people can safely roll back without losing the ability to read their shard specs.
If someone is in the middle of a rolling update to the new version, and has some data servers updated but not others, will that be safe? Or will some servers write out multi_dim shard specs or other multi_dim things that other servers on the older version cannot read?

1. If someone updates to the new version, but doesn't use the new feature (i.e. they keep submitting ingest specs with `single_dim` shard specs), will that lead to segments getting written with `single_dim` or `multi_dim` shard specs? Hopefully it's `single_dim`, since that means people can safely roll back without losing the ability to load their existing segments.

Thanks for pointing this out, @gianm . I had originally intended to add this logic to ensure backward compatibility but I had missed it.
I have added it now by making SingleDimensionShardSpec extend MultiDimensionShardSpec.
Thus, while converting a BuildingMultiDimensionShardSpec, a SingleDimensionShardSpec is created if there is only one dimension, otherwise a MultiDimensionShardSpec is created.
@Override
  public MultiDimensionShardSpec convert(int numCorePartitions)
  {
    return dimensions != null && dimensions.size() == 1
           ? new SingleDimensionShardSpec(...)
           : new MultiDimensionShardSpec(...);
  }

The only drawback is that if someone tried to partition their data using type multi_dim with a single dimension specified in the partitionDimensions field, the shard specs created would still have type single_dim. But I guess that is to be expected.

2. If someone is in the middle of a rolling update to the new version, and has some servers updated but not others, will that be safe? Or will some servers write out `multi_dim` shard specs or other `multi_dim` things that other servers on the older version cannot read?

The above mentioned approach will take care of this as well, because servers will output multi_dim shard specs only if a user explicitly chooses multi_dim partitioning with more than one dimensions.

Thank you @kfaraz for your contribution.

No, @hqx871 , I haven't added support for Hadoop ingestion yet. 🙂

@kfaraz thanks for your great work. This feature really helps improve our large datasource queries, as it prune most segments. Besides, I also found that the DimensionRangeShardSpec lookup may be slow when there are too many shards. I tried to sort the shardSpecs and use binary search to fast the routine. Hope this is helpful to somebody else.

By lookup is slow I mean the follow code:
private static ShardSpecLookup createLookup(List<? extends ShardSpec> shardSpecs)
  {
    return (long timestamp, InputRow row) -> {
      for (ShardSpec spec : shardSpecs) {
        if (((DimensionRangeShardSpec) spec).isInChunk(row)) {
          return spec;
        }
      }
      throw new ISE("row[%s] doesn't fit in any shard[%s]", row, shardSpecs);
    };
  }

Thanks a lot for the feedback, @hqx871 ! I am really glad you find it useful. 🙂
Thanks for the suggestion on sorting the shard specs, I will look into it.

@hqx871 - you could contribute that patch.

As we only use the hadoop based batch ingestion in our company and I know little about the native batch ingestion. So modify it's code is hard to me and to test as well.

I have make a try to do this


Unable to call services from HA

Adding tummy / sleep time always fails but i'm not sure why.
Here is my service data:
service: babybuddy.services_tummy_times_add
data:
  child: sensor.baby_nandhra_pezone
  start: 2021-07-13 09:15
  end: 2021-07-13 09:20

Here is what the logs say
Cannot create tummy-times, check service fields
Here is the baby sensor details as seen in HA.
id: 1
first_name: Baby
last_name: Nandhra-Pezone
birth_date: 2021-08-09
slug: baby-nandhra-pezone
picture: null
child_name: Baby_Nandhra-Pezone
endpoint: children
friendly_name: Baby Nandhra-Pezone
icon: mdi:baby-face-outline

From what i can see the service fields are right so I think something else might be going on here. Oddly though it did work the once but not since. The only thing i've changed since at all is the start and end times.

Can you post some of the data from your Baby Buddy instance https://...api/tummy-times/ ?

Can you post some of the data from your Baby Buddy instance https://...api/tummy-times/ ?

Sure, FYI id 1 was added within babybuddy. id 2 was the only time adding from HA worked.
{
    "count":2,
    "next":null,
    "previous":null,
    "results":[
        {
              "id":2,
              "child":1,
              "start":"2021-07-13T08:00:00Z",
              "end":"2021-07-13T08:05:00Z",
              "duration":"00:05:00",
              "milestone":""
        },
        {
              "id":1,
              "child":1,
              "start":"2021-07-07T12:10:19Z",
              "end":"2021-07-07T12:15:19Z",
              "duration":"00:05:00",
              "milestone":"nah"
         }
    ]
}

To be sure, it worked once 7/13, then no longer worked?

False alarm! sorry. This was entirely my fault.
BB and HA were on different timezones. Everything is grand now.

I don't think BB exposes TZ (currently), so I might add that ✔✔ to the error message.

I'm reopening this as I've just had the same issue for a different reason. Essentially one feed ended at 17:05 and the next feed started at 17:05.
This kept failing and when i decided to enter it manually I got the error message about the times overlapping. Could it take into account seconds as well as minutes in the timestamp?

Should be resolved when PR #33 is merged.


Tapo P100 on 1.2.1 build generates "Second handshake failed: Request failed with status code 403"

Describe The Bug
Unable to use Tapo P100 switches with latest plugin, error logs repeat "Second handshake failed: Request failed with status code 403" and no accessory can be found.
Tapo P100 running firmware 1.2.1 Build 230804 Rel. 190922
Expected behavior
Accessory is found and identified within Home app.
Logs
[05/01/2024, 20:05:30] [TPLink Tapo] Try for <IP_ADDRESS> : 19/20
[05/01/2024, 20:05:30] [TPLink Tapo] [KLAP] Second handshake failed: Request failed with status code 403
[05/01/2024, 20:05:30] [TPLink Tapo] Error sending command: deviceInfo TypeError: Cannot read properties of undefined (reading 'cipher')
    at KlapAPI.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/KlapAPI.ts:59:39)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:243:24)
[05/01/2024, 20:05:30] [TPLink Tapo] Failed to get info about: <IP_ADDRESS>
[05/01/2024, 20:05:30] [TPLink Tapo] Retry to connect in 10s : <IP_ADDRESS>

Plugin Config
{
    "bridge": {
        "name": "Homebridge ****",
        "username": "**:**:**:**:**:**",
        "port": 51820,
        "pin": "***-**-***",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "addresses": [
                "<IP_ADDRESS>"
            ],
            "name": "TPLink Tapo",
            "email": "*****@*****",
            "password": "*****",
            "platform": "HomebridgeTPLinkTapo"
        }
    ],
    "disabledPlugins": []
}

Plugin Version
4.1.0
Homebridge Version
1.7.0
Node.js Version
20.10.0
NPM Version
10.2.3
Operating System
Linux 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

I am having the same Problem. Any fix known yet?

Same error on P110 on 1.3.0. firmware, did they change something in the authentication process?

Exactly the same failure here

Version 4.1.1 fixed this for me.

I've just tried it with 4.1.1 and I still get the same errors:
[15/07/2024, 20:09:04] Homebridge v1.8.3 (HAP v0.12.2) (TPLink Tapo Platform) is running on port 47306.
[15/07/2024, 20:09:04] [TPLink Tapo Platform] [KLAP] Second handshake failed: Request failed with status code 403
[15/07/2024, 20:09:04] [TPLink Tapo Platform] Error sending command: deviceInfo TypeError: Cannot read properties of undefined (reading 'cipher')
    at KlapAPI.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/KlapAPI.ts:59:39)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:243:24)
[15/07/2024, 20:09:04] [TPLink Tapo Platform] Failed to get info about: <IP_ADDRESS>
[15/07/2024, 20:09:04] [TPLink Tapo Platform] Retry to connect in 10s : <IP_ADDRESS>