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

adapter: Fix startup parameter default values #31166

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

jkosh44
Copy link
Contributor

@jkosh44 jkosh44 commented Jan 23, 2025

There are some server configuration parameters that we need during
startup, before the catalog has been fully opened. To get the current
value we manually look at the current value in LaunchDarkly (which is
confusingly returned as None if it matches the default value in the
code), then we manually look in the catalog, then we manually look in
the server parameter default override CLI arg map.

Previously, for some of the parameters, if we weren't able to find the
value in any of those places, then we hard-code in the value false.
This is not correct, and instead we should fall back to their default
value, which is sometimes true. This commit fixes the issue by falling
back to their default values.

Motivation

This PR fixes a previously unreported bug.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@jkosh44 jkosh44 force-pushed the ld-investigate branch 2 times, most recently from d71c4fa to f42ff63 Compare January 23, 2025 19:22
There are some server configuration parameters that we need during
startup, before the catalog has been fully opened. To get the current
value we manually look at the current value in LaunchDarkly (which is
confusingly returned as `None` if it matches the default value in the
code), then we manually look in the catalog, then we manually look in
the server parameter default override CLI arg map.

Previously, For some of the parameters, if we weren't able to find the
value in any of those places, then we hard-code in the value false.
This is not correct, and instead we should fall back to their default
value, which is sometimes true. This commit fixes the issue by falling
back to their default values.
@jkosh44 jkosh44 changed the title [DNM] Log stuff adapter: Fix startup parameter default values Jan 23, 2025
@jkosh44 jkosh44 requested review from aljoscha and benesch January 23, 2025 20:24
@jkosh44 jkosh44 marked this pull request as ready for review January 23, 2025 20:24
@jkosh44 jkosh44 requested a review from a team as a code owner January 23, 2025 20:24
Copy link
Contributor

@benesch benesch left a comment

Choose a reason for hiding this comment

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

Oooooof.

@jkosh44
Copy link
Contributor Author

jkosh44 commented Jan 23, 2025

This is potentially now a confusing log message, but it does seem to work

determined value for enable_0dt_deployment system parameter","computed":"true","ld":"None","catalog":"None","default":"None"

@jkosh44 jkosh44 enabled auto-merge (squash) January 23, 2025 20:52
@benesch
Copy link
Contributor

benesch commented Jan 23, 2025

This is potentially now a confusing log message, but it does seem to work

determined value for enable_0dt_deployment system parameter","computed":"true","ld":"None","catalog":"None","default":"None"

Arguably we should split the log line to have "CLI default" and "code default" but don't go back through CI just for that.

@jkosh44 jkosh44 merged commit 85eeb7d into MaterializeInc:main Jan 23, 2025
79 checks passed
@jkosh44 jkosh44 deleted the ld-investigate branch January 24, 2025 14:47
antiguru pushed a commit to antiguru/materialize that referenced this pull request Jan 24, 2025
There are some server configuration parameters that we need during
startup, before the catalog has been fully opened. To get the current
value we manually look at the current value in LaunchDarkly (which is
confusingly returned as `None` if it matches the default value in the
code), then we manually look in the catalog, then we manually look in
the server parameter default override CLI arg map.

Previously, for some of the parameters, if we weren't able to find the
value in any of those places, then we hard-code in the value false.
This is not correct, and instead we should fall back to their default
value, which is sometimes true. This commit fixes the issue by falling
back to their default values.
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