Skip to content

fix: replace deref with accessor function - #943

Open
adwk67 wants to merge 3 commits into
mainfrom
fix/container-name-accessor
Open

fix: replace deref with accessor function#943
adwk67 wants to merge 3 commits into
mainfrom
fix/container-name-accessor

Conversation

@adwk67

@adwk67 adwk67 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Description

Part of stackabletech/issues#883

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • (Integration-)Test cases added
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@adwk67
adwk67 marked this pull request as ready for review September 10, 2026 15:47
@siegfriedweber
siegfriedweber self-requested a review September 10, 2026 16:23

@siegfriedweber siegfriedweber Sep 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In my opinion, the container name should always come from the same source, i.e. name():

-        &crate::crd::Container::PasswordFileUpdater.to_string(),
+        crate::crd::Container::PasswordFileUpdater.name().as_ref(),

The comment for the test case container_names_match_display can then be adapted, because Display is not used anymore for log capture:

/// The typed container names returned by `name` must agree with the strum `Display` of
/// `Container`, which the logging configuration uses as the per-container key.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment is not adapted yet:

/// The typed container names returned by `name` must agree with the strum `Display` of
/// `Container`, which the rest of the operator still uses for log capture and container lookups.

Display is not used for log capture anymore.

Comment thread rust/operator-binary/src/controller/build/resource/statefulset.rs Outdated
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