Skip to content

[Bug]: PATCH crawlconfig with partial config update causes data loss #3065

@frodstee

Description

@frodstee

Browsertrix Version

v1.20.1-6f1c342

What did you expect to happen? What happened instead?

I need to mass update a behavior url on many crawl workflows, but when I try to use PATCH with the API the result is not as expected. PATCH change values that are not defined in the request payload.

Reproduction instructions

  1. Create a new single page crawl workflow with a URL to crawl.
  2. Save
  3. Send a PATCH request to update only "customBehaviors" and "behaviors"
  4. Several fields that is not included in the patch object is changed. See attached screenshot with diff.

Endpoints used:
PATCH: {{ base_url }}/api/orgs/{{org_id}}/crawlconfigs/b6781a39-3d4f-483f-b4f4-2c913e3114a0

Payload used:
{
"config":
{
"behaviors": "autoplay,autofetch,siteSpecific",
"customBehaviors": [
"https://raw.githubusercontent.com/NationalLibraryOfNorway/nettarkivet-browsertrix/refs/heads/main/amedia_personalia.js"
]
}
}

Screenshots / Video

Image

Environment

No response

Additional details

Issue have been reproduced on app.browsertrix.com

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done!

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions