Skip to content

[TRI-2755] v3 run log outputs with empty array inside objects aren't shown #1174

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
matt-aitken opened this issue Jun 21, 2024 · 1 comment · May be fixed by #1850
Open

[TRI-2755] v3 run log outputs with empty array inside objects aren't shown #1174

matt-aitken opened this issue Jun 21, 2024 · 1 comment · May be fixed by #1850
Labels
v3 Only impacts version 3 projects

Comments

@matt-aitken
Copy link
Member

matt-aitken commented Jun 21, 2024

This task:

export const myTask = task({
  id: 'some-id',
  run: async () => {
    return {
      hooks: [],
    };
});

Has the correct output:

{
  "hooks": [],
}

But in the log data/on the run page is shows just an empty object. This is a bug with the flattenAttributes/unflattenAttributes code we use with our OpenTelemetry pipeline.

TRI-2755

@matt-aitken matt-aitken added the v3 Only impacts version 3 projects label Jun 21, 2024
@matt-aitken matt-aitken changed the title v3 run log outputs with empty array inside objects aren't shown [TRI-2755] v3 run log outputs with empty array inside objects aren't shown Jun 21, 2024
@PaulBGD
Copy link

PaulBGD commented Mar 29, 2025

This is pretty annoying, is there a good fix for this? I've been having to JSON.stringify all my objects just so I can look at the arrays

edit: tried my hand at a fix, not sure I have enough context to fully understand all that uses the serialization

@PaulBGD PaulBGD linked a pull request Mar 29, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Only impacts version 3 projects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants