ubiquibot / plugins-wishlist

0 stars 1 forks source link

Comment metadata command #12

Open gentlementlegen opened 1 month ago

gentlementlegen commented 1 month ago

The bot comment metadata system is very useful for error logs, but sometimes the error logs dont show enough information and this should be fixed.

See source code

gentlementlegen commented 1 month ago

@0x4007 Was thinking maybe there might be a little more user friendly approach to this.

What if instead of pushing this in the metadata, we just output the error message with a collapsible stack trace / metadata beneath it? Because either way the metadata is readable by everyone afaik, but is just a plain string within the HTML. If we instead do it inside the Issue comment, we could benefit from formatting, copy paste etc.

Second concern was security, What if by accident we output sensitive data? So I thought we could instead just put a link to the record in the database since we push logs there. Problem is not everyone has access to it so not everyone could see the output, which is not ideal.

Third I think this might be better located in the Kernel since it knows which plugin invocation has succeeded or fail and could even aggregate them.

0x4007 commented 2 weeks ago

Because either way the metadata is readable by everyone afaik

No only collaborators. Metadata can have sensitive information.

we could benefit from formatting, copy paste etc

The idea for metadata was that it is intended to be easily parsable by diagnostics tools.

To be honest, the original inspiration was due to us not wanting to rely on a database. As our system needs became more complex it seemed to be unavoidable. However storing all the data we need on GitHub and its comments makes our infrastructure significantly leaner and easier to maintain.

gentlementlegen commented 2 weeks ago

@0x4007 All right makes sense. I think a nice to have would be to add the url related to the Action Run or Supabase logs if any, to avoid looking for the related run. Will look into it.

0x4007 commented 2 weeks ago

add the url related to the Action Run

Agreed but it wasn't super easy to implement as far as I remember.