Allow udf.pseudonymize_ad_id to be published outside shared-prod (#3683)
This commit is contained in:
Родитель
81c19cb62a
Коммит
100df65bb1
|
@ -62,6 +62,12 @@ parser.add_argument(
|
|||
help="The published UDFs should be publicly accessible.",
|
||||
)
|
||||
standard_args.add_log_level(parser)
|
||||
parser.add_argument(
|
||||
"pattern",
|
||||
default=None,
|
||||
nargs="?",
|
||||
help="glob pattern matching udfs to publish",
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -81,6 +87,7 @@ def main():
|
|||
args.gcs_bucket,
|
||||
args.gcs_path,
|
||||
args.public,
|
||||
pattern=args.pattern,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ RETURNS STRING AS (
|
|||
"ksEEnM6/esBxl2myqrVLo31ePBoQZZnkCm81vefaF90="
|
||||
),
|
||||
NULL,
|
||||
TO_HEX(`moz-fx-data-shared-prod`.udf.hmac_sha256(key, CAST(hashed_ad_id AS BYTES)))
|
||||
TO_HEX(udf.hmac_sha256(key, CAST(hashed_ad_id AS BYTES)))
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -19,5 +19,5 @@ SELECT
|
|||
assert.not_null(udf.pseudonymize_ad_id("sEEnM6/esBxl2myqrVLo31ePBoQZZnkCm81vefaF90=", b"\x14")),
|
||||
assert.equals(
|
||||
udf.pseudonymize_ad_id("abc", b"\x14"),
|
||||
TO_HEX(`moz-fx-data-shared-prod`.udf.hmac_sha256(b"\x14", CAST("abc" AS BYTES)))
|
||||
TO_HEX(udf.hmac_sha256(b"\x14", CAST("abc" AS BYTES)))
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче