Workflows with action policies can deadlock

Given the attached pack (useful for meditation), the system deadlocks when the action _dispatcher_pool (50 entries) gets filled with workflows, and all workflow actions are subsequently held in the _work_buffer queue indefinitely.
One possible solution would be to limit the number of workflows in the _dispatcher_pool to one less than half the total entries, in order to leave room for action execution.
deadlock.tar.gz
Deadlock pack
This pack contains actions for testing policy deadlock and other behaviors
Actions

delay2 - a two second delay
delay20 - a twenty second delay
delay2test - a workflow with delay2 followed by delay20

Policies

delay20 - limit concurrency to 1
delay2test - limit concurrency to 10

Testing
Launch multiple instances of the workflow:

for i in `seq 1 100`; do st2 action execute deadlock.delay2test; done

Without the delay2test policy, the actions deadlock

Another, potentially better, solution would be to have separate queues for workflows and actions, so actions can be protected from a queue full of workflows.  Even better, three queues - workflows, workflow actions, and regular actions; now workflow actions are not subjected to the average queue depth of the entire action list.

Thanks for including he pack which helps to reproduce the issue - this should help us a lot tracking down the root cause.
I will have a look when I get a chance.
I do think that having multiple internal queues / pools sounds like a good idea, but I need to dig in and think about it some more :)

I personally couldn't reproduce the deadlock issue with the provided code (even with a smaller pool with a size of 2 so we hit the issue earlier).
I used a single action runner and didn't register delay2test policy (with multiple action runners it should be even less of an issue because we have a pool per action runner so 50 * number of action runners should be a maximum concurrent throughput).
I do see the general problem though - the problem is that dispatcher will be blocked when all the threads are occupied. This won't cause a deadlock (at least I couldn't reproduce it), but it will cause a temporary blockage / delay until the pool frees up. In theory things work as intended / designed - we limit the pool size because we want to prevent resource starvation.
I do agree that this is not ideal in all scenarios though. For one we could at least allow user to configure the maximum dispatcher pool size. As mentioned above, we do need some kind of upper limit to prevent the resource starvation though - depending on the server specs this could higher than a default value of 50.
So for one I propose a config change which allows operator to specify a maximum dispatcher thread pool size for each action runner. I still think 50 is a reasonable default for now, but the actual maximum value really depends on each StackStorm installation and workload (number of concurrent actions with delay, type of actions - long running CPU intensive action vs long running on CPU intensive actions, etc.)

In any case, I'm also looking into having multiple Dispatchers per different message type (as suggested above).

@lakshmi-kannan Please check the discussion above and my comment below and let me know what you think.
I propose the following change:

Introduce a new QueueConsumer class for action runner.
This QueueConsumer uses multiple BufferedDispatcher green thread pools - one for regular actions and one for workflows.
Default to 50, but allow operator to configure / tweak maximum pool size for both of those pools.

I think this should work reasonably well for the problem described above and it's also similar to what @bri365 has suggested.
If we go with this approach there is one problem with the implementation though - right now the handler and consumer don't know if a particular message represents a regular action or workflow action execution. If we want to determine that, we need to retrieve ActionDB object for the LiveActionDB message which is currently being processed.
This means 1 GET by primary key query for each message before we dispatch it to the dispatcher pool. This might not be a big deal since it's "get by PK", but I would still prefer to avoid this query, if possible (for one, we could amend LiveActionDB object to carry this information with it).
What do others think?

@Kami - sorry, you have to delete the policy delay2test.yaml before registering the pack; I used it to work around the issue.  it regulates the workflows and doesn't let them fill the work buffer

I like the three proposals above; they should do the trick.
+1 for adding a workflow flag to LiveActionDB objects.

@bri365 Thanks for the feedback.
I will also wait on @lakshmi-kannan and others to chime in and if they agree with my proposed approach, I will go ahead and implement it :)

So far we've tried hard to make sure we don't differentiate actions from workflows and we've been successful. I still don't see a clear need for separating actions from workflows in terms of execution. I am fine with a configurable parameter for the dispatcher pool and this is something we've discussed in the past but I definitely don't see a need for two different queues. I'll hold off on implementing it. If you used mistral as the workflow engine, the eventlet basically shoots off a HTTP message to mistral API and then is pretty much done. The only case where a workflow can compete with actions is when there is an action chain and a runner picked up an action chain to execute. Even in this case, even with one runner, since we use eventlets, I think we'll be fine. So in either case, we don't need a separate queue for workflows. @Kami Can we do a hangout so we are on same page first?

@lakshmi-kannan Probably best way for you to understand it is to check the code and play with the example @bri365 provided.

Also, I would be OK to begin with by just making the pool size operator configurable.
Having said that, we already differentiate actions and workflows internally and this change would be internal as well (it wouldn't be user exposed, it's an implementation detail aka performance optimization and usually when you do optimizations like that you can't keep them 100% "generic" and need some additional details) so I personally don't see implementing two dispatcher pools / queues as an issue.

To clarify, I think I see the problem - the dispatcher queue size can be outrun by the number of workflows and actions. This means you are essentially hitting the scaling limit. The two queue solution kami is proposing only partly alleviates the problem but you can construct a case there where you can hit capacity given enough number of workflows and actions. So I don't necessarily think having two queues is better than one. It seems like you'll need monitoring to check the rabbit queue size and capacity planning up front. @Kami and I seem to disagree on the value of two queues. So either I need more convincing or other engineers have to break our tie :).

Yes, as discussed offline, this won't fully resolve the issue (nothing will, we need hard limits anyway), but it will increase the safety margin and will make hitting this issue less likely.
It's also worth noting that the actual setting is very workload / use-case and hardware specific. In some cases, a pool size of 50 might be too much already and in other scenarios it might be way too low. In addition to that we of course also need to have some hard limit (which is configuration and workload specific) to avoid resource exhaustion and blocking because of it.
Having said that, I do think having two pools has benefits (and is better than having one). It means workflows won't block workflow actions which will increase the safety margins further and make it even less likely that this issue will be hit (right now you can have a scenario where workloads itself block workflow actions aka deadlock, with two queues you can still hit it but much less likely since workflow actions will still be executed even if the workflow queue is full).
So in short, I think we should have two pools with some reasonable default size (50 for each or similar) and allow user to tune it (aka as proposed and described above). User will of course need to have monitoring in place (nothing new or unexpected) to determine what are the optimal sizes for their use case and hardware (optimal = where resources are utilized well, but not overloaded and where queue sizes and large enough to prevent exhaustion / deadlock from happening before hardware resource limits are hit).
And again, TL:DR the main problem is that right now deadlock can be hit before server / hardware resources are exhausted and that's obviously not ideal.

Reconfirmed issue with action chains on a two core 8GB system (defaults to two actionrunners):
root@stackstorm:~# history
1  apt-get update
2  apt-get upgrade
3  curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=password
4  cd /opt/stackstorm/packs/
5  tar -xvzf /home/brian/deadlock4.tar.gz
6  st2 run packs.setup_virtualenv packs=deadlock
7  st2 run packs.load register=all
root@stackstorm:/opt/stackstorm/packs/deadlock# cat chain-deadlock.sh
for i in seq 1 200; do st2 action execute deadlock.delay2test; done
(twice as many as total _work_buffer slots)
root@stackstorm:/opt/stackstorm/packs/deadlock# ./chain-deadlock.sh
To get the results, execute:
st2 execution get 5790290c02ebd504749035c6
To get the results, execute:
st2 execution get 5790290c02ebd504749035c9
...
To get the results, execute:
st2 execution get 5790295b02ebd5047490381b
root@stackstorm:/opt/stackstorm/packs/deadlock# mongo

use st2
switched to db st2
db.action_execution_d_b.count({status:"delayed"})
88
db.action_execution_d_b.count({status:"scheduled"})
109
db.action_execution_d_b.count({status:"running"})
100
exit
bye
root@stackstorm:/opt/stackstorm/packs/deadlock# date
Wed Jul 20 21:50:00 EDT 2016
root@stackstorm:/opt/stackstorm/packs/deadlock# mongo
MongoDB shell version: 2.4.9
connecting to: test
use st2
switched to db st2
db.action_execution_d_b.count({status:"delayed"})
88
db.action_execution_d_b.count({status:"scheduled"})
109
db.action_execution_d_b.count({status:"running"})
100
exit
bye
root@stackstorm:/opt/stackstorm/packs/deadlock# date
Wed Jul 20 22:02:07 EDT 2016
root@stackstorm:/opt/stackstorm/packs/deadlock# mongo
MongoDB shell version: 2.4.9
connecting to: test
use st2
switched to db st2
db.action_execution_d_b.count({status:"delayed"})
88
db.action_execution_d_b.count({status:"scheduled"})
109
db.action_execution_d_b.count({status:"running"})
100
exit
bye
root@stackstorm:/opt/stackstorm/packs/deadlock# date
Wed Jul 20 22:15:37 EDT 2016
root@stackstorm:/opt/stackstorm/packs/deadlock# mongo
MongoDB shell version: 2.4.9
connecting to: test
use st2
switched to db st2
db.action_execution_d_b.count({status:"delayed"})
88
db.action_execution_d_b.count({status:"scheduled"})
109
db.action_execution_d_b.count({status:"running"})
100
exit
bye

deadlock4.tar.gz

@bri365 Thanks for the report.
I'm working on the change mentioned above - should be ready for review by end of this week :)

@Kami Thanks!  Mistral workflows, by the way, seem to be unaffected - I queued up 400 on the same system and they are dutifully chunking through, one per action runner, 20 seconds at a time.

@bri365 You are welcome.
And yeah, Mistral runner is mostly just "fire and forget" (when scheduling / running an execution, it just sends an HTTP request to the Mistral API).

Here we go - #2823

@bri365 Alright, #2823 has been merged into master. Thanks again for reporting this issue and including code to reproduce it.
If you feel a bit adventurous, you can try v1.6dev packages once they are built (IIRC, there are no backward incompatible changes in v1.6 so it should be fine).

@kami will do; thanks!

@Kami works like a charm - thanks!  I do see some unexpected order of operations, though:
(virtualenv)brian@ubuntu1404:~/st2$ st2 execution list -n 0 --status succeeded
+----------------------------+------------------------+--------------+--------------------------+-------------------------------+-------------------------------+
| id                         | action.ref             | context.user | status                   | start_timestamp               | end_timestamp                 |
+----------------------------+------------------------+--------------+--------------------------+-------------------------------+-------------------------------+
|   5797c81c0e77764649b3882f | packs.setup_virtualenv | stanley      | succeeded (5s elapsed)   | Tue, 26 Jul 2016 20:29:16 UTC | Tue, 26 Jul 2016 20:29:21 UTC |
| + 5797c82d0e77764649b38832 | deadlock.delay2test    | stanley      | succeeded (26s elapsed)  | Tue, 26 Jul 2016 20:29:33 UTC | Tue, 26 Jul 2016 20:29:59 UTC |
| + 5797c8520e77764649b38835 | deadlock.delay2test    | stanley      | succeeded (36s elapsed)  | Tue, 26 Jul 2016 20:30:10 UTC | Tue, 26 Jul 2016 20:30:46 UTC |
| + 5797c8530e77764649b38838 | deadlock.delay2test    | stanley      | succeeded (96s elapsed)  | Tue, 26 Jul 2016 20:30:11 UTC | Tue, 26 Jul 2016 20:31:47 UTC |
| + 5797c8530e77764649b3883b | deadlock.delay2test    | stanley      | succeeded (117s elapsed) | Tue, 26 Jul 2016 20:30:11 UTC | Tue, 26 Jul 2016 20:32:08 UTC |
| + 5797c8540e77764649b3883e | deadlock.delay2test    | stanley      | succeeded (137s elapsed) | Tue, 26 Jul 2016 20:30:12 UTC | Tue, 26 Jul 2016 20:32:29 UTC |
| + 5797c8540e77764649b38841 | deadlock.delay2test    | stanley      | succeeded (159s elapsed) | Tue, 26 Jul 2016 20:30:12 UTC | Tue, 26 Jul 2016 20:32:51 UTC |
| + 5797c8550e77764649b38844 | deadlock.delay2test    | stanley      | succeeded (179s elapsed) | Tue, 26 Jul 2016 20:30:13 UTC | Tue, 26 Jul 2016 20:33:12 UTC |
| + 5797c8550e77764649b38847 | deadlock.delay2test    | stanley      | succeeded (201s elapsed) | Tue, 26 Jul 2016 20:30:13 UTC | Tue, 26 Jul 2016 20:33:34 UTC |
| + 5797c8560e77764649b3884a | deadlock.delay2test    | stanley      | succeeded (221s elapsed) | Tue, 26 Jul 2016 20:30:14 UTC | Tue, 26 Jul 2016 20:33:55 UTC |
| + 5797c8560e77764649b3884d | deadlock.delay2test    | stanley      | succeeded (243s elapsed) | Tue, 26 Jul 2016 20:30:14 UTC | Tue, 26 Jul 2016 20:34:17 UTC |
| + 5797c8570e77764649b38850 | deadlock.delay2test    | stanley      | succeeded (264s elapsed) | Tue, 26 Jul 2016 20:30:15 UTC | Tue, 26 Jul 2016 20:34:39 UTC |
| + 5797c8570e77764649b38853 | deadlock.delay2test    | stanley      | succeeded (284s elapsed) | Tue, 26 Jul 2016 20:30:15 UTC | Tue, 26 Jul 2016 20:34:59 UTC |
| + 5797c8580e77764649b38856 | deadlock.delay2test    | stanley      | succeeded (306s elapsed) | Tue, 26 Jul 2016 20:30:16 UTC | Tue, 26 Jul 2016 20:35:22 UTC |
| + 5797c8580e77764649b38859 | deadlock.delay2test    | stanley      | succeeded (68s elapsed)  | Tue, 26 Jul 2016 20:30:16 UTC | Tue, 26 Jul 2016 20:31:24 UTC |
| + 5797c8590e77764649b3885c | deadlock.delay2test    | stanley      | succeeded (326s elapsed) | Tue, 26 Jul 2016 20:30:17 UTC | Tue, 26 Jul 2016 20:35:43 UTC |
| + 5797c8590e77764649b3885f | deadlock.delay2test    | stanley      | succeeded (347s elapsed) | Tue, 26 Jul 2016 20:30:17 UTC | Tue, 26 Jul 2016 20:36:04 UTC |
| + 5797c85a0e77764649b38862 | deadlock.delay2test    | stanley      | succeeded (410s elapsed) | Tue, 26 Jul 2016 20:30:18 UTC | Tue, 26 Jul 2016 20:37:08 UTC |
| + 5797c85a0e77764649b38865 | deadlock.delay2test    | stanley      | succeeded (367s elapsed) | Tue, 26 Jul 2016 20:30:18 UTC | Tue, 26 Jul 2016 20:36:25 UTC |
| + 5797c85b0e77764649b38868 | deadlock.delay2test    | stanley      | succeeded (431s elapsed) | Tue, 26 Jul 2016 20:30:19 UTC | Tue, 26 Jul 2016 20:37:30 UTC |
| + 5797c85c0e77764649b3886b | deadlock.delay2test    | stanley      | succeeded (451s elapsed) | Tue, 26 Jul 2016 20:30:20 UTC | Tue, 26 Jul 2016 20:37:51 UTC |
| + 5797c85c0e77764649b3886e | deadlock.delay2test    | stanley      | succeeded (472s elapsed) | Tue, 26 Jul 2016 20:30:20 UTC | Tue, 26 Jul 2016 20:38:12 UTC |
| + 5797c85d0e77764649b38871 | deadlock.delay2test    | stanley      | succeeded (387s elapsed) | Tue, 26 Jul 2016 20:30:21 UTC | Tue, 26 Jul 2016 20:36:48 UTC |
| + 5797c85e0e77764649b38874 | deadlock.delay2test    | stanley      | succeeded (599s elapsed) | Tue, 26 Jul 2016 20:30:22 UTC | Tue, 26 Jul 2016 20:40:21 UTC |
| + 5797c85e0e77764649b38877 | deadlock.delay2test    | stanley      | succeeded (492s elapsed) | Tue, 26 Jul 2016 20:30:22 UTC | Tue, 26 Jul 2016 20:38:34 UTC |
| + 5797c85f0e77764649b3887a | deadlock.delay2test    | stanley      | succeeded (555s elapsed) | Tue, 26 Jul 2016 20:30:23 UTC | Tue, 26 Jul 2016 20:39:38 UTC |
| + 5797c85f0e77764649b3887d | deadlock.delay2test    | stanley      | succeeded (533s elapsed) | Tue, 26 Jul 2016 20:30:23 UTC | Tue, 26 Jul 2016 20:39:16 UTC |
| + 5797c8600e77764649b38880 | deadlock.delay2test    | stanley      | succeeded (575s elapsed) | Tue, 26 Jul 2016 20:30:24 UTC | Tue, 26 Jul 2016 20:39:59 UTC |
| + 5797c8610e77764649b38883 | deadlock.delay2test    | stanley      | succeeded (639s elapsed) | Tue, 26 Jul 2016 20:30:25 UTC | Tue, 26 Jul 2016 20:41:04 UTC |
| + 5797c8610e77764649b38886 | deadlock.delay2test    | stanley      | succeeded (660s elapsed) | Tue, 26 Jul 2016 20:30:25 UTC | Tue, 26 Jul 2016 20:41:25 UTC |
| + 5797c8620e77764649b3888c | deadlock.delay2test    | stanley      | succeeded (509s elapsed) | Tue, 26 Jul 2016 20:30:26 UTC | Tue, 26 Jul 2016 20:38:55 UTC |
| + 5797c8650e77764649b3889b | deadlock.delay2test    | stanley      | succeeded (614s elapsed) | Tue, 26 Jul 2016 20:30:29 UTC | Tue, 26 Jul 2016 20:40:43 UTC |
+----------------------------+------------------------+--------------+--------------------------+-------------------------------+-------------------------------+
I guess I would expect them to execute pretty much in the order requested

Awesome, glad to hear it.
And yes, they should be executed in order as requested. Is the ordering issue the same as one described in #2797?
If so, let's continue there and if not, it's probably the best to open a new issue and we will have a look :)


Low font contrast in active item in left sidebar

Description
The active link inside navbar has a shallow font contrast in light mode

Ouch! This is new. I think it may have been introduced in #849. Would you be interested in investigating and submitting a PR?


issue while copying iceberg table from Left to right clusters

Hello Team,
We have been seeing strange issue while running hms-mirror to copy iceberg tables from Left to Right environment.
As a part of the command
DROP TABLE IF EXISTS hms_mirror_shadow_hms_iceberg;
Error message
2023-04-17 15:15:00,895 [pool-1-thread-1] INFO Cluster.runTableSql(484):RIGHT:SQL:Loading table from Shadow:FROM hms_mirror_shadow_hms_iceberg INSERT OVERWRITE TABLE hms_iceberg SELECT *
2023-04-17 15:15:01,670 [pool-1-thread-1] ERROR Cluster.runTableSql(491):java.sql.SQLException: Error while compiling statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask. data/warehouse/tablespace/external/hive/hms_test.db/_tmp.hms_iceberg: PUT 0-byte object  on data/warehouse/tablespace/external/hive/hms_test.db/_tmp.hms_iceberg: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: CDDSXDBDYX3P5ERK; S3 Extended Request ID: LrT3JZopIna3Hrd+VPymRs1FapcdZ63PzYhGmsBmkw5WBVvgSBQfjkTmcMDDjz4W41Wh6rw24WGMlRAurNf/SA==; Proxy: null), S3 Extended Request ID: LrT3JZopIna3Hrd+VPymRs1FapcdZ63PzYhGmsBmkw5WBVvgSBQfjkTmcMDDjz4W41Wh6rw24WGMlRAurNf/SA==:AccessDenied
2023-04-17 15:15:01,727 [pool-1-thread-1] INFO Transfer.call(233):Migration complete for hms_test.hms_iceberg in 5225ms

We have granted users from left environment only read access to right environment buckets. Looks like drop command is trying to write into _tmp.hms_icerbeg file which cannot be possible.
Can we check if we can avoid this while running drop table command.
Hemanth

@hpasumarthi an you add the context in how your calling hms-mirror.  The commandline, etc..  The RIGHT needs to be able to ensure the shadow table are 'reset'.  So the right user 'will' need access to the 'left' storage in this case to 'clean up' these artifacts.  If they aren't allowed that type of access, you could try an intermediate-storage location.  This way you wouldn't have to be concerned about RIGHT to LEFT access.


Disallow truthiness checks on certain literal kinds

Seeing what a potential fix for #59001 turns up

@typescript-bot test this

@typescript-bot test it
I guess I should make that an alias, as two people have done that today...

Does this test for the negated forms too?

@typescript-bot pack this

