- Notifications
You must be signed in to change notification settings - Fork328
Refactor the initialization of GUC parameters.#1360
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
let task_json = format!(json_template!(), model, false); | ||
let task: Value = serde_json::from_str(&task_json).unwrap(); | ||
assert!(verify_task(&task).is_ok()); | ||
let task_json = format!(json_template!(), model, true); | ||
let task: Value = serde_json::from_str(&task_json).unwrap(); | ||
assert!(verify_task(&task).is_ok()); | ||
assert!(verify_task(&task).is_err()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In the initial commit of this test, this step should fail withRemoteCodeNotTrusted
.
postgresml/pgml-extension/src/bindings/transformers/whitelist.rs
Lines 189 to 192 inf4e87c5
assert_eq!( | |
verify_task_against_whitelist(&task), | |
Err(WhitelistError::RemoteCodeNotTrusted) | |
); |
"Whether model can execute remote codes", | ||
"", | ||
&PGML_HF_TRUST_REMOTE_CODE.1, | ||
GucContext::Userset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shall we make these GUCsSUSET
?
SUSET options can be set at postmaster startup, with the SIGHUP mechanism, or from the startup packet or SQL if you're a superuser.
Managing GUC parameters in different places is hard to maintain. Thispatch organizes GUC definitions in a single place. Also, we usedefine_xxx_guc() APIs to define these parameters and it will allow usto manage GucContext, GucFlags in future.P.S., the test case test_trusted_model doesn't seem correct. I fixed itin this patch.
a868029
to4612b4f
CompareMerged in commitf674f70 |
Managing GUC parameters in different places is hard to maintain. This patch organizes GUC definitions in a single place. Also, we use define_xxx_guc() APIs to define these parameters and it will allow us to manage GucContext, GucFlags in future.
P.S., the test case test_trusted_model doesn't seem correct. I fixed it in this patch.