Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
448 commits
Select commit Hold shift + click to select a range
773d29f
Erlang 21.3.8.7 (#381)
kpy3 Oct 23, 2019
4ef337c
add P2PServiceTerms: allow, quote_lifetime (#382)
0x42 Oct 29, 2019
fc18e51
HG-518: Route change reporting (#373)
kehitt Nov 1, 2019
f161312
Revert "HG-518: Route change reporting" (#386)
ciiol Nov 6, 2019
da953a0
FF-124: P2P upd damsel, LifetimeSelector (#387)
0x42 Nov 7, 2019
95b6dff
Revert "Revert "HG-518: Route change reporting" (#386)" (#388)
kehitt Nov 15, 2019
50471c0
HG-524: add info to invoice payment (#389)
kpy3 Nov 19, 2019
60be383
HG-514: provider conversion routing (#367)
aenglisc Nov 25, 2019
85dcddc
HG-527: recurrent paytool eventsink sequence (#391)
aenglisc Dec 5, 2019
5021fff
Switch to new woody with log formatter (#394)
kpy3 Dec 9, 2019
80ff9e5
BJ-703: Add wechat and alipay to payment tool (#396)
kpy3 Dec 12, 2019
96b6cec
Update woody (#395)
kpy3 Dec 12, 2019
606e742
AAA-54: Remove spaces in messages (#399)
kpy3 Dec 13, 2019
302a04b
Aaa 54 remove spaces (#401)
kpy3 Dec 13, 2019
a62a3ee
Update machinegun (#402)
Yozhig Dec 16, 2019
f1a595f
Force cache save in CI (#403)
kpy3 Dec 20, 2019
0bf030f
AAA-54: Upgrade dmt_client (#404)
kpy3 Dec 20, 2019
1e3a74c
HG-530: handle certain errors as fd finishes (#406)
aenglisc Jan 9, 2020
df97a7a
AAA-54: Improve formatter (#408)
kpy3 Jan 9, 2020
4a3aac0
AAA-54: Fix typo in config param (#409)
kpy3 Jan 9, 2020
1e06fd2
Upgrade woody (#411)
kpy3 Jan 17, 2020
0cc4e66
HG-469: Validate recurrent route (#410)
WWWcool Jan 22, 2020
588bbbb
Revert "HG-469: Validate recurrent route (#410)" (#416)
WWWcool Jan 28, 2020
826ac4a
HG-533: actualize claim management protocol (#415)
Yozhig Jan 28, 2020
2270d57
PROX-386 Add shop to RecurrentTokenInfo in ProviderProxy.GenerateToke…
ciiol Jan 30, 2020
2f49810
Bump to rbkmoney/woody_erlang@ed644d7d (#419)
Feb 6, 2020
70a10fe
Erlang 22 (#420)
kpy3 Feb 10, 2020
8f9d5aa
Fix link to pestgresql image (#422)
kpy3 Feb 14, 2020
29ae7e8
FF-160: Add w2w transfer (#425)
WWWcool Feb 18, 2020
b6e0f30
MSPF-532: get rid of rfc3339 library (#8)
Yozhig Feb 19, 2020
31defb8
Fix typo (#9)
ndiezel0 Feb 20, 2020
39e41df
MSPF-532: get rid of rfc3339 library (#424)
Yozhig Feb 26, 2020
f5a8ccf
HG-452: Move party and claim management to its own app (#407)
ndiezel0 Feb 28, 2020
a7bd902
FF-164 Update damsel (#426)
ciiol Mar 11, 2020
a9a6ec8
HG-525: add payment status adjustment (#414)
Yozhig Mar 12, 2020
4212833
FF-163: Fix - P2P tool condition test (#427)
WWWcool Mar 13, 2020
583174c
HG-495: chargebacks (#346)
aenglisc Mar 27, 2020
76d1f63
HG-535: Assert invoice payable (#428)
kehitt Apr 6, 2020
28fac52
MSPF-532: Upgrade Erlang to 22.3.1 (fix rfc3339 error) (#430)
kpy3 Apr 20, 2020
f660e3b
DC-123: P2P templates (#435)
WWWcool May 8, 2020
cdf7a7b
DC-119: Update damsel (#437)
kpy3 May 9, 2020
e9a52f6
Update build_utils (#10)
kpy3 May 21, 2020
744496c
Update build_utils (#439)
kpy3 May 22, 2020
4755f1c
HG-540: cash flow data in chargebacks (#440)
aenglisc May 25, 2020
91e4401
HG-452: Further remove party management from hellgate (#433)
ndiezel0 May 25, 2020
672965e
HG-452: Add compute provider methods to Party Management (#11)
ndiezel0 May 25, 2020
b5c0e69
FF-183: Upgrade damsel (#441)
kehitt May 29, 2020
bba31f8
HG-452: Fix compute_payment_institution spec (#12)
ndiezel0 May 29, 2020
bddf397
HG-529: add disable failover routing option (#447)
aenglisc Jun 9, 2020
8066d54
HG-452: Fix specs (#13)
ndiezel0 Jun 9, 2020
1e57bd4
MSPF-562: Add bank card category, condition category_is (#448)
0x42 Jun 11, 2020
d1d957e
DC-126: Add tokenization_method field (#449)
Jun 17, 2020
e4ee77b
P2C-8: Add attempt_limit (#452)
kpy3 Jun 22, 2020
90d28c6
DC-120: Implement criteria in predicates (#453)
Jun 23, 2020
200a93f
MSPF-561 Update damsel (#455)
ciiol Jun 30, 2020
8a131b0
HG-542: chargebacks move_to_stage option (#456)
aenglisc Jul 3, 2020
d119f39
MSPF-561 Add new provider terms usage (#454)
ciiol Jul 6, 2020
d015c3d
Switch to pipline (#457)
kpy3 Jul 7, 2020
1ce157b
Switch to Erlang lib pipe (#15)
kpy3 Jul 8, 2020
f37f198
HG-452: Update party_managements methods and tests (#460)
ndiezel0 Jul 10, 2020
e91f750
DC-122: Remove risk_coverage from Terminal (#459)
Jul 14, 2020
922ddf4
DC-122: Remove risk coverage from terminal (#14)
Jul 16, 2020
416647f
HG-452: Update damsel (#16)
ndiezel0 Jul 16, 2020
052db7d
HG-452: Rename methods (#17)
ndiezel0 Jul 16, 2020
7a11f33
HG-541: invoice adjustments (#458)
aenglisc Jul 21, 2020
b85e9d3
Update woody to rbkmoney/woody_erlang@b563bbb (#467)
ciiol Jul 28, 2020
a5d17b2
DC-127: Payment methods refactoring (#445)
Jul 29, 2020
642a9b4
Bump to rbkmoney/woody_erlang@33b69913 (#470)
Aug 4, 2020
118ff48
HG-452: Implement ComputeGlobals and ComputePaymentRoutingRuleset (#466)
ndiezel0 Aug 7, 2020
6b5765c
HG-452: Add ComputeGlobals and ComputePaymentRoutingRuleset (#18)
ndiezel0 Aug 25, 2020
13979ef
HG-545: register status change timestamps (#473)
aenglisc Sep 4, 2020
470a39a
HG-452: Add pm methods usage (#443)
ndiezel0 Sep 7, 2020
02b3946
Update woody and fix backward clock error (#478)
ndiezel0 Sep 10, 2020
76b7595
HG-452: Fix pm_ruleset (#477)
ndiezel0 Sep 11, 2020
dcfbbae
Add missing claim (#476)
kpy3 Sep 14, 2020
8d55ad9
Fully embrace new woody args-are-tuples convention (#480)
Sep 17, 2020
6588cef
Revert HG-452 (#481)
kpy3 Sep 18, 2020
52967bd
Update woody (#482)
kpy3 Sep 18, 2020
8093d04
Try erlfmt (#479)
ciiol Sep 25, 2020
351b790
HG-452: Fixed party_management (#483)
ndiezel0 Sep 28, 2020
5eed85e
HG-547: Validate cash register claims (#484)
Oct 13, 2020
d584af2
Add formatter (#20)
ciiol Oct 13, 2020
e9893dc
HG-452: Add caching for Checkout Party (#487)
ndiezel0 Oct 16, 2020
9849c12
HG-557: Add logging of cache hit/miss (#489)
ndiezel0 Oct 19, 2020
5af3bae
HG-452: Add PartyManagement usage to hellgate (#485)
ndiezel0 Oct 20, 2020
57ca9a8
Add prometeus (#494)
kpy3 Oct 24, 2020
d05c5f7
HG-555: Refactor compute shop terms (#21)
Oct 27, 2020
8469a29
HG-555: Handle Varset in ComputeShopTerms (#496)
Oct 30, 2020
0ba6ce3
HG-555: update ComputeShopTerms clients (#497)
Oct 30, 2020
7865489
Update service erlang image (#501)
kpy3 Nov 3, 2020
147e1e1
Rollback to an old image (#502)
Nov 5, 2020
1b113aa
Revert "HG-555: update ComputeShopTerms clients (#497)" (#503)
Nov 5, 2020
adfe44a
Revert "Revert "HG-555: update ComputeShopTerms clients (#497)" (#503…
Nov 9, 2020
41e8659
Add dummy payment system (#506)
ciiol Nov 11, 2020
3ba836f
HG-560: routing with pm (#495)
aenglisc Nov 12, 2020
044076c
Add risk coverage to provider (#505)
kpy3 Nov 12, 2020
241c870
HG-555: Refactor PM ComputeShopTerms (#498)
Nov 15, 2020
aabb57a
hitch up all routing rules damsel changes (#507)
georgemadskillz Nov 16, 2020
f5a0978
Update image (#511)
kpy3 Nov 27, 2020
c7fb216
Cleanup release env
kpy3 Dec 2, 2020
7752578
Revert "Cleanup release env"
kpy3 Dec 2, 2020
2b52307
Cleanup release env (#518)
kpy3 Dec 2, 2020
a64217d
Avoid warnings spam w/ incompatible cash ranges (#516)
Dec 4, 2020
3816242
CAPI-430: Add last_transaction_info to payproc_InvoicePayment (#522)
kehitt Dec 9, 2020
6caab94
update build env (#525)
dinama Dec 9, 2020
9cc3ff7
Fix leaked containers on CI (#529)
kpy3 Dec 17, 2020
108f39c
+upgrade all +fix after upgrade (#531)
dinama Dec 24, 2020
b79f6ea
pass make_recurrent to inspector (#532)
dinama Dec 24, 2020
255c54a
Let's make it opensource (#24)
kpy3 Jan 29, 2021
f6fef99
upgrade: +image +deps +endpoints (#535)
dinama Jan 31, 2021
8847162
+fix health_check demo config (#537)
dinama Feb 1, 2021
5b6b8e2
Add uzcard as payment system (#538)
kpy3 Feb 2, 2021
d23e227
FF-238: table routing (#23)
georgemadskillz Feb 8, 2021
113ed40
fix input typing mistake in compute_routing_ruleset function (#25)
georgemadskillz Feb 8, 2021
70ad2ab
Hg-568: added a new field "trusted_client" for an antifraud system (#…
yuri-bukhalenkov Feb 9, 2021
8f24ec5
ED-43: Добавить поддержку RBS (#546)
yuri-bukhalenkov Mar 2, 2021
9884edc
MSPF-628: Add proto limiter integration (#534)
0x42 Mar 2, 2021
e6c9cd9
Allow to build service without the private registry (#548)
ciiol Mar 5, 2021
79a1cfc
ED-75: Update image (#550)
kpy3 Mar 11, 2021
19f1b56
Update damsel to rbkmoney/damsel@ca2b3ad (#551)
ciiol Mar 16, 2021
10d5ad7
merge PaymentsProvisionTerms.turnover_limits (#553)
0x42 Mar 19, 2021
8dcc98a
ED-86: +hg_customer dynamic poll timeout (#552)
dinama Mar 22, 2021
cf737ec
ED-102: Update damsel (#558)
kpy3 Apr 6, 2021
f84329d
ED 81/pass rec payment tool id (#554)
jrogov Apr 26, 2021
9f2e3a3
ED-135: removed global_ref param from pm_party_client:compute_globals…
yuri-bukhalenkov Apr 28, 2021
7bf4b7d
* updated damselupdated hellgate docker image ref; removed extra para…
yuri-bukhalenkov Apr 28, 2021
277a436
ED-101: party management terms calculation (#561)
georgemadskillz Apr 28, 2021
5732394
HG-452: Add ComputeGlobals and ComputePaymentRoutingRuleset (#474)
ndiezel0 Apr 29, 2021
c41cdc6
ED-142: Store and pass PayerSessionInfo where needed (#563)
Apr 30, 2021
83b8d27
Bump to rbkmoney/damsel@47e8101 (#27)
0x42 May 13, 2021
db67813
ED-145: Handle exception ProvisionTermSetUndefined (#565)
0x42 May 13, 2021
d632223
Fix del legacy routing detection (#559)
0x42 May 17, 2021
9d0e765
moved party_management to a separated microservice
yuri-bukhalenkov May 24, 2021
ea4db6c
removed unused pm_client_api parameter (root_url)
yuri-bukhalenkov May 24, 2021
3a47946
removed unused functions in pm_ct_helper
yuri-bukhalenkov May 24, 2021
89139a5
renamed service
yuri-bukhalenkov May 24, 2021
52f3bbe
changed workdir according a wetkitty:service-erlang.sls.tpl (#1)
yuri-bukhalenkov Jun 18, 2021
eb22d73
updated damsel (#2)
yuri-bukhalenkov Jun 21, 2021
a6471d4
ED-184: retries&deadline (#28)
dinama Jun 27, 2021
45184ec
Ed 97/feat/sync from hg (#3)
yuri-bukhalenkov Jun 28, 2021
f1bf192
ED-190/deps: update dmt_client (#29)
jrogov Jul 28, 2021
935c912
Fix msgpack unmarshalling over `nil`s (#6)
Aug 4, 2021
519f2c6
ED-241: switch party_client from hellgate to party-management (#30)
georgemadskillz Aug 18, 2021
1496493
feat: Add dictionaries and BinData support (#7)
jrogov Aug 19, 2021
f161a81
ED-207/fix: Fix reduction of payment_system for payment_institution (#9)
jrogov Aug 20, 2021
9a8cd55
updated damsel (#10)
yuri-bukhalenkov Aug 20, 2021
1431cc3
ED-190/deps: Update dmt_client (#4)
jrogov Aug 25, 2021
20904d8
refactor: Rewrite pm_party reduce and merge in a generic fashion (#8)
jrogov Sep 7, 2021
988193d
ED-265/crypto-currency condition (#11)
yuri-bukhalenkov Sep 13, 2021
f551977
ED-242: Upgrade Erlang 24 (#13)
Sep 14, 2021
4021e74
ED-268/deps: Update mg_proto to use ProcessRepair (#15)
jrogov Sep 29, 2021
e380095
ED-276: Remove claim API (#31)
Sep 29, 2021
a2dddbb
ED-281: +support new InvalidChangeset (#18)
dinama Sep 29, 2021
9dea357
ED-272: +aggregate shop data (#17)
dinama Sep 30, 2021
59f094a
ED-272: +aggregate shop data (#32)
dinama Sep 30, 2021
793f655
Add missing prometeus (#20)
Oct 6, 2021
8afd535
Revert "ED-276: Remove claim API (#31)" (#33)
Oct 7, 2021
4d4e678
ED-126: +extend ShopContract (#21)
dinama Oct 12, 2021
0a85c58
ED-253: Remove P2P (#23)
Oct 19, 2021
0930df3
ED-253: Fix P2P disaster (#24)
Oct 20, 2021
63c7b92
+disable latest_version caching in sys.config (#25)
dinama Oct 22, 2021
4eda2ba
deps: Update pm and remove redundant sleep (#34)
jrogov Oct 22, 2021
f4afbcc
Split integration (#16)
ndiezel0 Oct 24, 2021
ac0feed
ED-283/reduce-compute-varset (#26)
yuri-bukhalenkov Nov 9, 2021
8933f61
updated protocol (#35)
yuri-bukhalenkov Nov 11, 2021
8fc5595
update damsel (#36)
yuri-bukhalenkov Nov 19, 2021
f59c4b4
ED-293/ComputeContractTerms for firstful-server (#27)
yuri-bukhalenkov Nov 19, 2021
c756e13
ED-293/update damsel (#28)
yuri-bukhalenkov Nov 23, 2021
da89dc6
ED-293/fixed: added support for legacy Claim structure (#29)
yuri-bukhalenkov Nov 24, 2021
fd3494f
Build and push images w/ GH action (#1)
keynslug Dec 8, 2021
3b9cd7b
Add support for damsel @ b4447c90
keynslug Dec 8, 2021
522ddf2
Stop evaluating dropped payinst field
keynslug Dec 8, 2021
0eea13f
Set up basic env vars to tell BEAM that stdio is UTF-8-ready
keynslug Dec 9, 2021
5a55e26
Fix io encoing (#2)
ndiezel0 Dec 25, 2021
bfa398a
ED-293/fixed: legacy structures (#30)
yuri-bukhalenkov Nov 29, 2021
c6c42b8
ED-274: Switch to new claim management errors (#22)
Nov 29, 2021
30c91b7
ED-274: Fix broken backward compatibility (#31)
Nov 30, 2021
d1cd895
Merge pull request #3 from empayre/BACKLOG-20/fix/proto-mismatch
keynslug Dec 30, 2021
a405fce
TD-128: Add CI, Makefile, Dockerfile and docker-compose.yaml (#2)
ndiezel0 Feb 7, 2022
d86fcbf
APM-55: Add GenericPaymentSystem support (#4)
ndiezel0 Feb 8, 2022
ca90f06
Expose SERVICE_NAME as env so CMD expands properly (#6)
keynslug Feb 10, 2022
36f4567
APM-43: Support withdrawal methods selector (#3)
WWWcool Feb 10, 2022
e456e24
TD-129: Add multiplatform support (#5)
ndiezel0 Feb 11, 2022
afc568c
Update file(s) from valitydev/.github
github-actions[bot] Feb 22, 2022
b8bc546
Update file(s) from valitydev/.github
github-actions[bot] Feb 22, 2022
0d6ab94
OPS-53: Implement `ComputeProviderTerminal` (#8)
keynslug Mar 4, 2022
76058e0
TD-226: Remove UserInfo-based auth (#13)
kehitt Apr 5, 2022
602d4dc
Add Github Actions (#1)
kehitt Apr 6, 2022
31850a6
TD-261: Remove user info requirement (#2)
kehitt Apr 7, 2022
f757b79
TD-262: Move from shumpune to accounter (#15)
ndiezel0 Apr 7, 2022
3353490
TD-260: Update damsel and remove migration code (#16)
kehitt Apr 21, 2022
4097004
TD-259: Update damsel & remove userinfo placeholder (#4)
kehitt Apr 21, 2022
bb4549c
TD-198: Remove deprecated methods (#17)
WWWcool May 12, 2022
38c7782
TD-312: Bump to valitydev/damsel@dac2cb5 (#8)
keynslug Jun 20, 2022
4ea2b15
TD-330: Bump damsel (#20)
WWWcool Jul 1, 2022
ac54f12
TD-222: Reuse valitydev/action-deploy-docker@v2 (#21)
keynslug Jul 12, 2022
bbbeae5
TD-330: Fix - Add merge and calc of turnover limit to withdrawal term…
WWWcool Jul 13, 2022
1c7f97d
TD-416: Ensure partially reduced predicate is valid predicate (#23)
keynslug Oct 3, 2022
af7046e
TD-435: Add allow support (#24)
WWWcool Nov 11, 2022
1e9f4fd
TD-435 -Fix: add allow to merge provider and terminal terms (#25)
WWWcool Nov 22, 2022
bc8368d
Fix: Reduce combination (any_of, all_of) was not an ordset (#26)
WWWcool Nov 29, 2022
57d4d64
VEN-11: Updates damsel and mg_proto ref (#27)
nanodirijabl Mar 9, 2023
4a94036
CM-23: Bumps damsel (#28)
nanodirijabl Mar 22, 2023
486616e
TD-574: Add new condition (#29)
ndiezel0 May 9, 2023
1c71d17
TD-574: Fix condition (#30)
ndiezel0 May 19, 2023
6a6118c
TD-600: bump damsel (#31)
ttt161 May 24, 2023
9150bc3
TD-621: add logging for rejected routes (#32)
ttt161 Jun 6, 2023
410d34d
added log (#33)
WWWcool Jun 6, 2023
9b42301
add currency assertion log (#34)
ttt161 Jun 6, 2023
14c307f
SEC-331: cut secrets from logs (#35)
ttt161 Jun 9, 2023
defe3f2
OPS-268: Setups user in `Dockerfile` (#36)
nanodirijabl Jul 5, 2023
18bba50
OPS-268: Adds default logger permissions (#37)
nanodirijabl Jul 13, 2023
21752a9
TD-717: Add global_allow field (#39)
ndiezel0 Sep 19, 2023
28c1b38
TD-686: Adopts opentelemetry API (#40)
nanodirijabl Oct 24, 2023
eeecf69
TD-817: Update damsel (#41)
ndiezel0 Nov 20, 2023
008486a
TD-846: Bumps valitydev/damsel@decfa45 (#42)
nanodirijabl Feb 1, 2024
7c202dc
OPS-442: Add new field to Shop (#43)
ndiezel0 Apr 2, 2024
6d0040d
TD-895: Adds support for turnover-limit-decisions reduction in paymen…
nanodirijabl Apr 9, 2024
a82682b
OPS-474: Updates w/ damsel changes (#9)
nanodirijabl Jun 18, 2024
9af7d71
FIN-39: additional info support (#46)
ttt161 Jul 1, 2024
e16301b
IMP-278: Retires payouts (#48)
nanodirijabl Aug 28, 2024
c59cb7c
IMP-278: Reverts damsel w/ legacy payouts support (#49)
nanodirijabl Sep 12, 2024
b78d0f5
TD-964: Bumps valitydev/damsel@7762f6c (#50)
nanodirijabl Sep 18, 2024
c446c4d
Bump damsel risk score (#51)
WWWcool Nov 12, 2024
7b3d125
EMP-168: Add generic condition (#52)
WWWcool Dec 10, 2024
7cbd66c
TECH-76: Upgrades to Erlang/OTP 27 (#55)
nanodirijabl Feb 21, 2025
d47eecc
TECH-121: Add machinery (#56) (#57)
WWWcool May 13, 2025
4531ef3
TECH-22: bump machinery (#61)
ttt161 May 21, 2025
435e3f2
Party here ! (#59)
WWWcool May 29, 2025
6b6d4a5
Upgrades to dominant v2 #minor (#62)
nanodirijabl Jun 5, 2025
b10b102
Upgrades to dmt v2 #major (#10)
nanodirijabl Jun 5, 2025
85db97e
Loads `canal` for prod release (#63)
nanodirijabl Jun 19, 2025
f0d1848
Bumps machinery (#64)
nanodirijabl Jun 19, 2025
a75eb48
Refactors service for new protocol and removes parties (#65)
nanodirijabl Jul 31, 2025
74da178
Bumps damsel to support single term set in hierarchy object (#66)
nanodirijabl Jul 31, 2025
7649525
Adds support for not-found exception for compute-terms function (#67)
nanodirijabl Aug 1, 2025
88cb5a9
Upgrades to match new party-management API (#11)
nanodirijabl Aug 1, 2025
bef5890
Throws notfound-exception for non-existant domain revisions and unkno…
nanodirijabl Aug 12, 2025
51e92f7
Adopts `GetRelatedGraph` of dmt_client and upgrades dmt protocol (#69)
nanodirijabl Aug 25, 2025
8448535
Bumps dmt protocol 2.2.12 (#12)
nanodirijabl Sep 8, 2025
53d780a
Bumps damsel v2.2.17 (#70)
nanodirijabl Oct 13, 2025
2296944
Epic - BG-488: added provider ext terms (#71)
WWWcool Dec 12, 2025
538cec2
BG-701: Implements alt methods for shop/wallet accounts (#72)
nanodirijabl Feb 4, 2026
630601b
TECH-335: Reverts `party_id` as binary in `partymgmt` log metadata (#74)
nanodirijabl May 12, 2026
8a58cd5
add trust_level condition (#75)
ttt161 May 18, 2026
e3fe0dc
add allow_exchange flag (#76)
ttt161 Jun 29, 2026
fed6c5f
Merge remote-tracking branch 'pm-upstream/master' into ft/party-manag…
nanodirijabl Aug 10, 2026
af6cdb3
Fixes linting related issues
nanodirijabl Aug 10, 2026
68d8d11
Merge remote-tracking branch 'pm-cli-upstream/master' into ft/party-m…
nanodirijabl Aug 10, 2026
687e896
Fixes party client's linting
nanodirijabl Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SERVICE_NAME=hellgate
OTP_VERSION=28.5.0
REBAR_VERSION=3.26
THRIFT_VERSION=0.14.2.3
41 changes: 41 additions & 0 deletions .github/workflows/erlang-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Erlang CI Checks

on:
push:
branches:
- "master"
- "epic/**"
pull_request:
branches: ["**"]

jobs:
setup:
name: Load .env
runs-on: ubuntu-latest
outputs:
otp-version: ${{ steps.otp-version.outputs.version }}
rebar-version: ${{ steps.rebar-version.outputs.version }}
thrift-version: ${{ steps.thrift-version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: grep -v '^#' .env >> $GITHUB_ENV
- id: otp-version
run: echo "::set-output name=version::$OTP_VERSION"
- id: rebar-version
run: echo "::set-output name=version::$REBAR_VERSION"
- id: thrift-version
run: echo "::set-output name=version::$THRIFT_VERSION"

run:
Comment on lines +13 to +30
name: Run checks
needs: setup
uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1
with:
otp-version: ${{ needs.setup.outputs.otp-version }}
rebar-version: ${{ needs.setup.outputs.rebar-version }}
use-thrift: true
thrift-version: ${{ needs.setup.outputs.thrift-version }}
run-ct-with-compose: true
cache-version: v4
upload-coverage: false
Comment on lines +31 to +41
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ wdeps-%: dev-image
# Database tasks

ifeq (db,$(firstword $(MAKECMDGOALS)))
DATABASE_NAME := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(DATABASE_NAME):;@:)
DATABASE_NAME := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(DATABASE_NAME):;@:)
endif

db:
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,25 @@ $ make wdeps-test
## Служебные лимиты

Нужно уметь _ограничивать_ максимальное _ожидаемое_ количество тех или иных объектов, превышение которого может негативно влиять на качество обслуживания системы. Например, мы можем считать количество _выводов_ одним участником неограниченным, однако при этом неограниченное количество созданных _личностей_ мы совершенно не ожидаем. В этом случае возможно будет разумно ограничить их количество сверху труднодостижимой для подавляющего большинства планкой, например, в 1000 объектов. В идеале подобное должно быть точечно конфигурируемым.

# Party Management

Managing parties involved in payment processing.

## Building

We widelly use Thrift to define RPC protocols.
So it needs to have [our Thrift compiler](https://github.com/rbkmoney/thrift) in PATH to build this service.
The recommended way to achieve this is by using our [build image](https://github.com/rbkmoney/image-build-erlang).

# Party management client

Клиент для сервиса PartyManagement. Спецификацию сервиса можно найти в rbkmoney/damsel в proto/payment_processing.thrift.

## API

Низкоуровневый thrift интерфес предоставляется модулем `party_client_thrift`. Его функции принимают и возвращают thrift объекты.

Более erlang-like интерфес будет предоставляться модулем `party_client`. Его функции должны принимать и возвращать не thrift объекты, а обычные map, абстрагируя пользователей библиотеки от транспортного протокола. На данный момент этот интерфейс не реализован.

Большая часть функций библиотеки ожидает в аргументах получить клиент и текущий контекст. Клиент представляет собой объект, с параметрами для запуска служебных процессов и обращения к ним, ожидается что он будет создан единожды. Контекст описывает текущее окружение, хранит информацию о пользователе, woody context и т.д.
13 changes: 0 additions & 13 deletions apps/op_context/rebar.config

This file was deleted.

18 changes: 18 additions & 0 deletions apps/party_client/src/party_client.app.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{application, party_client, [
{description, "PartyManagement client"},
{vsn, "1.0.0"},
{registered, []},
{applications, [
kernel,
stdlib,
genlib,
damsel,
prometheus,
woody
]},
{env, [
{services, #{
party_management => "http://party-management:8022/v1/processing/partymgmt"
}}
]}
]}.
47 changes: 47 additions & 0 deletions apps/party_client/src/party_client.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-module(party_client).

-export([create_client/0]).
-export([create_client/1]).
-export([create_context/0]).
-export([create_context/1]).
-export([child_spec/2]).
-export([start_link/1]).

%% Client types

-type context() :: party_client_thrift:context().
-type context_options() :: party_client_context:options().

-type client() :: party_client_thrift:client().
-type client_options() :: party_client_config:options().

-export_type([client/0]).
-export_type([client_options/0]).
-export_type([context/0]).
-export_type([context_options/0]).

%% Client API

-spec create_client() -> client().
create_client() ->
create_client(#{}).

-spec create_client(client_options()) -> client().
create_client(Options) ->
party_client_config:create(Options).

-spec create_context() -> context().
create_context() ->
create_context(#{}).

-spec create_context(context_options()) -> context().
create_context(Options) ->
party_client_context:create(Options).

-spec child_spec(atom(), client()) -> supervisor:child_spec().
child_spec(ChildID, Client) ->
party_client_woody:child_spec(ChildID, Client).

-spec start_link(client()) -> genlib_gen:start_ret().
start_link(Client) ->
party_client_woody:start_link(Client).
133 changes: 133 additions & 0 deletions apps/party_client/src/party_client_config.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
-module(party_client_config).

-export([create/1]).
-export([get_party_service/1]).
-export([get_cache_mode/1]).
-export([get_aggressive_caching_timeout/1]).
-export([get_woody_options/1]).
-export([get_deadline_timeout/1]).
-export([get_retries/1]).

-opaque client() :: options().

-type options() :: #{
party_service => woody_service(),
aggressive_caching_timeout => timeout(),
woody_options => map(),
deadline_timeout => timeout(),
retries => retries()
}.

-type cache_mode() :: disabled | safe | aggressive.
-type retries() :: #{'_' | woody:func() => genlib_retry:strategy()}.

-export_type([client/0]).
-export_type([options/0]).
-export_type([cache_mode/0]).
-export_type([retries/0]).

-define(APPLICATION, party_client).
-define(DEFAULT_CACHE_NAME, party_client_default_cache).
-define(DEFAULT_WORKERS_NAME, party_client_default_workers).
-define(DEFAULT_AGGERSSIVE_CACHING_TIMEOUT, 30000).
-define(DEFAULT_CACHE_MODE, safe).
-define(DEFAULT_DEADLINE_TIMEOUT, infinity).

%% Internal types

-type config_path() :: atom() | [atom() | [any()]].
-type woody_service() :: woody:service().
-type woody_options() :: woody_caching_client:options().

%% API

-spec create(options()) -> client().
create(Options) ->
Options.

-spec get_party_service(client()) -> woody:service().
get_party_service(#{party_service := Service}) ->
Service;
get_party_service(_Client) ->
get_default([woody, party_service], {dmsl_payproc_thrift, 'PartyManagement'}).

-spec get_cache_mode(client()) -> cache_mode().
get_cache_mode(#{cache_mode := CacheMode}) ->
CacheMode;
get_cache_mode(_Client) ->
get_default([woody, cache_mode], ?DEFAULT_CACHE_MODE).

-spec get_aggressive_caching_timeout(client()) -> timeout().
get_aggressive_caching_timeout(#{aggressive_caching_timeout := Timeout}) ->
Timeout;
get_aggressive_caching_timeout(_Client) ->
get_default([woody, aggressive_caching_time], ?DEFAULT_AGGERSSIVE_CACHING_TIMEOUT).

-spec get_woody_options(client()) -> woody_options().
get_woody_options(Client) ->
DefaultOptions = #{
cache => #{local_name => ?DEFAULT_CACHE_NAME},
workers_name => ?DEFAULT_WORKERS_NAME,
woody_client => #{
url => get_default([services, party_management]),
event_handler => woody_event_handler_default,
transport_opts => #{}
}
},
EnvOptions = merge_nested_maps(DefaultOptions, get_default([woody, options], #{})),
merge_nested_maps(EnvOptions, maps:get(woody_options, Client, #{})).

-spec get_deadline_timeout(client()) -> timeout().
get_deadline_timeout(#{deadline_timeout := Timeout}) ->
Timeout;
get_deadline_timeout(_Client) ->
get_default([woody, deadline_timeout], ?DEFAULT_DEADLINE_TIMEOUT).

-spec get_retries(client()) -> retries().
get_retries(#{retries := Retries}) ->
Retries;
get_retries(_Client) ->
get_default([woody, retries], #{}).

%% Internal functions

-spec get_default(config_path()) -> any().
get_default(Path) ->
Ref = erlang:make_ref(),
case get_default(Path, Ref) of
Ref ->
erlang:error({badpath, Path});
Other ->
Other
end.

-spec get_default(config_path(), any()) -> any().
get_default(Key, Default) when is_atom(Key) ->
genlib_app:env(?APPLICATION, Key, Default);
get_default([Key | Rest] = Path, Default) when is_list(Path) ->
ConfigItem = get_default(Key, #{}),
get_nested_map(Rest, ConfigItem, Default).

-spec get_nested_map(Path :: [any()], map(), any()) -> any().
get_nested_map([Key], Map, Default) ->
maps:get(Key, Map, Default);
get_nested_map([Key | Path], Map, Default) ->
NextMap = maps:get(Key, Map, Default),
get_nested_map(Path, NextMap, Default).

merge_nested_maps(Map1, Map2) when map_size(Map2) =:= 0 ->
Map1;
merge_nested_maps(Map1, Map2) ->
maps:fold(fun merge_map_item/3, Map1, Map2).

merge_map_item(K, V, Acc) when is_map(V) ->
NewV =
case maps:is_key(K, Acc) of
true ->
merge_nested_maps(maps:get(K, Acc), V);
false ->
V
end,
Acc#{K => NewV};
merge_map_item(K, V, Acc) ->
Acc#{K => V}.
37 changes: 37 additions & 0 deletions apps/party_client/src/party_client_context.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-module(party_client_context).

-export([create/1]).
-export([get_woody_context/1]).

-opaque context() :: #{
woody_context := woody_context()
}.

-type options() :: #{
woody_context => woody_context()
}.

-export_type([context/0]).
-export_type([options/0]).

%% Internal types

-type woody_context() :: woody_context:ctx().

%% API

-spec create(options()) -> context().
create(Options) ->
ensure_woody_context_exists(Options).

-spec get_woody_context(context()) -> woody_context().
get_woody_context(#{woody_context := WoodyContext}) ->
WoodyContext.

%% Internal functions

-spec ensure_woody_context_exists(options()) -> options().
ensure_woody_context_exists(#{woody_context := _WoodyContext} = Options) ->
Options;
ensure_woody_context_exists(Options) ->
Options#{woody_context => woody_context:new()}.
Loading
Loading