text:
Attempting to fix failures due to LCM/GCM flags

Fixes # .
Did you remember to?

[ ] Add test case(s)
[ ] Update CHANGES.txt
[ ] Auto applied styling via ./gradlew autostyleApply

We encourage pull requests that:

Add new features to TestNG (or)
Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.
Note: For more information on contribution guidelines  please make sure you refer our Contributing section for detailed set of steps.

@juherr @vlsi - I need help with figuring out where to start looking in terms of fixing the failures. They are obviously flaky tests which seems to suggest either the functionality has a bug that's not obvious to the naked eye or perhaps the test needs to be refactored.
The failures seem to be tied to the StressLCM and StrressGCM flags on the JVM. I am having a hard time trying to figure out how to reproduce the issues locally as well.
For e.g., the build suggests that I can use the below command to reproduce the problem
TZ="Pacific/Chatham" ./gradlew build -Duser.country=FR -Duser.language=fr -Ptestng.test.extra.jvmargs="-Duser.country=FR -Duser.language=fr -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:+StressLCM" -PtestDisableCaching="JIT randomization should not be cached"

Action runs logs available at  https://github.com/testng-team/testng/actions/runs/8321962523/job/22768998250?pr=3094
The test that am trying to fix https://scans.gradle.com/s/ibv2y77of77xc/tests/task/:testng-core:test/details/test.listeners.ListenersTest/ensureOrderingForTestListenersViaApi?top-execution=1
As obvious, this test runs fine without the flags.

It turns out there's StressSeed=N parameter to make StressGCM/StressLCM repeatable: https://bugs.openjdk.org/browse/JDK-8253765, however, the option was added in Java 16 only.
So the options could be:
a) Try running the test multiple times
b) Try searching for a global shared fields with "listeners". It might be that there's a global static field that gets overwritten when tests execute concurrently
c) Try adding StressSeed, however, it would be Java 16+ only, and it would probably require the same architecture. In other words, if your machine is ARM and CI uses Intel, then you might be unable to reproduce the failure exactly. It is worth adding StressSeed, however, I am not sure it would gain much help in this case though

@vlsi - Thank you so much for responding back. I am still on the Intel architecture :) So that part can be excluded out. Let me see if I can bump up to JDK17 and use StressSeed

@vlsi - I tried all the 3 options but still not able to reproduce the issue locally. I even went back to checking if there's anything that stands out in this PR, which introduced the test, to see if anything that stands out. Nothing there as well.
I have additionally tried to create a main() method that looks like below
  public static void main(String[] args) throws InterruptedException {
    String arguments = String.join(" ", ManagementFactory.getRuntimeMXBean().getInputArguments());
    System.err.println("Arguments = " + arguments);
    ListenersTest object = new ListenersTest();
    for (int i=1; i<= 10000; i++) {
      object.ensureOrderingForTestListenersViaApi();
      TimeUnit.MILLISECONDS.sleep(500);
    }
  }

and have executed this with the JVM flags
-Duser.country=FR -Duser.language=fr -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:StressSeed=10 -XX:+StressLCM

