Skip to content
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

fix: returnDataToKernel #44

Open
wants to merge 14 commits into
base: development
Choose a base branch
from

Conversation

sshivaditya2019
Copy link
Collaborator

Resolves #43

  • Previous failed runs still retained data, and the corresponding comment/issues should be present in the database. As far as I know, this isn’t running on either the organization’s supabase instance or mine.
  • Fixed the returnDataToKernel, was missing GITHUB_TOKEN in compute.yml
  • QA Action Runs: Link
  • Good values for thresholds:
matchThreshold: 0.9
warningThreshold: 0.7
jobMatchingThreshold: 0.7

return contentWithoutFootnotes;
}

export function removeCautionMessages(content: string): string {
const cautionRegex = />[!CAUTION]\n> This issue may be a duplicate of the following issues:\n((> - \[[^\]]+\]\([^)]+\)\n)+)/g;
Copy link
Member

Choose a reason for hiding this comment

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

What are these checks? Seems like wrong approach to be doing this. I would expect you should be able to select the right data in the first place and process less comments with a better strategy, although I don't understand the full context of this process here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These checks are in place to avoid generating embeddings for comment or issue bodies that include footnotes or caution messages.

Copy link
Member

Choose a reason for hiding this comment

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

Just ignore every bot comment is my point

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but when the user updates an issue, it includes footnotes and a caution statement. Should these be propagated to the database as well? I think bot actions are ignored by the kernel.

}
if (data && data.length > 0) {
this.context.logger.info("Comment already exists");
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to just throw this, then it logs and halts function execution.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure I understand what you're suggesting. Are you asking if I should log a fatal error instead of throwing a new one to halt the function execution?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

You can just throw logger.fatal so you get the log displayed and the error caught on a higher level of execution.

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.

Actions are not working
4 participants