Skip to content

Implement batch job metadata PATCH support (update_job) in GeoPySpark backend#1672

Draft
jdries with Copilot wants to merge 2 commits into
masterfrom
copilot/implement-update-job-method
Draft

Implement batch job metadata PATCH support (update_job) in GeoPySpark backend#1672
jdries with Copilot wants to merge 2 commits into
masterfrom
copilot/implement-update-job-method

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

This adds backend support for the openEO batch job update API (PATCH /jobs/{job_id}), implementing the update_job method introduced in openeo-python-driver. It enables controlled metadata updates on existing batch jobs while enforcing editability and job-state constraints.

  • Backend: add GpsBatchJobs.update_job

    • Implements update_job(job_id, user_id, data) in openeogeotrellis/backend.py.
    • Supports updates for editable fields only: title, description, process, plan, budget.
    • Rejects updates on locked jobs (queued, running) via JobLockedException.
    • Rejects non-editable properties via PropertyNotEditableException.
    • Delegates persistence to the job registry layer.
  • Registry: add update plumbing

    • Adds update_job(...) to InMemoryJobRegistry for local/test registry behavior.
    • Adds update_job(...) passthrough in DoubleJobRegistry to delegate to the configured underlying registry.
    • Ensures updated timestamp is refreshed on successful metadata updates.
  • Tests: focused coverage for new behavior

    • Adds backend-level tests for:
      • successful editable-field updates,
      • rejection of non-editable fields,
      • rejection when job is in queued/running state.
batch_jobs.update_job(
    job_id=job_id,
    user_id=user_id,
    data={"title": "Updated title", "budget": 42.0},
)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.openeo.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 20, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Implement job metadata updates with update_job method Implement batch job metadata PATCH support (update_job) in GeoPySpark backend May 20, 2026
Copilot finished work on behalf of jdries May 20, 2026 05:24
Copilot AI requested a review from jdries May 20, 2026 05:24

def update_job(self, job_id: str, *, user_id: Optional[str] = None, data: Optional[dict] = None) -> None:
if self.elastic_job_registry:
update_job = getattr(self.elastic_job_registry, "update_job", None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this method does not yet exist
@copilot open a new PR in openeo-python-driver to add this method

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@jdries I've opened a new pull request, #1673, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow job metadata updates

2 participants