Still no luck. It feels like I am running around in circles :( Any other pointers on how to be able to reproduce the issue? In the meantime, I will try to refactor the tests to see if it can capture the problem properly. I have a vague feel that the test that is expected to timeout, doesn't seem to do so (at-least that is what i am inferring from the failures)

InvokedMethodListenerHolder and SuiteListenerHolder look suspicious as they contain static shared LOGS list that might be modified from multiple concurrent threads. Have you checked race conditions for those lists? Can the lists be made non-static? (==avoid sharing the lists between tests)

InvokedMethodListenerHolder and SuiteListenerHolder look suspicious as they contain static shared LOGS list that might be modified from multiple concurrent threads. Have you checked race conditions for those lists? Can the lists be made non-static? (==avoid sharing the lists between tests)

Yes, that's the part that I was thinking of refactoring, because that's the only place which looks suspicious to me as well. Am glad that I was thinking in the same direction. Let me try and refactor the tests and see if that helps. Thanks for taking a closer look and helping out @vlsi

Closing this PR since I have now raised a new PR https://github.com/testng-team/testng/pull/3098

authors: krmahadevan vlsi

repo: testng-team/testng


text:
Adds allocation examples in Rust and TinyGo

This adds memory allocation examples for Rust and TinyGo. e.g. How to pass strings in and out of WebAssembly functions.
$ go run say-hello.go wazero
Hello, wazero!

rust - Calls Wasm built with cargo build --release --target wasm32-unknown-unknown
tinygo - Calls Wasm built with tinygo build -o X.wasm -scheduler=none -target=wasi X.go

Note: The above are language-specific because there's no WebAssembly
specification for memory allocation. This mean exported functions are different
and how pointers map to parameters are different. That said, the examples are
as close to the same as possible with subtle differences and gotchas mentioned
in the respective README files.
Fixes #471

Need to all allocation/deallocation from Go to this and pull out the null-terminated strings thing into a separate PR

ok Rust is pretty ok I think. I'll add the TinyGo next before a data structure example

PS one thing noted in README etc is that we aren't trying to artificially make all types of memory patterns explained.
Ex CString just because Rust (and CGO) use it. Go code doesn't think in terms of CString, so our Go example shouldn't use it.
That said, I intentionally didn't use CString in Rust because doing so leaves the end of the byte range as a search function. That would make the example not really useful if you are trying to figure out how to pass back and forth other serialized data which isn't NUL terminated. Moreover, rust has a book on this stuff, so we don't need to attempt to replicate that.

yeah I'll do that. Indeed I forgot

I'm still thinking about if we can know where the binary originates from before hand, how about having one single host code where we have if block for each language specific logics (finding allocator/deallocator)

I'm still thinking about if we can know where the binary originates from before hand, how about having one single host code where we have if block for each language specific logics (finding allocator/deallocator)

hmm isn't this doing that quite explicitly both in directory and the link on the helloWasm variable?
I don't think mixing and matching rust and tinygo is a good idea frankly, it is wildly confusing what each do.

source: gharchive/pull-request

authors: codefromthecrypt mathetake

repo: tetratelabs/wazero

license_type: permissive

license_source: github-api


text:
Request for transfer to textlint-ja organization

@takahashim こんにちは。
パッケージの管理についてのご相談です。
いろんな人でルールのメンテナンスを行えるように、パッケージを https://github.com/textlint-ja で管理できるようにしたいです。
具体的には次のあたりのアップデートをしていきたいです。

textlint-scriptsの利用
kuromoji@2 へアップデート

GitHubとnpmどちらもtextlint-jaのorganizationがあるため、そちらにリポジトリとパッケージの権限を移すことで、
複数人でメンテナンスできるようになります。
以下にtextlint-jaのポリシーを書いてあります。

textlint-ja/textlint-ja: textlintの日本語コミュニティ

もしパッケージを https://github.com/textlint-ja に移すのが大丈夫なら、GitHubとnpmでそれぞれ招待をお送りします。

@azu はい、textlint-ja organizationにtransferするのは問題ないです。
どういう手順で作業するのがよいですか？

@takahashim ありがとうございます。
GitHubとnpm それぞれ textlint-ja へのinviteをお送りしたので、メールが来ていると思います。
Organizationに参加できたら

GitHub: https://github.com/takahashim/textlint-rule-no-doubled-conjunction/settings から"Transfer"で textlint-ja にリポジトリを移譲
npm: https://www.npmjs.com/settings/textlint-ja/teams/team/developers/access から"Add Packages to developers" に textlint-rule-no-doubled-conjunction を追加

でパッケージの権限がそれぞれ移行できると思います。
https://github.com/textlint-ja/textlint-ja#for-new-member

後 https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga の方もお願いしようと思っていたのですが、同じようにIssueを作成したほうが良さそうですかね?

takahashim/textlint-rule-no-doubled-conjunctive-particle-ga も合わせてtransferしてみました。
これで良さそうですか？

ありがとうございます！ おそらく大丈夫だと思います。
リポジトリ情報を更新するPR出してみます。

npm の方もCollaborators追加されているので問題なさそうです。

リポジトリの情報を更新しました #4

* textlint-scriptsの利用
* kuromojin@2 へアップデート

この辺も合わせてやっていきますね

source: gharchive/issue

authors: azu takahashim

license: MIT


text:
Templates API Parameter should be called content not body

Fix bug with creating templates due to a incorrectly named parameter

Any ETA on getting this merged? As we currently have to point at a custom DLL as the nupkg does not work for our needs due to this issue.
Thanks

Thank you for your PR, we fixed these methods and updated corresponding tests as well.

repo: textmagic/textmagic-rest-csharp

license: mit

license_source: bigquery


text:
Calculate block header hash on decoding

Now the block hash is calculated on encoding and stored along with other fields. Similar approach can be used for other messages, but I would prefer to finish with removing serde first.

@bkontur The fix is far from perfect, and probably it is even better to postpone it after encoding is redesigned, to do that properly. And now we can just give this changes to @dkuehr so he can continue fuzzing.

repo: tezedge/tezedge


text:
Projectile Aimbot's "Prediction Time" should be ignored on buildings

Setting "prediction time" to 1 second makes aimbot unable to shoot at buildings that are more than 1 second away
they can't move.. so uh.. projectile aimbot should ignore prediction time when targeting unmovable objects

movement simulation isnt used on buildings and iirc max pred time isnt taken into account for them

movement simulation isnt used on buildings and iirc max pred time isnt taken into account for them

re-open dummy
I wouldn't have made the issue if I didn't test it in the first place

Baan moment....

https://user-images.githubusercontent.com/17802843/170620013-5647798a-78ea-4ef0-b372-5e188ce0c5b2.mp4

authors: SylveonBottle femboy-boop xxmyn

license: WTFPL


text:
Fix Typos

This PR change indentations to standardize files.

I tried to use yamllint and it didn't work because of helm template syntax, like conditionals {- if ... }.

This PR should be called "tenho mais nada pra fazer".

repo: tfinardi/gitops-arquitex


text:
Fetch withRelated creates bad related collection

Using these models, the following creates an entry in the join table that is missing the source object's id (which in this case is person_id).
Person.collection().fetch({ withRelated: 'cars' }).then(function(people) {
  return people.at(0).related('cars').create({ model: 'Jetta'})
});

Using fetch without the withRelated works. Using fetchOne also works, and actually still works if the withRelated is provided.
By the way, I may have a few more questions/issues that I'll be submitting over time. I'm still experimenting with the library and I like it a lot. I'm having a little difficulty getting started because a few of the finer points of how the library works are still new to me. This could be because I'm not coming from Backbone. Anyway, I'll try to keep track of the examples that I'm working through, and perhaps this is something that we could add to a guide.
Thanks!

Somehow I missed this issue when I created the other one. I'm closing this as duplicate of #629, since the newer one has more information and a workaround for anyone with this issue.

authors: ricardograca wbyoung

repo: tgriesser/bookshelf


text:
Dutch translation

I've added the dutch translation.

Thanks @goowikns!

authors: goowikns rhys-vdw

repo: tgriesser/checkit


text:
Can Knex support more features on where()?

Can Knex support following features in where()

where("id", undefined)
Can it same as "id is null", currently it will return "id = NULL" and cause sql fail.
where({id: 1, name: undefined})
Can it same as "andWhere("id", 1)"? and ignore name is undefined?
where(id, [1,2,3])
Can it same as "WhereIn"?

Write 2-3 lines code will support such features. I want to know why Knex not support them but choose to cause the generated SQL fail.

2 and 3 have both been discussed in recent issues and declined. You can use the issue search and probably dig those up without too much difficulty.
Gonna say no on 1 as well. You expect it to work a certain way, but there's an immediate contradiction between 1 and 2. undefined can't be stripped sometimes and null other times with different syntaxes.
We're going to keep everything explicit for know but are happy to entertain proposals if they can maintain clear and predictable behavior.

Thanks, I got it.

authors: bendrucker jchbh-duplicate

repo: tgriesser/knex


text:
How do I pgcrypto module with Knex?

Do you have examples?

knex('test')
.select(knex.raw("convert_from(decrypt(pw,?,'aes'), 'utf-8') as pass", ['PASSKEY']))
.then(function(result) {
});

related to #864


text:
Timeout errors shouldn't silently ignore the passed errors

but rather reject with original error. Fixes #2582

Sorry for huge delays of hauling through issues, we've been having few weeks sunny days here :)

i just wrote test to another branch which fails without these changes, so all good and test is on its way.

authors: elhigu wubzz


text:
Add tests for multiple union arguments with callbacks and builders

I've been sending pull requests the TypeScript DefinitelyTyped repo when I've found things like this, but I thought it might be nice to also upstream some test changes as I run across cases that aren't being covered already and are ambiguous in the documentation. I'll also open a documentation PR that disambiguates this, too.
Most of these tests are superfluous once/if knex moves to TypeScript, since it is more or less just type assertions.

Thanks!

authors: scotttrinh wubzz


text:
What happens to wifi advertising if we aren't connected to a wifi endpoint?

Setup:
Start Thali, turn on advertising, make sure the phone is NOT connected to a wifi endpoint. What errors do we get in the log? How does our SSDP stack handle this? Does it fail? Does it keep retrying even though there is nobody listening since we aren't on Wifi?

I am implementing a new app.js that will show this behaviour.

We have a guard in thali/NextGeneration/thaliWifiInfrastructure.js:515 so we will receive a rejection from thali/NextGeneration/thaliWifiInfrastructure.js:246 and our call thaliWifiInfrastructure.startUpdateAdvertisingAndListening() will be rejected.
I will comment this guard and test again.

Per our conversation let's leave the guard and then we can just call the new Wifi api @vasilevskayaem wrote to turn off wifi and see what happens in the ADB logs.

So my previous comment is wrong. The whole point of this test is to see what happens if Wifi is on but is not connected to anything. So the wifi API we got from @vasilevskayaem won't help as it only turns wifi on and off. What we need is a manual test where we turn the test on with wifi running and then only later do we manually keep wifi on but kick the phone off any access point.

10-17 18:28:15.644 23380 23427 I jxcore-log: 2016-10-17 15:28:15 - ERROR TestsProcess: 'uncaught promise rejection, error: 'AssertionError: Attempting to clear a non-existing interval', stack: 'notEqual@assert.js:144:1
10-17 18:28:15.644 23380 23427 I jxcore-log: SsdpServer.prototype._stopAdLoop@/data/data/com.test.thalitest/files/www/jxcore/node_modules/node-ssdp/lib/server.js:95:3
10-17 18:28:15.644 23380 23427 I jxcore-log: SsdpServer.prototype.stop@/data/data/com.test.thalitest/files/www/jxcore/node_modules/node-ssdp/lib/server.js:75:3''

I've found that testUtils.toggleWiFi is not reliable.

I've commented the line assert.notEqual(this._adLoopInterval, null, 'Attempting to clear a non-existing interval') and both clients succeeded with test.

Andrew wants to put in some debug into the SSDP library so we can understand it and then we will close this bug in favor of thaliproject/Thali_CordovaPlugin#1345

We need to stub logs with console
    ['trace', 'debug', 'info', 'warn', 'error', 'fatal'].forEach(function (level) {
      stubs[level] = function () {
        console.log.apply(console.log, arguments);
      }
    })

authors: andrew-aladev yaronyg


text:
Enforcing v2 of AWS IDMS causes Access Denied error

Thanos, Prometheus and Golang version used:
name: "thanosio/thanos",
version: "0.13.0",
tag: "v0.13.0",
checksum: "sha256:743e5a7df61d67a16fd3e27fae4cae2af335cfe36f8b210240b2c14e9839b2a7"

name: "prom/prometheus",
version: "2.19.2",
tag: "v2.19.2",
checksum: "sha256:cd134bd4fca0f60ff8b4c679cebe5c5c5cf5e2da5f4886b2ae933da821915f92"

Note: I've also tried with the latest stable version of Thanos (0.14) but the same error appeared.

Object Storage Provider:
What happened:
Following AWS security recommendations I have enforced usage of v2 IDMS on EC2 instances of Thanos Compactor. This has caused the following error to appear in logs:
{
    "caller": "runutil.go:98",
    "err": "BaseFetcher: iter bucket: Access Denied",
    "level": "error",
    "msg": "function failed. Retrying in next tick",
    "ts": "2020-08-28T20:05:24.151455425Z"
}

which seems to be coming from fetcher.go file, which in turn seems to be using Minio library. (I wonder if upgrading Minio could help at all).
Also note that when I remove the policy, error reliably disappears, so it shouldn't be related with permissions to access a bucket.
What you expected to happen:
No errors.
How to reproduce it (as minimally and precisely as possible):
Enforce v2 of IDMS on Compactor EC2 instance, which includes two steps:

set metadata_options.http_tokens to "required"
add an IAM instance policy to Compactor Amazon EC2 instance to enforce usage of v2 of IDMS

{
  "Sid": "RequireAllEc2RolesToUseV2",
  "Effect": "Deny",
  "Action": "*",
  "Resource": "*",
  "Condition": {
    "NumericLessThan": {
      "ec2:RoleDelivery": "2.0"
    }
  }
}

Full logs to relevant components: N/A
Anything else we need to know: N/A

Looks like we need to investigate / find out how to enable  v2 IDMS with minio library. Help wanted! (:

I've looked at the minIO documentation, and it seems like it doesn't have support for IDMSv2.
Is there a reason for using minIO rather than the AWS SDK?

stale bot, we still need this.

Still needed.

Still needed.

👍  Still needed

I think this is still to be resolved. I'm not sure why the stale bot ignored my comment.
Any ideas @bwplotka?

Is it still to be resolved?
Enforcing IMDSv2 is crucial for us too

I believe this is still needed.  I don't know why the issue was closed.

@bwplotka Can you un-close this?
It's definitely still needed..

Looks like Minio now supports this IDMS v2 (https://github.com/minio/minio-go/pull/1489) and so probably just needs a Thanos-side code change?

authors: bwplotka felipewnp markmsmith mateuszwieloch saputkin wjam

repo: thanos-io/thanos


text:
Liking/favoriting notes

Liking/favoriting notes
See a list that contains only those liked/favorited notes (shortlisting)

I'm implementing this for Note Details page


text:
Hi,There centos7.x installation script it?

Hi,There centos7.x installation script it?

Hi, @sonwa, support for CentOS 7 is on its way: #11

👍

CentOS 7 script is in progress. @jeeftor, please check with actual state of the project and let us know in issue if you run to anything. Thanks.

authors: jeeftor rbukovansky sonwa

repo: thawkins/fedora-swift


text:
[Web] What Happens When You Type google.com

Easily one of the most need-to-know workflows for web developers and good, practical knowledge for others.

Good find! I skimmed it, and it looks interesting.

authors: jdconner jesselpalmer


text:
list view card not centered

List view cards are not centered in the page on a smaller screen. should ideally be smaller and centered

screen details: 13" m1 macbook pro

fixed

repo: the-rarbg/yaps


text:
Integration with django app

I want to call the detect module in my django app could you tell me possible step I could do to call the function or module directly by passing image to detect.py

Did you get the answer?


text:
Fix clear cache when using default cache

Improves the clear_cache function

Argument cache_dir is now optional.
It doesn't fail with relative paths anymore ~/.fastf1
It clears the default path if no cache_dir is provided to the function

Fixes #271
Example usage
python3
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fastf1
>>> fastf1.api.Cache.clear_cache()
>>> session = fastf1.get_session(2021, 'Spanish Grand Prix', 'Q')
api         WARNING

DEFAULT CACHE ENABLED!
	Cache directory: /home/oscar/.cache/fastf1.
	Size: 7.63 MB
>>> session.load()
core           INFO 	Loading data for Spanish Grand Prix - Qualifying [v2.3.0]
api            INFO 	No cached data found for driver_info. Loading data...
api            INFO 	Fetching driver list...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for timing_data. Loading data...
api            INFO 	Fetching timing data...
api            INFO 	Parsing timing data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for timing_app_data. Loading data...
api            INFO 	Fetching timing app data...
api            INFO 	Data has been written to cache!
core           INFO 	Processing timing data...
api            INFO 	No cached data found for session_status_data. Loading data...
api            INFO 	Fetching session status data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for track_status_data. Loading data...
api            INFO 	Fetching track status data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for car_data. Loading data...
api            INFO 	Fetching car data...
api            INFO 	Parsing car data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for position_data. Loading data...
api            INFO 	Fetching position data...
api            INFO 	Parsing position data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for weather_data. Loading data...
api            INFO 	Fetching weather data...
api            INFO 	Data has been written to cache!
api            INFO 	No cached data found for race_control_messages. Loading data...
api            INFO 	Fetching race control messages...
api            INFO 	Data has been written to cache!
core           INFO 	Finished loading data for 20 drivers: ['44', '33', '77', '16', '31', '55', '3', '11', '4', '14', '18', '10', '5', '99', '63', '22', '7', '47', '6', '9']
>>> fastf1.api.Cache.get_default_cache_path()
'~/.cache/fastf1'
>>> import os
>>> cache_dir = fastf1.api.Cache.get_default_cache_path()
>>> cache_dir = os.path.expandvars(cache_dir)
>>> cache_dir = os.path.expanduser(cache_dir)
>>> fastf1.api.Cache._get_size(cache_dir)
60721287
>>> fastf1.api.Cache.clear_cache()
>>> fastf1.api.Cache._get_size(cache_dir)
8003584

Thanks, looks good.

authors: oscr theOehrly


text:
Adds collectable songs

Resolves #160

Codecov Report

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

@@            Coverage Diff            @@
##            master      #161   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         1
  Lines           48        48
  Branches         6         6
=========================================
  Hits            48        48

Impacted Files
Coverage Δ

src/turbot/data.py
100.00% <ø> (ø)

Continue to review full report at Codecov.

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

authors: codecov-io lexicalunit

repo: theastropath/turbot


text:
There is an issue to retrieve profile info in Android

Profile.getCurrentProfile() always returns null at the first time when calling it in Android after LoginManager.logInWithPermissions(['public_profile','email'])

Same, here!

@AhmedSharawyFCIS https://github.com/thebergamo/react-native-fbsdk-next/issues/73#issuecomment-1043025601

@salao-na-mao I repeat my comment from that issue:

without a PR, it won't advance - but I'd be happy to collaborate. Could you make a PR? Please pay special attention to the documentation for it, to make sure people understand it is a Promise (asynchronous resolution) and could be a bit delayed.
I would also want to make sure that it timed out in some way - is there a chance this could hang and never resolve? That would not be acceptable - it would violate the caller's expectation of the API, so if there is not a timeout in the underlying call we would need to make it interruptible and set a timeout ourselves

authors: AhmedSharawyFCIS mikehardy salao-na-mao

repo: thebergamo/react-native-fbsdk-next


text:
Liana wallet update

I get confirmation from one of their developoer that their Liana wallet fully support Taproot (P2TR):
https://github.com/wizardsardine/liana/issues/1497

fixed. thanks

repo: thebitcoinhole/software-wallets


text:
(Fix) simple hot fix. Problem with keyType unknown. Ignore this situa…

Fix issue 69. Fix problem with "No accounts loaded".

Hi @staseek, any updates?
I'll merge this for now, but waiting for you to take a look at the #71 issue.
Thanks for your contribution! 🥇

authors: staseek thedemons

repo: thedemons/opentele


text:
JS_DuplValue / JS_FreeValue support in quickjs_sys bindings?

Hi,
i'm using your quickjs_sys crate for my own version of a wrapper lib (https://github.com/HiRoFa/quickjs_es_runtime) and was wondering why the JS_DupValue and JS_FreeValue from quickjs.h are not available,
Upping and downing the refcount ourselves by casting and deciding when to free seems a bit hacky?
see https://github.com/HiRoFa/quickjs_es_runtime/blob/master/src/valueref.rs#L83 for my updated version of OwnedValueRef
the quickjs impl of JS_DupValue and JS_FreeValue pretty much seem to do exactly what i do with increment_ref_count and decrement_ref_count.

Those are static inline functions, which are not available to Rust code without extra work.
This forum thread has some background and a workaround.
Back then I found it easier to just duplicate them in Rust, though using the official code would be cleaner.
A PR using the method described in the link would definitely be welcome.

PS: I didn't have a lot of time for this repo, but I had planned to clean it up and extend the feature set this and next month, where I have some free time.
I planned for module loading, async integration, timers/intervals, ...
I'd be happy to collaborate!

Hi Thx, i will look into it.
I allready have module loading and a lot of async stuff working in my repo, i wanted to extend your work but i ended up changing so much it turned into a totaly different approach.
i'll let you know if i make any progress on the dup/free val methods.
Kind regards

Thanks!

authors: andrieshiemstra theduke

repo: theduke/quickjs-rs


text:
SSL connection help

I've been trying to connect to PsychicMqttClient for 2 days but I couldn't. I'm using Arduino ide 2.3.4 latest version.
I think it will help to understand the problem.. This connects to server:

#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>

// WiFi Bilgileri
const char* ssid = "test"; // WiFi ağınızın adı
const char* password = "test"; // WiFi şifreniz

// MQTT Sunucu Bilgileri
const char* mqttServer = "bridge.homehome.app"; // MQTT broker adresi
const int mqttPort = 8883; // MQTT broker portu (SSL/TLS)

const char* ca_cert = R"EOF(
-----BEGIN CERTIFICATE-----
MIIFBTCCAu2gAwIBAgIQS6hSk/eaL6JzBkuoBI110DANBgkqhkiG9w0BAQsFADBP
MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy
Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNDAzMTMwMDAwMDBa
Fw0yNzAzMTIyMzU5NTlaMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBF
bmNyeXB0MQwwCgYDVQQDEwNSMTAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDPV+XmxFQS7bRH/sknWHZGUCiMHT6I3wWd1bUYKb3dtVq/+vbOo76vACFL
YlpaPAEvxVgD9on/jhFD68G14BQHlo9vH9fnuoE5CXVlt8KvGFs3Jijno/QHK20a
/6tYvJWuQP/py1fEtVt/eA0YYbwX51TGu0mRzW4Y0YCF7qZlNrx06rxQTOr8IfM4
FpOUurDTazgGzRYSespSdcitdrLCnF2YRVxvYXvGLe48E1KGAdlX5jgc3421H5KR
mudKHMxFqHJV8LDmowfs/acbZp4/SItxhHFYyTr6717yW0QrPHTnj7JHwQdqzZq3
DZb3EoEmUVQK7GH29/Xi8orIlQ2NAgMBAAGjgfgwgfUwDgYDVR0PAQH/BAQDAgGG
MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATASBgNVHRMBAf8ECDAGAQH/
AgEAMB0GA1UdDgQWBBS7vMNHpeS8qcbDpHIMEI2iNeHI6DAfBgNVHSMEGDAWgBR5
tFnme7bl5AFzgAiIyBpY9umbbjAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAKG
Fmh0dHA6Ly94MS5pLmxlbmNyLm9yZy8wEwYDVR0gBAwwCjAIBgZngQwBAgEwJwYD
VR0fBCAwHjAcoBqgGIYWaHR0cDovL3gxLmMubGVuY3Iub3JnLzANBgkqhkiG9w0B
AQsFAAOCAgEAkrHnQTfreZ2B5s3iJeE6IOmQRJWjgVzPw139vaBw1bGWKCIL0vIo
zwzn1OZDjCQiHcFCktEJr59L9MhwTyAWsVrdAfYf+B9haxQnsHKNY67u4s5Lzzfd
u6PUzeetUK29v+PsPmI2cJkxp+iN3epi4hKu9ZzUPSwMqtCceb7qPVxEbpYxY1p9
1n5PJKBLBX9eb9LU6l8zSxPWV7bK3lG4XaMJgnT9x3ies7msFtpKK5bDtotij/l0
GaKeA97pb5uwD9KgWvaFXMIEt8jVTjLEvwRdvCn294GPDF08U8lAkIv7tghluaQh
1QnlE4SEN4LOECj8dsIGJXpGUk3aU3KkJz9icKy+aUgA+2cP21uh6NcDIS3XyfaZ
QjmDQ993ChII8SXWupQZVBiIpcWO4RqZk3lr7Bz5MUCwzDIA359e57SSq5CCkY0N
4B6Vulk7LktfwrdGNVI5BsC9qqxSwSKgRJeZ9wygIaehbHFHFhcBaMDKpiZlBHyz
rsnnlFXCb5s8HKn5LsUgGvB24L7sGNZP2CX7dhHov+YhD+jozLW2p9W4959Bz2Ei
KPpdzvvtTnOPlC7SQZSYmdunr3Bf9b77AiC/ZidstK36dRILKz7OA54=
-----END CERTIFICATE-----
)EOF";

// WiFi ve MQTT istemcileri
WiFiClientSecure wifiClient;
PubSubClient mqttClient(wifiClient);

void setup() {
  Serial.begin(115200);

  // WiFi Bağlantısı
  Serial.print("WiFi'ye bağlanıyor...");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nWiFi bağlantısı tamamlandı!");

  // SSL Sertifikası Ekleme
  wifiClient.setCACert(ca_cert);

  // MQTT Sunucusuna Bağlanma
  mqttClient.setServer(mqttServer, mqttPort);
  mqttClient.setCallback(callback);

  Serial.println("MQTT'ye bağlanıyor...");
  connectToMQTT();
}

void loop() {
  // MQTT bağlantısını kontrol et
  if (!mqttClient.connected()) {
    connectToMQTT();
  }
  mqttClient.loop();
}

void connectToMQTT() {
  while (!mqttClient.connected()) {
    Serial.print("MQTT sunucusuna bağlanıyor...");
    if (mqttClient.connect("ESP32Client")) {
      Serial.println("Bağlandı!");

      // Abonelik ekleme
      mqttClient.subscribe("test/topic");
      Serial.println("test/topic konusuna abone olundu.");
    } else {
      Serial.print("Bağlanılamadı. Hata kodu: ");
      Serial.print(mqttClient.state());
      Serial.println(". 5 saniye sonra tekrar deneniyor...");
      delay(5000);
    }
  }
}

void callback(char* topic, byte* message, unsigned int length) {
  Serial.print("Mesaj alındı. Konu: ");
  Serial.println(topic);

  Serial.print("Mesaj: ");
  for (int i = 0; i < length; i++) {
    Serial.print((char)message[i]);
  }
  Serial.println();
}

Errors in the following code:
23:31:15.336 -> E (46507) mqtt_client: Error transport connect
23:31:30.393 -> E (61566) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
23:31:30.393 -> E (61566) esp-tls-mbedtls: Failed to set client configurations, returned [0x8017] (ESP_ERR_MBEDTLS_SSL_SETUP_FAILED)
23:31:30.435 -> E (61575) esp-tls: create_ssl_handle failed
23:31:30.435 -> E (61579) esp-tls: Failed to open new connection
23:31:30.435 -> E (61583) transport_base: Failed to open a new connection
23:31:30.435 -> E (61590) mqtt_client: Error transport connect
23:31:45.477 -> E (76643) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
23:31:45.477 -> E (76643) esp-tls-mbedtls: Failed to set client configurations, returned [0x8017] (ESP_ERR_MBEDTLS_SSL_SETUP_FAILED)
23:31:45.477 -> E (76652) esp-tls: create_ssl_handle failed

//Testing PsychicMqttClient....

#include <Arduino.h>
#include <WiFi.h>
#include <PsychicMqttClient.h>

const char ssid[] = "test"; // your network SSID (name)
const char pass[] = "test"; // your network password

const char* root_ca = R"EOF(
-----BEGIN CERTIFICATE-----
MIIFBTCCAu2gAwIBAgIQS6hSk/eaL6JzBkuoBI110DANBgkqhkiG9w0BAQsFADBP
MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy
Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNDAzMTMwMDAwMDBa
Fw0yNzAzMTIyMzU5NTlaMDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBF
bmNyeXB0MQwwCgYDVQQDEwNSMTAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDPV+XmxFQS7bRH/sknWHZGUCiMHT6I3wWd1bUYKb3dtVq/+vbOo76vACFL
YlpaPAEvxVgD9on/jhFD68G14BQHlo9vH9fnuoE5CXVlt8KvGFs3Jijno/QHK20a
/6tYvJWuQP/py1fEtVt/eA0YYbwX51TGu0mRzW4Y0YCF7qZlNrx06rxQTOr8IfM4
FpOUurDTazgGzRYSespSdcitdrLCnF2YRVxvYXvGLe48E1KGAdlX5jgc3421H5KR
mudKHMxFqHJV8LDmowfs/acbZp4/SItxhHFYyTr6717yW0QrPHTnj7JHwQdqzZq3
DZb3EoEmUVQK7GH29/Xi8orIlQ2NAgMBAAGjgfgwgfUwDgYDVR0PAQH/BAQDAgGG
MB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATASBgNVHRMBAf8ECDAGAQH/
AgEAMB0GA1UdDgQWBBS7vMNHpeS8qcbDpHIMEI2iNeHI6DAfBgNVHSMEGDAWgBR5
tFnme7bl5AFzgAiIyBpY9umbbjAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAKG
Fmh0dHA6Ly94MS5pLmxlbmNyLm9yZy8wEwYDVR0gBAwwCjAIBgZngQwBAgEwJwYD
VR0fBCAwHjAcoBqgGIYWaHR0cDovL3gxLmMubGVuY3Iub3JnLzANBgkqhkiG9w0B
AQsFAAOCAgEAkrHnQTfreZ2B5s3iJeE6IOmQRJWjgVzPw139vaBw1bGWKCIL0vIo
zwzn1OZDjCQiHcFCktEJr59L9MhwTyAWsVrdAfYf+B9haxQnsHKNY67u4s5Lzzfd
u6PUzeetUK29v+PsPmI2cJkxp+iN3epi4hKu9ZzUPSwMqtCceb7qPVxEbpYxY1p9
1n5PJKBLBX9eb9LU6l8zSxPWV7bK3lG4XaMJgnT9x3ies7msFtpKK5bDtotij/l0
GaKeA97pb5uwD9KgWvaFXMIEt8jVTjLEvwRdvCn294GPDF08U8lAkIv7tghluaQh
1QnlE4SEN4LOECj8dsIGJXpGUk3aU3KkJz9icKy+aUgA+2cP21uh6NcDIS3XyfaZ
QjmDQ993ChII8SXWupQZVBiIpcWO4RqZk3lr7Bz5MUCwzDIA359e57SSq5CCkY0N
4B6Vulk7LktfwrdGNVI5BsC9qqxSwSKgRJeZ9wygIaehbHFHFhcBaMDKpiZlBHyz
rsnnlFXCb5s8HKn5LsUgGvB24L7sGNZP2CX7dhHov+YhD+jozLW2p9W4959Bz2Ei
KPpdzvvtTnOPlC7SQZSYmdunr3Bf9b77AiC/ZidstK36dRILKz7OA54=
-----END CERTIFICATE-----
)EOF";

PsychicMqttClient mqttClient;

void setup()
{
    Serial.begin(115200);

    WiFi.begin(ssid, pass);

    Serial.printf("Connecting to WiFi %s .", ssid);
    while (WiFi.status() != WL_CONNECTED)
    {
        Serial.print(".");
        delay(500);
    }

    Serial.printf("\r\nConnected, IP address: %s \r\n", WiFi.localIP().toString().c_str());

    mqttClient.setServer("mqtts://bridge.homehome.app:8883");
    mqttClient.setCACert(root_ca);

    String topic = String(ESP.getEfuseMac()) + "/simple";

    mqttClient.onTopic(topic.c_str(), 0, [&](const char *topic, const char *payload, int retain, int qos, bool dup)
                       {

                        Serial.printf("Received Topic: %s\r\n", topic);
                        Serial.printf("Received Payload: %s\r\n", payload); });

    mqttClient.connect();

    while (!mqttClient.connected())
    {
        delay(500);
    }

    mqttClient.publish(topic.c_str(), 0, 0, "Hello World!");
}

void loop()
{
    /**
     * Nothing to do here, the onTopic callback function will be called when a message is received.
     */
}

Thank you in advance for your help.

Can you please give me the version number of your Arduino-esp? Looks like a general issue not related to this library.
I never tested this library with the Arduino IDE.

Version: 2.3.4
Date: 2024-12-03T09:58:49.900Z
CLI Version: 1.1.1
Copyright © 2024 Arduino SA
ESP32 Board: M5ATOM
There are other libraries that are incompatible with Platformio, so I have to use Arduino ide...

Can you please give me the version number of your Arduino-esp? Looks like a general issue not related to this library.
I never tested this library with the Arduino IDE.

It is ESP-IDF 5 (Arduino-ESP32 Board Manager 3.1.0)

I will not continue with Arduino ide, it works fine with platformio, thanks.

authors: kiralikbeyin theelims

repo: theelims/PsychicMqttClient


text:
allow additional_options

adds a hash parameter to allow additional global options to be added to options.conf

Looks good. Could you set this variable in a test somewhere and verify the output?

Done, but do you have any idea why the build is failing?

It's waiting on a fix in https://github.com/fiddyspence/puppetlint-variablecase/pull/6, sorry!

👍  then let's wait for the fix and we'll see whether my tests works.

finally the test passed. looks like you're killing travis ci ;)

:+1: looks OK.

Thanks!

authors: domcleal ekohl lobeck

repo: theforeman/puppet-dns


text:
[WIP] Edit hosting provider using the multi-step form

Scope:

new "Update listing" button on the provider portal homepage is visible for listed hosting providers. This is only displayed when a waffle flag edit_provider is enabled.
new URL path: /providers/{provider_id}/edit/ is configured with a WizardView to display multi-step form with initial data filled in using data from existing Hostingprovider object. Submitting the form results in creating a new ProviderRequest object with the field provider set to provider_id
new logic for the approve() method on the ProviderRequest: if the value of the provider field points to an existing provider, update that one, otherwise create a new one. When existing Hostingprovider is being updated, all its related objects are deleted and then re-created

Bug: re-submitting initial data without any changes.
This one is tricky - ModelFormSets with initial data passed but without queryset argument provided behave in a strange way:

formset.initial_forms is empty, formset.initial_extra contains the expected initial forms
formset.save() for some reason does not create new instances as expected, possibly additional logic is needed to handle initial_extra forms
submitted initial forms are treated as empty. At first I thought that this issue only affects validation logic for minimum number of forms: when validate_min is set to True in the modelformset_factory method. This can be worked around by setting this argument to False and adding a custom validation logic. But the problem is bigger, because:
saving instances for initial data does not work - either no instances are returned by formset.save() or the instances returned are not valid.

Some ideas about what to try next to solve this bug:

try creating the objects expected by the formsets, without committing them to the database, and pass queryset of those objects instead of the initial dictionary. In this scenario, we would pass both: initial_dict and instance_dict to the view that is being served on /providers/{provider_id}/edit/: instance_dict would have values for formsets (new and un-commited objects for: locations, evidence, IPs/ASNs) and initial_dict would have values for other steps.

After deployment:

run migrations

We've just discussed this in person - the problem we come across is when a form is showing as not changed. If we can find a way to always introduce a change, like a hidden field with a timestamp or something, then that might allow us to bypass the "form not changed" issue.

I've added a question in the django forums, and in the process, I think I've got more of clue about what we need to do to fix the unchanged data bug:
https://forum.djangoproject.com/t/is-there-way-to-override-changed-data-in-django-forms/24263/2

Ok, some more thinking about this, and looking through the code.
The crux of the data is that we have forms reporting themselves as unchanged, and in the default formset handling code, is a form that is marked as unchanged is ignored.
We don't want that in our case, and after experimenting, I think a clean solution that doesn't involve diving too deeply into hairy formset handling logic is to just modify the forms themselves so they always return True when has_changed() is called.

class IpRangeForm(forms.ModelForm):
    start = forms.GenericIPAddressField()
    end = forms.GenericIPAddressField()

    def has_changed(self):
        """
        Override our default behaviour defined in BaseForm for use in the wizard
        """
        return True

Because we have control over which kinds of form we use in each step in our wizard, this lets us:

be pretty explicit about the overriden behaviour in code
write tests fairly to check for this modified behaviour
limit where the modified behaviour is taking place, so we dont need to keep checking for it elsewhere

The main thing I'm not sure about how file uploads are handled

I've implemented this change in #527.
Once I've merged that into this PR, assuming all the tests pass, I'll merge this in, as I think this will give us something we can test in staging.

authors: mrchrisadams tortila

repo: thegreenwebfoundation/admin-portal


text:
Editable Edges Strike Back

I reworked the code by @jbicker in order to address the main problem of implementing editable edges: The actual routing of edges, which considers anchor positions of source and target nodes, is computed in the view, not on the command stack.

I found two bugs:

When I move two points on top of each other (or close to the source anchor) and I create a new point in the following segment, it is created in the wrong segment.
Moving all routing points when source and target nodes are moved does not work.

repo: theia-ide/sprotty


text:
Fix output component scrolling and layout

Since the timegraph-output-component creates two trees that each have
their own scrollbar, remove the scroll overflow from the parent
output-component-tree.
Add scrollable wrapper to the xy-output-component and
datatree-output-component trees. Make the timegraph-output-component
wrappers scrollable.
Set the main-output-component overflow to hidden to prevent the
timegraph-output-component markers tree from overflowing when the output
area is too small.
Remove the tree scroll synchronization from the parent class
AbstractTreeOutputComponent and instead add it to the only tree that
needs it, the timegraph tree.
Fix tree width calculation in AbstractTreeOutputComponent.
Fix markers layer height calculation to ignore scrollbar height when the
tree is collapsed.
Remove filler row from markers tree and chart when the model is empty.
Remove arbitrary main area width from abstract-output-component.
Signed-off-by: Patrick Tasse patrick.tasse@ericsson.com

@PatrickTasse , do you have a screenshot for the before and after?
Also, how can I reproduce what you are fixing with this PR.
Thanks
Bernd

Before and after fix:

You can see in the after screenshot:

Top time graph's marker chart doesn't overflow over the event table
Bottom time graph's tree vertical scroll bar doesn't have unused space to its right between the scroll bar and the chart
Bottom time graph's collapsed marker tree and chart take less space

authors: PatrickTasse bhufmann

repo: theia-ide/theia-trace-extension


text:
Curriculum Learning

Can I use Curriculum Learning for training alone, or conduct Curriculum Learning training on the basis of the original DDQN training?

That could both work, you will need to try which works better. I would recommend though to use the latest version of the code, since it is performing significantly better.

repo: theilem/uavSim


text:
Add ax keyword to nhood enrichment plot

Description
An optional ax keyword can now be passed to :func:squidpy.pl.nhood_enrichment function. The keyword can be used to create a matplotlib figure outside of squidpy and then plot on any matplotlib subplot, which could give the user greater flexibility in working with nhood enrichment plots.
How has this been tested?
Added a test in test/plotting/test_graph.py which creates a figure on a matplotlib axes object.
Closes
Closes #481

Hey @michalk8 ,
thanks for the hints, I hope the above changes fix the problems!

the dendrogram seesm to be failing:

is that maybe cause it's not part of the ax ?

Think this can be merged. In the future, we can add ax to other functions which use _heatmap.

thanks again @jo-mueller ! LGTM!

authors: giovp jo-mueller michalk8

repo: theislab/squidpy


text:
benchmarks page to track compilation speed

Features needed:

test every latest commit in thelang-io/the that is not marked [skip ci]
pagination of tests
columns (date time, commit, commit message truncated max 60 chars)
size of generated executable of itself

Tests:

test compilation of itself (core)
test compilation of CLI
test compilation of hello world program
test compilation of empty program

Hey @delasy, I've been working on a continuous benchmarking tool to help with this sort of thing, Bencher: https://github.com/bencherdev/bencher
It supports arbitrary kinds of metrics so it should be able to store and detect performance regressions in all of the use cases that you listed above.
I've also compiled a list of prior art, so if you want to see what some other programming languages have done to track their performance that may also be useful: https://bencher.dev/docs/reference/prior-art

@epompeii wow your solution looks awesome! Though I need one-page solution that can integrate with existing CI server I have. Also one of requirements is to support The programming language, which I don't think you have plans to support.
If anything of above changes please let me know, I will reconsider my decision!

Thanks!
Can you explain the one page solution a bit more?
Bencher should be able to support The Programming Language as is. The benchmark output would just need to be in the expected JSON format: https://bencher.dev/docs/explanation/adapters

authors: delasy epompeii

repo: thelang-io/the


text:
Add tab complete on mobile when tapping our nick

Not exactly the most intuitive thing, but it was an easy fix at least for now and feels like the most obvious place to place it.
I had to trigger it that way because the tab complete plugin binds directly to the keyboard on the element, so there's no way to trigger it externally.

Hmmm, I was thinking about this the other day, and wondering if what makes most sense is adding an entry to the context menu for users to mention them? I'm not sure this is obvious at all.

Maybe we could do both. It really is not obvious, but it does work very well. It's well placed and responds really quick: feels just like a real tab key! I agree it's not ideal but I don't really see a downside to including it. I'll be happy to wait for plugins if judged too obscure.
But I dare you to try it and not want it after :P

Ok, I'll take that challenge. I'm going to change my running instance to on the git repo, so I'll try it out sometime :-P

This seems very cryptic UX-wise... From a user standpoint, why clicking on your own nick to cycle through completion for other nicks? What about other potential features unavailable to mobile, such as going back in history?
Instead, what about a button icon for this on the right of the input (like the Send button) that appears when you start typing, and maybe only on mobile? We can use http://fontawesome.io/icon/users/ or http://fontawesome.io/icon/at/ for that I believe.

Actually, the more I think about this, the less I think we should put it there. When we start adding visual elements that match IRC commands (similar to the × buttons to close a channel/chat), a good place to change a nick is to actually click on the user's nick...

Alright, no tab complete then.

Well, I wasn't suggesting no tab complete at all either :(

authors: YaManicKill astorije maxpoulin64

repo: thelounge/lounge


text:
Feature: Chat bubble

Chat bubble

[ ] Default chat bubble
[ ] Voice note message
[ ] File attachment
[ ] Image attachment
[ ] Image gallery
[ ] URL preview sharing
[ ] Outline chat bubble
[ ] Outline voice note
[ ] Outline file attachment
[ ] Outline image attachment
[ ] Outline image gallery
[ ] Outline URL preview sharing
[ ] Clean chat bubble
[ ] Clean voice note
[ ] Clean file attachment
[ ] Clean image attachment
[ ] Clean image gallery
[ ] Clean URL preview sharing

Hey @shinokada, I'm new to open source and I think I can handle this. Can I work on the Chat bubbles?

Yes, you can try it. Why don't you start the default one and create a PR and let's see.

authors: NielsKrijnen shinokada

repo: themesberg/flowbite-svelte


text:
Purge unused strings

How about a command for purging unused strings in lang files?
There is a potential problem with trans('app.type_' . $type) kind of translations, as the user will create custom entries in the files... but, still, I think that a command like this would be useful.
Maybe all the custom strings could be placed in files that could be blacklisted from purging at config level.
@themsaid, have you thought about a feature like this?

Regarding the command for purging strings, I'm not quite sure if we can consider all the cases to check for an unused translation line, do you have any ideas on how to guarantee?

Not sure either, but thinking on my workflow:
Hypothetically I would blacklist on config/langman.php files like resources/lang/en/status.php where things like ticket_open should be. This kind of translations are the ones that I use with trans('status.ticket_' . $status). In this files we should never assume that a string is not longer used (because we don't know) and live with it.
With the rest of the files, I would simply search all the translations that do not have an entry on Manager::collectFromFiles result and remove them, maybe with a preview and a prompt.
If on your project you're unable to separate translation keys like the ones on the "status" example from the normal keys, well, maybe you are not a candidate for a "purge" command, and you should continue using the rest of the commands as usually.
Too drastical? Are you thinking on more scenarios?

Well I assume such command can be useful if you know what you're doing :) If you can PR such thing I'd gladly consider merging.

Perfect! I think I could have something by the next week for you to review.

👍 :)

Have you guys been able to add this? I haven't installed langman yet, but i was indeed looking for the feature to purge unused strings.
Isn't it something like:

'fake' remove all keys keep them in a map,
2 run the find missing translation keys function keep that in a map,
remove all found in 2 from 1 > resulting in a list of unused keys to remove?

(probably what joelcuevas is referring to, and indeed variable ones are harder anyway, the would not pop up in step 2 then anyways)
If there isn't another package that has this, and you are not continuing on this, i might take a shot at it?

#100 implements a --unused flag for the Show command that can give you a list of all keys that are not actively found in your project files. You can use the Remove command to remove those keys.
You can then script this to filter the list of unused keys with a known list of keys to retain anyway and remove the rest.

authors: joelcuevas morksinaanab muisit themsaid

repo: themsaid/laravel-langman


text:
Update Docs for Confirmation Validator - Primary Validator Updated

Update documentation and sample code for Confirmation Validator - Primary Validator Updated

ensure all available endpoints (GET, POST, PATCH, and DELETE) are documented
update request and response examples from real API data (2 items for GET list responses)
JSON should be formatted with 2 space indents
ensure any/all params are documented in tables
https://thenewboston.com/confirmation-validator-api/primary-validator-updated

I can work on this, currently setting up the validator locally to test out this endpoint.

authors: buckyroberts wajeehmisbahkhan

repo: thenewboston-developers/Website


text:
Navigation

Covers issues #77 and #78

I've taken a look at this, but the interaction for the "Save & Continue" & "Save and Exit" isn't quite right.
The wireframes just have "Next question" so I guess "Save & Continue" should be renamed to that?
I understood "Save and exit" to be: stop answering questions and return to the assessment page.
If I click on that currently it forces me to answer the current question. The form validation should only kick in if I click "Next question". The "Save and exit" button should let me cancel what I'm doing without having to answer the current question.
We want people to be able to jump out at any point because they may need to get more information in order to answer the question.

Ah got you will rename the Save and continue.
I misunderstood the 'Save & exit' functionality though, I understood it as "Save this answer, and go back to the assessment overview". On that note, isn't it better labelled cancel or exit?

It could be called cancel/exit, but someone might think that would abort the whole assessment for that activity. I think its Save and Exit to reinforce that what they've done is persisted (even though it already is).
Lets match wireframe for now and do a pass over naming, etc later.

Ahah, see what you mean.

authors: digitalWestie ldodds

repo: theodi/ODMAT


text:
For large writes axios needs a larger maxBodyLength

When submitting a large write operation, it can sometimes exceed the maxBodyLength setting used for axios.
This results in the following error: Error [ERR_FR_MAX_BODY_LENGTH_EXCEEDED]: Request body larger than maxBodyLength limit.
To get around this, either calls could be batched when the writes are too large, or maxBodyLength could be set to Infinity. Which do you think is best?

I'd say the simpler the solution the better. If setting maxBodyLength to infinity will work, that's definitely easy. Have you tried and verified that it works? Open a PR?

Maybe expose axios properties in constructor or some other method?

this is now fixed.

authors: joshsny renanwilliam theoephraim

repo: theoephraim/node-google-spreadsheet

license: unlicense


text:
Fixes crontab throwing errors when tmux isn't running

Previously, when the plugin was installed, changing directories or every couple minutes it would throw an error because there wasn't any tmux session. So I did this:
If you run echo $TERM_PROGRAM in tmux, the value will be tmux
So first commit I did was to test this fix to see if it works on one function, so then I implemented it in a function and put them for everything:
# Check if we are in tmux
check_tmux() {
  if [ "$TERM_PROGRAM" = "tmux" ]; then
    true
  else
    false
  fi
}

That's all! Tested on my Mac-book M1 Pro, running Mac OS V15.0 beta

Edit: My prettier plugin also formatted the lines so that is why the lines changed is high

Never mind, didn't fix the issue:

Hey thanks for the heads up.
That's right, I saw that error on the shell when not under tmux. That's something to address!
As I understood, the capture should be about another something else.
That seems to be the job daemon log. It should be suppressed by editing the cronjob:
crontab -e

And there append this > /dev/null 2>&1 to this plugin job, something like this and save it:
*/1 * * * * /Users/thepante/.tmux/plugins/tmux-git-autofetch/git-autofetch.tmux --scan-paths > /dev/null 2>&1

That should suppress that noise under mail.
Let me know if that worked.
I'll check standards about how to handle cronjobs and update it 😅

Will check out your PR and merge it! Thanks for it.

Hi, sorry for the late response.
Thank you for the temp fix, I won't apply it for myself just yet, il try and see if I can help out and adjust the cron job 😁

Don't merge yet, I messed up my gpg key and also I haven't tested it yet.

Should be fixed now 👍🏽

authors: AmirGhiassian thepante

repo: thepante/tmux-git-autofetch


text:
Why is generalized-lattice of metaclass funcallable-standard-class?

https://github.com/thephoeron/hyperlattices/blob/e08614b4d60c55d3baf4d83f670d7c375ed6ef6d/generalized-lattice.lisp#L14
This line looks  like a typo.
Specifying that its metaclass is funcallable-standard-class means that each instance is a generic function. Is that the intention?
On LispWorks it errors, because you cannot subclass funcallable-standard-class from standard-class (LispWorks doesn't follow the AMOP on this).
Just removing this line make it compile ok.

The intention is that any generalized-lattice or instance of its subclasses are funcallable metamachines. Not just first-class and applicable, but equivalent to a Turing machine or the Lambda Calculus in expressivity, and ideal generative models. The theory behind this is covered in the references, but "Introduction to Lattice Theory with Computer Science Applications" in most detail.
Strange that LispWorks is giving you trouble, though. I use CLOSER-MOP for exactly this reason. It's still a dependency, right?
I ask, only half-jokingly, because my narcolepsy has become particularly severe this fall, so I wouldn't be surprised if I just overlooked this completely.

CLOSER-MOP is just a layer over th underlying implementation. The underlying implementation of LispWorks doesn't support it, so CLOSER-MOP on LispWorks.
The theory doesn't explain the code. What is the point of generating funcallable-standard-class instances? How they are supposed to be used as function, as opposed to just standard instances?  I don't see anything in either the code or the documentation.
Anyway, if it is really needed, the right approach is to define poset as subclass of funcallable-standard-object and with metaclass funcallable-standard-class, and then the inheritance works as expected.

Ah. As to your last point, that is what I overlooked—when I added the poset superclass to the top of the hierarchy, I must have forgotten to test it in LW, which would have reminded me that CLOSER-MOP wouldn't smooth over that particular difference.
I'll get that patched.

authors: Yehouda thephoeron

repo: thephoeron/hyperlattices


text:
Allow resolving of scalar values from stored RawArgument objects

In the case where a scalar parameter is set to null, Container assumes an unset value and replaces it with the $name argument. This PR enables storing RawArgument objects into the container and use the stored value upon resolving dependant's arguments.
Updated PR to match contribution guidelines.

Any idea if this will be merged in ?

Are you aiming this at Version 2? Can you re PR to develop please

Should I still re PR to develop ?

No need, I was mistaken
On Wed, 9 Mar 2016 20:59 G. Amringer, notifications@github.com wrote:

Should I still re PR to develop ?
—
Reply to this email directly or view it on GitHub
https://github.com/thephpleague/container/pull/87#issuecomment-194504772
.

authors: gamringer philipobenito

repo: thephpleague/container


text:
Double spaces are created when writing file with empty enclosure.

When writing a file with an empty enclosure, the class replaces every space in the data with two spaces.  For example, a pipe delimited file:
$fileWriter->setDelimiter("|");
$fileWriter->setEnclosure(" ");

exports this to file (noticed the multiple spaces):
Rapala  -  Pro  Guide  Electric  Fillet  Knife|more  data
instead of the actual data:
Rapala - Pro Guide Electric Fillet Knife|more data
(Github seems to be mangling the double spaces in my example)

@stevenmusumeche I had to deal with this issue as well. My workaround was to set the enclosure to \x00 which is null.

authors: dyelton stevenmusumeche

repo: thephpleague/csv


text:
Skrill

The link to skrill payment Gateway on the document (on the table list) leads to 404.

Take a look at
https://packagist.org/?query = omnipay-skrill
cc @alfaproject

Thanks.
I don't need it
It's just to keep the maintainers up to date
As they may update the link :)

repo: thephpleague/omnipay


text:
Fix buffer overflow in ip_src

Fixes #7 .

Thanks - However, you used \t not \n in the error message.

license: Zlib


text:
Update scalafmt-core to 3.7.0

Updates org.scalameta:scalafmt-core from 3.5.9 to 3.7.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalameta", artifactId = "scalafmt-core" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:n:3

Superseded by #327.

repo: thesamet/sbt-protoc


text:
Instalation

Know is a stupid question, but please, help...
How do you install this specific fork compared to original?
Thank you in advance

No, it's a good question! The general steps from the docs should be the same, with this modification:
pip install 'callattendant @ git+https://github.com/thess/callattendant'

Thak you veru much, Mr Williams!!!

authors: jrotaetxe roycewilliams

repo: thess/callattendant


text:
Debugging "no valid signing keys for delegation roles" error

I'm pretty sure the problem is between the chair and the computer here, but I wanted to get a better understanding of how notary works so that I can easily pinpoint solutions when something like this happens.
I got the delegation working for the targets/releases role (using docker:dind to test the pushes) but somehow I lost the ability of signing releases on the host machine with root (YubiKey).
The error is:
Failed to sign "foo.com/bar":1.0.0 - no valid signing keys for delegation roles
no valid signing keys for delegation roles

If the list delegations on that GUN, it's true that I don't see my delegation role there (just the other's machine one, which continues to be able to push).
However, notary <…> key list gives me this:
targets    ...oo.com/bar    05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09    /Users/foobar/.docker/trust/private

That same key id appears when I use -D -v and do delegation list foo.com/bar:
DEBU[0000] Loading targets...
DEBU[0000] targets role has key IDs: 05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09
DEBU[0000] verifying signature for key ID: 05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09
DEBU[0000] successfully verified cached targets

Where did the link get broken? Could it have been an experimentation with snapshot key rotation?

hi @ruimarinho, we'd be happy to help!
Docker Content Trust has an opinionated view of delegations because once you've added delegations for a role, it will attempt to only sign tags into a delegation.
So the error you're seeing for foo.com/bar is saying that Docker Content Trust knows that there are delegations set up for this repository and it can't find any delegation keys to sign with on the local machine.
Do you have a delegation key on that box?  It appears from the notary key list output you've provided that you only have the targets key.  In this case, you could generate and add a new key to your delegation and you can do this because you have the targets key locally and the snapshot key is rotated to the server.  You could then use this newly added delegation key to sign foo.com/bar with Docker Content Trust on your  machine.
Does this help?   Please let us know if there's anything that is unclear.  Here are the docs for more information about Docker Content Trust with delegations.

I don't have a specific delegation key for this GUN locally. If I attempt to generate, sign and then import one locally, it tells me that my YubiKey only supports storing root keys (ERRO[0014] failed to import key to store: yubikey only supports storing root keys, got user for key: 034…), as expected.
I've read the DCT delegation does but it says, under the docker push header, that Docker Engine will attempt to sign and push with the targets/releases delegation if it exists. If it does not, the targets key will be used to sign the tag, if the key is available. Since I have the targets key available for this repository, as notary delegation list <GUN> shows, why would I need to generate a new delegation for signing locally?

Does notary delegation list <GUN> show a targets/releases role?
If so, you'll need that specified delegation key locally in order to sign with DCT.  If you'd prefer to use another key, you can generate a new one and import it.
As of now, only root keys can be stored in yubikeys though we're tracking an issue here https://github.com/docker/notary/issues/306 to expand this to more keys.  Other keys live on disk in the $trust_dir/private subdirectory
What does notary delegation list <GUN> show for targets/releases key IDs?  And does it match 05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09?  I have a hunch that your delegation key might be different since we require a certificate (unless you signed one for the same targets private key yourself).

I'll get to your comment in a few seconds, but just found on the repository advanced usage .md:

If delegation roles exist but the user does not have signing keys, the push will fail. If no delegation roles exist, the push will attempt to sign with the base targets role.

Since I've added a delegation role, I think Docker 1.11 will stop using the targets role.

@ruimarinho: yes that's correct - the docker push documentation linked above is trying to say the same thing but the wording is a little more confusing because it does not say "role" explicitly.
So I think you should try adding a new key for this host to the delegation role (or using the existing delegation key, if that's ok in your set up) and that should work for your DOCKER_CONTENT_TRUST=1 push

Does notary delegation list  show a targets/releases role?

Only on container B (the one without the root key). Container A (root + YubiKey) shows:
ROLE                PATHS             KEY IDS                                                             THRESHOLD
----                -----             -------                                                             ---------
targets/releases    "" <all paths>    724854ea9acad6feb7423cd5dfddd856e09e671f7df8b9587c2dd50abf744aee    1

This is the delegation key id I've generated on container B and imported "locally" (container A). So, in other words, this isn't an usable signing key as I don't have it's private key.

As of now, only root keys can be stored in yubikeys though we're tracking an issue here #306 to expand this to more keys. Other keys live on disk in the $trust_dir/private subdirectory

Looks like even though the error is output, it successfully imported a delegation key generated locally (container A) to $trust_dir/private.
However, I'm unable to import the certificate -- fatal: unable to parse valid public key certificate from PEM file delegation.crt: invalid certificate: certificate with CN  uses invalid SHA1 signature algorithm.

What does notary delegation list  show for targets/releases key IDs?

Just the 724854ea9acad6feb7423cd5dfddd856e09e671f7df8b9587c2dd50abf744aee (container's B delegation key). No sign of my targets key 05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09 (which continues to be visible via notary key list with the correct GUN).

Interesting. On container A, I'm getting hit by https://github.com/docker/notary/blob/eb214782470e4913e5215df96e24aa59c36ca045/tuf/utils/x509.go#L287-L290 (specifically, x509.ECDSAWithSHA1).

Ok, just fixed local key generation by switching to openssl 1.0.2. However, I need help understanding if what I did makes sense:

I've generated a .csr based on my targets key for this GUN 05209e8a98a5f584e1e13ec088670d4c49ab7db11c9156b77542f1588c099a09.
I've self-signed the .csr with this same private key and created the certificate.
I've imported the delegation crt with the targets/releases role for this GUN.

Does it make sense to re-use the targets private key or it is actually a security concern? What would be the benefits of generating yet another key (--role user?) and then import it as a delegation key?

@ruimarinho: you should not re-use the targets private key - that key has higher privilege than any delegation key because it can manage delegations (add/remove/edit delegation roles).  It's advised to generate a new key

Ok, so for a single repository pushed by multiple organisation collaborators, I need:

One root key which is shared among repositories.
One targets key so I can manage delegations.
One targets/releases per user doing pushes, including myself.

Is this correct, i.e. 3 passphrases per repository?

@ruimarinho: that setup makes sense.
I'll expand on your setup by saying that the root and targets key are to be held by an administrator for the repository, and there can be a targets/releases key for each collaborator (each with a unique passphrase).

Ok. Since I cannot backup my root key, considering it's generated on the YubiKey (and I like that it never leaves it), can I add other collaborators as administrators to a repository in case my YubiKey gets stolen?

@ruimarinho: notary/Docker Content Trust should also leave an encrypted copy of the root key material on disk, so that you can back it up somewhere safe.
If your collaborators are only going to be managing delegation roles, it's sufficient to only share the targets key since that key has privilege over delegation role management.

I've generated the root key via yubico-piv-tool, so while notary/DCT knows it exists, it's not able to read it.
The CI system will be responsible for most of the signed builds using a delegation role, but sometimes a manual signed build might be necessary. This means I have no option but to generate/import one targets/releases key per collaborator doing manual pushes outside our regular CI setup.
Also, if my previous comment proves incorrect - i.e. a single targets key could suffice, by sharing you mean sending them the private key and agree on a shared secret (passphrase)?

The CI system will be responsible for most of the signed builds using a delegation role, but
sometimes a manual signed build might be necessary. This means I have no option but to
generate/import one targets/releases key per collaborator doing manual pushes outside our
regular CI setup.

Yes, this is correct. Ideally those collaborators would generate their own keys and send you just the public component.

Right, the private key would not leave their work station. What's the risk in one collaborator re-using the same delegation key over and over again? It might be possible to detect that if I'm paying attention to the key ids, but there's nothing on notary preventing that from happening, correct?

@endophage it looks like delegation key re-use is actually supposed to happen. From docs: Note that for root and delegation keys, the --gun flag is ignored because these keys can be shared across GUNs. Can you confirm this?

You will need to determine your own security model to decide whether you want to re-use delegation keys across repositories. In many cases it makes sense and that's why we support it.
If however your security model does not allow for users to be identified across repos, you would not want to re-use delegation keys. This may also be affected by whether your repositories are behind some form of authorization gateway, either by integrating with the supported token based auth, or by placing some form of authorizing proxy in front of your notary service. If this effectively makes all repos private within your organization, and your security model does not require anonymity within your organization, key re-use may still be acceptable.

In my case, anonymity is not a goal, so considering we have token based auth, I believe key re-use is acceptable then. Thanks for clarifying this.

hello, may i know what is the command to add the delegation key into docker? im trying
docker trust key load mykey.key
But it seems to still report
Signing and pushing trust metadata
failed to sign GUN: no valid signing keys for delegation roles

I had this issue until I loaded the key from a file that had as name the key ID
See: https://github.com/sudo-bot/action-docker-sign/commit/68258f69680f5c65f5ac6053a67557323c106fb1

authors: endophage kyrogue riyazdf ruimarinho williamdes

repo: theupdateframework/notary


text:
Test metadata files: bump expiration date and resign

Description of the changes being introduced by the pull request:
Our newly added metadata files in the
tests/repository_data/fishy_rolenames/metadata directory have an expiry
date until "2021-10-22T11:21:56Z" and today while running the tests on
develop branch I recived this error:
ExpiredMetadataError("Metadata X expired on Fri Oct 22 11:21:56 2021")
when running the tests in tests/test_updater.py file and more precisly
the TestUpdaterRolenames.test_unusual_rolenames() test.
That's why I decided to bump the expiration date to a random time in
the future (October 22-nd 2050) and I had to resign all of the metadata
files.
Signed-off-by: Martin Vrachev mvrachev@vmware.com
Please verify and check that the pull request fulfills the following
requirements:

[ ] The code follows the Code Style Guidelines
[ ] Tests have been added for the bug fix or new feature
[ ] Docs have been added for the bug fix or new feature

Pull Request Test Coverage Report for Build 1375801096
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.1%) to 98.477%

Totals

Change from base Build 1369286823:
1.1%

Covered Lines:
3782

Relevant Lines:
3808

💛  - Coveralls

Pull Request Test Coverage Report for Build 1375801096
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.1%) to 98.477%

Totals

Change from base Build 1369286823:
1.1%

Covered Lines:
3782

Relevant Lines:
3808

💛  - Coveralls

authors: MVrachev coveralls

repo: theupdateframework/python-tuf


text:
WIP: ngclient: review preorder dfs code

Fixes #1398
Description of the changes being introduced by the pull request:

Reviews and simplifies Updater._preorder_depth_first_walk code.
makes _visit_child_role a member of DelegatedRole

Please verify and check that the pull request fulfills the following
requirements:

[ ] The code follows the Code Style Guidelines
[ ] Tests have been added for the bug fix or new feature
[ ] Docs have been added for the bug fix or new feature

Opened as a draft not only because it is dependent on #1408 but also it is not well tested yet.

I've had a first look and the ideas look fine. Some smaller comments:

some issues in commit splitting (like visit_child_role() being annotated as returning bool and then returning something else)
Likewise terminating child roles are added to child_roles_to_visit twice, then duplication is removed in a "simplification" commit
IMO we should avoid doing e.g. pathpattern.lstrip(os.sep) -- these are the sort of workarounds that make life hard at some point... either the path pattern is valid or it isn't valid and we should just refuse to load the metadata (we don't have to support every weird case spec defines as valid). That said, leaving it as is and filing an issue is fine as well
more type annotations would be nice: Dict without contained types is not great, role_metadata in _preorder_depth_first_walk should be manually annotated as Targets: without this the whole function is a black box as far as static typing is concerned.

I'm suspicious about who this operates when target is not found:

old code does not seem to raise if delegation limit is not reached? I agree the old code return value seems nonsense but is raising really the right thing?
new code does not refer to delegation limit in the error message if it is reached

Also, is_in_trusted_paths() returns False if both paths and path_hash_prefixes are unset. Is this correct? I can see how that's the "safe" assumption but it also makes the whole idea of unset paths and unset path_hash_prefixes meaningless: the delegation has no reason to exist...

I really think it would be a lot simpler as a recursive function...

I really think it would be a lot simpler as a recursive function...

I agree, it does make the code look much simpler, let me test implementing those terminating delegations correctly with it :)

