It's hard for py devs to see contract methods of DataNFT, Datatoken, etc

Motivation
Recently, ocean.py got brownie support. This meant we could (and did) deprecate all the ocean.py methods that simply passed-through to smart contracts.
For example, Datatoken.balanceOf(). And probably 200 other methods across modules in ocean_lib/models/*.py.
This greatly reduced the amount of code to maintain & debug. It also made a smoother UX.
However, we did lose one thing. Once developers go beyond the ocean.py READMEs, they don't have a great reference for what methods are available. They must resort to (a) looking at unit tests (b) looking at solidity code.
Can we...

help developers to understand the smart contract methods that DataNFT, Datatoken, etc expose
while maintaining the benefits of brownie

Suggested Approach
For each module / class in ocean_lib/models/*.py, add a triple-quote string """foo bar""" that spans many lines. Inside it, put the method definitions for each smart contract method, written in a py-like fashion (to maximize approachability to py devs).
E.g. for datatoken.py's Datatoken class:

class Datatoken:
   # have the usual non-smart-contract methods first. Then...

"""
  def balanceOf(address: str) -> int:
    Returns the balance of this address.
    :param: address of interest
    :return: balance, in wei

  def approve(...
"""

Note: the fix for #1095 included a new main flow, and its appendix nicely references what interfaces developers can use for data NFTs and datatokens. That will help soften the concern of this issue.
However, we should still do as this issue prescribes: a docstring in each py module listing the smartphone contract interfaces. That will help further.

I recommend @method annotations instead. https://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_tags.method.pkg.html

I recommend something like @method annotations instead. https://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_tags.method.pkg.html
There has to be something similar in Python!

I commented in the PR.

@alexcos20 @trentmc I have completed the first step, an inventory of the methods needing documentation. I have some questions, so I'll include the report below. Please help with any information/guidance you may see fit.
General issues

info method  is added by default, but is now empty for our contracts, should we document/keep it? This applies to all contracts
For other default methods i.e. events, topics should we add docstrings? These are generic methods on all contracts. Should we add docstrings in each model file to present them or is there a better way?
router is a similar case, but not present on ALL contracts
when a contract function is wrapped in a helper, I did not include it with the docstrings. i.e. for FixedRate setRate is abstracted by us in OneExchange as set_rate, in Datatoken the startOrder is wrapped by  start_order which handles tuple arguments and some defaults. I would rather not include the raw methods as docstrings if we do wrap them. Having both options would only lead to duplication, confusion and mistakes. However, I need confirmation of this train of thought.

Data NFT Factory issues

as far as I know, we should not allow users to add, enable, nor disable token templates via ocean.py. I propose not documenting these functions and, preferably, even pruning them from the list of transferred functions.
createNftWithErc20WithPool -> should we even keep this in the contracts at all? As far as I know, pools are not used anymore. Should we document it? Should we prune it from the model?

Datatoken issues

functions related to pools i.e. deployPool and getPools -> see similar issue above, same questions

DatatokenEnterprise issues

same issue with pool functions (getPools)
do we have to copy/paste the docstrings from Datatoken, or can I just document the functions that are different? The documentation is the same in both cases for ~20 functions

ERC721TokenFactoryBase issues

this is not a model per se, but a base class. Should I also add docstrings here? I think adding them on the data NFT factory is enough.

Factory Router issues

should we allow any write calls to the router? This class seems to have a lot of outdated code like that for pools and SS contracts. I can provide the entire list of functions to continue the discussion if needed.
should I add docstrings for constants? e.g. MAX_FEE, MIN_WEIGHT etc?

FRE issues

should I add docstrings for constants? e.g MAX_FEE, MIN_FEE etc? If so, should they be added as wrappers in OneExchange, or docstrings on the FRE model itself?
should we implement a wrapper for createWithDecimals ? I don’t know a lot about this function and I was wondering if our FRE code supports this or it should be just a docstring with raw usage options
we have a wrapper for getExchange using the OneExchange class. Should we implement a similar wrapper for getExchanges?

Answers inline.

General issues

info method  is added by default, but is now empty for our contracts, should we document/keep it? This applies to all contracts

Don't document it.

For other default methods i.e. events, topics should we add docstrings? These are generic methods on all contracts. Should we add docstrings in each model file to present them or is there a better way?

I'd say: skip here. Too much detail for this format. We can consider adding them as part of good-docs issue #1184.

router is a similar case, but not present on ALL contracts

Like above.

when a contract function is wrapped in a helper, I did not include it with the docstrings. i.e. for FixedRate setRate is abstracted by us in OneExchange as set_rate, in Datatoken the startOrder is wrapped by  start_order which handles tuple arguments and some defaults. I would rather not include the raw methods as docstrings if we do wrap them. Having both options would only lead to duplication, confusion and mistakes. However, I need confirmation of this train of thought.

I think it's useful for people to be aware of these, just with lower priority. I'd put them at the bottom, and mark as "redundant with __".

Data NFT Factory issues

as far as I know, we should not allow users to add, enable, nor disable token templates via ocean.py. I propose not documenting these functions and, preferably, even pruning them from the list of transferred functions.

You can skip documenting these. Don't bother pruning from transferred functions.

createNftWithErc20WithPool -> should we even keep this in the contracts at all? As far as I know, pools are not used anymore. Should we document it? Should we prune it from the model?

Don't bother documenting. Don't bother pruning.

Datatoken issues

functions related to pools i.e. deployPool and getPools -> see similar issue above, same questions

Don't bother documenting. Don't bother pruning.

DatatokenEnterprise issues

same issue with pool functions (getPools)

Don't bother documenting. Don't bother pruning.

do we have to copy/paste the docstrings from Datatoken, or can I just document the functions that are different? The documentation is the same in both cases for ~20 functions

Follow DRY.

ERC721TokenFactoryBase issues

this is not a model per se, but a base class. Should I also add docstrings here? I think adding them on the data NFT factory is enough.

Yes, do it just on data nft factory.

Factory Router issues

should we allow any write calls to the router? This class seems to have a lot of outdated code like that for pools and SS contracts. I can provide the entire list of functions to continue the discussion if needed.

Skip it.

should I add docstrings for constants? e.g. MAX_FEE, MIN_WEIGHT etc?

I'd say: skip here. Like above, add later as part of good-docs.

FRE issues

should I add docstrings for constants? e.g MAX_FEE, MIN_FEE etc? If so, should they be added as wrappers in OneExchange, or docstrings on the FRE model itself?

I'd say: skip here. Like above, add later as part of good-docs.

should we implement a wrapper for createWithDecimals ? I don’t know a lot about this function and I was wondering if our FRE code supports this or it should be just a docstring with raw usage options

I don't know a lot about createWithDecimals either. Maybe it should be deprecated overall? Perhaps take a few min to explore further, and then if appropriate, create a github issue.

we have a wrapper for getExchange using the OneExchange class. Should we implement a similar wrapper for getExchanges?

Perhaps take a few min to explore further, and then if appropriate, create a github issue.

Thank you, Trent! I've addressed almost everything locally. I'm commenting with a task list of what is pending.:

[ ] document redundant functions (those wrapped in helpers) at the bottom of the docstrings
[ ] follow-up on createWithDecimals and getExchanges()

btw I sincerely believe we shouldn't allow users to mess with the router at all :) maybe we could skip the read functions as well. In fact, in almost all cases we are only using the router address through ocean.py. Anything non-address is only used as part of test_factory_router.py. We can keep the tests, but I don't think functions regarding the router should be touched through ocean.py. CC: @trentmc @alexcos20

btw I sincerely believe we shouldn't allow users to mess with the router at all :) maybe we could skip the read functions as well.

I'm ok with skipping router functionality here.

Closed by #1270


feat: add ApiDefinitionAtLocationProcessor that allows to load a API definition from another location

Resolves #2572
@freben If this goes in the right direction, I will add tests and docs.
:heavy_check_mark: Checklist

[ ] All tests are passing yarn test
[ ] Screenshots attached (for UI changes)
[ ] Relevant documentation updated
[ ] Prettier run on changed files
[ ] Tests added for new functionality
[ ] Regression tests added for bug fixes

Test added, documentation updated, initial review comments applied. This is ready for review now 😄

Looks good to me - @Rugvip / @freben merge?

@Rugvip  I can prepare one for this


Implement procedure to store test results on a dedicated server to be able to see historical results and trends

As an SDET, I want to be able to upload results after each test run into a dedicated server to fetch historical results and see trends.
AC: Solution to store test results data on a dedicated server.

Closing: Out of scope


Bump to Java17 for GHA runner

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

https://github.com/apache/beam/actions?query=branch%3Abumptojava17 tracks the test suites running on Java17. Currently Flink/Spark/Hadoop tests all run into issues

close this as superceded by #32138


USBGuard

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/protecting-systems-against-intrusive-usb-devices_security-hardening
https://wiki.archlinux.org/title/USBGuard
https://usbguard.github.io/documentation/configuration

@trytomakeyouprivate
Please stop bumping issues unless there is something of substance you are adding. Posting a collection of documentation links with no other substance will be considered spam.

There is something going on upstream fedora
The issues are

installing packages
enabling services
set polkit rules to allow usbguard
whitelist all devices by default

GNOME has GUI integration of this, not sure about KDE.
Having it solved upstream would be great

added and disabled by default: https://github.com/secureblue/secureblue/commit/50f836b4f1751a0bb05ab9181b50775ee8a332d8


Drag-and-drop refactoring: intuitive and efficient program transformation

http://dl.acm.org/citation.cfm?id=2486792

they use sample bugs  from  a variety of sources: Google Code, Mozilla’s Bugzilla bug
tracker, and the Web.
no dataset available .


Create CODE_OF_CONDUCT.md

Merge Request - GuideLine Checklist
This is just the application of a standard code of conduct provided by github.

Codecov Report

Merging #62 (827ac50) into main (b39e8f0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   62.53%   62.53%
=======================================
  Files          91       91
  Lines        5969     5969
  Branches     2077     2077
=======================================
  Hits         3733     3733
- Misses        544      546    +2
+ Partials     1692     1690    -2

Impacted Files
Coverage Δ

cpp/epidemiology/secir/secir_params.h
32.21% <0.00%> (ø)

Continue to review full report at Codecov.

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


How to generate youtube live m3u8 url with ytarchive?

Could you tell me how to generate youtube live m3u8 url with ytarchive?
Something like "./yt-dlp_linux -f best -g https://www.youtube.com/watch?v=FoBfXvlOR6I".
Thanks a lot!

You can't, that's not within the scope of this project. ytarchive does not touch m3u8 data at all.


[Azure Monitor OpenTelemetry] 1.0.0-beta.3 release

Packages impacted by this PR
@azure/monitor-opentelemetry

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


Implement #271 The [Client Know The Target Addr]

A new Listen Flag
see https://github.com/xtaci/kcptun/issues/271
RFC-20161114001: The [Client Know The Target Addr] listen flag
Quick and dirty , but it works.
Signed-off-by: ZhiFeng Hu<EMAIL_ADDRESS>

This pull request is now managed with CodeReviewHub. Refresh.

i think it's better to add a frameType in smux, like cmdOption, to push options to the remote.

Oh, I have no willing to modify your smux. but you can implement your solution if you have time.

As i thought, SMUX must keep simple and fast. so i prefer change /modify kcp client/server

@xtaci we already deploy this patch at our production environment, works like a boss. thanks your hard work

great.

If some one looking for outland redundancy, multiple redundancy architecture, This patch may useful.
It's powered by www.deyi.com and it's subprojects

:shipit:

:shipit::gun:


Releasing gcsfs 0.6.2 to pypi

The main goal of 0.6.2 release is to unblock petastorm usage #254
Currently gcsfs fails non deterministically on petastorm: https://github.com/uber/petastorm/issues/547
petastorm can only use 0.6.0, and that version has issue with retry logic fixed in 0.6.1 by #226
I can do release myself if you give me gcsfs project access on pypi.
My username on pypi is vlasenkoalexey

Let's merge #257 , and then I can do it.

Let's merge #257 first.
Thanks for quick response and for doing release!!!

On pypi now

Thanks!!!


Respect redirects when creating GH issues

This follow-redirect behavior was implemented in #97 specifically to
account for some GH API behavior, but as Max very kindly pointed out
recently, we weren't actually using it where we had intended to.
Now we are using it.
cc @codeclimate/review

LGTM
The red treatment reminded me: do we have some issue in this repo where test coverage isn't being handled correctly? I'm pretty sure that line, and others I've seen, is covered.

The red treatment reminded me: do we have some issue in this repo where test coverage isn't being handled correctly? I'm pretty sure that line, and others I've seen, is covered.

I just mentioned the same thing on #110. Maybe it is specific to how test coverage is being reported on this repo: on the site it also looks mostly uncovered, though we do have tests for these methods.
Maybe this is an incompatibility between our test reporter and the version of minitest being used or something. I'll take a look.

(Actually https://github.com/codeclimate/codeclimate-services/pull/114/files#r77356061 not #110) (sorry) (:smile:)


No validation dataset

I am just starting to use pytorch_lightning. I have one question regarding the validation set. I may or may not have a validation set during my training. How should the validation_step be structured in this case?
is it enough do something like this:
@pl.data_loader
def val_dataloader(self):
     if has_valset:
        return self.__dataloader(train=False)
    return None

So if it  returns None, then no validation loop calls will be made?
Or do I need something like:
def validation_step(self, batch, batch_idx):
    # Is this check necessary?
    if not has_vaset:
        return

   # process the validation batch

I suggest you return the validation loader anyway, and then set the Trainer flag val_percent_check=0 if you don't want to run validation.
Let me know if that works or not.

feel free to reopen if needed 🐰


Vue production build errors in example

I'm having an issue building the vue hello world example using the npm run build
Running in serve mode works as designed.
git clone https://github.com/webdiscus/pug-loader
cd ./pug-loader/examples/hello-world-vue
nvm install v16.17.1

Downloading and installing node v16.17.1...
Downloading https://nodejs.org/dist/v16.17.1/node-v16.17.1-darwin-arm64.tar.xz...
############################################################################################################################################################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v16.17.1 (npm v8.15.0)

npm i; npm ls

npm WARN deprecated<EMAIL_ADDRESS>Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility

added 996 packages, and audited 997 packages in 3s

116 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
<EMAIL_ADDRESS>/Users/null/pug-loader/examples/hello-world-vue
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>
npm run build

><EMAIL_ADDRESS>build
> vue-cli-service build

All browser targets in the browserslist configuration have supported ES module.
Therefore we don't build two separate bundles for differential loading.

⠼  Building for production...

 ERROR  Failed to compile with 1 error                                                                                12:39:40 PM

 error  in ./src/components/HelloWorld.vue?vue&type=template&id=a771edd6&lang=pug

Syntax Error: Thread Loader (Worker 0)
Cannot read properties of undefined (reading 'options')

 ERROR  Error: Build failed with errors.
Error: Build failed with errors.
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/webpack.js:148:8
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.shutdown (/Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Cache.js:150:23)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:1225:15
    at Hook.eval [as callAsync] (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.close (/Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:1218:23)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/webpack.js:147:16
    at finalCallback (/Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:441:32)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:458:13
    at Hook.eval [as callAsync] (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/Hook.js:18:14)
    at onCompiled (/Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:456:21)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:1196:17
    at Hook.eval [as callAsync] (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/Hook.js:18:14)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compiler.js:1192:33
    at finalCallback (/Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compilation.js:2787:11)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compilation.js:3092:11
    at Hook.eval [as callAsync] (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/Hook.js:18:14)
    at /Users/null/pug-loader/examples/hello-world-vue/node_modules/webpack/lib/Compilation.js:3085:38
    at eval (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at eval (eval at create (/Users/null/pug-loader/examples/hello-world-vue/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Hi @eephillip
oh, this is very common problem of Vue in production mode.
I can reproduce this issue, but I don't know how to fix this Vue bug.
Please try to build in development mode, it should works:
npx vue-cli-service build --mode development

P.S. if you can fix it in vue.config.js, please create a PR.

I'll keep digging, see I can come up with something.

I'll keep digging, see I can come up with something.

Thanks!
This is very strange issue in Vue config.
I see in google that many developers have same issue by build in production mode.

@eephillip
I found the problem.
That was the fault of the thread-loader that using  in production mode only.
The @webdiscus/pug-loader works in async mode and calls a callback with a result, but the thread-loader expected return of a compiled result, OMG (face-palm).
Also, this is really an evil Vue bug, that use buggy thread-loader in production mode :-/
I am trying to find a workaround for this.
Perhaps can by disabled this plugin in the Vue config.

@eephillip
I have fixed the Vue example for npm run build.  See the comments in fixed vue.config.js.
Please git pull new version from GitHub.
Thanks,
Dimitri

awesome!, well done, confirmed functional


Error from PHP - bind was not successfull: Can't contact LDAP server

Hi Andreas,
I would like you to advise a setting of AuthLDAP. On bellow's an information that we got when User try to login on WordPress
1. AuthLDAP Setting

General Usage of authLDAP

Enable Authentication via LDAP?: Yes
Debug AuthLDAP?: Yes

General Server Settings

LDAP URI: ldaps://uid=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th:secret@ldap.nist.ac.th/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
Filter: (uid=%s)

Settings for creating new Users

Name-Attribute: name
User-ID Attribute: uid
Mail Attribute: mail
Default Role: Subscriber

2. Error log

AH01071: Got error 'PHP message: [AuthLDAP] User '' logging inPHP message: [AuthLDAP] Username not supplied: return false'
Source: Apache error

AH01071: Got error 'PHP message: [AuthLDAP] User 'testaccount' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldaps\n [host] => ldap.nist.ac.th\n [user] => uid=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th\n [pass] => secret\n [path] => /OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] LDAP authentication failed with exception: bind was not successfull: Can't contact LDAP server',
Source: Apache error

3. Error when user login on WordPress login page

Unknown email address. Check again or try your username.

Do you have anything to advice or suggest? Thank you.

Hey @phodchara. Thanks for reaching out.
There are some things that immediately come to my mind:

can the DNS-Name bve resolved on the webserver? I can not resolve ldap.nist.ac.th from my machine so if the web-server is running outside of a local network it might also have issues resolving that name.
If the name can be resolved: Can you actually connect to the ldap-server from the webserver? Via CLI? If that is not possible due to firewall-rules, then you might need to adapt the network settings appropriately
Have you tried adding the ldaps-port to the LDAP-URI? Like ...@ldap.nist.ac.th:636/...?
As it is an ldaps-connection: Is it secured with a self-signed certificate? That is always a PITA. There are some ways to get around that and I will need to add some config-flags enable that right from the plugin. As long as that is not fixed, check out this README I wrote some time ago

Please do get back with your findings so that we can get that fixed.

Hey @phodchara. Thanks for reaching out.
There are some things that immediately come to my mind:

can the DNS-Name bve resolved on the webserver? I can not resolve ldap.nist.ac.th from my machine so if the web-server is running outside of a local network it might also have issues resolving that name.
If the name can be resolved: Can you actually connect to the ldap-server from the webserver? Via CLI? If that is not possible due to firewall-rules, then you might need to adapt the network settings appropriately
Have you tried adding the ldaps-port to the LDAP-URI? Like ...@ldap.nist.ac.th:636/...?
As it is an ldaps-connection: Is it secured with a self-signed certificate? That is always a PITA. There are some ways to get around that and I will need to add some config-flags enable that right from the plugin. As long as that is not fixed, check out this README I wrote some time ago

Please do get back with your findings so that we can get that fixed.

Hi Andreas,
This is an answer for your questio

For DNS-Name, Actual's nistldap.nist.ac.th
The connection via CLi work very well but still can't login with AD account. I guess the problem cause LDAP URI setting. On below's these URI that I use

ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:389/ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:389/dc=nist,dc=ac,dc=th
-ldaps://uid=USERNAME,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:636/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
ldaps://uid=USERNAME,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
ldap://USERNAME:PASSWORD@nistldap.nist.ac.th:389/DC=nist,DC=ac,DC=th
ldap://USERNAME:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
ldap://USERNAME@nist.ac.th:PASSWORD@nistldap.nist.ac.th:389/DC=nist,DC=ac,DC=th
ldap://USERNAME@nist.ac.th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th

Please advice, Thank you

Hi Andreas,
This is an answer for your questio

For DNS-Name, Actual's nistldap.nist.ac.th
The connection via CLi work very well but still can't login with AD account. I guess the problem cause LDAP URI setting. On below's these URI that I use

ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:389/ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/dc=nist,dc=ac,dc=th
ldap://uid=USERNAME,ou=WordPress,ou=_TurnOnMail,ou=SystemAccount,dc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:389/dc=nist,dc=ac,dc=th
-ldaps://uid=USERNAME,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th:636/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
ldaps://uid=USERNAME,OU=WordPress,OU=_TurnOnMail,OU=SystemAccountdc=nist,dc=ac,dc=th:PASSWORD@nistldap.nist.ac.th/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
ldap://USERNAME:PASSWORD@nistldap.nist.ac.th:389/DC=nist,DC=ac,DC=th
ldap://USERNAME:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
ldap://USERNAME@nist.ac.th:PASSWORD@nistldap.nist.ac.th:389/DC=nist,DC=ac,DC=th
ldap://USERNAME@nist.ac.th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th

Please advice, Thank you

Additional information, Why I think the problem cause LDAP URI, because I try to use LDAP WP Login Integration With Active Directory plugin. User can login to the site.
Please advice, Thank you

Additional information, Why I think the problem cause LDAP URI, because I try to use LDAP WP Login Integration With Active Directory plugin. User can login to the site.
Please advice, Thank you

did you encode possibly problematic characters in the password using URL-Encoding?
What is the DN of the user with USERNAME? 'Cause if that is the WordPress-User from the screenshot then you would need to use this LDAP-URI: ldap://cn=WordPress,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>(given that the users that shall log in via LDAP are located in the OU=WordPress<EMAIL_ADDRESS>
Note the cn instead of the uid. You could also be using samAccountName.

did you encode possibly problematic characters in the password using URL-Encoding?
What is the DN of the user with USERNAME? 'Cause if that is the WordPress-User from the screenshot then you would need to use this LDAP-URI: ldap://cn=WordPress,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>(given that the users that shall log in via LDAP are located in the OU=WordPress<EMAIL_ADDRESS>
Note the cn instead of the uid. You could also be using samAccountName.

did you encode possibly problematic characters in the password using URL-Encoding?
No

What is the DN of the user with USERNAME?
Domain name's 'nist.ac.th'

LDAP URI that i try
ldap://cn=USERNAME,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>

ldap://cn=USERNAME,DN=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DN=nist,DC=ac,DC=th
ldap://samAccountName=USERNAME,DN=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DN=nist,DC=ac,DC=th
All of them them still doesn't work. Please advice.
Thank you

did you encode possibly problematic characters in the password using URL-Encoding?
No

What is the DN of the user with USERNAME?
Domain name's 'nist.ac.th'

LDAP URI that i try
ldap://cn=USERNAME,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>

ldap://cn=USERNAME,DN=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DN=nist,DC=ac,DC=th
ldap://samAccountName=USERNAME,DN=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DN=nist,DC=ac,DC=th
All of them them still doesn't work. Please advice.
Thank you

DN is not the Domain Name but the Distinguished Name.
Have you URL-Encoded the password? For example by using something like https://www.urlencoder.org

DN is not the Domain Name but the Distinguished Name.
Have you URL-Encoded the password? For example by using something like https://www.urlencoder.org

This is DN for this user > cn=wordpress,OU=WordPress, OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
Not yet, because we don't encode anything.
On below's LDAP URI that i try again

ldap://cn=WordPress,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>ldap://cn=wordpress,OU=WordPress, OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/dc=nist,dc=ac,dc=th

This is DN for this user > cn=wordpress,OU=WordPress, OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
Not yet, because we don't encode anything.
On below's LDAP URI that i try again

ldap://cn=WordPress,OU=WordPress<EMAIL_ADDRESS><EMAIL_ADDRESS>ldap://cn=wordpress,OU=WordPress, OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/dc=nist,dc=ac,dc=th

There is no need to send more LDAP-URIs until you use an URL-Encoded password.
Also provide the log file with the debuggin information from AuthLdap.

There is no need to send more LDAP-URIs until you use an URL-Encoded password.
Also provide the log file with the debuggin information from AuthLdap.

Thank you so much for your reply.
For URL-Encoded the password, We don't use a special character in password .
On below's the log from AuthLDAP
LDAP URI - ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
Log
AH01071: Got error 'PHP message: [AuthLDAP] User '' logging inPHP message: [AuthLDAP] Username not supplied: return false'
AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] No bind successfull. Exception thrown in line 70',

Thank you so much for your reply.
For URL-Encoded the password, We don't use a special character in password .
On below's the log from AuthLDAP
LDAP URI - ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th
Log
AH01071: Got error 'PHP message: [AuthLDAP] User '' logging inPHP message: [AuthLDAP] Username not supplied: return false'
AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] No bind successfull. Exception thrown in line 70',

Can you edit the file authLdap.php in the folder wp-contents/plugins/authldap and add the following line after line 282:
authldap_debug(($result === true)?'true':'false');

After that please try to log in again and send the content of the error log again. Thanks

Can you edit the file authLdap.php in the folder wp-contents/plugins/authldap and add the following line after line 282:
authldap_debug(($result === true)?'true':'false');

After that please try to log in again and send the content of the error log again. Thanks

This is an information.
Edit authLdap.php > see picture

Log
AH01071: Got error 'PHP message: [AuthLDAP] User '' logging inPHP message: [AuthLDAP] Username not supplied: return false'
AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] falsePHP message: [AuthLDAP] No bind successfull. Exception thrown in line 70'
Thank you so much

This is an information.
Edit authLdap.php > see picture

Log
AH01071: Got error 'PHP message: [AuthLDAP] User '' logging inPHP message: [AuthLDAP] Username not supplied: return false'
AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] falsePHP message: [AuthLDAP] No bind successfull. Exception thrown in line 70'
Thank you so much

OK. This means that the main part of the LDAP-URI is correct as the main user can conenct to the LDAP-Server.
But the authentication of the user is then not working.
Can you send me the LDAP-details of the user that you are trying to log in? Like the Distinguished name (DN) of that user? And what Attributes are you trying to match for that user?
'Cause I could think that you are still using the default filter (uid=%s) which might not work as you probably need (samAccountName=%s) instead. And are the users that shall log into WordPress all part of the subtree OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th? Or are they part of a different subtree? Then that different subtree needs to be set as path in the LDAP-URI

OK. This means that the main part of the LDAP-URI is correct as the main user can conenct to the LDAP-Server.
But the authentication of the user is then not working.
Can you send me the LDAP-details of the user that you are trying to log in? Like the Distinguished name (DN) of that user? And what Attributes are you trying to match for that user?
'Cause I could think that you are still using the default filter (uid=%s) which might not work as you probably need (samAccountName=%s) instead. And are the users that shall log into WordPress all part of the subtree OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th? Or are they part of a different subtree? Then that different subtree needs to be set as path in the LDAP-URI

Hi Heiglandreas
This is the LDAP detail of the user that try to login > See picture

And I have a good thing when change LDAP URI to below
ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
and the default filter to (samAccountName=%s)
The error log seem better than the last time (see on below)
_AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] truePHP message: [AuthLDAP] LDAP authentication successfullPHP message: [AuthLDAP] could not get user attributes from LDAPPHP message: [AuthLDAP] Exception getting LDAP user: The user-ID attribute has not been returned',
For OU, We have a lot OU under NIST domain.
Thank you so much

Hi Heiglandreas
This is the LDAP detail of the user that try to login > See picture

And I have a good thing when change LDAP URI to below
ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
and the default filter to (samAccountName=%s)
The error log seem better than the last time (see on below)
_AH01071: Got error 'PHP message: [AuthLDAP] User 'userwp' logging inPHP message: [AuthLDAP] about to do LDAP authenticationPHP message: [AuthLDAP] connect to LDAP serverPHP message: Array\n(\n [scheme] => ldap\n [host] => nistldap.nist.ac.th\n [user] => CN=wordpress,OU=WordPress,OU=TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th\n [pass] => PASSWORD\n [path] => /DC=nist,DC=ac,DC=th\n)\nPHP message: [AuthLDAP] truePHP message: [AuthLDAP] LDAP authentication successfullPHP message: [AuthLDAP] could not get user attributes from LDAPPHP message: [AuthLDAP] Exception getting LDAP user: The user-ID attribute has not been returned',
For OU, We have a lot OU under NIST domain.
Thank you so much

Previously you described that these are your settings:

Name-Attribute: name
User-ID Attribute: uid
Mail Attribute: mail
Default Role: Subscriber

But if I read that correct so far the userID-Attribute is not uid but samAccountName
Please check also the other fields to make sure everything is set up as necessary.
Additionally you can probably set the path to OU=SystemAccount,DC=nist,DC=ac,DC=th but if that doesn't work you can leave it as it is now.

Previously you described that these are your settings:

Name-Attribute: name
User-ID Attribute: uid
Mail Attribute: mail
Default Role: Subscriber

But if I read that correct so far the userID-Attribute is not uid but samAccountName
Please check also the other fields to make sure everything is set up as necessary.
Additionally you can probably set the path to OU=SystemAccount,DC=nist,DC=ac,DC=th but if that doesn't work you can leave it as it is now.

Hi  Heiglandreas
Good news, We got it!. The setting's

LDAP URI: ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
User-ID Attribute: samAccountName
The default filter: (samAccountName=%s)

Thank you so much for your help. I am appreciated the things you do so much indeed.

Hi  Heiglandreas
Good news, We got it!. The setting's

LDAP URI: ldap://CN=wordpress,OU=WordPress,OU=_TurnOnMail,OU=SystemAccount,DC=nist,DC=ac,DC=th:PASSWORD@nistldap.nist.ac.th/DC=nist,DC=ac,DC=th
User-ID Attribute: samAccountName
The default filter: (samAccountName=%s)

Thank you so much for your help. I am appreciated the things you do so much indeed.


Provide  with existing Clerk client

Package

[ ] @clerk/clerk-js
[x] @clerk/clerk-react
[ ] @clerk/nextjs
[ ] @clerk/remix
[ ] @clerk/clerk-expo
[ ] @clerk/backend-core
[ ] @clerk/clerk-sdk-node
[ ] @clerk/edge
[ ] @clerk/localizations
[ ] other:

Description
It would be nice to be able to provide the <ClerkProvider> component in @clerk/clerk-react with an already existing Clerk client so that I only have one active Clerk client on my website. Right now I have to pass a frontend api key and it spins up its own client which is a small problem because it executes extra requests for the client created in react.

// clerk.ts
import Clerk from "@clerk/clerk-js";

export const frontendApi = import.meta.env.VITE_CLERK_FRONTEND_API;
export const clerk = new Clerk(frontendApi);
clerk.load();

// App.tsx
import {
  ClerkProvider,
  RedirectToSignIn,
  SignedIn,
  SignedOut,
} from "@clerk/clerk-react";
import { ProtectedApp } from "./ProtectedApp.js";
import { frontendApi } from "./clerk.js";

export const App = () => {
  return (
    <ClerkProvider frontendApi={frontendApi}>
      <SignedIn>
        <ProtectedApp />
      </SignedIn>
      <SignedOut>
        <RedirectToSignIn />
      </SignedOut>
    </ClerkProvider>
  );
};

I want this
import { clerk} from "./clerk.js";

...

<ClerkProvider client={clerk}>

@hornta This is already support via the Clerk prop. You can do the following:
import { clerk } from "./clerk.js";

<ClerkProvider Clerk={clerk} />

Thanks


Add DocSearch setup guide

Summary
Brief explanation of the feature.
Basic example
Include a basic example or links here.
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?

Doks comes with FlexSearch preconfigured out of the box. If you want to use DocSearch in stead, this guide will explain how.


Fix save_readnames

The type was handled inconsistently causing a crash
Pass the error from _combine_transcripts forward

Good to me, thanks a lot!


tour: Spotter suggested search does not yield any results

On the page of the tour with "Search is pervasive. Try searching for Object" I typed "Object" in the search box followed by enter but no results show up. Trying "./" on the next slide also does not yield any results.
I am using gtoolkit 0.8.2123 on Ubuntu 20.04.5 LTS

In the next release:

Thanks for the fix :)


examples/Prefs2Struct /Prefs2Struct.ino printf

Esp32 has not "printf"
Please make a version from the Prefs2Struct.ino

How comes Esp32 has not "printf".
What do you mean Esp32

Noticed warnings when trying to use printf.
If you look at all the 3rd party non Arduino.cc products, they all include a printf() method in their Print class.
This allows doing.
Serial.printf("this is an integer counter: %04d", counter);
So if using say ESP32, ESP8266, chipkit, Teensy, Intel, rp2040, STM32,.... etc. platform/cores you have a printf() method.
Arduino.cc absolutely refuses to add a printf() method to the Print class any of their platform/cores.

But, how this is esp32 - related? Please clarify your request
нд, 26 трав. 2024 р., 20:15 користувач Fungreenfox @.***>
пише:

Noticed warnings when trying to use printf.
If you look at all the 3rd party non Arduino.cc products, they all include
a printf() method in their Print class.
This allows doing.
Serial.printf("this is an integer counter: %04d", counter);
So if using say ESP32, ESP8266, chipkit, Teensy, Intel, rp2040, STM32,....
etc. platform/cores you have a printf() method.
Arduino.cc absolutely refuses to add a printf() method to the Print class
any of their platform/cores.
—
Reply to this email directly, view it on GitHub
https://github.com/vshymanskyy/Preferences/issues/15#issuecomment-2132290190,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALP3FF2WQCCX7XE2X4MMFTZEIKE3AVCNFSM6AAAAABH5NKUXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGI4TAMJZGA
.
You are receiving this because you commented.Message ID:
@.***>

Also https://forum.arduino.cc/t/esp32-where-can-i-find-the-reference-for-serial-printf-the-print-with-the-f-as-a-suffix/1007598

It appears that printf is not standard on esp32, but might work with adding extra library.

This Library is not designed to work on ESP32.
ESP32 does support printf, regardless.
нд, 26 трав. 2024 р., 20:32 користувач Fungreenfox @.***>
пише:

It appears that printf is not standard on esp32, but might work with
adding extra library.
—
Reply to this email directly, view it on GitHub
https://github.com/vshymanskyy/Preferences/issues/15#issuecomment-2132294347,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALP3FC3QOOH62LXPVD3DU3ZEIMDDAVCNFSM6AAAAABH5NKUXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGI4TIMZUG4
.
You are receiving this because you commented.Message ID:
@.***>


[BUG] Attaching to context panics at 'assertion failed: context.is_owner()'

Bug description
After upgrading to gtk/glib 0.14.0 my application and all integration tests fail at:
thread 'main' panicked at 'assertion failed: context.is_owner()', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17

I managed to reproduce it with a simple program:
src/main.rs:
const DEFAULT_CONTEXT : Option<&glib::MainContext> = None;

fn main() {
    let (_sender, receiver) = glib::MainContext::channel(glib::PRIORITY_DEFAULT);
    let handler = move |event: i32| {
        println!("got event: {}", event);
        glib::Continue(true)
    };
    receiver.attach(DEFAULT_CONTEXT, handler);  // panics
}

Cargo.toml:
[package]
name = "glib-context-test"
version = "0.1.0"
edition = "2018"

[dependencies]
glib = "0.14.0"

Tested on:
Manjaro 21.0.7
Rust 1.53.0
Backtrace
$ RUST_BACKTRACE=full cargo run
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.73
   Compiling serde v1.0.126
   Compiling anyhow v1.0.41
   Compiling unicode-segmentation v1.7.1
   Compiling either v1.6.1
   Compiling smallvec v1.6.1
   Compiling version-compare v0.0.11
   Compiling pkg-config v0.3.19
   Compiling strum v0.21.0
   Compiling version_check v0.9.3
   Compiling futures-core v0.3.15
   Compiling libc v0.2.97
   Compiling futures-task v0.3.15
   Compiling autocfg v1.0.1
   Compiling bitflags v1.2.1
   Compiling futures-channel v0.3.15
   Compiling pin-utils v0.1.0
   Compiling pin-project-lite v0.2.7
   Compiling slab v0.4.3
   Compiling once_cell v1.8.0
   Compiling itertools v0.10.1
   Compiling cfg-expr v0.7.4
   Compiling heck v0.3.3
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling futures-util v0.3.15
   Compiling quote v1.0.9
   Compiling futures-executor v0.3.15
   Compiling toml v0.5.8
   Compiling thiserror-impl v1.0.25
   Compiling strum_macros v0.21.1
   Compiling thiserror v1.0.25
   Compiling proc-macro-crate v1.0.0
   Compiling system-deps v3.1.2
   Compiling glib-macros v0.14.0
   Compiling glib-sys v0.14.0
   Compiling gobject-sys v0.14.0
   Compiling glib v0.14.0
   Compiling glib-context-test v0.1.0 (/home/user/dev/project/test/rust/glib-context-test)
    Finished dev [unoptimized + debuginfo] target(s) in 1m 03s
     Running `target/debug/glib-context-test`
thread 'main' panicked at 'assertion failed: context.is_owner()', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17
stack backtrace:
   0:     0x564ba96568d0 - std::backtrace_rs::backtrace::libunwind::trace::ha5edb8ba5c6b7a6c
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x564ba96568d0 - std::backtrace_rs::backtrace::trace_unsynchronized::h0de86d320a827db2
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x564ba96568d0 - std::sys_common::backtrace::_print_fmt::h97b9ad6f0a1380ff
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x564ba96568d0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14be7eb08f97fe80
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x564ba9670e2f - core::fmt::write::h2ca8877d3e0e52de
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/fmt/mod.rs:1094:17
   5:     0x564ba96550c5 - std::io::Write::write_fmt::h64f5987220b618f4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/io/mod.rs:1584:15
   6:     0x564ba965875b - std::sys_common::backtrace::_print::h7f1a4097308f2e0a
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x564ba965875b - std::sys_common::backtrace::print::h1f799fc2ca7f5035
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x564ba965875b - std::panicking::default_hook::{{closure}}::hf38436e8a3ce1071
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:208:50
   9:     0x564ba965822d - std::panicking::default_hook::he2f8f3fae11ed1dd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:225:9
  10:     0x564ba9658d6d - std::panicking::rust_panic_with_hook::h79a18548bd90c7d4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:591:17
  11:     0x564ba96588d7 - std::panicking::begin_panic_handler::{{closure}}::h212a72cc08e25126
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:495:13
  12:     0x564ba9656d6c - std::sys_common::backtrace::__rust_end_short_backtrace::hbd6897dd42bc0fcd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x564ba9658869 - rust_begin_unwind
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
  14:     0x564ba963dd91 - core::panicking::panic_fmt::h77ecd04e9b1dd84d
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
  15:     0x564ba963dcdd - core::panicking::panic::h60569d8a39169222
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:50:5
  16:     0x564ba963f73a - glib::main_context_channel::Receiver<T>::attach::h594fcf9e7dc84a34
                               at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.14.0/src/main_context_channel.rs:507:17
  17:     0x564ba964305d - glib_context_test::main::hc555b5f4c0db2dae
                               at /home/user/dev/project/test/rust/glib-context-test/src/main.rs:9:5
  18:     0x564ba9641dcb - core::ops::function::FnOnce::call_once::h17df49f787978c02
                               at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
  19:     0x564ba964003e - std::sys_common::backtrace::__rust_begin_short_backtrace::hc9dee5163aee7e43
                               at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18
  20:     0x564ba96400c1 - std::rt::lang_start::{{closure}}::heeab27af11fe19e8
                               at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:49:18
  21:     0x564ba965916a - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc4354216bf39217c
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:259:13
  22:     0x564ba965916a - std::panicking::try::do_call::hb68eb312780385cf
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:379:40
  23:     0x564ba965916a - std::panicking::try::h22b8e08595060b8b
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:343:19
  24:     0x564ba965916a - std::panic::catch_unwind::hc64f1a6a0e71b1fc
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panic.rs:431:14
  25:     0x564ba965916a - std::rt::lang_start_internal::h4461fc58637f04f8
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/rt.rs:34:21
  26:     0x564ba96400a0 - std::rt::lang_start::h6c3d3c3dbe636292
                               at /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:48:5
  27:     0x564ba964315c - main
  28:     0x7f3b4857db25 - __libc_start_main
  29:     0x564ba963e48e - _start
  30:                0x0 - <unknown>

You need to make sure the main context is acquired at that point:
let _guard = glib::MainContext::default().acquire();
[...]

Thanks, the correct way would be:
let context = glib::MainContext::default();
let _guard = context.acquire().unwrap();

Otherwise we get error[E0716]: temporary value dropped while borrowed.
In my real app I'm using gtk::init(), so I will do more experiments to fix or reproduce the error in another way.

It turned out that gtk::init() did acquire the default context in the previous version (0.9.2), and the acquire function returned just a bool. The gtk::init() in 0.14.0 does not acquire that context, while the acquire function now returns a guard.

Someone else just asked the same question on Matrix. I think we should add an example to the documentation.

A little related problem: I wanted to wrap getting of context in a function to make it easier to read, but it turned out it's not possible to name the guard type, because it's in a private module and the type is not exported:
fn main() {
    let context = glib::MainContext::default();
    let _guard = acquireContext(&context);
}

fn acquireContext(context: &glib::MainContext) -> glib::main_context::MainContextAcquireGuard
{
    context.acquire().unwrap_or_else(|error| panic!("Failed to acquire the main context from glib. Cause: {:?}", error))
}

This fails with an error:
error[E0603]: module `main_context` is private

Indeed, it should be re-exported from lib.rs. Do you want to create a PR for that and for improving the docs?

As discussed, it also might make sense in addition to have gtk::init() leak the acquire like it did before. That shouldn't make much a difference in practice for GTK users.
CC @Hofer-Julian

Instead it could return the ContextGuard, no?

gtk::init()? That would be a breaking API-change (as it causes a warning if you ignore the return value).

I thought we were talking about the next release already.

It would be nice if it could be changed within a minor release since so many people struggle with this.

I think we shouldn't acquire the context from the function. Instead, we should document that if you have this error, then you need to do "that".

I thought we were talking about the next release already.

Then it would still be annoying because every use of gtk::init() needs to do something about its return value now, but something for people actually using GTK to figure out :)

@sdroege:

Indeed, it should be re-exported from lib.rs. Do you want to create a PR for that and for improving the docs?

It's possible I won't have enough free time to do that in the next few days, so you or someone else can go ahead with it.

My suggestion here would be now to simply leak the main context acquisition in gtk::init. I don't think this can possibly break anything that wasn't UB before, and specifically it avoids the potential problem that after doing GTK things you run the main context from a different thread and then have non-Send closures executed from a different thread.
@bilelmoussaoui @GuillaumeGomez need to decide about this though.

I agree with leaking the context acquisition. @sdroege suggested to either use mem::forget or calling the C function. I'd prefer the second solution (calling the C function).

Ok, so who wants to do such a PR for gtk3/gtk4? :)

@sdroege I happen to have more time now, so I created a pull request for gtk3. If it is correct, I will follow for gtk4.


Notification: Remove bespoke regs3k notification

Regs3k has its own notification template and less file. This converts that notification into a container for the v1 notification and uses utility classes to eliminate the less file in interest of phasing out the one-off notification for regs3k.
Changes

Use v1 notification in place of regs3k notification.

Testing

Visit http://localhost:8000/policy-compliance/rulemaking/regulations/ and compare to https://www.consumerfinance.gov/policy-compliance/rulemaking/regulations/

Screenshots
Before:

After:

Notes

This changes the right-hand margin of the notification so it aligns with the content. I think this was the original intent?

Shouldn't we just remove all this code and add the new notification module to RegulationLandingPage?

Shouldn't we just remove all this code and add the new notification module to RegulationLandingPage?

It requires a data migration, which was deemed not a priority at this time given the effort. This is a step in that direction though.

Adding a field that did not exist prior does not require a data migration.

Adding a field that did not exist prior does not require a data migration.

I made a bad assumption here. It would indeed require a data migration to automatedly migrate the existing data, but there is currently only one existing instance of the regs3k NotificationBlock, so we can just blow it away and re-add it immediately after deployment with minimal "downtime".
I will take over this PR for Ans, as he's heading out on vacation, and see those changes through.

@Scotchester @anselmbradford discussed that with me, and I think it might be worth asking the content owners if we could remove that notification from the regs pages altogether (it's been 6 months since launch). I'm not sure it's worth migrating the content of the notification from this block to another for that reason.

@Scotchester @anselmbradford discussed that with me, and I think it might be worth asking the content owners if we could remove that notification from the regs pages altogether (it's been 6 months since launch). I'm not sure it's worth migrating the content of the notification from this block to another for that reason.

That would be fine, too. Please do ask them, if you don't mind, @willbarton.
Regardless of what they say, should we add the new v1 notification molecule to RegulationLandingPage, anyway, for any possible future notices we want to put up on that page?

@Scotchester Yes, it should be added to the RegulationLandingPage too — we've had to put notices up on eRegs before (for updates that should appear but haven't yet and things like that) so it would probably be worth preserving that ability.

Force pushed an update that removes the regs notification and adds the standard notification at the top:

To test, create a new regs landing page and note that you can now add a notification or a full-width-text:

Ready for a review again.


Crashing on draw

Hi,
I'm using a Galaxy S3 i9300 and have tested both stock 4.3 and cynogenmod 4.4.4 on the same device and I get the same error on both when trying to render a 3d object on screen.
glUseProgram: glError 1280
FATAL EXCEPTION: GLThread 908
Also when using the cardboard demo app, Windy Day crashes with the following log cat:
com.google.samples.apps.cardboarddemo E/AndroidRuntime﹕
FATAL EXCEPTION: GLThread 501
Process: com.google.samples.apps.cardboarddemo, PID: 10070
java.lang.RuntimeException: MoxieCommon-a No configs match configSpec
at com.motorola.moxie.common.a.a.chooseConfig(Unknown Source)
at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1026)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1403)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1242)
Both the cardboard demo app and my app work OK on HTC one, LG G2 mini, Nexus 5.
Is there anything that can be done?

Closing super old thread.


Type guard via if does not make value compatible as argument

TypeScript Version:  2.3.3 (with --strictNullChecks)
The condition test.a ensures that a can not be undefined, thus test should be suitable to be passed as A. Note that test.a is already narrowed down to string.
The reason I declare the fields a and b in Base is so that the if below does not type error on test.a.
Code
interface Base {
    a?: string;
    b?: string;
}

interface A extends Base {
    a: string;
}

interface B extends Base {
    b: string;
}

type Any = A | B;

function source(): Any {
    return {a: ''};
}

function sink(a: A) {

}

let test: Any = source();
if (test.a) {
    const a: string = test.a;
    sink(test);
}

Expected behavior: It compiles.
Actual behavior: error at sink(test):
Error:(27, 10) TS2345:Argument of type 'Any' is not assignable to parameter of type 'A'.
  Type 'B' is not assignable to type 'A'.
    Types of property 'a' are incompatible.
      Type 'string | undefined' is not assignable to type 'string'.
        Type 'undefined' is not assignable to type 'string'.

Based on my experience, if (test.a) will just narrow the type of test.a instead of test, so that if will do nothing for test, you have to use some assertion to narrow the type, for example:
declare function hasA(v: any): v is {a: any};

if (hasA(test)) {
  sink(test);
}

@ikatyang Thanks, that would be an explanation. I guess implementing the suggested feature would add a substantial amount of complexity, then.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.


pull request for e2e test at 01/26/2017 18:26:10

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


afterUpdate is triggered before association is finished with add/save

Sails version: 0.12.10
Waterline version: 0.11.6
Adapter<EMAIL_ADDRESS>Node version: 7.3.0
NPM version: 3.10.10
Operating system: Debian 8 x64

Hi all,
If you add a record to a model and then save it, the afterUpdate lifecycle callback will be called but the model isn't yet associated so you cannot access it with a findOne.
I've made a fresh repo where you can find all steps to very easily reproduce the behaviour. Just clone, lift and look at the console.
Thanks for your awesome work on this project.

up

The save command is badly executed unfortunately 😿. In the next version of Sails/Waterline that's in beta now we actually removed it completely.
But basically the way it works when using .add and .remove is to queue up individual operations to run. Then when you call .save() it first takes what's in the record currently (minus the new operations) and updates the record. So imagine the following situation:
User.findOne({ name: 'foo' }).exec(function(err, user) {
  if (err) {
    return; // handle the error case
  }

  if (!user) {
    return; // handle the missing user case
  }

  // Update the user's name
  user.name = 'bar';

  // Add a pet to the user's pets collection
  user.pets.add({ name: 'fluffy' });

  // Save the user
  user.save(function(err) {
    // user saved and pet added
  });
});

The order looks like:

First run the User.update() command to update the user's name
Then look at any queued up operations and create the pet linking it to the user

So the fact that you have afterUpdate being called without the associated records collections makes sense here.
What we did in Sails v1 is to ditch the instance methods all together. So there is no longer a .add, .remove, or .save method. Instead you have Model.addToCollection and Model.removeFromCollection.
In your case I would refactor it to be a Model method that does the linking and then runs whatever you have in your lifecycle callback. So for example:
// Channel Model
module.exports = {

  attributes: {

    name : {type: 'string'},

    messages: {
      collection: 'message',
      via : 'channels'
    },

  },

  // Now whenever you want to do that logic just call:
  // Channel.linkMessages(123, {}, cb);
  // This is also future proof for Sails v1 because it can easily be updated.
  linkMessages(channelId, messageData, cb) {
    Channel.findOne({ id: channelId }).exec(function(err, channel) {
      channel.add(message);
      channel.save(function(err) {
        Channel.findOne(values.id).populate('messages')
        .then(unpopChannel => {
          console.log(unpopChannel)
          cb();
        });
      });
    });
  }
};

@particlebanana thanks for your message ! I know understand what happen.
I've done something similar than your suggestion :)

And I'll wait for 1.x to refactor


setting up with event-node + tron-gird fails

Hello I just installed tron-cli tried to start a node with tron-grid got the below error (note i created a database, user and pass)
I think the problem is with cloning https://github.com/tronprotocol/java-tron.git branch event_parser as you note in the logs below it could not found the branch. and upon inspection of the git repo indeed no branch named event_parser exists there.
Please help me resolve this
$ tron-cli i
[ TRON-CLI ]: Switched to <Interactive Mode>...

 _________  ____  _  __    _______   ____
/_  __/ _ \/ __ \/ |/ /___/ ___/ /  /  _/
 / / / , _/ /_/ /    /___/ /__/ /___/ /
/_/ /_/|_|\____/_/|_/    \___/____/___/

[ I-MODE ]: Welcome to use troncli interactive mode!
[ I-MODE ]: If you already initialized and fetched code, you can skip this(init) step by enter [skip], otherwise press any key to continue.

[ I-MODE ]: Use latest supported version[<IP_ADDRESS>] of java-tron? ([y]/n)
Y
    Y
[ I-MODE ]: Reset everything? (y/[n]))
y
[ TRON-CLI ]: Creating folders...
[ TRON-CLI ]: Shutting down node(s)...
✓ : process: 91822 is shut down
kill: (91822): No such process
✓ : Folders reset.
✓ : Folders are created:
    <path>/
    └──/tron_nodes
        ├──/fullnode
        ├──/soliditynode
        ├──/eventnode
        └──/gridapi
[ TRON-CLI ]: Downloading full-node jar from released build...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:10<00:00,  9.34it/s]
✓ : .jar file of Fullnode is successfully downloaded
[ TRON-CLI ]: Downloading solidity-node jar from released build...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:12<00:00,  7.74it/s]
✓ : .jar file of Soliditynode is successfully downloaded
[ TRON-CLI ]: Git cloning https://github.com/tronprotocol/java-tron.git-branch: event_parser...
Cloning into '<path>/tron_nodes/eventnode'...
warning: Could not find remote branch event_parser to clone.
fatal: Remote branch event_parser not found in upstream origin
✓ : event-node source code cloned
[ TRON-CLI ]: Git cloning https://github.com/tronprotocol/tron-grid.git-branch: dev...
Cloning into '<path>/tron_nodes/gridapi'...
warning: Could not find remote branch dev to clone.
fatal: Remote branch dev not found in upstream origin
✓ : tron-grid source code cloned
✓ : full node jar move to:
    <path>/tron_nodes/fullnode/full.jar
✓ : solidity node jar move to:
    <path>/tron_nodes/soliditynode/solidity.jar
✓ : initialization finished
[ I-MODE ]: Setting up a private testnet or sync to mainnet? ([private]/main)
private
    private
[ I-MODE ]: Do you want set up event services (event-node + tron-gird)? (y/[n]))
y
[ I-MODE ]: !!! NOTICE: Assume you already installed MongoDB and created user with a role.
[ I-MODE ]: Enter your db name:
tron-test
[ I-MODE ]: Enter your db user-name:
tron-test
[ I-MODE ]: Enter your db user-password:
<pass>
[ TRON-CLI ]: Setting up config files...
✓ : config initialized
✓ : net type set to:
    private
✓ : full-node http request set to listen:
    <IP_ADDRESS>:8500
✓ : solidity-node request set to listen:
    <IP_ADDRESS>:8600
✓ : event-node request set to listen:
    <IP_ADDRESS>:8400
✓ : full-node rpc request set to listen:
    <IP_ADDRESS>:58500
✓ : solidity-node rpc request set to listen:
    <IP_ADDRESS>:58600
✓ : event-node rpc request set to listen:
    <IP_ADDRESS>:58400
✓ : enable in memory db:
    True
✓ : db sync mode set to:
    asynchronous
✓ : save history transaction:
    disabled
✓ : save internal transaction:
    disabled
✓ : db settings stored
Traceback (most recent call last):
  File "<path>/venv/bin/tron-cli", line 5, in <module>
    troncli.cli.main()
  File "<path>/venv/lib/python3.10/site-packages/troncli/cli.py", line 281, in main
    cbox.main([init, config, run, stop, status, quick, log, version, i])
  File "<path>/venv/lib/python3.10/site-packages/cbox/cli.py", line 117, in main
    exitcode = executor(func, argv, input_stream, output_stream, error_stream)
  File "<path>/venv/lib/python3.10/site-packages/cbox/executors.py", line 50, in _execute_multi_cmd
    return funcs_dict[subcmd](**func_kwargs)
  File "<path>/venv/lib/python3.10/site-packages/cbox/cli.py", line 79, in wrapper
    return f(*args, **kwargs)
  File "<path>/venv/lib/python3.10/site-packages/troncli/cli.py", line 260, in i
    config(choose_your_poison['nettype'], 0, 0, 0, 0, 0, 0, '', '', '', '', 0,
  File "<path>/venv/lib/python3.10/site-packages/cbox/cli.py", line 79, in wrapper
    return f(*args, **kwargs)
  File "<path>/venv/lib/python3.10/site-packages/troncli/cli.py", line 96, in config
    loop.run_until_complete(config_handler.store_db_settings(dbname, dbusername, dbpassword, gridport))
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "<path>/venv/lib/python3.10/site-packages/troncli/h_config.py", line 302, in store_db_settings
    await self.change_eventnode_db_settings()
  File "<path>/venv/lib/python3.10/site-packages/troncli/h_config.py", line 318, in change_eventnode_db_settings
    self.phrase.store_json2javabeanconfig_to_file(self.eventnode_db_properties, _target_file_path_sol)
  File "<path>/venv/lib/python3.10/site-packages/troncli/utils.py", line 366, in store_json2javabeanconfig_to_file
    f = open(target_file_path, 'w')
FileNotFoundError: [Errno 2] No such file or directory: '<path>/tron_nodes/eventnode/src/main/resources/mongodb.properties'

Actually there is 2 cloning that failed:

https://github.com/tronprotocol/java-tron.git-branch: event_parser
https://github.com/tronprotocol/tron-grid.git-branch: dev

[ TRON-CLI ]: Git cloning https://github.com/tronprotocol/java-tron.git-branch: event_parser...
Cloning into '<path>/tron_nodes/eventnode'...
warning: Could not find remote branch event_parser to clone.
fatal: Remote branch event_parser not found in upstream origin
✓ : event-node source code cloned
[ TRON-CLI ]: Git cloning https://github.com/tronprotocol/tron-grid.git-branch: dev...
Cloning into '<path>/tron_nodes/gridapi'...
warning: Could not find remote branch dev to clone.
fatal: Remote branch dev not found in upstream origin
✓ : tron-grid source code cloned


Can  not get property type in decorator

I can not get type of property if is array and can not get optional (?) from decorator
Hope that TS will update it in next version

To expedite the triage process, we need everyone to follow the issue template and instructions.
When you clicked "Create New Issue", the issue form was pre-populated with a template and some instructions. We need you to read those instructions completely, follow them, and then fill in all the fields in that template.
We are not able to assist with issues that don't follow the template instructions as they represent a significantly larger amount of work compared to issues which are correctly specified. Thank you for understanding.


Replacing ProcessList with new version with more useful information

Fixes #
Proposed Changes

The file fails 2 of the automatic tests
use materialize on "let processEvents" to avoid running twice, and also so that "processes" and "parnts" run on the same dataset.
2+. union: consider using "isfuzzy=true" JIC?
summarize: maybe remove the "by Computer". This is a host insight, and baseQuery already filtered by Host. variations in Computer capitalization would result in line duplication

The file fails 2 of the automatic tests
use materialize on "let processEvents" to avoid running twice, and also so that "processes" and "parnts" run on the same dataset.
what is the time scope of "let processEvents"?
union: consider using "isfuzzy=true" JIC?
summarize: maybe remove the "by Computer". This is a host insight, and baseQuery already filtered by Host. variations in Computer capitalization would result in line duplication

Fixed all.


grep 2.27 breaks when building weechat in cmake from git and strace 4.15 fails on tracing it.

I've been using an arch userspace for a while, and I had been able to build tmux and weechat from git in the past, but it seems like the new versions of grep (and maybe cmake) are causing failures while building tmux and weechat from git source.
Both tmux and weechat are failing to build from git, because cmake is spitting out garbage that looks like:
-- Found GCRYPT: grep: (standard input): Operation not permitted
Moreover, when I try to strace cmake, I get the following error
strace: PTRACE_SETOPTIONS: Invalid argument
which then locks up and can't be killed with ctrl-c (not because of 15002, it also happened in 14986), so
I'm having trouble pinning down exactly what operation is not permitted.
I made a big tarball of my arch rootfs, and I'm willing to host it on my own server for the devs, but I would like permission first, and instructions on who to e-mail a password and username to grab a copy.  You should be able to just un-tar and chroot into it to test building weechat from git (git clone the repo, cd into the cloned repo, mkdir build, cd build, cmake ..).
EDIT: Most recent post has narrowed this down to just two things. Looks like it's not a glibc problem
`

A whole Arch chroot is a pretty big repro nut. Can you get grep to fail in your Arch environment with Operation not permitted on it's lonesome? Like say: grep hello < `echo hello` ?
Also what version does strace -V give you? That might be notable, because if they are using a new PTRACE_SETOPTIONS it'll eventually hit a Ubuntu release too.

Okay; best I can tell, strace broke with this change here on Nov 26, 2016, and first appeared in version 4.15 on Dec 14.
That PTRACE_O_TRACEEXIT ptrace(2) option was introduced in Linux 2.5.60 in 2003, but strace didn't use it (AFAICT) until a couple of months ago. There could be secondary effects causing the eventual fail, but that's the crux. Not related to Arch of course. 4.15 fails on Xenial all the same.
4.14 (Oct 4, 2016) is good though. You can track down your cmake/grep (or possibly neither) related issue by running that version. On Arch do:
git clone https://github.com/strace/strace.git
cd strace
git checkout v4.14
./bootstrap
./configure
make
sudo make isntall

...then /usr/local/bin/strace -f <whatever>. Though, if Arch bleeds so bad as to be using a December strace, you could be hitting any number of things there.

Yep. I filed precisely because these changes came from up-upstream and will be making it into ubuntu one day or another. Going to test this all in a couple of hours, just got up to get some water 😴 😪

@therealkenc Yep, it's strace 4.15.  I rolled back to the 4.14 I had in the pacman cache and now am able to get a nice big strace off.

[pid  1513] fstat(0, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[pid  1513] lseek(0, 0, SEEK_CUR)       = -1 ESPIPE (Illegal seek)
[pid  1513] read(0, "\n", 32768)        = 1
[pid  1513] splice(0, NULL, 1, NULL, 32768, SPLICE_F_MOVE) = -1 EPERM (Operation not permitted)

Doubtful that is coming from grep proper. Probably gnulib (sic), but that's only an educated guess.

@therealkenc I rolled grep back to 2.26 and it works fine again, so it's definitely one of the files in the grep pkg.tar.xz, which seems to only be grep and its executable symlink aliases fgrep and egrep.

Dunno. I just grabbed 2.27.36 from the source. It seems to work in isolation. Academic. The problem is that splice(2) from your dump, which I don't think has been reported before.

@therealkenc Hmm. Curiouser and curiouser.  Well, does the 2.27 binary I just posted work for you?

Any binaries from Arch are going to use shared libs I don't have. They don't run.
Anyway, turns out it is grep proper after all. Change on Nov 19th here. Because grep, a program whose functionality hasn't materially changed since the 1980s, needs a Linux-specific system call in 2016. For performance. Or something.

@therealkenc Also, when I tried building grep from the source, it seems that m4/autom4ke is giving the same weird kind of error:
/usr/bin/m4: m4_esyscmd subprocess failed: Operation not permitted
/usr/bin/m4:configure.ac:22: cannot run command `build-aux/git-version-gen .tarball-version': Operation not permitted

Yeah looks like it might be the lseek(), not necessarily (or possibly in addition to) the splice(). I've seen that lots of times in WSL before; for example (random pick) here. Usually it's a soft fail though. And yes, everyone on the bleeding edge is going to faceplant into #1005, which is why I speculated glibc up-thread.
So you have three "actionable and reproducible issues" here.

ptrace() PTRACE_O_TRACEEXIT fails with EINVAL
splice(0, ..., SPLICE_F_MOVE) fails with EPERM
lseek(0, 0, SEEK_CUR) fails with ESPIPE

Vote for me on User Voice...

@therealkenc Sure, could you link the uservoice things?

Don't know if they exist (likely not). Or you can re-task this issue to "Upgrade Yakety to ZestyZapus" similar to #482.

I'll ping @stehufntdev and @benhillis since these are all bugs/missing features that will be coming up specifically in developer tools (m4, grep, and strace) in the next few months.
(Devs, my offer of a rootfs tarball ready to go is still available!)

Thanks for bringing this to our attention.  I know @dethoma is aware of this and will assign somebody to investigate.  I agree with @fpqc and @therealkenc that this is should be a high-priority issue since we do not have control over when Ubuntu may decide to update these packages.

Not having control over Ubuntu releases is a tough situation; though, not really different than Ubuntu having no control over their upstream. Xenial won't end-of-life until 2019, and you'd be hard pressed to find a specific credible "development use case" that requires Yakety or ZestyZapus right now or in the next few months. Plenty of "high priority" stuff (for some value of "high") still broken in Trusty/Precise/Wily on WSL too (where grep works fine). OTOH, heading off the shower of duplicate issues and consummate telemetry hits as people do-release-upgrade -d definitely has it's own appeal.

@fpqc thanks for the offer of the tarball, appreciate the help here.  We should be able to repro this locally but will hit you up if we end up needing the tarball.

@stehufntdev Also one last program to look at is the newest version of bison.  I also noticed that was breaking some of the things.

@therealkenc @fpqc Thank you for the investigations, they made our job much easier!
For the grep issue, we have fixed the issue with splice() failing. The only test case that I saw failing was piping the output to /dev/null: ls | ./src/grep a > /dev/null, which now works after the fix. If you guys encounter any failing other test cases please let us know and we can try them out.

@benhillis So since the grep thing (with splice()) is fixed now as of 15025, and the other issues are being tracked ( #555 and #1005 ), should I close this?

@fpqc - sounds good to me, thank you!

I'm going to title change and close then.


Poolboy statem

Improve the model, remove some quirks and fix an atomicity problem with kill_idle_worker

Works for me, and I learned a lot in the process. Many thanks, again!