Condition template not working in automation.

Home Assistant release with the issue:
0.99.2
Last working Home Assistant release (if known):
not known
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Component/platform:
https://www.home-assistant.io/docs/automation/condition/
Description of problem:
The condition of type template in my automation does not work. It should execute the actions underneath only when the value of the current_position attribute of my cover.markisenaktor is smaller than 100. I verified current_position to be 100 and executed the automation manually. Unfortunately, the automation executes the services under action:. It sends a push notification using my script.all_notify. It even reports the value of current_position, which is 100.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Relevant entry in my automations.yaml file:
- alias: Markise nachts schließen
  trigger:
    - platform: time
      at: '01:00:00'
  condition:
    - condition: template
      value_template: "{{ state_attr('cover.markisenaktor', 'current_position') | int < 100 }}"
  action:
    - service: script.all_notify
      data_template:
        message: "Markise wird geschlossen (war: {{ state_attr('cover.markisenaktor', 'current_position') }} %)."
    - service: cover.set_cover_position
      data:
        entity_id: cover.markisenaktor
        position: 100

Traceback (if applicable):
2019-09-22 17:40:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event automation_triggered[L]: name=Markise nachts schließen, entity_id=automation.markise_nachts_schliessen>
2019-09-22 17:40:25 INFO (MainThread) [homeassistant.components.automation] Executing Markise nachts schließen
2019-09-22 17:40:25 INFO (MainThread) [homeassistant.helpers.script] Script Markise nachts schließen: Running script
2019-09-22 17:40:25 INFO (MainThread) [homeassistant.helpers.script] Script Markise nachts schließen: Executing step call service
2019-09-22 17:40:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=script, service=all_notify, service_data=message=Markise wird geschlossen (war: 100 %).>
2019-09-22 17:40:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event script_started[L]: name=Sende Systeminfo an alle, entity_id=script.all_notify>
2019-09-22 17:40:25 INFO (MainThread) [homeassistant.helpers.script] Script Sende Systeminfo an alle: Running script
2019-09-22 17:40:25 INFO (MainThread) [homeassistant.helpers.script] Script Sende Systeminfo an alle: Executing step call service
2019-09-22 17:40:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=notify, service=pushover, service_data=title=Systeminformation, message=Markise wird geschlossen (war: 100 %).>
2019-09-22 17:40:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.all_notify, old_state=<state script.all_notify=off; last_triggered=None, friendly_name=Sende Systeminfo an alle @ 2019-09-22T17:39:30.526249+02:00>, new_state=<state script.all_notify=off; last_triggered=2019-09-22T17:40:25.709286+02:00, friendly_name=Sende Systeminfo an alle @ 2019-09-22T17:39:30.526249+02:00>>
2019-09-22 17:40:26 INFO (MainThread) [homeassistant.helpers.script] Script Markise nachts schließen: Executing step call service
2019-09-22 17:40:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=cover, service=set_cover_position, service_data=entity_id=cover.markisenaktor, position=100>
2019-09-22 17:40:26 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548452927120] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=script.all_notify, old_state=<state script.all_notify=off; last_triggered=None, friendly_name=Sende Systeminfo an alle @ 2019-09-22T17:39:30.526249+02:00>, new_state=<state script.all_notify=off; last_triggered=2019-09-22T17:40:25.709286+02:00, friendly_name=Sende Systeminfo an alle @ 2019-09-22T17:39:30.526249+02:00>>}
2019-09-22 17:40:26 DEBUG (SyncWorker_14) [pyhomematic.devicetypes.generic] HMGeneric.setValue: address = '001158A992958E:4', key = 'LEVEL' value = '1.0'
2019-09-22 17:40:26 DEBUG (Thread-2) [pyhomematic._hm] RPCFunctions.event: interface_id = homeassistant-ip, address = 001158A992958E:0, value_key = CONFIG_PENDING, value = False
2019-09-22 17:40:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=automation.markise_nachts_schliessen, old_state=<state automation.markise_nachts_schliessen=on; last_triggered=2019-09-22T17:10:56.789470+02:00, friendly_name=Markise nachts schließen @ 2019-09-22T17:39:31.091266+02:00>, new_state=<state automation.markise_nachts_schliessen=on; last_triggered=2019-09-22T17:40:26.520723+02:00, friendly_name=Markise nachts schließen @ 2019-09-22T17:39:31.091266+02:00>>
2019-09-22 17:40:26 INFO (Thread-2) [pyhomematic.devicetypes.generic] HMGeneric.event: address=001158A992958E:0, interface_id=homeassistant-ip, key=CONFIG_PENDING, value=False
2019-09-22 17:40:26 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.548452927120] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=automation.markise_nachts_schliessen, old_state=<state automation.markise_nachts_schliessen=on; last_triggered=2019-09-22T17:10:56.789470+02:00, friendly_name=Markise nachts schließen @ 2019-09-22T17:39:31.091266+02:00>, new_state=<state automation.markise_nachts_schliessen=on; last_triggered=2019-09-22T17:40:26.520723+02:00, friendly_name=Markise nachts schließen @ 2019-09-22T17:39:31.091266+02:00>>}

Additional information:
I use a homematic IP cover actor (HmIP-FROLL) with piVCCU 3. All firmwares are up to date.

executed the automation manually

When you execute an automation manually, its trigger and condition sections are ignored and only the action section is evaluated. So your condition is fine, it's simply not being evaluated when you trigger the automation manually.

Alright. Sorry for missing that. Then it is quite hard to check that condition.
My condition was originally wrong, I missed the quotation marks around cover.markisenaktor like state_attr(cover.markisenaktor, 'current_position').
Can it be that this leads to undefined behavior?
When some other unrelated state changed and the automation was activated at 1 AM, the condition was evaluated to true. Absolutely strange.

Let's assume there's a chance, perhaps during the brief time when Home Assistant starts, when the cover's state and all its attributes are unknown. Here is how your template will handle that situation:

The state_attr function will report unknown
The int filter will convert unknown to 0
The test will succeed because 0 is less than 100
The template will report True
The condition will be True so the automation will proceed to execute the action.

So if there's a chance the attribute is unknown the action will occur.
One way to prevent this unwanted behavior is to change the default value produced by the int filter. In the following example, it will default to using 101 when it encounters unknown. A value of 101 exceeds 100, the condition will evaluate to false and the action will not be executed.
{{ state_attr('cover.markisenaktor', 'current_position') | int(default=101) < 100 }}

Closing this as it's not a bug.


terminated statements in JS template for karma config

I signed it!

Thanks but we don't use semicolons in karma that's why there are not in there.


Calling /etc/init.d/consul restart sometimes ends up with a stopped …

…consul process. The reason is that the init script sometimes starts consul before it was completely stopped. During a cookbook upgrade from version 2.1.3 to 2.2.0 this took down the consul agent on a number of our servers.
This can be easily reproduced runnning:
watch -n 0.5 -e '/etc/init.d/consul restart; sleep 0.1; /etc/init.d/consul status'
Adding the --retry parameter lets start-stop-daemon wait until the consul process is actually stopped.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@f01a12d). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #427   +/-   ##
=========================================
  Coverage          ?   64.14%
=========================================
  Files             ?        7
  Lines             ?      357
  Branches          ?        0
=========================================
  Hits              ?      229
  Misses            ?      128
  Partials          ?        0

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 f01a12d...a723491. Read the comment docs.

The underlying has the potential to take down 20 percent of all consul agents when appliying a config change accross an entire environment. When hundreds of servers are involved easily dozens of them will be stopped instead of restarted. Which is why I believe this fix is quite important.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@f01a12d). Click here to learn what that means.
The diff coverage is 50%.

@@            Coverage Diff            @@
##             master     #427   +/-   ##
=========================================
  Coverage          ?   59.49%
=========================================
  Files             ?        7
  Lines             ?      358
  Branches          ?        0
=========================================
  Hits              ?      213
  Misses            ?      145
  Partials          ?        0

Impacted Files
Coverage Δ

libraries/consul_config.rb
77.86% <50%> (ø)

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 f01a12d...a723491. Read the comment docs.


Add full query logging to reconciliation loop

We have a number of PRs + issues open across 3 repos to add full query logging capabilities to k8ssandra, since it was added in Cassandra 4.0.0.
Management API - https://github.com/k8ssandra/management-api-for-apache-cassandra/issues/131
Cass config builder (definition submodule) - https://github.com/datastax/cass-config-definitions/pull/65
k8ssandra helm charts - https://github.com/k8ssandra/k8ssandra/issues/1102
I think we may also need to add a call to the management API  from cass-operator. This will ensure that the system state is brought into the target  state described in the CassandraDatacenter (and propagated to Cassandra via cassandra.yaml) during the reconciliation loop.
┆Issue is synchronized with this Jira Task by Unito
┆Issue Number: K8SSAND-917
┆Priority: Medium

Why would we need to call the management-api? If query logging is enabled that will trigger a statefulset update, i.e., a rolling restart which means the change will take effect.


ModuleNotFoundError: No module named 'sonique.stable_audio_tools'

Hi,
Thanks for releasing SONIQUE!
I'm trying to run the inference code but I'm running into the error ModuleNotFoundError: No module named 'sonique.stable_audio_tools'.
I installed the SONIQUE package using pip install git+https://github.com/zxxwxyyy/sonique.
Full traceback:
  File "/home/user/app/app.py", line 1, in <module>
    from sonique import get_pretrained_model
  File "/usr/local/lib/python3.10/site-packages/sonique/__init__.py", line 1, in <module>
    from .stable_audio_tools.models.factory import create_model_from_config, create_model_from_config_path
ModuleNotFoundError: No module named 'sonique.stable_audio_tools'

Thanks!

Hi, thank you for your interest in SONIQUE! I believe that's because the internal dependencies aren’t properly resolved when installed directly from the repo. Please try follow the instruction to set up

Hi,
Thanks for the tip - I was actually able to resolve the issue by copying the code files into my project directory - for some reason it looks like the stable audio tools module was not installed.
Sorry about the trouble!


[FR] fallback resolve when not in cache yet

Hi,
Unbound works great! No doubt there!
But the reverse DNS nature also makes it sluggish for initial DNS lookups that aren't cached yet.
While this certainly isn't an issue, having it even better can't be bad. Right? :)
My suggestion is as follows:
When unbound handles a DNS request it should do a couple of things:

When it's cashed return it to the user (fast)
When it's not cached:
2.1 (in the background) build your cache for that request
2.2 immediately return from a fallback dns (<IP_ADDRESS>, <IP_ADDRESS>, .. you get the idea)

My thinking here is that knowing if an entry is cached or not is probably known in microseconds. From that point on you - from the users point of view - either return the cached result or return what public DNS providers have. Giving a net result of always being fast.
And for the next lookup, when unbound has resolved it with reverse dns heuristics, you get the cache back.
There is a little bit of a tradeoff here with privacy and speed. Some people will always opt for the privacy side, some for the speed. And others flip between them. Suffice to say, this probably has to be optional and potentially even disabled by default.
Or is all of this already possible??
Best regards,
Mark

Hi @saint-lascivious,
I've read your message half a dozen times and still don't understand it fully.
Are you telling me that the unbound cache is, by default, in-memory only? So a restart of the service (or pc it's running on) means the caches start from scratch?
Also, my intention might not have been clear enough.
When you do a DNS request which isn't cached yet, that request can easily take up to even a second.
I'm asking for a way to, when you don't have the DNS in cache at all yet, to basically follow 2 paths.

Internally unbound should do it's thing and resolve it.
While it's doing that, don't wait but just immediate return whatever a DNS service like <IP_ADDRESS> returns.

Hi @saint-lascivious,
I've read your message half a dozen times and still don't understand it fully.
Are you telling me that the unbound cache is, by default, in-memory only?

Yes.
So a restart of the service (or pc it's running on) means the caches start from scratch?
Also yes.

Also, my intention might not have been clear enough.

You were clear. I'm aware of what you want to achieve, I was trying to point out that, in this author's opinion, it's not really needed at all. Those gruelling long slogs to resolve obscure novel domains should ideally only be happening once, and then the cachedb backend will have the recursed path in long term cache.
If it's a domain you access with any regularity, cache prefetch will grab it and keep the cached record fresh in both cache and cachedb.
You could also look into tuning your fetch-policy values. By default Unbound will attempt to grab more of the path than it needs to recurse a given result, to assist with future results. This can be somewhat of a double edged sword, or robbing Peter to pay Paul, or whichever idiom you'd prefer. I have my fetch policy set up so that it's grabbing only what's required to satisfy the given query and no more. Somewhat Bind-like.
Another thing you could look into is triggering a cache warmup script on service restart or whenever is convenient to you (small AM hours, etc.). There's a simple yet suitable example of this in the contrib folder in Unbound's source.

That's very interesting!
Sounds like the default unbound setup, while great already, isn't that well tuned for the local home case where you just "might" have a restart every once in a while.
I'm using pi-hole which uses this unbound dockerfile: https://github.com/MatthewVance/unbound-docker/blob/master/1.12.0/Dockerfile
Now i'm sure i can figure out the redis part, create a new dockerfile, update pi-hole to use that instead and finally have it working... Not really looking forward to that to be honest. Are you aware of a dockerfile + redis configuration? That would be a much easier starting point for me!

No, I'm not aware of such a thing I'm afraid.
To be perfectly honest I don't much understand the use case for Docker outside of circumstances where the host is necessitated to provide 1+N versions of $RANDOM_BINARY dependency.
For example:

Service A requires Binary version X
Service B requires Binary version Y

Outside of that circumstance, it feels a lot like additional overhead for no reason to me. Though I'm not exactly a hip young whippersnapper anymore.
Ideally, my opinion, your resolution stack should reside on dedicated hardware and perform that function singularly.


Status code in response does not match the status_code in the decorator

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[ ] I already checked if it is not related to FastAPI but to Pydantic.
[ ] I already checked if it is not related to FastAPI but to Swagger UI.
[ ] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug. - If this is a bug, I can try raising a PR

Example
Here's a self-contained, minimal, reproducible, example with my use case:

from typing import Optional
from fastapi import FastAPI
from fastapi.responses import JSONResponse
from pydantic import BaseModel
from starlette import status

class MyItem(BaseModel):
    item_id: str
    is_offer: Optional[bool] = None

app = FastAPI()

@app.post("/items", status_code=status.HTTP_201_CREATED)
async def post_item(item: MyItem):
    return JSONResponse({"item_id": item.item_id})

Description
New user of FastAPI here. I have considerable experience with flask where return codes are set in the return statement.
Took an example from the documentation and gave it a run to test my understanding.
Swagger Docs respond correctly.

POST a request to the endpoint /items (default example in swagger).
It returns with status code 200.
But I expected it to return 201.

Is this expected? Have I misunderstood something in the docs?
My understanding of the status_code parameter is that it is the default status code which can be overridden by <Response>.status_code = <int>
Is status_code just for the Swagger docs?
Environment

OS: [e.g. Linux / Windows / macOS]: Ubuntu
FastAPI Version [e.g. 0.3.0]: 0.61.1 (even tried with 0.60.0 to check if it is just happening for this version)
Python Version: 3.7.5

Additional context

Thanks a lot @gabrielweich. That was super fast and spot on.
Q to the maintainers:
Is this expected behavior? For some reason was this designed to be this way?
I think it would be more consistent and easier to reason with if the status_code in decorator is respected with precedence order:
explicitly status_code in JSONResponse/Response > status_code set in the decorator > the default 200 status_code (that is anyhow the default for the decorator too)
It might just be my personal preference, so, please feel free to let me know your thoughts and close the issue.

Is this expected behavior? For some reason was this designed to be this way?
Yes, it's the expected behavior. It was a choice, it could have been different.

When you return JSONResponse you're basically saying: "Hey, I want to be in charge now!". Then FastAPI loses some of its power.

Yep, exactly what @Kludex said. 👆


Functional differences with that of glog

Hi Kjell,
Thank you for this excellent piece of work!
I am considering migrating our codebase from glog to this async logger because of performance. I noticed some differences with glog as below:

Observed missing thread id from log line while using the default logger(g3::FileSink)
g3log creates one log file compared to glog which creates one file per log level(Not a big deal but just wanted to confirm the behavior)
Don't see I, W and E prefixes in the log lines(Again, just wanted to confirm this difference)

I am not sure whether those differences are deliberate or I am missing something. So, would greatly appreciate your input on the above mentioned differences.
Thanks,
Pabitra

Hi 1) For thread ID please see the documentation regarding custom formatting https://github.com/KjellKod/g3log/blob/master/docs/API_custom_formatting.md2)I don’t  really think glog’s approach here is great but if that’s what you want that way to achieve either with using g3sinks (https://github.com/KjellKod/g3sinks )with filtered logs or writing your own sink 3) I don’t know what “I, W, E” prefixes are or why we would want them. If it’s something you think the community should benefit from then please put up a PRCheersKjellSent from my iPhoneOn Aug 20, 2023, at 10:15 PM, pabitra-nayak @.***> wrote:
Hi Kjell,
Thank you for this excellent piece of work!
I am considering migrating our codebase from glog to this async logger because of performance. I noticed some differences with glog as below:
Observed missing thread id from log line while using the default logger(g3::FileSink)
g3log creates one log file compared to glog which creates one file per log level(Not a big deal but just wanted to confirm the behavior)
Don't see I, W and E prefixes in the log lines(Again, just wanted to confirm this difference)
I am not sure whether those differences are deliberate or I am missing something. So, would greatly appreciate your input on the above mentioned differences.
Thanks,
Pabitra
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Thank you Kjell for your prompt response.

Having thread id in the log line is important for us at it helps a lot in production troubleshooting, I will have a look at the custom formatting you suggested.

Having a separate log file for each log level is more of a convenience as we have some existing log analysis scripts relying on it. I will probably change those scripts instead of creating separate log files.

glog adds I, W and E as  prefix to each line signifying INFO, WARNING or ERROR respectively. One such example below:
I20230820 19:00:39.871968 552441 Application.cpp:684] Instantiating Application
We have some log analysis scripts relying on that prefix. I don't think adding that feature would be very beneficial for the wider community. So, I might as well go for changing those log analysis scripts to search for the word 'INFO' instead of the 'I' prefix.

Thank you for explaining. If your look in the docs and tests regarding
custom levels then you can see that adding your own custom levels is very
easy.  Please see
the integer values for respective value also as I’m assuming you would want
E to maybe be treated as a fatal level.
On Sun, Aug 20, 2023 at 11:50 PM pabitra-nayak @.***>
wrote:

Thank you Kjell for your prompt response.

Having thread id in the log line is important for us at it helps a lot
in production troubleshooting, I will have a look at the custom formatting
you suggested.
2.
Having a separate log file for each log level is more of a convenience
as we have some existing log analysis scripts relying on it. I will
probably change those scripts instead of creating separate log files.
3.
glog adds I, W and E as prefix to each line signifying INFO, WARNING
or ERROR respectively. One such example below:
I20230820 19:00:39.871968 552441 Application.cpp:684] Instantiating
Application
We have some log analysis scripts relying on that prefix. I don't
think adding that feature would be very beneficial for the wider community.
So, I might as well go for changing those log analysis scripts to search
for the word 'INFO' instead of the 'I' prefix.
—
Reply to this email directly, view it on GitHub
https://github.com/KjellKod/g3log/issues/500#issuecomment-1685692000,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACQ7XSPUFRNJI73LCU2JXLXWLZJVANCNFSM6AAAAAA3XY4QTY
.
You are receiving this because you commented.Message ID:
@.***>

--

Kjell Hedstrom

Thank you Kjell for your valuable input.  It is indeed very easy to format as per my need which only requires writing additional hooks, appreciate the flexible design!
I used the existing FullLogDetailsToString for printing the thread id as below:
handle->call(&g3::FileSink::overrideLogDetails, &g3::LogMessage::FullLogDetailsToString);
You are right, E prefix maps to Fatal.


Add a known bugs link

Should redirect to the issues, not sure how to link to both frontend and backend.

This is somewhat addressed with KnownErrors
https://github.com/manulera/ShareYourCloning_frontend/blob/9cf4703e987bd57ae9a8e9fa64433d0313474ad6/src/components/ShareYourCloning.jsx#L35-L51


RivaTuner overlay conflict

Greetings!
I've been using hudhook for a while now, and it works just fine on all my setups (Linux, Windows, Windows 11, Steam Deck). However, some users report that the UI code simply doesn't show up at all.
I requested a logfile with RUST_LOG=trace, and one thing I noticed is that the IDirect3DDevice9::Present hook (and my view code) is only called once. The program continues to work as expected, but ImGui never shows up.
Here's a logfile for the non-working user:
trace.log.2024-07-21.log
And for comparison, here's a logfile for a working user:
trace.log.2024-07-21.log
Unfortunately I've not been able to reproduce this issue. Any help would be greatly appreciated.

Hey! 👋
This behavior has happened to me, and in those cases usually the culprit is another software hijacking Present themselves. RivaTuner Statistics Server is usually a big offender in this regard, otoh the Steam overlay is innocuous. I don't have a good enough model of how to prevent this other than telling users not to use other overlay software at the same time, but I wish we could find a workaround.

Bingo!
All of the affected users seem to have been running RivaTuner, and disabling it fixed the issue. In my particular use case, I imagine I can fix it by not hooking Present directly, and hooking the game function that calls it instead. Though at that point I'd have to create my own DX9 renderer, which might not be worth the effort just to fix RivaTuner :p
Thanks for the help!

Glad to help! Actually I'd like to figure out a solution for RTSS since it's pretty pervasive and it's likely that users might have it already, so let's keep this issue open to track that.

@veeenu Sorry for the delayed response. I didn't have access to a Windows machine until recently, so I couldn't reproduce this issue myself. I'll try it next week and report back. For what it's worth, the game in question is DX9 so the bug may be specific to that backend considering it's not present on Elden Ring.

All good (and good for you!) I'll report my findings anyway and see if I can fix it myself.


SteamVR_Camera logo width fit to inspector view

Prevent horizontal scrolling of 'Inspector' window content when SteamVR_Camera component is added to the camera game object.
Use EditorGUIUtility.currentViewWidth rather than Screen.width to calculate logo width.
Note only updating:
v54/Assets/SteamVR/Editor/SteamVR_Editor.cs

Let me know if these should be updated as well:
v4/Assets/SteamVR/Editor/SteamVR_Editor.cs
v5/Assets/SteamVR/Editor/SteamVR_Editor.cs

Do you know what versions of Unity this should be applied in?  Or what versions are broken using just Screen.width?
Here are some reports of EditorGUI.currentViewWidth being broken:
https://issuetracker.unity3d.com/issues/custominspector-editorguiutility-dot-currentviewwidth-returns-wrong-value
I haven't noticed the SteamVR_Camera inspector being broken myself in the versions of Unity I have been testing with.

I'm no longer able to reproduce the problem on these versions:

Unity 5.4.2f2-GVR13
Unity 5.5.0p1
Unity 5.6.0b9

I'm going to close this for now.  We can reopen it if we find versions that need to be fixed.  Thanks!


groq-builder: zod compatibility

What
Ensures full compatibility with Zod.
Ditches the "lite validation" that I had implemented.
If Zod is not used, it can still be tree-shaken with this approach, so it's still an "optional" dependency.
Additional changes:

Type improvements, documentation as per feedback from @bkonkle
Added validationRequired: true flag, for enforcing runtime validation if desired
Removed $ from q.conditional$ and q.select$ methods; these are now just q.conditional and q.select
Improved all projections, so that "optional" values are correctly mapped as | null types

I added like a hundred more commits :) I had a lot of things on the mind to fix and improve!

@scottrippey not sure if this is the right format but using Zod for all validation will certainly slow down the editors and possibly noticable runtime validations as queries become complex.
Added a bit context in #261 but after using Groqd for >10 production projects we are scrambling for an option as developer experience has become intolerable.

I'd love to discuss!
For our next major release, we've made zod optional, so maybe that will help with your performance issues. However, we've added a lot more TypeScript in order to enable auto completion too.
I'd love to hear more about the kind of performance issues you've experienced. Are these run time issues? Or TypeScript + IDE performance issues?


New release where SolarPos members are public?

Hi!
I noticed that the members of the SolarPos struct are public in the master branch. Is there any chance you're planning on publishing this as a release on crates.io? :)

yes, fix is in release 0.3.0


[Feature request] Don't use timeoutlen?

Simple feature request--don't use timeoutlen and have a variable to define delay to show the popup. People may want a low timeoutlen but a higher delay for which-key menu to display. I use a really low timeoutlen and prefer at least a second in delay.
Also, an unrelated question--is there a repository for which-key mappings where people can submit the default bindings for various plugins?

I (very briefly) looked into this by grepping the codebase for timeoutlen. It seems this plugin does not actually read timeoutlen anywhere, it just leverages timeoutlen in some native way.
So: this feature is probably going to have to come from someone with deep(er) knowledge of the internals, not a passer-by like me :)

It's simply not possible. Closing this


[SPARK-28373][DOCS][WebUI] JDBC/ODBC Server Tab

What changes were proposed in this pull request?
New documentation to explain in detail JDBC/ODBC server tab. New images are included to better explanation.

Does this PR introduce any user-facing change?
Only documentation
How was this patch tested?
I have generated it using "jekyll build" to ensure that it's ok

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

ok to test

cc @juliuszsompolski @wangyum

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15261/
Test PASSed.

Test build #110264 has started for PR 25718 at commit 6618805.

Test build #110264 has finished for PR 25718 at commit 6618805.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110264/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15271/
Test PASSed.

Test build #110275 has started for PR 25718 at commit e6395d5.

Test build #110275 has finished for PR 25718 at commit e6395d5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110275/
Test PASSed.

Thanks for the revision @juliuszsompolski !!

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15412/
Test PASSed.

Test build #110426 has started for PR 25718 at commit c465486.

Test build #110426 has finished for PR 25718 at commit c465486.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110426/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15420/
Test PASSed.

Test build #110433 has started for PR 25718 at commit 6f38356.

Test build #110433 has finished for PR 25718 at commit 6f38356.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110433/
Test PASSed.

Yes, it makes a lot of sense, we shouldn't use the word Job in that cases. I'm going to review it. Good point

Merged build finished. Test PASSed.

Test build #110435 has finished for PR 25718 at commit 6932aae.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110435/
Test PASSed.

Thank @juliuszsompolski  for the review work

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15426/
Test PASSed.

Test build #110439 has started for PR 25718 at commit 24b91bc.

Test build #110439 has finished for PR 25718 at commit 24b91bc.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110439/
Test PASSed.

@planga82 Could you update the image in the PR description based on current code?

@wangyum Yes, of course, updated.

Test build #110487 has started for PR 25718 at commit 4e662a5.

It's no problem @juliuszsompolski. The important thing is that the document get as clear as posible. All ideas are welcome.
Images updated with the last changes

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/15463/
Test PASSed.

Test build #110487 has finished for PR 25718 at commit 4e662a5.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/110487/
Test PASSed.


Error trying to connect to local Virtuoso instance running via Docker on Fedora

Issue Description
When trying to connect to connect to Virtuoso via SQLAlchemy I get the error [IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect).
I've tried multiple workarounds to configure the driver properly on Fedora, but have not been able to get over this particular error.
The test consists of initiating Virtuoso via Docker Compose and running a python script equivalent to the following:
from sqlalchemy import create_engine

metadata = MetaData()
...
# create multiple tables associated to metadata
...

engine = create_engine("virtuoso+pyodbc://dba:dba@VOS")

with engine.connect().execution_options(isolation_level="AUTOCOMMIT") as conn:
    with engine.begin():
        metadata.drop_all(conn, checkfirst=True)
        metadata.create_all(conn, checkfirst=False)
    conn.commit()

