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

fix!: make actions types pub(crate) instead of pub #405

Merged
merged 8 commits into from
Mar 26, 2025

Conversation

zachschuermann
Copy link
Collaborator

@zachschuermann zachschuermann commented Oct 17, 2024

We don't want to just have all action types pub. This moves everything to pub(crate) but turns them pub with dev-visibility.

Breaking change: actions types are now all private (Metadata, Protocol, Add, etc.)

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.38%. Comparing base (025aba8) to head (2eea225).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   78.34%   78.38%   +0.04%     
==========================================
  Files          49       49              
  Lines       10282    10280       -2     
  Branches    10282    10280       -2     
==========================================
+ Hits         8055     8058       +3     
+ Misses       1775     1770       -5     
  Partials      452      452              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the breaking-change Change that will require a version bump label Oct 17, 2024
Copy link
Collaborator

@scovich scovich 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 do wish there were a way to attach visibility:make to struct fields tho. Otherwise we have to decide between the fields being inaccessible to users under developer-visibility, or getting flagged as unreachable-public the rest of the time.

let mut visitor = MetadataVisitor::default();
data.extract(get_log_schema().project(&[METADATA_NAME])?, &mut visitor)?;
Ok(visitor.metadata)
}

pub fn schema(&self) -> DeltaResult<StructType> {
pub(crate) fn schema(&self) -> DeltaResult<StructType> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be public under developer-visibility? Or is the schema from snapshot enough?
(similar question for reader/writer feature lists in Protocol below)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Honestly I think this just comes down to semantics/what we want to expose? Do we want to make users understand Metadata actions or should we just keep the schema as part of snapshot? Perhaps we just try to constrain for now (snapshot only) and open it back up if needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

SGTM!

@zachschuermann zachschuermann changed the title [wip] make actions private make actions types pub(crate) Oct 18, 2024
Copy link
Collaborator

@hntd187 hntd187 left a comment

Choose a reason for hiding this comment

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

Looks good here

@zachschuermann zachschuermann added the merge hold Don't allow the PR to merge label Oct 22, 2024
@zachschuermann
Copy link
Collaborator Author

Need to see how much of this interface delta-rs is consuming - will report back but for now let's hold off

@zachschuermann
Copy link
Collaborator Author

zachschuermann commented Mar 26, 2025

@roeap can you chime in here? (regarding if delta-rs is consuming these? and perhaps then we should just put them all behind dev-visibility?)

@zachschuermann zachschuermann changed the title make actions types pub(crate) fix!: make actions types pub(crate) instead of pub Mar 26, 2025
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.35%. Comparing base (fff0052) to head (e2684fe).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kernel/src/actions/mod.rs 89.28% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #405   +/-   ##
=======================================
  Coverage   84.34%   84.35%           
=======================================
  Files          81       81           
  Lines       19233    19253   +20     
  Branches    19233    19253   +20     
=======================================
+ Hits        16223    16241   +18     
- Misses       2207     2209    +2     
  Partials      803      803           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zachschuermann zachschuermann removed the merge hold Don't allow the PR to merge label Mar 26, 2025
@zachschuermann zachschuermann merged commit cb70e58 into delta-io:main Mar 26, 2025
21 checks passed
@zachschuermann zachschuermann deleted the private-actions branch March 26, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Change that will require a version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants