Skip to content

[Gemini] 5.1: Update JobSpec with project identifiers #42

@taariq

Description

@taariq

Parent: #28

Workflow Instructions for Gemini

Repos:

  • database-replicator (/Users/taariqlewis/Projects/Seren_Projects/database-replicator)
  • seren-replicator (/Users/taariqlewis/Projects/Seren_Projects/seren-replicator)

When to Start: After Phase 3 is complete (after #39)

Dependencies: #39 (Sync command integration) - All Phase 1, 2, and 3 tasks must be done first


Task

Update JobSpec struct in both repos to support project-based target specification as an alternative to target_url.

Files to Modify

  1. src/remote/models.rs in database-replicator
  2. src/remote/models.rs in seren-replicator (same changes)

What to Add

Add optional fields to JobSpec:

// Either target_url OR (target_project_id + target_branch_id) required
#[serde(skip_serializing_if = "Option::is_none")]
pub target_url: Option<String>,  // Make this optional

// Project-based target (alternative to target_url)
#[serde(skip_serializing_if = "Option::is_none")]
pub target_project_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub target_branch_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub target_databases: Option<Vec<String>>,

// API key for fetching connection string (encrypted in transit)
#[serde(skip_serializing_if = "Option::is_none")]
pub seren_api_key: Option<String>,

See docs/plans/api-key-flow-implementation.md Task 5.1 for full code.

How to Test

# In database-replicator
cd /Users/taariqlewis/Projects/Seren_Projects/database-replicator
cargo test remote

# In seren-replicator
cd /Users/taariqlewis/Projects/Seren_Projects/seren-replicator
cargo test remote

Commit Message

feat(remote): Add project identifiers to JobSpec for API-key flow

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions