Skip to content

patch: fix has_file function to check on every unit instead of only checking the leader - #405

Open
patriciareinoso wants to merge 5 commits into
8/edgefrom
DPE-10002-has-file
Open

patch: fix has_file function to check on every unit instead of only checking the leader#405
patriciareinoso wants to merge 5 commits into
8/edgefrom
DPE-10002-has-file

Conversation

@patriciareinoso

@patriciareinoso patriciareinoso commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🏷️ Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling and CI
  • Dependencies upgrade or change
  • Chores / refactoring

📝 Description

This PR make the function has_file to actually check the given unit instead of checking the leader unit.
This function is used by:

  • test_sharded_backups_tls.py -> test_remove_integration
  • test_encryption_valid_scenario.py -> test_integration_goes_to_active

which iterate over all the units of the application and call the has_file function

🧪 Manual testing steps

No need, this PR just modifies an check in the integration test

🔬 Automated testing steps

The integration tests using the has_file function still pass

✅ Checklist

  • My code follows the code style of this project.
  • I have added or updated any relevant documentation.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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 change probably means we want to check that all calls to this function provide the leader as unit, but agreed !

@patriciareinoso patriciareinoso Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the has_file function is called twice (test_sharded_backups_tls.py and test_encryption_valid_scenario.py)
Both times the test iterates over all the units of the application and called the has_file functions.
So in fact we were checking multiple times that the leader unit has a file , no we check that each unit in the application has a file

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.

2 participants