Also, is_in_trusted_paths() returns False if both paths and path_hash_prefixes are unset. Is this correct? I can see how that's the "safe" assumption but it also makes the whole idea of unset paths and unset path_hash_prefixes meaningless: the delegation has no reason to exist...

Both paths and path_hash_prefixes being None should be impossible since there is a check in the constructor which raises an exception but if you think it will be better/safer to duplicate it again here, I can add it.
https://github.com/theupdateframework/tuf/blob/24fa1128116429dc18e185047fbffb009ca509b0/tuf/api/metadata.py#L914

Summarizing the changes made to this PR:

rebased on  develop
improved the commits
added more type annotations
changed the function to return None when a targetfile is not found (instead of raising an exception)
added one possible recursive implementation of the same function   e23e64b

Still there are issues pending and I am keeping this a draft to have a chance of review it again myself.

File an issue so that self._load_targets(role_name, parent_role) -> TrustedMetadataSet returns the loaded metadata to avoid lookup
Avoid doing e.g. pathpattern.lstrip(os.sep) or file an issue about it
Revise return values and maybe throw exceptions in corner cases
The correct behaviour when both paths and path_hash_prefixes are unset is still unclear.
Using fnmatch does not do exactly what is promised in the documentation in terms of UNIX filename pattern matching

