Login error

Hi,
I got error KeyError: "name='csrftoken', domain=None, path=None",  when trying to login
instaloder ver : 4.9.5

Hi,
I have the same problem.

Yeah, me too.
This only happens with one account I have

+1

Same here!

I'm not getting this error. Can someone who is print the response text from the post request?
https://github.com/instaloader/instaloader/blob/385c6c8a353458b8e1f5d1eacd98a714a41e9fc0/instaloader/instaloadercontext.py#L222

I'm not getting this error. Can someone who is print the response text from the post request?
https://github.com/instaloader/instaloader/blob/385c6c8a353458b8e1f5d1eacd98a714a41e9fc0/instaloader/instaloadercontext.py#L222

I've printed the response like so:
resp_json = login.json()
print(resp_json, flush=True)

printing just the login variable will just give me status 200.
This is the output (redacted the userId):
{'user': True, 'userId': '3765*****', 'authenticated': True, 'oneTapPrompt': True, 'status': 'ok'}

One thing to note, today instagram kicked me out (not temp ban, just log out) and had to login again.
Apparently, the login is now different. I had to login with username and password (the usual) but then, they asked me to confirm my username and click next, after doing so, they gave me 3 options to choose for 2fa which I chose SMS and was able to login without issues. Not sure if it is relevant.

It is also good to note that instaloader does indeed login to instagram.
If I go to the login activity in instagram, I can see that instaloader was able to successfully login. It is just saving the session in a session file that this seems to be failing.

I have this problem with 2 different accounts. Experienced it in both version 4.9.3 and 4.9.5 - any solutions?

I have the same issue, but as @AyluinReymaer noted: Instaloader does log in.

Same issue

I think I have a workaround:

Use Firefox to login to Instagram
Use the script from here to copy the session file from Firefox to the Instaloader path.
Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

@evanmiltenburg thanks, it works!

I think I have a workaround:

Use Firefox to login to Instagram
Use the script from here to copy the session file from Firefox to the Instaloader path.
Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

Downloading the session file is no problem but this still doesn't work :

logging in this way seems to fail but doesn't throw any error. It's until you execute the command "instaloader -l USERNAME" that then the password is required (new ?), and then get the original error above
trying to log in in without session file will throw you the error right away

Same issue

I think I have a workaround:

Use Firefox to login to Instagram
Use the script from here to copy the session file from Firefox to the Instaloader path.
Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

Downloading the session file is no problem but this still doesn't work :
* logging in this way seems to fail but doesn't throw any error. It's until you execute the command "instaloader -l USERNAME" that then the password is required (new ?), and then get the original error above

* trying to log in without session file will throw you the error right away

Trying to follow this method I even get the following error:
Using cookies from C:\Users\MYUSERNAME/AppData/Roaming/Mozilla/Firefox/Profiles\SESSIONFILENAME.default-release\cookies.sqlite.
Not logged in. Are you logged in successfully in Firefox?

I am currently logged into Instagram. Not sure what else to do?
Wasn't there a browser plugin that could download Sessions/Cookies?

I think I have a workaround:
* Use Firefox to login to Instagram

