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

chore: add a log on the parentId set null #6876

Merged
merged 9 commits into from
Nov 30, 2023

Conversation

marckong
Copy link
Contributor

@marckong marckong commented Nov 27, 2023

Let's measure how many users are impacted by this bug and experiencing the data linking issue.

  • adding a error creation upon parentId set null (this should not happen now)
  • adding error stack capturing by Sentry

Closes INS-3301

@marckong marckong requested a review from a team November 27, 2023 17:20
gatzjames
gatzjames previously approved these changes Nov 28, 2023
@marckong
Copy link
Contributor Author

marckong commented Nov 29, 2023

@gatzjames this was a tricky to find the root cause and fix. I currently added a temporary hack around in the database module that is used in both inso-cli and insomnia desktop client. In my opinion, this is not a great architectural choice made. Maybe I am missing out something here, but,

  • why is inso-cli relying on NeDB?
  • Why is it relying on a persistence?
  • Shouldn't the cli tool to be fire and forget if it was designed to be run in the CI/CD pipeline?

This CLI tool and the electron app are so coupled in the current state of the Insomnia. I think we should decouple this as soon as possible, ESPECIALLY, if Insomnia product wants to revamp the testing feature in my opinion.

@marckong
Copy link
Contributor Author

I added a HACK to bypass this. Please go ahead if you find a better fix on this.

@marckong
Copy link
Contributor Author

We are adding the sentry log to measure the data loss issue under the pressure, but ideally we should log the case happening here and fire them in batch outside of the database context.

@marckong marckong requested review from gatzjames and a team November 29, 2023 21:02
@gatzjames gatzjames merged commit fc7ccf3 into Kong:develop Nov 30, 2023
@jackkav
Copy link
Contributor

jackkav commented Dec 12, 2023

nedb is required by inso cli because running requests and tests requires reading context from the db, inso also allows you to point it at different db folders. we have yet to find a good high level solution to this, i would advise leaving some breadcrumbs for someone to undo your hack incase it blocks some upgrade or feature in the future

@marckong
Copy link
Contributor Author

marckong commented Dec 12, 2023

Not sure if there is more thing to give as breadcrumb. Future contributors should be able to learn the context in this PR description and threads with the INS ticket information as well. They can remove the following functions introduced by this PR: assertModelWithParentId(), registerCaptureException()

jackkav pushed a commit to jackkav/insomnia that referenced this pull request Mar 13, 2024
* chore: add a log on the parentId set null

* add more logs

* fix: capture exception instead

* fix: add a hack

* chore: add comments

* fix: ensure process error from sentry

* rename fn

* docs: add a comment

* fix: sentry exception catcher load

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
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.

3 participants