added one possible recursive implementation of the same function   e23e64b

I have some reservations against recursion: when you use it, you then have to think about the call stack depth limitations and how that affects your code... In our case maximum number of delegations now depends on call stack depth.
Many hundreds of delegations is not  a use case we should explicitly design for, I accept that. Still, I don't like setting an artificial limit when we don't event know what that limit is: stack depth is implementation specific, cpython uses 1000,  but we also don't know how much of that we can use. The application developer might love recursion and may have used half the stack already, and maybe the network stack is special as well and needs a few hundred stack levels...
Basically I think expected call stack depth  is larger than maximum reasonable number of delegations... but it's only maybe 5-10 times as large and that sounds uncomfortably close to me.

I have some reservations against recursion: when you use it, you then have to think about the call stack depth limitations and how that affects your code... In our case maximum number of delegations now depends on call stack depth.

As you said, I don't think any reasonable use case has that many delegations to worry about. Furthermore, it makes for more readable code, which is more important, I think.

Rebased on develop + some fixes of stupid errors in last commit.

Thanks for the reviews and suggestions. I think it is time for this PR to stop being a draft and get a full review. I've intentionally kept the diffs in multiple smaller commits hoping that it may ease the review but you tell me how valuable it is for the history. I do mean to squash whatever feels redundant.
Some issues that were raised meanwhile:

Recursive vs stack implementation:

I reverted the recursive implementation commit (intentionally reverted and not deleted to keep the history). I agree with @trishankatdatadog that the code looks visually better but at the same time function parameters increase and when we start propagating terminating flags up the stack, it doesn't feel any simpler. @jku gave reasonable arguments against recursion too.

I opened follow up issues for the items from the previous list:

#1507
#1506
Revise return values and maybe throw exceptions in corner cases: the function now returns a targetinfo dictionary or None if a match is not found.
#1497 and 2159b88
Using fnmatch does not do exactly what is promised in the documentation in terms of UNIX filename pattern matching #1505

Rebased on latest changes in develop.

All of the changes seem reasonable and the history indeed is easier to follow when there are multiple smaller commits. Thanks for that @sechkova!
The only missing part in this pr is validation through more tests.

No two ways about that but I don't know whether this PR is the right way given that this is a common issue for the whole Updater: https://github.com/theupdateframework/tuf/issues/1499

I Also left some comments in code but overall this LGTM: I'm approving, but please have a look at whether you want to act on the comments.

Thanks for the comments, let me try to address them before merging.

I think I addressed everything and removed the commits about the recursive implementation. Should be ready now.

authors: jku sechkova trishankatdatadog

repo: theupdateframework/tuf


text:
Before each ex1

atualizando main com exercicios 1 a 5

atualizando main com exercicios 1 a 5

atualizando main com exercios de 1 a 5


text:
Add checks to avoid trading with non-USD(T) pairs

Trading with non-USD(T) pairs should not be allowed until internal sizes and calculations are supported with other coins.
Current : trading is allowed with every valid ticker
Issue : orders are messed up with non-USD(T) tickers
Fix : add a check to avoid trading with non-USD(T) tickers

Fixed here.


text:
Decide Release-cycle length

Part of #1385

The release cycle length is not yet defined in the governance. This is the tracking issue for defining that value.

For the moment it is not a priority. We will continue to target a release every two months, but with no commitment.

authors: didier-wenzek matthiasbeyer


text:
Cumulocity IoT operations created whilst the bridge is done are not processed upon reconnection

Describe the bug

Cumulocity IoT operations which are created whilst the Cumulocity IoT MQTT bridge is disconnected do not get processed by the tedge-mapper-c8y when the network outage has passed (e.g. the bridge can communicate with Cumulocity IoT again).
The operations are left in the PENDING state until the mapper is either restarted, or a manual SmartREST 2.0 500 static SmartREST 2.0 message is published (once the mapper health status returns).
Workaround
The following MQTT message can be published locally to request the PENDING operations from Cumulocity IoT once the cloud connectivity has been restored:
tedge mqtt pub c8y/s/us 500