!expr isn't considered a truthiness position today. Maybe for this check in particular it would make sense to generalize it to all boolean coercions

Gonna find all the bad code now, I think
@typescript-bot test it

6 new errors in vscode based on the benchmarks; it's confusing why the user tests did not say anything there, but maybe top400 will say something.

Tested manually:
src/vs/base/common/path.ts:335:4 - error TS2869: Truthiness test of this kind of expression appears unintentional

335    `${resolvedDevice}${resolvedTail}` || '.';
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/vs/editor/standalone/test/browser/monarch.test.ts:236:24 - error TS2869: Truthiness test of this kind of expression appears unintentional

236    uselessReplaceKey5: '@ham' || '',
                           ~~~~~~

src/vs/platform/files/test/browser/indexedDBFileService.integrationTest.ts:192:16 - error TS2869: Truthiness test of this kind of expression appears unintentional

192     assert.ok(!'Unexpected value ' + basename(value.resource));
                   ~~~~~~~~~~~~~~~~~~~

src/vs/platform/files/test/node/diskFileService.integrationTest.ts:276:16 - error TS2869: Truthiness test of this kind of expression appears unintentional

276     assert.ok(!'Unexpected value ' + basename(value.resource.fsPath));
                   ~~~~~~~~~~~~~~~~~~~

src/vs/platform/files/test/node/diskFileService.integrationTest.ts:320:16 - error TS2869: Truthiness test of this kind of expression appears unintentional

320     assert.ok(!'Unexpected value ' + basename(value.resource.fsPath));
                   ~~~~~~~~~~~~~~~~~~~

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:1615:14 - error TS2869: Truthiness test of this kind of expression appears unintentional

1615    tooltip: (`${exitMessage} ` ?? '') + nls.localize('launchFailed.exitCodeOnlyShellIntegration', 'Disabling shell integration in user settings might help.'),
                  ~~~~~~~~~~~~~~~~~

Found 6 errors in 5 files.

Errors  Files
     1  src/vs/base/common/path.ts:335
     1  src/vs/editor/standalone/test/browser/monarch.test.ts:236
     1  src/vs/platform/files/test/browser/indexedDBFileService.integrationTest.ts:192
     2  src/vs/platform/files/test/node/diskFileService.integrationTest.ts:276
     1  src/vs/workbench/contrib/terminal/browser/terminalInstance.ts:1615

Collated breaks
Clearly intentional, albeit weird:
  optimizeNodes(): this | undefined {
    return `${this.code}` ? this : undefined
  }

Very good find -- catching an operator precedence bug. The checking to allow e.g. while (0) means this isn't found for the common case of a > b ?? 0; I'll put up a second PR
if (historyMsgLength > modelConfig?.max_tokens ?? 4000)

