How do I opt out of redrawing with m.request in v1

Description:
In v.0... you could set background: true on m.request opt out of redraw on completion
How does one do this in v1?

@iamjohnlong it's not explicitly addressed in the migration docs but in v1 m.request is totally decoupled from the view — in other words all requests are 'background' now :)
Should keep this ticket open until we get that documented…

@barneycarroll that's simply not true.
https://github.com/lhorie/mithril.js/blob/713c25c9c0490a7f50368209148737bf76647dd7/index.js#L7
calls into
https://github.com/lhorie/mithril.js/blob/d1c2a44de8db3ae74c8df972c6f10cd086acb8be/request/request.js#L10
which is then executed on every call to m.request().
It won't redraw until the promise chain completes, which is useful, but there's not explicit way to say "don't redraw when this request completes".

Ok so from the discussion in gitter, the actionables that came out were:
1 - make request("mithril") and request("mithril/request") use different request/request instances
2 - add background: true back to m.request
Though since 1) covers the case of avoiding post-request redraws, do we really need 2)?

I think the background: true approach would be way easier to reckon with when writing application code. Having to remember to require an entirely new module to make requests w/o a redraw doesn't feel very intuitive to me.

Hang on guys, background: true could be the worst outcome here. The significance of 'background' at the time I asked for it was that it shouldn't block rendering altogether during its lifecycle. What about aiming for superficial parity with the event API checking for options.redraw === false before invoking the callback?

Would there be any way to make cancelling a redraw in m.request be similar to event handlers (e.g. "e.redraw = false") to make Mithril easier to learn?
Personally, since libraries like RxJS support all kinds of fancy ways to combine observables (or promises made into observables), and observables can include network requests, I wonder how much m.request will get used in the way it was intended however it is implemented?

redraw: false would be fine and potentially much clearer to those without 0.2.x context, so :+1: from me.

Anyone else bothered by having the option name explicitly be about the render module in the request module?

I'm not.
I'm also still of the opinion that all the splitting apart of mithril isn't all that valuable. In some cases I find it actually makes determining what mithril is doing way harder. So I guess maybe my opinion isn't that surprising.

@lhorie how about we break the current coupling hook completely, and rewrite the render binding in index JS to take explicit account of the redraw option? That way require stays truly generic and we're looking at an integration wrapper.

@tivac I'm with you but moreover I think it's a fool's errand to try and make the completionCallback API integration generic when it clearly exists specifically for the purposes of redraw.
If we were to rip that part out, the index code would look like this:
m.request = function(){
  var request = requestService.request.apply(this, arguments)

  request.then(redrawService.redraw)

  return request
}

This might be naive, but AFAIK the redraw callback is always deferred (macro-task?) async so any author-land promises deriving from the request would execute as expected before the next render. Does that sound right?

@tivac I'm with you but moreover I think it's a fool's errand to try and make the completionCallback API integration generic when it clearly exists specifically for the purposes of redraw.
If we were to rip that part of the require module out, the index code would look like this:
m.request = function(){
  var request = requestService.request.apply(this, arguments)
  var options = arguments[1] || arguments[0]

  if(options.redraw !== false ) request.then(redrawService.redraw)

  return request
}

This might be naive, but AFAIK the redraw callback is always deferred (macro-task?) async so any author-land promises deriving from the request would execute as expected before the next render. Does that sound right?

why not just rip out all rendering logic from request? You would have to call redraw manually but it allows more user control.

@iamjohnlong I'd be ok with that, but it does complicate usage for what is a pretty common use-case.

Request Data
Process Data
Re-render w/ updated data

Keeping onboarding smooth is important, but so is giving people enough control. It's a balancing act 😕

what domvm 1.x does to keep it decoupled is provide a callback interface for step 2. (i know....so 2014)
internally the ajax wrapper will check if the result of the callback is false, would prevent redraw and return a chainable promise.
you cant really do this with a normal promise chain (as opposed to callbacks) without explicitly chaining your own redaw calls. it's kind of a middle ground.
w.fetch("/data", ..., data => { processData(data); return shouldRedraw; }).then(..)

Some thoughts on the suggestion by @iamjohnlong on removing automatic redrawing from m.request:
There are several different situations where redrawing may need to happen in a Mithril application. These include:

after the user touches the Mithril-generated UI
after the user touches a non-Mithril component which affects data Mithril uses (e.g. a D3 component where you select data that Mithril displays elsewhere as a list)
after a network event completes or otherwise provides updated status
after a timeout from using setTimeout
after cross-window messaging using postMessage
after other browser events like a window resize event that might affect data used in calculating values used in a responsive Mithril-generated UI
others?

I feel automatic redrawing for user-initiated UI events is brilliant and magical. It is the right default because that need to redraw after a user-initiated UI event is so very common. Performance optimization to reduce redrawing can come later if needed. So, that is all worth learning and using.
By contrast, I have mixed feelings on redrawing by default in m.request (as well as all the other cases). Why?
I'm not sure if automatic redrawing in that case is really a net benefit compared to using manual redraws. There are usually few such calls (relative to UI event handling) and they may involve a lot of complexity including error handling or cancelling the request. Just putting in manual redraws and debugging the occasional omissions in network calls seems straightforward. Using functions like m.redraw that provide automatic redrawing by contrast involves a tradeoff of the learning curve for using yet another function to do common operations, learning how to work around that function sometimes to avoid redraws, and then more complex library code to debug through.
I also struggled with the design idea mentioned in Mithril documentation for the original m.request. It seemed to me to imply that somehow the UI should not render until the request is done. There were warnings about needing placeholder values to avoid null reference errors if you want it otherwise. I saw delaying a redraw when making a network request as a problematical idea because you usually want to put up a UI right away and warn the user that network request is in progress -- and then redraw again later when the request was done. I also found the m.request documentation confusing because I did not know if using m.request would block all Mithril redraws until the request was done -- which was one reason I avoided using m.request.
I also was converting an application that already had an infrastructure in place for doing network requests when I learned Mithril. Thus, I would have had an easier time learning and using Mithril if there was no m.request and just a simple example of how to do manual redraws for network requests. Others might have different experiences, so I am not saying my experience was typical. But it still seems likely to me that any JavaScript developer trying Mithril will already have some way they prefer of doing network requests.
If m.request makes sense for convenience (or even just as training wheels), maybe there should also be an m.timeout function that automatically redraws for the same reason? But then m.timeout will have the same issue. People will start using m.timeout for convenience and go up some learning curve for it (e.g. how do you cancel or debug such timeouts?), and then sometimes they will not want to redraw in special cases, and then they will ask this same sort of question again. And will such m.timeout code be more confusing than if people just did standard timeouts they already know how to do and added manual Mithril redraw calls to them?
Since only two of the situations in the list above have automatic redrawing support, a Mithril developer needs to learn how to do manual redraws sooner or later. Maybe sooner is better? On the other hand, m.request is obviously very convenient even if you know how and when to do manual redraws. So, it comes down to expectations and aesthetics about consistency, developer experience, frequency of different needs, and so on as cost/benefit.
Overall it seems to me that if there is an m.request function, then it should redraw by default. Otherwise, what is the point of it in the Mithril library versus using fetch or XMLHttpRequest? But ideally the default redraw should be either easily cancellable or entirely preventable via initial configuration to support performance optimization. If m.request does not support cancelling redrawing, performance optimization can be done by avoiding m.request and using fetch or XMLHttpRequest instead.

Here's my pull request for the proposal I outlined earlier (no documentation, no tests) for technical review: #1444 - the coupling is handled at the index module level.
Passing redraw: false to the options cancels the automatic redraw on resolution, similarly to how mutating events to redraw: false cancels automatic redraw on event handler stack resolution.

For what it's worth, I don't see the issue with m.request(...).then(doSomething).then(m.redraw).

Another possibility is that redraw configuration could involve specifying a function. The default function would wrap UI events or network events to redraw when done. But you could replace it with some other function that behaved differently or set it to null. The default for this function could be set on "m" itself to control the entire application's redraw behavior. Redrawing could still be overrideable for each UI event handler or request as a redraw argument which would be passed to that function. For an example of a similar approach done for Maquette UI events, see: https://github.com/AFASSoftware/maquette/pull/37

I've added back the background: true option

To whom it may concern, I wrote a plugin to wrap mount and redraw such that mounted 'islands' only redraw when explicitly told to — in other words, an opt out of automatic global redraws. Check it out: Mithril Islands


Typer: Implement ConstantSchema

This will unblock Media sample generation.

Added in https://github.com/Azure/autorest.csharp/pull/253


Bruteforce login security

Gitea version (or commit ref): 1.4.0
Git version: Not relevant
Operating system: Ubuntu 16.04
Database (use [ ]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[X] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[X] Not relevant

Log gist:

Description
By default, it is possible to bruteforce login on Gitea...
From reading other topics, it seems fail2ban is the preferred way to protect from these attacks.
IMO This is an important message to tell to new users in the "Installation" docs, including a tutorial on how to set it up (eg. using Docker) - both for gitea login and git login bruteforce attacks.

Since you mention it... how would you set it up? I've looked up usage before, but struggled with understanding.

You prove my point :) we need a tutorial.
And sorry, I don't know

This works for me. But remember that fail2ban is powerful and can cause lots of issues if you do it incorrectly, so make sure to test this before relying on it so you don't lock yourself out.
Gitea returns an HTTP 200 for bad logins in the web logs, but if you have logging options on in app.ini, then you should be able to go off of log/gitea.log, which gives you something like this on a bad authentication:
2018/04/26 18:15:54 [I] Failed authentication attempt for user from xxx.xxx.xxx.xxx
So we set our filter in /etc/fail2ban/filter.d/gitea.conf:
# gitea.conf
[Definition]
failregex =  .*Failed authentication attempt for .* from <HOST>
ignoreregex =

And configure it in /etc/fail2ban/jail.d/jail.local.
[gitea]
enabled = true
port = http,https
filter = gitea
logpath = /home/git/gitea/log/gitea.log
maxretry = 10
findtime = 3600
bantime = 900
action = iptables-allports

Make sure and read up on fail2ban and configure it to your needs, this bans someone for 15 minutes (from all ports) when they fail authentication 10 times in an hour.
I also have other filters looking at the web access logs for HTTP error codes, but I'm guessing this is more effective. Since I run a reverse proxy to gitea with nginx, I also had to add this to my nginx config so that the IPs all didn't show up as <IP_ADDRESS>
proxy_set_header X-Real-IP  $remote_addr;
I would be surprised if there wasn't some kind of rate limiting built in to the app itself to help mitigate, if not it should definitely be looked at.

@4oo4

I would be surprised if there wasn't some kind of rate limiting built in to the app itself to help mitigate, if not it should definitely be looked at.

I don't think there is. I just tried a simple bruteforce attack on my own git, and I could get ~1000 in 10 minutes, not sure if it's my server or gitea that's slowing it down a bit. Anyway, that's 144.000 attempts a day...
And thanks for the guide, I'll try it out.

This doesn't work on my Gitea via Docker - I would be banned from all ports, but still have access to my docker websites, really weird...
So I found this blog post http://www.the-lazy-dev.com/en/install-fail2ban-with-docker/
Create a new fail2ban action file in /etc/fail2ban/action.d/iptables-docker.conf:
[Definition]
actionstart = iptables -N f2b-docker
              iptables -A f2b-docker -j RETURN
              iptables -I FORWARD -p tcp -m multiport --dports 80 -j f2b-docker

actionstop = iptables -D FORWARD -p tcp -m multiport --dports 80 -j f2b-docker
             iptables -F f2b-docker
             iptables -X f2b-docker

actioncheck = iptables -n -L FORWARD | grep -q 'f2b-docker[ \t]'

actionban = iptables -I f2b-docker 1 -s <ip> -j DROP

actionunban = iptables -D f2b-docker -s <ip> -j DROP

Change the action in jail.local gitea section to:
action = iptables-docker
Restart fail2ban.
Can someone confirm this works on their docker setup, so the docs can be updated.

If a site is seeing a brute force attack why be reactionary and not proactive? A proof of work upon login could go a long way.

How can I set this up within my Docker container? Could this be integrated into the default Docker Image?

@Mebus See https://docs.gitea.io/en-us/fail2ban-setup/
But I agree there should be an integrated solution in Gitea.

