Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
123 changes: 0 additions & 123 deletions docs/db-migration.md

This file was deleted.

11 changes: 4 additions & 7 deletions docs/migrations/1-21-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ Wave 1.21.0 was released on May 29, 2025.

## Mandatory steps

Wave 1.21.0 introduces support for PostgreSQL as the primary database backend, replacing SurrealDB.
Wave 1.21.0 introduces support for PostgreSQL as the primary database backend, replacing SurrealDB. SurrealDB support has been fully removed as of Wave 1.32.5.

To upgrade your existing data from SurrealDB to PostgreSQL:
Add the following properties to your Wave configuration file:

1. Follow the steps in the [Wave database migration](../db-migration.md) guide.
2. Add the following properties to your Wave configuration file:

- `wave.build.logs.path`: Sets the full path where build logs will be stored (e.g., `s3://my-bucket/wave/logs` or a local path).
- `wave.build.locks.path`: Sets the full path where Conda lock files will be stored (e.g., `s3://my-bucket/wave/locks` or a local path).
- `wave.build.logs.path`: Sets the full path where build logs will be stored (e.g., `s3://my-bucket/wave/logs` or a local path).
- `wave.build.locks.path`: Sets the full path where Conda lock files will be stored (e.g., `s3://my-bucket/wave/locks` or a local path).
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ interface PersistenceService {
* Retrieve all {@link WaveBuildRecord} object for the given container id
*
* @param containerId The container id for which all the builds record should be retrieved
* @return The corresponding {@link WaveBuildRecord} object or {@code null} if no record is found
* @return The corresponding list of {@link WaveBuildRecord} objects or an empty list if no record is found
*/
List<WaveBuildRecord> allBuilds(String containerId)

/**
* Store a {@link WaveContainerRecord} object in the Surreal wave_request table.
* Store a {@link WaveContainerRecord} object in the persistence layer.
*
* @param data A {@link WaveContainerRecord} object representing a Wave request record
*/
Expand All @@ -101,7 +101,7 @@ interface PersistenceService {
WaveContainerRecord loadContainerRequest(String token)

/**
* Store a {@link WaveScanRecord} object in the Surreal wave_scan table.
* Store a {@link WaveScanRecord} object in the persistence layer.
*
* @param data A {@link WaveScanRecord} object representing the a container scan request
*/
Expand Down Expand Up @@ -152,7 +152,7 @@ interface PersistenceService {
* Retrieve all {@link WaveScanRecord} object for the given partial scan id
*
* @param scanId The scan id for which all the scan records should be retrieved
* @return The corresponding {@link WaveScanRecord} object or {@code null} if no record is found
* @return The corresponding list of {@link WaveScanRecord} objects or an empty list if no record is found
*/
List<WaveScanRecord> allScans(String scanId)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ import static io.seqera.wave.util.DataTimeUtils.parseOffsetDateTime
class WaveContainerRecord {

/**
* wave request id, this will be the token
* This is container token and it is named as id for surrealdb requirement
* Wave request id, this will be the token
*/
@PostgresIgnore
final String id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import groovy.util.logging.Slf4j
import io.seqera.wave.core.ContainerPlatform
import io.seqera.wave.service.scan.ScanEntry
import io.seqera.wave.service.scan.ScanVulnerability
import io.seqera.wave.util.StringUtils
/**
* Model a Wave container scan result
*
Expand Down Expand Up @@ -75,7 +74,7 @@ class WaveScanRecord implements Cloneable {
Path workDir
)
{
this.id = StringUtils.surrealId(id)
this.id = id
this.buildId = buildId
this.mirrorId = mirrorId
this.requestId = requestId
Expand All @@ -93,7 +92,7 @@ class WaveScanRecord implements Cloneable {
}

WaveScanRecord(ScanEntry scan) {
this.id = StringUtils.surrealId(scan.scanId)
this.id = scan.scanId
this.buildId = scan.buildId
this.mirrorId = scan.mirrorId
this.requestId = scan.requestId
Expand Down Expand Up @@ -121,7 +120,7 @@ class WaveScanRecord implements Cloneable {
}

void setId(String id) {
this.id = StringUtils.surrealId(id)
this.id = id
}

Boolean succeeded() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import jakarta.inject.Singleton
@Singleton
@CompileStatic
@Secondary
@Requires(notEnv = "surrealdb")
@Requires(notEnv = "postgres")
@TraceElapsedTime(thresholdMillis = '${wave.trace.local-persistence.threshold:100}')
class LocalPersistenceService implements PersistenceService {

Expand Down

This file was deleted.

This file was deleted.

Loading