To Reproduce

Install and configuration thin-edge.io and verify the bridge connection to Cumulocity IoT is up/healthy

Disconnect the network

Wait until the bridge is down

Create a new operation in Cumulocity IoT. For example request a the tedge-configuration-plugin

Connect the network

Wait until the bridge has been re-established

Expectation: The pending operation should be processed by thin-edge.io, and set to SUCCESSFUL

Expected behavior

Any operations which are created whilst the Cumulocity IoT bridge is down, should be processed one the connectivity has been reestablished.
The way this should be done, is that the static SmartREST 2.0 template, 500 should be sent when the connection has been restored.
Screenshots

Environment (please complete the following information):

OS [incl. version]: any
Hardware [incl. revision]: any
System-Architecture [e.g. result of "uname -a"]: any
thin-edge.io version [e.g. 0.1.0]: 1.3.1

Additional context

A system test case has been added to cover the bug found here. https://github.com/thin-edge/thin-edge.io/pull/3170

I've tested this fix (included part of https://github.com/thin-edge/thin-edge.io/pull/3278), and it works as intended, but there is a following up issue where the devicecontrol/operations message payload can included multiple operations (newline delimited), which causes the parsing to fail. So technically this ticket can be closed, and the limitation on parsing the multiple  operations in one message from the cloud is tracked in this ticket: https://github.com/thin-edge/thin-edge.io/issues/3297


