Feature request: Better policy construct to match on apiserver connectivity

The Kubernetes apiserver typically lives on the kubernetes master nodes, and as such is addressed by the IPs of those nodes. When traffic to or from those nodes is handled at a peer Cilium-managed pod, the identity of those IPs for policy purposes is typically established as remote-node (or host if the pod is scheduled on the same node).
To allow such communication with the apiserver via network policy, typically today the way is to use Entities-based policies to match on the traffic, allowing the pod to communicate with all nodes in the cluster (just the nodes, not the pods on those nodes). This can be limited to specific ports and managed via L7 policies to restrict the pod's ability to communicate, but that traffic may reach any node in the cluster, not just to the apiserver.
If the user attempts to only use Kubernetes Network Policies to allow the traffic, there is no good mechanism as the K8s NP does not provide an abstract representation of the apiserver or nodes in the cluster, it only has IP-based structures for allowing such traffic. This forces the user to encode addressing schemes into their network policies, which is not ideal as it requires manual intervention if the nodes are changed or a similar policy is applied to another cluster (staging vs. prod, primary vs. secondary). Furthermore, as the identity for the traffic is established as remote-node, https://github.com/cilium/cilium/issues/12277 prevents matching on the traffic using IP-based policies.
If there were unique identities per node in the cluster, this would make it easier to match specifically on apiserver traffic from network policy; we could likely come up with either new abstract constructs (eg an entity) to represent the apiserver in policy, or handle the traffic through toServices constructs to allow pods to contact the apiserver via the kubernetes service, or even potentially match on IP.

Another option is to disable the remote-node identity by setting transmit-host-src to true.
If solving this issue requires modifying the identity of live nodes in the cluster, then close attention must be paid to upgrade impact in a similar way to the instructions laid out in the v1.7 upgrade notes for enable-remote-node-identity option.

Another option is to disable the remote-node identity by setting transmit-host-src to true.
If solving this issue requires modifying the identity of live nodes in the cluster, then close attention must be paid to upgrade impact in a similar way to the instructions laid out in the v1.7 upgrade notes for enable-remote-node-identity option.

To some extent it is also possible to restrict access to the kube-api server using the host firewall (beta feature). A host policy can be loaded on all nodes to deny ingress access from cluster pods and allow other accesses (world, remote nodes, etc.). Then, a second policy can be loaded on the master node only, to allow access to the kube-api server.
If using the host firewall, care must be taken to ensure required ports are open. It is also strongly recommended to validate the policy in audit mode because an incorrect policy can brick the cluster.

To some extent it is also possible to restrict access to the kube-api server using the host firewall (beta feature). A host policy can be loaded on all nodes to deny ingress access from cluster pods and allow other accesses (world, remote nodes, etc.). Then, a second policy can be loaded on the master node only, to allow access to the kube-api server.
If using the host firewall, care must be taken to ensure required ports are open. It is also strongly recommended to validate the policy in audit mode because an incorrect policy can brick the cluster.

I mentioned this on the parent issue, but I think this specific issue may just be particular use case of a more generic need to be able to do network policy to host-networking pods using K8s identity.   This could be a differentiating capability, as we see this request fairly frequently in slack.
Note: there is still the limitation that all host network pods on the same host would have the same IP.  Thus, while it would be pretty sane to use this in an egress rule bound to a specific destination port, using egress to an endpoint only, or ingress from an endpoint, would effectively be allowing more traffic than explicitly intended.


Were do i put my reddit keys to install it

Can someone tell me were i can put my keys to install the tipbot

You don't.
You don't need any keys to use the tipbot. Nor are any keys given to you in the first place.


Straight/btce exchange rate adapter

If you agree with #rate_to_f implementation I will add that to all other adapters in separate branch created just for this purpose.

rewrote it


NL Persons -> improved BSN function

Lets see if it works now.
Improved the Burger Service Number (BSN) function, both the generator and test.

Sorry, this is a breaking change, I won't merge it. Besides, you use rand, which is forbidden in Faker. You should definitely read the CONTRIBUTING.md guide.

Maybe add the bsn function as alias?
     /**      * Alias dutch personal identifier number      */     public static function bsn()     {         return self:: idNumber();     }


Upgrade base box and fix release rules

:tada: This PR is included in version 5.0.1 :tada:
The release is available on:

v5.0.1
GitHub release

Your semantic-release bot :package::rocket:


Regression: on expectedExceptionsMessageRegExp expected and actual messages are not printed.

TestNG Version
6.11
Expected behavior
If test code throws exception that passes expectedExceptions check, but violates expectedExceptionsMessageRegExp, then testng says that exception message was incorrect and reports the actual and expected message.
This worked in 6.8.8 and stopped working in 6.11.
Actual behavior
testng outputs the exception as is.
Is the issue reproductible on runner?

[x] IntelliJ

Test case sample
    @Test(expectedExceptions = RuntimeException.class,
            expectedExceptionsMessageRegExp = "expected")
    public void test() {
        throw new RuntimeException("actual");
    }

Thanks for the report but there were many versions between 6.8.8 and 6.11.
Could you try to find in which version the issue appeared?

I tested the versions available in maven central - 6.8.14 is good, 6.8.15 fails internally, 6.8.17 is bad.


chore: add sellers 184,190,191 in curation list

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Reflect changes in metadata files to views. This PR fixes #41

Due to require caches we haven't seen any changes on view without restarting a server.
require-uncached simply bypass the cache and load last changes in our files.

@JosefJezek

Super, thank you :tada:


User attributes: name x screen_name x username

In the version 1.0 of the user's object model, I see those fields related with the user's name:

name (ex. "name": "Twitter API")
screen_name (ex. "screen_name": "twitterapi")

Then in the version 2.0 of the user's object model, those are the attributes:

name (ex. "name": "Twitter Dev")
username (ex. "username": "TwitterDev", same as screen_name of the version 1.0).

The problem is the Java DTO has only one attribute name mapped to the JSON attributes screen_name and username, meaning the JSON attribute name is being ignored and the first ones are wrongly mapped.
My suggestion is mapping the JSON attributes screen_name and username to the Java DTO username and map the JSON attribute name  to a new DTO attribute name.

Hi @michelazzo , good point. I will try to watch it this week-end.

Hi again, it's ok, already fixed ! Will be available soon in the new version 1.13 currently releasing.

Wow, that was fast! Thanks @redouane59 :)

Wow, that was fast! Thanks @redouane59 :)

You're welcome ! :)


I just updated react-boilerplate and it gave me this error with the script.

