0:12 AM
MRiddickW joined the channel
2021-12-06 34027, 2021
3:19 AM
MRiddickW has quit
2021-12-06 34029, 2021
5:26 AM
BenOckmore has quit
2021-12-06 34029, 2021
5:26 AM
BrainzGit has quit
2021-12-06 34030, 2021
5:26 AM
Leftmost has quit
2021-12-06 34030, 2021
5:26 AM
agatzk has quit
2021-12-06 34032, 2021
5:26 AM
kuno has quit
2021-12-06 34032, 2021
5:26 AM
Freso has quit
2021-12-06 34011, 2021
5:27 AM
BenOckmore joined the channel
2021-12-06 34011, 2021
5:27 AM
BrainzGit joined the channel
2021-12-06 34011, 2021
5:27 AM
CatQuest joined the channel
2021-12-06 34011, 2021
5:27 AM
agatzk joined the channel
2021-12-06 34011, 2021
5:27 AM
Leftmost joined the channel
2021-12-06 34011, 2021
5:27 AM
kuno joined the channel
2021-12-06 34011, 2021
5:27 AM
Freso joined the channel
2021-12-06 34033, 2021
5:37 AM
dgw has quit
2021-12-06 34054, 2021
5:37 AM
dgw joined the channel
2021-12-06 34028, 2021
5:50 AM
KassOtsimine has quit
2021-12-06 34033, 2021
5:51 AM
KassOtsimine joined the channel
2021-12-06 34005, 2021
8:28 AM
Shubh joined the channel
2021-12-06 34010, 2021
10:01 AM
Shubh
Hey monkey !
2021-12-06 34030, 2021
10:05 AM
monkey
Hi Shubh
2021-12-06 34026, 2021
10:06 AM
monkey
Saw your message about debugging with vscode. Any luck with that?
2021-12-06 34027, 2021
10:08 AM
Shubh
Nah , i ran that launch script given for for debugging in readme but that stupid error related to some import utils keep popping up
2021-12-06 34012, 2021
10:09 AM
Shubh
btw i realized what was causing the website/container to crash !
2021-12-06 34051, 2021
10:09 AM
Shubh
BB-635
2021-12-06 34051, 2021
10:09 AM
BrainzBot
2021-12-06 34007, 2021
10:10 AM
monkey
Ah nice!
2021-12-06 34038, 2021
10:10 AM
monkey
What's the culprit ?
2021-12-06 34053, 2021
10:10 AM
Shubh
i don't know if it cause the production build to go down as well but still i think its important to be fix !
2021-12-06 34011, 2021
10:11 AM
Shubh
ah culprit was that god damn deleted enitty !
2021-12-06 34005, 2021
10:12 AM
monkey
Right, the crash was caused by deleting an already deleted entity. But what is the root cause?
2021-12-06 34013, 2021
10:13 AM
Shubh
handleDelete got that deleted entity it tries to delete all the relation of that enitty without any try error
2021-12-06 34027, 2021
10:14 AM
monkey
Ah I see.
2021-12-06 34029, 2021
10:14 AM
Shubh
i made a PR where i check its dataId
2021-12-06 34051, 2021
10:14 AM
monkey
Thank you!
2021-12-06 34030, 2021
10:15 AM
Shubh
will it cause production build to go down if same error occurs?
2021-12-06 34035, 2021
10:15 AM
monkey
It's abannk holiday here but I should have a bit of time today to look that and the vscode debugging
2021-12-06 34051, 2021
10:15 AM
monkey
Yes, it crashes the website too
2021-12-06 34005, 2021
10:16 AM
monkey
(But it comes back up automatically)
2021-12-06 34031, 2021
10:16 AM
Shubh
Ahh thats a relief
2021-12-06 34045, 2021
10:16 AM
monkey
But with your PR disallowinh deleting an already deleted entity, that shouldn't happen anymore
2021-12-06 34014, 2021
10:17 AM
monkey
And once both fixes are merged I'll deploy a new version of the website
2021-12-06 34037, 2021
10:19 AM
Shubh
are you able to debug BB in vscode?
2021-12-06 34009, 2021
10:20 AM
monkey
Will try today
2021-12-06 34018, 2021
10:20 AM
monkey
Haven't used it in a while
2021-12-06 34044, 2021
10:26 AM
Shubh
console logs sometimes don't make it into console! , have to rebuild the whole thing :'
2021-12-06 34027, 2021
11:56 AM
Shubh has quit
2021-12-06 34020, 2021
13:51 PM
Shubh joined the channel
2021-12-06 34012, 2021
13:52 PM
Shubh
Hey monkey !
2021-12-06 34050, 2021
13:54 PM
monkey
👋
2021-12-06 34038, 2021
14:11 PM
Shubh
what would the right way to access data from database like details about some entity
2021-12-06 34048, 2021
14:12 PM
monkey
I would recommend installing this open-source database tool: DBeaver
2021-12-06 34011, 2021
14:13 PM
monkey
It's honestly the best tool I've used to access database data, schema diagrams, etc.
2021-12-06 34020, 2021
14:13 PM
Shubh
ahh in BB-site
2021-12-06 34036, 2021
14:13 PM
monkey
2021-12-06 34002, 2021
14:25 PM
Shubh
monkey i mean in BB-site using orm ..
2021-12-06 34027, 2021
14:25 PM
monkey
Sorry, I don't understand the question
2021-12-06 34022, 2021
14:26 PM
Shubh
I need to fetch information regarding entities ..
2021-12-06 34033, 2021
14:26 PM
monkey
2021-12-06 34049, 2021
14:26 PM
vishal5251
Hi
2021-12-06 34011, 2021
14:27 PM
monkey
Which is what we use to access the database in the website and API
2021-12-06 34023, 2021
14:27 PM
monkey
Hi vishal5251!
2021-12-06 34003, 2021
14:38 PM
vishal5251 joined the channel
2021-12-06 34035, 2021
14:38 PM
vishal5251
Hi Everyone!
2021-12-06 34046, 2021
14:38 PM
monkey
Hi vishal5251 !
2021-12-06 34004, 2021
14:41 PM
vishal5251
2021-12-06 34013, 2021
14:41 PM
vishal5251
hey monkey, my postgres is running in docker
2021-12-06 34034, 2021
14:42 PM
vishal5251
2021-12-06 34000, 2021
14:43 PM
monkey
vishal5251: That all looks right
2021-12-06 34006, 2021
14:45 PM
monkey
You might have to stop and restart bookbrainz-site for the configuration changes to take effect
2021-12-06 34007, 2021
14:45 PM
vishal5251
2021-12-06 34024, 2021
14:45 PM
monkey
Ah, well that's a step forward. Connection to database is working
2021-12-06 34050, 2021
14:45 PM
monkey
2021-12-06 34028, 2021
14:50 PM
vishal5251
while I was setting up, npm install shows error. So I deleted some scripts from package-json just to see that how this project gonna look.
2021-12-06 34052, 2021
14:52 PM
monkey
We've made a few changes last week regarding NPM install, so I would recommend to checkout the latest commit from the master repository, and try rebuilding the docker image (`docker-compose build bookbrainz-site`)
2021-12-06 34010, 2021
14:53 PM
monkey
If you still run into an issue we can try to figure it out together
2021-12-06 34015, 2021
14:55 PM
MRiddickW joined the channel
2021-12-06 34038, 2021
15:18 PM
Shubh
Hey monkey ..
2021-12-06 34055, 2021
15:18 PM
monkey
Yo
2021-12-06 34014, 2021
15:20 PM
Shubh
relationshipTypeId
2021-12-06 34042, 2021
15:20 PM
Shubh
it is unique for all relation, i assume?
2021-12-06 34011, 2021
15:21 PM
monkey
I need some context :)
2021-12-06 34022, 2021
15:22 PM
monkey
But at a glance, relationshipType refers to one of the possible types of relationships (i.e. "author wrote work", etc;) rather than each relationship (i.e. "J.K. Rowling wrote Harry Potter")
2021-12-06 34052, 2021
15:23 PM
Shubh
Hmm so i need to get some data about entity so i was looking at code which fetches data using orm so i got this
2021-12-06 34019, 2021
15:24 PM
Shubh
2021-12-06 34013, 2021
15:25 PM
Shubh
why relationTypeId hardcoded like this isn't page suppose to show all relation an entity has ?
2021-12-06 34022, 2021
15:25 PM
monkey
This code is front-end code, so not related to fetching the data.
2021-12-06 34006, 2021
15:26 PM
monkey
This hardcode type gets extracted ffrom other relationships in order to be shown in a separate table, let me make a screenshot for you
2021-12-06 34020, 2021
15:26 PM
vishal5251 has quit
2021-12-06 34003, 2021
15:27 PM
monkey
2021-12-06 34020, 2021
15:27 PM
monkey
You will see a table of "Works" and below it "Relationships"
2021-12-06 34044, 2021
15:27 PM
Shubh
Yes so that means..
2021-12-06 34016, 2021
15:28 PM
monkey
All of these are relationships. The code you linked to extracts relationships of a certain type (edition contains work) to show them in that Works table
2021-12-06 34008, 2021
15:29 PM
monkey
But if you're looking for how to get data from the database you're looking in the wrong spot. I fyou describe what you're trying to resolve I can point you to a more relevant piece of code
2021-12-06 34036, 2021
15:29 PM
Shubh
wait isn't that code for showing relations in Relationships tab?
2021-12-06 34038, 2021
15:29 PM
monkey
2021-12-06 34010, 2021
15:30 PM
monkey
No this is the WorkDisplayPage
2021-12-06 34054, 2021
15:30 PM
monkey
2021-12-06 34043, 2021
15:31 PM
monkey
2021-12-06 34021, 2021
15:32 PM
Shubh
from where EntityRelationships component get its data i mean relations
2021-12-06 34042, 2021
15:32 PM
monkey
So for that we need to look at the server code (rather than the client code)
2021-12-06 34048, 2021
15:32 PM
Shubh
isn't it that specific line of code that fetches them?
2021-12-06 34019, 2021
15:33 PM
monkey
2021-12-06 34038, 2021
15:33 PM
monkey
N, again you're looking at front-end code which doesn't fetch anything.
2021-12-06 34031, 2021
15:34 PM
monkey
You want to be looking at files in src/server, not in src/client
2021-12-06 34009, 2021
15:35 PM
Shubh
but but that workPage
2021-12-06 34017, 2021
15:36 PM
Shubh
let start again , how workpage (work/:bbid) load its data?
2021-12-06 34026, 2021
15:37 PM
monkey
2021-12-06 34059, 2021
15:37 PM
monkey
2021-12-06 34015, 2021
15:38 PM
monkey
And after that you see that middleware.loadEntityRelationships is called
2021-12-06 34027, 2021
15:38 PM
monkey
That's where we load relationships from the database
2021-12-06 34004, 2021
15:39 PM
monkey
And then all that is sent to the react components in entityRoutes.displayEntity
2021-12-06 34031, 2021
15:40 PM
Shubh
so that middleware responsible for loading relationships data in req.entity object?
2021-12-06 34038, 2021
15:40 PM
monkey
Correct
2021-12-06 34002, 2021
15:41 PM
monkey
2021-12-06 34055, 2021
15:41 PM
monkey
2021-12-06 34047, 2021
15:43 PM
Shubh
so to get data about relationships of an entity i have to add that middleware , correct?
2021-12-06 34048, 2021
15:43 PM
monkey
>so that middleware responsible for loading relationships data in req.entity object?
2021-12-06 34048, 2021
15:43 PM
monkey
actually they are loaded in `res.locals.entity` which is what is used
2021-12-06 34000, 2021
15:44 PM
monkey
Well, I guess it depends where.
2021-12-06 34009, 2021
15:44 PM
monkey
If you explained the issue you're trying to solve it would help
2021-12-06 34011, 2021
15:45 PM
monkey
Depending on what you're trying to modify, it's possible that the relationships are already loaded
2021-12-06 34039, 2021
15:45 PM
monkey
In which case the solution will be to figure out how to access them
2021-12-06 34016, 2021
15:47 PM
Shubh
is there way to access to them in client side like without getting that entity object with relations ..
2021-12-06 34058, 2021
15:48 PM
monkey
I still don't understand what you're trying to do. Which route are you modifying that doesn't have the entity and its relationships loaded already?
2021-12-06 34007, 2021
15:49 PM
monkey
Or which page I should say
2021-12-06 34036, 2021
15:52 PM
Shubh
I want to access the relationships data of an entity on /create entity page..
2021-12-06 34055, 2021
15:53 PM
vishal5251 joined the channel
2021-12-06 34058, 2021
15:53 PM
monkey
So for an entity that is being created (i.e that doesn't exist yet in the database), the relationships data is contained in the Redux state
2021-12-06 34036, 2021
15:54 PM
monkey
Including whatever data we fetch when adding a new relationship using the search dropdown
2021-12-06 34059, 2021
15:54 PM
Shubh
data of an entity *which already exist in database
2021-12-06 34006, 2021
15:59 PM
vishal5251
2021-12-06 34002, 2021
16:00 PM
monkey
2021-12-06 34013, 2021
16:00 PM
vishal5251
hey monkey, see there comes an error while installing packages.
2021-12-06 34003, 2021
16:01 PM
Shubh
vishal5251 it might help if you paste whole error log in pastebin
2021-12-06 34015, 2021
16:01 PM
monkey
Shubh: But we don't have access too all the entity's data here
2021-12-06 34057, 2021
16:03 PM
monkey
vishal5251: That's odd. You're running on Docker for Windows, is that correct?
2021-12-06 34030, 2021
16:04 PM
vishal5251
yeah
2021-12-06 34002, 2021
16:09 PM
monkey
vishal5251: I'll try to dig into the issue. I suspect this is a windows-only issue, which I won't be able to reproduce.
2021-12-06 34017, 2021
16:09 PM
monkey
The sort of thing that shouldn't happen with Docker, but…
2021-12-06 34003, 2021
16:10 PM
monkey
In the meantime if it help I think your instinctwas correct and you can remove the "postinstall" script in package.json
2021-12-06 34020, 2021
16:10 PM
monkey
2021-12-06 34039, 2021
16:10 PM
monkey
See if that allows you to build the image correctly
2021-12-06 34023, 2021
16:11 PM
monkey
As Shubh suggested, more debug logs could come in handy, which you can send as a pastebin for example
2021-12-06 34037, 2021
16:11 PM
monkey
2021-12-06 34032, 2021
16:12 PM
vishal5251
after removing that thing, it builds but I'll lost the connection with database
2021-12-06 34007, 2021
16:13 PM
monkey
Those two issues seem unrelated
2021-12-06 34005, 2021
16:14 PM
Shubh
2021-12-06 34013, 2021
16:14 PM
monkey
Please try building again with the script removed, and with the correct configuration you sent earlier