Skip to content

fix: Audit log human parse message and nullable diffs #3978

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

Merged
merged 2 commits into from
Sep 9, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

Error:

======================= STACK TRACE ========================

Cannot read properties of undefined (reading 'toString')
    at O (https://dev.coder.com/bundle.489bcd6ead6d8b7cb860.js:1:1693)
    at https://dev.coder.com/bundle.489bcd6ead6d8b7cb860.js:1:2157
    at Array.map (<anonymous>)
    at T (https://dev.coder.com/bundle.489bcd6ead6d8b7cb860.js:1:1874)
    at So (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:489406)
    at _l (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:546365)
    at bu (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:535347)
    at yu (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:535275)
    at vu (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:535138)
    at au (https://dev.coder.com/bundle.e3c697876446d5353699.js:2:531945)

============================================================

Fix:
Screen Shot 2022-09-09 at 12 31 58

@BrunoQuaresma BrunoQuaresma marked this pull request as ready for review September 9, 2022 15:33
@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner September 9, 2022 15:33
@BrunoQuaresma BrunoQuaresma requested review from presleyp and removed request for a team September 9, 2022 15:33
Copy link
Contributor

@coadler coadler left a comment

Choose a reason for hiding this comment

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

Could we maybe render arrays like [foo, bar, baz] instead of just a comma separated string? I think currently the empty arrays aren't very obvious they're arrays.

Comment on lines 12 to 15
if (!value) {
return `""`
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit confusing to default all null values to an empty string, when they could really be of any type. I'll try and update the diffs to make sure one of the values is always non-null so you'll be able to know the type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can return null as well. I would avoid rendering custom "empty placeholders" based on value type because what would be an empty placeholder for numbers and booleans? 0 and false? Would not make too much sense to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think null works 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screen Shot 2022-09-09 at 13 36 32

@BrunoQuaresma BrunoQuaresma merged commit 346583f into main Sep 9, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-audit-log branch September 9, 2022 16:53
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.

2 participants