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

Don't discard fields of LayerOptions #2008

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Jul 10, 2024

Instead of making a copy with some fields, pass the ~deep copy of options we are already using with all of them.

Originally motivated by a linter pointing out that the copy of options.BigData has no readers.

In some cases it's not entirely clear that we intended the fields to be a public API; at least I can't see any external caller of any of these fields. But now that they are a public API, we can either implement it, or mark the fields as deprecated ... and then we would need to introduce an internal option structure to carry the fields for the call paths where we do want these fields. That's possible but more work, so I'm doing the lazy thing.

@giuseppe @nalind PTAL

Instead of making a copy with some fields, pass the ~deep copy
of options we are already using with all of them.

Originally motivated by a linter pointing out that the
copy of options.BigData has no readers.

In some cases it's not entirely clear that we intended the fields
to be a public API; at least I can't see any external caller of any
of these fields. But now that they _are_ a public API, we can either
implement it, or mark the fields as deprecated ... and then we would
need to introduce an internal option structure to carry the fields
for the call paths where we do want these fields. That's possible
but more work, so I'm doing the lazy thing.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@nalind
Copy link
Member

nalind commented Jul 10, 2024

LGTM

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Jul 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, mtrmac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 6f4f032 into containers:main Jul 10, 2024
18 checks passed
@mtrmac mtrmac deleted the LayerOptions branch July 10, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants