Skip to content

feat(backup): Process backups only when content changes#1

Merged
thmarx merged 1 commit intomainfrom
feature/backup-only-on-change
Nov 30, 2025
Merged

feat(backup): Process backups only when content changes#1
thmarx merged 1 commit intomainfrom
feature/backup-only-on-change

Conversation

@google-labs-jules
Copy link
Copy Markdown

This change introduces a new feature to the backup module that allows processing backups only when their content has changed. This is controlled by a new processOnlyOnChange configuration option. When enabled, it calculates a SHA-256 checksum of the backup and compares it to the previous one. Post-processing is skipped if the backup is unchanged. The implementation is memory-efficient and includes unit tests.


PR created automatically by Jules for task 9747914990861257432 started by @thmarx

Introduces a new configurable option, `processOnlyOnChange`, to the backup module.

When this option is enabled for a backup job, a SHA-256 checksum of the backup archive is calculated and compared to the checksum of the previous backup.

The post-processing steps (e.g., uploading to S3) are now only executed if the checksums differ, indicating that the backup's content has changed.

If the backup has not changed, the newly created archive is deleted to save disk space.

This optimization avoids unnecessary processing and storage of redundant backups.

The checksum calculation is implemented using a streaming approach to handle large files without causing OutOfMemoryError. The checksum file is written atomically to prevent corruption.

Unit tests have been added to verify the new functionality.
@google-labs-jules
Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@thmarx thmarx marked this pull request as ready for review November 30, 2025 16:43
@thmarx thmarx merged commit d7bb80c into main Nov 30, 2025
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.

1 participant