Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

chore: check return json from maven#2913

Merged
JoeWang1127 merged 9 commits intomainfrom
chore/check-rt-num
Mar 18, 2025
Merged

chore: check return json from maven#2913
JoeWang1127 merged 9 commits intomainfrom
chore/check-rt-num

Conversation

@JoeWang1127
Copy link
Copy Markdown
Contributor

@JoeWang1127 JoeWang1127 commented Mar 18, 2025

In this PR:

  • Check the return json string from Maven Central

@JoeWang1127 JoeWang1127 requested review from a team and mrfaizal March 18, 2025 14:47
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. labels Mar 18, 2025
@JoeWang1127 JoeWang1127 requested a review from suztomo March 18, 2025 14:55
latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1)
local latest
json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json")
status=$(jq -r '.responseHeader.status' <<< "${json_content}")
Copy link
Copy Markdown
Member

@suztomo suztomo Mar 18, 2025

Choose a reason for hiding this comment

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

This relies on the content of the HTTP request for URL. Use curl command's exit status code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this commit, the response from maven seems valid but the response.docs[] seems empty.

I'll find a better way to determine the returned json.

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. and removed size: s Pull request size is small. labels Mar 18, 2025
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Mar 18, 2025
@JoeWang1127 JoeWang1127 changed the title chore: check return status from maven chore: check return json from maven Mar 18, 2025
@JoeWang1127 JoeWang1127 requested a review from suztomo March 18, 2025 18:43
@JoeWang1127 JoeWang1127 merged commit 4f34881 into main Mar 18, 2025
19 of 20 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/check-rt-num branch March 18, 2025 21:32
JoeWang1127 added a commit to googleapis/sdk-platform-java that referenced this pull request Mar 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants