Skip to content

[MINOR] fix(client-python): initialize request headers for raw bodies - #13898

Closed
yuqi1129 wants to merge 2 commits into
apache:mainfrom
yuqi1129:fix-python-header-pylint
Closed

yuqi1129 wants to merge 2 commits into
apache:mainfrom
yuqi1129:fix-python-header-pylint

Conversation

@yuqi1129

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Assign the merged request headers in the raw string/bytes body branch.

Why are the changes needed?

After #13743, this branch leaves request_headers uninitialized, causing UnboundLocalError and blocking main's Python CI with pylint E0606.

Failure: https://github.com/apache/gravitino/actions/runs/38882645940/job/116919740348

Does this PR introduce any user-facing change?

Restores requests with raw string/bytes bodies, including Ossie document imports. No API or configuration changes.

How was this patch tested?

  • The existing raw-body regression fails before the fix (four string/bytes subcases) and passes afterward.
  • All 1,239 Python unit tests passed.
  • Pylint 4.0.5 for gravitino/utils/http_client.py and git diff --check passed.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 12:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 71.95% +0.25% 🟢
Files changed 85.54% 🟢

Module Coverage
aliyun 19.74% 🔴
api 55.09% 🟢
authorization-common 85.96% 🟢
authorization-ranger 14.44% 🔴
aws 53.54% 🟢
aws-bundle 0.0% 🔴
azure 32.1% 🔴
azure-bundle 0.0% 🔴
catalog-common 29.49% 🔴
catalog-fileset 82.37% 🟢
catalog-glue 73.24% 🟢
catalog-hive 83.63% 🟢
catalog-jdbc-common 57.98% 🟢
catalog-jdbc-doris 87.56% 🟢
catalog-jdbc-mysql 81.91% 🟢
catalog-jdbc-postgresql 84.02% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 75.21% 🟢
catalog-lakehouse-generic 84.58% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.93% 🟢
catalog-lakehouse-paimon 84.36% 🟢
catalog-model 77.99% 🟢
cli 44.62% 🟢
client-java 79.44% 🟢
client-java-runtime 0.0% 🔴
common 60.78% 🟢
core 87.47% -0.02% 🟢
filesystem-hadoop3 76.89% 🟢
flink 55.44% 🟢
flink-common 32.2% 🔴
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-auth 68.0% 🟢
hadoop-common 17.84% 🔴
hive-metastore-common 62.3% 🟢
hive-metastore3-libs 58.8% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 66.53% 🟢
iceberg-rest-server 77.01% 🟢
idp-basic 86.77% 🟢
integration-test-common 0.0% 🔴
jobs 71.35% 🟢
k8s-job-executor 97.76% 🟢
lance-common 39.9% 🔴
lance-rest-server 69.51% 🟢
lineage 59.39% 🟢
optimizer 84.27% 🟢
optimizer-api 46.58% 🟢
server 91.43% 🟢
server-common 83.85% -0.9% 🟢
spark 61.79% 🟢
tencent 81.78% 🟢
tms 80.0% 🟢
trino-connector 63.31% 🟢
Files
Module File Coverage
core CatalogChangeLogListener.java 100.0% 🟢
EntityChangeLogMetricsSource.java 100.0% 🟢
EntityChangeLogBaseSQLProvider.java 100.0% 🟢
EntityChangeLogPostgreSQLProvider.java 100.0% 🟢
Configs.java 99.15% 🟢
EntityCacheChangeLogListener.java 97.33% 🟢
EntityChangeLogPoller.java 94.76% 🟢
EntityChangeLogSQLProviderFactory.java 93.33% 🟢
BaseEntityCache.java 92.86% 🟢
RelationalEntityStore.java 90.77% 🟢
CatalogManager.java 77.1% 🟢
SupportsEntityStoreCache.java 0.0% 🔴
EntityChangeLogListener.java 0.0% 🔴
EntityChangeLogMapper.java 0.0% 🔴
server-common JcasbinChangeListener.java 63.64% 🟢

@yuqi1129

Copy link
Copy Markdown
Contributor Author

Close it as #13569 has already fixed it.

@yuqi1129 yuqi1129 closed this Oct 16, 2026
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