Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Implement PSQL based object storage for Conductor #2683

Merged
merged 7 commits into from
Jan 19, 2022
Merged

Implement PSQL based object storage for Conductor #2683

merged 7 commits into from
Jan 19, 2022

Conversation

Vasyl-9
Copy link
Contributor

@Vasyl-9 Vasyl-9 commented Jan 5, 2022

  • Add PostgreSQL implementation for External Payload Storage and tests for it.
  • Add second Flyway database initialize for PostgreSQL External Payload Storage.

Signed-off-by: Vasyl Klevlanyk vklevlanyk@frinx.io

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • Other (please describe):

Changes in this PR

Adds PostgreSQL implementation for External Payload Storage. Now, makes it available to use PostgreSQL like primary database and external database.

Alternatives considered

This implementation adds the ability to use PostgreSQL as external payload storage. But we can also use Amazon S3 and Azure Blob Storage to implement this storage.

Usage

Property Description default value
conductor.external-payload-storage.postgres.conductor-url URL, that can be used to pull the json configurations, that will be downloaded from PostgreSQL to the conductor server. For example: for local development it is http://localhost:8080 ""
conductor.external-payload-storage.postgres.url PostgreSQL database connection URL. Required to connect to database.
conductor.external-payload-storage.postgres.username Username for connecting to PostgreSQL database. Required to connect to database.
conductor.external-payload-storage.postgres.password Password for connecting to PostgreSQL database. Required to connect to database.
conductor.external-payload-storage.postgres.table-name The PostgreSQL schema and table name where the payloads will be stored external.external_payload
conductor.external-payload-storage.postgres.max-data-rows Maximum count of data rows in PostgreSQL database. After overcoming this limit, the oldest data will be deleted. Long.MAX_VALUE (9223372036854775807L)
conductor.external-payload-storage.postgres.max-data-days Maximum count of days of data age in PostgreSQL database. After overcoming limit, the oldest data will be deleted. 0
conductor.external-payload-storage.postgres.max-data-months Maximum count of months of data age in PostgreSQL database. After overcoming limit, the oldest data will be deleted. 0
conductor.external-payload-storage.postgres.max-data-years Maximum count of years of data age in PostgreSQL database. After overcoming limit, the oldest data will be deleted. 1

@Vasyl-9
Copy link
Contributor Author

Vasyl-9 commented Jan 5, 2022

@aravindanr Hi, I have rewritten a PR about PostgreSQL external storage. Can we get a review on this?

- Add PostgreSQl implementation for External Payload Storage and tests for its.

Signed-off-by: Vasyl Klevlanyk <vklevlanyk@frinx.io>
docs/docs/externalpayloadstorage.md Show resolved Hide resolved
public FlywayConfigurationCustomizer flywayConfigurationCustomizer() {
// override the default location.
return configuration -> configuration.locations("classpath:db/migration_postgres");
DataSource dataSource;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide more details about this change and why its needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this change because we cannot use the default flyway bean if we choose postgres as the external storage implementation. Before our addition, the flyway bean was created as a single instance and this class only had the path to the SQL commands to create the database. But if we use postgres external storage then we need to create 2 flyway beans and if we leave this class unchanged then Spring will return an error that the default bean cannot be created because a bean with the type Flyway already exists in the Application Context. Therefore, for correct co-existence and work of 2 different Flyway migrations, I had to manually create a bean also for this database.

@apanicker-nflx
Copy link
Collaborator

@Vasyl-9 Please resolve conflicts and run gradlew spotlessApply to fix formatting.

jxu-nflx and others added 6 commits January 16, 2022 19:18
- Fix #2679 restart dropdown blocked
- Refactor Execution/side panel state management
- Remove media-query driven indent
- Remove examples not applicable to OSS
- Add Reason for Incompletion to Summary
- Add External payload storage path to Task summary
- Relabel free text search fields
- Add PostgreSQl implementation for External Payload Storage and tests for its.

Signed-off-by: Vasyl Klevlanyk <vklevlanyk@frinx.io>
@apanicker-nflx apanicker-nflx changed the title [FEATURE] Implement PSQL based object storage for Conductor Implement PSQL based object storage for Conductor Jan 19, 2022
@apanicker-nflx apanicker-nflx merged commit 9c932ad into Netflix:main Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants