Commit graph

12663 commits

Author SHA1 Message Date
renovate[bot]
d05c6b996c
chore(deps): update actions/setup-node action to v4.0.4 2024-09-19 18:22:17 +00:00
renovate[bot]
f2f83b0a60
chore(deps): update asf-ui digest to 338bd57 2024-09-19 17:13:20 +00:00
Łukasz Domeradzki
2c0e14fb55
Force github plugins re-update due to compatibility reasons 2024-09-19 16:43:26 +02:00
Łukasz Domeradzki
dca2e6f060
Bump 2024-09-19 14:09:10 +02:00
Łukasz Domeradzki
440e43935a
Misc 2024-09-19 14:08:45 +02:00
Łukasz Domeradzki
1dff9a48a8
Closes #3291
As presented in the issue, we might end up in situation when parallel-processing and accepting two neutral+ trade offers will result in unwanted inventory state, because while they're both neutral+ and therefore OK to accept standalone, the combination of them both causes active badge progress degradation.

Considering the requirements we have, e.g. still processing trades in parallel, being performant, low on resources and with limited Steam servers overhead, the solution that I came up with in regards to this issue is quite simple:

- After we determine the trade to be neutral+, but before we tell the parse trade routine to accept it, we check if shared with other parallel processes set of handled sets contains any sets that we're currently processing.
- If no, we update that set to include everything we're dealing with, and tell the caller to accept this trade.
- If yes, we tell the caller to retry this trade after (other) accepted trades are confirmed and handled as usual.

This solves some issues and creates some optimistic assumptions:
- First of all, it solves the original issue, since if trade A and B both touch set S, then only one of them will be accepted. It's not deterministic which one (the one that gets to the check first), and not important anyway.
- We do not "lock" the sets before we determine that trade is neutral+, because otherwise unrelated users could spam us with non-neutral+ trades in order to lock the bot in infinite retry. This way they can't, as if the trade is determined to not be neutral+ then it never checks for concurrent processing.
- We are optimistic about resources usage. This routine could be made much more complicated to be more synchronous in order to avoid unnecessary calls to inventory and matching, however, that'd slow down the whole process only because the next call MAYBE will be determined as unneeded. Due to that, ASF is optimistic that trades will (usually) be unrelated, and can be processed in parallel, and if the conflict happens then simply we end up in a situation where we did some extra work for no reason, which is better than waiting with the work till all previous trades are processed.
- As soon as the conditions are met, the conflicting trades are retried to check if the conditions allow to accept them. If yes, they'll be accepted almost immediately after previous ones, if not, they'll be rejected as non-neutral+ anymore.

This way the additional code does not hurt the performance, parallel processing or anything else in usually expected optimistic scenarios, while adding some additional overhead in pessimistic ones, which is justified considering we don't want to degrade the badge progress.
2024-09-19 13:53:11 +02:00
renovate[bot]
85e90bb8d5 chore(deps): update asf-ui digest to 122393d 2024-09-19 00:13:45 +00:00
renovate[bot]
b62b2382fd
chore(deps): update crowdin/github-action action to v2.1.3 2024-09-18 13:51:51 +00:00
renovate[bot]
07f64a0107
chore(deps): update asf-ui digest to 7ae118c 2024-09-18 11:33:46 +00:00
ArchiBot
dcdb2cb175
Automatic translations update 2024-09-18 08:49:16 +00:00
Łukasz Domeradzki
33e7ae83dc
Fix wiki push 2024-09-18 10:48:24 +02:00
renovate[bot]
ac0a1da140
chore(deps): update jetbrains/qodana-action action to v2024.2.2 2024-09-17 16:55:13 +00:00
ArchiBot
1ad03ac61c
Automatic translations update 2024-09-17 02:06:16 +00:00
renovate[bot]
b28736cb84
chore(deps): update asf-ui digest to 39127c2 2024-09-16 21:53:31 +00:00
Łukasz Domeradzki
602c01e2d9
Misc localization improvement 2024-09-16 20:51:32 +02:00
Łukasz Domeradzki
7b65c1aeb7
Add support for telling plugins if runtime is trimmed 2024-09-16 17:58:35 +02:00
Łukasz Domeradzki
a27973800c
Provide extra info when failing to initialize plugins with TypeLoadException 2024-09-16 16:45:52 +02:00
Łukasz Domeradzki
cb4580c0d9
Remove github-push-action 2024-09-16 16:18:01 +02:00
renovate[bot]
1a74d83eae
chore(deps): update github/codeql-action action to v3.26.7 2024-09-13 15:16:25 +00:00
Łukasz Domeradzki
319ee49c67
Bump 2024-09-13 14:47:07 +02:00
Łukasz Domeradzki
cefa3e1e1e
Fix reconnection with connection being lost
After changes regarding to callbacks handling, we accidentally broke the reconnection logic. In particular, forced connection implicitly did disconnect with disconnect callback, but disconnect callback killed our callbacks handling loop for future connection since it was instructed to not reconnect... Pretty convulated logic.

Let's attempt to fix and simplify it. There is no forced connection concept anymore, but rather a new reconnect function which either, triggers reconnection through usual disconnection logic, or connects in edge case if we attempted to reconnect with already disconnnected client.

This way the status transition is more predictable, as we Connect() only in 3 cases:
- Initial start, including !start command, when we actually spawn the callbacks handling loop
- Upon disconnection, if we're configured to reconnect
- Reconnection, in case we're already disconnected and can't use above

And we use reconnect when:
- Failure in heartbeats to detect disconnections sooner
- Failure in refreshing access tokens, since if we lose our refresh token then the only way to get a new one is to reconnect

And finally disconnect is triggered when:
- Stopping the bot, especially !stop
- Bulletproofing against trying to connect when !KeepRunning and likewise
- Usual Steam maintenance and other network issues (which usually trigger reconnection)

The codebase is too huge to analyze every possible edge case, but with this logic I can no longer reproduce the previous issue
2024-09-13 14:41:11 +02:00
Łukasz Domeradzki
061e61b740
Closes #3289 2024-09-13 13:42:20 +02:00
Łukasz Domeradzki
73d756f211
Bump 2024-09-13 12:50:21 +02:00
Łukasz Domeradzki
3bb83610b8
Misc refactor after #3287 2024-09-13 10:04:56 +02:00
dm1tz
8e85b87764
Add loot& and transfer& commands (#3287)
* Add `loot&` and `transfer&` commands

* Remove trailing comment
2024-09-13 09:20:35 +02:00
renovate[bot]
4d0f5a56ed
chore(deps): update dependency nlog.web.aspnetcore to 5.3.13 2024-09-12 22:51:20 +00:00
ArchiBot
a8359e3e00
Automatic translations update 2024-09-12 02:17:57 +00:00
renovate[bot]
3812331901
chore(deps): update dependency mstest to 3.6.0 2024-09-11 10:21:01 +00:00
ArchiBot
1714bd26f9
Automatic translations update 2024-09-11 02:18:09 +00:00
renovate[bot]
d8ad42f760
chore(deps): update dependency microsoft.codeanalysis.resxsourcegenerator to 3.11.0-beta1.24415.1 2024-09-10 20:03:11 +00:00
renovate[bot]
c477bd2bae
chore(deps): update wiki digest to c7cb49b 2024-09-10 11:38:24 +00:00
ArchiBot
aa1cd98646
Automatic translations update 2024-09-10 02:18:00 +00:00
ArchiBot
5f545a9bbc
Automatic translations update 2024-09-09 02:18:15 +00:00
ArchiBot
0d3bc2cf47
Automatic translations update 2024-09-07 02:16:32 +00:00
renovate[bot]
8e65142d4c
chore(deps): update asf-ui digest to e6ac58d 2024-09-06 14:15:24 +00:00
renovate[bot]
c26a758825
chore(deps): update crowdin/github-action action to v2.1.2 2024-09-06 07:28:01 +00:00
ArchiBot
a02d8cee86
Automatic translations update 2024-09-06 02:17:32 +00:00
renovate[bot]
2c4d2981cd
chore(deps): update actions/attest-build-provenance action to v1.4.3 2024-09-05 18:44:30 +00:00
ArchiBot
6c5e0a20f1
Automatic translations update 2024-09-05 02:17:28 +00:00
renovate[bot]
db920da4b8
chore(deps): update wiki digest to 70757b8 2024-09-04 22:58:17 +00:00
Łukasz Domeradzki
efdc3eb7bb
Misc 2024-09-04 22:24:31 +02:00
renovate[bot]
c0da86e4ca
chore(deps): update asf-ui digest to 65b5c0c (#3281)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-04 14:46:51 +02:00
ArchiBot
720a24e9ad
Automatic translations update 2024-09-04 02:17:13 +00:00
renovate[bot]
7dc6096e07
chore(deps): update asf-ui digest to 2997f0d 2024-09-03 22:00:17 +00:00
renovate[bot]
7910205674
chore(deps): update asf-ui digest to 8d4b148 2024-09-03 17:03:59 +00:00
Łukasz Domeradzki
1fbc51d02b
Update ArchiSteamFarm.sln.DotSettings 2024-09-03 17:46:17 +02:00
renovate[bot]
a3d968c6af
chore(deps): update asf-ui digest to 486401d (#3279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 08:57:43 +02:00
Łukasz Domeradzki
63c61f8e47
Misc 2024-09-01 23:56:25 +02:00
Łukasz Domeradzki
1ae59f4229
Bump 2024-09-01 14:07:27 +02:00
Łukasz Domeradzki
4a95a6928b
Bump 2024-09-01 14:05:18 +02:00