Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List immutables resilience #1465

Merged
merged 3 commits into from
Jan 30, 2024
Merged

List immutables resilience #1465

merged 3 commits into from
Jan 30, 2024

Conversation

Alenar
Copy link
Collaborator

@Alenar Alenar commented Jan 26, 2024

Content

This PR enhance the immutable files listing, making it more resilient:

  • Instead of simply skipping the last three files to remove an incomplete trio, it skip the file(s) with the highest number (meaning that if for example the "secondary" file is missing from the "99" trio this won't remove a file from the "98" trio).
  • The condition to be recognize as an immutable is not only being in a "immutable" folder but also to have one of the following file extension: "chunk", "primary", "secondary".
  • If will first search for the "immutable" folder and won't walk in its subfolder in search for immutables.
  • This point needs to be discussed It will fails if it can't find a "immutable" folder instead of returning an empty list.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Issue(s)

Closes #1450

@Alenar Alenar self-assigned this Jan 26, 2024
Copy link

github-actions bot commented Jan 26, 2024

Test Results

  3 files  ±0   33 suites  ±0   8m 42s ⏱️ -21s
787 tests +3  787 ✅ +8  0 💤 ±0  0 ❌  - 5 
860 runs  +3  860 ✅ +8  0 💤 ±0  0 ❌  - 5 

Results for commit 909936e. ± Comparison against base commit 659da2e.

♻️ This comment has been updated with latest results.

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I noticed few typos below.
Also I'm OK to fail if no immutable file is found.

mithril-common/src/digesters/immutable_file.rs Outdated Show resolved Hide resolved
mithril-common/src/digesters/immutable_file.rs Outdated Show resolved Hide resolved
@Alenar Alenar temporarily deployed to testing-preview January 29, 2024 16:34 — with GitHub Actions Inactive
@Alenar Alenar force-pushed the djo/1450/list_immutables_resilience branch 2 times, most recently from daa419b to 331f020 Compare January 29, 2024 16:40
@Alenar Alenar temporarily deployed to testing-preview January 29, 2024 16:48 — with GitHub Actions Inactive
* It first find the "immutable" directory (and fails if it can't find
  it).
* It also check the file extension (for either "chunk", "primary" or
  "secondary").
It will skip the file(s) with the highest number instead of simply
skipping the last three files.
@Alenar Alenar force-pushed the djo/1450/list_immutables_resilience branch from 331f020 to 909936e Compare January 30, 2024 11:09
@Alenar Alenar temporarily deployed to testing-preview January 30, 2024 12:52 — with GitHub Actions Inactive
@Alenar Alenar merged commit ec8910b into main Jan 30, 2024
39 checks passed
@Alenar Alenar deleted the djo/1450/list_immutables_resilience branch January 30, 2024 12:57
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.

Enhance ImmutableFile list computation resilience
3 participants