Develop#4
Open
jorgelop1994 wants to merge 65 commits into
Open
Conversation
jorgelop1994
commented
Oct 26, 2022
…tellar#430) * added GetUniqueAddressResponse * add transaction_id to the callback API * add unique address integration and related classes * add sep31 transactional annotations * fixed test errrors * add transaction_id parameter and changed the configuration property name * added unit tests for Sep31DepositInfoGeneratorApi * added test_updateDepositInfo_api test and moved the test class to avoid reflection call * add Sep31DepositInfoGeneratorApi tests * fixed endpoint typo * Empty-Commit * fixed typo * updated sequence diagram * moved unique_address endpoint configuration to Sep31Config * check distributionWalletMemoType * add distributionWallet validity check * fixed according to PR review
…r#444) ### What Create annotation `ConditionalOnPropertyNotEmpty` and add it to the `UniqueAddressController` and `UniqueAddressService`, so they are only instantiated when the `anchor.settings.distributionWallet` property is not empty. ### Why Close stellar#443
…31 non-happy-paths caused by `PENDING_CUSTOMER_INFO_UPDATE` (stellar#440) ### What Update the code in preparation for handling SEP-31 non-happy-paths caused by `PENDING_CUSTOMER_INFO_UPDATE`. The changes include updates in SEP-31-related classes. The most relevant changes are: * **Update SEP-31 sequence diagram to preview the non-happy-path involving `pending_customer_info_update`** (not covering the implementation yet) * Stop supporting `PENDING_TRANSACTION_INFO_UPDATE` in the TransactionEvent, to be compliant with the documentation. * Add missing SEP-31 status `EXPIRED`. * Fix PlatformAPI non-compliant field names. * Add new check to SEP-12 to make sure the user status is ACCEPTED before proceeding with the SEP-31 tx creation. * Fix Reference server’s `CustomerService` that was ignoring some customer info depending on the customer type. Additionally, included some refactoring: * Updates/fixes in the `Sep31Transaction` interface: * Add fields that were missing in the `Sep31Transaction` interface, but were present in the `JdbcSep31Transaction` class. * Move `Sep31Transaction.Refunds` and `Sep31Transaction.RefundPayments` to their own separate file. * Updates in the `TransactionService`: * Rely on the `Sep31Transaction` interface instead of the `JdbcSep31Transaction` class. * Start supporting almost all fields * Add `TransactionServiceTest` class to test unit testing TransactionService (still only covering the GET request). * Move `Sep31CustomerInfoNeededException` and `Sep31MissingFieldException` out of the Sep31Service class into their own file. * Remove duplicated classes and move them to a shared folder: StellarId, Customers, Refund, RefundPayment. * Add documentation to some methods in Sep31Service. ### Why We'll need to rely on the PlatformAPI for the non-happy path and I had to make a bigger update to make sure it is compliant and ready for the new flow.
…llar#451) * Fix typo in helm chart for kafkaPublisher.eventTypeToQueue
…ellar#453) * Fix the test error in IntelliJ but not in gradle * add more test methods
* Removed payment subproject and moved classes to platform * merge payment packages * fix test errors * fix printing payment test result error * Removed the payment gradle build file and folder
* helm-charts: Add configmap to ingest assets.json from helm values file. * Make assets configmap optional
… to documentation (stellar#446) * add anchor_callback parameter to documentation * fix description * stellar toml parameters * double quote literal handling * double quote literal handling * bump chart version to 0.3.85 * example_values * remove all my tags * example config * fixing long redudant ing and service names * fix chart * try variable assignment * Revert "fixing long redudant ing and service names" This reverts commit af474a4. * fix kafka eventTypeQueue template path * eventTypeToQueue typo * empty * fixed documentation formatting
* add distributionWallet to reference server and make the default distribution wallet consistent with the assets.json * empty jlaguilarm#2 * empty jlaguilarm#2 * bump helm chart Co-authored-by: Reece Markowsky <reece@stellar.org>
* When memo is empty, remove the field in the response * rename getRate to getUniqueAddress * return none when the memoType is empty * remove the problematic sep-38 exchanges * add exchange pairs
…vent correctly (stellar#475) ### What Fix issue where the incoming payment was not populating the event correctly. ### Why The field `Transaction.stellarTransactions[0].createdAt` was empty because it relied on the transaction object update and it was happening later in time due to a mistake in the code. I also added tests to make sure this kind of problem would be catch.
… file. (stellar#477) * Alias non-spring dependencies * use aliases in build gradle files * use alias in plugin scope * upgraded kotlin to 1.6.20 * fixed the kotlin plugin loaded multiple time issue * add the missing alias org.springframework.cloud:spring-cloud-aws-messaging
…DING_CUSTOMER_INFO_UPDATE` (stellar#448) ### What Support SEP-31 non-happy-path where the Transaction is marked as `PENDING_CUSTOMER_INFO_UPDATE`. The changes include: * Update the sequence diagram to better detail the error handling. * Write integration tests for this use case. * Write further unit tests for the PlatformAPI `TransactionService`. * Improve the object schema conversion between database Sep31Transaction and Platform Api objects (also, including the appropriate tests) ### Why We were not testing the case where the SEP-31 transaction failed to be completed by the Receiving Anchor backend and the Sending Anchor had to update the customer information. This flow was not clear in the Platform sequence diagram either. Close stellar#183. ### Known limitations - [ ] stellar#473 - [ ] stellar#484
…lar#464) Add timeout to end to end test/ fix helm prometheus annotations
…ellar#454) * add ObservingAccounts * integrate the dynamic account handler to stellar payment observer * moved data model classes to org.stellar.anchor.platform.model package * Add store to PaymentObservingAccountManager * mock store rather than mock the manager * changed from startAt to lastObserved * add scheduled task to evict and persist to database * fixed the Instant.now() mockK verfify count caused by race condition * fixed the eviction test failure caused by another race condition. * respond to pr review * upsert stellar account to payment observing manager when Sep31DepositInfoGeneratorApi receives a new account from the anchor * remove the PaymentObservingAccountsManager.remove function * rename observe to lookupAndUPdate * increase the eviction max idle time to 1 week * add shutdown() that flushes the account list with the @PreDestroy annotation. * fine tune the eviction period and max idle time * change canExpire to RESIDENTIAL and TRANSIENT
…-runner) (stellar#498) * add kotlin plugin to core and service-runner subproject * Empty commit to trigger CI. Co-authored-by: Marcelo Salloum <marcelo@stellar.org>
…e integration tests can be executed (stellar#505) ### What Fix `build.gradle.kts` from the integration-tests package. ### Why So the integration tests can be executed.
…T_TOKEN when it is sent on the request body ### What The SEP-12's deletion should not require the memo to be in the JWT_TOKEN when it is sent on the request body ### Why Close stellar#509
…lar#507) * Rename tests to descriptive names * fix test errors * Compare the complatedAt field with truncation to SECONDS * delay the MetricEmitterService to avoid the race condition when Hibernate is not fully initialized
…stellar#513) ### What Fix CI not being executed in the develop branch after merging. ### Why After we changed the default branch to `develop`, we hadn't updated the CI to run on the new default branch (after merging PRs).
### What Add a release checklist to be followed before making a new release. With this addition, we will have a new issue option called `Release a new Version!` when creating a [new issue](https://github.com/stellar/java-stellar-anchor-sdk/issues/new/choose). The idea is that we create a ticket for new releases and follow the checklist to make sure the release process is being followed thoroughly. ### Why As part of the new gitflow process outlined in stellar#487.
…eamer will start from the most recent cursor in the Network (stellar#517) ### What - When no cursor can be found in the database, the Stellar streamer will start from the most recent cursor in the Network. - Also, the streaming request was updated to use `?limit=200` for improved efficiency. The default limit is 10, which is 20 times less efficient. ### Why To improve the efficiency of the streamer on average and mostly on the first run. Close stellar#500.
### What Add missing AWS IAM dependency. ### Why The refactor from 3ddb181 missed including the AWS IAM library in the gradle build, which removed the ability to connect with a database using AWS IAM.
…d-to-end (stellar#518) - use docker compose to allow for end to end testing of multiple different anchor platform configurations - docker compose will spin up a full anchor platform stack (postgres, kafka, anchor platform/reference server) with different config files and execute the end_to_end_test.py tests on it. - added testing for default configuration, omnibus allowlist configuration, unique addresses configuration - update documentation for omnibusAccounts configuration (use a comma separated list
### What Update docs to say SEP-24 is not supported ### Why Despite we having some SEP-24 code in the project, it's not released yet and we need to add a ton more tests to state it's ready for implementation.
- remove jpa.generate-ddl from the postgres database configs - update docker-compose integration tests to use the same image (dont need to build both) for anchor platform and reference server
…s and some useful links (stellar#534) ### What Add default issue templates for bug reports, feature requests and some useful links. ### Why To influence the community to share the relevant information we'll need to investigate bugs and evaluate feature requests.
### What Configure CI for the Gitflow release process. Currently, we're only handling Docker releases. Here's how it will work: * [`.github/workflows/basic_tests.yml`](https://github.com/stellar/java-stellar-anchor-sdk/blob/5e1f90378fa87561c645089adb9143afbadd22df/.github/workflows/basic_tests.yml) * **When is it executed?** * On every PR * When code is merged into `develop`, `release/**` or `main`. * **What it does?** * Checks if the code is formatted. * Runs the unit tests. * Runs the embedded integration tests. * Tests the SEP endpoints with the node tool [stellar/stellar-anchor-tests](https://github.com/stellar/stellar-anchor-tests) * [`.github/workflows/release_develop.yml`](https://github.com/stellar/java-stellar-anchor-sdk/blob/5e1f90378fa87561c645089adb9143afbadd22df/.github/workflows/release_develop.yml) * **When is it executed?** * When code is merged into `develop`. * **What it does?** * Run the `basic_tests.yml`. * Deploy an image to [Docker Hub](https://hub.docker.com/r/stellar/anchor-platform) using the `edge` and the commit sha as Docker tags. * [`.github/workflows/release_release.yml`](https://github.com/stellar/java-stellar-anchor-sdk/blob/5e1f90378fa87561c645089adb9143afbadd22df/.github/workflows/release_release.yml) * **When is it executed?** * When code is merged into `release/**`. * **What it does?** * Run the `basic_tests.yml`. * Deploy an image to [Docker Hub](https://hub.docker.com/r/stellar/anchor-platform) using the `<version>-edge` Docker tag, e.g. `1.1.0-edge`. * [`.github/workflows/release.yml`](https://github.com/stellar/java-stellar-anchor-sdk/blob/feature/configure-ci-releases/.github/workflows/release.yml) * **When is it executed?** * When a new release is created and published. * **What it does?** * Run the `basic_tests.yml`. * Deploy an image to [Docker Hub](https://hub.docker.com/r/stellar/anchor-platform) using the `latest` and the release GH tag as Docker tags. ### Why As part of stellar#487
### What Update the triggers from one workflow, since that workflow was being called from other workflows. ### Why Because the jobs from basic_tests.yml were being executed twice in the tests from stellar@5064101.
…sufficient amounts (stellar#529) ### What Update how the platform deals with incoming payments with insufficient amounts. The changes include: * Update the Sep31Transaction schema to hold the list of StellarTransactions. This way, we make sure to keep track of all incoming payments even when they don't fully match the criteria. * Update JdbcSep31Transaction to store the stellar transactions as a json, instead of a join table * Update the Platform API design schema. * Unify similar objects * Delete unused objects ### Why We were not handling the use case where the incoming payment amount is smaller than expected.
### What Add a new CI step that executes end-to-end tests for the project on the branches `develop` and `release/**`, `hotfix/**`, and whenever we launch a new GH release. ### Why So we have a safer workflow, where we make sure that our changes are not breaking any of the use cases we support.
…ce (stellar#546) ### What Update the Stellar Payment observer to be a standalone service. ### Why Close stellar#294
## Release Version 1.1.0 * SDK support for [SEP-1], [SEP-10], [SEP-12], [SEP-31] & [SEP-38]. * API support for [SEP-1], [SEP-10], [SEP-12], [SEP-31] & [SEP-38]. * Database support for H2, SQLite, Postgres & Aurora Postgres. * Queue Publishing support for Kafka and SQS. * Stellar network monitoring for incoming [SEP-31] payments. * End-to-end tests through docker-compose. * Updated documentation. * Deployment examples with k8s, helm-charts, and fargate.
### What Fix the way the Action tries to grab the Release tag name. ### Why the previous way was not working: https://github.com/stellar/java-stellar-anchor-sdk/actions/runs/3063883688
stellar#571) ### What Execute the CI when we merge something into the `main` branch. ### Why To make sure the main branch is being fully tested, at least as much as the develop branch.
Configuration Management Refactoring
* Add sep_server and payment_observer flags to AP helm chart
### What Fix localhost deployment. ### Why It stopped working on PR stellar#516.
### What Add cosmetic badges to the repo readme, to convey more information to the users about the latest version available. ### Why Close stellar#545 Close stellar#316
### What Fix Snyk vulnerabilities by upgrading versions and doing some tweaks to the code. ### Why To make the project safer.
### What Add CodeQL. ### Why It's very beneficial to the project to have this script executed often and ensure the code is protected against common vulnerabilities.
### What Update helm chart version to 0.3.88. ### Why It had not been updated when we made the Stellar Observer into a separate service in https://github.com/stellar/java-stellar-anchor-sdk/pull/546/files#diff-78b9c67cf91b015c1ed14485867e595e1ba056a8e28563c2d037c8fe073a7893. Propagating stellar#596 to `develop`.
Refactored events configuration.
…hild (callee) workflows (stellar#609) ### What When calling another workflow, make sure it will inherit the secrets from its parent. ### Why Jobs like [this](https://github.com/stellar/java-stellar-anchor-sdk/actions/runs/3137863047/jobs/5100787037) were failing because the secrets were not being passed from caller to callee. GH covers this in https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#passing-secrets-to-nested-workflows.
### What - [x] stellar#608 - [x] stellar#602 - [x] stellar#607 - [x] stellar#610 - [x] Add `1.2.0` version to the changelog. - [x] stellar#618 - [x] stellar#612 ### Why To merge Release 1.2.0 into dev.
…r#622) ### What Add an option to make the Stellar observer into a separate deployment service. ### Why Because it's recommended to use it as a separate service. Replicates stellar#613 in the development environment.
* move data secrets to secret manager
* update e2e tests with new config format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.