Skip to content

Feat/meta data v2 #990

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 29 commits into from
Jun 4, 2024
Merged

Feat/meta data v2 #990

merged 29 commits into from
Jun 4, 2024

Conversation

ankitsmt211
Copy link
Member

@ankitsmt211 ankitsmt211 commented Dec 17, 2023

Adding more data from help threads to our already existing table, along with listener that updates changes done after thread creation.

  • Alter Help_Thread table
  • Update write operation to db with extra fields
  • Update ticket status and closedAt when thread archived/closed.

Additions:

  • update message count per thread
  • members participated per thread
  • routine that settles ticket status due to hiccup

Flow

  • Help thread is created and registered in DB
    • creation timestamp, applied tags, channel id, author id, ticket status etc is registered
  • on change of category, tag data is updated
  • on archiving
    • message count, participant count, closed timestamp, ticket status is updated
  • on thread revival and further archival
    • message count, participant count, closed timestamp is updated again.
  • if due to bot downtime, thread ticket status is marked open in db then a routine will change that for threads that are older than 3 days (assuming no thread should be alive post 3 days)

@ankitsmt211 ankitsmt211 marked this pull request as ready for review December 18, 2023 10:16
@ankitsmt211 ankitsmt211 requested review from a team as code owners December 18, 2023 10:16
@ankitsmt211 ankitsmt211 self-assigned this Dec 18, 2023
@ankitsmt211 ankitsmt211 added enhancement New feature or request priority: normal labels Dec 18, 2023
@marko-radosavljevic
Copy link
Contributor

Seems fine, doesn't really resolve #660 since we are not using or displaying this data. So probably a fresh issue should be created with how to move forward with interpreting and displaying this data in a meaningful and nice way, UI wise. ^^

@ankitsmt211
Copy link
Member Author

Seems fine, doesn't really resolve #660 since we are not using or displaying this data. So probably a fresh issue should be created with how to move forward with interpreting and displaying this data in a meaningful and nice way, UI wise. ^^

True, imma remove the referenced issue.

Copy link
Member

@Zabuzard Zabuzard left a comment

Choose a reason for hiding this comment

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

the code itself is fine, but the system has a crucial problem. it is not resilient at all. thread status will be incorrect in case of issues:

  • if an update message is missed bc of error, the thread remains "open" in the DB
  • if the bot is offline and turned on after a few days again, threads that have been closed remain "open" in the DB

there should be some sort of routine that checks threads that are marked open but are older than three days, just to make sure the metadata remains correct

@ankitsmt211
Copy link
Member Author

the code itself is fine, but the system has a crucial problem. it is not resilient at all. thread status will be incorrect in case of issues:

  • if an update message is missed bc of error, the thread remains "open" in the DB
  • if the bot is offline and turned on after a few days again, threads that have been closed remain "open" in the DB

there should be some sort of routine that checks threads that are marked open but are older than three days, just to make sure the metadata remains correct

should it also update other data? like message count/participants from already closed thread? or just status?

@ankitsmt211 ankitsmt211 closed this Jan 3, 2024
@ankitsmt211 ankitsmt211 reopened this Jan 3, 2024
* update constructor with HelpThreadLifecycleListener instance
* using HelpThreadLifecycleListener method to clean up left over threads
* increasing scope of handleArchiveStatus to package level
* adding logger to MarkHelpThreadCloseInDBRoutine class
@ankitsmt211 ankitsmt211 requested a review from Zabuzard January 24, 2024 18:41
* requested changes
* update config to include tagsToIgnore
* refactor tag update logic
* update sql script
* add tagsToIgnore list to config
@ankitsmt211
Copy link
Member Author

didnt we remove star imports, what's up with spotless being mad about it?

@ankitsmt211 ankitsmt211 requested a review from Taz03 May 17, 2024 18:52
@Taz03
Copy link
Member

Taz03 commented May 17, 2024

didnt we remove star imports, what's up with spotless being mad about it?

no, there's no config change.
Its not telling u to use star imports (that's out of the scope of spotless) its just reordering the imports

@ankitsmt211 ankitsmt211 added the config-changes if your PR contains any changes related to config file label May 18, 2024
@ankitsmt211
Copy link
Member Author

didnt we remove star imports, what's up with spotless being mad about it?

no, there's no config change. Its not telling u to use star imports (that's out of the scope of spotless) its just reordering the imports

the problem is it's asking me to run spotless, if i do that it just turns it into a star import.

* adding data fields that are being collected in privacy policy
* updating duration of data storage in privacy policy doc
* HelpThreadMetadataPurger will now purge help threads data post 180 days
* instead of appending new tags, only new tags are stored now
Copy link

sonarqubecloud bot commented Jun 2, 2024

@ankitsmt211 ankitsmt211 removed the config-changes if your PR contains any changes related to config file label Jun 2, 2024
@ankitsmt211 ankitsmt211 merged commit 7bc47d6 into develop Jun 4, 2024
10 checks passed
@ankitsmt211 ankitsmt211 deleted the feat/meta-data-v2 branch June 4, 2024 18:01
@ankitsmt211 ankitsmt211 mentioned this pull request Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: normal
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants