Skip to content

fix: respect config-bucket precedence and deduplicate buckets in recompute - #188

Merged
mvlassis merged 5 commits into
mainfrom
fix/187-recompute-bucket-precedence-dedup
Jul 29, 2026
Merged

fix: respect config-bucket precedence and deduplicate buckets in recompute#188
mvlassis merged 5 commits into
mainfrom
fix/187-recompute-bucket-precedence-dedup

Conversation

@mvlassis

@mvlassis mvlassis commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Overview

Fixes #187, where s3-integrator ends up blocked with a message like:

Could not ensure bucket(s): 'mlpipeline', 'mlpipeline'

Root cause

  1. The get_statuses() method diverges from reconcile_buckets. According to the docs (see s3/README.md), consumer-specific bucket/path configuration should take precedence and overwrite any bucket requested by a requirer. get_statuses still revaluates every relation-requested bucket, even if there is a config set and thus should have been ignored.

  2. No de-duplication when calculating the missing buckets, resulting in the same bucket name could appear more than once, producing the duplicated 'mlpipeline', 'mlpipeline' message.

Notes

  • This PR also adds a step in the ci.yaml action to release the 3 charms in a PR channel whenever a PR is raised.

The get_statuses(recompute=True) path in the S3 provider diverged from
reconcile_buckets in two ways:

1. It re-evaluated relation-requested buckets even when a config bucket
   was set, violating the documented precedence rule where the config
   bucket always overwrites requester-provided buckets. This could emit
   a spurious 'Could not ensure bucket(s)' status for a relation bucket
   that should have been ignored.

2. It did not de-duplicate bucket names, so multiple requirers asking
   for the same unavailable bucket produced messages like
   'Could not ensure bucket(s): mlpipeline, mlpipeline'.

This aligns the recompute path with reconcile_buckets: when a config
bucket is set only that bucket is evaluated, and requested bucket lists
are de-duplicated while preserving order.

Fixes #187
@mvlassis mvlassis changed the title fix: respect config-bucket precedence and dedup buckets in recompute fix: respect config-bucket precedence and deduplicate buckets in recompute Jul 28, 2026

@Batalex Batalex left a comment

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.

LGTM. Very nice fix, thanks :)

I wonder if we need/want to release three new revisions (even if we cannot access them after 30 days) on every push on every PR. Just with the renovate setup running every month, that will amount to quite a huge number for something that is easily toggleable when we actually need it.
I'll approve the PR, let's see what a second review will say about this

Comment thread .github/workflows/ci.yaml
Comment thread s3/src/events/provider.py

@welpaolo welpaolo left a comment

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.

Great fix Manos!

@mvlassis
mvlassis merged commit 31b9a6f into main Jul 29, 2026
154 of 155 checks passed
@mvlassis
mvlassis deleted the fix/187-recompute-bucket-precedence-dedup branch July 29, 2026 16:48
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.

Charm errors out with message: Could not ensure bucket(s)

3 participants