Conversation
|
A sample command exercising this a bit: kcidb-triage -b "$KCIDB_CACHE_BUCKET_NAME" -d "$KCIDB_OPERATIONAL_DATABASE" \
'>issue["maestro:8eccb2c3d8def056c6112c94af6a3189cc4f9ba8"]#' \
'>build[maestro:67e9b68767593f2aa0400472]#' |
tales-aparecida
left a comment
There was a problem hiding this comment.
In the near future, we might want to track long-running patterns and setup a timeout.
| response = requests_session.get(log_url, | ||
| timeout=30, | ||
| allow_redirects=True) |
There was a problem hiding this comment.
I strongly recommend limiting the download size from the start.
It can avoid unexpected memory usage problems, e.g. CKI has recently submitted a build with a log of 320MB that has caused some problems.
| response = requests_session.get(log_url, | |
| timeout=30, | |
| allow_redirects=True) | |
| response = requests_session.get(log_url, | |
| timeout=30, | |
| stream=True, | |
| allow_redirects=True) | |
| content_iterator = response.iter_content(DOWNLOAD_MAX_SIZE) | |
| if not (raw_data := next(content_iterator, None)): | |
| return None |
There was a problem hiding this comment.
Of course. We have that implemented in the artifact archive. I could just copy it from there. This is just a PoC.
| id=f"_:{issue_version.id}:{issue_version.version_num}:" | ||
| f"build:{build.id}:error", |
There was a problem hiding this comment.
Please use parentheses when using implicit concatenation in a parameter list or tuple
| id=f"_:{issue_version.id}:{issue_version.version_num}:" | |
| f"build:{build.id}:error", | |
| id=(f"_:{issue_version.id}:{issue_version.version_num}:" | |
| f"build:{build.id}:error"), |
There are more instances of this in the changes
There was a problem hiding this comment.
Uuuh, OK. I didn't really have that convention so far, but could do.
There was a problem hiding this comment.
To be clear, this convention avoids skipping commas accidentally, and TBH I find it personally easier to read
There was a problem hiding this comment.
Yeah, I got the idea. Thanks :)
No description provided.