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

Failed to save permit #152

Closed
whilefoo opened this issue Oct 9, 2024 · 23 comments
Closed

Failed to save permit #152

whilefoo opened this issue Oct 9, 2024 · 23 comments

Comments

@whilefoo
Copy link
Member

whilefoo commented Oct 9, 2024

Failed to create a new location {
  code: '42501',
  details: null,
  hint: null,
  message: 'new row violates row-level security policy for table "locations"'
}
Failed to save permits to the database Error: Failed to retrieve the related location from issue [object Object]
    at PermitGenerationModule._getOrCreateIssueLocation (/home/runner/work/conversation-rewards/conversation-rewards/src/parser/permit-generation-module.ts:248:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PermitGenerationModule._savePermitsToDatabase (/home/runner/work/conversation-rewards/conversation-rewards/src/parser/permit-generation-module.ts:257:28)
    at PermitGenerationModule.transform (/home/runner/work/conversation-rewards/conversation-rewards/src/parser/permit-generation-module.ts:122:9)
    at Processor.run (/home/runner/work/conversation-rewards/conversation-rewards/src/parser/processor.ts:37:24)
    at run (/home/runner/work/conversation-rewards/conversation-rewards/src/run.ts:25:5)

https://github.com/ubiquity-os-marketplace/text-conversation-rewards/actions/runs/11165001249/job/31035657102#step:7:443

@0x4007
Copy link
Member

0x4007 commented Oct 10, 2024

Locations table is obsolete and was removed

@gentlementlegen
Copy link
Member

Locations table was still there to support the part where all the permits are fetched. We could eventually make it a plugin now that we can run actions quickly, that would periodically fetch all the data.

@imabutahersiddik
Copy link

/start

@imabutahersiddik

This comment has been minimized.

Copy link

Deadline Mon, Oct 28, 10:57 PM UTC
Beneficiary 0x7245F5Cb278ea948Ab6302Bd911db00Ad4889672

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@ishowvel
Copy link
Contributor

i hope this issues gets fixed asap, this issue has become a blocker for me to qa my pull requests

@gentlementlegen
Copy link
Member

@ishowvel What do you mean? This issue is not a blocker for a proper run of the plug-in it just outputs an error.

@ishowvel
Copy link
Contributor

@ishowvel What do you mean? This issue is not a blocker for a proper run of the plug-in it just outputs an error.

I fixed it after disabling rls for all tables 😔

@gentlementlegen
Copy link
Member

RLS doesn't matter if you use the service key.

@ishowvel
Copy link
Contributor

RLS doesn't matter if you use the service key.

Sorry it is my first time using databases in this detail, happy to learn along the way smile 😄

Copy link

Passed the deadline and no activity is detected, removing assignees: @imabutahersiddik.

@gentlementlegen
Copy link
Member

Error 42501 indeed means a problem while writing on the table according to postgres. It would mean that there is an RLS issue with the table, probably the key used not having enough privileges. It worked locally fine when I used the service key, maybe the environment value is wrong in this repo? I will check that.

@gentlementlegen
Copy link
Member

/start

Copy link

Deadline Sat, Nov 2, 8:13 AM UTC
Beneficiary 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@gentlementlegen
Copy link
Member

@whilefoo After updating the Supabase key, everything seems to work fine, the permits got saved to the db:
image

which corresponds to entries in
ubiquity-os-marketplace/daemon-pricing#32 (comment)

So believe this is resolved.

@whilefoo
Copy link
Member Author

whilefoo commented Nov 2, 2024

I guess we can make a new issue for removing location data because it's obsolete like @0x4007 stated

Copy link

Passed the deadline and no activity is detected, removing assignees: @gentlementlegen.

@gentlementlegen
Copy link
Member

@0x4007 I guess this can be closed, not sure if it should be done or not planned.

@0x4007
Copy link
Member

0x4007 commented Nov 3, 2024

Maybe link the correct pull that fixed this and if it's not double dipping rewards then it's valid.

@gentlementlegen
Copy link
Member

There was no pull fixing it, just investigated and updated the secrets which is why I ask.

Copy link

@gentlementlegen the deadline is at Sun, Nov 3, 6:42 AM UTC

@0x4007 0x4007 closed this as completed Nov 3, 2024
Copy link

A new workroom has been created for this task. Join chat

Copy link

ubiquity-os-beta bot commented Nov 3, 2024

 [ 30 WXDAI ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueTask130
IssueComment70
Conversation Incentives
CommentFormattingRelevanceReward
`Locations` table was still there to support the part wh…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 35
  wordValue: 0
  result: 0
0.80
@ishowvel What do you mean? This issue is not a blocker for a pr…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 24
  wordValue: 0
  result: 0
0.70
RLS doesn't matter if you use the service key.
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 10
  wordValue: 0
  result: 0
0.90
Error `42501` indeed means a problem while writing on th…
5
content:
  content:
    p:
      score: 0
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 56
  wordValue: 0
  result: 0
0.950
@whilefoo After updating the Supabase key, everything seems to w…
5
content:
  content:
    p:
      score: 0
      elementCount: 5
    img:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 40
  wordValue: 0
  result: 0
0.90
@0x4007 I guess this can be closed, not sure if it should be don…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 17
  wordValue: 0
  result: 0
0.60
There was no pull fixing it, just investigated and updated the s…
0
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 17
  wordValue: 0
  result: 0
0.850

 [ 1.184 WXDAI ] 

@0x4007
Contributions Overview
ViewContributionCountReward
IssueComment21.184
Conversation Incentives
CommentFormattingRelevanceReward
Locations table is obsolete and was removed
0.52
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 7
  wordValue: 0.1
  result: 0.52
0.80.416
Maybe link the correct pull that fixed this and if it's not doub…
1.28
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 20
  wordValue: 0.1
  result: 1.28
0.60.768

 [ 0.54075 WXDAI ] 

@ishowvel
Contributions Overview
ViewContributionCountReward
IssueComment30.54075
Conversation Incentives
CommentFormattingRelevanceReward
i hope this issues gets fixed asap, this issue has become a bloc…
1.28
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 20
  wordValue: 0.1
  result: 1.28
0.70.224
I fixed it after disabling rls for all tables 😔
0.65
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 9
  wordValue: 0.1
  result: 0.65
0.90.14375
Sorry it is my first time using databases in this detail, happy …
1.17
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 18
  wordValue: 0.1
  result: 1.17
0.60.173

 [ 4.367 WXDAI ] 

@whilefoo
Contributions Overview
ViewContributionCountReward
IssueSpecification13.33
IssueComment11.037
Conversation Incentives
CommentFormattingRelevanceReward
```Failed to create a new location {code: '425…
1.11
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 17
  wordValue: 0.1
  result: 1.11
13.33
I guess we can make a new issue for removing location data becau…
1.22
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 19
  wordValue: 0.1
  result: 1.22
0.851.037

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants