text:
Remove N+1 from ContainerNode

On the container nodes page, we have an N+1 for fetching system_distribution and kernel_version.
For a page of 20 records, we end up with 20*2 extra queries.

ms
query
qry ms
rows
 comments

1,231.9
72
868.3
168
 /container_node/report_data#before

692.6
32
370.2
128
 after

43.8%
56%
57.4%
24%
diff

details
before

ms
query
qry ms
rows
 comments

16.0
1
16.0

... SELECT DISTINCT LOWER(container_nodes.name) AS alias_0, container_nodes.id

308.3
1
16.7
100
... SELECT container_nodes.id AS t0_r0, container_nodes.ems_ref AS t0_r1, container_nodes.name AS t0_r2,

386.0
20
383.2
20
... SELECT container_conditions.*

16.3
20
7.0
20
... SELECT computer_systems.*

19.8
20
7.6
20
... SELECT operating_systems.*

after

ms
query
qry ms
rows
 comments

15.8
1
15.8

... SELECT DISTINCT LOWER(container_nodes.name) AS alias_0, container_nodes.id

19.9
1
16.6
100
... SELECT container_nodes.*, (SELECT operating_systems.distribution

287.0
20
285.3
20
... SELECT container_conditions.*

There is one remaining N+1 that will come at another time

@kbrock Are there existing specs on these methods?  If not, should we add some?

update:

rubocops
added specs (Jason was right. there were NO tests at all)

update:

fixed botched commit for tests

Backported to petrosian in commit 4e17877c37b12b3f96acb077d63b6b5832128f6c.
commit 4e17877c37b12b3f96acb077d63b6b5832128f6c
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Mon Jun 12 16:00:52 2023 -0400

    Merge pull request #22559 from kbrock/container_node_virtual_attributes

    Remove N+1 from ContainerNode

    (cherry picked from commit 851836917a2f6939ebba90161a96c6608299b3fa)

authors: Fryguy kbrock


text:
Changed a warning message to info

Fixes #4086

@Fryguy @gmcculloug @kbrock
Please review

source: gharchive/pull-request

repo: ManageIQ/manageiq

license_type: permissive

license_source: github-api


text:
Allow host to be dynamic in appliance builds

Builds will have no defined host and will use the host serving the application as the API_BASE.

Development uses a hardcoded URL of http://localhost:4000

:+1:

Merging since this doesn't affect the specs.

authors: Fryguy stackus


text:
SIMD support

hexx should provide optional SIMD operations like glam.
SIMD: Single instruction, multiple data (SIMD) instructions can be used to perform the same operation on multiple data elements simultaneously. Rust's packed_simd crate provides support for SIMD instructions and could be used to accelerate certain operations in hexx.
I don't know what would be better, wait for stabilization of std::simd (issue) or use packed_simd.
In terms of API I don't know what is better:

A HexA type with simd support
Add a simd module with explicit simd methods like that:

use super::Hex;
use std::simd::i32x2;
// src/hex/simd.rs

impl Hex {
    pub fn simd_add(self, rhs: Self) -> Self {
        let x = i32x2::from_array([self.x, rhs.x]);
        let y = i32x2::from_array([self.y, rhs.y]);
        let [x, y] = (x + y).to_array();
        Self::new(x, y)
    }
}

There is also the wide crate, used by bevy_rapier, worth exploring probably

source: gharchive/issue

repo: ManevilleF/hexx


text:
Add release workflow using GitHub Actions

This workflow is the same as @lunaryorn's Mdcat -- kudos to him !
It is triggered when a release is created with a tag named 'v something', e.g. v1.1.0.
You can see the results on my own fork here.
For now: the Linux builds and works fine (just tested it); the MacOS builds but I haven't tested it, and the Windows build failed so I've disabled it.
(The commit history is a bit messy, sorry about that!)

Codecov Report

Merging #20 into master will increase coverage by 0.52%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
+ Coverage   95.53%   96.06%   +0.52%
==========================================
  Files           7        6       -1
  Lines         448      330     -118
==========================================
- Hits          428      317     -111
+ Misses         20       13       -7

Impacted Files
Coverage Δ

src/actions/validator.rs
96.82% <ø> (-1.05%)
:arrow_down:

src/actions/action_file.rs
96.29% <ø> (ø)
:arrow_up:

src/actions/entry.rs
94.64% <0%> (+1.3%)
:arrow_up:

src/actions/settings.rs
96.29% <0%> (+1.65%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71ac0a6...6bc0416. Read the comment docs.

Very cool. Thanks!

authors: Mange codecov-io ngirard

repo: Mange/tydra

license: MIT


text:
Add a new logging level, log.frame

Currently, log.debug is hard to use because it prints one line per frame

I'm discovering all this stuff when I'm trying to develop my own "third party" animations as if I don't know the program.  Very instructive.

repo: ManiacalLabs/BiblioPixel

license: mit

license_source: bigquery


text:
Remove default graph edge z_index of -1

Overview: What does this pull request change?

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages

Further Information and Comments

Trying to create graph edges individually in an AnimationGroup results in the animation not playing and the finished state just popping on screen after the animation duration ends (#3584). Looking around, #2594 introduced a default z_index of -1 for all edges in graphs. This was brought up in #3132 but was never resolved. I've reintroduced the changes, removing the default z_index from the Graph class and its inheritors.

Reviewer Checklist

[ ] The PR title is descriptive enough for the changelog, and the PR is labeled correctly
[ ] If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
[ ] If applicable: newly added functions and classes are tested

Simply removing the non-default z_index is not a great solution. We need to ensure that edges are drawn before vertices (which is the reason why we are currently setting the z_index).
When a new Graph is created, we ensure that this happens regardless of the z_index by adding the corresponding submobjects in a certain order (first edges, then vertices) to Graph.submobjects. If we manipulate the initially created graph by calling add_edges or add_vertices, however, this initial separation into vertices and edges is no longer enforced; new edges are simply appended at the end of the submobjects list, after the initial edges.
Setting the z_index is a convenient solution for forcing the correct order during rendering -- with, apparently, unfortunate downsides. It will need a somewhat more sophisticated solution to resolve this; we're open for suggestions.

Could we keep track of the vertex count and insert new vertices in the middle of Graph.submobjects? I suppose this would work if vertices are only added via Graph.add_vertices().

Sounds like a good approach. It would make sense to check at which points submobjects are Graph.added to a graph -- but I think if we make sure that the methods in graph.py work correctly, we could drop the z_index.

Any progress on this?

If you made progress on this, you might want to comment it!

I went through and ensured methods that add vertices to the Graph insert them before all the edges, so removing z index shouldn't break anything. The test scene from the issue renders properly now.

authors: MrDiver behackl gyoge0

repo: ManimCommunity/manim


text:
Add code linters for webapp and backend

Add code linters for webapp and backend

Fixed

repo: ManrajGrover/Evento


text:
Debug log on terminal

Hi,
when using Halo with boto3, I have a strange behaviour, all the debug log from boto are displayed

MacOS/Python3.6
halo (0.0.5)
boto3 (1.4.4)
Thanks

Hi,
I have the same behaviour when using halo and openstacksdk on python 2.7.
Regards.

@ManrajGrover I can work on this one. I think the solution here is to just create a logger specific for halo rather than removing logging altogether as was done in #18

It looks like solved in #12. @ManrajGrover right?

@JungWinter Yes, I'm waiting for final changes before merging. :)

repo: ManrajGrover/halo


text:
fix(package.json): Moved dependencies into dev dependencies

Moved dependencies into dev dependencies which caused webpack to go recursively into node_modules
and bundle different angular versions

Codecov Report

Merging #29 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   96.55%   96.55%
=======================================
  Files           6        6
  Lines          58       58
  Branches        3        3
=======================================
  Hits           56       56
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d5ba6c...3e2f922. Read the comment docs.

repo: MapleSyrupGroup/ngx-flash-messages


text:
Improvement: Added CancellationToken to IProvider.GetFeaturesAsync

For better Aborting of Features I added a CancellationToken to IProvider.GetFeaturesAsync
I removed the Dispose from the Map because instead of Dispose AbortFecht is now called, it should now abort faster because the CancellationToken is now provided on httpClient calls

I agree, because mapsui heavily depends on Brutile, it's best to have a strategy for this in Brutile and when it's implemented use a similar strategy in mapsui.
In .net most of the Async IO Interfaces have a CancellationToken Parameter for cancelling IO operations.  So I simply made the same changes here so that the CancellationToken can be relayed to httpClient, File IO operations. Sqlite pcl net does not support cancellationtokens yet (Or I haven't found out how yet, so mbtiles-brutile cannot use it yet).
As I pointed out in the discussion the CancellationToken could be an Addtional Property in the FetchInfo, avoiding breaking changes. But then the Code Analyzers wouldn't detect that I forget to relay the Cancellation Token.
If there is concern about the removing of IDisposable from Map. I could do that in a seperate Pull request. Because with the WeakEvents the only thing that dispose does in the Map is aborting the fetches. Which I can call directly in the Map instead of calling Dispose.
Sample for Cancellation Token interfaces in the .NET Api
https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.getasync?view=net-8.0
Here every method has a variant with and without a CancellationToken.
For easier usage I changed the Interface to this.
public interface IProvider
{
    string? CRS { get; set; }

    MRect? GetExtent();

    Task<IEnumerable<IFeature>> GetFeaturesAsync(FetchInfo fetchInfo)
    {
        return GetFeaturesAsync(fetchInfo, CancellationToken.None);
    }

    Task<IEnumerable<IFeature>> GetFeaturesAsync(FetchInfo fetchInfo, CancellationToken cancellationToken);
}

Which means users don't have to recompile or change code because, if you don't use Cancellation Tokens it will internally call the new Interface with the CancellationToken.None.
Only implementers need to implement the GetFeaturesAsync(FetchInfo fetchInfo, CancellationToken cancellationToken); They need to recompile and change Source Code

The failing ArcGisDynamicSample test is fixed here https://github.com/Mapsui/Mapsui/pull/2574

I restore the Dispose of the Map (Less changes for better reviewing).

repo: Mapsui/Mapsui


text:
PNG icons should be replaced with proper SVGs

In order to solve https://github.com/Maran23/script-ide/issues/2 and make the icons look good in HiDPI mode, we should replace all icon PNGs with proper SVGs.

First attempt at svg icons. Ive used Godot icons and recompositioned / recolered them. The zip includes the optimised svg files and Inkscape source files.
script-ide-svg-icons.zip
reference
https://docs.godotengine.org/en/latest/contributing/development/editor/creating_icons.html
https://github.com/godotengine/godot/tree/master/editor/icons


text:
Fix regex to get MSVC version

The MSVC version number is not being properly parsed through the cl.exe -Bv command on my machine. The issue seems to be with the greedy regex pattern .* which matches the rest of the line eating up the version number. Changing this pattern to [^0-9]* seems to work fine.

Thanks for the fix!

authors: MarkSchofield scott-degraw

repo: MarkSchofield/WindowsToolchain


text:
PIP installation problem

Hi Guys,
I wanted to give you library a try in one of my API projects. Unfortunately after installation with pip, during verification I am receiving following error message:

Can you please give me a hint if there are any missing steps in pip installation process or should I do some investigation on my environment?

This should be fixed by #27 - I have just merged PR. Can you retest it?
It's good timing since I was heavily involved in Robotidy but in upcoming weeks I should find some time for roboswag as well - I will start with authentication and support for V3 of open API. Feep free to also report any bugs or missing features you find :)

@bhirsz thank you for your update. It looks like roboswag on my local machine works fine now:

I'm closing this issue.

authors: bhirsz rumiak

repo: MarketSquare/roboswag


text:
Deprecate Force Tags in RF 6 for Test Tags

Closes #643

Codecov Report
Base: 96.68% // Head: 96.43% // Decreases project coverage by -0.24% :warning:

Coverage data is based on head (7939e00) compared to base (1b7b827).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #740      +/-   ##
==========================================
- Coverage   96.68%   96.43%   -0.25%
==========================================
  Files          22       22
  Lines        3165     3171       +6
==========================================
- Hits         3060     3058       -2
- Misses        105      113       +8

Impacted Files
Coverage Δ

robocop/checkers/naming.py
95.88% <50.00%> (-1.17%)
:arrow_down:

robocop/checkers/misc.py
96.96% <0.00%> (-2.17%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: bhirsz codecov-commenter

repo: MarketSquare/robotframework-robocop


text:
Player buttons missing from hovered taskbar

OS: Windows 7 Enterprise
When I hover over the taskbar item, when it pops up, I used to see Previous, Play and Next buttons, but now I just see the song title:

Steps to Reproduce: Hover over the taskbar.

Dupliactes #1427

#1427 is not the duplicate for this issue.
But this is a duplicate that is getting fixed Upstream.
I PR'ed the fix recently https://github.com/electron/electron/pull/6829

authors: MarshallOfSound roryhewitt


text:
Space bar doesn't Play/Pause when GPMD is open

It may be a silly request, since global media keys are working, but to play/pause when the app is open, I need to click in it before I can do it.

By the way, it was working fine on the previous version.
PS: THANK YOU SO MUCH FOR THIS AMAZING APP.

I'm confused as to what you mean.  So you're saying the app is NOT in focus and you want to spacebar to play pause?
That would involve making the spacebar a global hotkey which is BEYOND bad???
Can you please explain in more detail

Sorry, english is not my first language, so it is kind of hard to express myself.
If I open the app by clicking on it on taskbar or using Alt+TAB, it seem not to be focused, cause I need to click anywhere on it to be able to use spacebar to play/pause.

That is very interesting.  Small usecase but a bug none the less...
I'll look into it.  Thanks for the report

Closing as unfixable in the current state of electron.  Sorry, I tried :cry:

Just leaving a note to say that I also experience the same bug. I didn't realised until reading this that you have to select the window of the app before the spacebar key works.

authors: MarshallOfSound mindthetic vovokrall


text:
Uncaught Exception: Command failed: 4294967295

An uncaught exception was reported.
Info:
OS: win32
Arch: ia32
GPMDP Version: 3.0.0
Time: Sun Mar 06 2016 21:47:07 GMT-0500 (Eastern Standard Time)
Error:
Command failed: 4294967295
Error: Command failed: 4294967295
System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote name could not be resolved: 'update.googleplaymusicdesktopplayer.com'
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<LogIfThrows>d__50`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.FileDownloader.<DownloadUrl>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerS
...Some of the stack is missing

This issue was created automatically inside the uncaughtException handler

DNS issues, client side not internal app.
I should probably catch these errors....

authors: MarshallOfSound davey-dev


text:
Errors in documentation of atLeast and atMost

I think the examples in npm and github are wrong
match(2).atLeast(3).then(true).else(false)
// should return false

@vagyriag I think the example doesn't exist anymore. Probably you can close this issue.

authors: klvenky vagyriag

repo: MartinGentleman/conditional-expression


text:
iOS: Handle Binary Files (images and more)

[ ] TODO:elaborate [Andreas,Martin]

A data: URL for images might be nice. So far I’ve only worked on Mac so that hasn’t been needed.

I'm wondering what Markdown would do with binary files.

During writing the how to hide links in Drafts thread is was wondering if it might be a crazy idea to store the filmendem as a title and putter binary data to the content in Drafts. But URLs should be the main choice.

I don't understand your last comment. What I'm thinking of is to allow URLs as image sources, including data: URLs. This has two positive effects:

Allows you to build a presentation from a remote server, including stock images.
Allows you to keep image data: URLs in your eg Drafts draft, perhaps as some kind of transclusion.

I think a combination of StringIO and urllib could get us there.

data: URL added a while back.


text:
fill disregards strokestyle

sry to bother again but i didnt notice the whole afternoon :)

Can you clarify how I can reproduce? For me it works fine.

its just perfect dots so stay absolutely still and click then draw around. but i noticed something else ill look into it closer

i dont quite like this rectangle dot but i think its a limitation of the canvas in the BG Demo

Much better in Options Demo

There is actually a huge issue not clearing before redrawing because the last points differ in calculation on slower devices this results in very bad artifacts

this fix looks much better at the cost of being 1 frame behind while drawing which i think is acceptable


text:
About speed comparison?

Thanks for your excellent work!
I noticed convcrf is run on gpu, while fullcrf is run on cpu. Is it unfair to compare two algorithms on different platforms?

The reason for this comparison is that there is simply no working fullcrf implementation on gpu available. CRFasRNN, DeepLab and other segmentation systems utilizing CRFs use the very same CPU implementation. So it is a fair comparison since it improves the state of the art.

Yes, densecrf does bilinear downsampling internally.

Thanks for the prompt reply!
I understand that there is some interpolation happening when mapping the pixels onto a permutohedral lattice. Are you referring to that? There downsampling is done in the high-dimensional lattice space. In ConvCRF, the downsampling is done on image space (XY) instead.

Hi, Marvin:
I notice that in your paper, you post the speed of ConvCRF with different receptive field size from 3 to 13. Here is my question, why there's no more larger conv-size than size-13 ? And is the speed posted in table.1 indicate that the time cost for just one iteration?

Hi Alex,
the performance does not improve past 13. Also, if you go bigger then ~21 I ran into GPU memory issues (@ 11GB). The memory consumption also increases quadratically with filter size. So there is no reason why you want to go past 11.

authors: AlexTansley IzouGend MarvinTeichmann suhangpro

repo: MarvinTeichmann/ConvCRF


text:
API POST, PUT, and DELETE routes in Insomnia for users and thoughts

WHEN I test API POST, PUT, and DELETE routes in Insomnia
THEN I am able to successfully create, update, and delete users and thoughts in my database

done


text:
Kong cluster reconfiguration fails when admin_listen is set

Hello...
We found that with parameter admin_listen set the Kong cluster does not get signaled when an API is added or is changed.  Only a 'kong stop' and then 'kong start' makes the change live.
The cause of this is appears to be the generated serf_event.sh script.  It contains a call to 127.0.0.1 port 8001.  With admin_interface set to something other than 0.0.0.0, Kong is no longer listening on 127.0.0.1 and so the call fails.
The code that generates the script pulls the port number from the configuration but does not handle the IP address.
A fix is to have the generated serf_event.sh use the admin_listen address if set, or fall back to 127.0.0.1 if '0.0.0.0' is used.
In prefix_handler.lua replace
local script = fmt(script_template, "127.0.0.1", kong_config.admin_port, resty_bin)
with
serf_admin_ip = kong_config.admin_ip
if kong_config.admin_ip == '0.0.0.0' then
serf_admin_ip = '127.0.0.1';
end
local script = fmt(script_template, serf_admin_ip, kong_config.admin_port, resty_bin)
Kong is then signalled and the API change propogates correctly.
Russell
Steps To Reproduce

Have a two node kong cluster  with a common (cassandra in our case) database.  Set 'admin_listen' to the IP address on each cluster node.

On kong1 have set
admin_listen = 172.16.4.136:8001
and on kong2 have set
admin_listen = 172.16.4.199:8001

Create API on kong1

$ curl -i -X POST --url http://172.16.4.136:8001/apis --data 'name=dummy' --data 'request_path=/dummy' --data 'upstream_url=http://172.16.4.136:8888/'
HTTP/1.1 201 Created
Date: Tue, 27 Sep 2016 03:05:17 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/0.9.2
{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy","id":"24a3bb70-f133-4d5e-bd22-6088b36aa753","created_at":1474945517000,"preserve_host":false,"name":"dummy"}

Validate new API appears in kong configuration of both nodes

$ curl http://172.16.4.136:8001/apis/dummy
{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy","id":"24a3bb70-f133-4d5e-bd22-6088b36aa753","created_at":1474945517000,"preserve_host":false,"name":"dummy"}
$ curl http://172.16.4.199:8001/apis/dummy
{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy","id":"24a3bb70-f133-4d5e-bd22-6088b36aa753","created_at":1474945517000,"preserve_host":false,"name":"dummy"}

But can not access the API through port 8000

$ curl http://172.16.4.136:8000/dummy
{"request_path":"/dummy","message":"API not found with these values","request_host":["172.16.4.136"]}
$ curl http://172.16.4.199:8000/dummy
{"request_path":"/dummy","message":"API not found with these values","request_host":["172.16.4.199"]}

Reload kong does not help...

$ kong reload
ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Kong reloaded
$ curl http://172.16.4.136:8000/dummy
{"request_path":"/dummy","message":"API not found with these values","request_host":["172.16.4.136"]}

Restart kong does

$ kong restart
Kong stopped
ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Kong started
$ curl http://172.16.4.136:8000/dummy
{"client":"172.16.4.136:36790","connection":"close","host":"172.16.4.136:8888","method":"GET","path":"/dummy","protocol":"HTTP/1.0"}
... but only for the node that I restarted.  Did not restart kong2 so it still does not know about /dummy
$ curl http://172.16.4.199:8000/dummy
{"request_path":"/dummy","message":"API not found with these values","request_host":["172.16.4.199"]}
[Test after fix applied to prefix_handler.lua and restart]

Create ...
$ curl -i -X POST --url http://172.16.4.136:8001/apis --data 'name=dummy2' --data 'request_path=/dummy2' --data 'upstream_url=http://172.16.4.136:8888/'
HTTP/1.1 201 Created
Date: Tue, 27 Sep 2016 03:28:09 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/0.9.2

{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy2","id":"4d07f1de-be8b-421c-b27c-56c48dddee7c","created_at":1474946889000,"preserve_host":false,"name":"dummy2"}

Check...

$ curl http://172.16.4.136:8001/apis/dummy2
{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy2","id":"4d07f1de-be8b-421c-b27c-56c48dddee7c","created_at":1474946889000,"preserve_host":false,"name":"dummy2"}
$ curl http://172.16.4.199:8001/apis/dummy2
{"upstream_url":"http://172.16.4.136:8888/","strip_request_path":false,"request_path":"/dummy2","id":"4d07f1de-be8b-421c-b27c-56c48dddee7c","created_at":1474946889000,"preserve_host":false,"name":"dummy2"}

Use ...

$ curl http://172.16.4.136:8000/dummy2
{"client":"172.16.4.136:37184","connection":"close","host":"172.16.4.136:8888","method":"GET","path":"/dummy2","protocol":"HTTP/1.0"}
$ curl http://172.16.4.199:8000/dummy2
{"client":"172.16.4.199:45350","connection":"close","host":"172.16.4.136:8888","method":"GET","path":"/dummy2","protocol":"HTTP/1.0"}
Additional Details & Logs

Kong version ($ kong version)

kong version
0.9.2
Using 'kong-0.9.2.el7.noarch.rpm' build.

Operating System

cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Hi, I have the same issues. When I changed the configs, kong can not make the changes live. And I need to use the commands "kong stoop" and "kong start" to make the changes live. Could you give some advices.(admin_listen is default)

Hello....
The things that I looked at in detail:
Firewall on the servers set correctly for kong?  (And no firewalling on localhost/loopback connections!)
Does 'kong cluster members' and 'kong cluster reachability' work?
In the access_log file, do you see entries for /cluster/events as you make changes to the kong configuration?  Those were appearing on my working kong 0.8 cluster and not on the broken 0.9 cluster.
I traced my fault to the serf_event.sh script. The openresty connection it makes to localhost failed.
That was found by using strace on the kong processes and then trying to figure out what was failing that should not be failing. A lot of system calls come back with errors, so it takes some experience with strace to figure out which are normal and which ones are not.
The strace showed me a connect to localhost port 8001 that got a connection refused response.
That was from the serf_event.sh script and that in turn was run by the serf program.
Russell

Will be available with next Kong version (both 0.9.8 or 0.10.0)

authors: HenryChelsea rstreet-ossg thefosk

repo: Mashape/kong


text:
SourceLink support

Add support for SourceLink
Set langVersion to latest

@NooNameR my own curiosity. Did #1208 not completely add sourcelink?
Also, I know there's some files that have gitlink still in it. Should gitlink be removed everywhere, because I think sourcelink supersedes it?

maybe I’ve missed this one, only going by sourcelink documentation ;(

Yeah, should probably make sure GitLink is gone in favor of the new hotness.

if u look inside SourceLink github page, there is a package should be provided for GitHub integration.
I do not have much experience with SourceLink but I know that is "must have" for OpenSource :)

I still see a warning with RabbitMQ for SourceLink.

authors: NooNameR maldworth phatboyg

repo: MassTransit/MassTransit


text:
Add documentation related to #2272.

Please note that I'm not a native English speaker. Feel free to edit.
Related to #2272

Finished, thank you!

Finished, thank you!

authors: Dylan-DutchAndBold phatboyg


text:
🛑 Offsets (GitHub) is down

In 3b13683, Offsets (GitHub) (https://api.github.com/repos/OhMyGuus/BetterCrewlink-Offsets) was down:

HTTP code: 403
Response time: 285 ms

Resolved: Offsets (GitHub) is back up in 0971c48.

repo: MatadorProBr/BetterCrewLink-status


text:
Rendering doesn't work on MacOS

Running both examples on MacOS Monterey (version 12.1). The training was successful but no window was shown when "rendering champion..." is outputted.
$ RUST_LOG=info cargo run --example cart_pole --release --features="cosyne"
 INFO  cosyne::cosyne > gen 0, champion fitness: 129.0000
 INFO  cosyne::cosyne > gen 1, champion fitness: 129.0000
 INFO  cosyne::cosyne > gen 2, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 3, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 4, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 5, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 6, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 7, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 8, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 9, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 10, champion fitness: 261.0000
 INFO  cosyne::cosyne > gen 11, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 12, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 13, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 14, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 15, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 16, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 17, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 18, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 19, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 20, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 21, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 22, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 23, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 24, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 25, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 26, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 27, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 28, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 29, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 30, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 31, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 32, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 33, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 34, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 35, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 36, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 37, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 38, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 39, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 40, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 41, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 42, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 43, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 44, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 45, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 46, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 47, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 48, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 49, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 50, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 51, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 52, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 53, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 54, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 55, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 56, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 57, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 58, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 59, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 60, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 61, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 62, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 63, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 64, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 65, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 66, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 67, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 68, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 69, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 70, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 71, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 72, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 73, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 74, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 75, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 76, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 77, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 78, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 79, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 80, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 81, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 82, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 83, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 84, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 85, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 86, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 87, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 88, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 89, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 90, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 91, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 92, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 93, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 94, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 95, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 96, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 97, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 98, champion fitness: 400.0000
 INFO  cosyne::cosyne > gen 99, champion fitness: 400.0000
champion: (ANN { num_inputs: 4, num_outputs: 1, layers: [Layer { input_len: 4, output_len: 1, gene_len: 5, activation: Relu, weights: Matrix { data: VecStorage { data: [0.07007277006795642, -0.23631177830558103, 0.44346640185648933, 0.13902369122718516], nrows: Dynamic { value: 1 }, ncols: Dynamic { value: 4 } } }, biases: Matrix { data: VecStorage { data: [0.5129485592119563], nrows: Dynamic { value: 1 }, ncols: Dynamic { value: 1 } } }, act: Matrix { data: VecStorage { data: [0.0, 0.0, 0.0, 0.0], nrows: Dynamic { value: 4 }, ncols: Dynamic { value: 1 } } }, act_func: 0x10c1714a0, net: Matrix { data: VecStorage { data: [0.0], nrows: Dynamic { value: 1 }, ncols: Dynamic { value: 1 } } } }], num_genes: 5 }, 400.0)
training time: 0ms
rendering champion...            <--- Nothing happens

Same for me on Win10

repo: MathisWellmann/gym-rs


text:
🛑 BackOffice App [CL] is down

In d2f535e, BackOffice App [CL] (https://backoffice.voluntariosgreenpeace.cl/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BackOffice App [CL] is back up in c983ee2.


text:
🛑 BackOffice App [AR] is down

In 516304c, BackOffice App [AR] (https://backoffice.greenpeace.org.ar/) was down:

HTTP code: 502
Response time: 631 ms

Resolved: BackOffice App [AR] is back up in 4418d28 after 5 minutes.


text:
Failed to connect to supervisor port 80 after 0 ms: Couldn't connect to server

i updates my environment from Debian 11 to Debian 12.
Now he cant find my Home Assistant Mosquitto Broker.
But the broker is running fine.
Here is my log:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
curl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldn't connect to server
[15:50:09] ERROR: Something went wrong contacting the API
[15:50:09] FATAL: No internal MQTT Broker found. Please install Mosquitto broker.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Hello I have the same issue
I found that it might be caused by lack of network capability, like here https://github.com/home-assistant/supervisor/issues/4396
so I opened, @ttvt please take a look
https://github.com/MatterVN/ModbusTCP2MQTT/pull/82


text:
[add] Sound Effect

BallがBarに当たった時に、効果音を鳴らすようにしました。

もしよければ，壁にあたった時と，バーを動かした時にいい感じの音ほしいかも

探しておきます！

authors: MaxMEllon mille-f


text:
🛑 TrueSafe App API is down

In a660bfd, TrueSafe App API ($STATUS_APP_API) was down:

HTTP code: 0
Response time: 0 ms

Resolved: TrueSafe App API is back up in e16e069 after 28 minutes.


text:
Check failed: input_array.name() != output_array (lanenet/input_tensor vs. lanenet/input_tensor)The array lanenet/input_tensor is listed in both --input_arrays and --output_arrays.

Hi,
I'm trying to convert the trained model into the tflite format. But i'm getting the Check failed: input_array.name() != output_array (lanenet/input_tensor vs. lanenet/input_tensor)The array lanenet/input_tensor is listed in both --input_arrays and --output_arrays. error. which means both input and output nodes have the same name.
How can i change the name of any node or is there any solution to this.??
@MaybeShewill-CV

@shauryad15 Maybe you should look for help in tflite group. I have not tested to converted the model into tflife format. Sorry for this:)

no, so i'm just intrested in changing the name of the node. "lanenet/input_tensor" is defined twice. I just want to rename 1 how can i do that?

@shauryad15 It won't be defined twice with a same name in my opinion:)

@shauryad15 Must be something wrong with your process:)

ok, in freeze_lanenet.py we're giving "input_tensor" as input_tensor as well as output tensor.... why is it needed? because when I change the name of input_tensor, i get error as "input_tensor not defined". Is it required to give the same name as both input and output tensor?
@MaybeShewill-CV

def convert_ckpt_into_pb_file(ckpt_file_path, pb_file_path):
"""
:param ckpt_file_path:
:param pb_file_path:
:return:
"""
# construct compute graph
with tf.variable_scope('lanenet'):
    input_tensor = tf.placeholder(dtype=tf.float32, shape=[1, 256, 512, 3], name=**'input_tensor'**)

net = lanenet.LaneNet(phase='test', net_flag='vgg')
binary_seg_ret, instance_seg_ret = net.inference(input_tensor=input_tensor, name='lanenet_model')

with tf.variable_scope('lanenet/'):
    binary_seg_ret = tf.cast(binary_seg_ret, dtype=tf.float32)
    binary_seg_ret = tf.squeeze(binary_seg_ret, axis=0, name='final_binary_output')
    instance_seg_ret = tf.squeeze(instance_seg_ret, axis=0, name='final_pixel_embedding_output')

# create a session
saver = tf.train.Saver()

sess_config = tf.ConfigProto()
sess_config.gpu_options.per_process_gpu_memory_fraction = 0.85
sess_config.gpu_options.allow_growth = False
sess_config.gpu_options.allocator_type = 'BFC'

sess = tf.Session(config=sess_config)

with sess.as_default():
    saver.restore(sess, ckpt_file_path)

    converted_graph_def = tf.graph_util.convert_variables_to_constants(
        sess,
        input_graph_def=sess.graph.as_graph_def(),
        output_node_names=[
            **'lanenet/input1_tensor',**
            'lanenet/final_binary_output',
            'lanenet/final_pixel_embedding_output'
        ]
    )

    with tf.gfile.GFile(pb_file_path, "wb") as f:
        f.write(converted_graph_def.SerializeToString())

@shauryad15 where should I feed the image data when doing inference if I did not freeze the input tensor node as one of the output node. I think you may get help from TensorFlow community:)

but why will you freeze input node as output node?

@shauryad15 ==! Like I said it is the entry node of the network so I need to freeze it as output node

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py
this is the default script provided by tensoflow. Here, i can't see freezing of input node. Please educate me if I'm missing anything. Thanks. :)

repo: MaybeShewill-CV/lanenet-lane-detection


text:
MPI-compatible logger (hashtag618)

I've found the need for an MPI-compatible logger in my own projects. I've been using the standard logging module and at one point wrote a pretty crude wrapper for this, but I only just found this project and am very excited others had the idea to write an alternative to the logging module to make it more user friendly.
A quick search of the open and closed issues, and the documentation, for keyword "MPI" yielded nothing, hence my question. If this feature already exists I apologize for the inconvenience (but please point me to it)!
My proposal is simple: some API compatible with mpi4py that does something like this in e.g. someone's __init__.py:
from loguru import logger
from mpi4py import MPI

logger.set_mpi_logger(MPI.COMM_WORLD)
logger.log_only_on_rank_0 = True

This is akin to what I've done in my own custom wrappers. Really helps to have this kind of compatibility. Obviously the user could customize whatever settings they wanted to.
Thoughts?
Also an aside: this library is amazing. Wonderful job.

Hi  glad you like Loguru. :)
An MPI handler is too specific and complex to be added to Loguru as a built-in.
However, maybe can you achieve the desired effect with a custom sink?
from mpi4py import MPI
from loguru import logger

comm = MPI.COMM_WORLD

def mpi_sink(message):
    comm.send(message)

logger.add(mpi_sink)

Also, Loguru is compatible with standard [logging.Handler]( so maybe you can re-use what you already developped:
handler = MPIHandler()
logger.add(handler)

That's fair. I appreciate you considering the idea.
Before I close the issue, just to be clear, I only mean a way to ensure that the logger logs things at certain levels, at certain ranks. Your example above seems to imply loggers communicating via the MPI protocol. That's not quite what I have in mind and I agree it's well outside the scope of Loguru. In my proposal, the only information Loguru would need from the communicator is the rank and world size.

For example, in an MPI application, Loguru with default settings will run identically on every MPI rank. This is expected behavior, but will probably lead to a ton of unnecessary information being logged (e.g. identical copies of "initializing ClassXX at time YY").
If a communicator is added, however, the user could then configure the logger so that, e.g, rank 0 outputs all logging levels, but ranks > 0 output only the debug level and to a different stream. The argument being that ranks > 0 are often used as "worker" processes and at the very least it makes sense to split up the streams.

If you feel it's still outside the scope of Loguru I accept that!

To be honest I'm not familiar at all with the MPI protocol. Your suggestion sounds very abstract to me. But that's ok, that means I can surely learn some interesting new stuff. :)
I don't understand how you intend to use the logger other than as a tool to communicate the logs of your application. What would not be possible using a custom sink and possible filter function? Do you need both server and client handlers, similarly to using a socket: [Sending and receiving log messages across network or processes](

To be honest I'm not familiar at all with the MPI protocol. Your suggestion sounds very abstract to me. But that's ok, that means I can surely learn some interesting new stuff. :)

No worries. I can try to give a very brief explanation. MPI is a communications protocol between different processes. When you do e.g. python3 my_script.py you're spawning a process, the script for which is contained in my_script.py. If you do something like mpiexec -n X python3 my_mpi_script.py, you actually spawn X processes (dictated by the code under the hood of mpiexec). Each of these is identical instances of my_mpi_script.py, but each is assigned a unique rank. This rank differentiates the processes, and certain rules are put in place in the code to determine the behavior as a function of rank.
Take a very simple case, where you have a very long list and want to multiply every instance of that list by 2. I could have an MPI script in which each of e.g. 4 process reads the list from disk, but each of the processes only takes a portion of the list to multiply by 2. Then, the processes can communicate to assemble the list, and only process 0 will save the new list back to disk. This kind of parallelism can be achieved much more easily with the multiprocessing module, but it's just a simple case to demonstrate the idea.
One can imagine a world in which you wouldn't want each process logging the identical thing. Instead, only rank 0 needs to log information like "read list from disk". Even better, the logger can print the rank of the process after e.g. the traceback, for better-resolved debugging for MPI processes.

I don't understand how you intend to use the logger other than as a tool to communicate the logs of your application.

This is precisely how I would intend to utilize it, but not by sending messages between different processes via the MPI communicator. That's definitely not what I'm proposing.

What would not be possible using a custom sink and possible filter function? Do you need both server and client handlers, similarly to using a socket: [Sending and receiving log messages across network or processes](

I'm not sure about using sockets or server/client handlers-- it's way simpler than that. What I'm proposing is actually quite concrete. You can think of it this way: it's like a filter, but the filter is not a function of the message, it's a function of some other variable called the MPI rank.
This is already achievable with the infrastructure there already is, but this extra layer of abstraction will make it easier for the user, and more features could be added in a rigorous fashion. The simplest example I can think of is this, which could be easily added to the existing software there is in Loguru:
hashtag In e.g. a package's __init__
from mpi4py import MPI
from loguru import logger

comm = MPI.COMM_WORLD
rank = comm.Get_rank()

hashtag Dumb example: ignore logging completely unless on rank 0
if rank != 0:
    logger.remove(0)

A better (hypothetical) example use case: configure Loguru's logger to actually output the MPI rank with every logged message:
from mpi4py import MPI
from loguru import logger

comm = MPI.COMM_WORLD
rank = comm.Get_rank()

hashtag Unsure if the functionality exists to use a prefix for every logged message,
hashtag but let's pretend it does
logger.set_global_prefix(rank)

A very simple change which could make it much easier to configure loggers for MPI processes.
Please don't hesitate to ask any followup questions if you should have them!

Hi  sorry for the late answer.
Thank you for taking the time to write a detailed explanation about MPI. I understand better what this is about, especially the rank principle.
I prefer to rely on existing functionalities rather than adding new ones because Loguru must remain minimal and must not introduce in its core more dependencies like MPI. It is hopefully possible to design a utility class to facilitate the integration of this protocol with MPI that one will be able to re-use for MPI projects.
For example, the set_global_prefix() method you're suggesting echoes the extra attribute of the existing [configure()]( method. We could also rely use the rank to set the logging level.
import sys
from mpi4py import MPI
from loguru import logger

class LoggingHelperMPI:

    def __init__(self, rank):
        self._rank = rank

    def configure(self, output=sys.stderr):
        levels = {0: "TRACE", 1: "DEBUG", 2: "INFO"}
        format_ = "[{level}][{extra[rank]}] {message}\n{exception}"
        logger.configure(
            extra={"rank": rank},
            handlers=[{"sink": output, "format": format, "level": levels[rank]}],
        )

comm = MPI.COMM_WORLD
rank = comm.Get_rank()
helper = LoggingHelperMPI(rank)
helper.configure()

We could certainly imagine other features based on a custom filter argument for example. I would rather do it this way. It can easily be published on PyPI to ease re-usability.  I am willing to support you if you need help with some of the features you had in mind.

no worries, thanks for the response.
I agree in principle with everything you're saying, and I respect the design decision to not include core modules e.g. mpi4py. Indeed, everything I am suggesting can be accomplished with a combination of your code and mine.
Thanks for considering the suggestion!


text:
1D: more functions, add/mult, separate

e.g. dho + lorz etc for 1D

DONE

repo: McStasMcXtrace/ifitlab


text:
Adapt slice count to the width/height/bitdepth of input

Idea:

have some SIMD compatible slice count (e.g. AVX-512 has 16 32-bit blocks, let's take multiples of 16)
each slice has around 256 KiB of data, there is a similar risk of losing 1 LTO block (correction code per block, to be confirmed but looks like a 256 KiB block size is classic)

This leads to:
SD: 16 slices (10-bit) or 32 slices (16-bit)
HD/2K: 64 slices (10-bit) or 128 slices (16-bit)
UHD/4K: 256 slices (10-bit) or 512 slices (16-bit)

Just wondering: have you done some benchmarking? In the past (i.e. two years ago or so), the formula about the relation between slices and cores I published gave us the best results on both our renderfarm and our workstations. I’m asking, because 512 slices seems to me to be a lot.

Or do you program «only» on CPU, without using the GPUs computing power?

I did quick benches (CPU only, I don't have any GPU encoder/decoder), without seeing big difference, but nothing scientific.
I was focused more on not having big loss of data if we lose 1 slice (1 LTO block?), so risk is similar between losing DPX content or FFV1 content with LTO tapes (but... It is also theory, I don't find documentation about what happens when a LTO block is lost, still trying to find doc)
And I have great expectations on an AVX-512 or GPU accelerated encoder/decoder, for that I need lot of slices (of small size else memory usage explodes, and memory on GPU is limited, I need to store both encoded and decoded content, for thousands of slices if I want to fill the GPU with enough content)
Example of file : 4096307216-bit*4-component= 200 KiB/slice.
If we work with ~256 KiB of content: with a GeForce GTX 1080 Ti, it is ~1 GB of decoded content, 0,5 GB of encoded contend for feeding all CUDA core in 1 shot, multiplied by a couple of instances in order to optimize (memory transfer while computing), we are touching the limits of the card with memory. but theory currently, for sure, at least on my side.
Note that FFmpeg accepts now 1024 slices, I guess that someone else found useful to have so many slices.
I am adding an option for letting the user decides of slice count. there are so many cases that I just put a default value, and user should be able to change.

Changed to:
SD: 16 slices (10-bit) or 24 slices (16-bit)
HD/2K: 64 slices (10-bit) or 96 slices (16-bit)
UHD/4K: 256 slices (10-bit) or 384 slices (16-bit)
Because e.g. 512 slices is a bit high number, and x2 too much increase when going from 10 to 16-bit, and actually FFmpeg does not like 512 (as well as 128...), it requests another count of slices (impossible to set x and y count of slices, so we need to fit in FFmpeg limitations about slice count)

authors: JeromeMartinez retokromer

repo: MediaArea/RAWcooked


text:
Update per-query parallelism section

Per-query parallelism is now supported. See:
https://github.com/EpicGames/UnrealEngine/commit/b04a6ec56a385ed06a5cf175ef7db7c468cd2e5c

Maybe a quick note about this being a very recent change on main? I'll merge it either way!!

authors: Megafunk willjallen

repo: Megafunk/MassSample


text:
voxel_pooling/voxel_pooling_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol

env：
pytorch1.9
cuda 11.3
mmcls                         0.24.1
mmcv-full                     1.6.0
mmdet                         2.26.0
mmdet3d                       1.0.0rc4        /home/huqiuchen/tmp_huangqipeng/pytorch/mmdetection3d
mmsegmentation                0.25.0
run sh:
BEVDepth# python bevdepth/exps/mv/bev_depth_lss_r50_256x704_128x128_20e_cbgs_2key_da_ema.py --amp_backend native -b 8 --gpus 8
Error:
/opt/conda/lib/python3.8/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 802: system not yet initialized (Triggered internally at  ../c10/cuda/CUDAFunctions.cpp:115.)
  return torch._C._cuda_getDeviceCount() > 0
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.3'
Traceback (most recent call last):
  File "bevdepth/exps/mv/bev_depth_lss_r50_256x704_128x128_20e_cbgs_2key_da_ema.py", line 24, in <module>
    from bevdepth.exps.base_cli import run_cli
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/exps/base_cli.py", line 10, in <module>
    from .base_exp import BEVDepthLightningModel
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/exps/base_exp.py", line 18, in <module>
    from bevdepth.models.base_bev_depth import BaseBEVDepth
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/models/base_bev_depth.py", line 3, in <module>
    from bevdepth.layers.backbones.base_lss_fpn import BaseLSSFPN
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/layers/backbones/__init__.py", line 1, in <module>
    from .base_lss_fpn import BaseLSSFPN
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/layers/backbones/base_lss_fpn.py", line 10, in <module>
    from bevdepth.ops.voxel_pooling import voxel_pooling
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/ops/voxel_pooling/__init__.py", line 1, in <module>
    from .voxel_pooling import voxel_pooling
  File "/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/ops/voxel_pooling/voxel_pooling.py", line 5, in <module>
    from . import voxel_pooling_ext
ImportError: /home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth/bevdepth/ops/voxel_pooling/voxel_pooling_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _Z37voxel_pooling_forward_kernel_launcheriiiiiiPKiPKfPfPiP11CUstream_st

root@bogon:/home/huqiuchen/tmp_huangqipeng/pytorch/BEVDepth# c++filt _Z37voxel_pooling_forward_kernel_launcheriiiiiiPKiPKfPfPiP11CUstream_st
voxel_pooling_forward_kernel_launcher(int, int, int, int, int, int, int const*, float const*, float*, int*, CUstream_st*)

I think，voxel_pooling_forward_kernel_launcher of  voxel_pooling_forward_cuda.cu not be included in voxel_pooling_forward.cpp and not be compiled into voxel_pooling_ext.cpython-38-x86_64-linux-gnu.so。can anyone help me?

Hi, there. Please check if you can pass the unittest of voxel pooling.

It has been solved. It's a gpu machine problem. You can't get the GPU device, and it's not compiled correctly.

It has been solved. It's a gpu machine problem. You can't get the GPU device, and it's not compiled correctly.

同样的问题（envs一致，8张A100；在另一个单张A100上同样的环境下运行正常），请教一下，如何解决？

authors: BaronLeeLZP qipengh yinchimaoliang

repo: Megvii-BaseDetection/BEVDepth


text:
mAP curve of training on COCO dataset is unexpected

Hi there,
Thanks for this project. We have been trying to reproduce the results on our cluster. Currently, we use two nodes, each node is configured with 8 X 32GB V100 GPUs. Below is the current mAP curve of our training process:

The blue line is the version with known memory leak issue and the orange line is the version after "fix memory leak" commit. mAP is evaluated every 10 epochs. As expected, we also see the blue experiment is restarted due to unknown error at around 110-th epoch. This is probably due to the memory leak bug.
The orange line seems not as expected. It does not show any performance gain after 50-th epoch.
It seems even the blue comes with memory leak bug, it still achieves an mAP of 0.426 after 110 epochs of training. Does anyone see similar training results?
Thanks.

Just realized there are some commits after the memory leak. We will pull the latest version and report the results later.

Sorry for the 'mixup bug' in the "fix memory leak" commit, as we only test the yolox-tiny model without mixup at that time. Now the training curve is normal.

Just realized there are some commits after "fix memory leak". We will pull the latest version and report the results later.

Hi @superaha Have you finished your training? What is the accuracy after training? I am very interested.

@hhaAndroid Use the latest branch to train yolox-tiny, you can get 32.3mAP.

@hhaAndroid Use the latest branch to train yolox-tiny, you can get 32.3mAP.

awesome

Hi there,
Now I finished training. The mAP curve is as following:

The deep blue curve is the one with the latest branch. It achieve 48.5 mAP.
Hope this helps.

@superaha Thank you for your information. This is a bit lower than in our report. We will check it in next week. Hence the main problem in this issue is solved, I close it now. Reopen if necessary.

@hhaAndroid Use the latest branch to train yolox-tiny, you can get 32.3mAP.

OK.Thank you very much.

@hhaAndroid Use the latest branch to train yolox-tiny, you can get 32.3mAP.

OK.Thank you very much.

May I ask, how you obtained the curve

@superaha what is time taken to train each epoch ?

@superaha I am trying to run on two nodes but training just hangs after initialization and doesn't make any progress. could you let me know if you faced issue similar to this?
python3 tools/train.py -n yolox-s -b 64 --dist-url tcp://master_node_ip:12312  --num_machines 2 --machine_rank 1

repo: Megvii-BaseDetection/YOLOX


text:
Add Custom Grid

I need to add custom grid for multiple profile pictures view. Users should be able to reorder their profile pictures. But while doing this, I want to show the index and an icon in each slot on the grid. In addition, the following issue needs to be completed in order for this function to be fulfilled : #13

You can add custom background with Dashboard.slotBackgroundBuilder . Also you can clear all lines. #32

repo: Mehmetyaz/dashboard


text:
分包后主包内容太大  怎么解决呢

[扼要问题描述]
mpvue 版本号：
[mpvue@x.x.x]
最小化复现代码：
[建议提供最小化可运行的代码：附件或文本代码]
// 示例代码：

问题复现步骤：

[第一步]
[第二步]
[其它...]

观察到的表现：
[在这里描述观察到的表现]
截图或动态图：
![复现步骤截图或gif图片](图片的 url)

可以参考这个解决方案，https://github.com/Meituan-Dianping/mpvue/issues/1757#issuecomment-553693666
将包公共代码仅提取到分包内解决，另外主包代码要精简，只放需要的代码。

authors: godpan jackjixuyu

repo: Meituan-Dianping/mpvue


text:
Added multiple spawns but only certain spawn activates on everything even if not selected.

Minecraft version
1.19.2
LibX version
1.18.2-3.3.33
Skyblock Builder version
1.18.2-3.3.33
Forge version
40.2.10
The latest.log file
https://pastebin.pl/view/b3391b0d
Issue description
When setting a spawn in the templates.json5 file it only ever uses my "single" spawn and not "default" or "spawn" when my spawn specifically has the "spawn" spawn set. Basically it keeps making the spawn islands spawn at 4, 9, 4 instead of 8,0,8 or even default.
Steps to reproduce
{
// The template which will be used for spawn only
// Example:
// {
//     "name": "default",
//     "desc": "",
//     "file": "default.nbt",
//     "spawns": "default",
//     "direction": "south"
// }
"spawn": {
"name": "Spawn",
"desc": "",
"file": "spawn.nbt",
"spawns": "spawn",
"direction": "south"
},
"spawns": {
"default": [
[ 6, 3, 5 ]
],
"spawn": [
[ 8, 0, 8 ]
],
"single": [
[ 4, 9, 4 ]
]
},
// The list of templates being available. The first entry is the default template.
"templates": [
{
"name": "Single Tree (DEFAULT)",
"desc": "A single tree on a single dirt. How single!",
"file": "single_tree_default_.nbt",
"spawns": "single",
"direction": "south"
},
{
"name": "OG Island (No Chest)",
"desc": "Miss OG Skyblock? ",
"file": "og_island3.nbt",
"spawns": "default",
"direction": "west"
},
{
"name": "Large Island",
"desc": "Big island! Yeah it got stone ",
"file": "large_island2.nbt",
"spawns": "default",
"direction": "north"
},
{
"name": "Industrial Island",
"desc": "It has water wheel but sea water! ",
"file": "industrial_island4.nbt",
"spawns": "default",
"direction": "south"
},
{
"name": "Project Tree",
"desc": "A single tree on a single dirt... or is it?",
"file": "default_projecte.nbt",
"spawns": "default",
"direction": "south"
}
]
}
EXPORTED SPAWN LIST:
{
"islandSpawns": [
[
4,
9,
4
]
]
}
Other information
No response

A few things:

I cannot reproduce this problem. I don’t know what the problem is.
This is a 1.18.2 bug. If it’s critical, I’d fix it but it seems to be another problem why this happened. This version is out for so long and that was never reported before. Maybe you’re the first :) But I think there’s another problem.
Is it still a problem? Was it fixed suddenly? If yes, you can close this :)

repo: MelanX/SkyblockBuilder


text:
update to latest Tweakpane

Hi,
this looks, great, unfortunately, I'm hitting compat issues:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tweakpane-react@0.0.0
npm ERR! Found: tweakpane@4.0.3
npm ERR! node_modules/tweakpane
npm ERR!   tweakpane@"^4.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tweakpane@"^3.1.9" from react-tweakpane@0.8.1
npm ERR! node_modules/react-tweakpane
npm ERR!   react-tweakpane@"^0.8.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!

are there any plans to continue adding features to this project, or ...

It seems the API this library is using an outdated API. .addInput has been switched to .addBinding

I'm using this PR in my projects. I updated everything to the latest API changes.

Same here, I get TypeError: o.addInput is not a function
any chance we get a package update?

authors: MagnesiumDev lazarusA owonwo

repo: MelonCode/react-tweakpane


text:
fix(tap): Fix incremental sync

Context

Incremental sync was not working as expected by syncing the last file that was already synced in a previous execution. See this test to understand the expected behavior.

If I run the sync command twice with no changes on input files it should not sync any data, but the current implementation is syncing again the data that were synced in the first execution, duplicating data

start_date filters by before or equal to unify the behavior from start_date and state, simplifying the code.
added a new row to the file: tests/data/new_hardware.csv to differ the number of rows from file: tests/data/old_hardware.csv
update documentation to make clear the expected behavior regarding start_date

There is another way I was thinking about that would allow us to do this, and not have to have a configuration option. We could store the last modified date, and a hash of the file(s) at that last modified date. If the hash is the same as what's in the state don't sync the files, if it isn't the same sync the files.

@visch I'm not sure if the hash would work, because if the hash changes between the execution, the last modified for the file will change as well, in this case, we don't need the hash, because it will be processed in the next execution since the last modified changed.
my concern is with the happy path where the data pipeline runs every day with success.
In this case, the last processed file will always be synced again by the next execution, which means every execution is going to duplicate data from the last processed file from the previous execution, even if there was no error.
The only thing that makes sense in ‘greater than or equal’ logic is when there is an error during the pipeline execution, this way the next execution will retry the sync for the failed file, is it the case?
Assuming this is the case, we could add the _sdc_line_number in the state which means the last line processed with success saved on the state.
In the happy path, this would be the last row of the file. In the next execution,

If the _sdc_line_number == the number of rows in the file then skip the file.
otherwise skip the number of rows from _sdc_line_number.

this solution would not prevent data from being duplicated in case of errors (which is ok by design), since the state is not saved on each processed row, but minimizes the number of duplicated rows and could keep the ‘greater than or equal’ logic.
Does it make sense for you? Do you think it is feasible?

@visch I'm not sure if the hash would work, because if the hash changes between the execution, the last modified for the file will change as well, in this case, we don't need the hash, because it will be processed in the next execution since the last modified changed.

My point is that another file could be added to the file system with that last modified date. Hopefully all file systems wouldn't allow the file to be updated and the last modified date to be changed I agree (we'd have other issues and incremental just wouldn't work for that scenario)

my concern is with the happy path where the data pipeline runs every day with success. In this case, the last processed file will always be synced again by the next execution, which means every execution is going to duplicate data from the last processed file from the previous execution, even if there was no error.

The only thing that makes sense in ‘greater than or equal’ logic is when there is an error during the pipeline execution, this way the next execution will retry the sync for the failed file, is it the case?

Part of it, have you read that link I posted?

Assuming this is the case, we could add the _sdc_line_number in the state which means the last line processed with success saved on the state. In the happy path, this would be the last row of the file. In the next execution,

If the _sdc_line_number == the number of rows in the file then skip the file.
otherwise skip the number of rows from _sdc_line_number.

this solution would not prevent data from being duplicated in case of errors (which is ok by design), since the state is not saved on each processed row, but minimizes the number of duplicated rows and could keep the ‘greater than or equal’ logic.
Does it make sense for you? Do you think it is feasible?

The line number isn't the main concern, and that's already handled today anyway so we should be good there

Part of it, have you read that link I posted?
yes, and this document is not clear about the reasons behind the decision of ‘greater than or equal’ logic.

closing the pr since it is by design duplicate data:

"It does also mean that the last record streamed in one execution is likely to be the first record streamed in a subsequent execution."

https://sdk.meltano.com/en/latest/implementation/at_least_once.html#cause-1-greater-than-or-equal-to-comparisons

Part of it, have you read that link I posted?

yes, and this document is not clear about the reasons behind the decision of ‘greater than or equal’ logic.

@rvantunes , kind of True but it's also possible to make this happen with the hash we talked about. If it's not a big deal to get extra data then this works too!

authors: rvantunes visch

repo: MeltanoLabs/tap-universal-file


text:
是否可参考某些现有的中文文案排版指南

昨天偶然发现了这个以及这个，我觉得还是很有参考价值的。

虽然我个人极其不习惯在中英混合排版时，用空格分隔英文和中文...

用空格分隔英文是正确的做法，但是在物品名字里好像就有点奇怪了

对了，看了下国家标准的排版，这个也是有用空格的：

repo: Meow-J/Mod-Translation-Styleguide

license: WTFPL


text:
Crystal textures have low contrast

After the rework, any fluid that had a relatively bright or high-saturation texture results in the contrast of the resultant crystal being a bit less sharp than I'd like; the outlines aren't clear. This is especially muddy in the case of metallic goo, sitting on a grey background, but several others are similar.
Aquatic, Crystal, Faunal, Honey, Logic (washed out/grey), Metal, Molten (a bit intensely lava and low contrast), Obsidian (washed out, no movement), Regal, Snow and Weird (washed out, no movement)
Some of these issues are inherited from the parent fluid having relatively listless texture animations due to some error in processing the fluid textures in GIMP prior, and will have to be fixed after the fluid textures are improved.
In most cases, though, the contrast is the result of a high-opacity overlay sort of dominating the greyscale backer sprite. The right answer would probably be to reduce that opacity by a generous amount (like down to 70% or lower, perhaps, experimental).

Overhauled every single one of these and I feel like they came away heavily improved.

repo: MercuriusXeno/Goo


text:
Doc review

updates to querying help page to ensure a fully running and useful query and results are displayed
added a link from the footer to the URIs and Identifiers help page, to address WMO Secretariat feedback

Superseded by https://github.com/MetOffice/dm-dps-wmo-codes-registry/pull/59 - Closing

authors: mike-gormley mo-marqh

repo: MetOffice/dm-dps-wmo-codes-registry


text:
希望增加naiveproxy协议支持

试用了naiveproxy速度，稳定性很好，客户端逐渐都支持了，希望clash meta也能支持

别想了，不可能的

考虑到这个 issues 没有使用正确的模板格式，我们决定关闭它。
如果你有需要请遵守模版开启新的 issues。
Considering that this issue did not use the correct template format, we decided to close it.
If you need to, please follow the template to open new issues.

repo: MetaCubeX/mihomo


text:
Generalize polling abstraction

WIP
Very rough draft pass at addressing feedback on PollingTracker enhancement work

Main question is if PollingStrategy is necessary or not. Otherwise looking great

repo: MetaMask/core


text:
[keyring-controller] Lock controller mutex on write operations

Explanation

Since all changes to the state of any keyring held by KeyringController should result in an update to the vault, we need to ensure that what we save into the vault is the result of the latest executed operation. In other words, we need to:

Ensure that each operation that changes the state is mutually exclusive. That is, if an operation is made of multiple steps, these steps are guaranteed to be executed before any other operation is started
Ensure that each operation is persisted to the vault before another operation can start

Visually:
sequenceDiagram
  create participant Client
  create participant aPublicMethod()
  Client->>aPublicMethod(): Calls a method that changes state
  create participant ControllerMutex
  aPublicMethod()->>ControllerMutex: Acquire Controller Lock
  loop Controller Lock
    ControllerMutex-->ControllerMutex: Wait controller to be available
  end
  rect rgb(230,245,255)
    note right of aPublicMethod(): Exclusive Controller OP
    participant KeyringController State
    destroy KeyringController State
    aPublicMethod()->>KeyringController State: Update Controller State
    create participant VaultMutex
    aPublicMethod()->>VaultMutex: Acquire Vault Lock
    loop Vault Lock
      VaultMutex-->VaultMutex: Wait vault to be available
    end
    rect rgb(190,225,235)
      note right of aPublicMethod(): Exclusive Vault OP
      participant Vault
      destroy Vault
      aPublicMethod()->>Vault: Persist state changes
    end
    destroy VaultMutex
    VaultMutex-->>aPublicMethod(): Release Vault lock
  end
    destroy ControllerMutex
    ControllerMutex-->>aPublicMethod(): Release Controller lock
    destroy aPublicMethod()
    aPublicMethod()-->>Client: Return value

To do this, this PR adds the KeyringController.#withControllerLock helper function, to be used on any write operation that can potentially mutate the controller state (e.g. any function that calls this.persistAllKeyrings at the end).
References

Related to #4154

Changelog

@metamask/keyring-controller

CHANGED: KeyringController method calls that change state are now mutually exclusive

Checklist

[ ] I've updated the test suite for new or updated code as appropriate
[ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate

I was thinking that this would cause a deadlock if anyone listened for state change events, then called a write operation in response, e.g.
messenger.subscribe('KeyringController:stateChange',(state) => {
 messenger.call('KeyringController:persistAllKeyrings');
});

But no, this should be OK because all write operations are async. The triggered operation would just wait for the first to complete. Is that correct?

I was thinking that this would cause a deadlock if anyone listened for state change events, then called a write operation in response, e.g.
messenger.subscribe('KeyringController:stateChange',(state) => {
 messenger.call('KeyringController:persistAllKeyrings');
});

But no, this should be OK because all write operations are async. The triggered operation would just wait for the first to complete. Is that correct?

@Gudahtt In your example, if messenger.call is called with await then it would cause a deadlock. But I would say that it is a "feature" since that particular call would probably cause an invalid state to persist, so the controller is acting as a safeguard against bad usage.
This is also part of the reason why methods and actions like persistAllKeyrings are being deprecated in upcoming PRs related to withKeyring: if we remove the necessity of doing something like your example by providing a safe alternative, we can easily avoid both deadlocks and corrupted states

Hmm. Event publishing is synchronous, so I do not see how an await could cause a deadlock. The code making the state update would not await async operations, as state updates themselves are synchronous.

In this example test case the persistAllKeyrings call is executed before the end of submitPassword, even if the event subscription is synchronous and the method call isn't. I think that with the introduction of locks, that test case would cause a deadlock since it would await on a locked mutex

With the introduction of this new lock, is the vault mutex still useful? It now seems redundant to me.
Not a blocker - we can remove it in a later PR, but if we can remove it we should, because it would simplify the controller a great deal and eliminate the chances of a new deadlock involving that mutex being introduced in the future.

is the vault mutex still useful?

Hmm, it still protects against two vault accesses in the same controller operation. I would say that it is a protection against bad controller development, while the controller mutex is a protection against bad controller usage

There are a few private methods that are write operations but have no lock, because they are intended to be called from a method that is locked. Thoughts on adding a guard to these to ensure they're always called from within a lock? e.g.
if (!this.#controllerOperationMutex.isLocked()) {
  throw new Error(KeyringControllerError.ControllerLockRequired);
}

(just like the one in #withVaultLock)
The methods I saw that would qualify here are #addQRKeyring, #createNewVaultWithKeyring, #createKeyringWithFirstAccount, #newKeyring, #restoreKeyring, #removeEmptyKeyrings, and #setUnlocked

Hmm, it still protects internally against two vault accesses in the same controller operation. I would say that it is a protection against bad controller development, while the controller mutex is a protection against bad controller usage

Hmm. It would protect against two concurrent write operations to the vault I guess, as sequential changes would be fine.
I get the impression that the lock was originally added to prevent concurrent vault operations caused by concurrent calls to write operations, rather than internal calls. I see how it could be a useful protection measure internally, but it comes at a non-trivial cost in complexity and deadlock risk, and I don't see a reason to suspect concurrent write operations are especially likely to occur. We have no similar protection against concurrent keyring updates, which would be just as problematic.

I get the impression that the lock was originally added to prevent concurrent vault operations caused by concurrent calls to write operations, rather than internal calls. I see how it could be a useful protection measure internally, but it comes at a non-trivial cost in complexity and deadlock risk, and I don't see a reason to suspect concurrent write operations are especially likely to occur. We have no similar protection against concurrent keyring updates, which would be just as problematic.

True, there's a high cost in terms of additional complexity. Perhaps we can remove the vault lock before https://github.com/MetaMask/core/pull/4192

Good point! I added assertions for all those methods 9780406

Thanks!
It looks like there is still one method missing this assertion: #createKeyringWithFirstAccount. Thoughts on adding it there as well?

It looks like there is still one method missing this assertion: #createKeyringWithFirstAccount. Thoughts on adding it there as well?

Good point! I also added it to #clearKeyrings. With these two we should have all methods interacting with this.#keyrings covered

authors: Gudahtt mikesposito


text:
8.0.0 fails to use esm in node

the dual packaging setup does not support esm version in node and cjs version does not do named exports correctly
import { getBIP44AddressKeyDeriver } from '@metamask/key-tree';
         ^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'getBIP44AddressKeyDeriver' not found. The requested module '@metamask/key-tree' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@metamask/key-tree';
const { getBIP44AddressKeyDeriver } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

More information about dual packaging here https://github.com/sheremet-va/dual-packaging.

you need to add a package.json file in the esm folder with type: module, its all the link

repo: MetaMask/key-tree


text:
MIP3 v1 - New json rpc method for swaps

MIP for new json rpc method wallet_swapAsset

Probably worth referencing the related EIP as part of the MIP: https://github.com/tommasini/EIPs/blob/64090fe54761906fc9bde31ad46eb85230de5e8d/EIPS/eip-swap-rpc.md

Thanks for the review @vandan
Added!

Just sharing some initial thoughts:
Is there anything that should be different or more explicit when a swap operation is triggered from a dapp rather than manually in the wallet UI?
I noticed that the request params are abstracted away from specific accounts. If a dapp populates swap values in the swap form, but the user wants to run the swap off of a different account address, then the UI should probably attempt to retain the other swap parameters (when possible). As an example, MetaMask mobile doesn't appear to support this behavior right now.
You can add a section for User Experience Considerations to add any UI guidelines that relate to this MIP.
Can you add more detail to the Motivation section? It would help other developers to understand when and why they should use this method.
Try to explain why this proposal is necessary and what impact it would have for the developer ecosystem. What problem does it solve (helping users get tokens they may need for a specific operation with a dapp, ensuring that users get the right tokens in their swaps, etc.)? What alternatives were considered (ex. extending via a Snap)? Why is this proposal preferred over the alternatives?
I'm also curious about what transparency should be provided when something goes wrong. What errors might be returned to the requesting dapp?

Please set this MIP as Type: Community

Status should be Draft as well.

I assume this method would be limited to accepting ERC-20 tokens, right? Or should it allow for future flexibility?
Might want to consider making the method name a little more specific to something like: wallet_swapToken or wallet_swapAsset

I assume this method would be limited to accepting ERC-20 tokens, right? Is there anything that should be considered for future flexibility? We might want to consider making the method name a little more specific to something like: wallet_swapToken or wallet_swapAsset

I do like wallet_swapAsset to be more in-line with wallet_watchAsset that supports multiple asset types now.

@vandan @shanejonas
Thanks for the review and amazing point on the account not being on the params!
Shane Jonas suggestion makes a lot of sense! We can use the same logic as we use on the send transaction rpc method, and use the account connected to the dapp, adding the from field that way!
Curious, what do you think it's the best name for the property, from_address, user_address or just address?

Can you add more detail to the Motivation section? It would help other developers to understand when and why they should use this method.
I will add! Thanks!

I'm also curious about what transparency should be provided when something goes wrong. What errors might be returned to the requesting dapp?
In terms of error handling to the dapp right now we validate the params, we send a message back when some property is wrong on these formats:

from is not defined

to is not defined

amount property of from is not defined

chainId property of from is not defined

token_address property of from is not defined

token_address property of to is not defined

chainId property of from is not defined

wallet_swapAsset  It's sounds amazing to me as well!!

Updated motivation section

Random thought since I'm hearing more about cross-chain DEXs recently.
Should we at least think about the implications for how non-EVM tokens might be accommodated in a wallet swap API. Just in case there is something we can do to keep it flexible enough for something like that in the future.

I assume this method would be limited to accepting ERC-20 tokens, right? Is there anything that should be considered for future flexibility?

@vandan When you say ERC-20 tokens, are you excluding BEP-20 and main tokens? I don't see a reason why limit it to ERC-20 tokens

I was just thinking about that as well. Planning for some flexibility beyond ERC-20s makes sense to me as well.

A potentially relevant proposal around chain identifiers from ChainAgnostic: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md

Yes!! Will definitely add to the MIP the support for the CAIP-2! It makes a lot of sense with the snaps working already!

CAIP2 or CAIP27 is still under discussion if it should be present on this wallet_swapAsset

@vandan

Please add a PR for an associated open-rpc spec for this method in the api-specs repo
https://github.com/MetaMask/api-specs/pull/201

We didn't do this in the wallet_watchAsset MIP because it was an existing method, but we should explain that developers need to ensure that the wallet is on the expected chain prior to submitting a wallet_swapAsset request (using eth_chainid, wallet_switchEthereumChain, and wallet_addEthereumChain methods as needed).

On this commit it was added this topic! Thanks!

Add error codes to the MIP: https://github.com/MetaMask/rpc-errors/blob/main/src/error-constants.ts

Will this work in a multichain setting, or Ethereum only?

@rekmarks Yes, it's totally be possible to be prepared for that!
It would be something like this structure
We could have it on the MIP as a future implementation, since on the mobile app the UI is not prepared for it yet, but when the multichain is implemented we can add this logic without breaking the default behaviour (that uses the network conected to the dapp as the default)
ethereum.request({
  method: 'wallet_swapAsset',
  params: [{
    fromToken: [{
      address: '0x1234567890abcdefABCDEF1234567890ABCDEF',
      value: '0xDE0B6B3A7640000',
      chainId: // CAIP-10 or eth
    }],
    toToken: {
      address: '0xabcdef1234567890ABCDEF1234567890abcdef',
       chainId: // CAIP-10 or eth
    },
    userAddress: '0x0000000000000000000000000000000000000000'
  },
  ]
});

Nevertheless, this was discussed and we talked about making this json rpc because the purpose would be for in first implementation to only redirect to the swaps flow already implemented on the wallet, and not with bridging functionality associated to ship it quicker and test the adoption of it! We were thinking about shipping other json rpc method for bridging/ cross chain swaps when this ones were implemented and the adoption of the builders community was validated. Happy to know your thoughts around this!

Thanks @tommasini, that sounds good. I mainly wanted to make sure that you guys had multichain in mind.
Some notes about your proposed format, just for future reference:

The chainId field would be CAIP-2 strings, not CAIP-10.
Rather than having separate chainId fields, the address fields could just be CAIP-10 addresses, which are prefixed with the CAIP-2 chain id.

If we do have separate chainId and address fields, the addresses should probably be in the format of the chain in question, since CAIP-10 is simply <caip2>:<address>.
This is part of a larger question of "how do we handle CAIP addresses in our codebase?". Personally, I think we should establish sophisticated CAIP string parsing utilities, and go with the CAIP-10 approach.

The chain of the userAddress should also be specified, either by converting the field to CAIP-10 or by adding a chainId field.

authors: rekmarks shanejonas tommasini vandan

repo: MetaMask/metamask-improvement-proposals


text:
Improve TypeScript rules to enforce unchecked indexes check

Related to #1469
This PR introduces an initial set of enhancements aimed at improving the maintainability of the front-end codebase.
Changes:

Enabled the noUncheckedIndexedAccess rule to enforce stricter type safety when accessing values by index.
Configured typescript-eslint and enabled a rule to block non-null assertions, promoting safer handling of nullable values.
Addressed existing TypeScript errors and resolved no-non-null-assertion violations resulting from the above changes.

Benefits:
These updates improve the application’s stability by encouraging proper handling of nullable states and reducing the risk of crashes during refactoring.
Note:
In scenarios where handling empty states adds unnecessary complexity, non-null assertions can still be used. For such cases, the ESLint rule can be disabled selectively for specific lines to balance safety and simplicity.

you love to see it

authors: draaglom ncarazon

repo: Metaculus/metaculus


text:
Odd issue accessing a Gitea private repo when curling the Gitea API works fine.

Something is not happening for me with a private Gitea instance, and I am not sure if it's a config issue.
I have temporarily created a token with ALL access to test this.
I get the following error when buildbot attempts to access my repo (buildbot-mannuk is an ORG);
buildbot_nix.common.HttpError: Request for GET https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config/topics failed with 403 Forbidden: {"message":"Only signed in user is allowed to call APIs."}
When I ssh into the node running buildbot and curl the Gitea API it succeeds, and I am unclear why;
~~> curl -X 'GET' \
          'https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config/topics?access_token=< tokenFile contents >' \
          -H 'accept: application/json'

Response below which is correct;
{"topics":["buildbot-mannuk"]}

Buildbot service snippet;
    admins = [
      "mannuk-buildbot"
    ];
    authBackend = "gitea";
    gitea = {
      enable = true;
      instanceUrl = "https://git.domain.com";
      topic = "buildbot-mannuk";
      tokenFile = config.sops.secrets."buildbot/gitea-token".path;
      webhookSecretFile = config.sops.secrets."buildbot/gitea-webhook-secret".path;
      oauthSecretFile = config.sops.secrets."buildbot/gitea-oauth-secret".path;
      oauthId = "redacted";
    };

Using the gitea swagger api, I note that the api only works if the repo owner is specified. Does this mean that the buildbot user has to own the repo being built?
Any thoughts as to what's going on? Thanks.

Maybe the API is not used correctly here.
So it first fetches all repositories:
https://github.com/Mic92/buildbot-nix/blob/e9a3849417fa3e06b12c026cee4823b39e3883ce/buildbot_nix/gitea_projects.py#L279C32-L279C59
f"{config.instance_url}/api/v1/user/repos?limit=100"
And than it uses this api call:
f"{config.instance_url}/api/v1/repos/{repo['owner']['login']}/{repo['name']}/topics",
However one difference I see is that it uses http header for authentication:
headers={"Authorization": f"token {config.token}"},

Does curl -H "Authorization: token ${token}" work?

Maybe forking the project and add some print statement to see if the token is actually what you would expect, can help here. I haven't tested it with private repository so far as it's just now on opensource projects.

Thanks for coming back and trying to help.
I am on my phone atm so responses might be a little basic.
I've edited the first post to make it clear that yes the curl command worked fine from the buildbot node.
I checked on matrix chat and it seems me adding private is irrelevant as the api works regardless of being private and if the token is correct it should see the repo.
I noted on github you have a 'user' which might populate the user/owner of the repo in an api call, but we do not appear to have access to that user for gitea?

The owner comes from the information returned by /api/v1/user/repos?limit=100

Does curl -H "Authorization: token $token" https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config/topics work?

Yes this works, it returns;
{"topics":["buildbot-mannuk"]}

So after some investigation I loosened the CORS and headers settings I was using and now have the initial API working fine from within the buildbot node.....so both API call now work with the token set in the header;
->> curl -X 'GET' \
                  'https://git.domain.com/api/v1/user/repos?limit=100' \
                  -H 'accept: application/json' \
                  -H 'Authorization: token < token >'
[{"id":20,"owner":{"id":14,"login":"buildbot-mannuk","login_name":"","full_name":"","email":"","avatar_url":"https://git.domain.com/avatars/...","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2024-05-05T17:33:30+01:00","restricted":false,"active":false,"prohibit_login":false,"location":"","website":"","description":"","visibility":"private","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"buildbot-mannuk"},"name":"nix-config","full_name":"/nix-config","description":"","empty":false,"private":true,"fork":false,"template":false,"parent":null,"mirror":false,"size":2227,"language":"Nix","languages_url":"https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config/languages","html_url":"https://git.domain.com/buildbot-mannuk/nix-config","url":"https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config","link":"","ssh_url":"git@git.domain.com:buildbot-mannuk/nix-config.git","clone_url":"https://git.domain.com/buildbot-mannuk/nix-config.git","original_url":"","website":"","stars_count":0,"forks_count":0,"watchers_count":2,"open_issues_count":0,"open_pr_counter":0,"release_counter":0,"default_branch":"main","archived":false,"created_at":"2023-11-11T23:21:36Z","updated_at":"2024-05-05T17:35:26+01:00","archived_at":"1970-01-01T01:00:00+01:00","permissions":{"admin":true,"push":true,"pull":true},"has_issues":false,"has_wiki":false,"has_pull_requests":true,"has_projects":true,"has_releases":true,"has_packages":true,"has_actions":false,"ignore_whitespace_conflicts":false,"allow_merge_commits":true,"allow_rebase":true,"allow_rebase_explicit":true,"allow_squash_merge":true,"allow_rebase_update":true,"default_delete_branch_after_merge":false,"default_merge_style":"merge","default_allow_maintainer_edit":false,"avatar_url":"","internal":false,"mirror_interval":"","mirror_updated":"0001-01-01T00:00:00Z","repo_transfer":null}]

This is the full error buildbot-nix gives me;
Failed to reload project list: Traceback (most recent call last):
File "/nix/store/lpi16513bai8kg2bd841745vzk72475x-python3-3.11.9/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/nix/store/lpi16513bai8kg2bd841745vzk72475x-python3-3.11.9/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/_threads/_threadworker.py", line 49, in work
task()
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/_threads/_team.py", line 192, in doWork
task()
--- <exception caught here> ---
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 269, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/threadpool.py", line 285, in <lambda>
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/gitea_projects.py", line 251, in reload_projects
refresh_projects(self.config, self.project_cache_file)
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/gitea_projects.py", line 290, in refresh_projects
topics: list[str] = http_request(
File "/nix/store/9hhsjc8fisn7np61njgaqs8i7c4m6p85-python3-3.11.9-env/lib/python3.11/site-packages/buildbot_nix/common.py", line 79, in http_request
raise HttpError(msg) from e
buildbot_nix.common.HttpError: Request for GET https://git.domain.com/api/v1/repos/buildbot-mannuk/nix-config/topics failed with 403 Forbidden: {"message":"Only signed in user is allowed to call APIs."}

I am going to close this for now as setting up a new forgejo instance to try this with.
I believe its due to Gitea being behind traefik, but putting time into a new setup, rather than try and further debug the old.

I did find a bug, where inside the reload-gitea-projects it was passing a function pointer instead of a token, ill push the patch soon and then you can retry, it may have been that

I did find a bug, where inside the reload-gitea-projects it was passing a function pointer instead of a token, ill push the patch soon and then you can retry, it may have been that

Hey @MagicRB thank you for coming back on this one as after a good while trying I still haven't got buildbot linked to gitea :-/ and haven't had more time to try and debug.
As I could ssh into the nodes and curl the gitea api successfully, but using the same token failed in buildbot, I suspected a token relatedcissue, so I will certainly give it another try once you have had time to merge it :)

yeah this one's on me, so only right I notified you of a fix :) i found it as part of creating a private repo on codeberg and my buildbot instance exploding. I will push the fix with the PR im working on rn for GitHub app support (ill make a separate PR)

Nothings on anyone, its open source, so no issue there, but if it solves my problem, it might help my sanity :)
Chatting in the forgejo matrix room, I understood private repos were not relevant as if the token has access, private or not, the api will work.
That said, it might of course be relevant in build bot somehow :)

authors: MagicRB Mic92 mannp