text:
Delete account button

Good morning, in the ThingsBoard Live app, within the profile, there is the option to delete the account. I find it very useful as it is a requirement from Apple and Google currently to publish the app. However, I don't see it implemented in the GitHub code. Could you let us know if it is possible to add it?
Maybe @ikulikov can help?
Many Thanks

Hello @Ataraxiall!
You can create your own delete button by using the delete API at http://demo.thingsboard.io/swagger-ui/#/sign-up-controller/deleteTenantAccountUsingDELETE.
Here's the process:

Add a Delete button on the profile page.
Modify thingsboard_pe_client -> signup_service.dart.
Add a method to call the delete API.

authors: Ataraxiall ybeshkarov


text:
这是我见过最烂的项目

这是我见过最烂的项目

这是来自QQ邮箱的假期自动回复邮件。你好，我最近正在休假中，无法亲自回复你的邮件。我将在假期结束后，尽快给你回复。

authors: AccountGc heshaojin

repo: thinkgem/jeesite


text:
Added a Blockchain Based Chess Game

Developer Checklist

[x] Followed guidelines mentioned in the readme file.
[x] Followed directory structure. (e.g. ProjectName/{USERNAME}/...yourfiles)
[x] Starred ⭐ the Repo (Optional)

Closes issue #637
Summary
I have added a Blockchain Based Chess Game @thinkswell please review it are Merge my PR :)
Screenshot
Dec-Chess Game Video

Hi @thinkswell
You closed this PR
If you can please share with me some insights on improving the project, I'll be highly obliged.

@alienishi It seems your Game is .git sub module, delete the .git dolder from it and reopen PR also delete .DS Store file, we only accept one project file per request.
Make sure You follow the guideline to structure your project inckuding writinf the project name in pascal case.

@alienishi It seems your Game is .git sub module, delete the .git dolder from it and reopen PR also delete .DS Store file, we only accept one project file per request.
Make sure You follow the guideline to structure your project inckuding writinf the project name in pascal case.
Before you do all of this make sure you are on have the latest uodated fork.

authors: PBJI alienishi

repo: thinkswell/javascript-mini-projects

license: Unlicense