The error is being raised the line with engine.connect().execution_options(isolation_level="AUTOCOMMIT") as conn:, which indicates that is unlikely associated to the specific tables I'm trying to create.
Also, after searching this error I found this StackOverflow post whose answer indicates that the issue is likely related to some problem with the ODBC driver installation/configuration.
Would you be able to provide further detail on how the driver could be installed/configured on Fedora and how I might solve this particular issue?
End of Error Stack Trace
... lib64/python3.11/site-packages/sqlalchemy/engine/default.py", line 616, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')
(Background on this error at: https://sqlalche.me/e/20/rvf5)

Test Environment:
Virtual Machine (VM) Setup
VM OS: Fedora release 39 (Thirty Nine)
VM CPU / RAM / Disk: 2 / 4GB / 32 GB
Hypervisor: Oracle VirtualBox 7.0.4
Host OS: MacOS 14.2.1 (Sonoma)

Python Setup
Python 3.11.7
pip 24.0 from /home/eltons/virtualenvs/dbms-benchmarking-framework/lib64/python3.11/site-packages/pip (python 3.11)

# dependencies
virtuoso-sqlalchemy @ git+https://github.com/OpenLinkSoftware/Virtuoso-SQLAlchemy.git@1f88bad4142dfbb030934be3a6fc87d9b6374529
SQLAlchemy==2.0.25
pyodbc==5.1.0

docker-compose.yaml
version: '3.1'

services:

  db:
    image: openlink/virtuoso-opensource-7:7.2.11
    ports:
      - '1111:1111'
      - '8890:8890'
    shm_size: 4g
    environment:
      - DBA_PASSWORD=dba

ODBC
unixODBC 2.3.11
Installed using sudo dnf install unixODBC-devel
~/.odbc.ini
; Data Source Name and associated Driver Section
VOS          = OpenLink Virtuoso ODBC Driver (Unicode)

; Data Source Name and associated Driver Library section
[VOS]
Description = Open Virtuoso
Driver      = /usr/local/virtuoso-opensource/lib/virtodbcu_r.so
Database    = Demo
Address     = localhost:1111
WideAsUTF16 = Yes

/etc/odbcinst.ini
Manually added the following lines to the end of the file:
# Driver from Virtuoso-SQLAlchemy
# Setup from the unixODBC pacakge
[VOS]
Description     = Open Virtuoso
Driver              = /usr/local/virtuoso-opensource/lib/virtodbcu_r.so
Database        = Demo
Address          = localhost:1111
WideAsUTF16     = Yes

virtodbcu_r.so
Copied from the virtuoso container to /usr/local/virtuoso-opensource/lib/ via docker cp (since we could not find it anywhere else):
sudo docker cp virtuoso_db_1:/opt/virtuoso-opensource/lib/virtodbcu_r.so /usr/local/virtuoso-opensource/lib/virtodbcu_r.so

The DSN information should in /etc/odbc.ini rather than /etc/odbcinst.ini  for system DSNs  picked up by whatever user your application runs as ...

Hi @HughWilliams, thank you for your help!
I've tried the configuration you suggested and it seems to have worked, since now I'm getting a different error message:
 File "<virtualenvpath>/lib64/python3.11/site-packages/sqlalchemy/engine/default.py", line 616, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/usr/local/virtuoso-opensource/lib/virtodbcu_r.so' : file not found (0) (SQLDriverConnect)")
(Background on this error at: https://sqlalche.me/e/20/dbapi)

I've tried moving the /virtuoso-opensource/lib/virtodbcu_r.so to <myhomefolder>, and changing the .ini files to point to it.
Nonetheless, I got a similar error message:
 File "<virtualenvpath>/lib64/python3.11/site-packages/sqlalchemy/engine/default.py", line 616, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '<myhomefolder>/virtuoso-opensource/lib/virtodbcu_r.so' : file not found (0) (SQLDriverConnect)")
(Background on this error at: https://sqlalche.me/e/20/dbapi)

Do you have any ideas about what else could I try to make this work?

If the virtodbcu_r.so exist in either location, are you sure the file has read access as the user the application is running as ?
If you run the command file virtodbc_r.so does it return a file type indicating it is compatible/runnable on the OS you are running on ?
As the user the application is being run as, are you able to make a base unixODBC isql connection , to prove the driver is usable, before attempting the connection via the application/python/pyodbc layers ?

Hi @HughWilliams, thanks again for your help!
To make sure the answer to your first question is yes, I've ran:
chmod 777 <myhomefolder>/virtuoso-opensource -R

Here is the output of the command ls -lh at <myhomefolder>/virtuoso-opensource/lib/virtodbcu_r.so after that:
total 3.9M
-rwxrwxrwx. 1 eltons eltons 3.9M Feb 12 07:43 virtodbcu_r.so

I tried running the test again after changing the permissions but I still getting the following error:
File "<myvirtualenv>/lib64/python3.11/site-packages/sqlalchemy/engine/default.py", line 616, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/home/eltons/virtuoso-opensource/lib/virtodbcu_r.so' : file not found (0) (SQLDriverConnect)")

With regards to your second question, here is the output of file virtuoso_r.so:
virtodbcu_r.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ff316d2ce468a291dfb07f43181c45ff5133f0b0, with debug_info, not stripped

I've also tried running:
isql virtuoso+pyodbc://dba:dba@VOS -v

but received the following error with both the root user and my own user:
[IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified
[ISQL]ERROR: Could not SQLConnect

Actually looking back at you original case notes you indicated having copied the virtuoso_r.so ODBC driver file from a Virtuoso Ubuntu docker container to your target Fedora container, which are not fully compatible, hence the file not found errors you are getting, which are not that virtuoso_r.so is not found but rather one of its dependant system libraries on Ubuntu that do not exist on Fedora.
We have a Generic Linux Virtuoso open source installer containing prebuilt generic binaries that will run on any glibc 2.5 or higher Linux distribution and it what you need to download and use the virtuoso_r.so ODBC driver file it contains
Also, have you actually read the unixODBC isql documentation as the correct format for usage is isql DSN [USER [PASSWORD]] and not what you are passing ie virtuoso+pyodbc://dba:dba@VOS -v which is the higher level SQLAlchemy connect string format.

It worked! 🥳 🚀
After replacing  the virtodbcu_r.so by the one in the Generic Linux Virtuoso open sourcehttps://github.com/openlink/virtuoso-opensource/releases/download/v7.2.12/virtuoso-opensource.x86_64-generic_glibc25-linux-gnu.tar.gz) installer I've been able to connect to Virtuoso running on docker and run create the tables and indexes for my tests.
I'll now start testing insert, select and update queries, but I believe the main problem of this issue has been solved.
@HughWilliams thank you very much for your help!


Colors

The color controls are kinda janky. On one hand I want to be able to add/override colors without having to copy and paste all the defaults. On the other when I don't provide the defaults within my colors object I don't want them to compile into my final CSS file.
I think we should only compile classes for the colors provided in the colors object. I think developers who want all the defaults alongside custom colors should have to copy and paste everything into the config file. I want to provide a developer with a smaller CSS file when they only select a few colors (such as success, danger, warning, and primary). Currently colors are the primary source of bloat in our production CSS file.

I think we should only compile classes for the colors provided in the colors object. I think developers who want all the defaults alongside custom colors should have to copy and paste everything into the config file. I want to provide a developer with a smaller CSS file when they only select a few colors (such as success, danger, warning, and primary). Currently colors are the primary source of bloat in our production CSS file.


Authorise a Dev Hub from GitHub Codespace

When I try and authorise a Dev Hub from VSCode when its cloud hosted in Codespace, it does the OAuth redirect back to localhost rather than the Codespace address.
How do I make it redirect back to the codespace?

@rsindall are you using username/password login or JWT or a AuthUrl?

Actually if you use the Command Palette to Authorize a Dev Hub directly from GitHub Codespace:

the Salesforce Extensions for VS Code is already clever enough to use the sfdx force:auth:device:login:

So to me it's already working correctly.

closing, since this seems to be working for other people


docs: fix reference to lvh kind images

I noticed that https://quay.io/organization/lvh-images/kind?tab=tags gets a 404, the new link should refer to the correct page.

/test


WPS for custom flood risk assessment and frequency analysis for real-time flood forecasts

Description
Describe what you were trying to get done or your feature request.
Environment

Raven version used, if any:
Python version, if any:
Operating System:

Steps to Reproduce
Paste the command(s) you ran and the output.

Additional Information
Links to other issues or sources.

Something like this:
https://water.weather.gov/ahps2/probability_information.php?wfo=btv&gage=roun6

@huard Not sure what I can add to this (wps_forecast_floodrisk.py) honestly. Providing a frequency analysis on a single forecast event seems pretty useless and utopic. I suggest we stop here, consider it a win for now and add graphics later.


Not sure if correct ratio

Hey,
First of all I really enjoy your tool! Especially as a color blind person, it has helped me to pick colors that other people can see as well.
However sometimes majority disagrees with the results. For example:
White on #28A3CE gives a ratio of 2.9.

rgba(0,0,0,87) on #28A3CE gives a ratio of 6.38.
Everyone that I've asked has agreed that white is more visible than the black, and it's weird that it says white is over twice better. I know WCAG is a common guideline. Do the guideline define the algorithm, or is it something that can be tweaked and/or improved? Are our monitors just configured weirdly?
I'd love to hear your thoughts on this, and thanks again for the great tool!
PS. I tested on a few other monitors and the contrast is definitely different. The blue appears lighter on mobile screen making the black slightly less contrasted and the white more contrasted.

Congratulations, you, like many before you, just discovered that the WCAG algorithm is flawed. Indeed, this has been a topic of discussion over the years, for example https://github.com/w3c/wcag/issues/695 😄
And yes, WCAG defines the algorithm, albeit only for opaque colors, though your test case is opaque colors (even if the foreground is translucent, the result is two opaque colors).
It's not a perfect algorithm, but until something better is proposed, it's what we have 🤷♀

PS. I tested on a few other monitors and the contrast is definitely different. The blue appears lighter on mobile screen making the black slightly less contrasted and the white more contrasted.

Given that all currently supported forms of CSS colors are sRGB, this is very surprising. Are you using Firefox? AFAIK it's the only browser that doesn't follow this and just throws raw RGB coordinates on the screen.

PS. I tested on a few other monitors and the contrast is definitely different. The blue appears lighter on mobile screen making the black slightly less contrasted and the white more contrasted.

Given that all currently supported forms of CSS colors are sRGB, this is very surprising. Are you using Firefox? AFAIK it's the only browser that doesn't follow this and just throws raw RGB coordinates on the screen.

Hi @LeaVerou and @Waltari10
Here is one issue that is challenging to overcome: gamma and environment. Monitor gamma is a substantial factor is contrast presentation, and users commonly adjust it differently than "spec", in part to accommodate their environmental lighting. So even though sRGB is the "standard" don't assume that a given device is following that standard.
Mobile devices rarely use color management, and only some desktop browsers use color management (at least correctly). And even with color management, if the monitor is not calibrated, then "who knows". But there's more.
Here's the thing: contrast is a perception it is more a function of neurological processing in our visual cortex than actual light values.  Also, your vision system's light adaptation, surround effects, etc. all play a major part.
In other words, a pair of colors by themselves DO NOT determine a perceived contrast. Context is everything when it comes to perception.
For reference I'm the one that opened WCAG issue 695 and am currently researching the alternatives, which you can see in part at https://www.myndex.com/WEB/Perception
You might also find interesting my CVD simulators, one is based on the Brettle model and the other is based on perception of a standard sRGB monitor.  https://www.myndex.com/CVD/sRGBCVD


Support FirefoxOS & ChromeOS TCP Sockets

Add integrated support for TCP sockets available in FirefoxOS and ChromeOS:

https://developer.mozilla.org/en-US/docs/Web/API/TCP_Socket_API
https://developer.chrome.com/apps/sockets_tcp

Currently possible using "webpack" and "chrome-net" as demonstrated by @throughnothing: https://github.com/bitpay/bitcore-p2p/issues/21#issuecomment-74369533

To be clear, my demonstration won't work on a web page in Chrome, as the sockets API (that I'm using at least) is only available to Chrome apps/extensions.  To do it from a normal webpage in the browser, I presume we'd have to use WebRTC or WebSockets, or something similar.  WebTorrent  may be something worth looking at, as it is a peer-to-peer bit-torrent client that can run in the browser using WebRTC for p2p communication.

Yep, the TCP sockets available in apps and extensions can directly connect to any Bitcoin node, and hybrid nodes are not needed as in the case of  WebSocket/WebRTC.


Update to .NET 8.0

Hello 👋
Update Projects to .NET 8.0.

Please sync your branch with development and let's see if there's anything we've missed on the existing upgrade to .NET 8. THanks!

@andrerav Conflicts Resolved.

When is the merge into the master planned? Can't use generator in .NET 8 projects

Can this be merged? its been more than 6 months?

Hey, any update on this?


why not use props open?

hi @rzkhosroshahi
thank you for useful calendar.
but i'm problem and that, not use props open in <DatePicker open={true} />.
Do i use right?

it s my problem too.

for now, use ref
const ref = useRef();
<DatePicker ref={ref} />

ref.current.toggleModalOpen();

Hey 👋🏻
Here's an announcement that a new version of the module has just been released. Since this issue is related to the older version, I have closed it. I would appreciate your feedback on the new version.


feat: create integration tests on eth-rpc crate that use either Katana, Madara or TestSequencer to make soundness tests automatic

Feature Request
Describe the Feature Request

create integration tests on eth-rpc crate that use either Katana, Madara or TestSequencer to make soundness tests automatic

Currently, checking that we're moving towards our common goal -> working rpc for ethcc requires lots of manipulations.
It'd be easier to use a eth sdk plugged onto eth-rpc
Describe Preferred Solution

Investigate during one day a clean architecture to create integration tests for eth-rpc that can:

point to a real starknet RPC where kakarot is deployed (madara or katana, or test sequencer)
deploy solidity smart contracts
interact with them using eth sdks (ether-rs, etherjs, etc.)
assert on calls/ invokes

After a day of investigation, comment down here your findings and propose an architecture for integration tests.

tried deploying kakaswap on katana manually and am running into the steps issue:
ValidateTransactionError(VirtualMachineExecutionErrorWithTrace { trace: "Error in the called contract (0x06aff555213713b554a6120368c2f974d67d794beb0dcbacd4dc80841e8ea16d):\nError at pc=0:7:\nGot an exception while executing a hint.\nCairo traceback (most recent call last):\nUnknown location (pc=0:163)\nUnknown location (pc=0:149)\n\nError in the called contract (0x06aff555213713b554a6120368c2f974d67d794beb0dcbacd4dc80841e8ea16d):\nError at pc=0:155:\nCould not reach the end of the program.
We will pass an Environment object with the necessary steps we need (2**18, per python -> 16777216) to the TestSequencer https://github.com/dojoengine/dojo/blob/4e87bcb4437961537596debfcc49df134ef8ad5a/crates/katana/core/src/starknet/config.rs#L56, like so: https://github.com/dojoengine/dojo/blob/4e87bcb4437961537596debfcc49df134ef8ad5a/crates/katana/rpc/tests/starknet.rs#L23
I did an exploration today and have found it capable of deploying and interacting with kakaswap. The only question is which contract(s).
First PR would probably be more calls on the opcodes contract and erc20 https://github.com/kkrt-labs/kakarot/blob/main/tests/integration/solidity_contracts/Solmate/test_erc20.py
Sensible?

Very sensible!
I like it a lot.
I see you've been assigned to https://github.com/kkrt-labs/kakarot/issues/617, do you want to pause this issue and work on the integration tests?
In any case, this is a great idea, really.

yeah, the exploration here is to try to also use forge scripting to do the deploying/interacting.

I think that rn we want to focus only on tests using forge and drop ethers-rs because it's higher level (a regular devstack will probably have either forge or hardhat, but not ethers-rs)
Once we're ok with the foundry stack (probably not tomorrow indeed), then we'll add the hardhat one.
I see that we already defined a foundry deps in crates/core/Cargo.toml, so I guess that we could invoke the forge script programmatically as well, in a test using the TestSequencer as you suggest.

TL;DR for me is:

Initialize Testsequencer with the right config you mentioned
Deploy Kakarot contract on it
Start Kakarot Rpc with that client
Run forge script

These tests will be run to make sure that we are compatible with the tooling, not to make sure that the EVM behaves correctly: the tests in Kakarot EVM insure that the EVM is sound, the tests in Kakarot RPC insure that we manage to communicate with the Kakarot EVM with the standard EVM tooling

tldr:

I was able to get something that started the kakarot rpc and ran some client code against it, it worked fine when i did a simple ethers rpc client interaction.
The forge PlainOpcode script is working against my branch of Katana, if it is ran from the cli
I tried to just call a shell process from the same test setup of the simple test I have in my draft branch, and ran into some hard to understand issues around the forge script's client not being able to parse the transaction receipt. This reads like an issue with async stuff, so I decided to take a step back from the current design and go back to the drawing board
When I try to run counter.inc() in the PlainOpcodes.s.sol, I am getting a revert error. Here is an example that shows that this should be possible: https://book.getfoundry.sh/cheatcodes/start-broadcast

next steps:

Look into why the revert error is happening when we try to actually call a contract. f
It might simplify things if we use forge's rust interface directly rather than call it from a script, i thought it would be simpler to start with a script and then move to rust, but looking at this, I am thinking otherwise: https://github.com/foundry-rs/foundry/blob/afdbbc05cc479468b15a6f42b577b62e0fd4895e/forge/tests/it/fork.rs#L55

# forge shell script blocker
I was hitting this blocker:
2023-07-10T20:43:41.939552Z DEBUG Connection{peer=Client}: h2::proto::connection: Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
2023-07-10T20:43:41.939607Z DEBUG Connection{peer=Client}: rustls::common_state: Sending warning alert CloseNotify

## Setting up (1) EVMs.
Error:
Failure on receiving a receipt for 0x04162693c2f517c7caa67b864f99525a7a4eccc96b86b34fc9c89e011ac08504:
(code: -32001, message: JSON-RPC error: code=53, message="Unsupported transaction version", data: None)
Failure on receiving a receipt for 0x00492b8cd91153f4f09facd19373b9218bc977034afa4cbb41b74ee0a129c94a:
(code: -32001, message: JSON-RPC error: code=53, message="Unsupported transaction version", data: None)

 Add `--resume` to your command to try and continue broadcasting
    the transactions.
[crates/eth-rpc/tests/rpc.rs:1090] child.wait() = Ok(
    ExitStatus(
        unix_wait_status(
            256,
        ),
    ),
)

The way that forge is checking for receipts is, too, async: https://github.com/foundry-rs/foundry/blob/master/cli/src/cmd/forge/script/receipts.rs#L132 so I found myself debugging a pretty complex async test that was starting a shell command starting another complicated async system. I also tried running it with the --slow flag, which makes the transaction process sequential, but was still getting issues.
Elias was kind enough to also suggest a simpler structure to my draft: https://github.com/kkrt-labs/kakarot-rpc/commit/4aac8dd35b6aa7aceaec980096dca86c262d56fb
So that covers the dimension of attempting to run the server setup and the client call within a single test. It is worth exploring if it is more straight forward if we call directly from rust, see: https://github.com/foundry-rs/foundry/blob/afdbbc05cc479468b15a6f42b577b62e0fd4895e/forge/tests/it/fork.rs#L55
Actually using forge to interact with a deployed contract
The next question is whether you can both deploy and interact with a contract in a forge script. When I tried adding counter.inc() to the forge, I am getting this error:
  [1114577] → new PlainOpcodesScript@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
    └─ ← 5346 bytes of code

  [9079256848778920862] PlainOpcodesScript::run()
    ├─ [0] VM::envUint(EVM_PRIVATE_KEY) [staticcall]
    │   └─ ← <env var value>
    ├─ [0] VM::startBroadcast(<pk>)
    │   └─ ← ()
    ├─ [0] → new <Unknown>@0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0
    │   └─ ← 116320 bytes of code
    └─ ← "EvmError: Revert"

I was able to interact with a deployed contract using cast: cast  call 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 "count()"  , so its not as simple as the forge deploy not working. Need to explore more.

Thank you for submitting a detailed recollection of your findings! It really helps.
My intuition is that even if we have hive tests (end-to-end tests) and ethereum/tests,
It has some value to have eth-rpc tests that utilize test-sequencer, in order to have more granularity in tests,
Maybe this can wait a little for when we have more bandwidth

What is the status of this issue? I believe @ftupas already addressed this? Can close?


Don't override existing package dependencies.

I was trying to update dependencies in svg-pathdata, but this is resetting it. Updating dependencies needs to be done on per-package basis anyways as updates might break things, so I'm not sure setting dependencies globally makes sense...
The same could be done with the devdependencies but I'm not sure if there are scripts in metapak-nfroidure which depend on specific versions, so that could break them. Just toss the PR if this would break something.

Thanks for reporting ;)

I'll try to bump a version soon.


[BUG] Pino logger unavailable in nestjs shutdown functions

[x] I've read the docs of nestjs-pino
[x] I've read the docs of pino and pino-http
[x] I couldn't find the same open issue of nestjs-pino
[x] This bug is related only to current library or I've tested the same behaviour with the built-in logger and this is not a bug of NestJS.

What is the current behavior?
Using nestjs pino logger in beforeApplicationShutdown and onApplicationShutdown callbacks doesn't log in the stdout. However in onModuleDestroy using logger, logs the event. console.log works in all three callbacks.
What is the expected behavior?
Nestjs pino logger should be available in all three shutdown callbacks.
Please provide minimal example repo, not code snippet. Without example repo this issue will be closed.
https://github.com/dilshans2k/nestjs-pino-issue/tree/feature/pino-test-with-nestjspino4-pino8.18-pinohttp9
In this repo, i have app module, then a nested module inside app module and a provider 'GracefulShutdownEventLogger'. Now what i have seen is if i put a sleep in the provider 'GracefulShutdownEventLogger' in onApplicationShutdown cb (since this provider will be called the last upon application destroy), all other services application shutdown callbacks will be able to log using pino logger, but i don't know why this happens. And why do i need to wait in the 'GracefulShutdownEventLogger'.
Please mention other relevant information such as Node.js version and Operating System.
<EMAIL_ADDRESS>Ubuntu 22.04

I learned that pino uses asynchronous logging, and their docs mention that some buffered logs might get lost on sudden system failure. I get that this can happen if the process receives a SIGKILL, but a SIGTERM or SIGINT is not a sudden failure, so pino should flush the logs properly on those signals. Maybe there is something wrong with my code. Can you please check it?

Thanks for reporting this. Unfortunately, I haven't had a chance to check this yet, I will get back to this as soon as possible

I just came across this issue, too.

For anyone still struggling with this:
The way enableShutdownHooks handles shutdown doesn't allow pino to close properly.
Workaround is to write your own shutdown hook instead of using the NestJS one:
function closeOnShutdown(app: INestApplicationContext): void {
  let shutdown = false;

  for (const signal of ['SIGTERM', 'SIGQUIT', 'SIGINT']) {
    process.on(signal, async () => {
      if (shutdown) {
        return;
      }
      shutdown = true;

      try {
        await app.close();
        process.exit(0);
      } catch (e) {
        console.error(e);
        process.exit(1);
      }
    });
  }
}

async function bootstrap() {
  const app = await NestFactory.create<NestFastifyApplication>(
    AppModule,
    new FastifyAdapter(),
    {
      bufferLogs: true,
    }
  );
  // ...

  await app.listen(3000);
  closeOnShutdown(app);
}


Doc with explanation of different status codes and error conditions

API change check
API changes are not detected in this pull request.


Native mobile text sizes

Hi, while developing a Native app, we have discovered that our text is scaling with the dynamic text. As can be seen in the last image, this makes things unworkable.
The dynamic text setting can be found:
ios: Settings > General > Accessibility > Larger Text
android: Settings > Display > Font size/ Display size
On smallest setting:

On default setting:

On largest setting:

Is there a way to prevent or at least constrain this behaviour so that the app can be made more robust to user settings?

Hi Robert,
This is expected behavior. I don't think you want to prevent/constrain this, as the main reason for the accessibility features is to allow people with disabilities to use your app. So for example, a visually impaired person configured his phone to use a larger font, that all his apps obey to, will find it very hard to use your app when the app has a very small font (compared to the default & other apps).
The only way you can improve the interface a bit is by setting some constrains on the surrounding elements. So for example, setting a fixed height or maxHeight on a button so only the buttons caption grows, not the button itself. The same goes for input widgets, tabs etc.

Hi Wesley,
That's good to know, thanks!


Archive file (tarball) installation method

Description
Provide an archive file (tarball) deployment of Confluent Platform into a user-defined directory (default: /opt/confluent). Creates SystemD services then starts services. Also contains documentation updates and a new molecule test. No behavior is modified unless the variable archive_file_enabled is set to true.
Fixes #357
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
This has been tested via the archive-plain-rhel molecule test.
Test Configuration:

Set archive_file_enabled: true

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[ ] Any dependent changes have been merged and published in downstream modules

We are using a yaml linter which only gets run when you do molecule test and the jenkins job which runs molecule test is finding these issues (pretty minor)
02:52:58  yamllint -c ../../.yamllint ../..
02:53:02  ../../roles/confluent.variables/defaults/main.yml
02:53:02    71:29     error    truthy value should be one of [false, true]  (truthy)
02:53:02
02:53:02  ../../roles/confluent.common/tasks/main.yml
02:53:02    46:17     error    truthy value should be one of [false, true]  (truthy)

I put comments on these exact lines also!

@domenicbove Happy to help! I'll leave it up to you guys to merge since I don't have write access.

@GuyIEX I'm going to let my teammate here at confluent review the PR Monday, see if he can find anything, but we are definitely on the home stretch!


Batch calls for checking proposer status

When we check the proposer status https://github.com/chainbound/bolt/blob/unstable/bolt-sidecar/src/chain_io/manager.rs#L58-L58 we should batch calls so that we don't incur in execution client limits if you send more than >10000 public key hashes. Ideally don't send more than 5000 public key hashes at once

I think probably even less than that just to be safe! We only sent like 18k in our batch and that was waaay too much


Recomposition won't take place when state changes.

Issue
Initially recomposition won't happen once value changes in LiveData.
But when player reaches to level 2, recomposition happens as expected from LiveData value.
Preview
https://user-images.githubusercontent.com/25173010/163591096-426f03d4-8a2c-4ce5-a6bd-a22cd1a2149e.mp4

Fixed game screen guesses not updated issue.
This fix applied through merge @ #14


chore: merge v1.13 stable back to unstable

Merge stable back to unstable as part of release procedures.

:tada: This PR is included in v1.14.0 :tada:


impl list-memberships --all

@patrickxb, cc'ing because I restructured TeamList/MemberInfo structs in order to generalize to listing entries for other users

The commits e6efbd9e03d3...c17dd0f7241f introduce visual changes on linux. :mag_right: 1 changed

Changed: Markdown-emoji (before) (after)

@patrickxb can you take this review?

@modalduality can you rebase to fix the conflicts above?

Yes

@modalduality let me know when rebased and I'll try out the branch locally.  Thanks.

@patrickxb Just rebased.

Is this change supposed to show invites, too?

@patrickxb Looks like it's specified on the doc https://keybase.io/ccsandbox/team-internal-mvp but I don't think it's implemented for any command yet.


Error when installing from upm

Describe the bug

Error when installing from upm
Expected behavior

Installed without error
Screenshots

Desktop:  Windows 10
Unity version:  2020.3.38f1 and 2021.3.9f1
Tri Inspector version:  1.9.1

Sorry, double-clicking the Installer scene solved it.


trust wallet can connect to demo，but can not author to demo

Hi, I want to make my new dApp, but when I try to connect Trust Wallet with dapp demo. Trust Wallet can connect to dapp, there is also a session with Trust Wallet in dapp, but when I check the log and the code.
debugPrint('Awaiting authentication response');
final authResponse = await authRes.completer.future;

It will stuck in this code in the connect_page.dart. In the session it only can use method personal_sign and eth_sign, and the other method can not use.
and I also change the params of requestAuth like this:
      final param = AuthRequestParams(
        chainId: chainId,
        domain: sessionData.peer.metadata.url.replaceAll('https://', ''),
        aud: '${sessionData.peer.metadata.url}/login',
      );
      final AuthRequestResponse authRes = await widget.web3App.requestAuth(
        pairingTopic: pairingTopic,
        params: param,
      );

Did I do something wrong? Thx

I tested the auth on Thursday and it wasn't hanging.
It was however failing to authenticate. Whatever I was getting back from Trust Wallet couldn't be verified with the public key.
What version of Trust Wallet do you have?

I've tested my demo applications with trust wallet and it works, I am closing this issue.

I'm sorry for the slow reply. I use version of Trust Wallet is 7.18.1.
If you tested demo successfully, can you show your code for AuthRequestParams and requestAuth

after I update the version of Trust Wallet from 7.18.1 to 7.19.2, and update the demo code for the lastest version, this issue solved. Thx.


[$500] Split bill - No bottom margin for "Show more" button on IOU details page

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: v1.4.19-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Create a workspace and invite 10 members to it
Go to the announce room of the workspace created on step 1
Click on the + icon inside the compose box
Click on split bill
Enter an amount and split the bill with all the members
Go in announce room and click on the IOU preview component
Scroll down until you see the "Show more" button

Expected Result:
There should be a bottom margin for the button
Actual Result:
There is no bottom margin for the "Show more" button
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0177cfaec73e6a7668
Upwork Job ID:<PHONE_NUMBER>980624896
Last Price Increase: 2023-12-29

Proposal
What is root cause?
There is no bottom margin here:
https://github.com/Expensify/App/blob/939632e1b1c0610daecf34e08ea12e1abcbce548/src/components/MoneyRequestConfirmationList.js#L646
What changes should be made?
Add bottom margin

Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no bottom margin for Show more button in split bill details page.
What is the root cause of that problem?
Split bill details page uses MoneyRequestConfirmationList and the show more button doesn't have any margin bottom (only top) applied to it.
https://github.com/Expensify/App/blob/939632e1b1c0610daecf34e08ea12e1abcbce548/src/components/MoneyRequestConfirmationList.js#L644-L649
But the money request flow confirmation page has some margin applied to it.
https://github.com/Expensify/App/blob/939632e1b1c0610daecf34e08ea12e1abcbce548/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js#L695-L709
What changes do you think we should make in order to solve the problem?

I guess we should follow the margin from the new confirmation page and apply it to the old MoneyRequestConfirmationList
What alternative solutions did you explore? (Optional)
As MoneyRequestConfirmationList is the old component, maybe we want to replace MoneyRequestConfirmationList with the new page (MoneyTemporaryForRefactorRequestConfirmationList) in split bill details page (maybe this is being worked on already?).

It seems there is some other bug in the flow of split bill in announce room in the latest main. After creating the split bill clicking on the preview again shows the split bill button.
(Please ignore the initial few seconds of the video.)
https://github.com/Expensify/App/assets/102477862/4d4eba8c-8c75-4c19-bdfe-780e38233c04
Please help me if I am missing something.
Could you post a video with the repo steps? @kbecciv

Not able to reproduce:

Proposal
Please re-state the problem that we are trying to solve in this issue.
Split bill - No bottom margin for "Show more" button on IOU details page
What is the root cause of that problem?
Margin button missing for the "Show more"
What changes do you think we should make in order to solve the problem?
As we are using the right margin for the "Show more" button on BaseOptionSelector
https://github.com/Expensify/App/blob/320ff544570be797b018279693fcd44da8b838c7/src/components/OptionsSelector/BaseOptionsSelector.js#L539-L540
We need to add same margin too, styles.mb5 to ShowMoreButton here
Adding styles.mb5 give consistency to the application and make all the pages looks similar in term of margins. mt2 also is better to make the app UI consistent.

@c3024 Updated with a video. Thanks

Not overdue, we've picked a proposal.

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[x]  [@c3024] The PR that introduced the bug has been identified. Link to the PR: #31447
[x]  [@c3024] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/31447/files#r1469994259
[x]  [@c3024] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: It is a case of missing margin when migrating to a component. As such, a Slack discussion does not appear to be useful.
[x]  [@c3024] Determine if we should create a regression test for this bug. No, this is a simple margin style change.
[x]  [@c3024] If we decide to create a regression test for the bug, please propose the [regression test] (https://github.com/Expensify/App/blob/main/contributingGuides/REGRESSION_TEST_BEST_PRACTICES.md) steps to ensure the same bug will not reach production again. NA

Bump @bfitzexpensify. Melvin did not add Daily label here.

Thanks for the tag @c3024 - contracts have all been paid. Thanks for the work here everyone!


Changed max lengths of seq_kit and seq_protocol fields from 48 to 96 characters

Codecov Report

Merging #63 (87b8523) into stable (02585b8) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           stable      #63   +/-   ##
=======================================
  Coverage   57.28%   57.28%
=======================================
  Files         233      233
  Lines        7567     7567
=======================================
  Hits         4335     4335
  Misses       3232     3232

Impacted Files
Coverage Δ

majora2/forms.py
78.67% <100.00%> (ø)

majora2/models.py
56.00% <100.00%> (ø)

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 02585b8...87b8523. Read the comment docs.


Missing Goals

Since discovering this newly launched language, I've been thrilled with its potential and its unique features.
Unfortunately, one important detail that seems to be missing from the README file is the set of goals for the language.
Could the developers perhaps add a section that outlines these goals, as this would provide potential contributors and users with a clearer understanding of the project's direction and intentions?
Knowledge of these objectives would be particularly beneficial for those considering contributing to the project.
In order to facilitate this, perhaps a brief discussion among the core team could help define these goals.
This way, everyone involved in the project would have a comprehensive understanding of the overall vision and where they can contribute most effectively. Thanks for considering this suggestion!

Thank you Misha.


Add getArea method where it is necessary.

Without this, the shape.getArea() call below will cause an error.

I also fixed another typo from the same section.

Goodness! You've got that right, it would have caused an error. Thank you Adam!


Reset object in state when editing submitted item

Description
Form didn't populate when trying to edit submitted item after user has cleared the form.
Related issues
Closes #292
Type of change

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

Changes Made

Dispatch resetCurrentObject method when clearing form

Testing

[x] E2E

Changed pull request title to match current fix.


Custom Vision - Adding information about image restrictions

Completing "Limits and quotas" page with image types and fixing missing "gif" image type in other page

@PatrickFarley : would be happy to correct the note (in fact I searched quickly for the info on how to do that but did not find). As a non-Microsoft user, I got a 401 Forbidden on the link you mentioned, can you give me more details about the format? Thanks


Error: invalid address (argument="address", value="", code=INVALID_ARGUMENT, version=address/5.6.1)

This happens when using browser back button while looking at deals in marketplace or when accessing the /marketplace directly.

is fixed?

is fixed?

I believe so, have not seen this in a while. We can reopen if not.

Apparently it still exists. Lets investigate :)


Added black linter workflow

Fixes #307
Added the black linter workflow using Github actions for the repository

@ighoshsubho Any modifications necessary for this?

No, will be merging this by night...

Congrats @metabiswadeep, your PR got merged! Star this repo and keep contributing like this in GSSOC'23


cross-compile from darwin (osX) to linux (ubuntu)

Any helps or hints appreciated.
 However, that doesn't sound like it's an issue that's specific to this repo or libpostal.
This project uses cgo, so may be move involved than pure Go projects. Googling the error it seems like you need to set the env variable CC to a C cross-compiler as well. Also unless this has been done separately, the libpostal C library would need to be compiled with the same C cross-compiler.
As a more general point, I understand the value of cross-compilation for embedded devices etc. but if the target is Ubuntu, it might be less effort to compile it in a Docker container. John Longanecker has a repo which might be helpful here: https://github.com/johnlonganecker/libpostal-rest-docker. The REST server for that project is written in Go.

Thank you. Yes, it's really more of a CGO problem than libpostal. I was hoping someone had been down this road before :)
For example, go geting the expand and parser packages will not even build correctly unless CGO_ENABLED=1 (for example, if one gets the packages with cgo disabled and tries to run the tests).
Dockerizing is the way to go, I was in fact hoping to get a cross-compiled binary working while dockrizing all my pieces.
Thank you for the link and comment. I'll go ahead and close this issue since it's not really libpostal/gopostal issue... and will repost here if I find out more.


Record definitions in extern blocks

Enables completion of extern functions and statics.
Closes https://github.com/rust-analyzer/rust-analyzer/issues/3711

:heart_eyes:
bors r+

cargo fmt

bors d+

bors r+


Add animation type and AnimeType.Point

Animate each chart point from old to new position

Not sure if this was just a test or not, there doesn't seem to be any implementation here. If you plan on implementing, can you open an issue describing the functionality that you want first? That way we can decide if it belongs in Spark before you do all the work.


remove mx.model.FeedForward API

Description
remove the API and related examples & tools.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@mxnet-bot run ci [all]

@eric-haibin-lin I see that we have removed a lot of examples and tests as part of this PR. What is the plan to handle code that refers to these files. For example, the script tests/python/train/test_conv.py is referred to at several places in the repo (which also breaks the CD pipeline):
cd/python/docker/test_python_image.sh:44:python3 tests/python/train/test_conv.py ${test_conv_params}
ci/docker/runtime_functions.sh:1941:    python3 /work/mxnet/tests/python/train/test_conv.py ${test_conv_params}
docker/docker-python/build_python_dockerfile.sh:61:    docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/tests/python/train/test_conv.py"
docker/docker-python/build_python_dockerfile.sh:70:    nvidia-docker run -v ${test_dir}:/mxnet mxnet/python:${image_tag} bash -c "${python_version} /mxnet/tests/python/train/test_conv.py --gpu"
docker/docker-python/README.md:50:* [test_conv.py](https://github.com/apache/incubator-mxnet/blob/master/tests/python/train/test_conv.py)
docs/static_site/src/pages/api/faq/s3_integration.md:73:Let's modify an existing example code in MXNet repository to read data from S3 instead of local disk. [`mxnet/tests/python/train/test_conv.py`](https://github.com/dmlc/mxnet/blob/master/tests/python/train/test_conv.py) trains a convolutional network using MNIST data from local disk. We'll do the following change to read the data from S3 instead.
docs/static_site/src/pages/api/faq/s3_integration.md:76:~/mxnet$ sed -i -- 's/data\//s3:\/\/bucket-name\/training-data\//g' ./tests/python/train/test_conv.py
docs/static_site/src/pages/api/faq/s3_integration.md:78:~/mxnet$ git diff ./tests/python/train/test_conv.py
docs/static_site/src/pages/api/faq/s3_integration.md:79:diff --git a/tests/python/train/test_conv.py b/tests/python/train/test_conv.py
docs/static_site/src/pages/api/faq/s3_integration.md:81:--- a/tests/python/train/test_conv.py
docs/static_site/src/pages/api/faq/s3_integration.md:82:+++ b/tests/python/train/test_conv.py
docs/static_site/src/pages/api/faq/s3_integration.md:104:After the above change `test_conv.py` will fetch data from S3 instead of the local disk.
docs/static_site/src/pages/api/faq/s3_integration.md:107:python ./tests/python/train/test_conv.py

This is one example. There might be similar issues with other files that are removed in this PR.

@mseth10 thanks for reporting this. They shall be removed from the CD pipeline for mxnet 2.0 since the APIs will be dropped


Unable to sign messages with a segwit address

see https://github.com/bitcoin/bitcoin/issues/10542 in upstream.
output is "The entered address does not refer to a key. Please check the address and try again."

Signing with p2wpkh available b6b52d5


Run debug with a single command/click

Extension Name: vscode-gradle
Extension Version: v2.4.13
OS Version: Windows 10
VSCode version:1.43.2
Current Situation:
I am able to  debug spring boot application (or any java-based application) in vscode by doing the below 2 things

Run the gradle task called bootRun.  Note that the build.gradle is configured with this
bootRun {
jvmArgs=["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=32323"]
}

With the below configured in the launch.json, run the configuration to attach the debugger to the listener port 32323.
{
"type": "java",
"name": "Debug (Attach1`)",
"request": "attach",
"hostName": "localhost",
"port": 32323
}

Finally, i can see my vscode break at my custom breakpoint in the code editor.
However, everytime i make a changes to the Java code, i have to stop everything above, and rerun the 2 steps. It is really tedious. Is there a way to run the above 2 steps with just one single command or a single button click.

Can't make any promises but i'll investigate how to make this easier for you.

Can't make any promises but i'll investigate how to make this easier for you.

Thanks! Meanwhile, I am also researching online if that is possible.
It is sad that VSCode has this built-in setting called auto attach , but that is only applicable to node.js.   There is also an extension for .net called .Net Auto Attach.  But none exist for gradle.

Do you need to start the java process with that gradle task? Can you create a launch file that executes the java main class instead? Typically this is how I debug my java apps.

Hi, prior to using vscode-gradle, I can debug java   in a single click using launch.json. Thanks to the vscode-java extension pack. I am able to make the execution stop at my breakpoint and step thru the codes.
However I suspect that this does not goes thru Gradle.  Cos if it goes thru Gradle to build my application, the build class would have been inside the build folder.  But instead, it goes to the bin folder.
That is why I prefer using the vscode-gradle to help me build and run app (in debug mode) via Gradle. But that would also mean I need to execute a 2nd step as described in my first post in order for execution to stop at the breakpoint.

I've done some investigation around this.
This seems to work nicely (for example):
./gradlew run --debug-jvm

...as it suspends execution until the debugger is attached.
I've attempted to do something similar by providing Java Debug Wire Protocol (JDWP) JVM args when running the task via the gradle server. This seems to do what we expect from the Java side (I see a process assigned to the debug port), and vscode can successfully attach to the process, but breakpoints are not being hit, and i'm not entirely sure why. It could be because the task is run in the context of the Java server process, but i'm not sure yet. Will keep investigating...

Ok after doing some more investigations and a whole lot of trial and error, I think I might have a plan to get this to work:

If the gradle task implements the org.gradle.process.JavaForkOptions interface, for example, test or run, the show a "debug" icon in the tree view (also add a "debug" option to context menu).
When running a task in debug mode, we need to set the jvmArgs to utilise the Java Debug Wire Protocol (JDWP). Although I'm not really happy with this approach, we can use the setEnvironmentVariables API to set JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 (we can also make the port configurable)

If the task configuration already has jvmArgs set with an address that does not match the address set in the JAVA_TOOL_OPTIONS, then you'll get the following error: ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. Error occurred during initialization of VM agent library failed to init: jdwp Typically though, if you're debugging the gradle task via the extension, you would not be setting jdwp options in the task config. It would be great if I could figure out how to check if jdwp options have already been set, and if so prevent setting them again via JAVA_TOOL_OPTIONS, so that the user can define the debug settings themselves in the gradle task config.

After the task is run we can then start the debugging using the startDebugging API.

When making changes to files, you'll need to either stop the debugging session and restart it (by clicking on the debug icon again) or just use the "Hot Code Replace" feature of the java debugger.

If the gradle task implements the org.gradle.process.JavaForkOptions interface, for example, test or run, the show a "debug" icon in the tree view (also add a "debug" option to context menu).

Really thanks you for the effort in the investigation of this. I greatly believe users would love it, if the debug menu option is implemented.
Personally for me, it is perfectly ok for me to manually set the debug options in the build.gradle (which is what i done as described in my first thread),, but of course, it would be fantastically great if u have a way to check if user has manually defined that in the build.gradle and give it a default if the user has not.

Thanks for the feedback.
It doesn't look like I can read task config/options through the gradle tooling api. See GradleTask.
I also cannot determine what type of task is being debugged (eg to figure out if it extends from JavaExec) - to get around this I might just need to limit the debug feature to tasks that belong to groups application or test.
I'll continue investigations before deciding on a first version.

I'm making some progress on this and will have a PR ready soon.
Here's how the first version will work.
Setting up debugging via Gradle Tasks

You define the launch configuration within .vscode/launch.json, for example:

{
    "configurations": [
        {
            "type": "java",
            "name": "Debug (Attach) via Gradle Tasks",
            "request": "attach",
            "hostName": "localhost",
            "port": 6565
        }
    ]
}

You define the Gradle debug options within .vscode/settings.json:

{
    "gradle.javaDebugOptions": {
        "enabled": true,
        "launchConfig": "Debug (Attach) via Gradle Tasks",
        "tasks": [
            "run",
            "runBoot",
            "test",
            "intTest",
            "integration"
        ]
    }
}

A "debug" icon will now appear next to the tasks defined in gradle.javaDebugOptions:

When you click on that debug icon, the Gradle task is run with debug jvmArgs, via the JAVA_TOOL_OPTIONS environment variable:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=6565

The extension waits for the port to be open on tcp:6565

Once the port is open, the java debugger is started using the config specified in the launch configuration

(in all cases above, the port is dynamic and specified by your launch config)
Limitations

The user might have set debug jvmArgs within the gradle task configuration. This could cause Java errors. In this case the user will need to remove the jvmArgs in their gradle task config.

@hanct would this work for you? any suggestions on improving this workflow? i'm happy to go with this for now, and iterate to improve the workflow in the future.

Hi,
Thanks for the enhancement! For the limitations, I definitely won't mind removing the jvmArgs in the gradle task config. :)
Once the above enhancement is implemented and assuming the configurations for settings.json and launch.json are done, so i just do the below 2 steps:

Click on debug icon in the gradle tasks pane
Run the configuration set in the launch.json

Is my understanding correct?

Once the config is setup, you'll only need 1 step, which is to click on the debug icon. The Gradle task is run and the debugger is started in the same step.
For the second question, conceptually yes, you need to restart the process. You need to recompile the Java. This means stopping and starting the task again. To help with this, I might add a "restart" icon to do this in one step.
Keep in mind, you don't need to stop/start the process when you change code, instead you can take advantage of the "hot code replace" feature of the java debugger (the icon on the right), where you don't need to restart the process (but doesn't always work):

ok. noted on this! Really excited to try out this new enhancement u gonna implemented.
Also the "restart" icon is definitely a welcome feature!
And thanks for the tip on the "hot code replace" feature. I have tried out this feature before, with gradle involved. But does not seem to work. So i thought it can only works only when gradle is not invovled.
But i will try that again, cos as what u mentions "it doesn't always work".

This feature is nearly ready to release with PR https://github.com/badsyntax/vscode-gradle/pull/298. I'm just dealing with some failing integration tests in windows. I'll fix them and release this feature tomorrow.
In the meantime you can have a read of how the feature will work here: https://github.com/badsyntax/vscode-gradle/blob/c783fa10613134e4cd24545fb3deeff0a64c80d3/README.md#debugging-javaexec-tasks
As you can see I've removed the requirement of manually defining the launch configs.
I'll update this issue when the feature is released.

This feature is now released with version 2.7.0. Can you update and give it a go? Let me know if there are any issues. Thanks!

Just tested.  i encounter similar error as what is raised under #301
So now pending for newer update to VSCode-gradle extension...

Cool, thanks for testing & letting me know. I'll release that fix sometime today. In the meantime I've added a gif showing how it should work: https://github.com/badsyntax/vscode-gradle/blob/master/README.md#debugging-javaexec-tasks

I've released the fixed with version 2.7.1. It seems to be working for me on Windows 10 now.
Can you try, and let me know if there are any issues? Thanks!

Bravo! Thanks. No issue now. It works perfectly for my use case.