Good find, maybe someone thought {...null} was null (it isn't)? Two instances of this in the same project
 setTheme({ ...theme_setting } || {});

 {...prevStyles} || {}

Very good find: This project idiomatically does t("some str") || "fallback" but misplaced the parens in two places:
<QuestionTip ml={1} label={publishT('QPM Tips' || '')}></QuestionTip>
// and
              label={t('support.outlink.share.Response Quote tips' || '')}

??. Asked about it
        <Image
          src={`https://github.com/${profile?.username}.png` || ''}

??. Asked about it.
    {
      layout: 'vertical' || 'flex',
      labelLayout: undefined,
      flex: false,
      className: 'flex flex-row gap-2 justify-between',
    },

For `${this.code}` ? this : undefined`, you can just check if any TemplateExpression has a non-empty literal span.

The webpack one above looks like a bona fide bug:
if (typeof value === "string" && /^[+-]?\d*(\.\d*)[eE]\d+$/)

This was almost certainly meant to actually run that regex on something.

Yep, though given the full code is:
		case "number":
			if (typeof value === "number") return value;
			if (typeof value === "string" && /^[+-]?\d*(\.\d*)[eE]\d+$/) {
				const n = +value;
				if (!isNaN(n)) return n;
			}

I would personally just remove the regex altogether; after all, this block says a number is being parsed, and there's already a saving isNaN that made this code not broken.


Fix memory leak on view binding in autofill management list mode fragment

Task/Issue URL: https://app.asana.com/0/488551667048375/1202821157855652/f
Description
Fixes memory leak from view binding in fragment
Steps to test this PR
Smoke test credential management; ensure list loads ok

Current dependencies on/for this PR:

develop

PR #2202   👈

This comment was auto-generated by Graphite.


Add building if satellites are nearby

This solves #113
I've added bug's test, with the latest mine in a different position.
The only problem is that is exceding the timeout and I'm not able to solve it

I've tried to use function with time out, but I was getting non-arrow functions are forbidden (only-arrow-functions), even though you are the same in a previous test with error

You shouldn't get the error if you have this in the body of your function.


Admin. efficiency, UN peacekeeping, and national focuses

Hi, I'm new to both the platform and the New World Order mod so forgive me if I'm doing anything wrong. I have a couple of issues, I'll start with the simplest one.

UN Peacekeeping missions. I like the way they're implemented but there's a minor problem, and it's that if there are two requests for UN aid within two years of one another, and one fails, so will the other. For instance, playing as Zaire I was asked to help South Sudan, and readily accepted. A few months later Gambia requested a UN mission, and knowing that they're a one province minor I refused, since the rebels would win before I get there. Obviously the mission failed, but I got the event (loss of prestige, etc.) as if I had accepted. I'm pretty sure this happens because there is only one UN peacekeeping flag, and it's universal, so if one mission fails, so will all others. The obvious solution would be to have unique flags for each country (e.g. UN_peacekeeping_gambia), but I don't know how hard it would be to implement. Another solution could be having numbers for the mission flags; for instance, if there's no current mission, the flag would be UN_peacekeeping_1 or something like that, but if that flag is already in place then you would have UN_peacekeeping_2 instead, and so on. They would always be unique this way, and will fail independently.

Money. I've played as three countries so far, Zaire (1992), Burma (1992), and Yugoslavia (1946). With all three I was losing ~300 pounds a day, with all sliders to the minimum, and maximum taxes. There was basically no income, and I had to cheat for money for the first 5 years or so until my finances stabilized. After that I could manage to keep in the positive (and get extremely rich sometimes), but the initial, inevitable bankruptcy is still anoying unless you cheat. I think the reason for this is my third issue.

Administrative efficiency. It is extremely low in all three starts. I know Yugoslavia, Zaire and Burma are not particularly rich countries but they should be playable at least. I have yet to check if this is true with major powers, but admin efficiency was usually around 6%. This could be the reason for the ridiculous loss of money early game, and I believe it stems from the fact that bureaucrats were 0.1% of the population, or even less sometimes. I tried to use national focus to encourage bureaucrats, which leads me to issue 4.

National focuses. I can't be 100% sure, but they look broken. Most of them won't do anything. Promoting bureaucrats with maxed admin. spending for 20 years would increase its number from 0.1% to 0.2% or, sometimes, 0.3%. Which looks more like the maxed admin. spending doing its thing and not really the effect of the national focus. The covert action to increase party loyalty in foregin countries is also not working for me. This one I'm sure about because after years of promoting liberalism in Chad the party loyalty map mode shows a "neutral" loyalty to the Liberal party, the same as every other. Maybe it is the map mode that doesn't work, but it does show me the real loyalty in other countries (in New York for instance), so it looks like it is the NF that isn't working.

I don't mean to undermine your work or anything, quite the opposite, I'm just trying to help its development by offering (what I believe to be) some constructive criticism or informing of problems I notice. I love the mod, it is a great idea and is very well implemented. It gives the game much more "replayability" while we wait for Victoria 3, and it's an amazing game on its own too, truly one of only a handful of games set in the current era. So thank you for that :)

Also, I forgot one about nukes. The AI seems too willing to use them (or I just happen to be very unlucky). In two of my three games I got nukes within 10 years of gameplay. As Burma it was kind of understandable, since I was at war with the USA (because I was allied to China and she tried to reclaim Taiwan), although I don't think minors should be the ones being nuked, just China (or other military powerhouses on their side). But as Zaire it was during the Rwanda war.   The USA didn't nuke anyone since WWII, and they have gone to much more cruent and/or important wars than a conflict between Rwanda and Zaire. I mean, maybe there should be very strict requirements for using nuclear bombs (like having a % of your territory occupied?

I completely agree with all of your points

For the UN peacekeeping problem, I think your suggestion of the country flags being numbered in those events is the most practical solution to this problem as adding the name of every single country to the country flags would be too time consuming.
and 3. I've been trying for a while now to solve this problem by adding a fixed amount of pounds to the files of each country based on the historical gdp either in 1946 or 1992 in US dollars however this method didn't work. Your suggestion of that administrative efficiency is causing this problem is quite interesting, I will have a look into it later. although for Zaire, I suppose that its current economic status in the 1992 bookmark of NWO is quite accurate as from what I know the Zairan government led by Mobutu was extremely corrupt with the country's economy imploding in the 1980s causing the average income of the average Zairan to be much lower than they would have had several decades ago.
I wasn't really aware of this issue, I will take a look into it.

As for the nuclear weapons system,  I'm planning to add an updated Nuclear weapon system in a future version where the AI would be less willing to use nuclear weapons on due to Mutually Assured Destruction however as of right now I could edit the current system where the event that allows countries to use nuclear weapons will have countries that aren't secondary or great powers will be exempt for being hit by nuclear weapons.

Thanks for the reply. By the way, are you a developer or something? I'm asking because your username is counterintuitive in that regard, haha. Anyway, you are right about Zaire being poor, but I'm not sure about Yugoslavia. That's why I also tried 1992 Netherlands and 1946 Canada.
As the Netherlands I couldn't stop losing money no matter what I did, although it was about 50 or 80 pounds a day, not 300. As Canada, I could start making money, but only after having every slider set to the minimum, all taxes maxed, and at least 50% tariffs. Admin efficiency as Netherlands was 11.6%, very low but still double that of Zaire or Yugoslavia, and 36% as Canada, which might be why it was the only country that could make money (although really, having education, admin. spending, and social spending on 0% while taxes and tariffs are maxed is not really a good long-term solution). I tried those two countries instead of Soviet Union, USA, or China because that way the gigantic industrial prowess of those countries doesn't create a false equivalent to my previous games.
Regarding nukes, I think your solution could work, but you should probably add the possibility to nuke countries that have the ability to do so themselves. Otherwise Israel (a minor nation) might be nuking Iran (a secondary power) without Iran being able to fire back.

Yes I'm a developer for NWO, for Yugoslavia in the 1946 bookmark, you're right about it as even though it was completely devastated during WW2, it would have a much less corrupt administration, better infrastructure, larger industries and a better economy than Zaire.
Also which version of NWO are you playing on as in the previous version, there was a major overhaul of the economy which divided artisians up into different services like working in transportation etc. However recently it was discovered that it had kinda messed up the economy so it could be a cause of that problem too.
As for Nukes I agree with you that there should be add the possibility to nuke countries that have the ability to do so themselves

I'm playing on 1.13 (the last one, I believe. I downloaded it like a month ago or so anyway). I didn't know about that overhaul you mention, it might have something to do with this. I can't really know, as I said before I'm new to the mod and have only played the latest version (apart from one game like two years ago which I didn't really enjoy at the time).

I apologise for the lack of work on this issue as I'm personally quite busy with work and exams currently right now, although I may have some free time to incorporate these future changes into 2.00


protonvpn-gui: 1.12.0 -> unstable-2023-10-25  (4.1.0), protonvpn-gui_3: init at 1.12.0

Description of changes

#264004
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

For me it's broken with 2FA. The code is correct and I do get a login notification by mail.

Subsequent attempts to enter another 2FA code result in error:

Further attempts to launch protonvpn-app crash with:
protonvpn-app
2023-11-17T22:44:46.716756 | proton.vpn.app.gtk.app:58 | INFO | APP:PROCESS_START | self=<app.App object at 0x7f5c59664e00 (proton+vpn+app+gtk+app+App at 0x26f7ff0)>
Traceback (most recent call last):
  File "/nix/store/xg1a49m7460v1lx686v59179cqzwjn3y-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/app.py", line 97, in do_activate
    self.tray_indicator = self._build_tray_indicator_if_possible(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/xg1a49m7460v1lx686v59179cqzwjn3y-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/app.py", line 198, in _build_tray_indicator_if_possible
    return TrayIndicator(controller, main_window)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/xg1a49m7460v1lx686v59179cqzwjn3y-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/widgets/main/tray_indicator.py", line 118, in __init__
    self._menu = self._build_menu()
                 ^^^^^^^^^^^^^^^^^^
  File "/nix/store/xg1a49m7460v1lx686v59179cqzwjn3y-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/widgets/main/tray_indicator.py", line 221, in _build_menu
    if self._controller.user_logged_in:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/xg1a49m7460v1lx686v59179cqzwjn3y-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/controller.py", line 119, in user_logged_in
    return self._api.is_user_logged_in()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/w1fn9nriinbvr7cwrngb6lngp6m7cfnp-python3.11-proton-vpn-api-core-0.20.1/lib/python3.11/site-packages/proton/vpn/core/api.py", line 73, in is_user_logged_in
    return self._session_holder.session.logged_in
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/w1fn9nriinbvr7cwrngb6lngp6m7cfnp-python3.11-proton-vpn-api-core-0.20.1/lib/python3.11/site-packages/proton/vpn/core/session.py", line 76, in session
    self._session = self._proton_sso.get_default_session(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/pwiqf3zy1rp86wa3iikaiyw4bzjckv92-python3.11-proton-core-0.1.15/lib/python3.11/site-packages/proton/sso/sso.py", line 192, in get_default_session
    sessions = self.sessions
               ^^^^^^^^^^^^^
  File "/nix/store/pwiqf3zy1rp86wa3iikaiyw4bzjckv92-python3.11-proton-core-0.1.15/lib/python3.11/site-packages/proton/sso/sso.py", line 133, in sessions
    keyring_index = keyring[self.__keyring_index_name()]
                    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/pwiqf3zy1rp86wa3iikaiyw4bzjckv92-python3.11-proton-core-0.1.15/lib/python3.11/site-packages/proton/keyring/_base.py", line 65, in __getitem__
    return self._get_item(key)
           ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/bx86g5443x7900fga3hss4h4zivynsx5-python3.11-proton-keyring-linux-0.0.1/lib/python3.11/site-packages/proton/keyring_linux/core/keyring_linux.py", line 45, in _get_item
    stored_data = self.__keyring_backend.get_password(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/bpn2l8wlqvsrzblhvsx464qlq99j6061-python3.11-keyring-24.2.0/lib/python3.11/site-packages/keyring/backends/SecretService.py", line 83, in get_password
    return item.get_secret().decode('utf-8')
           ^^^^^^^^^^^^^^^^^
  File "/nix/store/ghj811xzk3w935q4gx5yr4irz4dw107n-python3.11-secretstorage-3.3.3/lib/python3.11/site-packages/secretstorage/item.py", line 100, in get_secret
    secret, = self._item.call('GetSecret', 'o', self.session.object_path)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ghj811xzk3w935q4gx5yr4irz4dw107n-python3.11-secretstorage-3.3.3/lib/python3.11/site-packages/secretstorage/util.py", line 63, in call
    return self.send_and_get_reply(msg)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/ghj811xzk3w935q4gx5yr4irz4dw107n-python3.11-secretstorage-3.3.3/lib/python3.11/site-packages/secretstorage/util.py", line 48, in send_and_get_reply
    raise DBusErrorResponse(resp_msg)
jeepney.wrappers.DBusErrorResponse: [com.dubstepdish.dbus.next.ServiceError] ('The service interface raised an error: \'NoneType\' object has no attribute \'encode\'.\n[\'  File "/nix/store/46vwq1km9vmb32k0b7blk0j57ygjscjx-python3.11-dbus-next-0.2.3/lib/python3.11/site-packages/dbus_next/aio/message_bus.py", line 351, in done\\n    result = fut.result()\\n             ^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/interfaces/item.py", line 103, in GetSecret\\n    return await self._get_secret(session)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/interfaces/item.py", line 58, in _get_secret\\n    return await self.service._encode_secret(session, password)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/interfaces/service.py", line 102, in _encode_secret\\n    return await session._encode_secret(password)\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/common/tools.py", line 7, in wraps\\n    return await loop.run_in_executor(None, lambda: f(*args, **kwargs))\\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/concurrent/futures/thread.py", line 58, in run\\n    result = self.fn(*self.args, **self.kwargs)\\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/common/tools.py", line 7, in <lambda>\\n    return await loop.run_in_executor(None, lambda: f(*args, **kwargs))\\n                                                    ^^^^^^^^^^^^^^^^^^\\n\', \'  File "/nix/store/w0vr4j88ycdrniyryx8zpsj6iyy9kg4p-pass-secret-service-unstable-2022-07-18/lib/python3.11/site-packages/pass_secret_service/interfaces/session.py", line 41, in _encode_secret\\n    password = password.encode("utf8")\\n               ^^^^^^^^^^^^^^^\\n\']',)

@foolnotion Which desktop-manager do you use, nixpkgs is your system built-from?

@SebTM I use SwayWM, flake-based system with nixpkgs master.

Yes I do, even two different account types (personal account, one business account with enforced 2FA)
I have two ideas in mind,
something is broken because your system is built from master (I tested it on stable and unstable)
something is missing because you use sway not gnome that is enabled by the nixos module, do you have gnome-keyring and network-manager working?
After thinking more about it I suspect the second option "gnome vs sway" more than the first

I suspected the same, and after reinstalling the gnome-keyring service (from home-manager), deleting and replacing the default keyring, reinstalling pinentry and all that stuff, now it works.
One more thing to consider, though: it seems that the version tags for proton-core and proton-vpn-logger have been removed upstream. I had to replace the version with revision numbers in the respective derivations.

One more thing to consider, though: it seems that the version tags for proton-core and proton-vpn-logger have been removed upstream. I had to replace the version with revision numbers in the respective derivations.

Oh well, that's something I did not expect and it's horrid. But well, going to do my best in updating the PR then.

In the end, I think I will have to rely on the commit sha instead of the version for all of the components, because if they keep removing tags, then this PR will always be defective at some point.

https://github.com/ProtonVPN/proton-vpn-gtk-app/issues/6
There is already an issue, I'm in contact with them if this can be addressed soon as it makes packaging/maintaining it harder ✌🏻

Thank you @SebTM. Going to set this as a draft and wait for the response.

Hey, there seems to be no short-time solution so we should stick with the hashes until there is an official solution provided. I linked the issue where the most communication/responses from the proton vpn-team were in in the issue above (you already participate)
https://www.reddit.com/r/ProtonVPN/s/FJxY6a0aoM
How long, do we want to keep the previous version? If we could get it merged before the branch-off I would be in favor of removing the old and archived one. People who require it can still pull the derivation out of nixpkgs as overlay. ArchLinux flagged it already a month ago just for comparison.

Hey, there seems to be no short-time solution so we should stick with the hashes until there is an official solution provided. I linked the issue where the most communication/responses from the proton vpn-team were in in the issue above (you already participate)
https://www.reddit.com/r/ProtonVPN/s/FJxY6a0aoM How long, do we want to keep the previous version? If we could get it merged before the branch-off I would be in favor of removing the old and archived one. People who require it can still pull the derivation out of nixpkgs as overlay. ArchLinux flagged it already a month ago just for comparison.

The old one doesn't even work for me properly anymore it returns some API error when trying to log in so I'm in favor of just removing it outright.

The old one doesn't even work for me properly anymore it returns some API error when trying to log in so I'm in favor of just removing it outright.

I mean, I could ditch it (my reasoning to keep it was because the new version is hosted on a separate repo), but the previous version works for me though. So not sure what could be the issue on your specific case.

I see that it might be still working, but it's archived (https://github.com/ProtonVPN/linux-app) on GitHub and will break eventually without warning/solution so keeping it another release seems unneeded?

I migrated everything to the latest commit and now the application does not work:
Traceback (most recent call last):
  File "/nix/store/iykvasp7za6zwh07s986clxi8bdlkxc7-protonvpn-gui-unstable-2023-10-25/bin/..protonvpn-app-wrapped-wrapped", line 6, in <module>
    from proton.vpn.app.gtk.__main__ import main
  File "/nix/store/iykvasp7za6zwh07s986clxi8bdlkxc7-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/__main__.py", line 26, in <module>
    from proton.vpn.app.gtk.app import App
  File "/nix/store/iykvasp7za6zwh07s986clxi8bdlkxc7-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/app.py", line 27, in <module>
    from proton.vpn.app.gtk.controller import Controller
  File "/nix/store/iykvasp7za6zwh07s986clxi8bdlkxc7-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/controller.py", line 43, in <module>
    from proton.vpn.app.gtk.widgets.headerbar.menu.bug_report_dialog import BugReportForm
  File "/nix/store/iykvasp7za6zwh07s986clxi8bdlkxc7-protonvpn-gui-unstable-2023-10-25/lib/python3.11/site-packages/proton/vpn/app/gtk/widgets/headerbar/menu/bug_report_dialog.py", line 34, in <module>
    from proton.vpn.core.reports import BugReportForm
ModuleNotFoundError: No module named 'proton.vpn.core.reports'

I see that it might be still working, but it's archived (https://github.com/ProtonVPN/linux-app) on GitHub and will break eventually without warning/solution so keeping it another release seems unneeded?

protonvpn-cli had the same situation of having separate repos for versions, but version 3 does not work for people not using NetworkManager. This is something discovered after lots of issues complaining about not being able to use protonvpn. As I am maintaining the package and can't ensure that there will be breaking changes that might affect some users, I still can't see your argument as a valid reason to ditch the version.

I migrated everything to the latest commit and now the application does not work:

The flatpak seems to work so maybe just use the same revisions for now
https://github.com/flathub/com.protonvpn.www/blob/master/com.protonvpn.www.yml#L728C17-L728C57
This really is a very messy release

@foolnotion I have updated the PR to use the commit hashes, you can test it now

Works fine for me too!

Hey, just wanted to follow up - four confirmations that it's working, can we get it merged? (no permissions myself) :)

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/1269

Also this probably should be updated to the latest commit 1177067f7162e8e529942489fe7714d7b28ce295

I would prefer to update this later. Last time I picked a new commit for a component, the application didn't work as expected, so I'd rather wait for this to get merged and then dedicate more time into updating it properly.

When trying to use this package, I'm getting the following crash:
  File "/nix/store/lhgzgiiydx87gygn65wq021sw7487k1x-python3.11-keyring-24.3.0/lib/python3.11/site-packages/keyring/backends/SecretService.py", line 43, in priority
    raise RuntimeError(
RuntimeError: The Secret Service daemon is neither running nor activatable through D-Bus

I'm on NixOS 23.11, using i3 and Home Manager, with services.gnome-keyring.enable = true; in my home.nix.
Does anyone have any hints on what could be going wrong here?

I think you must add the secrets component:
    services.gnome-keyring = {
      enable = true;
      components = [ "pkcs11" "secrets" "ssh" ];
    };

This configuration works for me.

Perhaps add a programs.protonvpn-gui.enable nixos option?

Unfortunately, neither of those suggestions worked. Adding the extra config for gnome-keyring didn't resolve the "Secret Service daemon not running" issue, and adding `programs.protonvpn-gui' resulted in the following:
       error: The option `programs.protonvpn-gui' does not exist. Definition values:

@WolfangAukang Oh, thanks for clarifying!

Unfortunately, neither of those suggestions worked. Adding the extra config for gnome-keyring didn't resolve the "Secret Service daemon not running" issue, and adding `programs.protonvpn-gui' resulted in the following:
       error: The option `programs.protonvpn-gui' does not exist. Definition values:
       - In `/etc/nixos/configuration.nix':
           {
             enable = true;
           }

I believe programs.protonvpn with suboptions is better, e.g.
programs.protonvpn = {
  enable = true;
  gui = true;
  cli = true;
};

When trying to use this package, I'm getting the following crash:
  File "/nix/store/lhgzgiiydx87gygn65wq021sw7487k1x-python3.11-keyring-24.3.0/lib/python3.11/site-packages/keyring/backends/SecretService.py", line 43, in priority
    raise RuntimeError(
RuntimeError: The Secret Service daemon is neither running nor activatable through D-Bus

I'm on NixOS 23.11, using i3 and Home Manager, with services.gnome-keyring.enable = true; in my home.nix.
Does anyone have any hints on what could be going wrong here?

It appears to me that you only enabled gnome-keyring in home-manager (home.nix), correct?
I would recommend to also enable the nixos-option (https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/desktops/gnome/gnome-keyring.nix) as you can see this provides the wrapper and other dependencies and was always enabled in my tests. (gnome/sway but not recent)


Trail breaks if bubble is only available for 1 year in all data

Add exception so no trail segments would be displayed in that case
set Y axis to Tsunami deaths
Find India at year 2004
drag time slider forward. One bubble is stuck without label (sometimes with) and looks weird:

Drag timeslider backwards: sometimes label is stuck alone

https://github.com/Gapminder/vizabi/pull/1594


Fix casing inconsistency breaking license filters for the MET

Elasticsearch keyword matches are case sensitive, and some providers have different casing in their license (the MET has both 'cc0' and 'CC0'. Make all license types lowercase to enforce consistency.
Reindexing is required for this change to take effect. @brenoferreira fyi

A test is failing, but not because of this change (I removed this flaky test in another PR). I'm going to merge this.


D2LBR-6 NYU changes for enhancements for site archiving

Changes from https://github.com/NYUeServ/sakai11/tree/lms-migration/webservices/cxf

@TurRil  Please review and then Squash and merge into our 21.x.
There are 2 URLs that reference NYU that we need to decide how to handle but this is good enough for next step of testing I think.

A zillion of these:
2022-04-04 21:12:12,155  INFO https-jsse-nio-8443-exec-10 org.sakaiproject.tool.assessment.qti.util.XmlStringBuffer - UPDATING MORE THAN ONE ELEMENT

To resolve:

NYU URLs
Extra credit for GB category


Offchain Module in Java Sdk

I noticed there is a new offchain module in the python sdk,  are we expecting the same in Java ?   i will be happy to contribute to it if there is an ongoing effort toward it.

We'd like to replicate same offchain module in python sdk to Java, but no one works on it yet.
If you'd like to work on it, feel free to start a PR and ping me for any questions.

We'd like to replicate same offchain module in python sdk to Java, but no one works on it yet.
If you'd like to work on it, feel free to start a PR and ping me for any questions.

will check the offchain module by #71, let me know if you still want to take it.

will check the offchain module by #71, let me know if you still want to take it.


tools/ci:  Fixed the cmake build and installation of Bloaty in the darwin.sh script.

Summary

function bloaty() Add  -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty.
Improves workflow execution time because it is now cached.

Changed reference file to calculate the hash for key of actions/cache@v4. Now it is tools/ci/platforms/darwin.sh.

Impact
None
Testing
Pass CI  test

@simbit18 macOS ci fail, is it relative to this change?
https://github.com/apache/nuttx/actions/runs/8343919962/job/22835320538?pr=11947

@xiaoxiang781216
No but it seems related to this
Untracked files:
tools/ci/pyyaml/
here https://github.com/apache/nuttx/blob/2bed7c464646e99e3110ea2da43b854f8d1c35ae/tools/ci/platforms/darwin.sh#L202
pyyaml directory is not deleted.
Very strange that it only showed up now.
version 12.4
https://github.com/apache/nuttx/blob/96c2707737391642ac1d3ade84fb03f4c1fa51e4/tools/ci/cibuild.sh#L302
I will prepare a fix

@xiaoxiang781216  add rm -rf pyyaml #11952


ask for help

could you please send me the data -fasta_filename = "/home/dell/corona.fasta", to me, thanks.

could you please send me the data tipdates_filename = "/home/dell/corona.txt",
this is very important to me, thanks.


[NETBEANS-94] Cannot build NB Javadocs on Windows

Note that the useexternalfile attribute has been on the Ant javadoc-exec-files target (see line 298) for at least the last 10 years, but for some reason it wasn't on the javadoc-exec-packages target. Now fixed.
Description for useexternalfile attribute is here.

@matthiasblaesing
Thank you for reviewing. Changes implemented as requested. Yes, I have an ICLA on file.

Thank you - merged.


Linkedin connect fails

I'm getting this error when trying to login with linkedin:
The redirect_uri does not match the registered value.
This is my linkedin provider object:
  private linkedinProvider: LinkedIn = new LinkedIn({
    clientId: "XXXX",
    appScope: ["r_fullprofile"],
  });

and this is how I used it:
    this.cordovaOauth.logInVia(this.linkedinProvider).then(success => {
            console.log("RESULT: " + JSON.stringify(success));
        }, error => {
            console.log("ERROR: ", error);
        });

I also had a question about the other parameters linkedin requires, the ones that are mentioned here in step2 : https://developer.linkedin.com/docs/oauth2
how am I going to add them and use it, the facebook example has only these params, and when I try to add any of the linkedin params I get a compilation error:
const provider = new Facebook({
    clientId: string,
    appScope?: string[],
    redirectUri?: string,
    responseType?: string,
    authType?: string
});

You have to understand what parameters LinkedIn expects via the LinkedIn documentation.  I assume you're getting a mismatch error because you're providing LinkedIn with the wrong URL.
The issue tracker is for bugs and feature requests only.  For support you'll have to use Stack Overflow.
Best,

@nraboy  I do understand what linkedin expects from the linkedin docs, but the readme here does not elaborate on how to provide the linkedin params to the linkedin provider.

All providers in this library extend the OAuthProvider class which has the following interface:
https://github.com/nraboy/ng2-cordova-oauth/blob/master/provider.d.ts#L2-L8
If you need to change the redirect_uri, it can be done through the redirectUri of that interface.
Best,


"CREATE TABLE IF NOT EXISTS" results in a false-positive error if table already exists

Take a script like the auto-generated migration history table creation by Entity Framework:
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
    "MigrationId" character varying(150) NOT NULL,
    "ProductVersion" character varying(32) NOT NULL,
    CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);

This results in a false error if the table actually already exists:
psql:/home/runner/work/somethingsomething.sql:5: NOTICE:  relation "__EFMigrationsHistory" already exists, skipping
[...]
Error: Error occurred while running action:
Error: error in file: /home/runner/work/somethingsomething.sql
psql:/home/runner/work/somethingsomething.sql:5: NOTICE:  relation "__EFMigrationsHistory" already exists, skipping

Which subsequently and wrongly fails the build.

A temporary workaround is to raise the client message min level to warnings, by adding an option in your connection string:
options='--client_min_messages=WARNING'

This prevents the false error but is not ideal because you'll also not have notices that might be interesting in the log.

We are having this same issue, and have used the workaround suggested by @pk-ot to get it running (thanks pk-ot!).
However, it would be great to have this resolved in the repo itself, as we prefer not to suppress any messages in our pipelines.


ContentMode of previewView

Is there any way to set or change the contentMode of cameraView? It is because I am using container view to show camera view not on the whole screen, and if the container view's aspect ratio is not exactly 16:9, then there are some black gaps.

You have to add
videoGravity = .resizeAspectFill;
before line
super.viewDidLoad()

Thanks!


Failed to install packages in virtual environment created by pipenv shell (with the verbose log)

Hi, I am new to the python ecosystem. I got the same issue as the ticket mentioned below:
https://github.com/pypa/pipenv/issues/1356
So I try to log all the possible messages down here with the settings. Hopefully, that would be useful to find out the root cause.
Because this is the company's repository, some private information I need to hide shouldn't interfere with solving the issue.
Settings:
Pipfile
Pipfile.lock
Virtual Environment Information (pipenv shell):
± |master ?:2 ✗| → pipenv --version
pipenv, version 11.9.0

 2020-10-28 10:05:40 ⌚  MEC-209 in ~/git-repo/mop_service
± |master ?:2 ✗| → pip --version
pip 20.0.2 from /home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/pip (python 3.6)

 2020-10-28 10:06:02 ⌚  MEC-209 in ~/git-repo/mop_service
± |master ?:2 ✗| → python --version
Python 3.6.12

My apologies for not providing the information retrieved frompipenv --support. Because it complains about the flag is not available.  I install pipenv by apt-get in ubuntu, which may not be the latest version.
I turn on the verbose mode to log all the message by executing the following command:
 pipenv install -v > debug.txt 2>&1

The logs list below:
pipenv install log
It is what happened when installing blinker(version=1.4) at line 785-946
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-s42qxhqj
Created temporary directory: /tmp/pip-req-tracker-e1y_en3v
Initialized build tracking at /tmp/pip-req-tracker-e1y_en3v
Created build tracker: /tmp/pip-req-tracker-e1y_en3v
Entered build tracker: /tmp/pip-req-tracker-e1y_en3v
Created temporary directory: /tmp/pip-install-u9wqb2kv
1 location(s) to search for versions of blinker:
* https://pypi.org/simple/blinker/
Fetching project page and analyzing links: https://pypi.org/simple/blinker/
Getting page https://pypi.org/simple/blinker/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/blinker/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/blinker/ HTTP/1.1" 304 0
  Found link https://files.pythonhosted.org/packages/66/6e/59a9fcfdaea1b6f16654b7242687e292b34aa145ece7520bc3b0649a1443/blinker-0.8.tar.gz#sha256=262256946fc67237de1f974261aab30cd1ece8b4fce251909b2bdd18318b1ed4 (from https://pypi.org/simple/blinker/), version: 0.8
  Found link https://files.pythonhosted.org/packages/f7/6a/d6fe7d2ee708e019ff36cfee72567bab2b4255a38e825056d91f801b1e76/blinker-0.9.tar.gz#sha256=564feb8981c69c8cb9eae7b08be864ebed60ab8c57e98429bf72765d68dcda26 (from https://pypi.org/simple/blinker/), version: 0.9
  Found link https://files.pythonhosted.org/packages/5d/a7/cd7c985c1ce71c64f443fa2d46d93c6986505606982093d7d0cb9d79ff3e/blinker-1.0.tar.gz#sha256=be3495250e7a5bdf8b5cd0fcd4f3a3e235b74f7209581283ece9ca14d77a71a6 (from https://pypi.org/simple/blinker/), version: 1.0
  Found link https://files.pythonhosted.org/packages/0e/1b/4696208d895d71539aaecece524d8a0d38de86ae4a3299150b8622353a68/blinker-1.1.zip#sha256=429a2b7433715b0c9bceb65aa0a93181d57f3548f89b9794697bedeb6b513a8f (from https://pypi.org/simple/blinker/), version: 1.1
  Found link https://files.pythonhosted.org/packages/bf/92/b8c23de91e995d0f0245c5ebbae0e8a803bc1811be15921258a15efa1df5/blinker-1.2.tar.gz#sha256=7062c05e9f724e2208835e335df5ffdc169004fe372ca91fb6408cd0f8e3aa85 (from https://pypi.org/simple/blinker/), version: 1.2
  Found link https://files.pythonhosted.org/packages/c9/66/c15dbe2e2cac59bf1d4670d52aa88b8746fd5a47f8353aa4ffac0dde00c4/blinker-1.3.tar.gz#sha256=6811010809262261e41ab7b92f3f6d23f35cf816fbec2bc05077992eebec6e2f (from https://pypi.org/simple/blinker/), version: 1.3
  Found link https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz#sha256=471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6 (from https://pypi.org/simple/blinker/), version: 1.4
Checked 1 links for project 'blinker' against 1 hashes (1 matches, 0 no digest): discarding no candidates
Using version 1.4 (newest of versions: 1.4)
Collecting blinker==1.4
  Created temporary directory: /tmp/pip-unpack-ar02fijl
  Looking up "https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz" in the cache
  Current age based on date: 58822
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 58822
  Using cached blinker-1.4.tar.gz (111 kB)
  Added blinker==1.4 from https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz#sha256=471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6 (from -r /tmp/pipenv-jeu70l6p-requirements/pipenv-ihh8raia-requirement.txt (line 1)) to build tracker '/tmp/pip-req-tracker-e1y_en3v'
    Running setup.py (path:/tmp/pip-install-u9wqb2kv/blinker/setup.py) egg_info for package blinker
    Running command python setup.py egg_info
    running egg_info
    creating /tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info
    writing /tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/top_level.txt
    writing manifest file '/tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file '/tmp/pip-install-u9wqb2kv/blinker/pip-egg-info/blinker.egg-info/SOURCES.txt'
  Source in /tmp/pip-install-u9wqb2kv/blinker has version 1.4, which satisfies requirement blinker==1.4 from https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz#sha256=471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6 (from -r /tmp/pipenv-jeu70l6p-requirements/pipenv-ihh8raia-requirement.txt (line 1))
  Removed blinker==1.4 from https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz#sha256=471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6 (from -r /tmp/pipenv-jeu70l6p-requirements/pipenv-ihh8raia-requirement.txt (line 1)) from build tracker '/tmp/pip-req-tracker-e1y_en3v'
Building wheels for collected packages: blinker
  Created temporary directory: /tmp/pip-wheel-92l_lbwu
  Building wheel for blinker (setup.py): started
  Destination directory: /tmp/pip-wheel-92l_lbwu
  Running command /home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-92l_lbwu
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/blinker
  copying blinker/_utilities.py -> build/lib/blinker
  copying blinker/base.py -> build/lib/blinker
  copying blinker/__init__.py -> build/lib/blinker
  copying blinker/_saferef.py -> build/lib/blinker
  warning: build_py: byte-compiling is disabled, skipping.

  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-u9wqb2kv/blinker/setup.py", line 38, in <module>
      'Topic :: Utilities',
    File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 259, in run
      self.run_command('install')
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/command/install.py", line 557, in run
      self.run_command(cmd_name)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 973, in run_command
      cmd_obj.ensure_finalized()
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
      self.finalize_options()
    File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
      self.set_undefined_options('install',('install_layout','install_layout'))
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 290, in set_undefined_options
      setattr(self, dst_option, getattr(src_cmd_obj, src_option))
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 103, in __getattr__
      raise AttributeError(attr)
  AttributeError: install_layout
  Building wheel for blinker (setup.py): finished with status 'error'
  ERROR: Failed building wheel for blinker
  Running setup.py clean for blinker
  Running command /home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
  running clean
  removing 'build/lib' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.6' does not exist -- can't clean it
  removing 'build'
Failed to build blinker
Installing collected packages: blinker
  Created temporary directory: /tmp/pip-record-wylhnpoh
    Running setup.py install for blinker: started
    Running command /home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u9wqb2kv/blinker/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wylhnpoh/install-record.txt --single-version-externally-managed --compile --install-headers /home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/include/site/python3.6/blinker
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/blinker
    copying blinker/_utilities.py -> build/lib/blinker
    copying blinker/base.py -> build/lib/blinker
    copying blinker/__init__.py -> build/lib/blinker
    copying blinker/_saferef.py -> build/lib/blinker
    warning: build_py: byte-compiling is disabled, skipping.

    running install_lib
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-u9wqb2kv/blinker/setup.py", line 38, in <module>
        'Topic :: Utilities',
      File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/command/install.py", line 557, in run
        self.run_command(cmd_name)
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/dist.py", line 973, in run_command
        cmd_obj.ensure_finalized()
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/home/kiwi/.local/share/virtualenvs/mop_service-Nv_zEphA/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
        self.set_undefined_options('install',('install_layout','install_layout'))
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 290, in set_undefined_options
        setattr(self, dst_option, getattr(src_cmd_obj, src_option))
      File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 103, in __getattr__
        raise AttributeError(attr)
    AttributeError: install_layout
    Running setup.py install for blinker: finished with status 'error'
Cleaning up...
  Removing source in /tmp/pip-install-u9wqb2kv/blinker

Then I thought maybe I could use pip to install blinker, but it is still failed:
 pip install -v --install-option="--prefix=$(pipenv --venv)/lib/python3.6" blinker==1.4

And here is the log:
Pip install blinker failed in the virtual environment created by pipenv shell
I notice that both have failed in the same place:
    File "/home/kiwi/.pyenv/versions/3.6.12/lib/python3.6/distutils/cmd.py", line 103, in __getattr__
      raise AttributeError(attr)

I don't know what else I can do, so I exit the virtual environment, using pyenv to switch python to 3.6.12, which is the same as in the virtual environment, then using pip to install it again in my host environment, and it's ok.
# run in my host environment
pip install -v blinker==1.4

Install blinker by pip in the host environment
That is so far I can provide; if there is a lack of something, please let me know. Thanks.

Please install pipenv via pip, the one available via apt-get is many years out of date

My mistake, I saw the first line of the installation part says using apt to install pipenv, not be aware that it is only for Debian.


separate instance of failsafe for each downstream application

We are big fan of FailSafe!
First of all thank you guys for supporting this awesome framework. It helps us a lot.
Sometimes a given service (mostly Orchestration Service) needs to call APIs on multiple downstream applications. In such scenario, we would want to track retries/circuit-breakers for each of the downstream services. This leads to have separate instance of the FailSafe clients. The question is how can I setup the FailSafe instance in such a way that a callback to the CircuitBreaker Listeners (CheckedRunnable) knows the name of the instance or the downstream service name so that we can have fine-grained logging/tracking of the calls. In case we can pass a Context object to FailSafe object creation and the same is passed back to CheckedRunnable, then the situation could be handled more precisely.
e.g. if CheckedRunnable for OnOpen listener is called, we should know for which downstream application it is called or for which instance of the FailSafe object it is called.
Is there any way we can achieve this?
Thanks.
just an FYI, we are using FailSafe on top of Feign by disabling Retry (Feign.builder().retryer(Retryer.NEVER_RETRY)) provided by Feign. This is because we want to rely heavily on FailSafe for all the features it supports.

If I understand your use case, you'd like to associate some contextual information with each callable/runnable which would be passed through to the event listeners? Normally this isn't a problem since you can track you own contextual information with each Failsafe call. Ex:
void doWithRetries(Callable callable, Object context) {
  Failsafe.with(retryPolicy)
    .onFailure(e -> log.error("Execution with context {} failed", context, e))
    .get(callable);
}

Would that work at all?
Another idea would (just off the top of my head) would be to enhance ExecutionContext to provide a reference to the Runnable/Callable/Future being executed, which could encapsulate your contextual information. You could then create a Runnable that wraps some context:
public class ContextualRunnable implements Runnable {
  private final Runnable runnable;
  public final Object context;

  ContextualRunnable(Runnable runnable, Object context) {
    this.runnable = runnable;
    this.context = context;
  }

  public static Runnable of(Runnable runnable, Object context) {
    return new ContextualRunnable(runnable, context);
  }

  public void run() {
    runnable.run();
  }
}

And unwraps it in your listener:
.onFailure((result, failure, context) -> log.error("Execution with context {} failed", ((ContextualRunnable)context.getExecutable()).context, failure));

Not sure how great an idea this is, but, figured I may as well throw it out there.

Thank you @jhalterman  for your prompt reply!
Yes I love the solution to to pass additional context data to the runnables.
However my issue is on how to pass the same context to "public class CircuitBreakerOnCloseListener implements CheckedRunnable" listener classes so that I can log context data. Basically I wanted to relate the listeners with the instance of FailSafe/Application Runnables.
This way, it helps me to know which downstream server triggered OPEN state of the circuit breaker.

@psinghcredify Any suggestions for what an API to do this might look like? This might give me a better idea what you're thinking.

below comes to my mind.

I was looking at different flavors of callable/runnable and noticed that ContextualCallable/ContextualRunnable are providing a way for users to pass context data.
On the same line, we could have ContextualCheckedRunnable (listeners for various circuit breaker statuses) as below:
public interface ContextualCheckedRunnable {
  void run(ExecutionContext context) throws Exception;
}

Now with above listener class, we can capture the passed-in context and have better way to write log messages or take action.

Or may be when we create instance of FailSafe object, we pass the FailSafeInstanceData (assuming) e.g.
@Bean
public SyncFailsafe<Object> resilientInvokerServiceA() {
        return Failsafe.with(retryPolicy).with(circuitBreakerPolicy).instanceData(data); //new builder method instanceData
    }

Since FailSafeInstanceData is pinned in FailSafe instance which is accessible to any listeners e.g. ContextualCheckedRunnable.
Now the listener would look something like:
public interface ContextualCheckedRunnable {
  void run(FailSafeInstanceData instanceData) throws Exception;
}

combining both of above solutions, we could have hybrid listener interface which can received FailSafeInstanceData & ExecutionContext data. e.g.
public interface ContextualCheckedRunnable {
  void run(FailSafeInstanceData instanceData, ExecutionContext context) throws Exception;
}

disclaimer: I'm not good with naming the things, please change them per the conventions you are enforcing.

@psinghcredify What do you think of my first code example where you track the context, such as serviceName, outside of Failsafe. Does that work?

my bad. may be I was not clear on my problem statement.
Your first idea works for call & fallbacks where we get the context we passed to run(...) method.
However I was thinking more on CircuitBreaker listeners which doesn't know about the context passed to run(...).
class CircuitBreaker {

private void transitionTo(State newState, CheckedRunnable listener) {
...
if (transitioned && listener != null) {
      try {
        listener.run();
      } catch (Exception ignore) {
      }
    }
...
}
...
}

The question is how to pass the same context or FailSafe instance id/data to listener.run()?
For most use cases, we keep the same listener classes ( or circuit-breaker config) for communicating with any downstream applications.

let me know if I can create PR for above?

I believe the fundamental problem right now is that the circuit breaker callbacks/listeners are registered on the circuit breaker at creation time. Retry listeners are registered at call time, giving you a lot more freedom to pass local state.


Proxy Implementation

As an Enterprise User I expect to be able to use my proxy to configure package cloud repos and pull down open source packages.

Check https://github.com/computology/packagecloud-cookbook/pull/14


useClickOutside is not a function

Hi, tried using your hook while installing only it (not "/all"), tried using a named import:
import { useClickOutside } from '@custom-react-hooks/use-click-outside';
Got this error:
sidebar.tsx:18 Uncaught TypeError: useClickOutside is not a function
Clearly it's because the hook doesn't have a named export, but exports default. I was able to use changing to:
import useClickOutside from '@custom-react-hooks/use-click-outside';
But I would suggest either including named imports (they're just more convenient) to all of your hooks or supplementing the docs with this little nuance.
Thanks for the hook!

Hi Andy,
Thank you so much for your feedback regarding the useClickOutside hook. I appreciate you taking the time to highlight the difficulties you encountered with the import process.
To follow up on your suggestion, I've streamlined the hook to support named imports exclusively, ensuring consistency and ease of use. This update should make the integration of the hook more straightforward.
Please update to the latest version to take advantage of these improvements:
npm update @custom-react-hooks/use-click-outside

I've also updated the documentation to reflect this change and provide clear guidance on how to import the hook. I hope this resolves the issues you experienced and enhances your development process. Please do let me know how it works out for you, or if there's anything else I can improve. Your input is incredibly valuable!
Best regards,
Bane


The selector "#groupPrice *" on hx-include returned no matches!

Describe the bug
I just updated to latest Sprig and Craft and on certain sprig includes I am getting this console error

htmx.min.js:1 The selector "#groupPrice *" on hx-include returned no matches!

My component incldue looks like this
{{ sprig('_components/product/handpainted/price', {
	activeProductVariant:activeProductVariant.id,
	dimension:'piece'
}, {id: 'groupPrice','s-trigger': 'load'}) }}

I'm guessing contents on include wouldn't affect things
I can DM you a link to live page if needed
Versions

Plugin version:1.12.0
Craft version:3.7.36

OK will add some uniqueness to them and report back if all ok

Same issue happens when I add a unique ID

If I remove my ID it adds its own and same issue occurs

I can't replicate this locally. Please test with a single component and feel free to share the simplest code sample that fails here so I can take a closer look.

@john-henry I got the same error messages and found out that this happens when the included components are wrapped with {% if sprig.isRequest %} but don't have a fallback ({% else %}).
The following example works fine and doesn't throw the error.
{% if sprig.isRequest %}
    [ ... ]
{% else %}

Content displayed before the trigger.

{% endif %}

Same happens to me, but the error stays even after putting the else.

@goraxan Did you add some content to the {% else %} state? That was needed in my case to get rid of the error.

@studiobruikbaar I tried adding text (no html) in the else, adding a

 in the else fixes it, thanks!

Fixed in https://github.com/putyourlightson/craft-sprig-core/commit/49bf3a0e0e706ab60017e7445b06f3d60837f834 and released in version 1.12.1.


[Feature] mx.diag

Follow the NumPy API

C++ op with bindings in python
tests

I'll start working on this!

@awni i added the diag function to ops.cpp and called it in array.cpp. I'm testing it after building but getting AttributeError: module 'mlx.core' has no attribute 'diag'
am I missing something?

Make sure to add a python binding under "python/src/ops.cpp".

Hi @ManishAradwad, I was also working on this last week (see #526) and I've got it mostly working with C++ & Python tests. Maybe you can use that as a reference if you have any questions about how to implement this.
There's still one big problem for me... I don't know how to implement Diagonal operator's vip() for autograd. I think we might need a complement operator of diagonal() like fill_diagonal() to make the reverse mode autograd work. I checked numpy's implementation but that only supports 2D array. I also checked JAX's implementation but they seem to be implementing this in Python level with JIT, instead of a C++ operator. I also tried to check PyTorch's implementation but that codebase is kinda messy, and I haven't found where they implement diagonal operator's gradient.
I'm getting stuck here. Any suggestions about how to implement this Diagonal's vjp API?


Importing new custom XSD files for XML intelliscense and guidance

Hi,
I have recently started looking at your vscode extension as I am really impressed with the XML Support it provides. The main features I am looking at is verifying the XML syntax is correct, but also to provide intelliscense and guidance using annotations/tool tips while the author is creating the xml.
I have a basic strict XML file that we often use, I have created an XSD for the XML and successfully imported it into the schemastorage. However I can't seem to get this to work in my XML files, are you able to give any input in this area, on where I may have gone wrong?
Thanks,
Chris

Hi @cmwright1981,
sorry for the delay, I am currently on vacation. To be honest I planned to replace the xml parser with a much better one I wrote, which has an architecture and a better and more verbose API.
I checked my repos and it seems I did not publish it by now. It's written in plain ts, so no java or c# or anything else is needed. It should also be possible to use a different source than xsd (like typescript classes or json schemas or sth. like that. But I did not have time sind spring to implement it thoroughly. So if you are interested in helping develop a plain XML Linter in TS/JS then I'll upload the files and send you the link.
So back to your questio: Have you checked the log output. Maybe there is some hint why it might not work. Otherwise I would recommend to fork this repo, check it out and run in in debug mode. Then you can check if the xsd file is really loaded correctly. Maybe it cannot parse your xsd file or it encounters some circular references. That happens to me quite a lot. PR is very welcome.
Regards


headerClass not working with groupedColumn

could not reproduce. i put this into the main demo page:
    {
        // column group 'Participant
        headerName: 'Participant',
        headerClass: 'the-class',

and the resutl was 'the-class' was added to the participant group.


Global Toggl Touch Bar

📒 Description
This PR introduces the Global Toggl on Touch Bar.
🕶 Types of changes
New feature (non-breaking change which adds functionality)
🤯 List of changes

[x] Introduce GlobalTouchBarButton on Control Strip (The right panel)
[x] Introduce show_touch_bar in library (database and migration)
[x] Get / set show_touch_bar in library
[x] Add "Show Toggl in Touch Bar" in Preference. Hide if OS X < 10.12.2
[x] Start / Stop the TimeEntry when tapping on this global button

👫 Relationships
Close #3349
🔎 Review hints
Prepare

If your macbook has Touch Bar, it's good news
If not, please open the Touch Bar Simulator at Xcode app -> Windows Menu -> Show Touch Bar

The Global button state is matching the current TE state

Start app
Check if the Global button is shown -> 💯

Start the TE on app -> Global btn change to ON icon -> 💯
Stop the TE on app -> Global Btn change to OFF icon -> 💯
Tap on Global btn -> Start or Stop the TE -> 💯

Preference

Open Preference
Un-check the "Show Toggl touch bar"
The Global btn disappears -> 💯
Stop app
Open again and verify that the state is persisted -> 💯

On first start the setting is enabled but touch bar icon is not shown. it's probably something to do with the settings being loaded later that he touchbar setting is checked. If I disable and then re-enable the setting icon appears in touch bar. Functionality seemed to be working ok once the icon is shown.

Thank for the feedback.
Unfortunately, I couldn't reproduce it for some reasons.
Here is how I simulate the first launch:

Open Production Toggl (7.4.1023) and Clear cache
Open /Users/<your_username>/Library/Application Support/Kopsik/production/kopsik.db
Make sure there is no show_toolbar in the Setting Table

If there is this column, please delete this database and open the app again -> It will generate the new local database.

Checkout this branch (Please remove the local one since I rebased it)
Select Toggl-Production Scheme or select Production mode and run
Run the build and check the Touch Bar -> It appears 💯
Check Preference -> Show Toggl Touch Bar is ticked 💯

Check the database again, and see the show_touch_bar is 1 💯

Codebase

The default value of show_touch_bar is true
https://github.com/toggl/toggldesktop/blob/46b6cf625c91a10fc34ed1de06b26dd71b8e53a6/src/settings.h#L48
show_touch_bar  is 1 on Database Migration phase
https://github.com/toggl/toggldesktop/blob/46b6cf625c91a10fc34ed1de06b26dd71b8e53a6/src/migrations.cc#L1296-L1298
Load setting and load show_touch_bar
https://github.com/toggl/toggldesktop/blob/46b6cf625c91a10fc34ed1de06b26dd71b8e53a6/src/database.cc#L453

I'm not sure what's I'm missing 🤔
Suggestion
@skel35 can you run the PR on your machine, since it's complete new environment.

You can follow the above steps with Production build
Or you can run on Debug mode as usual. Just run the app and check if the Touch Bar appears or not? If not, please try open the development database at /Users/<your_username>/Library/Application Support/Kopsik/development/kopsik.db and check the show_touch_bar in the Setting table.

I tested again and it worked ok. Tested with no database where new database was generated and with an old database where a new field was added to the database table. Everything worked.

If we're happy with it, please merge, then I would rebase https://github.com/toggl/toggldesktop/pull/3424 and continue my work 🌮


Add methods/tests

Add new methods:

Now all methods on our current public API documentation are covered

Structure files/folders:

main file: /matroid/client.py

sub files: in folder /matroid/src

accounts, collections, detectors, images, labels, streams, videos contains API methods， categorized according to our documentation sections
helpers contains helper functions

tests: in folder /test
(-s is optional, for seeing printed info about the progress in terminal)

command for running all tests:python -m pytest --client_id=yCzyYu2U1v3qPqAC --client_secret=NmBuz5lvnBW9Y9pbyGSAvfxEibMHxOOA --base_url=http://xiaoyun.devaz.matroid.com/api/v1 -s

for running one test file:python -m pytest test/test_streams.py --client_id=yCzyYu2U1v3qPqAC --client_secret=NmBuz5lvnBW9Y9pbyGSAvfxEibMHxOOA --base_url=http://xiaoyun.devaz.matroid.com/api/v1 -s

There are some changes to our route files in my another PR in the main repo, so some tests will only pass on my dev website on that branch

Info on actually updating the client:
https://docs.google.com/document/d/1BR_nM8xD_gLJqFZIxmTJCD-lRBU_iD15pig8kg4zBQc/edit?usp=sharing

@grant-matroid & @xiaoyun-matroid you guys should sync on what else we need to add & when / how to push out an update.


Search doesn't present a list of hosts / search function on mobile is broken

Subject: Search doesn't present a list of hosts
Description:
Search for any city
Results:
You only see a map with a bunch of icons for hosts, but you do not see any hosts. You have to click on each icon after zooming in in order to see hosts.
Backend version: develop-7618e865
Frontend version: develop-7618e865
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1
Page: https://couchers.org/search?location=New+York%2C+New+York%2C+United+States&hostingStatusOptions=2&hostingStatusOptions=3&bbox=-73.7002330&bbox=40.9176300&bbox=-74.2588430&bbox=40.4765780#loc=8.88/40.6975/-73.9795
User: brooklyngarson (12838)

Note that this only seems to happen on mobile devices. I was able to replicate on a computer browser by reducing the width to 959px.

Using map search is completely broken unless you do the "pinch to zoom" method and manually search. Using the filters does not work at all:
https://github.com/user-attachments/assets/ad2d3592-674a-4f98-b7eb-7fa49061a74c

Just adding that this used to work fine on mobile (likely 1-2 months ago, unsure exactly when it changed) with search results appearing in a left-right scrollable area at the bottom of the mobile screen. On desktop, results (still) appear to the left side of the screen.

@nabramow could you upload screenshots documenting this fix? I still do not see hosts appearing where I do a search. Here is what I see. Should I open a new issue if this persists?

@dickorydock This PR has been merged but not yet deployed. You will see the fix once deployed to prod (the live website).

This issue on mobile is only partly resolved: when you first search a city no hosts appear until you click the "Search in this area" button. Until then, there's just an empty box at the bottom of the screen

This issue on mobile is only partly resolved: when you first search a city no hosts appear until you click the "Search in this area" button. Until then, there's just an empty box at the bottom of the screen. @jesseallhands @nabramow let me know if I should make a new issue since this one has been closed

I believe this issue will be addressed by a PR currently in review: #5294 .


LPAL-550 - Adds content spec to lpa_online_tool_id 410 response

Purpose
Adds content specification to OpenAPI 410 response on lpa online id endpoint.
Approach
To better mock out the endpoint
Learning
Any tips and tricks, blog posts or tools which helped you. Plus anything notable you've discovered
Checklist

[x] I have performed a self-review of my own code
[ ] I have added relevant logging with appropriate levels to my code
[ ] I have updated documentation where relevant
[ ] I have added tests to prove my work
[ ] I have run the integration tests (results below)

Is this still correct? I assumed the response body with a 410 would be empty rather than contain any content?


Add notebook query event listeners before connect

Noticed this while fixing something else, because we were hooking up the event listeners only after a successful connection that meant if an error occurred while connecting then any future attempts to run that query wouldn't display any messages.
Scenario :

New notebook
Try to execute code cell with a connection that will error out trying to connect
Re-run the cell

Expected : Error will be displayed
Actual : No error displayed, cell just immediately returns

I'd say that displaying this kind of error in the cell output isn't ideal though - really this kind of thing I think should be shown as a toast notification. But this at least is a step in the right direction so people aren't left wondering what's going wrong.

Pull Request Test Coverage Report for Build 749612837

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.002%) to 43.613%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/services/notebook/browser/sql/sqlSessionManager.ts
0
1
0.0%

Totals

Change from base Build 749174632:
-0.002%

Covered Lines:
26244

Relevant Lines:
54977

💛  - Coveralls


http(...) Uncaught exception in thread, NullPointerException: null

I'm using http(...) to send my Minecraft chat to my Discord server via webhook, utilizing Discarpet's __on_chat_message(...) event. It works flawlessly using the code below, but every time a response comes back a NullPointerException occurs.
__on_chat_message(message, player, command) -> (
	if (command, return());

	body = {
		'content' -> message,
		'embeds' -> null,
		'username' -> player,
		'avatar_url' -> (global_head_api + player~'uuid'),
	};

	http('POST', global_webhook, 10000, 10000, encode_json(body), _(r)->print(r));
);

This prints in the server console. It is worth noting that the error occurs at the same moment the webhook displays in Discord.
[19:51:45] [Server thread/INFO]: <GunnyWaffle> error repro test
[19:51:46] [Thread-484/ERROR]: Uncaught exception in thread "Thread-484"
java.lang.NullPointerException: null

I've tried many things to see if this is my doing, but nothing works.

I'm not sure if this is related, but I had another NullPointerException occur. This time resulting in the webhook not having an avatar, but otherwise functioning as expected.
[20:13:35] [Thread-455/ERROR]: Uncaught exception in thread "Thread-455"
java.lang.NullPointerException: Cannot invoke "carpet.script.value.Value.reboundedTo(String)" because the return value of "java.util.List.get(int)" is null
        at carpet.script.value.FunctionValue.execute(FunctionValue.java:238) ~[fabric-carpet-1.18-1.4.56+v211130.jar:?]
        at carpet.script.value.FunctionValue.callInContext(FunctionValue.java:157) ~[fabric-carpet-1.18-1.4.56+v211130.jar:?]
        at ScarpetAdditions.ScarpetFunctions.lambda$apply$2(ScarpetFunctions.java:101) ~[scarpet-additions-1.18-1.4.56.jar:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

Subsequent messages went POSTed without issue. This occurred once.

Thank you, i will look into them.

This looks like an issue with the callback function. I will do the same as i will do with Discarpet, removing all callbacks, making the function blocking, for use in a task().

Fixed in https://github.com/replaceitem/scarpet-additions/releases/tag/<IP_ADDRESS>


Female/45-49/Hand Release Pushup option does not show min and max

Issue Resolved
Added in the missing scores to the database


WAN_IP with non-static ip address

Hi, I've started to use this great image and want to let it work 24/7.
I'm wondering about WAN_IP.. my ip address is dynamic and changing every few days~. i'm afraid to be blocked on private trackers for faking my ip.
The WAN_IP variable is currently empty for me, so it resolved automatically. Do the client will change the IP also automatically?
or if the ip got changed and the container is up, the ip that will be reported to the trackers will remain the old one?
what should I do?
Thanks!

Should be fixed with #96


Ensure that semver for the contracts is set

Issue Type
[ x ] bug report
[ ] feature request

Current Behavior
#569 introduced semver for the plasma contracts. A maintainer can set the version post deployment. Currently calling this function and setting the contract version is not covered in the migration scripts nor is it set through the PlasmaFramework constructor.
Expected Behavior
Either require that the version is set during deployment of PlasmaFramework or add a call to set the version in migration scripts.

Oops sorry it is covered here https://github.com/omisego/plasma-contracts/blob/a36f318195d30fc676222adacc2b93da270c8694/plasma_framework/migrations/2_deploy_plasma_framework.js#L25