Some idea how to fix it?
thanks in avance
11 silly lifecycle<EMAIL_ADDRESS>Args: [ '/d /s /c',
11 silly lifecycle   'cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js' ]
12 silly lifecycle<EMAIL_ADDRESS>Returned: code: 1  signal: null
13 info lifecycle<EMAIL_ADDRESS>Failed to exec hot-updates-server script
14 verbose stack Error<EMAIL_ADDRESS>hot-updates-server: `cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\ferrero\AppData\Roaming\nvm\v7.10.0\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\ferrero\AppData\Roaming\nvm\v7.10.0\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid<EMAIL_ADDRESS>16 verbose cwd E:\Granio\Granio-Desktop-Tracker
17 error Windows_NT 10.0.16193
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "hot-updates-server"
19 error node v7.10.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error<EMAIL_ADDRESS>hot-updates-server: `cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js`
23 error Exit status 1
24 error Failed at the<EMAIL_ADDRESS>hot-updates-server script 'cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the electron-react-boilerplate package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs electron-react-boilerplate
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls electron-react-boilerplate
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

Seems like your hot-updates-server is failing. Try running that separately just to confirm that its the issue: npm run hot-updates-server

It was my mistake. In the merge i do not update files in the app folder.


content id being showed vertically (distorted) if we add some more attributes then it is showing horizontally.

Description:
When we try to show the id of the content it is being displayed vertically which is taking a lot more vertical space, but if we try to add some more attributes such as 'expiration date' then it showing horizontally (in correct manner).
To Reproduce:
Steps to reproduce the behavior:

Go to home page
Click on content icon on left bar
On the home navigation bar click on the three dots
Select ID in the check box
See the display error

Expected behavior
The ID of the contents in content box should be shown horizontally
Video
Screencast from 2024-02-07 22-27-04.webm
Software:

OS: Ubuntu (23.10)
Browser: Mozilla firefox (118.0.1)

Hi @ichim-david, if this issue still exists then I would like to work on this. Can you please assign it to me?

@Snehal Chaudhari This issue is assigned to me and I’m currently working on
it.
On Thu, 8 Feb 2024 at 12:00 AM, Snehal Chaudhari @.***>
wrote:

Hi @ichim-david https://github.com/ichim-david, if this issue still
exists then I would like to work on this. Can you please assign it to me?
—
Reply to this email directly, view it on GitHub
https://github.com/plone/volto/issues/5742#issuecomment-1932637023, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ATTTYKT26HZ7NZQYMCBTWQDYSPB3ZAVCNFSM6AAAAABC6F5VTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZSGYZTOMBSGM
.
You are receiving this because you were assigned.Message ID:
@.***>

@snehalchaudhari98 please read and follow First-time contributors, especially Things not to do, Contributing to Plone, and Contributing to Volto.
Using your super power of observation, you may see that the green "Open" icon reflects its status. See GitHub docs.


Include SSH_AUTH_SOCK in filtered environment

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew tests with your changes locally?

So my situation may not be very common, but brew update broke for me after b26a0d4a911ba400f306ccc8bdc8cee42dd302bb because I have the following in my .gitconfig:
[url "git@github.com:"]
	insteadOf = https://github.com/

which forces all GitHub connections to use SSH. With SSH_AUTH_SOCK removed from the environment git is no longer able to find my SSH agent and I get:
Permission denied (publickey).
fatal: Could not read from remote repository.

for each of my taps. Copying SSH_AUTH_SOCK into the filtered environment fixed the problem.

Neat, I didn't know about insteadOf.
Although, I cannot reproduce this if I'm using the same config. Does this only happen if you haven't called ssh-add -A yet?

@reitermarkus No, my keys were already added to the agent but the errors still occurred on both machines I tried it on.
So when you tried to reproduce you had url.git@github.com:.insteadof=https://github.com/ in your global config and homebrew.devcmdrun=true in your local config?

So when you tried to reproduce you had url.git@github.com:.insteadof=https://github.com/ in your global config and homebrew.devcmdrun=true in your local config?

Yes, seems like SSH_AUTH_SOCK has no effect on anything for me. I can even completely unset it and everything still works.

Also, I'm not sure this is configuration we want to allow, anyway. I'm going to investigate how to have Homebrew's brew update and friends bypass ~/.gitconfig.

@reitermarkus Do you have an unencrypted key (that's authorized on GitHub) at a standard location like ~/.ssh/id_rsa? It's probably finding it automatically if you do. The key I have authorized for GitHub is encrypted and named github_ed25519 so it can't be found or used without the help of the agent.
@MikeMcQuaid Why is that?

@MikeMcQuaid Why is that?

You don't need SSH authentication to access public GitHub repositories. That we use Git for our update mechanism is an implementation detail that we don't want to allow user configuration of (because user custom configuration breaks things; here is an example where your configuration has broken things, for instance). This isn't too bad when users know what has broken it but often people will copy-paste to ~/.gitconfig or ~/.curlrc and then get confused when Homebrew doesn't work for them.

Do you have an unencrypted key (that's authorized on GitHub) at a standard location like ~/.ssh/id_rsa?

My github_rsa says Proc-Type: 4,ENCRYPTED, so I guess it's encrypted.

@Noctem, can you try if changing https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cmd/update.sh#L22 to
env HOME=/dev/null "$GIT_EXECUTABLE" "$@"

works?

@reitermarkus

My github_rsa says Proc-Type: 4,ENCRYPTED, so I guess it's encrypted.

Weird. I don't know how it works for you then, maybe I'll take a look at the git source code to see how it finds keys. Does it ask for a password to decrypt your key while it updates?
env HOME=/dev/null "$GIT_EXECUTABLE" "$@" works for everything except for my own tap which is a private repo on GitHub and thus requires SSH (apparently the same situation as #3503).
@MikeMcQuaid

You don't need SSH authentication to access public GitHub repositories. That we use Git for our update mechanism is an implementation detail that we don't want to allow user configuration of

I understand, and I sympathize with having to deal with support requests resulting from misconfiguration. I just prefer using SSH whenever possible, and I previously forgot to mention the more justifiable use-case of having private taps which require SSH access (which also applies to me, as mentioned above).
If you do end up ignoring users' .gitconfigs, I would just request that there be an option or environment variable to override that (like HOMEBREW_NO_ENV_FILTERING). There are other git options that I want to retain as well (core.compression for example).

I'm convinced, thanks again for your contribution, @Noctem!


BM test run 7

bot bench $ all

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2643571

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2643572


[REQ] React version

Hi,
I'm just wondering if you're going to support react or maybe create react version.
thanks,

Hey @hamzaelmaghari not planned for now.
Thanks for the suggestion.


Annotations: Add Note

When the user taps on a verse and then taps on the note icon in the TextSelectionToolbar, they should be prompted to enter in a note and save it.


Validate Workbook SerializedData in MainTemplate

Required items, please complete
Change(s):

In mainTemplate.json if there are any workbook which has attribute "serializedData" then workbook content is coming as a string in this field. It is observed that this "serializedData" attribute field value i.e json is invalid and fails when we open workbook view template. So this PR will validate if the "serializedData" attribute value is a valid json or not.

Reason for Change(s):

To Validate if workbook, "serializedData" attribute value is a valid json format or not.

Version Updated:

NA

Testing Completed:

Yes

Checked that the validations are passing and have addressed any issues that are present:

Yes

Testing Screenshot:
When mainTemplate has invalid json content in serializedData attribute as shown below:

When mainTemplate has valid json content in serializedData attribute as shown below it will be success:

After discussion with Sanmit this PR is not need as we have taken care in PR https://github.com/Azure/Azure-Sentinel/pull/9135


Fixes #1628 ~ Fix types/jasmine to 2.5.45

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix #1628

What is the current behavior? (You can also link to an open issue here)
npm run test fail with error
ERROR in [at-loader] src/app/app.e2e.ts:12:29
TS2345: Argument of type 'string' is not assignable to parameter of type 'Expected<Promise>'.

What is the new behavior (if this is a feature change)?
Fixing the typing version fix the build

Other information:
Fixing the typing version seems to be a good practice since it can break the build at any moment

@SebHeuze thank you very much for the pull request. This was handled by #1691


Service support broken on Windows

With the addition of the TCLAP library to handle command line parameters, Windows service support is broken.
Starting the executable with "/service" on the command line, results in an unhanded exception while parsing the command line.
I'm working on a fix, and will issue a PR later today.

What happens if you use linux-style switches?

TCLAP doesn't seem to like anything other than a single character in the switch names. Swapping the service to use -d instead of /service.
Also, lets ignore unmatched parameters with CmdLine::ignoreUnmatched. That will stop the exceptions being thrown with unknown parameters, and just ignore them instead.


Different predictions between C++ and Python/R

I have different predictions when the same pretrained model is run from C++ and from Python/R code.
Initially model is trained in Python and then saved to a file in the XGBoost binary format. Later I load that model into C++/Python/R code and use for a new data.
Here I've prepared example repository which contains code, binary model and example dataset. Instructions on how to build and use it are in the corresponding folders.
I use Ubuntu 18.04, on Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
I am also attaching prediction results for C++, python and R code.
for C++
for Python
for R
Please have I look, maybe I am missing something very obvious, especially in C++ case.

Found bug on my side.
For history: https://github.com/thekvs/xgboost-example/commit/49158ccc01f3377e674f7f930b8ee8fffba53ab1


Why Given correlated subquery is not supported when limit 1 added in a corelated subquery

presto server version: 341
test data:
table A
c1 | c2
----+----
k1 | v1
k2 | v2

table B
c1 | c2
----+----
k2 | v3
k3 | v4

failed query:
select
  a.c1,
  a.c2,
  coalesce(
    (select b.c2 from B b where a.c1 = b.c1 limit 1),
    'NA'
  )
from
  A a
;

The query will failed with error: Given correlated subquery is not supported, and it may executed successfully if  limit 1 is removed.
My question is: why limit 1 matters?
Below is the query to reproduce it
with A as
(
  select * from (values ('k1', 'v1'), ('k2', 'v2')) as v1 (c1, c2)
),
B as
(
  select * from (values ('k2', 'v3'), ('k3', 'v4')) as v2 (c1, c2)
)
select
  a.c1,
  a.c2,
  coalesce(
    (select b.c2 from B b where a.c1 = b.c1 limit 1),
    'NA'
  )
from
  A a
;

select b.c2 from B b where a.c1 = b.c1 limit 1 subquery is used in context which requires that result of subquery returns single value (the result is passed as first argument to coalesce).
This constraint verified by Presto in query analysis phase, before table data is read. Without limit 1 it would be possible that more than one value is retuned from the subquery if there were multiple rows in B matching current row from A.
E.g for B contents like below:
table B
c1 | c2
----+----
k2 | v3
k2 | v4

In case you have more questions regarding this, please reach out to me at https://prestosql.slack.com/.

Related: https://github.com/prestosql/presto/issues/4673

@hustneed4speed please disregard my previous comment. It is very wrong.
Actually we can enforce single-value constraint at runtime - which I forgot. And the reason why it does not work for limit 1 is more prosaic. We simply did not implement rule to decorrelate subquery where there is limit 1 in it.
As a temporary measure you can rewrite the inner query to use arbitrary global aggregation instead of limit 1.
with A as
(
  select * from (values ('k1', 'v1'), ('k2', 'v2')) as v1 (c1, c2)
),
B as
(
  select * from (values ('k2', 'v3'), ('k3', 'v4')) as v2 (c1, c2)
)
select
  a.c1,
  a.c2,
  coalesce(
    (select arbitrary(b.c2) from B b where a.c1 = b.c1),
    'NA'
  )
from
  A a
;

@hustneed4speed please disregard my previous comment. It is very wrong.
Actually we can enforce single-value constraint at runtime - which I forgot. And the reason why it does not work for limit 1 is more prosaic. We simply did not implement rule to decorrelate subquery where there is limit 1 in it.
As a temporary measure you can rewrite the inner query to use arbitrary global aggregation instead of limit 1.
with A as
(
  select * from (values ('k1', 'v1'), ('k2', 'v2')) as v1 (c1, c2)
),
B as
(
  select * from (values ('k2', 'v3'), ('k3', 'v4')) as v2 (c1, c2)
)
select
  a.c1,
  a.c2,
  coalesce(
    (select arbitrary(b.c2) from B b where a.c1 = b.c1),
    'NA'
  )
from
  A a
;

Thank you,  @losipiuk
I am just curious why it failed, so I post an issue here, and you have given me an answer for that.
I used max(b.c2) as a work around in my project, and it looks like arbitrary is a better choice.

We simply did not implement rule to decorrelate subquery where there is limit 1 in it.

We actually can decorrelated subqueries with limit. However, it would have to be in simpler form:
(select b.c1 from B b where a.c1 = b.c1 limit 1),

which is less useful. @kasiafi what are our current correlated limit correlated subquery limitations?

@hustneed4speed @sopel39 We can decorrelate subqueries with LIMIT. However, we've got different implementations for LIMIT 1 and LIMIT greater than 1. The implementation for LIMIT 1 is less powerful. Specifically, it does not succeed if the subquery returns non-constant output (b.c2) in your example.
The implementation for LIMIT greater than 1 can handle it.
Theoretically, we could use the more powerful decorrelation strategy for LIMIT 1 as well. However, it would affect the way certain queries are processed (e.g. queries containing EXISTS clause). We'd have to run benchmarks and make sure we don't trade off efficiency.

We'd have to run benchmarks and make sure we don't trade off efficiency.

The current support for LIMIT 1 was introduced specifically to improve performance of EXISTS clause.
Could we use other method when we cannot decorrelate LIMIT with more performant method? Do I understand correctly, that the other method requires aggregation on top of join?

Could we use other method when we cannot decorrelate LIMIT with more performant method? Do I understand correctly, that the other method requires aggregation on top of join?

I'm not sure if the method we currently use for LIMIT 1 is more performant than the other.

the method for LIMIT 1 replaces LimitNode with AggregationNode with a single grouping set.
the method for LIMIT greater than 1replaces LimitNode with RowNumberNode partitioned on constants.

In neither case there is an aggregation on top of JoinNode
You can follow the difference using the following examples:
EXPLAIN SELECT * FROM region r, LATERAL (SELECT n.regionkey FROM nation n WHERE r.regionkey = n.regionkey LIMIT 1);

EXPLAIN SELECT * FROM region r, LATERAL (SELECT n.regionkey FROM nation n WHERE r.regionkey = n.regionkey LIMIT 2);

I'm not sure if the method we currently use for LIMIT 1 is more performant than the other.

That needs to be verified. It looks like io.prestosql.operator.RowNumberOperator might consume more memory due to requirement to count partitions (that shouldn't be much more). Also it seems to materialize rowNumberChannel.
However, it looks like we could use RowNumberOperator where AggregationNode cannot be used. I think it's the condition here (io/prestosql/sql/planner/optimizations/PlanNodeDecorrelator.java:212):
            if (constantSymbols.isEmpty() || !constantSymbols.containsAll(decorrelatedChildNode.getOutputSymbols())) {
                return Optional.empty();
            }


Please support fluent-web

Problem
I expect My Flutter App run the web platform using realm
Solution
No response
Alternatives
No response
How important is this improvement for you?
I would like to have it but have a workaround
Feature would mainly be used with
Atlas Device Sync

Can this plugin work for web without Atlas Device Sync? I want to use realm for flutter, but my dashboard is on web primarily, not sure if it will work or not...


Does not properly load its API inside Laravel Nova

Hi, thanks for this awesome package ❤ .
I've tried using it inside my Laravel Nova project - and the way Nova loads external-to-nova URIs is by loading them in a dialog window through an . When that happens I get this window:

It seems that because the /log-viewer is loaded through an iframe - it loses track of the correct URI path to load its api/folders.

Hey @dm-pf can you share how you've added a link to the Log Viewer?
I'm not a Nova user, but I think what you're looking for is this:
use Laravel\Nova\Menu\MenuItem;

MenuItem::externalLink('Log Viewer', route('log-viewer.index'))

This is taken from Nova v4 docs btw:
https://nova.laravel.com/docs/4.0/customization/menus.html#menu-items


Add dialog element to sandbox

Add the dialog element to sandbox.
This uses the google chrome polyfill.
I think I've linked it up correctly, but please do check. Chris Moore has already had a look at the implementation in Chrome and Safari and gave his approval.

@aduggin I've updated the PR to address your comments.


Walk users through tabs

As stated by @spfitzgerald: In terms of user-friendliness, you might want to tell the user when to move on to the next tab since there's no "next" button.  For example, in the 1st (Intro) tab, one sentence: "When ready to begin, select the Objectives and Indicators tab above".  Then in the 2nd (Objectives and Indicators) tab, "After you've selected the appropriate indicators, click on the Data tab above".  Something like that.  No big deal, just one brief sentence on each tab.

Perhaps something like this?
Using next and previous buttons?
In the UI
actionButton(inputId = "b5.6", label = "Siguiente", icon = icon("arrow-right"), class = "btn2")

In the Server
observeEvent(input$b5.6, {
    updateNavbarPage(session, "Tabs",
                     selected = "Result"
    )
  })

👍
On Sat, Feb 18, 2017 at 5:22 PM, Juan Carlos Villaseñor-Derbez <
<EMAIL_ADDRESS>wrote:

Perhaps something like this?
Using next and previous buttons?
In the UI
actionButton(inputId = "b5.6", label = "Siguiente", icon = icon("arrow-right"), class = "btn2")
In the Server
observeEvent(input$b5.6, {
updateNavbarPage(session, "Tabs",
selected = "Result"
)
})
[image: image]
https://cloud.githubusercontent.com/assets/11950459/23098264/9cae7a12-f5fe-11e6-9a5e-14dbc123e320.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/turfeffect/AppDraft/issues/18#issuecomment-280888118,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMi3G-u_WZpSaDS0V6QHPlmJID-r-vWCks5rd5lvgaJpZM4L_ziP
.


Fix Priority mode option doesn't sync between devices

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/16621
PROPOSAL: https://github.com/Expensify/App/issues/16621#issuecomment-1488835467
Tests

In a tested device (or browser), login to an account
Open Profile => Preferences => Priority Mode.
From another device (or browser), login to the same account => open Profile => Preferences => Priority Mode and change the priority mode.
Verify the priority mode is updated in current device (or browser)

[x] Verify that no errors appear in the JS console

Offline tests

In a tested device (or browser), login to an account
Open Profile => Preferences => Priority Mode.
Go to offline
From another device (or browser), login to the same account => open Profile => Preferences => Priority Mode and change the priority mode.
Go to online
Verify the priority mode is updated in current device (or browser)

QA Steps

Same as above

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://user-images.githubusercontent.com/9639873/228701407-e049f4e8-f54f-4db9-b9d2-6bfba227b63a.mp4

Mobile Web - Chrome

https://user-images.githubusercontent.com/9639873/228701454-d3db71b6-43a0-4957-a22c-32a169a05b32.mp4

Mobile Web - Safari

https://user-images.githubusercontent.com/9639873/228701473-094f8d15-dd14-45b5-8b08-7bdaccaf3795.mp4

Desktop

https://user-images.githubusercontent.com/9639873/228701484-93319a57-3823-404b-b734-192ddcf6fbf3.mp4

iOS

https://user-images.githubusercontent.com/9639873/228701497-5bbe5308-44f8-468c-9b60-b0407f566c3e.mp4

Android

https://user-images.githubusercontent.com/9639873/228701510-6e6a83c3-5bb8-4e3b-b234-66b7f2225520.mp4

@flodnv @fedirjh One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/flodnv in version: 1.2.93-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
failure ❌

🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.93-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Improve Script by Caching Bundler

Describe the bug
Currently when the script runs, it takes 1-2 minutes just to download fastlane, we can cache the bundler to improve time
Additional context
Use Travis to Cache bundler
Would you like to work on the issue?
YES

I would like to work on this issue.

@klutzayyyy go ahead


memory leak 3.17.1

Redis version
5.0
Redisson version
3.17.1
Redisson configuration
Config config = new Config();
config.useSingleServer().setAddress("redis://" + host + ":" + port).setDatabase(database).setPassword(password);
redissonClient = Redisson.create(config);
What is the Expected behavior?
No response
What is the Actual behavior?
this is mycode：
public class RedissonUtil {
    private final RedissonClient redissonClient;

    public RedissonUtil(RedissonClient redissonClient) {
        this.redissonClient = redissonClient;
    }

    public boolean tryLock(String lockKey, long waitTime, long expireTime, TimeUnit timeUnit) {
        RLock lock = this.redissonClient.getLock(lockKey);

        try {
            return lock.tryLock(waitTime, expireTime, timeUnit);
        } catch (InterruptedException var9) {
            Thread.currentThread().interrupt();
            return false;
        }
    }

    public void unlock(String lockKey) {
        RLock lock = this.redissonClient.getLock(lockKey);
        if (lock.isLocked() && lock.isHeldByCurrentThread()) {
            lock.unlock();
        }
    }
}

The code that caused the problem：
        String date = DateUtils.getFormatDate(SF_NO_SYMBOL);
        String redisKey = RedisUtils.generateKey(key, date);
        String lockKey = RedisUtils.generateKey(RedisKey.DeviceUuidLogs.DEVICE_UUID_GENERATE_REDIS_ID_LOCK, date);
        String incrementId = null;
        int retryCount = 0;

        try {
            while (StringUtils.isEmpty(incrementId) && retryCount < refreshScopeConfig.getTraceIdMaxRetries()) {
                if (redissonUtil.tryLock(lockKey, 50, 100, TimeUnit.MILLISECONDS)) {
                    //other code...

                    incrementId = String.format("%0" + length + "d", increment);
                }
                retryCount++;
            }
        } catch (Exception e) {
            return snowFlakeId();
        } finally {
            try {
                redissonUtil.unlock(lockKey);
            } catch (Exception e) {
                return snowFlakeId();
            }
        }

        return StringUtils.isEmpty(incrementId) ? snowFlakeId() : date + incrementId;

After the program has been running for a while, perhaps several days, the memory usage gradually increases, and it is observed that it is always in fullgc.
After I dumped the memory, I found that there were many redisson related objects and a memory leak occurred.
What is the problem？

Additional information
No response

@mrniko please help

Fixed in https://github.com/redisson/redisson/pull/5038 - too many pubsub topics may cause memory leak
You need to upgrade to 3.21.2 or higher

Could you tell me the details? Thanks @mrniko


feat: support the flattening syntax for supervising

MOTIVATION
Continue #680
The original api wasn't flatening.
Behaviors.supervise(
        Behaviors.supervise(behavior)
            .onFailure(IllegalStateException.class, SupervisorStrategy.restart()))
    .onFailure(IllegalArgumentException.class, SupervisorStrategy.stop());

RELATED WORK

[x] scaladsl
[x] javadsl
[x] documentation
[x] made unit test passed
[x] binary compatibility

Thanks @raboof, let we merged it.


MultiSelect component

MultiSelect
Overview / Summary
Summary description of UI component
Similar to Select component, but for when multiple values can be selected and the value is expected to be an array.
Rationale for why this component is necessary
To select more than one value for fields
Expected use cases
Lots of fields when defining shipping rules, tax rules, etc. as admin
Images / Designs of UI component in context
https://zpl.io/295jjed
Most styles should be the same as copied from Select, but some additional styles might be needed for the selected items that appear in the field with x, and verify that it looks correct with lots of items shown.
React State
Same as in Select component. Only difference is value prop will be an array.
Data Fetching
None
State Store
None
Routing / Query String
None
Render Criteria
Same as in Select component.
Breakpoints
Desktop, Tablet, Mobile
Same as in Select component.
UI States
Same as in Select component.
Work
Copy Select to MultiSelect, add isMulti prop on the react-select component, and update it to work with array value and have any additional necessary styles to match Zeplin designs.

:tada: This issue has been resolved in version 0.53.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Drag and resize placement

It is now placed wrongly. You should whether read translation before or sort something out with alignment.
Or just leave it hoping you will never need movable popups.

Related with body content shift effects and pure css placement.

Draggable fixed, now its up to resizable. The point is in overflow with fixed positioning.


Updated tiny-lr to avoid vulnerability in qs

tiny-lr needs to be updated to update its sub-dependency qs.  See https://nodesecurity.io/advisories/29.
BTW-- I tried running the tests.  Both with this change and without this change the same two tests were failing, but perhaps that is something to do with my environment.

I see tiny-lr is already update on master; a new version of grunt-contrib-watch just needs to be tagged.


Multiple migrations with the same number

Background
Say there are two developers named Jane and Rob working on the same codebase.
Main Branch
0001.first-migration.up.sql
0001.first-migration.down.sql

Jane's branch
0001.first-migration.up.sql
0001.first-migration.down.sql
0002.janes-migration.up.sql
0002.janes-migration.down.sql

Rob's branch
0001.first-migration.up.sql
0001.first-migration.down.sql
0002.robs-migration.up.sql
0002.robs-migration.down.sql

Merged
After Jane and Rob merge their branches into the main branch, the main branch looks like this:
0001.first-migration.up.sql
0001.first-migration.down.sql
0002.janes-migration.up.sql
0002.janes-migration.down.sql
0002.robs-migration.up.sql
0002.robs-migration.down.sql

The Problem
Right now dbmigrate does not return an error in this case, which can lead to:

Not realizing that a migration never actually got ran
When migrating up a different migrations might run than when migrating down.

For example when migrating up janes-migration.up.sql might run, but when migrating down robs-migration.down.sql might run.

Potential Fix
Make dbmigrate return an error if there are two or more migrations that have the same number.

If I PR a fix can you merge it and deploy a new version?
Cheers!

I didn't think anyone was using that crate!
I would definitely take a PR for that.

Haha I love this crate! Been using it for years.
Awesome thanks. I'll submit a patch.


🐛 BUG:  Cannot create a string longer than 0x1fffffe8 characters

Which Cloudflare product(s) does this pertain to?
D1
What version of Wrangler are you using?
3.0.0
What operating system are you using?
Ubuntu
Describe the Bug
Create a big sqlite database (>2GB), follow this guide https://developers.cloudflare.com/d1/learning/importing-data/#converting-sqlite-database-files
✘ [ERROR] Could not read file: db.sql

  Cannot create a string longer than 0x1fffffe8 characters

  If you think this is a bug, please open an issue at:
  https://github.com/cloudflare/workers-sdk/issues/new/choose

Probably have to stream/chunk big DBs?

You can't create databases greater than 100MB (so far), but we should look into this issue

I hit this issue as well. My db was around 1GB whereas paid workers support up to 10GB. -https://developers.cloudflare.com/d1/platform/limits/.


Problem in compilation stage with. computecpp 2.0.0

Hi,
I tried compile the sycl-bench, using the computecpp 2.0.0, gcc 9.3.0 and ubuntu error, but the cmake tool return me a error: #include<CL/sycl.hpp> not found.
cmake command: cmake .. -DSYCL_IMPL=ComputeCpp  -D COMPUTECPP_RUNTIME_LIBRARY=/opt/ComputeCPP/include -DComputeCpp_INFO_EXECUTABLE=/opt/ComputeCPP -D COMPUTECPP_RUNTIME_LIBRARY_DEBUG=/opt/ComputeCPP
What could I be doing wrong?
Rui

Hi,
I don't have experience with ComputeCpp 2.0. Does the CL/sycl.hpp header exist in your ComputeCpp install directory?
If ComputeCpp 2.0 supports already SYCL 2020, it is possible that we need to change the include to #include <sycl/sycl.hpp>, although <CL/sycl.hpp> should still be available for backwards-compatibility purposes (but is maybe not available by default?). The name of the SYCL header was changed with SYCL 2020, but SYCL-Bench still mainly targets SYCL 1.2.1.

Hi,
I used this command in cmakecmake .. -D SYCL_IMPL=ComputeCpp  -D ComputeCpp_INCLUDE_DIRS=/opt/ComputeCPP/include/ -DCOMPUTECPP_RUNTIME_LIBRARY=/opt/ComputeCPP/bin/ -DComputeCpp_INFO_EXECUTABLE=/opt/ComputeCPP/ -D COMPUTECPP_RUNTIME_LIBRARY_DEBUG=/opt/ComputeCPP/lib/
But after your suggestion i change the include and this fact solved my first problem, but now i have other: when i tried do a make using the cmake command  above, the make command return a following error:
ompute++: error: unable to execute command: Executable "/usr/bin/spirv-ll-tool" doesn't exist!
compute++: error: spirv-ll-tool command failed with exit code 1 (use -v to see invocation)
I suspect I passed some error value in cmake flags but I'm not sure. Any suggestion?
Rui

I'm not an expert on ComputeCpp and how it wants to be integrated with cmake - let's ask the experts from Codeplay. Pinging @rodburns as a first guess :)


Fix state diffs.

I'm pretty sure this was just a typo, but I'm not 100% up to speed yet so just making sure.

Oy, are they totally broken at the minute? Any chance you care to attempt to add a test? Otherwise I can have a look.

Merging after some minor tweaks, thanks for the fix (and sorry it broke).


reactions are sent as if responding to an attachment

all reactions are sent as if responding to an attachment leading to incorrect notifications for iPhone users when reacting to a non-attachment message

Issue created by BlueBubbles Bot in the BlueBubbles commnity on behalf of @Clamscrambler in #nightly-bugs.

I'm not sure how helpful this will be, as my experience is from iOS side as opposed to macOS.
When sending a reaction, you are usually passing a summaryInfo variable. This variable is what handles showing "Liked an attachment" or "Liked 'Hi!'"
// First, you need to enter the string the user is reacting to in the summerInfo "ams" key.
// I am replacing \ufffc with an empty string to remove the unicode character added by attachments.
summaryInfo[@"ams"] = [[textMsg string] stringByReplacingOccurrencesOfString:@"\ufffc" withString:@""];

// You will also need to pass the "amc" key as a boolean. If it is true (or @1), it will react to an attachment.
// If it is false (or @0), it will react to a text message.
summaryInfo[@"amc"] = [summaryInfo[@"ams"] length] == 0 ? @0 : @1;

Hope I was able to help!

@sgtaziz the dang invisible attachment character bugs the hell outta me. I remember back in 2020 when i first started BB, it annoyed me so much that they had it. Wasn’t a hard fix, but i end up just stripping it from texts

Yeah I'm not sure why the invisible Unicode character even exists. The NSAttributedString is enough to place attachments where needed, but ¯_(ツ)_/¯

https://github.com/BlueBubblesApp/BlueBubbles-Android-App/issues/698
Possible dupe

yup. These are all also server issues, so i will move these accordingly. Closing this one once I do

Server ticket: https://github.com/BlueBubblesApp/BlueBubbles-Server/issues/191


Remove Function.prototype.toString() shenanigans.

Replace with looking for .baseDir() and .cacheKey functions.
This will allow users to change their test generator (from QUnit to mocha for example) without getting pwned by bad cache invalidation.

Will need to do the same in broccoli-lint-eslint.


ValueStore should buffer Values

Now that Values are just byte sequences, it's silly to have code abstraction of decode/encode internally, even if those become noops.

cc @cmasone-attic


Compute lineage metadata at the attribute field level

This PR refines the concepts of group and attribute lineage metadata. An attribute field may be defined locally, inherited from a parent group, or overridden locally. The lineage section, which is optional, describes the origin of a field. The absence of lineage information indicates that the field is defined locally.
These lineage metadata are useful for debugging, assisting semantic convention authors, and aiding application telemetry schema authors in determining the provenance of each field in the resolved registry or schema. Additionally, they can be integrated into documentation for data governance purposes.
Example of semconv resolution with lineage enabled:
groups:
  - id: base.level
    type: attribute_group
    brief: Base level
    attributes:
      - id: server.port
        type: string
        brief: Server port
        stability: stable

  - id: registry.xyz
    type: attribute_group
    brief: Just a registry of attributes
    attributes:
      - id: network.protocol.name
        type: string
        brief: Network protocol name (registry)
      - id: network.protocol.version
        type: string
        brief: Network protocol version (registry)
      - id: network.type
        type: string
        brief: Network type (registry)

  - id: intermediate.level
    type: attribute_group
    brief: Intermediate level
    extends: base.level
    attributes:
      - ref: server.port
        requirement_level: opt_in
      - id: network.protocol.name
        type: string
        brief: Network protocol name
        examples: [ 'http', 'spdy' ]

  - id: top.level
    type: attribute_group
    brief: Top level
    extends: intermediate.level
    attributes:
      - ref: server.port
        brief: Brief of the top level
        examples: [ 80, 8080, 443 ]
      - ref: network.protocol.name
        requirement_level: opt_in
      - ref: network.protocol.version
        requirement_level: opt_in
      - ref: network.type

The resolution process will produce (for simplicity only the lineage part is described in this output):
{
  "registry_url": "https://<IP_ADDRESS>",
  "groups": [
    {
      "id": "base.level",
      "type": "attribute_group",
      "brief": "Base level",
      "attributes": [...],
      "lineage": {
        "source_file": "data/registry-test-lineage-2/registry/groups.yaml"
      }
    },
    {
      "id": "registry.xyz",
      "type": "attribute_group",
      "brief": "Just a registry of attributes",
      "attributes": [...],
      "lineage": {
        "source_file": "data/registry-test-lineage-2/registry/groups.yaml"
      }
    },
    {
      "id": "intermediate.level",
      "type": "attribute_group",
      "brief": "Intermediate level",
      "attributes": [...],
      "lineage": {
        "source_file": "data/registry-test-lineage-2/registry/groups.yaml",
        "attributes": {
          "server.port": {
            "source_group": "base.level",
            "inherited_fields": [
              "brief",
              "note",
              "stability"
            ],
            "locally_overridden_fields": [
              "requirement_level"
            ]
          }
        }
      }
    },
    {
      "id": "top.level",
      "type": "attribute_group",
      "brief": "Top level",
      "attributes": [...],
      "lineage": {
        "source_file": "data/registry-test-lineage-2/registry/groups.yaml",
        "attributes": {
          "network.protocol.name": {
            "source_group": "intermediate.level",
            "inherited_fields": [
              "brief",
              "examples",
              "note"
            ],
            "locally_overridden_fields": [
              "requirement_level"
            ]
          },
          "network.protocol.version": {
            "source_group": "registry.xyz",
            "inherited_fields": [
              "brief",
              "note"
            ],
            "locally_overridden_fields": [
              "requirement_level"
            ]
          },
          "network.type": {
            "source_group": "registry.xyz",
            "inherited_fields": [
              "brief",
              "note",
              "requirement_level"
            ]
          },
          "server.port": {
            "source_group": "intermediate.level",
            "inherited_fields": [
              "note",
              "requirement_level",
              "stability"
            ],
            "locally_overridden_fields": [
              "brief",
              "examples"
            ]
          }
        }
      }
    }
  ]
}

I might need to see some kind of design document here to fully appreciate what you're going for and how to use this.
Could update the README.md file on one of the crates (either semconv or resolver) to describe the data model and how it's used? I'm having trouble seeing the forest for the trees in all the Rust changelogs.
It'd be nice if, as part of this, we document all the possible lineage paths we allow (and check the use cases are valid).
I will go back over the code, but I'm still trying to grok the output a bit.  A few more questions:

One thing I worry about (in the core model today) is this "intermediate" ref where we ref solely by attribute name but have overrides in an attribute group.  Is this just a side-effect of your format or is this inherit in how resolution happens today?
lineage has "source_file" today.  Should this be a relative path in a registry + the registry itself?  What does this look like when we "flatten" schema with resolved schema?
For locally-overriden and inherited fields, do you want explicit or implicit references?  How much of that data could be inferred from the raw groups + refs, where lineage JUST tracks origin URLs/files/etc.

I've updated the weaver_resolver README.md to include a description of the lineage concept and addressed some of your questions in the documentation. However, a few questions remain unanswered as I may need further clarification; see below.

One thing I worry about (in the core model today) is this "intermediate" ref where we ref solely by attribute name but have overrides in an attribute group.  Is this just a side-effect of your format or is this inherit in how resolution happens today?

Are you concerned about the fact that the resolution process produces a description of the intermediate.level group with its local lineage, or is it something else? I don't think I understood the problem you're raising in this question.

For locally-overriden and inherited fields, do you want explicit or implicit references?  How much of that data could be inferred from the raw groups + refs, where lineage JUST tracks origin URLs/files/etc.

I described the process for locally-overriden and inherited fields in the README.md, let me know if that doesn't answer your initial question.

Are you concerned about the fact that the resolution process produces a description of the intermediate.level group with its local lineage, or is it something else? I don't think I understood the problem you're raising in this question.

My concern is about whether this inheritance is ambiguous in the underlying model.  When reading your YAML what crossed my mind was "how would I figure out the order if not for your lineage blocks", e.g. if lineage was optional.

Are you concerned about the fact that the resolution process produces a description of the intermediate.level group with its local lineage, or is it something else? I don't think I understood the problem you're raising in this question.

My concern is about whether this inheritance is ambiguous in the underlying model. When reading your YAML what crossed my mind was "how would I figure out the order if not for your lineage blocks", e.g. if lineage was optional.

I see. As I originally imagined it, the purpose of the resolution process is to produce a self-contained description where all the complex elements to be resolved are replaced by their final interpretation. That's why, unless lineage is enabled, the resolved schema no longer retains traces of inheritance relationships, global references, or operations of local override. I feel that lineage might be useful for documenting a semconv registry, but it's less useful for generating an SDK client or for creating a dashboard. Let me know what you think.


Fix dependency management

Delay calling service to reload dependencies until changes are saved.

@etirelli @manstis @Rikkola please have a look, seems to fix for me but feel free to amend if I'm missing something here.

I'll let @Rikkola review, but (a) the change appears to circumnavigate quite a lot of other Presenter logic (and I'm not sure of the impact), (b) what is the issue this PR resolves?

+1

Merged into 6.4.x. Please make sure to submit PR for master as well.


Demo site is unavailable

It looks like the domain was not renewed.

No it was not. Using normal gh pages hostname instead. Updated the link in the repo description to http://tybenz.github.io/exemplar


Full meta data not displaying in HA media player entity

What version of Music Assistant has the issue?
2023.6.0b6
The problem
Using a LinkPlay device through the Dlna player to play TuneIn radio streams. Within the MA add on interface I see the artist, album, and track name playing. When I look at the corresponding HA media player entity in HA developer tool I don’t see any of that meta data nor does any of my media cards render this meta data. With tidal and Spotify all of this meta data does display and shows up as state variables in the media player entity.
So it seems the meta data is making its way from the source (TuneIn) to the MA server if it’s being displayed within the add on UI. Seems that meta data isn’t being mapped to the HA media player entity when the source is TuneIn but it does work for Tidal and Spotify?
How to reproduce
Stream anything from tune in using a Dlna device and confirm you can see artist, track, album from within the add on UI. Then go to developer tools and review state variables for the corresponding HA media player entity and you will not see those meta data in any state attributes.
Do same using tidal or Spotify and confirm that meta data does show up in both places.
Relevant log output
No response
Additional information
No response
What version of Home Assistant Core are your running
2023.11.2
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Raspberry Pi

DLNA is a poorly standardised protocol. Do you have any other device types? If so, does that all work ok?

I confirm. I also don't have meta data via Slimproto.

I confirm. I also don't have meta data via Slimproto.

What do you expect to see?)

Is this using TuneIn?

TuneIn and RadioBrowser.

Ok thanks. This will be looked at in due course

My issue is also while using TuneIn and Tidal. If you'd like some help i'd
be happy to help in any way including doing some actual development/testing
if needed.
On Tue, Dec 19, 2023 at 1:05 AM melwinek @.***> wrote:

TuneIn and RadioBrowser.
—
Reply to this email directly, view it on GitHub
https://github.com/music-assistant/hass-music-assistant/issues/1635#issuecomment-1862176671,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHX7FNQGVFR3M5PL3AAUYJLYKEVCHAVCNFSM6AAAAAA7L3NQV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGE3TMNRXGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Sure the project is all open source. Marcel is always happy for PRs

next beta will include a stream_title attribute for this

Please report if this still an issue after beta79 is released

The stream_title attribute is visible in developers tools/states. But it is not visible on the card. Maybe the reason is that for a song from e.g. YT music these are the media_title and media_artist attributes. Maybe in the case of radio you also need to provide data there.

@OzGav Please reopen

This is now a question as to whether the HA player card is displaying the info you want. It would actually not be correct to just put the stream title into the media_artist attribute. I think you should approach the HA card developers and ask them to support the stream_title attribute. If you don't want to do that you could go with a hacky approach if you wanted https://community.home-assistant.io/t/extend-sensor-with-custom-attribute/315688

Maybe to media_title? After all, a stream is also media ;) Because music on YT is a stream and is filled with media_title.

But then it would be in the top line of the player and you wouldn't see the station name. I recommend you follow my advice in the post above.

I get why stream_ and media_ are different logically and therefore this is an issue to be solved on the media card side. Question I have is where are these attributes defined and are they standard? Are these HA media player object attributes and defined somewhere in the core code base?
Just looking to see all the different attributes available to be populated and used...
Seems to player card needs better logic based on stream vs radio vs other media types...

https://developers.home-assistant.io/docs/core/entity/media-player/
Obviously additional attributes can be used but I guess this is the starting point

Why not populate media_track with the current song title?

Maybe... I would have to ask as the radio station I looked at is sending ARTIST - TRACK. Might be possible to split that up?

Oh I see...media_track is meant to be the track number and numeric.
So where is stream_title attribute defined? Is that a music assistant attribute only? If so then the issue (as you've said above) is the media_player core object needs to add attributes that solve this OR we add a custom attribute to our local or build our own media_player card. I use mini media player card myself...

That's why I think that media_title should be sent from MA to HA, not stream_title.

You can create a feature request discussion about this and see how much traction you get. Changing the media title from what is currently shown may not suit everyone.

What can you do in this case?:
media_title = media_title + ' - ' + stream_title

A streamtitle as set by radio stations is not standardized. Some radio stations set it some others do not.
Some set it to "artist - song", some set it to "songtitle - artist" and again others use only the songtitle or radio station title. There is no standard for it. I have set it to the custom streamtitle attribute as a courtesy/service but I dont think it should be officially handled.
OR it must be handled as an optional metadata field for radio stations only.
In that case we could also consider using something like "station name" for the radio station name (what we currently set as title)

I hear you but I think the issue is that for (radio) streaming the media title is being populated with the stream (station) name instead of what is being playing. Since different sources send inconsistent meta data the media title may be different but at least it won't be the radio station name. I think there are other attributes to put the stream or radio station name. Then populate media title with what is currently being played.
Ultimately the core media player component needs to be updated to support streaming sources....

Streaming source name (radio station) should go into media_channel attribute. The current playing song regardless of how the source sends it should go in media_title attribute.


GitHub logo in SVG

To make it look better on HiDPI screens.

I signed it!
On Tue, Oct 18, 2016 at 11:24 AM googlebot<EMAIL_ADDRESS>wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).
📝 Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll
verify. Thanks.

If you've already signed a CLA, it's possible we don't have your
GitHub username or you're using a different email address. Check your
existing CLA data https://cla.developers.google.com/clas and verify
that your email is set on your git commits
https://help.github.com/articles/setting-your-email-in-git/.
If you signed the CLA as a corporation, please let us know the
company's name.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleChrome/browser-bug-search/pull/9#issuecomment-254454132,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGbOv8J66Gb2CFmwpS4-0X1ohrmto0Xks5q1JBLgaJpZM4KZj-L
.

Thanks. Can you also remove the unused image from the repo.

I did it: img/GitHub-Mark-Light-32px.png removed.

Thanks!


Dedupe positions in training data so we don't over-train on openings

I don't think this is actually an issue


Battery voltage sensing hardware modification suggestion

Hi
Your instructions for where to attach the battery sensing hardware could cause problems if the radio was not used for a long time.
Specifically the instruction to connect directly to the battery will cause the battery to be slowly flattened
the other directly to the positive of the lithium battery
I know that the current drain will only be 3.7 / 20k = 185uA, but over many weeks this will cause the battery to go completely flat and may cause it to no longer be usable.
e.g.  If the battery is 200mAH then 185uA would flatten it in 1081 hours = 45 days.
A better solution is connect the resistor divider to the switched side of the supply, then once the radio is turned off there will be no current drain from the battery and the radio could be unused for several years before the battery became naturally flat.
On my version of the ATS-20, which has the Nano daughter board, I found some unused pads in the middle of the PCB which have the switched battery voltage supplied to them, and I used one of these pads

Hi,
Yes, it is better to use the switched battery connection.
If you have the ATS-20+ version the resistors and connections are already on the PCB.
https://github.com/goshante/ats20_ats_ex/issues/19#issue-2528048684
73, Dave

Arrrghh ..  Sorry.
I didn't notice that other issue.
Not that it matters, but my PCB is different from the one shown in that issue.
I'll close this as its  duplicate.
PS.
I've also noticed another small annoyance.  When the radio is first turned on, the first screen date always displays the battery as 8%.
I think there is a redundant screen update when the radio turns on, which displays things before it should do.
I'm going to look at the code later and see if its fixable

LOL.
I just noticed that the battery thing is also mentioned in
https://github.com/goshante/ats20_ats_ex/issues/8

Looks like this repo is not actively monitored

Hi,
The initial low battery percentage is probably because the firmware does an average to minimise constant changing of the displayed reading.
I think the repo is monitored, but the author is busy on other commitments and does not plan updates at the moment.
73, Dave

OK.
It looks like after the splash screen is cleared, there are 2 updates to the display within about 100ms
I'm trying to build the code now to investigate
Re: Battery level averging
Normaly the initial battery average should be set to the instantaenous value on the ADC unless its known to be noisy.
Alternatively the splash screen is held for several seconds, and this would give plenty of time to average the ADC

BTW. Do you know if there is any way to get rid of the annoying multiple clicks when the radio is turned on ?

Hi,
Yes, the initial value could be set. I am not sure it does that.
You will also find that in practice the % will not fall below 17~18 percent, even if the battery is near empty (see link).
https://github.com/goshante/ats20_ats_ex/issues/7#issuecomment-2321081548
With respect to the audio clicks, it is a function of the SI4732 and audio amplifier.
During configuration of the SI4732, the DC level on the ROUT/LOUT changes which causes the clicks.
You will get the clicks when changing band, switching mode etc..
It is common on most of the radios that use this chip.
Some designs add an external circuit, but I have not investigated this further.


Docloader blockchain

This PR contains a Document Loader and Integration Test for Blockchain which:

Uses the Alchemy API which provides read access to the major blockchain projects
Currently only Ethereum Mainnet is used
Currently the load function returns a collection of NFTs at the provided contractAddress.

Future areas of extension:

Extend to additional blockchains (e.g. Polygon) and environments (e.g. testnets)
Extend to additional APIs beyond NFTs (e.g. Blockchain Transactions)

An ALCHEMY_API_KEY is required to access the Alchemy API.  This can be set as an environment variable.
I'm currently using this loader locally to analyze NFT attributes in a Q&A pipeline.  I figured this could be useful for others.
Please provide any feedback!

lets an example notebook! otherwise looks pretty good

Here's a sample notebook on my repo.  In this example, I ask about popular attributes for NFTs in the specified contract address (Bored Apes Yacht Club in this example).
A free api key from Alchemy  is required to run it. Sometimes the demo version works.


fix image previews

resolved https://github.com/CityOfNewYork/nyc-geo-metadata/commit/48e623df5d8b3a1714a1e58fa2da3b222e5afba6


Test immutables

THIS DOES NOT COMPILE YET.
Experiments with using immutables.org as a replacement for lombok.
Things to be aware of / fix / consider / etc:

OkHTTP has been replaced with the new JDK HTTP client
Audit log entries: Method 'whatever' cannot have own generic type parameters. Attribute accessors can only use enclosing type's type variables.
Switch to following JavaBeans conventions?
Fix missing JSR305 annotations in the Presence/Embed Builders
Fix missing JSR305 annotations on generated code so that IJ stops getting upset
I think I accidentally deleted requester from CatnipOptions?

ApplicationOwner/User, CreatedInvite/Invite

CreatedInvite is not actually used now, because of compile errors I didn't wanna fix
Lots of inner interfaces are hoisted up to their own classes
Generics are abused to hell and back to make immutables generate working code
this doesn't compile lol

cc @natanbc @KJP12

I think I accidentally deleted requester from CatnipOptions?
:star:

Some related thoughts:

I actually like using immutables way more than lombok, overall. Being able to create entities like this is really nice:@Modifiable
@CatnipEntity
@JsonDeserialize(as = WhateverImpl.class)
public interface Whatever {}

The entity code is a giant tangle that isn't friendly to using immutables as it currently is. The combination of some inheritance + the RequiresCatnip interface makes things like JSON de/serializing a complete mess (Hi CodecTest!). Pretty much everything in CodecTest failed the times I actually got this to compile; switching over would require either heavier abuse of generics than what we already do, or a complete reorganization of the entity inheritance hierarchy. Either one of those really feels like reason to make a 2.x release.
New HTTP client is :ok_hand:
Since the target branch of this PR is about getting rid of vert.x, it probably makes sense to switch to JavaBeans conventions for getters / setters. See #279
Crashing javac is not fun to debug. At all.

Looks good so far. Although, being able to autogen some parts is a bonus.
Also, how is JSON support looking for Vert.x's JSON, if we are even going to keep Vert.x. If we aren't, what will be replacing it?

Haven't made it that far yet. This branch still uses vert.x for the websocket / JSON / event loop parts

I will also make sure that my master (since I accidentally pushed fuck-vertx into it) is kept updated to reflect this branch, probably in a branch over.
Alright. We might as well make sure and go with a JSON library now while we're doing something compatible with JSON.

Honestly I think the main concern atm is the unbelievable mess that this made of the entity/inheritance tree. Having to split up / hoist classes, making RequiresCatnip and GuildEntity and I think GuildChannel take type parameters, inventing a bunch of new interfaces to avoid code duplication, ... It doesn't feel very nice to work with internally.

Yea, at its current scale, it kinda looks like it will be quite the mess, although viewing from a diff makes it quite messy. Lots of getters that weren't needed before are here now, so... :thinking: Lombok had that nice with just autogenerating those getters but seemed a bit limited with just all or one at a time. It's just a trade-off from switching annotation processors.

Take RequiresCatnip for example. If we don't implement that on a class, we can't inject Catnip instances into things. But immutables doesn't (seem to?) work right with how it's declared on master - a type T implementing RequiresCatnip will be generated with a T catnip(Catnip catnip) method, which doesn't correctly implement RequiresCatnip. Thus, we end up with a giant chain of generics all the way down through GuildChannel/GuildEntity/RequiresCatnip just to force it to generate methods correctly. This honestly feels like a pretty big step backwards from lombok, at least with how things are in their current form. This leads to horrors like what Invite/CreatedInvite and User/ApplicationOwner turned into.

Actually it's even worse than that, because a type T implementing RequiresCatnip will have a generated method TImpl catnip(Catnip catnip), meaning that we actually need to be aware of what the generated sources are for the interface declaration! :scream:

Make our own annotation processor. /s
Yea, that does make a mess with generics. An issue that seems like that it's hard to avoid. If there is a cleaner solution than tossing generics into it, lets use it.

Thinking about it, how feasible would it be to streamline the entity hierarchy. Of course, we can assume the impl will just be generated by Immutables, so, we could just remove those and be fine. Would streamlining the hierarchy help with the immutable issues?
Oh yea, there is the thing that channels can be updated on the fly, which Immutables may not be helpful in this case. If it will allow us to make special case mutables, then ignore this section. :man_shrugging:

Immutables lets you make mutable classes - @Modifiable vs. @Immutable, so I don't think that's much of a concern. The real issue is that I think it'll end up being a giant "rewrite" of the entity hierarchy and everything that it touches (permission checks, convenience methods, etc.)

Yes. If that is going to be a case, we should really take into measures to mostly negate that. Also, we may not need the asX() methods, granted inline casting ((X) y).z() isn't as pretty.
The hierarchy is also potentially going to break stuff, unlike switching out the HTTP client entirely, so, we should watch for that when we do a rewrite of the hierarchy if we have to.


Add --fix-type support

Add type property to all rules to support usage of eslint's --fix-type option
Fixes https://github.com/yannickcr/eslint-plugin-react/issues/2618
Successor of this PR: https://github.com/yannickcr/eslint-plugin-react/pull/2619

Rebased


oui-httpd download.c static urldecode conflicting types with libuhttpd3.9

Environment: (arm, openwrt 19.07)
Description:
v19.07/build_dir/target-arm-buildroot-linux-gnueabi_glibc/oui-httpd-git-2021.028.43331-1ff4a9b/download.c:30:13: error: conflicting types for 'urldecode'
30 | static bool urldecode(char *buf)
|             ^~~~~~~~~
In file included from /home/gqin/openwrt/v19.07/staging_dir/target-arm-buildroot-linux-gnueabi_glibc/usr/include/uhttpd/uhttpd.h:35

Hello jianhui
I meet conflict static local funcion urldecode in download.c with openwrt feeds package libuhttpd whose version is 3.9
dl url https://github.com/zhaojh329/libuhttpd
if something steps miss then result this issue. if yes, please comments. I just add one fix in my local first.
Thanks,
Qin Guang

Hello jianhui
I meet conflict static local funcion urldecode in download.c with openwrt feeds package libuhttpd whose version is 3.9
dl url https://github.com/zhaojh329/libuhttpd
if something steps miss then result this issue. if yes, please comments. I just add one fix in my local first.
Thanks,
Qin Guang

can you share the file libuhttpd3.9.0


Show/Hide level in code map

Issue Type: Feature Request
It would be nice if we could filter the level displayed in the code map and only show level 1 or only level 1 and 2.

Just amazing!

And, forgot to mentioned, the level visibility is controlled via codemap.maxNestingLevel: 3 (default).


Resume the connection after exception

After the exception in thrown the socket connection can no longer be properly closed nor resumed. See Close behavior.

@caucik Thanks for reporting, I understand where you're coming from. Throwing an exception from any listener is not allowed:

The listener callback function MUST NOT throw an Exception. The return value of the listener callback function will be ignored and has no effect, so for performance reasons you're recommended to not return any excessive data structures.
https://github.com/reactphp/event-loop#addreadstream

As an alternative, I would recommend either letting the uncaught exception crash your application like it appears to do right now or if you want to handle it, wrapping your event handler code in a try-catch-block like this:
$loop->addPeriodicTimer(3.0, function () {
    try {
        apiThatMightThrow();
    } catch (Exception $e) {
        // exception is non-fatal here, we simply log and wait for next iteration
        logException($e);
    }
});

I hope this helps :+1:


ionic tab - dynamic tab creation and removal - suggestion

Ionic version:  (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[X] 4.x
I'm submitting a ...  (check one with "x")
[X] bug report
[ ] feature request
If you open more than 3-4 popup in the android app, it won't render the last one. (some styles here and there, but no text on the label, no input text etc.), that's why i had to introduce the dynamic tab creation.
I must say it was horrific. There is some related bugs which throws null pointer exception on getActive call in the Tabs.js. I have changed the code a little bit, to check whether views exist at least.
NavControllerBase.prototype.getActive = function () {
        if (this._views) {
            return this._views[this._views.length - 1];
        }
    };

I think the following lines are wrong as a concept. You are forcing the developer to create a tabs instance also.
<ion-tabs #multi_tab selectedIndex="0" class="no_tab_bar" (ionChange)="onTabChange($event)">
		<ion-tab *ngFor="let t of tabs" [root]="t.component" [rootParams]="t.param"></ion-tab>
	</ion-tabs>

The tabs and the @ViewChild("multi_tab") tabRef: Tabs; are not in sync.
tabRef has been used for selecting a tab:
this.tabRef.select(1);
this.tabs will be updated, if you assign a new variable to it, which is also a pain, but lets talk about the real issue...
you can add tabs by pushing them.
this.tabs.push(...)
but you can remove tab by popping it.
this.tabs.pop()
or remove tabs by splice
let tabs = this.tabs.slice(); //clone
tabs.splice(1, 1);
this.tabs = tabs; //as mentioned earlier the assignment will trigger the update, anyway it will be missed

The only problem with it, that the tabRef won't be updated. (so a destroyed one remains in the list)
So next time, when you are adding a tab, which has been removed.
Noting happen...
At the moment i have made a workaround introducing a remove function in the Tabs.js (Tabs.d.ts)
    Tabs.prototype.remove = function(idx) {
        this._tabs.splice(idx);
        this._ids = idx - 1;
        return this.id + "-" + (this._ids);
    }

and when i'm splicing the tabs, i also remove manually from the tabRef.
this.tabRef.remove(id) - this one should go before the this tabs splicing.
You can call this.tabRef.add, thus you can remove the this.tabs, but the problem is, it has got so many parameters, that practically you cannot do it. (I suggest to the ionic team a GE Hammurabi style checker)
(Every function/constructor should contain max. 7 parameter.)
There are issues also raised related to the NavControllerBase.prototype.getActive, but it's left as "not able to reproduce". I was able to easily reproduce, so the guy, didn't even care about it.
There are 5-10 different ways to reproduce the nullpointer issue, i just showed one.
Pls. redisgn the tab a little bit, to make it less confusing.
It's not just your fault, it's the angular fault also, as i have been forced to use NgZone to make the this.tabs updated in the view, but if you separate the two variables tabRef and this.tabs from each other, what you suggest in the developer manuals, you are bumping into hundreds of similar bugs.
It should have been like:
<ion-tabs #multi_tab selectedIndex="0" class="no_tab_bar" (ionChange)="onTabChange($event)">
		<ion-tab *ngFor="let t of multi_tab._tabs" [root]="t.component" [rootParams]="t.param"></ion-tab>
	</ion-tabs>

With the latest approach the problem is that the Tabs.add function is not usable.

Hello! While we appreciate you opening an issue with us I am going to close this issue and ask that you open a new one that has the issue template filled out, please.
Specifically the following sections:

Current Behavior
Expected Behavior
Steps to Duplicate
Sample application that duplicates the issue

With all of the extraneous commentary above, it is impossible to determine what your exact issue is.
Thanks for using Ionic!


Use CurveTween instead of CurvedAnimation in docs and samples

The current animation docs teach users to use CurvedAnimation to specify the easing curve of a Tween-based animation. This API is less usable than CurveTween for this use case because it requires the user to declare the animation's controller on a different object after adding the modifying the timing curve of the Tween.
For example, let's say the user has this tween animation specified initially:
animation = new Tween(begin: 0.0, end: 300.0).animate(controller);

She now wants to make it a little more interesting by setting a non-linear easing curve. If she is using the CurvedAnimation, she'd do the following:
animation = new Tween(begin: 0.0, end: 300.0).animate(curve);
curve = new CurvedAnimation(parent: controller, curve: Curves.easeIn);

But with CurveTween, she don't have to change animate(controller) and won't need to deal with the parent property of the CurvedAnimation object:
animation = new Tween(begin: 0.0, end: 300.0).chain(
    new CurveTween(
        curve: Curves.easeIn,
        )
     ).animate(controller);

IMO, we should recommend using CurveTween over CurvedAnimation for this use case in our docs.
Cc: @Sfshaza @Hixie @HansMuller

Excellent feedback!

Issue moved to flutter/website #2003 via ZenHub


(Feature Request) Windows or macOS version

Hi
to improve this app popularity. Is this possible to have windows/macOS version for this app?

Duplicate of #32 - quickemu does not support it, maybe ask on that repo or use WSL

Closing this as a duplicate.


Call-fixup for function gets a data from the code that follows right after a call.

My question is regarding to the closed issue #484
I am working on binary file for 8051 CPU compiled by Keil. There is one of library functions ?C?LSTKXDATA which gets dword data from the code follows right after a call.
lab313ru noticed that "They've fixed it in ca44ae9." But in this (latest?) build: ghidra_9.1-BETA_DEV_20190923 it's not fixed.

As emtreere suggests "One possibilty is to inline the called function, which should cause flow to the correct location."  Unfortunately it's also doesn't help due to WARNING: Could not inline here.
The next suggestion from emteere is "The alternative is to create a general call-fixup that is added to the .cspec file to describe the implicit side-effects that happen for the particular call."
Could someone kindly provide me with an example of this call-fixup ? Because the SLEIGH Help do not give a single example and .cspec files in the folder Ghidra\Ghidra\Processors\ do not contains anything similar.

Please, provide exact steps you doing to specify the override.

I have added the new part at the end of "8051.cspec" and changed Casll Fixup for ?C?LSTKXDATA function to Call_2944:
<callfixup name="Call_2944">
  <pcode>
    <body><![CDATA[
      PC = inst_next + 4;
      goto [PC];
    ]]></body>
  </pcode>
</callfixup>

After that decompiled listing looks like:

The call of ?C?LSTKXDATA with dword data following by it should decompiled as:
DWORD_EXTMEM_012c = 2;

Unfortunately I could not create the right call-fixup for this kind of issue.

Why don't you want to use the Fallthrough override for that?

Fallthrough helps for assembly listing only, not affecting to the decompiler.

It's wrong. It does change the decompiler output too.

The result after Fallthrough:

Which version are you using?

I noted this in my question: ghidra_9.1-BETA_DEV_20190923

Have you tried to use the master build? I'm completely sure it was fixed in the master code.
Just checked: https://github.com/NationalSecurityAgency/ghidra/commit/ca44ae9a5970dfe6fa39d43f562c124ddeca6bd4 was committed after the 9.1 BETA DEV release.

Thank you for your support.
Could I download builded master code somewhere or should I build it myself?

Never saw any online builds. So, you should build it by yourself.
Because I would not trust somebody's build.
A short build instruction:

Download Gradle, add it to PATH
gradle --init-script gradle/support/fetchDependencies.gradle init
(in case of Windows) Download https://sourceforge.net/projects/winflexbison/ and add the directory to PATH, renaming win-flex, win-bison to flex, bison.
(in case of Linux) install flex and bison
gradle buildGhidra
Wait.

In case of Windows it also may require to upgrade Visual Studio solution (Ghidra\Features\PDB\src\pdb\pdb.vcxproj) to you VS version. You should also provide a correct VS path here:
GPL\vsconfig.gradle

Thanks a lot. I am trying to build right now. :-)

Latest build solves the problem using Fallthrough.
Thank you again!

And the next question regarding decompilation of this function ?C?LSTKXDATA, if you allow.
How could I set the function signature for this kind of variable in code? Because the "Storage Location" accepts constant address only.

And (xdata dword*)(FUN_CODE_012b + 1) also looks ugly instead of DWORD_EXTMEM_012c.
( xdata dword* is dword*, code dword* is dword* )

As I know: (xdata dword*)(FUN_CODE_012b + 1) is default for the THUMB arm.

This is binary of 8051 CPU, not ARM.
The meaning of ?C?LSTKXDATA library function is to get dword from code follows right after call and put it to the external memory. So, decompilation of this call in this case should looks like:
DWORD_EXTMEM_012c = 2;

The first argument is a pointer to dword in external memory and the second one is a pointer to dword in code.

I don't sure it will decompile the function as you want.

Not as I want, but as it should be :-)


Reorganize module hierarchy

This is the first attempt to try and make some sense of the module hierarchy. The overall goals were:

Users should need to only import Plutarch.Prelude and get everything they need
Plutarch itself shouldn't import Plutarch.Prelude, only things in the Plutarch.Internal.* namespace
plutarch-ledger-api and plutarch-testlib should rely minimally on imports from Plutarch.Internal.*

Additionally, there were a couple of changes:

All builtins should have a pbuiltinMyBuiltinName in Plutarch.Internal.Builtin, allowing them to be called without having to wonder what their signatures are.
Plutarch.* has been significantly emptied.
Plutarch.Internal.Builtin contains (most of) the types that we have to have because they're mandated by Plutus.
Some modules got merged.

This is not the final outcome, I just wanted to get something reviewed and merged, or the diffs would get too huge.

Will also resolve #735

Notes: this is closed because of nasty conflict


[BUG]: RuntimeError of "RANK" when running train.py of ResNet example on a single GPU

🐛 Describe the bug
I met a problem today when running with python train.py, as below,
/home/user/software/python/anaconda/anaconda3/envs/conda-general/bin/python /home/user/***/***
/ColossalAI-Examples/image/resnet/train.py
Traceback (most recent call last):
  File "/home/user/software/python/anaconda/anaconda3/envs/conda-general/lib/python3.10/site-packages/colossalai/initialize.py", line 210, in launch_from_torch
    rank = int(os.environ['RANK'])
  File "/home/user/software/python/anaconda/anaconda3/envs/conda-general/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'RANK'

During handling of the above exception, another exception occurred:

...

RuntimeError: Could not find 'RANK' in the torch environment, visit https://www.colossalai.org/ for more information on launching with torch

Is this error due to the absence of environment variable RANK in my Ubuntu?
Environment
Python: 3.10

Did you run the script with torchrun?

Did you run the script with torchrun?

No, I run it with python interpreter.

You should use colossalai run or torchrun, they will set your environment internally.

You should use colossalai run or torchrun, they will set your environment internally.

As I want to debug it on PyCharm, so I need to use python interpreter.
So, is there a way to do this?

I highly recommend you using pdb to debug your program, then you don't have to care about how to trigger the pycharm debug mode.

I am sorry to admit that I have never used pdb.
So, is there a equivalent way to use python instead of torchrun to run this script?

torchrun is using python but in a distributed manner. Distributed training requires launching multiple processes together, therefore, we need something to spawn the processes and set the environment for inter-process communication. That is what torchrun or colossalai run does. If we simply run the script with python train.py, the distributed communication network cannot be initialized.

torchrun is using python but in a distributed manner. Distributed training requires launching multiple processes together, therefore, we need something to spawn the processes and set the environment for inter-process communication. That is what torchrun or colossalai run does. If we simply run the script with python train.py, the distributed communication network cannot be initialized.

Thanks sincerely for your guide. I might understand this architecture like a distributed system.

Great, I think you might want to use the IDE debuggers for your code. However, for distributed code, it might be a bit tricky, a better way is to manually import pdb and insert break points.

Hi, @FrankLeeeee,
By the way, I heard that processes spawning and environment setting are operations which can be done in python. So, it might not be a problem to transform the behavior of torchrun or colossalai run into a equivalent python script.

Great, I think you might want to use the IDE debuggers for your code. However, for distributed code, it might be a bit tricky, a better way is to manually import pdb and insert break points.

Yeah, I have experienced that the distributed codes might crash in PyCharm's debug.

Yes, it can be done, but with some potential modifications to your code. A sample code is like below.
import torch.multiprocessing as mp
import colossalai

def run_dist(rank, world_size):
    colossalai.launch(config='./config.py', rank=rank, world_size=world_size, host='localhost', port=29500, backend='nccl')

    run_your_code()

def main():
    world_size = 4
    run_func = partial(run_dist, world_size=world_size)
    mp.spawn(run_func, nprocs=world_size)

if __name__ == '__main__':
    main()

Yes, it can be done, but with some potential modifications to your code. A sample code is like below.
import torch.multiprocessing as mp
import colossalai

def run_dist(rank, world_size):
    colossalai.launch(config='./config.py', rank=rank, world_size=world_size, host='localhost', port=29500, backend='nccl')

    run_your_code()

def main():
    world_size = 4
    run_func = partial(run_dist, world_size=world_size)
    mp.spawn(run_func, nprocs=world_size)

if __name__ == '__main__':
    main()

And it might be the last request: I would try exploring running the python train.py on PyCharm, if my following questions will be welcome to you.
Or, I might have to give up continuing the exploring on it, as I should admit that adapting our model to the colossalai is beyond my current knowledge and ability.
So, would you offer more help which I seek for to adapt the codes on PyCharm?

Sure, we welcome questions from the community.

Sure, we welcome questions from the community.

OK, I will update the information after further trials.

Sure, we welcome questions from the community.

Hi, @FrankLeeeee, if I want to run single-GPU training of ResNet example , is colossalai run essential or directly python train.py is enough?

I'm not familiar with PyCharm debug. But it's totally possible to use vscode to run the code in debug mode. For single-GPU distributed training, it behaves almost the same as running a single process script with python interpreter (You can set breakpoints and use the debug console to interact with the script). Just use the following launch.json template in vscode:

{
  "name": "train",
  "type": "python",
  "request": "launch",
  "module": "torch.distributed.run",  // This invokes torchrun
  "args": [
    // Command line args goes here
    "train.py",
  ],
  "console": "integratedTerminal",
  // Environment variables goes here.
  // "env": {"CUDA_LAUNCH_BLOCKING": "1"}
}

I'm not familiar with PyCharm debug. But it's totally possible to use vscode to run the code in debug mode. For single-GPU distributed training, it behaves almost the same as running a single process script with python interpreter (You can set breakpoints and use the debug console to interact with the script). Just use the following launch.json template in vscode:
{
  "name": "train",
  "type": "python",
  "request": "launch",
  "module": "torch.distributed.run",  // This invokes torchrun
  "args": [
    // Command line args goes here
    "train.py",
  ],
  "console": "integratedTerminal",
  // Environment variables goes here.
  // "env": {"CUDA_LAUNCH_BLOCKING": "1"}
}

Hi, @yuxinyuan,
By the way, I heard torch.distributed is designed for running on a single device with multiple GPUs.
So, would invoking torchrun bring any benefits to the training on a single GPU?

@songyuc I guess you mean torch.distributed.launch ? They serve the same purpose and I guess there's not much difference, but torch.distributed.launch is being deprecated in latest pytorch versions. So if you are using recent versions of pytorch, you should use torchrun.

Close due to inactivity.

Hi, @FrankLeeeee , I am still working on this issue, so, please help reopen it.
By the way, my question is, in ResNet example , colossalai launches as,
colossalai.launch_from_torch(config='./config.py')

So, it different from,

Yes, it can be done, but with some potential modifications to your code. A sample code is like below.
import torch.multiprocessing as mp
import colossalai

def run_dist(rank, world_size):
    colossalai.launch(config='./config.py', rank=rank, world_size=world_size, host='localhost', port=29500, backend='nccl')
    ......

Great, I think you might want to use the IDE debuggers for your code. However, for distributed code, it might be a bit tricky, a better way is to manually import pdb and insert break points.

I tried to "import pdb;breakpoint()". However, then I will get the problem "self.quitting: raise BdbQuit bdb.BdbQuit". Do you have an idea how to solve such issue. BTW, I am using the container to run colossal ai.

I highly recommend you using pdb to debug your program, then you don't have to care about how to trigger the pycharm debug mode.

I can't use pdb to debug the problem, which will have to BdbQuit issue as shown above. I wonder whether we could set up this environment that will allow me to step into "colossalai.launch_from_torch"??