* Use the script from [here](https://instaloader.github.io/troubleshooting.html#login-error) to copy the session file from Firefox to the Instaloader path.

* Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

This is how I fixed it:
HOW TO FIX KeyError: "name='csrftoken', domain=None, path=None" BUG
(assuming you have Instaloader already installed)
STEP 1:
Follow these steps:
(based on: https://instaloader.github.io/troubleshooting.html#login-error )
A. Download the script: Example 615_import_firefox_session.py
https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/615_import_firefox_session.py
B. Open Firefox and go to the "Privacy & Security" settings (about:preferences#privacy)
C. Change "History"-Settings from "Use custom settings for history" -> "Always use custom browsing mode" to "Remember history".

"Firefox must restart to disable this feature." -> "Restart Firefox now"
D. Open Firefox again and login to Instagram in Firefox with whatever account you then wish to use for Instaloaders.

STEP 2:
A. Open CMD as administrator and go to wherever you downloaded the script to
B. Execute python 615_import_firefox_session.py

Your Instagram-session should be imported now and usable!

STEP 3:
Problem solved, now execute any Instaloader command using the "--login=usernameFromSession" argument

Not working for me on MacOS. I can see the "csrftoken" in the sql file, but after running the script, the error shows up again.
I've also tried to do the login directly after the "instaloader.save_session_to_file(sessionfile)" in the script -> no difference, same error.

I think I have a workaround:
* Use Firefox to login to Instagram

* Use the script from [here](https://instaloader.github.io/troubleshooting.html#login-error) to copy the session file from Firefox to the Instaloader path.

* Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

This is how I fixed it:
HOW TO FIX KeyError: "name='csrftoken', domain=None, path=None" BUG (assuming you have Instaloader already installed)
STEP 1:
Follow these steps: (based on: https://instaloader.github.io/troubleshooting.html#login-error )
A. Download the script: Example 615_import_firefox_session.py https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/615_import_firefox_session.py B. Open Firefox and go to the "Privacy & Security" settings (about:preferences#privacy) C. Change "History"-Settings from "Use custom settings for history" -> "Always use custom browsing mode" to "Remember history".

"Firefox must restart to disable this feature." -> "Restart Firefox now"
D. Open Firefox again and login to Instagram in Firefox with whatever account you then wish to use for Instaloaders.

STEP 2:
A. Open CMD as administrator and go to wherever you downloaded the script to B. Execute python 615_import_firefox_session.py

Your Instagram-session should be imported now and usable!

STEP 3:
Problem solved, now execute any Instaloader command using the "--login=usernameFromSession" argument

Working one time and after that, problem coming back, have to do it again and again each time i want use instaloader :/

I think I have a workaround:
* Use Firefox to login to Instagram

* Use the script from [here](https://instaloader.github.io/troubleshooting.html#login-error) to copy the session file from Firefox to the Instaloader path.

* Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

This is how I fixed it:
HOW TO FIX KeyError: "name='csrftoken', domain=None, path=None" BUG (assuming you have Instaloader already installed)
STEP 1:
Follow these steps: (based on: https://instaloader.github.io/troubleshooting.html#login-error )
A. Download the script: Example 615_import_firefox_session.py https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/615_import_firefox_session.py B. Open Firefox and go to the "Privacy & Security" settings (about:preferences#privacy) C. Change "History"-Settings from "Use custom settings for history" -> "Always use custom browsing mode" to "Remember history".

"Firefox must restart to disable this feature." -> "Restart Firefox now"
D. Open Firefox again and login to Instagram in Firefox with whatever account you then wish to use for Instaloaders.

STEP 2:
A. Open CMD as administrator and go to wherever you downloaded the script to B. Execute python 615_import_firefox_session.py

Your Instagram-session should be imported now and usable!

STEP 3:
Problem solved, now execute any Instaloader command using the "--login=usernameFromSession" argument

Yup, same thing
No problem with configuring Firefox and getting the session file but :
instaloader --login=usernameFromSession
will still ask for a password.
Was logging in with a session file asking for a password before ? I don't recall so. Anyone ?
And even if you type it, it will result in the original error thrown away when trying to log in with credentials given :
KeyError: "name='csrftoken', domain=None, path=None"

@Zorpubis you can use -f switch instead of --login.
-f use session file instead of login/pass

I am preparing a file, to upload (which will be an explanation of the problems we are having, and why. But it is an unfinished version. Although enough to explain, certain things. The reason for not finishing it quickly, is that my English It is very bad, and use the Google Translate a lot, which is not very good either. And as I am Spanish, well ...
Greetings.

Replacing the default user agent with any from this list resolves this issue.
https://github.com/instaloader/instaloader/blob/ffb0aea5eb79b58ebad1eee57ad097bc2aba0689/instaloader/instaloadercontext.py#L34

Of you have a working version, can you perhaps submit a pull request?

On 8 Oct 2022, at 18:34, ILikeToCode @.***> wrote:

Replacing the default user agent with any from this list resolves this issue.
https://github.com/instaloader/instaloader/blob/ffb0aea5eb79b58ebad1eee57ad097bc2aba0689/instaloader/instaloadercontext.py#L34
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.

Many thanks for workarounds or corrections, I’ll try them and keep in touch ! Thanks for all this work !
Vincent,
Envoyé de mon SmartPhone .

On 8 Oct 2022, at 19:05, Emiel van Miltenburg @.***> wrote:

Of you have a working version, can you perhaps submit a pull request?

On 8 Oct 2022, at 18:34, ILikeToCode @.***> wrote:

Replacing the default user agent with any from this list resolves this issue.
https://github.com/instaloader/instaloader/blob/ffb0aea5eb79b58ebad1eee57ad097bc2aba0689/instaloader/instaloadercontext.py#L34
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.

I try : 615_import_firefox_session.py but it close instantly and does nothing.
Try with IDLE and red message appear :
"SystemExit: Instaloader not found.
pip install [--user] instaloader"
I use windows version.
replace by -f don't download in best quality.
And don't know what to do with the IL2C's fix (im a noob in coding ^^)
Someone can help me please ?

Thanks @IL2C! I have tested your code and can confirm logging in does not produce an error anymore. So for those of you who cannot wait to use Instaloader again:
pip uninstall instaloader
pip install git+https://github.com/IL2C/instaloader.git@login-fix

(Of course you should always double-check when you're installing code from someone else's repository. But at the time of posting the repo was exactly 1 commit ahead of the Instaloader main repo, with only the headers changed.)

While IL2C's patch fixes the error, it now produces another error: "Fatal error: Login error: Unexpected response, this might indicate a blocked IP."
 I'm successfully logging in with a browser on the same computer and same account, and other accounts also work from this IP.)

Could you share your code and the full stack trace?

While IL2C's patch fixes the error, it now produces another error: "Fatal error: Login error: Unexpected response, this might indicate a blocked IP."
 I'm successfully logging in with a browser on the same computer and same account, and other accounts also work from this IP.)

#1635

Same problem here. Created a new account on insta, did a few tests on chrome. Tried my script and i was required to login. With logging in on the usual way i have the error mentioned above. Had to install firefox to use the fix. Testing my script and it did work but half hour later my brand-new account was banned.
So terribly annoying..

Replacing the default user agent with any from this list resolves this issue.
https://github.com/instaloader/instaloader/blob/ffb0aea5eb79b58ebad1eee57ad097bc2aba0689/instaloader/instaloadercontext.py#L34
From what I've gathered, using a user agent that doesn't correlate Instagram software won't access the csrftoken cookie when sending the post request to login.
https://github.com/instaloader/instaloader/blob/3cc29a4ceb3ff4cd04a73dd4b20979b03128f454/instaloader/instaloadercontext.py#L222

this fixed the issue
pull up request submit
Thank you

Hi, same problem.
The solutions proposed above are not working for me. I've tried with 5 different accounts

I got 3 accounts banned today. Create a new one and try it with that. Seems that they getting flagged after wrong using

Thanks @IL2C! I have tested your code and can confirm logging in does not produce an error anymore. So for those of you who cannot wait to use Instaloader again:
pip uninstall instaloader
pip install git+https://github.com/IL2C/instaloader.git@login-fix

(Of course you should always double-check when you're installing code from someone else's repository. But at the time of posting the repo was exactly 1 commit ahead of the Instaloader main repo, with only the headers changed.)

This worked beautifully for me. Thanks.

Thanks @IL2C! I have tested your code and can confirm logging in does not produce an error anymore. So for those of you who cannot wait to use Instaloader again:
pip uninstall instaloader
pip install git+https://github.com/IL2C/instaloader.git@login-fix

(Of course you should always double-check when you're installing code from someone else's repository. But at the time of posting the repo was exactly 1 commit ahead of the Instaloader main repo, with only the headers changed.)

Works for me with no issues. Thanks!

Hello,
I have the same problem with 4.9.5 (windows standalone).
Do you have a solution for this binary version ?
Thanks,
Mathieu

Hello, I started receiving this error around 10 days ago after using instaloader for quite a while. The thing is I can't login to either of my instagram on any of my browsers, remote desktops et.c. I tried clearing cookies, trying different VPNs. The account are still operating as I can switch to them on my mobile device. But I can't login there in the browser version on the same device.

I think I have a workaround:
* Use Firefox to login to Instagram

* Use the script from [here](https://instaloader.github.io/troubleshooting.html#login-error) to copy the session file from Firefox to the Instaloader path.

* Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

This is how I fixed it:
HOW TO FIX KeyError: "name='csrftoken', domain=None, path=None" BUG (assuming you have Instaloader already installed)
STEP 1:
Follow these steps: (based on: https://instaloader.github.io/troubleshooting.html#login-error )
A. Download the script: Example 615_import_firefox_session.py https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/615_import_firefox_session.py B. Open Firefox and go to the "Privacy & Security" settings (about:preferences#privacy) C. Change "History"-Settings from "Use custom settings for history" -> "Always use custom browsing mode" to "Remember history".

"Firefox must restart to disable this feature." -> "Restart Firefox now"
D. Open Firefox again and login to Instagram in Firefox with whatever account you then wish to use for Instaloaders.

STEP 2:
A. Open CMD as administrator and go to wherever you downloaded the script to B. Execute python 615_import_firefox_session.py

Your Instagram-session should be imported now and usable!

STEP 3:
Problem solved, now execute any Instaloader command using the "--login=usernameFromSession" argument

I now encounter

I think I have a workaround:
* Use Firefox to login to Instagram

* Use the script from [here](https://instaloader.github.io/troubleshooting.html#login-error) to copy the session file from Firefox to the Instaloader path.

* Use the following code to log in:

USERNAME = "your_username"

import instaloader

L = instaloader.Instaloader()
L.load_session_from_file(USERNAME)

This is how I fixed it:
HOW TO FIX KeyError: "name='csrftoken', domain=None, path=None" BUG (assuming you have Instaloader already installed)
STEP 1:
Follow these steps: (based on: https://instaloader.github.io/troubleshooting.html#login-error )
A. Download the script: Example 615_import_firefox_session.py https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/615_import_firefox_session.py B. Open Firefox and go to the "Privacy & Security" settings (about:preferences#privacy) C. Change "History"-Settings from "Use custom settings for history" -> "Always use custom browsing mode" to "Remember history".

"Firefox must restart to disable this feature." -> "Restart Firefox now"
D. Open Firefox again and login to Instagram in Firefox with whatever account you then wish to use for Instaloaders.

STEP 2:
A. Open CMD as administrator and go to wherever you downloaded the script to B. Execute python 615_import_firefox_session.py

Your Instagram-session should be imported now and usable!

STEP 3:
Problem solved, now execute any Instaloader command using the "--login=usernameFromSession" argument

After doing this it worked for me, but when I tried switching things to normal I get CSRF token missing or incorrect in my browser, how can I solve it?

this solution doesn't work for me.
I have tried the other proposed solutions but they do not work

Thanks @IL2C! I have tested your code and can confirm logging in does not produce an error anymore. So for those of you who cannot wait to use Instaloader again:
pip uninstall instaloader
pip install git+https://github.com/IL2C/instaloader.git@login-fix

(Of course you should always double-check when you're installing code from someone else's repository. But at the time of posting the repo was exactly 1 commit ahead of the Instaloader main repo, with only the headers changed.)

this solution doesn't work for me.
I have tried the other proposed solutions but they do not work

The only thing the code does is changes the default user agent. You can override the user agent more easily with a command line parameter. In any case, I still get instant ban when I try to login using this code and/or the specified user agent.

Now Instagram kicks me out even though I use  @evanmiltenburg's work-around. Anyone else?

Fixed in v4.10.1 thanks to #2088.

Thank you I'll try !


Server Upgrade For Helper App

Mike does this still need to be completed?

Replaced by new tickets.


feat: add support for datadog tags

Description
Pass var.dd_tags as DD_TAGS environment variable to log forwarder function.
Motivation and Context
We want to tag logs with some general tags.
How Has This Been Tested?
We are using our fork with this feature in our environment.

hi @Vrtak-CZ - thanks for the PR! You can already pass in any of the environment variables that the forwarders support - you can see an example showing this here https://github.com/clowdhaus/terraform-aws-datadog-forwarders/blob/21467e2c7805c40c3a79dc1cc244e0cc371ede87/examples/complete/main.tf#L158
So you can set this variable and pass in your DD_TAGS and whatever key, value pairs you want to add.
Any of the environment variables can be passed to the forwarders in this manner so its quite flexible https://github.com/DataDog/datadog-serverless-functions/blob/b27b5918960953549c759b51ae3ea87911594c30/aws/logs_monitoring/settings.py#L100


Discord canary now supports wayland screensharing even with audio

title.

let's wait for this to be on the stable release channel first, afterwards I'll update the page.


[1.12] Bump Mesos to nightly 1.7.x 4a2949c

High-level description
This is a routine bump to the latest Mesos and mesos-modules.
Related JIRA Issues
Checklist for all PRs

[ ] Included a test which will fail if code is reverted but test is not. If there is no test please explain here:
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Changelog:
https://github.com/apache/mesos/compare/658e793c2bec7a6862875e78b0ae9f8afdef8248...4a2949cb075ab02086fd9e3065bcab83855bf9cc

[ ] Test Results: [link to CI job test results for component]

[ ] Code Coverage (if available): [link to code coverage report]

@mesosphere-mergebot bump-ee

@mesosphere-mergebot label Ready For Review

Hey. Please update "your line" in the CHANGES.md file: https://github.com/dcos/dcos/blob/1.12/CHANGES.md
It currently contains:
## DC/OS 1.12.4 (in development)

### Notable changes

* Updated to [Mesos 1.7.3-dev](https://github.com/apache/mesos/blob/0f4e34b4dfe98178a7d94f5242041b5958eb7a24/CHANGELOG).


Failed to convert ternary if (?) followed by object with more than 1 property ({a:b,c:d})

#js source:
a = (b ? {c:d,e:f} : g)
#js2coffee:
a = (if b then
c: d
e: f
else g)
#coffee -c:
Error: Parse error on line 3: Unexpected 'THEN
#expected js2coffee result:
a = (if b then (
c: d
e: f )
else g)

works now in 2.0


feat(pipelines): version 0

This PR contains the first version of pipelines in Capymoa.
Most importantly, it contains the classes Pipeline and Transformer.

Transformers serve as elements in a pipeline and can be used to perform data preprocessing, such as normalization, feature transformation etc.
Pipelines chain multiple trainsformers and a learner (classifier/regressor). Pipelines themselves serve as classifiers or regressors.

This version does not yet support changes in an instance's schema, e.g., due to feature selection. However, we will add this feature in the future.

Hi @heymarco, great work with the experimental version of the pipelines. I have expanded the jupyter notebook. We will continue working on this, but for now it is looking great, thanks again!


A question about running the test code on modern browsers

Reproduce Step

OS Version: macOS 10.12.5
modify karma.conf.js to test on Chrome / ChromeCanary / Safari / Firefox

Here is the similar test result on Chrome / ChromeCanary / Firefox

Chrome Version: 59.0.3071.115
Chrome Canary Version: 61.0.3147.0
Firefox Version: 54.0

Here is the test result on Safari

Safari Version: 10.1.1

Test code snippet:
    describe('#clearSelection', () => {
        it('should remove focus from target and text selection', () => {
            let clip = new ClipboardAction({
                emitter: new Emitter(),
                container: document.body,
                target: document.querySelector('#input')
            });

            clip.clearSelection();

            let selectedElem = document.activeElement;
            let selectedText = window.getSelection().toString();

            assert.equal(selectedElem, document.body);  //  here
            assert.equal(selectedText, ''); // delete above of the line ,this goes well
        });
    });

As you can see, document.activeElement produce different results when execute window.getSelection().removeAllRanges(), but selectedText all cleared.
Another thing is this code snippet:
    describe('#static isSupported', () => {
        it('should return the support of the given action', () => {
            assert.equal(Clipboard.isSupported('copy'), false);
            assert.equal(Clipboard.isSupported('cut'), false);
        });

        it('should return the support of the cut and copy actions', () => {
            assert.equal(Clipboard.isSupported(), false);
        });
    });

Can we expect these results to be true?

@zenorocha do you have any thoughts/comments?

Interesting, I'm open to a pull request that changes the output and adds Chrome for testing.

@charles8xu is this still an issue?

@Ruffio Sorry, I am not paying attention to this issue recently, maybe later.

Closing due to inactivity.


Add database/schema name to JDBC spans

Is your feature request related to a problem?
We are using multiple databases during one request. At the moment we cannot really distinguish which db span belongs to which database.
Describe the solution you'd like
java.sql.Connection provides getCatalog() and getSchema() which can be used to provide additional information for JDBC spans.
Additional context
We are using PostgreSQL and some of the databases are hosted on the same server, thus we cannot use the destination.*

I am unsure how the fields should be named

We're currently thinking about how to increase the granularity for backends a bit. Your request fits perfectly into that. The goal is to see different clusters of the same database on the service map, such as postgresql/customers, postgresql/orders. That information would be stored in destination.service.resource.
We already have the field db.instance but currently, it's not populated. Once we do populate it, we could set destination.service.resource to "${span.subtype}/${db.instance}". See also https://github.com/elastic/apm/pull/436
Some questions

How would you expect your different PostgreSQL database instances to be displayed on the service map.
How many databases/instances/clusters do you have in your environment?
What are you using the different DBs for? Could you give us some pseudonymized names? (ex. customers, orders). Totally fine if you don't want to share.
Where is that db information encoded? In the connection string? What does getCatalog() and getSchema() return in your case? Are these the expected values?

I prefer having each database as its own service on the service map (Similar to e.g. a HTTP service). Moreover I would like to see the database name in the "Span details" of the APM app (as our license does not include service maps)
6 clusters each with a different number of databases.
Most of the database have the same shape (let's call them "product") and are used for multiple tenancy of our application. The rest of the databases are either tied to a specific service (e.g. "kms" for our Key Management Service) or shared between all of our applications (e.g. "config" for configuration values).
either vie the JDBC connection string or via org.postgresql.ds.common.BaseDataSource#setDatabaseName. getCatalog() returns "product" and getSchema() returns "public". Yes, these are the values I expect.

I would like to add my two cents here too as - although we are using Oracle Database instead of PostGreSql - we have a similar requirement:

We are still on a gold license so I cannot say anything about the service map as I do not know what the service map would look like now
in our main usecase we currently have 6 database installations wilth multiple users(schemas)
The Usecase here is a datawarehouse like application where a central server connects to servers in different cities/countries to provide the data.  So the installations might be called Central, Canada, Austria, ... while each user contains data from different sources so the users might be called SAP, AWS, ....
either vie the JDBC connection string or via java.sql.Connection.setSchema (executes the oracle specific alter session set current_schema = ? in the background). getCatalog() returns null, getSchema() returns the schema I expect

Well, your 2 cents might have been well spent @wolframhaussig , as you just made obvious that the meaning of schema and catalog seems to be really implementation dependent (see related SO thread).

I think that we could have the following behavior to make it work on most databases without per-db specific behavior

catalog == null && schema == null --> instance = null
catalog != null && schema != null --> instance = "catalog/schema"
catalog != null && schema == null --> instance = "catalog"
catalog == null && schema != null --> instance = "schema"

Does it sounds like a good idea ?

Update: while it initially looked like a good idea, using Connection#getCatalog and Connection#getSchema is way more complicated than it sounds, thus we will keep getSchema out for now at least.

both catalog and schema can be changed at runtime during the lifetime of the connection, but not all DB/drivers support that.
capturing those properties should probably be done on a per-statement basis and at the time when the statement is created as calling statement.getConnection().getCatalog() will likely return the current state of the connection and not the state of the statement (changing connection catalog won't change the existing statements state).
support for both of those properties depends on each driver implementation and/or deployment setup, also database connection pools can make those unusable (always throw an exception, or return null).
getSchema is only supported for Java7+ JDBC drivers, thus some DB connection pools written for Java 6 or earlier throw exceptions when trying to call it.
we can't really query the current state before executing every DB statement, also that would be vendor-specific code.

Alternatively, we could also extend the JDBC URL parsing logic to guess the database name (or identifier) that could be used for the instance field, and then fallback to using Connection#getCatalog() only if we can't parse it.
@wolframhaussig in your case, you say that getCatalog() always return null:

is that assumption true for the whole lifecycle of the connection object ?
are you using any db connection pool or are you using the native DB connection ?
do you set the schema/catalog at runtime using setCatalog or setSchema ?
does the values that you get with getSchema are somehow reflected in the JDBC URL ? in which case having proper parsing for those would likely work for you ?

@SylvainJuge I just did a test using the connection metadata object using Oracle 12c jdbc library(this is not the newest version though so my answer could be slightly outdated). I am normally using a connection pool(apache dbcp2) but I did the following test on the native connection just to be sure:

getCatalogs() returns an empty ResultSet (Description: Get the catalog names available in this database.)
getCatalogSeparator() returns an empty string (Description: What's the separator between catalog and table name?)
getCatalogTerm() returns an empty string (Description: What's the database vendor's preferred term for "catalog"?)

Therefore, I assume that the catalog will never be set for Oracle databases.
As described in my first answer we set the schema mostly in the connection(username) but sometimes also using setSchema() which would not reflect in the url. But this is not a blocking from point in my point of view - just a nice to have feature - so processing the JDBC url would be fine by me.
Unfortunately, the JDBC url parsing has a drawback too - at least for Oracle:

Let's look at the following example urls:

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost1)(PORT=1501))(CONNECT_DATA=(SERVICE_NAME=accounting.munich.mycompany.de)))
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost1)(PORT=1501))(CONNECT_DATA=(SID=accounting)))
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost2)(PORT=1501))(CONNECT_DATA=(SERVICE_NAME=accounting.berlin.mycompany.de)))

I guess that you would parse the Servicename/SID from those connections and therefore handle all 3 of them as different databases but in fact, the first two connections point to the same database. In a defined environment this might not be a problem as a single developer/administrator might use either SID or service name all the time but in different teams this might not be true.

Another problem is that applications might not have the connection name configured within the jdbc connection string but rather in the Oracle tnsnames.ora:
Let's assume I have a tnsnames.ora with the following content:

accounting.munich.mycompany.de =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = myhost1)
      (PORT = 1501)
    )
    (CONNECT_DATA =
      (accounting.munich.mycompany.de)
    )
  )

Then I could use the following connection string to connect<EMAIL_ADDRESS>Pretty straight forward to parse, right? The difficulty here is that the name of the connection is a free text that is not necessarily the same as the database name. A realworld example where this would fail in our department:
accounting.munich.mycompany.de =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = myhost1-q)
      (PORT = 1501)
    )
    (CONNECT_DATA =
      (accounting-q.munich.mycompany.de)
    )
  )

Here, the production name in the tnsnames.ora points to the test system as we do weekly copies of the production system to our test system and we do not want to update all synonyms, functions, ... so we only point the tnsnames.ora file to the correct database.

Although we do not use the loadbalancing feature I want to add this problem here as another user of Elastic might run into this:
The following tnsnames.ora entry is a valid example of the loadbalancing feature:

accounting.mycompany.de=
(DESCRIPTION_LIST=
 (DESCRIPTION=
  (ADDRESS=...)
  (CONNECT_DATA=(SERVICE_NAME=accounting.munich.mycompany.de)))
 (DESCRIPTION=
  (ADDRESS=...)
  (CONNECT_DATA=(SERVICE_NAME=accounting.berlin.mycompany.de))))

Even if this entry would be given in the JDBC connection string - which service name would you use in Elastic?
The only true solution I could find so far is using SELECT * FROM global_name; to get the fully qualified name of the database without assumptions about anything but of course this would be an oracle specific logic.
I hope you understand what I mean and I hope that I am not overcomplicating things...

Thanks for this very detailed explanation. No you're not over-complicating things, the things themselves are complicated !
While there could be many levels Oracle-specific magic involved, APM agent always has the perspective from the application.

agent does not parse tnsnames.ora from filesystem, it just relies on the JDBC interface.
if there is any load-balancing or indirection involved on DB side, then it's transparent to the application

In a way, it would be more or less like using DNS names vs actual network IP addresses, if there is any indirection, the app is not aware of it.
One nice thing with relying on Connection#getCatalog or Connection#getSchema is that we just reuse what the DB provides us, which saves us from painful parsing in case of Oracle.
On the other side, we already have some Oracle parsing for port number & host name, thus adding service_name or sid to this should not be that hard.
Since this issue was about getCatalog and getSchema and it's already a good first step, thus if you don't mind I think we'd better move this discussion to a new issue to populate db.instance from JDBC url parsing as a way to complement the quick-win we have with getCatalog.

Since this issue was about getCatalog and getSchema and it's already a good first step, thus if you don't mind I think we'd better move this discussion to a new issue to populate db.instance from JDBC url parsing as a way to complement the quick-win we have with getCatalog.

Sure, no problem. Should I create a new one or are you able to split the existing discussion?

Here it is, I've just opened https://github.com/elastic/apm-agent-java/issues/1841


Bareflank as a VMM for hypervisor question

Greetings,
I hope that everyone is going well.
I have been on this hypervisor journey for a while now as it seems to mold and take on a form of it own as I move through the process.
What I am looking to do is to possibly port Bareflank (or similar) single instance VMM over to an x86_64 platform hypervisor and wanted to try and get some information as to how stable and challenging this porting might be?
I am also interested if the current version of Bareflank can run both 32- and 64-bit Guest OS's like Linux, Windows, etc..
The remaining question would also be as to how hard it might be to add in the RDP protocol (FreeRDP, rdesktop, or some other?
Of course the current hypervisor code does not have any type of xserver, but is currently the core small footprint hypervisor and components are being added as needed.
Any information would be greatly appreciated.
Cheers,

On an additional question, I was wondering how Bareflank (Boxy) can compare to the FreeBSD Bhyve or OSX port Xhyve since really these are currently the only ones that I am considering at the moment.

Sorry for the late reply here. Bareflank itself doesn't have any guest support. To get guest support you would need either Boxy, or wait for the newer MicroV project the finish. Both Boxy and MicroV can handle any fully enlightened guest operating system including 32bit or 64bit, but the upstream projects for now only support our custom version of Linux. You would have to add support for something else (we want to add unikernel support at some point as well). Windows guests is something that we want to get to, but that will take time. Also, Boxy itself doesn't have any virtual device support. That is something that MicroV will be working on over the next year or two. Once that is done, something like RDP should be possible. As for how we compare to Bhyve, please check out the description of MicroV as that should answer your question.
Thanks a ton for the interest in our project and let us know what you think.


No dates reported in Taylor_2017_tari

@teixeirak,
I am working on revamping the script that IDs duplicated measurements.
A lot of the data entered by @beckybanbury, loaded.from Taylor_2017_tari is showing up in S groups with data loaded.from, Luyssaert_2007_cbob_v3.3 because there is no dates in the Taylor_2017_tari database.
Filling dates in those records, would require going back to the original publications. But there is 125 different citation.ID so it would take quite some time.
Do you have any thoughts about that?
We could fill in the dates when the citation.ID and stand.age is the same as in Luyssaert_2007_cbob_v3.3 but there would still be some questionable cases.

All entries from Taylor_2017_tari have now been assigned dates, or assigned NI/NRA codes if appropriate based on the original publications.


[language][move] Remove the NameBeginArgsValue token

There is an ambiguity in the grammar for Move where a "<" character following a name in an expression term may be either a binary operator or the start of a list of type arguments. The Move parser does not currently have the capability to use name lookup to resolve this ambiguity based on the type of the name. Instead we have been relying on the presence of whitespace before the "<" character when it is used as a binary operator. This change continues that approach but does so by adding a targeted check for whitespace in the one place where the ambiguity exists, instead of the previous approach where the "<" character was "glued" to the name as a special NameBeginArgsValue token.
Motivation
Simplifying the Move parser.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
This changes the output for some parser errors, and I've updated the expected results. It would be good to have a more targeted test for the ambiguous case, but I haven't come up with one yet.

@bors-libra r=tnowacki

:pushpin: Commit 856f2aa has been approved by tnowacki

:hourglass: Testing commit 856f2aa6eac54c926c59c2a31b158b0c67c04aa5 with merge 626d3ecc61142b3000ace8fce3d32a6f67600ba1...

Let's get this in and then I can re-work the comma parsing PR to avoid the one issue that you had commented about. I'm also planning to follow up on this to try to provide better error diagnostics in the case where you omit a space before a less-than comparison operator.

:sunny: Test successful - checks-circle_commit_workflow
Approved by: tnowacki
Pushing 626d3ecc61142b3000ace8fce3d32a6f67600ba1 to master...


[WPROD-53] Add random principal ids for the Canister generated structs

This had names clashing if you create token canisters like in the example below
mod Token0 {
    #[derive(Clone, Canister)]
    pub struct Token0Canister {
        #[id]
        principal: Principal,
    }
}

mod Token1 {
    #[derive(Clone, Canister)]
    pub struct Token1Canister {
        #[id]
        principal: Principal,
    }
}

The only problem is that it forces the user of the canister to add rand dependency.


Any way to register service providers?

Hi there,
I'm working on a custom Laravel package, which uses quite a few other packages as dependencies. For instance, Livewire. When I try to run phpstan against my codebase it complains that classes haven't been registered in the container:
Note: Using configuration file /home/runner/work/laravel-custom/laravel-custom/phpstan.neon.dist.
Illuminate\Contracts\Container\BindingResolutionException thrown in /home/runner/work/laravel-custom/laravel-custom/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 838 while loading bootstrap file /home/runner/work/laravel-custom/laravel-custom/vendor/nunomaduro/larastan/bootstrap.php: Target class [livewire] does not exist.

Is there any way we can register additional service providers when developing a custom package?
Cheers,
E

Hello,
Do you have orchestra/testbench installed? If not, installing this will probably help you.

You may also want to see this.
https://github.com/szepeviktor/bazar/blob/467466c6300c4fb07eafebd020e13dd580c31e0a/.github/workflows/static-analysis.yml#L30-L32

@canvural I got orchestra/testbench installed, doesn't help.
@szepeviktor thanks, saw it, but this one is migration-related, isn't it?
I think the problem might be here: https://github.com/nunomaduro/larastan/blob/master/src/ApplicationResolver.php#L46
When we bootstrap the application for the package we only register the actual package service provider and the rest got ignored, hence we have an error related to missing bindings in the container...

I think enabling package auto-discovery in testbench should do the trick.

Hi, I have the same issue (except it's with the package nWidart/laravel-modules and not Livewire), and I don't know how to fix it 😞

I think enabling package auto-discovery in testbench should do the trick.

Are you sure ? I have tried but it still does not work :/
But it seems logical to me, the method ignorePackageDiscoveriesFrom must be overrided in the TestCase class, which phpstan does not load or include 🤔

I'm am very curious of your findings.

I think I have found a workaround using the testbench bootstrap file.
The issue is when you enter in the else at this point :
https://github.com/nunomaduro/larastan/blob/master/bootstrap.php#L9
So I have created a file bootstrap/app.php containing :
<?php

return include getcwd()."/vendor/orchestra/testbench-core/laravel/bootstrap/app.php";

And it seems to work now, I don't have the Target class ['modules'] does not exist error no more 🤷

Thank you.
@canvural Please consider automating this.

This is not an issue, but an possible improvement. Feel free to make a pull request with your proposal.


Add functionality from #10 to TS branch

Functionality was added to fix #10 in the main branch that doesn't exist in the TS branch. Rewrite it with TS functions.

It's throwing this error, right when I run node main

Sorry to pester you again :)
I am getting the following error.
I ran the old main.js it worked fine (not the table linking, but ran)
PS C:\Users\ DummyMe\Desktop\New folder> node main
Notion Export Path:
A
readline.js:1147
            throw err;
            ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.readdirSync (fs.js:950:10)
    at fixNotionExport (C:\Users\ DummyMe\Desktop\New folder\main.js:200:28)
    at C:\Users\ DummyMe\Desktop\New folder\main.js:239:17
    at Array.forEach (<anonymous>)
    at fixNotionExport (C:\Users\ DummyMe\Desktop\New folder\main.js:238:14)
    at C:\Users\ DummyMe\Desktop\New folder\main.js:11:17
    at Interface._onLine (readline.js:327:5)
    at Interface._line (readline.js:658:8)
    at Interface._ttyWrite (readline.js:1003:14)
    at ReadStream.onkeypress (readline.js:205:10) {
  code: 'ERR_INVALID_ARG_TYPE'
}

@dummifiedme That is a separate problem from this issue. I'll make a new issue for that.

Closing this issue because the TS branch is out of date and needs to be written from scratch.


Change print() to logging.info()

Replaced print statements with logging in various files to improve logging consistency, clarity, and debugging capabilities.
Updated logging statements in the following files:
cosipy/ts_map/fast_ts_fit.py
cosipy/ts_map/TSMap.py
cosipy/response/FullDetectorResponse.py
cosipy/spacecraftfile/SpacecraftFile.py
Addresses issue #48

Thanks @krishnatejavedula! I'm merging this


make detect better understand filetype

Hi,
Please check my fix.
Main differences with previous are:

Use not hardcoded chef-repo folder, because we use chef instead chef-repo folder
newer version will work even if you do following
cd chef-repo/cookbooks/mysql/
vim recipes/default.rb
because it checks full path to file ( expand('%:p'))

Thank you,
Alexey

@dougireton What do you think about this? Thanks for making this plugin BTW.

@korney4eg I'm not sure how, but I don't have any problem with the current ft detection. We use several different Chef orgs each with a different "chef repo" name, and also site-cookbooks instead of cookbooks and I'm not seeing any problems with the filetype detection in my statusline when checking just now.

I'm not using Vim anymore and I'm really not doing much Chef work anymore. Your best bet is to fork this repo. Sorry.


Support multiple @type values.

Describe the feature
This is a bit of a strange topic, but currently Google does not automatically connect the "Car" data type and the "Product" data type. Their recommendation is to use both:

Note: Currently Car is not supported automatically as a subtype of Product. So for now, you will need to include both Car and Product types if you would like to attach ratings to it and be eligible for the Search feature. For example in JSON-LD:
{
   "@context": "https://schema.org",
   "@type": ["Product", "Car"]
}

- Source: https://developers.google.com/search/docs/advanced/structured-data/product#product-properties

However, there is no option to specify the @type as multiple types (that I can find) using this library. I did notice the AdditionalTypes property, which is limited to only Uris and not strings like "Product". Theoretically, we could specify the Uri http://schema.org/Product. This supposes that Google will actually support this property instead of the format that is outlined in their documentation.
I looked through the docs for JSON-LD, and it is in fact possible to specify an array for @type, so I think it should be supported out of the box in this library. If there is currently a way to do it, let this issue serve as a request for documentation.
https://json-ld.org/spec/latest/json-ld/#example-14-specifying-multiple-types-for-a-node
Schema objects

https://schema.org/Thing

Thanks for the links. Its not currently supported today and I agree that we should add support. We'd accept a PR to that affect. I guess the Type property would become a string array, the custom serialization/deserialization logic would also need to add support for an array.
The difficulty is what happens on the consumer side. Perhaps we can use a Tuple to represent objects of this type.

While it probably works well enough for the example of "Product" and "Car", this would have some really weird issues when it comes to types that don't inherit from each other. A JSON representation can represent two completely distinct types at once but in C# we could only represent types within the same hierarchy. To attempt to do so, the only way would be to find a common base type - for your example it might be "Product" (losing typed-access to "Car" properties) but for others it might be "Thing".
We could probably get away with it more for serialization than deserialization. For the former, we don't use the @type property. For the latter, we use it as the only way to find the C# class we're deserializing to.

There is also an adjacent issue to this due to how we handle deserialization to a Values<T1, ...> type. We attempt to deserialize by the order of the types from right-to-left to find the right type. We'd potentially need to deserialize the same block of JSON into multiple types at once if one of the types isn't parent/grand parent type of the other.
For example with Values<IProduct, ICar>, we can deserialize ["Product", "Car"] to ICar because it inherits IProduct. If it were ["Product", "Organization"] going to Values<IProduct, IOrganization>, we'd need to deserialize it twice to capture all the data or otherwise identify the "primary" type we are deserializing to.

I imagine the @type being a OneOrMany, that change would have to be applied everywhere, but deserialization should attempt to find a best common denominator of all the types, so a product, car could automatically map to Car since it contains all the subtypes. If it fails to find a common heir, it would be an exception. To opt in to a complex type like something that is a car AND an helicopter (flying car? Bad example) you would have to create a parent type inheriting from both to deserialize.
I think the same parent type usage could be used to make serialization print multiple @types, just an empty class inheriting from Car with an overridden @type field.
Just a thought, sorry for formatting I am on mobile.

I imagine the @type being a OneOrMany, that change would have to be applied everywhere...

Yeah, that's what it would need to be to make part of the serialization/deserialization work out-of-the-box in terms of the raw value.

... but deserialization should still attempt to find a best common denominator of all the types (like it currently does), so a product, car could automatically map to Car since it contains all the subtypes. If it fails to find a common heir, it would be an exception.

Yep, that's where the more complex logic will need to be.

To opt in to a complex type like something that is a car AND an helicopter (flying car? Bad example) you would have to create a parent type inheriting from both to deserialize, and register it via DI.

Maybe though currently the library doesn't have any hooks into DI to be aware of something like that. We do some assembly scanning stuff but the primary purpose of that is to find Car from ICar or whatever other interface is on the model.
We definitely could move that direction and have our SchemaSerializer class be more configurable via creating instances of it rather than being a static class.

I think the same parent type usage could be used to make serialization print multiple @types, just an empty class inheriting from Car with an overridden @type field.
I think we could add priority to the types and use dependency injection to register the assorted types in order, so a subclass can get a first chance to match a type with multiple - so it could deserialize back to multiple.

Not entirely sure what you mean here. Like I know generally what the words mean but how what I understand you saying would all work together etc.
Maybe to summarise my previous comments and thoughts:
Serialization
We'll basically be fine supporting serialization with OneOrMany<string> of @type with little to change in the most basic approach as we don't actually care about the property for our serialization logic.
Deserialization
We heavily lean on @type to determine what our deserialization target is, especially because it can be of a more specific type than the property we are deserializing to (eg. deserializing a Car into a Values<IProduct>). When we don't or can't determine a C# type target, we basically try deserializing to each type in a Values<T, ... > until we have one that doesn't throw an exception.
With multiple @type values, we'd need to check the hierarchy of each against each other. So if it was Car, Product and Organization then this could be an example hierarchy:

Car -> Product -> Thing
Product -> Thing
Organization -> Thing

I guess first logic is whether they all share a common type at all. We can see it fairly clearly here that they all share Thing so that is great. Now, we'd need to check that this common type is allowed to be deserialized to our current property (eg. Values<string, int, IThing>). If the common type can't, we'd need to throw an exception. If it can, we could proceed with deserialization but only to the common type so we'd lose any data that isn't captured in this base type.
Now my example here is intentionally nonsense - it isn't going to be a Car/Product/Organization. The truth behind the example is that this problem could exist in any of the more deeply nested types like places or locations etc.
With your specific example, we have the potential to avoid the common type/data loss problem because Car inherits Product. So in addition to finding a common type, if the types represent a linear hierarchy (rather than something that branches to various sub types), we could find the most derived type and deserialize to that.
I'm not sure how best to approach this type of check though as comparing all types against all other types, comparing hierarchies seems like one of those obscure/complex programming problems.


Color Migration in 3.22.0

In the recent update, the background and onBackground colors were replaced with surface and onSurface, respectively. also the old surface and onSurface properties were replaced by surfaceContainer with options like Highest, High, Low, and Lowest. However, I noticed that there is no documented replacement for onSurface.
Could you please provide documentation on what the new equivalent for onsurface should be?
Thank you!

Hey @FaisalAlsawadi can you provide more context? Is there some code you could show that demonstrates how it was before 3.22 and how it looks now?

Is it this PR @QuncCccccc? https://github.com/flutter/flutter/pull/142654

Is it this PR @QuncCccccc? #142654

Yes, this PR introduces the new ColorScheme roles:) Thanks for linking it here!
@FaisalAlsawadi I don't think we added anything to replace surface and onSurface. The surfaceContainer-lowest/low/high/highest roles are used to replace the old elevation-based model. Previously(before the PR#142654 change), the background color of widgets was a combination of the surface color and another overlay color(surfaceTintColor) which depends on the elevation. These new surface-related colors provide us with more different "surface" options and make widgets' background color no longer tied to elevations to provide more flexibility:)

Hey @FaisalAlsawadi can you provide more context? Is there some code you could show that demonstrates how it was before 3.22 and how it looks now?

here's before the update:
import 'package:app/common/extensions/build_context_extensions.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: ScaffoldWithCenteredCard(),
    );
  }
}

class ScaffoldWithCenteredCard extends StatelessWidget {
  const ScaffoldWithCenteredCard({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: context.colorScheme.background,
      body: Center(
        child: Column(
          children: [
            Text(
              style: TextStyle(color: context.colorScheme.onBackground),
              'text',
            ),
            Card(
              color: context.colorScheme.surface,
              margin: const EdgeInsets.all(20),
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(15)),
              child: Padding(
                padding: const EdgeInsets.all(16.0),
                child: Text(
                  style: TextStyle(color: context.colorScheme.onSurface),
                  'text',
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

and here's after:
import 'package:app/common/extensions/build_context_extensions.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: ScaffoldWithCenteredCard(),
    );
  }
}

class ScaffoldWithCenteredCard extends StatelessWidget {
  const ScaffoldWithCenteredCard({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: context.colorScheme.surface,
      body: Center(
        child: Column(
          children: [
            Text(
              style: TextStyle(color: context.colorScheme.onSurface),
              'text',
            ),
            Card(
              color: context.colorScheme.surfaceContainerHighest,
              margin: const EdgeInsets.all(20),
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(15)),
              child: Padding(
                padding: const EdgeInsets.all(16.0),
                child: Text(
                  style: TextStyle(color: context.colorScheme.<what should this be isn't document so I'm not sure>),
                  'text',
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}


Yet another Apache Custom Log with i/o question

Greetings! I have an Apache Custom Log:
LogFormat "%h %v %l %u %{local}p %t \"%r\" \"%q\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O %D"

Would you kindly guide me how to create a goaccess log-fromat equivalent?
 Thank you!

Have you tried following the "Custom log/date format" section in the manual page? You can find it here.

This should do it:
goaccess access.log --log-format='%h %v %^[%d:%t %^] "%r" %^ %s %b "%R" "%u" %^ %^ %D' --date-format=%d/%b/%Y --time-format=%T

Thank you @mario-donnarumma and @allinurl .
Your response is much appreciated.


[Improvement]: Optimizing the RestAPI Efficiency for table detail

Search before asking

[X] I have searched in the issues and found no similar issues.

What would you like to be improved?
Improve the efficiency for table detail Rest API
1.catalogs/{catalog}/dbs/{db}/tables/{table}/detail
How should we improve?
Maybe we can avoid sync the external catalog to retrieve the table infor
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Subtasks
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

first we can remove the tableService.catalogExist(catalog) in TableController#getTableDetail

maybe we can remove the databaeExists(database) when loading table, use the result/exception in loadTable to do the logic.


[INVESTIGATE] Can't login with rocket.chat+ on server 0.61.0

Hello,
I have updated my server to 0.61.0 but i can't login to my server with android device

Your Rocket.Chat.Android app version: 1.1.0
Your Rocket.Chat server version: ####
Device model (or emulator) you're running with: Xiaomi Redmi 4A

Steps to reproduce:
i have installed the android app but i can't login to my server (v0.61.0), i receive response message : invalid server version.
I can login to my server with Web navigator

Best Regard

@abifrance Were you able to login in our Android app before updating the server?

I was not abling to connect with the old version (i don't remember the version), I have not updated it for 1 year.
I tested with another phone : Samsung Galaxy S2 Android 7 > Same problem : invalid server version
Can the problem come from the Nginx configuration?
Best Regard

@abifrance Yes, that's possible. What's your server URL?

https://exchange.groupe-abi-france.com/
Best Regard

@abifrance Looks like your version of Nginx is not supported to use WebSockets... can you tell me what version are you using?

I use this version
nginx version: nginx/1.10.3 (Ubuntu)
built with OpenSSL 1.0.2g  1 Mar 2016
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads
Best Regard

@abifrance When I try to simulate the upgrade (from HTTP to WebSocket) request:
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: exchange.groupe-abi-france.com" -H "Origin: exchange.groupe-abi-france.com" -H "Sec-WebSocket-Key: fVXESE8fjBMx8HheW0YlZQ==" -H "Sec-WebSocket-Version: 13" https://exchange.groupe-abi-france.com/websocket
HTTP/2 400
server: nginx
date: Tue, 20 Feb 2018 13:44:00 GMT

Not a valid websocket request

@geekgonecrazy Do you have any idea what could be on their end?

I'd have to see the config file.  Please feel free to shoot me a message on our community server: aaron.ogle. Make sure to link to this issue for context ;)

Issue is not valid anymore in version 2.0.0.


No request possible in an afterSave trigger

We can't make any request in an afterSave trigger.
Steps to reproduce

Declare an afterSave trigger in your Cloud Code
Include a request (fetch, get, first or find). For example:

Parse.Cloud.afterSave("ClassName", function(request) {
  var object = request.object;
  var otherObject = object.get("otherObject");
  console.log("otherObjectId=" + otherObject.id); // LOGGED
  return otherObject.fetch().then(function(otherObject) {
    console.log("field1=" + otherObject.get("field1")); // DOES NOT LOG ANYTHING
  });
});

Trigger it by saving the object

Expected Results
The request is successful or error and the object is saved
Actual Outcome
The object is saved
Environment Setup

Server

parse-dashboard version: 1.0.19
parse-server version: 2.2.24
Operating System: Ubuntu Server
Hardware: 1 Core CPU / 512MB RAM
Localhost or remote server?: Digital Ocean

Database

MongoDB version: 3.2.10
Storage engine: MongoRocks
Hardware: the same
Localhost or remote server?: Digital Ocean

Important: I use Nginx as a reverse proxy

Parse Dashboard: https://dashboard.mydomain.com --> http://localhost:4040/
Parse Server: https://api.mydomain.com --> http://localhost:1337/

Logs/Trace
0|parse-se | info: afterSave triggered for ClassName for user <userId>
I tried the legacy notation success / error and the Promise notation. Nothing is logged in response and the object is well saved.
The source code was working on Parse.com and there are no error in the Parse Server log file.
The same requests made in a beforeSave trigger are working.
Has anyone experienced the same thing?

afterSave never had response.success/response.error.

Hi Florent! This is not what I say here.
If I try to make a request inside an afterSave trigger, the request is not made or the Promise is never resolved.

Without code it's pretty tough to figure out what's wrong...

Indeed, I edited the issue to make things clearer.

you should probably add an error handler....
return otherObject.fetch().then(function(otherObject) {
    console.log("field1=" + otherObject.get("field1")); // DOES NOT LOG ANYTHING
 }, function(error) {
    console.log("SOMETHING WRONG HAPPENED!!!!!! (and I'm pretty sure I'll be called)")
});

Note that returning the promise will make the afterSave call wait for the promise to resolve.

I simplified the code to debug and to make it more easily understood. Sure there is an error handler in the whole trigger source code.
Maybe I should have written something like "I'm a bit too confident for an error handler" 😛 . Nothing is logged except otherObjectId like before.
I appreciate your last remark but how the promises works is pretty clear to me.
Florent, do you currently have projects with requests successfully made inside an afterSave trigger with the last version of Parse Server?

There are unit tests that confirm that this behaviour should be working. Otherwise, please create a unit test and test against the test suite.
also can you check that typeof otherObject.fetch === 'function' ?

Multiple requests that works with the latest version of parse-server:

```javascript
Parse.Cloud.afterSave("MyClass", (req, res) => {
var decision = req.object;
var user = null;
var opponent = null;

// Fetch current user
req.user.fetch().then( (currentUser) => {

    user = currentUser;
    var token = req.user.getSessionToken();
    var searchId = req.object.get('search').id;

    var searchQuery = new Parse.Query("Search");
    searchQuery.equalTo("objectId", searchId);

    // Find the associated search object
    searchQuery.first({ sessionToken: token }).then( (search) => {

        // Figure out the opponent
        var creatorId = search.get('creator').id;
        var participantId = search.get('participant').id;
        var opponentId = (creatorId == user.id) ? participantId : creatorId;

        var opponentQuery = new Parse.Query(Parse.User);
        opponentQuery.equalTo("objectId", opponentId);

        return opponentQuery.first();

    }).then( (currentOpponent) => {

        // Find the opponents corresponding decision
        opponent = currentOpponent;
        var decisionQuery = new Parse.Query("Decision");
        decisionQuery.equalTo("user", opponent);
        decisionQuery.equalTo("search", req.object.get('search'));
        decisionQuery.equalTo("item", req.object.get('item'));
        decisionQuery.equalTo("positive", true);

        return decisionQuery.first();

    }).then( (decision) => {

        // Do we have a match?
        if (decision !== undefined) {
            decision.set('seenByOpponent', true).save();

            // Send push to opponent
            var installationQuery = new Parse.Query(Parse.Installation);
            installationQuery.equalTo("user", opponent);

            var message = "MESSAGE";

            Parse.Push.send({
                where: installationQuery,
                data: {alert: message}
            }, {useMasterKey: true}).then(() => {
                res.success()
            }, (error) => {
                res.error(error);
            });

        } else {
            res.success();
        }
    });
});

});
</details>

Just quickly added that unit test:
  fit('test afterSave can fetch embedded objects', function(done) {
    var triggerTime = 0;
    // Register a mock afterSave hook
    Parse.Cloud.afterSave('GameScore', function(req, res) {
      var object = req.object;
      expect(object instanceof Parse.Object).toBeTruthy();
      return object.get('otherObject').fetch().then((other) => {
        console.log(other);
        triggerTime = 1;
      }, (err) => {
        console.error(err);
      });
    });

    var obj = new Parse.Object('GameScore');
    var obj2 = new Parse.Object('OtherObject');
    obj2.save().then(() => {
      obj.set('foo', 'bar');
      obj.set('otherObject', obj2);
      return obj.save();
    }).then(function() {
      // Make sure the checking has been triggered
      expect(triggerTime).toBe(1);
      done();
    }, function(error) {
      fail(error);
      done();
    });
  });

And that's correctly passing...

Ok, thanks guys. There should be something wrong by my side. I'll keep you updated.

This issue wasn't caused by Parser Server but by the PM2 process manager.
I followed the Digital Ocean migration guide (https://www.digitalocean.com/community/tutorials/how-to-migrate-a-parse-app-to-parse-server-on-ubuntu-14-04) where PM2 was watching for any change in the CWD directory to restart the process.
During restart, Parse Server was unreachable and was not logging anything.
To avoid that, we can totally disable this behaviour (watch: false) or just ignore the logs and hidden PM2 directories via ignore_watch.
Nota bene: in a Parse trigger, it seems that you don't even have to write a return statement to make it wait for a promise resolution. The behaviour is the same on Parse.com.


Completing incorrect phase/Unexpectedly Completing An Empty Stack

SpongeForge version: spongeforge-1.12.2-2838-7.1.7-RC3909

Forge version: 1.12.2 (7.1.6 / Forge <IP_ADDRESS>25)

Java version: 8

Operating System: Windows 10

Plugins : Minecraft, Minecraft Coder Pack, SpongeAPI, Sponge, CmdBuilder, CmdControl, DailyRewards, EconomyLite, GTS, GTS Reforged Bridge, ImpactorAPI, LuckPerms, Nations, Nucleus, PixelmonBroadcasts, PixelmonEconomyBridge, PlaceholderAPI, VirtualChest, WorldEdit

Mods : Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, Sponge, CustomNPCs, JourneyMap, LegendaryPlus, OfflineSkins, Pixel Extras, Pixelmon, SpongeForge, Wondertrade

Juste taking Minecraft basic Bone Meal, right clicking it on the ground to create grass and flowers
https://gist.github.com/MineTears/7db7da11f06f300705c6af43e52b2c80
Thanks for any help! If it has already been solved, I'm very sorry!

Able to reproduce on SF (latest) with no mod.
See https://github.com/SpongePowered/SpongeCommon/commit/1700f27c9c207bf614fd480f41130ddefe671f36#diff-a7c7c324f1b07aa0f22f9e1566a33ac4L54

Is there any fix yet? :c

This was fixed a few days ago, got missed in closing the issues.


cannot play video on NOKIA XR20 {"error": {"extra": 0, "what": -38}}

Bug
cannot play video on NOKIA XR20(works well on other devices) and get error {"error": {"extra": 0, "what": -38}}. Since there is no doc on the above error, can anyone help me?
Platform
Which player are you experiencing the problem on:

Android

Environment info

Library version: 5.2.1
Device: NOKIA XR20
Android version: 13
<Video
    source={require('local_video.mp4')}
    muted
    style={{
      position: 'absolute',
      top: 0,
      bottom: 0,
      left: 0,
      right: 0,
    }}
    resizeMode="cover"
    onEnd={onEnd}
    onError={error => {
      Alert.alert('video error', JSON.stringify(error), [
        {
          text: 'skip',
          onPress: onEnd,
          style: 'cancel',
        },
      ]);
    }}
  />

can you please detail error in logcat please ? I suspect a codec issue

sorry, I do not own the device now, so I cannot get the detail in logcat, but I get the error below.

according to https://developer.android.com/guide/topics/media/platform/supported-formats#video-formats,
H.264 AVC Main Profile should be supported

Do you keep too much video view in the dom ?
This issue happens when too many videos are played at the same time..

it is the only Video component in my app, I play the video when the app start,
below is a simplification of the code
isReady ? <Main /> : <Video
        source={source}
        muted
        style={styles.container}
        resizeMode="cover"
        onEnd={() => setReady(true)}
        onError={error => {
          Alert.alert('video error', JSON.stringify(error), [
            {
              text: 'skip',
              onPress: () => setReady(true),
              style: 'cancel',
            },
          ]);
        }}
      />

I get similar issues from a user on Xiaomi Pad 5.
{"error":{"extra":-2147479543,"what":1}}
{"error":{"extra":-38,"what":1}}
{"error":{"extra":0,"what":-38}}
The videos he is trying to load are all captured using react-native-vision-camera, so they are already recorded well through his camera app and he can successfully watch them if he manually finds them through the documents. But, when he tries to see them through our app, using this lib, we get above errors.
It's very strange, the numbers we get in the errors are not documented in the MediaPlayer docs:
https://developer.android.com/reference/android/media/MediaPlayer#constants_1
Any idea where to find what -38 or -2147479543 mean?

Did you try to switch on react native video v6.0.0 ?

Good idea, will try.
After update, when trying to display the captured video on my test, i get the following crash, any idea?
FATAL EXCEPTION: main
     Process: com.mypackage.name, PID: 13405
     java.lang.NoSuchMethodError: No static method registerReceiver(Landroid/content/Context;Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;I)Landroid/content/Intent; in class Landroidx/core/content/ContextCompat; or its super classes (declaration of 'androidx.core.content.ContextCompat' appears in /data/app/com.mypackage.nam-eFoTqysjT8guavhQQzwmjuQ==/base.apk)
     at com.brentvatne.receiver.AudioBecomingNoisyReceiver.setListener(AudioBecomingNoisyReceiver.java:30)
     at com.brentvatne.exoplayer.ReactExoplayerView.initializePlayerCore(ReactExoplayerView.java:635)
     at com.brentvatne.exoplayer.ReactExoplayerView.lambda$initializePlayer$6$com-brentvatne-exoplayer-ReactExoplayerView(ReactExoplayerView.java:547)
     at com.brentvatne.exoplayer.ReactExoplayerView$$ExternalSyntheticLambda11.run(Unknown Source:6)
     at android.os.Handler.handleCallback(Handler.java:883)
     at android.os.Handler.dispatchMessage(Handler.java:100)
     at android.os.Looper.loop(Looper.java:237)
     at android.app.ActivityThread.main(ActivityThread.java:8107)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
     ```

@freeboub User verified it works with 6.0.0-beta.0 :D

So let's close, thanks


您好，请问和 https://github.com/privateOmega/html-to-docx 的差一点在哪？

https://github.com/privateOmega/html-to-docx


Unable to write back to git helm values, key not found in the map

Describe the bug
When using the git writeback method, image updater is unable to create the file in the branch with the helm value updates with an error:
time="2024-10-01T15:32:52Z" level=error msg="Could not update application spec: failed to set image parameter name value: key component not found in the map" application=test
To Reproduce
Steps to reproduce the behavior:
Using the annotations:
        argocd-image-updater.argoproj.io/image-list: admin=somewhere.azurecr.io/admin:{{.branch}}
        argocd-image-updater.argoproj.io/update-strategy: digest
        argocd-image-updater.argoproj.io/admin.helm.image-name: component.admin.image.name
        argocd-image-updater.argoproj.io/admin.helm.image-tag: component.admin.image.tag
        argocd-image-updater.argoproj.io/write-back-method: git
        argocd-image-updater.argoproj.io/git-repository: git@github.com:company/admin.git
        argocd-image-updater.argoproj.io/write-back-target: 'helmvalues:/envs/{{.branch}}.yaml'
        argocd-image-updater.argoproj.io/git-branch: '{{.branch}}'

The Helm chart supports the structure:
component:
  admin:
    image:
      name: somewhere.azurecr.io/admin
      tag: dev

Expected behavior
A clear and concise description of what you expected to happen.
When a new image is added to the ACR, the updater creates a file /envs/{{.branch}}.yaml on the branch {{.branch}} with the newly set values, component.admin.image.name and component.admin.image.tag.
Additional context
Add any other context about the problem here.
It's worth noting, if I create the file manually at /envs/{{.branch}}.yaml and add the structure:
component:
  admin:
    image:
      name: somewhere.azurecr.io/admin
      tag: dev

The updates work.
Version
0.14.0
Logs
time="2024-10-01T15:32:52Z" level=error msg="Could not update application spec: failed to set image parameter name value: key component not found in the map" application=test
time="2024-10-01T15:32:52Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"
time="2024-10-01T15:33:43Z" level=info msg="configmap informer cancelled"
time="2024-10-01T15:33:43Z" level=info msg="secrets informer cancelled"

looks like https://github.com/argoproj-labs/argocd-image-updater/pull/838 should have already fixed it.
In release-0.14 (the version you're testing with), https://github.com/argoproj-labs/argocd-image-updater/blob/release-0.14/pkg/argocd/update.go#L573 is where the error was raised.
In the above PR, this part has been rewritten to handle non-existing file or keys.

looks like #838 should have already fixed it.
In release-0.14 (the version you're testing with), https://github.com/argoproj-labs/argocd-image-updater/blob/release-0.14/pkg/argocd/update.go#L573 is where the error was raised.
In the above PR, this part has been rewritten to handle non-existing file or keys.

Yes, I expect this to just create the file, but that doesn't seem to be the case. It can update an existing values file in the branch, but when pointing the config argocd-image-updater.argoproj.io/write-back-target to a file that doesn't exist just yet, it fails with the error above, time="2024-10-02T16:09:35Z" level=error msg="Could not update application spec: failed to set image parameter name value: key component not found in the map" application=test.

The fix is in the current master branch, and will be included in the next release (0.15.0).

The fix is in the current master branch, and will be included in the next release (0.15.0).

Great! Am I able to get those changes from the latest image tags, so I can test? Thanks!

there is a latest snapshot tag https://quay.io/repository/argoprojlabs/argocd-image-updater?tab=tags but no guarantee of quality. 0.15.0 is forthcoming.

Oh yeah, just something I can test with is great. Looking forward to 0.15.0!

Hello. Any updates on this? I've tried with 0.15.1 and I get a similar error. A difference in the describe case, is that in mine I use multiple images in the image-list annotation and 2 argocd application sources.

I tested write-back to helm value files with this sample https://github.com/chengfang/image-updater-examples/tree/main/write-helmvalues .  Can you take a look and suggest how to reproduce the problem with this app?

Thanks for the sample. Apparently the log was a bit misguiding. I had a bad config in one of the allow-tags regexp and didnt get any image tags, which  resulted to this error log.
Now I made it work with both creating a new file or writing on an existing one.


Selection of a directory for auxiliary build tools

I suggest to add the call of the macro "AC_CONFIG_AUX_DIR" to your configuration script so that auxiliary build tools will be stored in a dedicated directory.

Thanks. This is useful information for me.

Thanks for your small source code improvement.


fixed npm issues with a quick workaround

updated readme, and removed the issue from package.json
quick workaround and added steps but it fixes the issue for users who
just want to test this quick and easy

Hi, thanks for creating a pull request. I ended up modifying package.json slightly instead. It now takes the latest master version of node-opencv instead of 3.0.0. Can you try to see if this works for you?

It works!
It's still throwing an error,
node-pre-gyp ERR! Tried to download: https://node-opencv.s3.amazonaws.com/opencv/v5.0.0/Release/node-v47-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v47 ABI) (falling back to source compile with node-gyp)
But I got this before also. Thanks for such a fast workaround!

No problem! Thanks for bringing the issue up!


Extensions for kubectl plugins

Current Behavior
I want to contribute to the kubectl plugin that has been discussed.
I think there are two kubectl plugins needed. I can help! 👋

Contributor Guides and Handbook

🛠 Meshery Build & Release Strategy
📚 Instructions for contributing to documentation

Meshery documentation site and source

🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

@ritzorama, That’s awesome! Please send a message in Slack, and we’ll catch up with you there.

Three new :meshery: repos created today:
https://github.com/meshery/helm-kanvas-snapshot
https://github.com/meshery/kubectl-kanvas-snapshot
https://github.com/meshery/kubectl-meshsync-snapshot

Thank you very much, @Ashparshp 👏 I'm in and the community is amazing (just like your help here).

I'm adding my stars to these repos now! ⭐


Update Rollup dependencies versions

Right now:
    "rollup": "^0.64.1",
    "rollup-plugin-filesize": "^4.0.1",
    "rollup-plugin-terser": "^1.0.1",

Lastest:
    "rollup": "^1.17.0",
    "rollup-plugin-filesize": "^6.1.1",
    "rollup-plugin-terser": "^5.1.1",

Closed by #980.


Relayer CLI for MsgConnectionOpenConfirm

Crate
relayer-cli and probably relayer
Proposal
Implement support for the following command:
relayer tx raw conn-confirm <to-chain-B> <remote-chain-A> <conn-id-on-A>

sends request to local client for chain-A to retrieve latest header header_A with height ha
makes the following queries to chain-A at height ha-1:
- the connection with id conn-id-on-A with proof, stores results in connection and ack_proof
sends a MsgUpdateState to chain-A with:

        client_id = client-A-on-B,
        header = header_A,
        signer = get_account(to-chain-B)

sends a MsgConnectionOpenAck to chain-A with:

        connection_id = connection.counterparty_connection_id,
        ack_proof
        proofs_height=ha,
        signer = get_account(to-chain-B)

Note: get_... are functions that retrieve information from the relayer configuration.

For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate milestone (priority) applied
[ ] Appropriate contributors tagged
[ ] Contributor assigned/self-assigned

Believe this was done in #397


Question: How do I use FASTER (C++) headers without filename collisions?

How do I use FASTER (C++) headers without filename collisions?
Sorry if this is a silly question. I have compiled the C++ version using CMake per the build directions. Now I'm working on integrating it with my project. The samples include FASTER headers as follows:
#include "core/faster.h"
#include "core/utility.h"
#include "device/file_system_disk.h"

Which is OK, but then "faster.h" includes a bunch of internal headers like "alloc.h" and "record.h" with no "core" or "device" prefix, as follows:
#include "alloc.h"
#include "record.h"
#include "guid.h"

Now surely this means I need the "core" and "device" header directories in my include paths? Surely the generic names like "alloc" and "record" have a strong risk of having the same name as another library or the same name as my own headers? Am I missing something obvious? Is this by design? The build system in my own project is Visual Studio C++, the intricacies of CMake are somewhat foreign to me.
Thanks sincerely in advance for any guidance you can provide.

See this issue and PR, perhaps something similar would work?

https://github.com/microsoft/FASTER/issues/266
https://github.com/microsoft/FASTER/pull/276

Thank you @badrishc those linked issues are relevant, but not quite the same issue. In this case I'm concerned about the collision of the header filename rather than the symbol. If I have "guid.h" in my own code (I don't, this is hyperthetical), I won't be able to successfully compile against FASTER. The compiler will resolve one or the other header but not both.

Any thoughts @dongx-psu ?

I would put all faster header files under a directory called faster. And then include the upper-level directory as the root include directory. In this case, it forces you to add something like faster/core/faster.h in your program

Thank you @dongx-psu .
If I could include faster/core/faster.h as you suggest, that would be ideal.
I was surprised to find that when I #include "faster/core/faster.h", then guid.h on line 27 at least is correctly resolved.
The first error I encounter is this one:
1>persistent_memory_malloc.h(13,10): fatal error C1083: Cannot open include file: 'device/file_system_disk.h': No such file or directory
That leads me to conclude that I still need to have the root faster directory in my include paths, and then I can include core/faster.h, but at least I don't need the core, device, etc sub-directories in my include paths. That's something, and that really resolves the larger fraction of my concern overall. Thank you for your guidance. Happy to close the ticket here if you're also happy.

I think it can be closed.


[MINOR] refactor: Fix tez workflow and checkstyle

What changes were proposed in this pull request?
Fix tez workflow
Why are the changes needed?
For now, workflow does not build tez client.

Codecov Report

Merging #911 (bcc0970) into master (b08efa3) will increase coverage by 1.82%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #911      +/-   ##
============================================
+ Coverage     55.30%   57.13%   +1.82%
+ Complexity     2202     2191      -11
============================================
  Files           333      312      -21
  Lines         16448    14054    -2394
  Branches       1308     1302       -6
============================================
- Hits           9097     8030    -1067
+ Misses         6838     5590    -1248
+ Partials        513      434      -79

Impacted Files
Coverage Δ

...c/main/java/org/apache/tez/common/RssTezUtils.java
30.63% <0.00%> (-0.18%)
:arrow_down:

... and 24 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zhengchenyu Could you fix spotbug issues?


Issue with Warn.js

https://gyazo.com/9488560bcb300394df5e1f64f096602e
See Image :)

can't reproduce

can't reproduce


Bug: Can't fill in radio button on Your hero pool page

This is a bug report.
I'm on Windows 10 on Chrome.
Bug: When I'm the hero pool page, I try to click a radio button to indicate my rank with a particular hero, but the radio button does not 'fill in'.
I think this occurs when you use a separate web page to log out of Battle.net. If that's the case, I'm okay with fixing this bug sometime after version 1.
Steps to recreate this bug:
Go to https://overwatch-team-comps.herokuapp.com/.
Click Sign in with Battle.net.
Open a new web browser.
Go to Battle.net in the new web browser and sign out.
In the original browser, click on Your hero pool.
Try to click a radio button. It does not fill in.
Update: I can't seem to replicate the bug anymore. I tried a couple of other combinations of steps like closing all browser windows and stuff. I'll close the issue, but at least we'll have it for documentation purposes.

Update: I can't seem to replicate the bug anymore. I tried a couple of other combinations of steps like closing all browser windows and stuff. I'll close the issue, but at least we'll have it for documentation purposes.


Predict of mx.mod.Module api problem 2

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io
Description
I have the question about the predict result.
When I make the inference program, I must know the model accuracy about image classification.
In my job, I have the two classification(0 or 1 labels).
So, I use the im2rec tool to make the .rec and .lst file.

39	1.000000	1/CenterOrg1_000_2_B_b04dfe80-d9f5-4928-9ac0-550fc5d7688a_ScanImgORG.jpg
24	1.000000	1/CenterOrg1_000_2_A_16e83b7c-9daf-4393-9a62-41a2a65125ce_ScanImgORG.jpg
28	1.000000	1/CenterOrg1_000_2_A_88d71f72-9858-41f3-bd70-8b12a40f009d_ScanImgORG.jpg
30	1.000000	1/CenterOrg1_000_2_A_ec1ed52c-c8ea-4cae-967c-25de87720416_ScanImgORG.jpg
21	1.000000	1/CenterOrg1_000_1_B_020e5e40-2611-4548-ae57-78da77ddcbca_ScanImgORG.jpg
10	0.000000	0/CenterOrg0_0_155_B_ebea1c1c-560f-4512-8ce2-58c9c8fbd7fa_ScanImgORG.jpg
34	1.000000	1/CenterOrg1_000_2_B_6cb8cdd4-4345-488b-a195-1c1b3692acb0_ScanImgORG.jpg

and, use mx.image.ImageIter api to catch the data.
Then, I compare the data.label and predict result label to calculate acc.
And I run the same code in every times, but the acc is not same.

Infernce Accuracy: 0.45
Infernce Accuracy: 0.5
Infernce Accuracy: 0.475

So, I gusset the predict api catch the image data that wasn't the same order with the ImageIter.
How can I solve the problem to calculate the Infernce Accuracy?

@Ian8888, where are you getting the model you are using from? Is it downloaded as symbol and param files or are you training it yourself as part of the code you are running?
If possible, can you share the code that you are running?
@mxnet-label-bot add [Module, Pending Requester Info]


AttributeError: module 'langflow.base.models.openai_constants' has no attribute 'MODEL_NAMES'

Bug Description
AttributeError: module 'langflow.base.models.openai_constants' has no attribute 'MODEL_NAMES'
Reproduction
Run Basic Hello flow on local Langflow

Expected behavior
Solution
Who can help?
No response
Operating System
MacOS
Langflow Version
1.0.13
Python Version
3.10
Screenshot
No response
Flow File
No response

Hey @telebash, did you try update the component and/or update the langflow?

@anovazzi1
Hey, Yes, I've tried installing different versions. There are always some mistakes

I'm sorry to hear that. Unfortunately, we have no perfect version, but this issue you addressed should be fixed on the v1.0.14

@telebash
I just tried on 1.0.14, and it worked. When the component has a warning mark ⚠, click on it to update before running the flow.
Let me know if anything comes up.

@anovazzi1 @carlosrcoelho Thanks!


Traverse dependencies and dev dependencies separately

Note: not quite ready, still verifying correctness
Fixes #15080
Currently, flutter update-packages --force-upgrade will combine the dependencies and dev_dependencies sections of a pubspec before retrieving the set of transitive dependencies.  All of the resulting deps are then added to the dev dependency section.
This behavior is not quite correct, as documented in #14992.  The transitive dependencies of the package direct dependencies must be included in the dependencies section.  For example, the main flutter package (currently) has a dep on http.  We should expect the pubspec to look something like this:
dependencies:
  http: 0.11.3+16
  ...
  async: 2.0.6 # TRANSITIVE DEPENDENCY
  charcode: 1.1.1 # TRANSITIVE DEPENDENCY
  http_parser: 3.1.1 # TRANSITIVE DEPENDENCY
  path: 1.5.1 # TRANSITIVE DEPENDENCY
  source_span: 1.4.0 # TRANSITIVE DEPENDENCY
  string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY

Instead  It looks something like the following, with the transitive deps of package:http added in dev_dependencies:
dependencies:
  http: 0.11.3+16
  ...

dev_dependencies:
  async: 2.0.6 # TRANSITIVE DEPENDENCY
  charcode: 1.1.1 # TRANSITIVE DEPENDENCY
  http_parser: 3.1.1 # TRANSITIVE DEPENDENCY
  path: 1.5.1 # TRANSITIVE DEPENDENCY
  source_span: 1.4.0 # TRANSITIVE DEPENDENCY
  string_scanner: 1.0.2 # TRANSITIVE DEPENDENCY

To correct this process, I've updated the flutter update-packages command to separate the dependencies and dev_dependenices, then to do two traversals of the resulting transitive deps.  The same seen set is used between both traversals to prevent repeats, since any package in the dependencies section is implicitly a dev dependency too.  Furthermore, when determining the dependencies of a PubspecYaml, we need to distinguish between regular and dev deps too
I also ran the updated command on the flutter repos

The use of package:intl_translation seems to be adding a lot of unfortunate dependencies

While you're here, can you do me a favour and change the text "TRANSITIVE DEPENDENCY" to something like THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade ? It might reduce the number of times that people try to manually update these lines.

For super duper bonus points (not at all required for this PR unless you feel motivated to do it), what you could do to REALLY stop people from hand-editing these is include a value at the bottom of each list which is some sort of hash of the values above, along with a comment saying to run the script to update it, and then add a test that opens each pubspec.yaml and verifies that the hashes match the currently listed dependencies.

This is fantastic, thanks.
I didn't check the comments that aren't mentioned in the diff, but I recommend doing one last scan through the file to make sure all the comments still make sense.

@Hixie I added an initial implementation of a simple checksum over the package names + versions, and updated the magic string.  Also addressed comment comments.


zipAll proposal

Zip currently only works for arrays of the same size, which is sometimes fine but sometimes you want to zip up uneven arrays and keep the parts that were uneven. How about a function like:
const zipWithAll = <A, B, C>(
  fa: ReadonlyArray<A>,
  fb: ReadonlyArray<B>,
  f: (a: O.Option<A>, b: O.Option<B>) => C): ReadonlyArray<C> => {
  const fc: Array<C> = []
  const len = Math.max(fa.length, fb.length)
  for (let i = 0; i < len; i++) {
    fc[i] = f(i < fa.length ? O.some(fa[i]) : O.none, i < fb.length ? O.some(fb[i]) : O.none)
  }
  return fc
}

// zip but just gives arrays of size 1 when its uneven
const zipAll = <A, B, C>(fa: ReadonlyArray<A>, fb: ReadonlyArray<B>) =>
  zipWithAll(fa, fb, (a, b) => A.compact<(A|B)>([a, b]))

zipAll([1,2,3], [4,5])
// => [[1,4], [2, 5], [3]]

One issue I have with this right now is that the return type becomes widened to accommodate for the different shape of the final item.
We could return something like this to keep them distinct: [Array<[A, B]>, Array<A | B>]
Or if we're willing to provide monoid instances we can ditch the union and match the return type of zip (Array<[A, B]>).
Thoughts?

Hmm, it's a good point - A.compact does widen the type a bit. zipWithAll is general enough that I think you could go a bunch of ways with it - like if you wanted to keep the tuples you might do
const zipAll = <A, B, C>(fa: ReadonlyArray<A>, fb: ReadonlyArray<B>): ([A, B] | [A] | [B])[] =>
    zipWithAll(fa, fb, (a, b) =>
    O.isSome(a) && O.isSome(b) ? [O1.unsafeUnwrap(a), O1.unsafeUnwrap(b)] :
    O.isSome(a) ? [O1.unsafeUnwrap(a)] :
    [O1.unsafeUnwrap(b)])

or we could keep the Option info itself like
const zipAll = <A, B>(fa: ReadonlyArray<A>, fb: ReadonlyArray<B>) : [O.Option<A>, O.Option<B>][] =>
    zipWithAll(fa, fb, (a, b) => [a,b])

I'm not sure though, it would depend on the use case. I can see how a user might want any of those depending on what they needed the function for.
I'm not sure I follow about monoid instances, can you show me an example of what you mean?

The output of zipping here is generally [A, B] except when there's an imbalance in the number of items, in which case you have a series of trailing [A] or [B]. If a monoid for each of A and B was provided then we could maintain the [A, B] return type.
So the question is: Is it plausible and useful to provide monoids instances? Or do we want to know which items were "dangling"?

I think I see, do you mean provide an identity to balance out the array? I'd rather not lose info, we should be able to tell which ones are dangling. I'm ok with having a union type, it seems like the least bad option

Yeah that's what I was getting at.
Another idea per here would be to represent everything with These: Array<These<A, B>>
I'm feeling like that might be a happy middle ground between retaining information and ergonomics.

Right on, yeah this would work
const zipAll = <A, B>(fa: ReadonlyArray<A>, fb: ReadonlyArray<B>) : T.These<A, B>[]  =>
    zipWithAll(fa, fb, (a, b) => O1.unsafeUnwrap(T.fromOptions(a,b)))

https://github.com/samhh/fp-ts-std/commit/6dfad7c56f23cfc15f975ae8d21dff41fe6e2b04


Improve install instructions

Description
The install instructions in the README are currently very basic. Update #69 or be inspired by it to improve the instructions now that packages have changed.

i would like to work on this issue


the robot moves faster in rviz then in real

hi... thanks for all the hardwork you put on this project and make it working.. i try your code with my robot using audriuino mega..but my robot runs faster in rviz then in real .. and i think cuz of that the navigation stack also not work..i have tried the wheel reduction ratio part and calculate the values according to my robot but still no luck..

The ODrive firmware has been updated since I built this to use 'turns' instead of encoder counts as the units. So the amount the wheels turn will need rescaling.

thanks for the reply... so that is the issue... i am using your audrino code to connect to odrive... i have calculated the wheel revolution and put it on the code... i have calculated check revolution per second with speed and its ok.. not when i send speed from keyboard, lets say 0.5 .. on the odom topic i got different speed its 9.5 .. so i think its cuz of the odive firmware update causing the issue or i am missing something?

Hi.. bruton
ı have studied on ros and odrive for around 6 mounths. I appreciate your studies. Previously, we didnt have anyproblem about controlling odrive and ros but now, due to odrive update firmware, we faced same problem. My robot worked stable before, now it is unstable and so ı can not reach my targets. Can u help me with update version of odrive. thanks for your answer

Yep here's the ODrive migration guide to the new firmware: https://docs.odriverobotics.com/migration


Updated target sdk and gradle version.

A new SDK (22) and a new version of the gradle plugin were released. So we are updating the corresponding config files.

LGTM, but the change should explain why.

Done.