Any idea how to add bruteforce login security for git clone <myrepo>? Failed logins for git clone are shown without ip addresses. Am I missing something?
2019/08/01 21:44:53 .../xorm/session_get.go:99:nocacheGet() [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `must_change_password`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `language`, `description`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `num_teams`, `num_members`, `visibility`, `diff_view_style`, `theme` FROM `user` WHERE `lower_name`=? LIMIT 1 []interface {}{"sdfwe"}
2019/08/01 21:44:53 ...xorm/session_find.go:199:noCacheFind() [I] [SQL] SELECT `id`, `type`, `name`, `is_actived`, `is_sync_enabled`, `cfg`, `created_unix`, `updated_unix` FROM `login_source` WHERE (is_actived = ?) []interface {}{true}
2019/08/01 21:44:53 ...s/context/context.go:202:HandleText() [E] invalid credentials

Since I run a reverse proxy to gitea with nginx, I also had to add this to my nginx config so that the IPs all didn't show up as <IP_ADDRESS>
proxy_set_header X-Real-IP $remote_addr;

This seems very old issue. Could be please documentation updated? E.g. Add how to set this header in all Reverse Proxies examples here https://docs.gitea.io/en-us/reverse-proxies/.
I came here to check Apache2 solution for the header.

By default, it is possible to bruteforce login on Gitea...
From reading other topics, it seems fail2ban is the preferred way to protect from these attacks.

Yes.

IMO This is an important message to tell to new users in the "Installation" docs, including a tutorial on how to set it up (eg. using Docker) - both for gitea login and git login bruteforce attacks.

Exists already as you linked the article yourself: https://docs.gitea.com/administration/fail2ban-setup

But I agree there should be an integrated solution in Gitea.

I disagree. I don't see how Gitea can do this better than a service that is specialized for these kinds of things.
Every approach to implement it in Gitea will only bloat Gitea substantially.
So, as everything mentioned in this issue has been implemented, I think we can close this one.


Lost validator traces

When I evaluate (utils/tx/evaluate or utilsTxEvaluate()) a validator compiled with traces, I get the generic:
evaluateTx with blockfrost-js:  {
  type: 'jsonwsp/response',
  version: '1.0',
  servicename: 'ogmios',
  methodname: 'EvaluateTx',
  result: { EvaluationFailure: { ScriptFailures: {} } },
  reflection: { id: '46a98ded-f249-41a1-a322-48533a3cc670' }
}

As you can see, ScriptFailures is an empty object, but Ogmios does return the traces. Why isn't this working?

I'll look into this. Could you please provide the transaction CBOR?

Thank you for the prompt response! I simplified the Tx to avoid clutter.
txHex:
585601010032323232322533300232323232324a26012601400460100026010004600c00260086ea8004526153300349011856616c696461746f722072657475726e65642066616c736500136565734ae7155cf2ba157441

evaluateTx with blockfrost-js:
{
  type: 'jsonwsp/response',
  version: '1.0',
  servicename: 'ogmios',
  methodname: 'EvaluateTx',
  result: { EvaluationFailure: { ScriptFailures: {} } },
  reflection: { id: '327042ca-bc80-4946-af25-fa15c3767147' }
}

And this is the validator's source code (aiken v1.1.0+5879dcf).
Compiled with aiken build --trace-level verbose --filter-traces all and checked the wc to see if traces are actually maintained after compilation
validator burn {
  else(_) {
    trace @"this is a trace message"
    trace @"this is another trace message"
    False
  }
}

Awesome, thank you so much!! 🙌

Deployed

Hi, @vladimirvolek! It seems it didn't work. 😕 I'm still getting the same response (same Tx, same setup):
evaluateTx with blockfrost-js:  {
  type: 'jsonwsp/response',
  version: '1.0',
  servicename: 'ogmios',
  methodname: 'EvaluateTx',
  result: { EvaluationFailure: { ScriptFailures: {} } },
  reflection: { id: 'd04605d5-6582-47a5-955d-7e58a8f3d774' }
}

ohh what :D let me check

That's strange. Could you please provide a full example of the payload you're sending? Thanks!

Hi @vladimirvolek! Here's a repo with a full example to reproduce the issue

Hi, @vladimirvolek! Sorry for bothering but is there any news on this? 🙏

Pleeeeeeeeease 🙏

Alright, I have a bit more time now. Thanks for your patience with the delay.

@rober-m https://github.com/rober-m/reproduce-no-traces-blockfrost/issues/1


Can't change years and months

Can't change years and months
chrome
https://www.screencast.com/t/TMm8zPy2VLIy
ie
https://www.screencast.com/t/yZBVn7L2AO

a duplication #93

take a look second video, please
now I have switched to 0.13.0 version - in chrome it is good, but in IE it has the same behavior


Set the WORKDIR to the path where the application code lives

It would be useful to have the WORKDIR set to the path where your application code lives in images created with STI.
That way, it would be possible to call scripts you might have in your code base passing its relative path to docker exec or osc exec.
docker exec -it <container> bash would start in the "right" directory.
If there is no opposition to this idea, I could implement this myself given a pointer to where to start :smile:
pkg/create/templates/docker.go?

templates would be one place, you'll always want to update our existing Dockerfiles for our STI images.  or better, set it in the sti-base Dockerfile since it should be common to all the downstream images.

@bparees it turns out that the WORKDIR is set in the base image, and docker run/exec ... pwd on images generated by sti produces the expected output:
$ sti build git://github.com/pmorie/simple-ruby openshift/ruby-20-centos7 test-ruby-app
$ docker run --rm -it test-ruby-app pwd
/opt/openshift/src

So the problem seems to be within osc exec / kubectl exec. I'm looking into that.

@rhcarvalho so this can be closed?

@bparees yes, closed. kubectl exec is documented to set the working directory for the command to root ('/'), just don't know why (yet).


[api-minor] Deprecate the TextLayer timeout parameter

This has never really been used anywhere within the PDF.js library[1], and when streaming of textContent was introduced this parameter was effectively made redundant.
Note that when streaming of textContent is used, all text-layout has already happened by the time that this timeout-functionality is actually invoked (thus making it pointless).
While the timeout-functionality may still "work" when the textContent is provided upfront, although it's never been used/tested, streaming will generally perform better (in e.g. a viewer setting).
Please note: While unrelated here, also removes a now unused property that I forgot in PR #15259.

[1] At least not since the code was moved into its current file, which happened in PR #6619 and landed seven years ago.

/botio test


Random perf improvements

Codegen tweaks and allocation improvements.
Removing the overheads in the simple Markdown.ToHtml(...) case with the default pipeline.
For an empty string allocations go from 17.14 KB to 928 B and take 1/20th the time because of the default pipeline caching (2af8b1f) - means we're now benefiting from the Renderer caching from https://github.com/lunet-io/markdig/commit/afe4308e918b8afa5d5359d2fab270b4621ef3ab in the basic use cases.
For c776d18 I was quite surprised how bad the compiler is at avoiding these allocations :/

Might wait to merge #481 before merging this one?

And, oh, thank you again, impressed that you still find the time to improve here and there some performance! 😃

Yeah this one should wait to avoid more merge conflicts. I will look at #481 today

Closing this due to all the conflicts - will open new PRs including ideas from this one.


Rework wasm initialization and reduce global state

As discussed, I will eventually need two editor instances side-by-side, so we cannot have global state.
This PR is the beginning of that work. Some global state has been reduced or eliminated, but there's still plenty of work to be done.
I will add further commits as I keep working on it, chipping away at the global state one piece at a time. You can merge anytime you like.
My current plan is as follows:

Step 1: remove global state from the vue app. utilities/{dialog/documents,fullscreen}.ts still contain a lot of them, and I'll need to wrap my head around the response handler logic. On that topic, I'd like to move the stateful code from utilities/ to state/ or somewhere, if that's ok with you?
Step 2: remove global state from the wasm.

This change is

Step two is pretty much trivial, let me know if you need help with that

Step 1 is done. At least the obvious vue state (anything that calls reactive()) is no longer global.
Next up is tackling the WASM, but that may have to wait. Feel free to review/merge until here.

Sorry I've taken so long to get to this. Since the change is rather big, I think I will need to wait a few more days until my Thanksgiving break next week. Then I can dive in over a couple days and give this review the attention it deserves. I very much do not intend to make such delayed reviews a regular thing and I offer my sincerest apologies that this has had to slip my attention lately. School has been a large focus out of necessity, but the end is in sight. Very soon— full steam ahead on Graphite!

I think this is almost ready to go. There is still a class inside documents.ts DocumentSaveState which will be moved to js-messages in my next PR

I've pushed a commit that should fix the unsafe cast, but due to the state of my dev environment, the only tests I've performed is looking for errors in my IDE. Please do a quick smoke test before merging.

As to the rest of the commits, I've read everything and didn't find anything problematic. I really like 5bba08b! From my point of view, this looks ready to merge.
Thanks to both of you for taking the time to work on this!

I've pushed a commit that should fix the unsafe cast, but due to the state of my dev environment, the only tests I've performed is looking for errors in my IDE. Please do a quick smoke test before merging.

This looks like a nice commit, thanks! Unfortunately, though, mouse events aren't working so I can't drag to create shapes, pan to zoom around the canvas, or Ctrl+mousewheel zoom (this isn't preventDefaulted and it lets the browser adjust the web page scale).
I had a quick look and didn't spot an obvious reason for the bug, but perhaps when @mfish33 wakes up he can take a look and debug it. I'm too tired at this point to keep debugging.
I also just finished my last pass through with another full round of code reviews and made a few comments, plus small tweaks to the code which I'm going to commit now.
@cauthmann if you'd like, I can give you write access to the repo and you can push the code to a temporary testing branch and let Cloudflare Pages give you a build, although the downside is that it takes about 15 minutes to get a build.

Oh dear. Please check if this commit fixes it.

That works, thanks for the fix. Except one issue still isn't fixed:

Ctrl+mousewheel zoom (this isn't preventDefaulted and it lets the browser adjust the web page scale).

Here are some bugs that will need to be resolved that I found when QA testing this now:

Layers don't show up in the layer panel at all
After a layer gets selected by clicking on it (but not with box selection), keyboard shortcuts like Delete and ShiftX (swap primary/secondary colors) and G/R/S (grab/rotate/scale) and hotkeys for switching tools and Ctrl1/Ctrl2 (zoom to 100%/200% which should preventDefault so the browser doesn't switch web page tabs but that doesn't work right now) don't work, until clicking outside the viewport area in some of the HTML elements outside it or Shift-clicking somewhere else in the canvas.  This also seems to affect other tools, not just the Select Tool.
After causing a panic (Help > Debug: Panic (DANGER)), every subsequent mouse movement spams it to the console again.
The panic proxy isn't always working. To reproduce: create a shape, save it to a .graphite file, open that file, then use the Select Tool to click on the shape. This panics in master also, but in this branch it shows the Uncaught RuntimeError: unreachable which the panic proxy is designed to suppress. (Because "reachable" is a concept in both Rust and wasm and it's confusing to have two messages show up where many developers will likely assume this means unreachable in Rust, but it's actually a wasm assembly instruction called unreachable.)
File > Close fails and puts this in the console: While handling FrontendMessage ""DisplayConfirmationToCloseDocument"", JavaScript threw an error: JsValue(Error: recursive use of an object detected which would lead to unsafe aliasing in rust

@cauthmann you'll want to take a look at ae18ce8ee340c06c1913efc0b088f2d86d365f10 in which I reverted a couple changes you made, probably at the expense of your multi-editor goal. When you get the chance to run the code on your machine, please submit another (thoroughly tested) PR to address this. But we need to merge this PR now with the regression fixes in that commit linked above.

Re: The runtime checks in the message code.
Unless we automatically generate message types from rust code (using ts-rs or similar), then any changes to the rust side will cause breakage on the javascript side, and it's better to have a cheap runtime check with a proper error message than some semi-random error with an unhelpful description somewhere later.
Especially with code that accesses and parses random wasm memory, I'd prefer to fail before that memory is touched.
This isn't meant to protect against the rust side turning evil, it's meant to protect against commits like 4494993 (and others in this PR), which break stuff in ways that remained undetected.

@cauthmann you'll want to take a look at ae18ce8 in which I reverted a couple changes you made, probably at the expense of your multi-editor goal.

Putting all the event handlers back onto the window will break that entirely, yes.

Re: The runtime checks in the message code.
Unless we automatically generate message types from rust code (using ts-rs or similar), then any changes to the rust side will cause breakage on the javascript side, and it's better to have a cheap runtime check with a proper error message than some semi-random error with an unhelpful description somewhere later.
Especially with code that accesses and parses random wasm memory, I'd prefer to fail before that memory is touched.
This isn't meant to protect against the rust side turning evil, it's meant to protect against commits like 4494993 (and others in this PR), which break stuff in ways that remained undetected.

@mfish33 thoughts?


Cannot use drawPngFile without FS

The examples do not match the latest version.
Our firmware uses drawPngFile to show images from LittleFS.
It was removed in this release. Please give a new example how to use it now.
thx.

Hello, @marten-lucas .
If you want to handle the file system, please write the file system include before the M5GFX.h include.
// This order would work.
#include <FS.h>
#include <M5GFX.h>

// This order does not work.
#include <M5GFX.h>
#include <FS.h>


CancellationToken added to 2.0 IDistributedCache breaks 1.0 based cache implementations

Hi All -
This commit  adds cancellation tokens to some of IDistributableCache members, which causes a MissingMethodException when a 1.0 based implementation is used in a 2.0 project. See here for reference.
The question I have is why make the change a breaking change? Why not leave GetAsync(key) and add the second overload that takes cancellation tokens?
Thanks,
Jeff

Even adding a new overload to the interface would have been a breaking change.

@Tratcher - true, but since its dynamically invoked vs compiled it shouldn't it resolve?

It depends on how it was called, among other things. The issue is moot at this point though because the 2.0 bits have been finalized.


ja: remove docs/setup/release/building-from-source.md

The English page for this was remove between release-1.13 and release-1.14 in #14826.

/assign @nasa9084

/lgtm
/approve


processor (ticdc): fix abnornal metrics

What problem does this PR solve?

Issue Number: close #7764
What is changed and how it works?
Check List
Tests

Manual test (add detailed scripts or steps below)

Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Fix an issue that causes abnornal metrics.

fix by #7952


Messages can be processed before the previous message has completed processing

This issue is now resolved.

This issue is now resolved.


Make snakemake assume bcalm2 output as ancient

We don't want to run bcalm2 everytime our code changes. It happens, because we use some basic functionalities of our code before bcalm2. These functionalities are stable though, so we can assume them to not change by default.

There seems no good solution to this, so I will leave it as it is for now.


queryStarting / queryEqual / queryEnding doesn’t operate like how the documentation suggests

This could certainly be a gap in my knowledge so please excuse me if I have this wrong but the observed behaviour with queryStarting etc isn't what the documentation suggests.
Documentation suggestions:

queryStarting is equivalent to “greater than or equal to”
queryEqual is equivalent to “equal to”
queryEnding is equivalent to “less than or equal to”

Observed behaviour

queryStarting is equivalent to “greater than”
queryEqual doesn’t seem to work at all
queryEnding is equivalent to “less than”

tried on a few data structures but something like the following
message_status
    userkeyblahblah
            messagekeyblah1
                    status_unread: 1
            messagekeyblah2
                    status_unread: 1
            messagekeyblah2
                    status_unread: 1

This returns the 3 key/value's above
let messages = ref.child("message_status/userkeyblahblah/“).queryOrdered(byChild: "status_unread").queryStarting(atValue: 0.5, childKey: "status_unread")
This doesn't return anything (I would expect it to return all 3)
let messages = ref.child("message_status/userkeyblahblah/").queryOrdered(byChild: "status_unread").queryStarting(atValue: 1, childKey: "status_unread")
This doesn't return anything (I would expect it to return all 3)
let messages = ref.child("message_status/userkeyblahblah/").queryOrdered(byChild: "status_unread").queryEqual(toValue: 1, childKey: "status_unread")

@mcdonamp FYI

Sorry for the super slow reply on this!
In regards to queryStarting bounds, your assumptions are right (queryStarting is >=, queryEqual is ==, and queryEnding is <=).
The issue with your examples is the childKey: "status_unread" bit.  You should just remove that in these cases.  It's meant to be used as a "tie-breaker" when there are multiple keys that all have the specified starting value.  E.g. you could do let messages = ref.child("message_status/userkeyblahblah/“).queryOrdered(byChild: "status_unread").queryStarting(atValue: 1, childKey: "messagekeyblah2") to skip over messagekeyblah1.
This is mostly useful when you're implementing paging.  You can get the query value and key of the last item in the page and use it to create a query for the next page (though admittedly, that last item will end up repeated in the next page, since queryStarting performs >= instead of >).


Release KIC v2.8.0

Release Type
minor release
For all releases Github Workflow Test Matrix Checkup

[x] check the testing workflow (.github/workflows/test.yaml) and ensure that all matrix versions (.github/workflows/e2e.yaml and .github/workflows/release.yaml)  are up to date for various component releases. If there have been any new releases (major, minor or patch) of those components since the latest version seen in that configuration make sure the new versions get added before proceeding with the release. Remove any versions that are no longer supported by the environment provider.
[x] Kubernetes (via KIND and the latest image available when creating a new rapid channel cluster from the GKE new cluster wizard)
[x] Istio (via Istio's releases page)

https://github.com/Kong/kubernetes-ingress-controller/pull/3277
For all releases Create Release Branch

[x] ensure that you have up to date copy of main: git checkout main; git pull
[x] create the release branch for the version (e.g. release/1.3.1): git branch -m release/x.y.z
[x] Make any final adjustments to CHANGELOG.md. Double-check that dates are correct, that link anchors point to the correct header, and that you've included a link to the Github compare link at the end.
[x] retrieve the latest license report from FOSSA and save it to LICENSES
[x] ensure base manifest versions use the new version (config/image/enterprise/kustomization.yaml and config/image/oss/kustomization.yaml) and update manifest files: make manifests
[x] push the branch up to the remote: git push --set-upstream origin release/x.y.z

For all releases Create a Release Pull Request

[x] Check the latest test run to confirm that E2E tests are succeeding. If you are backporting features into a non-main branch, run a targeted E2E job against that branch.
Run: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/3732348684
[x] Open a PR from your branch to main.
[x] Once the PR is merged, initiate a release job. Your tag must use vX.Y.Z format. Set latest to true if this will be the latest release.
Run 1: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/3732472974
Last run: https://github.com/Kong/kubernetes-ingress-controller/actions/runs/3734142793
[x] CI will validate the requested version, build and push an image, and run tests against the image before finally creating a tag and publishing a release. If tests fail, CI will push the image but not the tag or release. Investigate the failure, correct it as needed, and start a new release job.

For all releases Publish images to Red Hat Catalog

[x] Verify the image was pushed by a pipeline to the KIC project in Red Hat partners portal to confirm that E2E tests are succeeding. If you are backporting features into a non-main branch, run a targeted E2E job against that branch.
[x] Click publish button for all tags related to the release that were pushed to the portal. That will publish the image to Red Hat Catalog.
[ ] Make sure the latest tag was added when asked. If forgot, the tag can be added from the dropdown menu.
We weren't able to make the latest tag appear in the RH catalog even though it was successfully being pushed to the registry. @czeslavo opened a support ticket in RH to resolve this issue.

For all releases Synchronize documentation with docs.konghq.com

[x] Trigger synchronize_docs workflow.
[x] Ensure the PR is created in docs.konghq.com repository.
[x] Review and approve the PR if everything looks correct.

For major/minor releases only Update Release documents

[x] Create a new branch in the documentation site repo.
[x] Update articles in the new version as needed.
[x] Update references/version-compatibility.md to include the new versions (make sure you capture any new Kubernetes/Istio versions that have been tested)
PR: https://github.com/Kong/docs.konghq.com/pull/4944
[x] Copy app/_data/docs_nav_kic_OLDVERSION.yml to app/_data/docs_nav_kic_NEWVERSION.yml and update the release field to NEWVERSION. Add entries for any new articles.
[x] Add a section to app/_data/kong_versions.yml for your version.
[x] Open a PR from your branch.
PR: https://github.com/Kong/docs.konghq.com/pull/4932
[x] Inform and ping the @team-k8s via slack of impending release with a link to the release PR.

Release Troubleshooting
The Release Troubleshooting guide covers strategies for dealing with a release that has failed.
Manual Docker image build
If the "Build and push development images" Github action is not appropriate for your release, or is not operating properly, you can build and push Docker images manually
Steps

[ ] Check out your release tag.
[ ] Run make container. Note that you can set the TAG environment variable if you need to override the current tag in Makefile.
[ ] Add additional tags for your container (e.g. docker tag kong/kubernetes-ingress-controller:1.2.0-alpine kong/kubernetes-ingress-controller:1.2.0; docker tag kong/kubernetes-ingress-controller:1.2.0-alpine kong/kubernetes-ingress-controller:1.2)
[ ] Create a temporary token for the kongbot user (see 1Password) and log in using it.
[ ] Push each of your tags (e.g. docker push kong/kubernetes-ingress-controller:1.2.0-alpine)

As the release is done, I'm closing this issue. Further actions that can be taken as follow-ups to the release will be tracked under https://github.com/Kong/team-k8s/issues/267.


Add security services to service map

Add Config, Security Hub and Trusted Advisor to service map list
Sort service list to improve code reading

🙌🙌🙌 thanks for the contribution @sbldevnet and welcome to the community!


Return an error if the session signing key is missing

Closes concourse/concourse#2152.
Replaces concourse/atc#267.

Thanks! I actually don't think we need this though as long as we pull in https://github.com/concourse/bin/pull/43, because the flag is already marked required:"true". It's actually just concourse/bin that reconfigures the flag to no longer be required, but once your other PR is merged merged it will make sure it's set on its own.


Remove basic auth for monitoring

Graphite and Icinga both have basic authentication enabled in integration but they are also restricted to only be available from the GDS office, so there's no need for this basic auth at all.

:+1:

:+1:


[release-2.1] Unified Log Format

Signed-off-by: Breezewish<EMAIL_ADDRESS>
What have you changed? (mandatory)
This PR cherry picks the unified log format formatter from 3.0 to 2.1.
Note: This PR does not introduce fields for log items.
What are the type of the changes? (mandatory)

New feature (change which adds functionality)

How has this PR been tested? (mandatory)
Manually and unit tests:
$ target/debug/tikv-server
[2019/07/13 11:44:14.561 +08:00] [INFO] [mod.rs:26] ["Welcome to TiKV. \nRelease Version:   2.1.14\nGit Commit Hash:   Unknown (env var does not exist when building)\nGit Commit Branch: Unknown (env var does not exist when building)\nUTC Build Time:    Unknown (env var does not exist when building)\nRust Version:      Unknown (env var does not exist when building)"]
[2019/07/13 11:44:14.563 +08:00] [INFO] [config.rs:152] ["no advertise-addr is specified, fall back to addr."]
[2019/07/13 11:44:14.564 +08:00] [ERROR] [tikv-server.rs:441] ["invalid configuration: StringError(\"please specify pd.endpoints.\")"]

/run-integration-tests tidb=release-2.1 pd=release-2.1 tidb-test=release-2.1

@siddontang @BusyJay PTAL, thanks!

/run-integration-ddl-test tidb=release-2.1 pd=release-2.1 tidb-test=release-2.1

/run-integration-ddl-test tidb=release-2.1 pd=release-2.1 tidb-test=release-2.1

Why change the log format for 2.1? I think only bugfix is accepted.

@BusyJay Required by TEP team. I don't want to change it either.

/run-integration-ddl-test tidb=release-2.1 pd=release-2.1 tidb-test=release-2.1

PTAL @BusyJay


raw cells should not stay in a pending exec state

Fixes #9633

Codecov Report

Merging #9634 (cb3aa1b) into main (42e3f38) will increase coverage by 0%.
The diff coverage is n/a.

@@         Coverage Diff          @@
##           main   #9634   +/-   ##
====================================
  Coverage    72%     72%
====================================
  Files       194     194
  Lines      8425    8428    +3
  Branches   1230    1231    +1
====================================
+ Hits       6119    6123    +4
+ Misses     1838    1836    -2
- Partials    468     469    +1

Impacted Files
Coverage Δ

src/platform/commands/serverSelector.node.ts
89% <0%> (-2%)
:arrow_down:

src/platform/api.ts
57% <0%> (+<1%)
:arrow_up:


Draft: Voting For Proposals

Draft, not ready yet.
Fixes #5.

I think I'm going to move most of the Tweet Proposal stuff out of the ERC721 and into the main gov contract, following a similar design to the Compound Gov contract.
Reasons:

Proposing tweets right now costs LOADS of gas, because the NFT is created on the proposal creation, not when the thing is actually tweeted. Would be better if that was left to the last voter, and the NFT is a reward.
Managing who voted what, how many votes something has, removing votes when a proposal is tweeted, etc; is unnecessarily tough when it's spread over two contracts (gov and erc721) rather than just the one.


Update version for the next release (v0.4.1)

Don't forget the skip-changlog label :)

bors merge


6800XT OpenCL bad parallel compute performance

I'm transitioning my workloads from old and failing 803gfx WX cards to new 1030gfx cards. I have a test setup with a 6800XT where i encounter an issue where first two workloads i dispatch are treated with somewhat equal priority and are executed quite fast, but every consecutive program that uses OpenCL seems to be disproportionately disadvantaged and executes at what seems like 1:3 rate, until the first workloads finish and next ones can be "promoted".
The 803gfx WX cards behaved differently, no matter how overburdened they divided compute time equally. Typically i was running 10-15 workloads in parallel. Even though the new card has more compute ability the limitation reduces it to nearly sequential ( 2x, but still not parallel 15x ) execution.
Does anything immediately comes to mind? Maybe there's some configuration specific to gaming performance that could be responsible for such behaviour? I noticed in the kernel module available options as shed_jobs, shed_policy, shed_hw_submissions, compute_multipipe but i'd love to avoid diving into a rabbit hole if you can direct me to best possible solution.
Btw, ROCm + 1030gfx, very much welcome, any time, please. ;]

Hi @aoolmay
Thanks for reaching out.
Navi is not supported with ROCm. Until then, I can not comment on this issue.
Please stay tuned for some time so that the support will be enabled.
Thank you.


Added new links

Left Whitepapers link unchanged because we don't have them hosted anywhere yet

Description

Fixes Issue # .
Type of change

[ ] Bug fix.
[ ] New feature.
[x] Enhancement.
[ ] Unit test.
[ ] Breaking change (a fix or feature that causes existing functionality to not work as expected).
[ ] Requires documentation update.

Testing

I think the link labels need to be revised as well, for example:

"Mining Docs" -> "Validators Docs"
"Aion" -> "OAN" where appropriate

I think the link labels need to be revised as well, for example:

"Mining Docs" -> "Validators Docs"
"Aion" -> "OAN" where appropriate

Good catch!
I just updated the mining references to include validation too, and at some places keeping them both, to not confuse the people who have known mining
Aion ->OAN won't be applicable in these cases as far as I can see, since this works closely with validator experience, instead of developer experience. But correct me please if I am wrong.


Duplicate Session for client and gateway

At the moment, there is a lot of indirection between tunnel, session, control planes etc. I think this is a lot easier to understand if we don't have as many type parameters and instead, create one Session type per "kind" of deployment: Clients and gateways.
This is an initial start, there is now some duplication between gateways and clients. I'd recommend patch-by-patch review.
I originally started this to do https://github.com/firezone/firezone/issues/2158 but that is not possible until we have concrete message types within each Session, hence I am sending this PR first.

I've been on the fence of separating the gateway/client for a while now, so I like this, now it looks like a lot of duplicated code but when we start using phoenix-channel I figure it will get much better.

Do you have a preference in which order you want to merge things? I've been careful during the refactoring but I didn't do any manual tests of this. Are you happy for this to be merged once I fix the merge conflicts?

@thomaseizinger yeah, all looks good from my side


revise recent projects flow to be less confusing

Edit: we changed the flow, links do show but are disabled if the workspace is in a non-starting pending state, and we started the workspace automatically negating the need to even have the manual controls
Previously recent workspaces had a status icon which looked a bit like a button to push, and the start workspace button could be confused as the cta to open a project.
Now the project links in recent projects only display once the workspace is running and ready to accept connections, and the confusing icon has been removed.
I think this flow is pretty clear, but people used to just clicking the link might freak out when they don't see their links or be frustrated they need to press two buttons.
An alternative option could be to remove the workspace start button entirely, since following a project link should start the workspace if required.
https://github.com/user-attachments/assets/c9e2b47a-66be-4d19-80d2-e87b8d29f25d

Oh forgot, we should also update the changelog and make sure we describe when the links are enabled and that the manual controls are replaced in favor of automatically starting the workspace.

resolves #436


Doesn't compile from command line.

Mostly because ld can't find symbols. Adding a blueutil.h with following content fixed it for me:
//
//  blueutil.h
//  blueutil
//
//  Created by Brian Reiter on 4/27/15.
//
//

#ifndef blueutil_blueutil_h
#define blueutil_blueutil_h

int BTPowerState();
int BTSetPowerState(int powerState);
void BTStatus();

#endif

Now it compiles with clang -framework Foundation -framework IOBluetooth -o blueutil blueutil.c (or clang++ -framework Foundation -framework IOBluetooth -o blueutil blueutil.m for the ObjC version).
It may also be noted that if Bluetooth can't be activated via the control panel, neither can blueutil. But that's a different  issue.

But that's a different issue.
BrcmPatchRAM. Afterwards blueutil works fine on 10.15.


Extended configuration options of maven plugin

Added parameter to specify service class packages.
Added parameter "serviceClasses" to allow specification of multiple
classes.
Marked parameter "serviceClass" as deprecated.
Added patterns for service class whitelist and blacklist of classes.

@raphaeljolivet, I hope You'll take a look at this commit, as I'll try to focus only on java2typescript-jackson.
@maylukas, one thing to note, is that reformatting all lines (especially in a commit that contains real changes) isn't nice.


Add AppendFloat16ArrayToTensorProto to acclerate tf.constant for float16

Related with #19180.
It seems that cython doesn't support np.float16_t by now, we use np.uint16 instead.

Performance comparison:
before:
float32: 0.0535 sec
float16: 13.7567 sec

after:
float32: 0.0496 sec
float16: 1.0815 sec

script:
import time
images = np.random.rand(128, 100, 100, 3)
imagesFloat16 = images.astype(np.float16)
imagesFloat32 = images.astype(np.float32)

start = time.time()
constant_op.constant(imagesFloat32)
end = time.time()
print("float32: {0:.4f} sec".format(end - start))

start = time.time()
constant_op.constant(imagesFloat16)
end = time.time()
print("float16: {0:.4f} sec".format(end - start))

@facaiy Thanks for the improvement!

The failure seems unrelated?
======================================================================
261
FAIL: testPostPruningOfAllNodes (__main__.UpdateTreeEnsembleOpTest)
262
Test growing an ensemble with post-pruning, with all nodes are pruned.
263
----------------------------------------------------------------------
264
Traceback (most recent call last):
265
  File "T:/src/github/tensorflow/tensorflow/python/kernel_tests/boosted_trees/training_ops_test.py", line 1393, in testPostPruningOfAllNodes
266
    """, res_ensemble)
267
  File "C:\Python35\lib\site-packages\tensorflow\python\framework\test_util.py", line 881, in assertProtoEquals
268
    self._AssertProtoEquals(expected_message, message, msg=msg)
269
  File "C:\Python35\lib\site-packages\tensorflow\python\framework\test_util.py", line 858, in _AssertProtoEquals
270
    compare.assertProtoEqual(self, a, b, normalize_numbers=True, msg=msg)
271
  File "C:\Python35\lib\site-packages\tensorflow\python\util\protobuf\compare.py", line 107, in assertProtoEqual
272
    msg=msg)
273
AssertionError: 'tree[570 chars]4.0143\n  }\n}\ntree_metadata {\n}\ngrowing_me[88 chars]n}\n' != 'tree[570 chars]4.014299\n  }\n}\ntree_metadata {\n}\ngrowing_[90 chars]n}\n'
274
Diff is 849 characters long. Set self.maxDiff to None to see it. :
275
276
----------------------------------------------------------------------

Thanks!


Proposed Changes to Enable Custom Titles for Notes

Hi, this is my first little "contribution" so I apologize in advance if I submitted this wrong.
My proposed changes refer to the way the notes are stored on the phone. If we add a title property to the NoteListItem class and store each note as an object we can easily edit the title independently of the actual content of the note.
I attached some examples I cooked up in Kotlin to demonstrate what I mean. If you have any question about anything please feel free to contact me :)

// this is a singleton class with two static methods that handle the saving and loading of notes to and from storage

object InternalStorage {
    @Throws(IOException::class)
    fun writeObject(context: Context, filename: String, note: Note) {
        val fos: FileOutputStream = context.openFileOutput(filename, Context.MODE_PRIVATE)
        val oos = ObjectOutputStream(fos)
        oos.writeObject(note)
        oos.close()
        fos.close()
    }

    @Throws(IOException::class, ClassNotFoundException::class)
    fun readObject(context: Context, filename: String): Note {
        val fis: FileInputStream = context.openFileInput(filename)
        val ois = ObjectInputStream(fis)
        return ois.readObject() as Note
    }
}

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        // these are example notes, they are commented out because I only needed to store them once and
        // don't want to save them every time I open the app
        // val notes = listOf(Note("stop right there", "stop"), Note("go on ahead", "ahead"), Note("leave without me", "w/o"))
        // notes.forEach { InternalStorage.writeObject(this, it.hashCode().toString(), it) }

        var files: Array<String> = fileList() // this returns every file in storage
        var titles: List<String> = files.map { InternalStorage.readObject(this, it).title } // get title from every entry

        // the code below is for displaying the notes in a list view, this is very similar to the already existing code inside the app
        val adapter: ArrayAdapter<String> = ArrayAdapter(this, android.R.layout.simple_list_item_1, titles)
        val listView = findViewById<ListView>(R.id.list_view)
        listView.adapter = adapter
    }
}

Upon further testing I noticed that this method is not entirely reliable, which is why I looked for another method and found this:
https://stackoverflow.com/questions/29645492/how-to-save-a-custom-java-object-in-android/29647077
https://github.com/google/gson
This method is serializes the Object as a JSON string saves it in sharedPreferences. Initial tests are looking promising 👍

Ideally, I'd like to see the app utilize Room as it's data store, that way we could store note contents (and titles) in a database instead of as plaintext.  Though that would be a pretty hefty lift as we'd need to write code to check for any existing plaintext notes and migrate then over to the Room database.
I agree, serializing objects to disk is not a reliable approach (I ran into issues doing that with Taskbar a few years ago)
I don't think keeping everything inside SharedPreferences is a great idea either, as SharedPreferences is really only meant for simple key/value pairs (there's no limit to the size of notes, and I'm not sure if SharedPreferences can effectively handle large chunks of data like that).
I could see a hybrid approach working though, where we keep the note contents as plaintext and then store only note titles inside SharedPreferences. Feel free to code a solution up for this, if you'd like 🙂


[BACKLOG-41229] - Decode PVFS File Paths: PDI - Browse - Select a file from VFS

Jira bug - https://hv-eng.atlassian.net/browse/BACKLOG-41229.
Attachment containing changes after code fix :

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 7m 19s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 7m 21s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 23m 23s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 7m 34s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message

:white_check_mark: Build finished in 29m 39s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
core,plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 1385, Failures: 0, Skipped: 1    Test Results

:information_source:  This is an automatic message

:white_check_mark: Build finished in 7m 36s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 24m 46s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl \
plugins/file-open-save-new/api,plugins/file-open-save-new/core

:ok_hand: All tests passed!
Tests run: 66, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message


NIDD device support in leshan.

Hi,
leshan version : 1.1.0
I have a usescase to integrate with the NIDD device.

Binding Mode comes with the type N
Content format is senml CBOR.
Need to pass few parameters like externalId to the connector and then to proxy.

I have written  encoder and decoder class to support cbor and own connector class.
Now, registration is failing because binding mode 'N' is not supported in leshan.
To support my usecase, following three changes are required in leshan .

Add BindingMode N in BindingMode class of leshan-core.
Add contentformat SENML_CBOR_CODE = 112 and SENML_JSON_CODE=110 in ContentFormat class of leshan-core.
For every downlink , I am passing extra parameters in the context which are  required to be passed to connector.
If the context passed then we can have the same context to be passed to connector instead of creating new?

For example in method sendCoapRequest of RequestSender in leshan-server-cf ?
// Define destination
if(null == coapRequest.getDestinationContext()) {
      EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
      coapRequest.setDestinationContext(context);
}

org.eclipse.leshan.server.californium.request.RequestSender
	public Response sendCoapRequest(Identity destination, String sessionId, Request coapRequest, long timeoutInMs,
            boolean allowConnectionInitiation) throws InterruptedException {

        // Define destination
    	if(coapRequest.getDestinationContext() == null) {
    		EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
            coapRequest.setDestinationContext(context);
    	}

        // Send CoAP request synchronously
        CoapSyncRequestObserver syncMessageObserver = new CoapSyncRequestObserver(coapRequest, timeoutInMs);
        coapRequest.addMessageObserver(syncMessageObserver);

        // Store pending request to be able to cancel it later
        addOngoingRequest(sessionId, coapRequest);

        // Send CoAP request asynchronously
        if (destination.isSecure())
            secureEndpoint.sendRequest(coapRequest);
        else
            nonSecureEndpoint.sendRequest(coapRequest);

        // Wait for response, then return it
        return syncMessageObserver.waitForCoapResponse();
    }

   public void sendCoapRequest(Identity destination, String sessionId, Request coapRequest, long timeoutInMs,
            CoapResponseCallback responseCallback, ErrorCallback errorCallback, boolean allowConnectionInitiation) {

        Validate.notNull(responseCallback);
        Validate.notNull(errorCallback);

        // Define destination
    	if(coapRequest.getDestinationContext() == null) {
    		EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
            coapRequest.setDestinationContext(context);
    	}

        // Add CoAP request callback
        MessageObserver obs = new CoapAsyncRequestObserver(coapRequest, responseCallback, errorCallback, timeoutInMs,
                executor);
        coapRequest.addMessageObserver(obs);

        // Store pending request to be able to cancel it later
        addOngoingRequest(sessionId, coapRequest);

        // Send CoAP request asynchronously
        if (destination.isSecure())
            secureEndpoint.sendRequest(coapRequest);
        else
            nonSecureEndpoint.sendRequest(coapRequest);
    }

Could you please add these changes in leshan so that we can support nidd devices?

This is LWM2M v1.1 feature so this should be added to 2.0.0 branch.
There will be frequent release but API will be probably break frequently.

Add BindingMode N in BindingMode class of leshan-core

I could add this to my priority list.

Add contentformat SENML_CBOR_CODE = 112 and SENML_JSON_CODE=110 in ContentFormat class of leshan-core

I plan to work on those new content format just after binding mode.
Do you want to share your encoder/Decoder ? is it inspired by #681 or LwM2mNodeSenMLJsonEncoder
Which JSON/CBOR library are you using ?

For every downlink , I am passing extra parameters in the context which are required to be passed to connector.
If the context passed then we can have the same context to be passed to connector instead of creating new?

I pretty sure I don't get it.
But can LowerLayerConfig do the job ?

Yes, I can pass the cbor encoder/decoder but it does normal serialize/deserialize .  It does not implement NodeEncoder . Let me know if this helps .
I have used jackson library.

com.fasterxml.jackson.dataformat
jackson-dataformat-cbor
${com.fasterxml.jackson}

I am directly framing coapRequest and setting destination context  and sending.
       Request coapRequest = new Request(Code.GET);
		if(null != payload) {
			coapRequest = new Request(Code.FETCH);
			coapRequest.setPayload(payload);
		}
		coapRequest.getOptions().setContentFormat(contentFormat);
		coapRequest.getOptions().setAccept(contentFormat);

		EndpointContext context = null;
		if(LeshanUtility.isNonIPTransport(registration)) {
			context = getEndpointContext(registration.getIdentity(), registration.getEndpoint());
		}

                   coapRequest.setDestinationContext(context);

		LeshanServer leshanServer = leshanServerBean.getLeshanServer(registration.getBindingMode());
		Response response = leshanServer.coap().send(registration, coapRequest, SEND_TIMEOUT);

My downlink request looks like this . I am setting the endpointContext but it is always framed new in RequestSender class.
My request was to set the endpointContext only if it is null like below.
public void sendCoapRequest(Identity destination, String sessionId, Request coapRequest, long timeoutInMs,
CoapResponseCallback responseCallback, ErrorCallback errorCallback, boolean allowConnectionInitiation) {
    Validate.notNull(responseCallback);
    Validate.notNull(errorCallback);

    // Define destination
	if(coapRequest.getDestinationContext() == null) {
		EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
        coapRequest.setDestinationContext(context);
	}

    // Add CoAP request callback
    MessageObserver obs = new CoapAsyncRequestObserver(coapRequest, responseCallback, errorCallback, timeoutInMs,
            executor);
    coapRequest.addMessageObserver(obs);

    // Store pending request to be able to cancel it later
    addOngoingRequest(sessionId, coapRequest);

Yes, I can pass the cbor encoder/decoder but it does normal serialize/deserialize . It does not implement NodeEncoder . Let me know if this helps .
I have used jackson library.

We get recent discussion about that : https://github.com/eclipse/leshan/issues/866#issuecomment-696228053
And currently conclusion is to use com.upokecenter:cbor
Could you share why you choose : jackson-dataformat-cbor ?

I am directly framing coapRequest and setting destination context and sending.

I just get that you are sending coap request and not LWM2M request.
Is there any reason about that ?
I believe I get you point this time, if you set an endpoint context on your coap request you don't want leshan override it.
We could find a solution for this.
Maybe if I merge existing EnpointContext with new one ? (if there is conflict we keep user key + warn log?)

Maybe if I merge existing EnpointContext with new one ? (if there is conflict we keep user key + warn log?)
Yes this will be very helpful .

I just get that you are sending coap request and not LWM2M request.
Is there any reason about that?
Still composite operations are not supported , so I am using coapRequest.

Could you share why you choose : jackson-dataformat-cbor ?
We are using jackson for mapping json so using same for cbor as well.

Add BindingMode N in BindingMode class of leshan-core.

Step 1 done. @madhushreegc, you could have a look at #908.

@madhushreegc  about :

Maybe if I merge existing EnpointContext with new one ? (if there is conflict we keep user key + warn log?)

I start some try.  About key merging should not be an issue.
But an EndpointContext is also a peerAddress and some time a principal and a virtualhost.
So I'm not sure what could mean merging this ...
Maybe we need to give up this "merge idea" and go back to you simple "if not null" solution ?

@sbernard31 Yes, null check would be the good approach because user can pass their own endpointContext.

@madhushreegc, I created #914.
There is a warning when you are using custom endpointcontext to avoid this is not done on purpose.
You can get rid of this warning by change log level of this class. Tell if this is OK for you or if  we should introduce a way to remove warning by request (maybe by adding a specific key in the endpoint context ?)
(let's talk about that at #914)

@sbernard31, This is fine for me .
Thank you .

@sbernard31
I think this should be like this.
If it is not null, we are not doing anything and sending the context sent in request else Leshan is creating.
if clause should check == null  like below.
if (coapRequest.getDestinationContext() == null) {
EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
coapRequest.setDestinationContext(context);
} else {
LOG.warn(
"Destination context was not set by Leshan for this request. The context is used to ensure your talk to the right peer. Bad usage could bring to security issue. {}",
coapRequest);
}

Good catch. I thought I already fixed this but visibly I didn't push it ... :facepalm:
Thx to report it. (Do not hesitate to directly put the comment on the concerned PR next time :wink:)

So

step 1 done (#908),
step 2.1 SenML JSON : done (#911),
step 2.2 SenML Cbord : I'm working on.
step 3 : done (#914).

We will probably need more step to use Composite operation. About this which composite operation are you using ?

Ok . Thank you.
I am using all composite operations like composite-read, composite-write, composite-observe and cancel composite-observe .

Hi, some updates :
step 1 : binding mode : done (#908),
step 2.1 SenML JSON : done (#911),
step 2.2 SenML Cbord : done (#922, #937)
step 3 : custom endpoint context : done (#914).
All of this should be available in 2.0.0-M2, so I think we can close this issue ?
I will probably release a 2.0.0-M2 either at the end of the week or after my vacation (begin of January).
Next feature I plan to work on will probably be  "composite operation" or "send operation".
For composite operation, the first step will be to think about a consistent API :thinking:

Yes,
we can close the case . Thank you so much.

Hi ,
Could you please add below line of code for CoapRequestBuilder setTarget methods as well as you did it for sendCoapRequest methods?
// Define destination
if (coapRequest.getDestinationContext() == null) {
EndpointContext context = EndpointContextUtil.extractContext(destination, allowConnectionInitiation);
coapRequest.setDestinationContext(context);
} else {
LOG.warn(
"Destination context was not set by Leshan for this request. The context is used to ensure you talk to the right peer. Bad usage could bring to security issue. {}",
coapRequest);
}
If you add, I can use the sendLwm2mRequest method exposed for all single and composite downlink operations.

I'm not sure to get you :thinking:
Previously in sendCoapRequest(),coapRequest.getDestinationContext() could be null because you passed the request and so you could have set a context.
But in this case how coapRequest.getDestinationContext() could be not null ? how do you set the context ?

Yes, coapRequest.getDestinationContext() cannot be null because you are generating there, we have to make a provision to pass the destinationContext to this layer. I am using NIDD device , to support that I have to pass my own destinationContext to the connector .

I have written encoder and decoder class to support cbor and own connector class.

If you have your own connector, maybe you implement also a EndpointContext and a EndpointContextMatcher for it. The available ones e.g. UdpEndpointContext and UdpEndpointContextMatcher may be a good point to start.

Do you try to use LowerLayerConfig ? This should allow you to modify the CoAP request created.

If you have your own connector, maybe you implement also a EndpointContext and a EndpointContextMatcher for it. The available ones e.g. UdpEndpointContext and UdpEndpointContextMatcher may be a good point to start.

I guess this is pretty much what @madhushreegc did or maybe he just reuses existing one.
But in all case the issue for him is that Leshan create endpointContext "automagically", which is good most of time because this way users don't need to think about this.
But in his case, he need to create a custom endpointContext. Maybe LowerLayerConfig could help but probably the best way would be to think about a way to support new transport layer to Leshan based on californium (coap-tcp or NIDD) or some other framework. (for http or mqtt)

@madhushreegc I created an issue to think about adding transport layer (see #1025)
If you want/can please share what you do to support your NIDD devices ?

Yes, We have  implemented own connector with own EndpointContextMatcher . I am passing necessary details to connector via endPointContext .

I have not tried with LowerLayerConfig  .  I will try this . Thank you ..

Ok let we know if it works with it :slightly_smiling_face:

Do you succeed to make it work ? should we close this issue ?

No, I did not try this . We can close now , I will try when I have time . Thank you.


Loss is causing the program to crash

Hi,
I've tried running both the optimized and the non-optimized version of your loss and both caused an exception.
It seems that there is an issue with the self.target (is == None) in the optimized version and a shape issue with the non-optimized version.
What is the proper shape of the target in your loss?
Thanks

i have added an example to 'infer'py' that shows how to calculate the loss.
(the target should be 1-hot vector)
also fixed a bug in AsymmetricLossOptimized.
thanks for noticing
    # example loss calculation
    output = model(tensor_batch)
    loss_func1 = AsymmetricLoss()
    loss_func2 = AsymmetricLossOptimized()
    target = output.clone()
    target[output < 0] = 0
    target[output >= 0] = 1
    loss1 = loss_func1(output, target)
    loss2 = loss_func2(output, target)
    assert abs((loss1.item()-loss2.item()))<1e-6


KAFKA-12583: Upgrade netty to 4.1.62.Final

This security vulnerability was found in netty-codec-http2, but caused by netty itself and fixed in 4.1.60.Final. So, upgrade the netty version from 4.1.59.Final to 4.1.62.Final.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@omkreddy @tombentley Please have a look.
@vvcephei @mimaison It should be included in 2.8.0 and 2.7.1. Isn't it?

This doesn't affect our project since we don't use http2, still good to merge the upgrade.

I cherry-picked to 2.8 as well.


Add tests target that uses simplejson

https://github.com/pallets/flask/issues/1602#issuecomment-154127373
Should add tox envs for testing flask.json with simplejson installed.  Possibly add this to the travis matrix.

Are there any specific features of simplejson we want to test, or just run the regular tests with simplejson?

Just for the future, "Fixed #1846" is not a really good commit message. It's meaningless without extra context (going to github). Also, your Git is configured to commit with the email<EMAIL_ADDRESS>- might want to fix that :)

Good catch @ThiefMaster sorry I overlooked this.

#1869


DOCS(README.md): Fix typo

Minor typo: componenets -> components

Thank you for pointing this out!


French translation

Hello,
Only to propose the User interface french translation.

John, this is great! Thank you so very much.
To get me back up to speed, what more needs to be done?  Do we need to add a dropdown control to so the user can pick a language, or is the language selection going to be done by the browser based on the user's locale?
I'm about ready to reengage with this project again after working on something else for awhile. I look forward to including this in the next release.

Anytime! ;-)
I think both options can be considered.
As far as I have understand Flask can automatically set a language depending of the browser locale (this is a great feature) but a drop-down list is also very nice to have :)


How can I get started? and ,how can I customize code if I just want to get id3 information about music  under embemed arm linux?

can someone give me some examples and docments ,thank you ,very much!!!

//General information
/// Get all details about a file in one string
/// @brief Get all details about a file
/// @pre You can change default presentation with Inform_Set()
String Inform (size_t Reserved=0);
above information,How can I do it ,I am just confused now ,and not clear about and code structure

if I just want to get id3 information

goal of MediaInfo is to have the same interface for all formats. So it may be not convenient for you if you look for specific ID3 information.

String Inform (size_t Reserved=0);

Template engine lacks of doc, we are looking for sponsors for it.
quick notes:
template with MediaInfo::Option("Inform", Template) , some template examples here
Some additional info for each MediaIfo field here
some examples about the API

I'd like to appreciate your answer, thank you once again, "Inform" is to get detailed information from "knowned result", How can customize the read styles(knowned result,) when read a file using MediaInfoA_Open, Now what can I do if I just want "performer ,artist ,genre,duration" about a song ,can eveything else be ignored to accelerate the speed。look forwar to you reply !!!

@JeromeMartinez hi,JeromeMartinez,can you do me a favor to reply it ?


[RESOLVED] S100-Santiago has been restarted (uptime < 10m)

Problem started at 06:04:37 on 2023.06.02
Problem name: S100-Santiago has been restarted (uptime < 10m)
Host: S100-Santiago
Severity: Warning
Operational data: 00:00:19
Original problem ID: 23073
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23522&eventid=23073

Problem has been resolved in 52m 25s at 06:57:02 on 2023.06.02
Problem name: S100-Santiago has been restarted (uptime < 10m)
Host: S100-Santiago
Severity: Warning
Original problem ID: 23073


script button

Any one is able to add a script button to the floor plan? ie. script.bedroomlamp. I only can get it to work for switches.

Hi Thanksmister,
Is there a way i can run script or automation? so far i can only get it to
work with switches.
Please kindly advise. Thank you.
[image: image.png]
Regards,
Alvin
On Tue, Jun 18, 2019 at 8:11 PM Michael Ritchie<EMAIL_ADDRESS>wrote:

Closed #92 https://github.com/thanksmister/wallpanel-android/issues/92.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/thanksmister/wallpanel-android/issues/92?email_source=notifications&email_token=AKXJGBWKJSHJJ47ZKB6OMQLP3DGILA5CNFSM4HUGTYSKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSBDYONQ#event-2420606774,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKXJGBRX2WCDBOPEADP4BHDP3DGILANCNFSM4HUGTYSA
.


Lets Encrypt

Lets Encrypt is in public beta since a couple of weeks and it would be nice if we could document a way for people to use it

[x] on docker
[ ] on heroku
[ ] on ubuntu

Personally, I don't like the official client because it does too much. simp_le looks promising.
Any thoughts? Is someone already using Lets Encrypt on a side project?

:+1:

Docker support is already available; since all it does is export the paths with the certs and keys; as per the docs; so that part is done.
For heroku the process is a bit more involved; I am playing with this right now to see how it can be automated.
For Ubuntu (this is next on my list to try) - the process should be very similar to that of docker.  The key point being you have to manually extract the ACME key and create the end point for it - as typically you do not run the commands directly on your production servers.
I can cook up something for this.

Good idea! As a beginner I also already managed to set this up on a private project, promising technique! As a docker beginner I haven't tried it on my cookiecutter-django project yet, we should also describe how to setup some sort of auto renewal function since the certificates are only valid for (3?) a short period of time.

I have this setup with Docker (changes to docker-compose and nginx config) and think it would be a great addition to the project.
I could submit a PR that offers automatic letsencrypt support as long as Docker is chosen.
@jayfk What is the opinion of the core maintainers on adding support incrementally by development/ deployment method?

@chrisdev was working on this today at the Cookiecutter sprints at PyCon. Perhaps @chrisdev and @mjsisley could collaborate together?

@jayfk What is the opinion of the core maintainers on adding support incrementally by development/ deployment method?

I think that's the best way :). We won't find a solution for all kinds of deployment methods over night.
I've used Caddyserver in the past that has built in letsencrypt support. If someone is working on this, take a look at:

Caddyfile https://github.com/pydanny/djangopackages/blob/dockerize/compose/caddy/Caddyfile
Dockerfile https://github.com/pydanny/djangopackages/blob/dockerize/compose/caddy/Dockerfile

Lets Encrypt already launched their official client certbot with automated as well as advanced installation doc for different web-server and operating system.

For Heroku I used https://github.com/dmathieu/sabayon and it worked great.


Deal with the changes to user agreement of Anaconda.

We wish to replace the conda package in the docker image due to a change in Anaconda's terms of service.
Currently, you are using miniconda, but it contains packages that were put in via repo. anaconda.com.
If possible, we would like you to change the package based on miniforge with conda-forge.
Or, we would like to ask you to share the dockerfile of the docker image itself.
Sincerely yours,

This is an example of Dockerfile:
FROM kyanagis/gromacs:2024.2-cuda12.0.0-avx2_256

ENV CONDA_DIR=/miniconda3
ENV PATH=$CONDA_DIR/bin:$PATH
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-Linux-x86_64.sh \
    && bash Miniconda3-py39_24.5.0-0-Linux-x86_64.sh -b -p $CONDA_DIR \
    && rm -f Miniconda3-py39_24.5.0-0-Linux-x86_64.sh

RUN conda config --add channels conda-forge
RUN conda config --remove channels defaults
RUN conda install -y mamba
RUN mamba update conda
RUN mamba install -y \
    ambertools=21.0 netcdf4 numpy=1.22.4 biopython \
    jinja2 griddataformats \
    parmed git pyyaml \
    tqdm scikit-learn gputil joblib

Could you check whether it satisfies your demand and it works in your environment?

If it works well, I will update the image on dockerhub (it will be "exprorer_msmd:2024.12.10")

Thank you for your response.
I tried to build a docker container using the Dockerfile, but due to Anaconda's license I cannot connect to “https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-Linux-x86_64. sh” because of the Anaconda license.
Therefore, I arranged the Dockerfile as follows. And we checked  the build and work. We would appreciate it if you could refer to this Dockerfile.

We used miniforge3.
The name of $CONDA_DIR wasn't changed.
The command of "--remove channels defaults" was removed.
Python3.9 was installed.

Since your recipe resulted in tleap error, I slightly modify. Could you check it?
FROM kyanagis/gromacs:2024.2-cuda12.0.0-avx2_256

ENV CONDA_DIR=/miniforge3
ENV PATH=$CONDA_DIR/bin:$PATH
RUN wget https://github.com/conda-forge/miniforge/releases/download/24.9.2-0/Miniforge3-24.9.2-0-Linux-x86_64.sh \
    && bash  Miniforge3-24.9.2-0-Linux-x86_64.sh -b -p $CONDA_DIR \
    && rm -f Miniforge3-24.9.2-0-Linux-x86_64.sh

RUN conda install -y mamba
RUN mamba update conda
RUN mamba install -y \
    python=3.9 numpy=1.22.4 \
    ambertools=21.0 biopython \
    jinja2 griddataformats \
    parmed git pyyaml \
    tqdm scikit-learn gputil joblib
RUN mamba install -y netcdf4=1.7.2 # to remove tleap error

Thank you for your response.
We have confirmed that we can build the Docker image.
I'm grateful for your immediate response.


Cannot pan for original extent when zoomed in

Why cannot I pan across to the original map extent when zoomed in. When zoomed in the extent gets smaller than the original extent.
Is there any particular configuration which stops this behavior?

Could we get a code snippet? It shouldn't automatically update your extent when zooming.

var matrixIds = new Array(14);
for (var i = 0; i < 14; ++i) {
matrixIds[i] = "EPSG:27700:" + i;
}
	var resolutionsArray = [896.0, 448.0, 224.0, 112.0,
        56.0, 28.0, 14.0, 7.0, 3.5, 1.75,
        0.875, 0.4375, 0.21875, 0.109375
    ]

  var map = new ol.Map({
    target: 'map',
    layers: [
      new ol.layer.Tile({
        source: new ol.source.WMTS({
			name: "OS Maps WMTS",
            url: "<layer_uri>",
            layer: "Road 27700",
            matrixSet: "EPSG:27700",
            format: 'image/png',
            projection: "EPSG:27700",
            tileGrid: new ol.tilegrid.WMTS({
                origin: [-238375.0, 1376256.0],
                resolutions: resolutionsArray,
                matrixIds: matrixIds
            }),
            style: '',
            crossOrigin: "Anonymous"
        })
    })
    ],
    view: new ol.View({
      center: [529449,189252],
      zoom: 13,
	  maxZoom: 16,
	  minZoom: 13,
	  extent: [529449-500,189252-500,529449+500,189252+500]
    })
  });


Adding onLoaded callback for RedocStandalone

Awesome suggestion :)

Sorry was sick over the weekend, finally fixed :) great catch


Component Parameter on willTransitionFrom Undefined After First Invocation

This implementation:
{
  statics: {
    willTransitionFrom: function (transition, component) {
      console.log(component)
    }
  }
}

Will produce the expected component when leaving a route the first time, but undefined on all subsequent calls.

Not sure if it helps or not, but HomePage is the DefaultRoute handler, one level below root, defined as:
(
  <Route handler={RootPage}>
    <DefaultRoute name="home" handler={HomePage} />
    <Route name="clients" handler={ClientsPage} />
  </Route>
)

Looks like this duplicates #567. I'll poke around and see how my configuration affects this.

I understand why this is occurring (for reasons similar to those mentioned in #567), but proper error reporting here would be extra helpful (something like: you have unfulfilled routes, and transitions won't work).

@michaelahlers I'm just organizing the issues, haven't dug into this, but are you saying the behavior is correct but we should send a warning about the scenario to the console?

Before I send you on a wild goose chase figuring out how to best report this as a warning, let me put together a skeleton project that exhibits the behavior and see if it's not simply a user education issue. I'm a bit task-saturated, so please be patient with me! :smile:

closing due to inactivity, and because transition hooks are quite different now in v1.0


feature: ConstrainedLangStringSets

This adds the abstract base class ConstrainedLangStringSet and the
following subclasses:

MultiLanguageNameType
MultiLanguageTextType
DefinitionTypeIEC61360
PreferredNameTypeIEC61360
ShortNameTypeIEC61360

ConstrainedLangStringSet is implemented as an abstract subclass of
LangStringSet, which uses a given function to check the constraints
of all stored values, similar to ConstrainedList. This function is
called for every key-value pair on initialization and whenever a new
key-value pair is added. Additionally, functions such as __init__()
and __setitem__() of the base class LangStringSet are called where
appropriate, such that all constraints for language tags are also
checked here.
Each of the concrete subclasses consist of just an __init__()
function, that passes a constraint-check function to
ConstrainedLangStringSet.__init__().
Furthermore, a few basic tests for LangStringSet and its subclasses
are added, e.g. whether language-tag constraints are checked correctly,
whether LangStringSet checks for emptiness and whether basic functionality
such as string-representation, length-calculation and key-values
iteration works as expected.
Additionally, a basic test for value-constraints in
ConstrainedLangStringSets is added.
Close #77 #89

Looks good to me. I'd rebase this, if you have nothing against that?


Initial health check for remote services

This PR implements initial HTTP health checks for services. The status check results are stored per instance (container). The status is not acted upon by the scheduler it is only informatory to the user at this point.
Creating a service with health check looks like this:
kontena service create --instances 2 --health-check-port 80 --health-check-interval 20 --health-check-timeout 2 --health-check-uri / nginx nginx

And with kontena.yml:
web:
  image: nginx
  stateful: false
  health_check:
    protocol: http
    port: 80
    interval: 20
    uri: /
    initial_delay: 10
    timeout: 2

mysql:
  image: mysql
  stateful: false
  deploy:
    strategy: ha
    wait_for_port: 3306
  environment:
    - MYSQL_ALLOW_EMPTY_PASSWORD=true
  health_check:
    protocol: tcp
    port: 3306
    interval: 20
    initial_delay: 10
    timeout: 2

Both http and tcp protocols are supported. When http is used, currently only 200 status code is translated into healthy service. When tcp is used, successful port opening test will translate into healthy service.
The initial delay parameter is used to allow decent time for the service in the container to startup after which the health checks are started.
The health status is "aggregated" into service listing as color code:

Code needs still some polishing and tuning thus the WIP flag. :)
fixes #658

The last commit adds support for http checks in LB, from the agent side. This needs obviously the corresponding support from LB: https://github.com/kontena/kontena-loadbalancer/issues/17
ping @jakolehm @nevalla

Code cleaned. I squashed the commits into one so it was easier to rebase :)

Not completely sure about the cli "layout", otherwise looks good to me! (and we can improve the layout later in separate pr if needed)

Do you mean the layout of the commands or the output on service list and service details?

I mean the output of list/show.

I'm open to suggestions on the layout. Or as you said, we can improve them later on when we've had a spin around the block with this feature.

I think we can merge this after rebase.

"All your rebase are belong to us" :D


change autocomplete structure

A retailer can conceivably have more than one sku associated with a given sku_id.  I propose the following structure (includes recent changes discussed with @Gidgidonihah) to account for this.  A supplier will only ever have a single sku associated with a sku_id, but I'd rather use the same structure for both, even though only a retailer can have more than one:
Changes from before:

Nests skus as a list under sku_id key.  For supplier, the list will always be length of 1.
Moves number_of_units_bundled under distinguishing_info (to avoid redundancy)
Moves 'title' to 'item_title' for specificity
Adds in supplier_uuid

{
    <sku_id>: [
        # this is a list because a retailer can conceivably have more than one
        # sku associated with a given sku_id (i.e., one from each supplier)
        {
          uuid: <uuid>,
          sku_id: <string>,
          item_title: <string>,
          supplier_uuid: <uuid>,
          distinguishing_info: {
              number_of_units_bundled: <num>, // basically case_pack info
              condition: <one of: new, refurb, used>
              distinguishing_attributes: <dict>,
          }
          price_tiers: [
            { minimum_tier_quantity: <num>, cost: <num> },
            { minimum_tier_quantity: <num>, cost: <num> },
            ...
          ],
          product_images: [{ <image info> }, ...]
        },
        <sku>,<sku>,...
    ],
    <sku_id>: [
        ...
    ]
}

Nesting skus has some advantages, but we decided to not nest on sku_id.  Other than that, the structure will stand.


Log varying durations of budget in NetworkManager

Describe the feature
Branching from changes that were requested too late https://github.com/paradigmxyz/reth/pull/6640#pullrequestreview-1886660131.
As mentioned in the link PR, Swarm can still block and starve other threads. So, one iteration in NetworkManager might take a second, or it might take some microseconds.
Let's log the actual duration of the NetworkManager loop. To make the tracing useful for debugging, we need a new constant MAX_HEALTHY_POLL_DURATION_US, set to 100 us, as found by investigation and commented in NetworkManager.
https://github.com/paradigmxyz/reth/blob/a7ae6e4914387e1ff1068da4255b8dc6161cd9b7/crates/net/network/src/manager.rs#L679-L682.
Then we improve this tracing
https://github.com/paradigmxyz/reth/blob/a7ae6e4914387e1ff1068da4255b8dc6161cd9b7/crates/net/network/src/manager.rs#L934
to
    trace!(target: "net",
        BUDGET_NETWORK_MANAGER=BUDGET_NETWORK_MANAGER,
        poll_duration_us=poll_duration_us,
        MAX_HEALTHY_POLL_DURATION_US=MAX_HEALTHY_POLL_DURATION_US,
        "exhausted network manager budget"
);

I wouldn't call the max poll duration here a limit, since it is not enforced, neither as soft or hard limit. It is simply there for observability.
Possibly, we can increase the log level to warn conditionally if the MAX_HEALTHY_POLL_DURATION_US is exceeded. This would be very helpful in getting issue reported early.
if poll_duration_us > MAX_HEALTHY_POLL_DURATION_US {
    warn!(target: "net",
        BUDGET_NETWORK_MANAGER=BUDGET_NETWORK_MANAGER,
        poll_duration_us=poll_duration_us,
        MAX_HEALTHY_POLL_DURATION_US=MAX_HEALTHY_POLL_DURATION_US,
        "exhausted network manager budget"
    );
} else {
    trace!(target: "net",
        BUDGET_NETWORK_MANAGER=BUDGET_NETWORK_MANAGER,
        poll_duration_us=poll_duration_us,
        MAX_HEALTHY_POLL_DURATION_US=MAX_HEALTHY_POLL_DURATION_US,
        "exhausted network manager budget"
    );
}

At best we do this for the Swarm and NetworkState loops too.
Additional context
No response

we don't need this debug info anymore, https://github.com/paradigmxyz/reth/issues/6686 is doing the job since it was fixed!


how to make pod with 5.2.0?

project to frameworks

You can't; however you can use the Swift Package Manager alongside other pods, works fine in my experience.

You can't; however you can use the Swift Package Manager alongside other pods, works fine in my experience.

thanks!
I use it in the flutter plugin, but the plugin only supports pod。

https://github.com/akkyie/XPM
不知道是否可以打包成 xcframework


Streaming Best Available Bug

Found an issue where the following became present in MarketBook:
{'size': 0, 'price': 0}
Tried to recreate but I can't looks like it was due to receiving an update to delete a price when it was not present in the cache.

More info here:
http://forum.bdp.betfair.com/showthread.php?t=3351
Will update relevant function to prevent this happening although I am confident it's a bug on Betfair's side.

This is still an issue, when filtering on ladder levels I regularly get unwanted '[0, 0, 0]' and '[]' through the stream. Speaking to Neil @betfair he mentioned that the betfair sample code can handle this correctly.


Make suggested regression test function names unique

… Just so that you can naïvely copy-paste multiple of them if they happen to be able to compile already.
Probably use UUIDs for this.

Counterpoint: Leaving unexplanatory test names in your code is bad code! Having the test names conflict with each other discourages this, which is good.
live-prop-test could attempt to guess a useful name for the test, based on the argument values and/or error message.
live-prop-test macros could snoop in your code to detect what test names already exist (probably bad?)

Counterpoint: Leaving unexplanatory test names in your code is bad code! Having the test names conflict with each other discourages this, which is good.
live-prop-test could attempt to guess a useful name for the test, based on the argument values and/or error message.
live-prop-test macros could snoop in your code to detect what test names already exist (probably bad?)