-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(artifacts): accept dict-shaped artifacts in InMemoryArtifactService (#3495) #3622
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
Open
Fangmbeng
wants to merge
6
commits into
google:main
Choose a base branch
from
Fangmbeng:fix/artifact-dict-handling-3495
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dd2bb04
fix(artifacts): accept dict-shaped artifacts in InMemoryArtifactServi…
Fangmbeng 044872c
test(artifacts): add artifact-ref and empty-artifact tests; log fallb…
Fangmbeng 78d3f77
chore(repo): commit local changes before merging upstream/main
Fangmbeng ee87bc4
Merge remote-tracking branch 'upstream/main' into fix/artifact-dict-h…
Fangmbeng 9fe506e
style: run pyink/isort formatting fixes
Fangmbeng 6d7cbd9
Merge remote-tracking branch 'upstream/main' into fix/artifact-dict-h…
Fangmbeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| PR_NUMBER=3622 | ||
| REPO=google/adk-python | ||
| LOG=/workspaces/adk-python/.pr_poll_3622.log | ||
|
|
||
| echo "Starting PR poller for $REPO#$PR_NUMBER, logging to $LOG" | ||
|
|
||
| # Ensure log exists | ||
| mkdir -p "$(dirname "$LOG")" | ||
| : > "$LOG" | ||
|
|
||
| while true; do | ||
| ts=$(date --iso-8601=seconds) | ||
| if command -v gh >/dev/null 2>&1; then | ||
| # Try to get a concise status line with gh; fallback to full JSON on failure | ||
| if out=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json number,title,author,headRefName,baseRefName,mergeStateStatus 2>&1); then | ||
| echo "[$ts] $out" >> "$LOG" | ||
| # append a short status | ||
| echo "[$ts] SHORT: $(echo "$out" | head -n 1)" >> "$LOG" | ||
| else | ||
| echo "[$ts] GH_ERROR: $out" >> "$LOG" | ||
| fi | ||
| elif [[ -n "${GITHUB_TOKEN:-}" ]]; then | ||
| out=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$REPO/pulls/$PR_NUMBER") || out="ERROR_FROM_CURL" | ||
| echo "[$ts] $out" >> "$LOG" | ||
| echo "[$ts] SHORT: $(echo "$out" | head -c 200)" >> "$LOG" | ||
| else | ||
| echo "[$ts] ERROR: gh CLI not available and GITHUB_TOKEN not set" >> "$LOG" | ||
| fi | ||
|
|
||
| # NOTE: do not exit automatically here; keep polling until manually stopped. | ||
| # If desired we could exit when the PR is merged/closed, but some CI checks | ||
| # remain visible after merge, so prefer continuous monitoring. | ||
|
|
||
| sleep 600 | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| nohup: ignoring input | ||
| Starting PR poller for google/adk-python#3622, logging to /workspaces/adk-python/.pr_poll_3622.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using
except Exception:is very broad and can hide unexpected bugs. It's better to catch more specific exceptions that you anticipate might be raised from the operations in thetryblock, such asTypeErrororAttributeError, to avoid accidentally silencing unrelated issues.