Skip to content

Conversation

@benjaminjb
Copy link
Contributor

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?

After the 5.7 release, when AutoUserSchemaCreate was graduated to default on/true, we discovered that our current system (and the underlying featuregate implementation) treats features explicitly turned on by the user differently than features turned on by default.

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

This PR updates that logging to make clear that the features are those specifically requested by the user (kept as a string to help debugging) and revises the 'ShowGates' function to include those set through defaults.

Other Information:

Issues: [PGO-1824]

After the 5.7 release, when AutoUserSchemaCreate was graduated to
default on/true, we discovered that our current system (and the
underlying featuregate implementation) treats features explicitly
turned on by the user differently than features turned on by default.

This PR updates that logging to make clear that the features are those
specifically requested by the user (kept as a string to help debugging)
and revises the 'ShowGates' function to include those set through defaults.

Issues: [PGO-1824]
@benjaminjb benjaminjb requested a review from cbandy November 5, 2024 22:36
Copy link
Member

@cbandy cbandy left a comment

Choose a reason for hiding this comment

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

The implementation is good, but I've soured on some of the naming. I misunderstood what "String" did, and now want better method names.

I can do the work of renaming a bunch of things if you're ready to be done with this PR.

assert.Equal(t, data.BridgeClustersTotal, 2)
assert.Equal(t, data.PGOClustersTotal, 2)
assert.Equal(t, data.FeatureGatesEnabled, "TablespaceVolumes=true")
assert.Equal(t, data.FeatureGatesEnabled, "AutoCreateUserSchema=true,TablespaceVolumes=true")
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻 This isn't Contains, but I don't mind seeing the format. 🌱 We can change the test if it is ever a problem.

Copy link
Member

@cbandy cbandy left a comment

Choose a reason for hiding this comment

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

LGTM. Please squash.

benjaminjb and others added 2 commits December 3, 2024 07:43
@benjaminjb benjaminjb merged commit 12c8207 into main Dec 3, 2024
17 checks passed
@benjaminjb benjaminjb deleted the update-feature-gate-logging branch December 3, 2024 16:18
dsessler7 pushed a commit that referenced this pull request Nov 14, 2025
* Update feature gate logging to include default on

After the 5.7 release, when AutoUserSchemaCreate was graduated to
default on/true, we discovered that our current system (and the
underlying featuregate implementation) treats features explicitly
turned on by the user differently than features turned on by default.

This PR updates that logging to make clear what features are
specifically requested by the user and what features are actually enabled
(a union of defaults and end user settings).

Issues: [PGO-1824]

Co-authored-by: Chris Bandy <chris.bandy@crunchydata.com>
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.

3 participants