-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[server] Reliably set log the value for volumeSnapshotId #12056
Conversation
/werft run 👍 started the job as gitpod-build-kylos101-fix-pvc-logging.1 |
2593cfd
to
75d152f
Compare
started the job as gitpod-build-kylos101-fix-pvc-logging.3 because the annotations in the pull request description changed |
if (SnapshotContext.is(workspace.context) || WithPrebuild.is(workspace.context)) { | ||
volumeSnapshotId = workspace.context.snapshotBucketId; | ||
} | ||
const volumeSnapshotId = |
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.
Changing this to a constant, in hopes that we'll later be able to see the value here. Presently, we do not see the field at all in GCP logs. 🤔
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.
This change has no effect at all. Just removes one of the rare comments.
As commented internally the value is undefined
, thus the property gets erased during serialization of the log item's payload, which is basically this:
> JSON.stringify({foo: undefined})
'{}'
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.
Thanks, @AlexTugarev !
We know lastValidWorkspaceInstanceId
has a value (because it was logged in a separate field).
So, now that we know fields with undefined values get removed from the logged object, we'll have to work to determine why workspace.context.snapshotBucketId
is sometimes undefined.
FYI, the preview environment will not work until #11966 is merged and this is rebased. |
75d152f
to
1abf902
Compare
/hold rebased, will test and remove hold once done |
/unhold |
Dang, still not fixed. |
Description
Set the value for
volumeSnapshotId
one time.Background: we're trying to log/capture the above field. Why? The problem is, sometimes a feature (PVC) is enabled for workspace start in production, and we do not know why. We added logging to learn more, but, it is missing this field
volSnapshotId: volumeSnapshotId,
.Related Issue(s)
Related to #11823
How to test
Start a workspace
Release Notes
Documentation
Werft options: