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

[issue] use network action order API can't get information #2111

Closed
sync-by-unito bot opened this issue Sep 27, 2022 · 17 comments
Closed

[issue] use network action order API can't get information #2111

sync-by-unito bot opened this issue Sep 27, 2022 · 17 comments
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Sep 27, 2022

when i follow the github wiki Capture Network Action to do , i get the "Failed to get order info" response which is not the same as what is shown on the wiki

curl --location --request GET 'https://lambda.numbersprotocol.io/order/Network-Action-Order?order_id=3540b705-2576-4474-8fd2-7251297fb938' \
--header 'x-api-key: xMLFP6QDxt2i1CvokqYy98LlSzy2kfbr8Y7Bii1b'

order id : 3540b705-2576-4474-8fd2-7251297fb938
x-api-key:xMLFP6QDxt2i1CvokqYy98LlSzy2kfbr8Y7Bii1b

user story :
as user , i want to use the api i can get the order information

┆Issue is synchronized with this Asana task by Unito
┆Created By: Scott Yan

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Sherry Chung commented:

Scott Yan 這個指令我記得 QA 測過,會是什麼時效性所以 order id 失效

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Scott Yan commented:

Sherry Chung 測過但應該是有段時間了~~ order id 在 backend 還是存在的 但用這一個 api 就是查不到 , 我有確認過當初沒有提過 "時效問題" 所以不應該有時間限制

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Tammy Yang commented:

這個 API 超莫名的 XDDD,說老實話我看不懂這想幹嘛 (our fault)

network action order 有兩種

  1. storage backend order
  2. network action order

其中,#1 可以透過 storage backend API 取得,#2 應該要透過 "network action backend workflow API" 來實作,繞一圈去 AWS lambda 什麼道理 XD

Scott Yan 請你協助走一遍 0xAvenue RD 的流程,我要知道

  1. 這到底在幹嘛,是 Bump @capacitor/cli from 2.2.1 to 2.3.0 #1 or Bump protractor from 5.4.4 to 7.0.0 #2
  2. 如果是 Bump protractor from 5.4.4 to 7.0.0 #2,有沒有既有的 network action backend workflow API 可以達成? (如果沒有,我們也可以開 network action Bubble App 的 Data API)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Scott Yan commented:

Tammy YangSherry Chung
這邊查詢過往的紀錄後
流程 :
capture app ( network action ) → send order id to 0xAvenue ( url ) → 0xAvenue RD use order id get nid & wallet address
依據流程需要的是 #2 的內容資訊

這邊實際比對 lamdba 的 api 資訊結果

  1. 跟 bubble 端顯示的 network action order 紀錄內容一致如下圖

https://numbers-upvote.bubbleapps.io/version-qa-release/api/1.1/obj/Order?sort_field=Created Date&descending=true ( https://numbers-upvote.bubbleapps.io/version-qa-release/api/1.1/obj/Order?sort_field=Created Date&descending=true )
2. 看起來是有安全疑慮所以當初沒有直接用 bubble db資料查詢方式 https://dt42-numbers.slack.com/archives/C3CHPJTS4/p1653554640174819 ( https://dt42-numbers.slack.com/archives/C3CHPJTS4/p1653554640174819 ) 而使用 lamdba 的方式提供 order id 查詢

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Tammy Yang commented:

Scott Yan 感謝,good job 非常清晰

目前我沒有覺得 Order db 需要 API key 保護

Network action 是一種 ecosystem app,每一個 order 代表了 "這張圖片/這個 asset 被使用在哪個服務上" ,也就是說,這些 order 其實應該對應 nit commit

最終的型態這些 order 都應該記錄在鏈上,也是完全公開的,除非有 personal information or sensitive server information (目前看不出來有)

因此,我的建議是直接換成 Bubble data API 去 access 即可,不過 domain 要換成 "network-app.numbersprotocol.io" (需開卡給 Bafu)

Bofu Chen 針對以上「安全性」討論 ^ ,請你 review & 提供意見 (if any)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Scott Yan commented:

Tammy Yang 所以目前的方案會是提供對方 Bubble data API 去 access 如下面連結的方式做查詢對嗎 ?
只是會需要更換 domain 從 " numbers-upvote.bubble.io ( https://numbers-upvote.bubble.io ) " to "network-app.numbersprotocol.io"
ex : https://numbers-upvote.bubbleapps.io/api/1.1/obj/Order/?constraints=[{"key ( https://numbers-upvote.bubbleapps.io/api/1.1/obj/Order/?constraints=[{"key )": "order_id", "constraint_type": "text contains", "value": "${order_id}"}]

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 27, 2022

➤ Tammy Yang commented:

Yes 大方向是這樣

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Sep 28, 2022

➤ Scott Yan commented:

已開 asana task [issue] network action change the domain ( https://app.asana.com/0/1201016280880500/1203045412906857/f )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Tammy Yang commented:

Scott Yan the due and the sprint schedule does not match. Please consult BD owner Sherry Chung

Whenever there is a new issue, please must schedule it into a sprint

  1. If it is urgent => current sprint
  2. If it is not urgent but must => next sprint
  3. If it is not urgent, maybe also not must at the mean time, but affect growth BD/MKT => sprint backlog => meaning this will be done in the sprint after next sprint
  4. If it is really not urgent and not affecting anyone at the moment => put it into product backlog => meaning we don't know precisely when this will be done, but it is scheduled in "a future" sprint.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Tammy Yang commented:

Since you put it in the sprint backlog, I will assume it is #3 (due updated)

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Sherry Chung commented:

Scott Yan I would say it’d be #2. This will affect all network action partners.
We can discuss next week and you can provide your thought from PM’s view.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 7, 2022

➤ Sherry Chung commented:

Once ✓ Find the app occupying network-app.numbersprotocol.io ( https://app.asana.com/0/1201016280880500/1203045412906857/f )& [FR] Update "Capture Network Action" github wiki ( https://app.asana.com/0/1201016280880500/1203055553114683/f ) done, this can be confirmed

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sherry Chung commented:

Scott Yan 我追一下這個。之前卡住的 task ✓ Find the app occupying network-app.numbersprotocol.io ( https://app.asana.com/0/1202542555533331/1203045412906857 ) 已經完成了。後續的 task 什麼時候可以重新安排進 sprint 裡?

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Nov 28, 2022

➤ Sherry Chung commented:

我看到了,已經安排到 22.11.21 我把相關的 task 都移動到 sprint 中

@sync-by-unito sync-by-unito bot closed this as completed Dec 19, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Dec 19, 2022

➤ Scott Yan commented:

qa check it's work use the bubble endpoint
https://network-app.numbersprotocol.io/api/1.1/obj/Order?constraints=[{"key ( https://network-app.numbersprotocol.io/api/1.1/obj/Order?constraints=[{"key )": "order_id", "constraint_type": "text contains", "value": "${order_id}"}]

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Dec 19, 2022

➤ Tammy Yang commented:

Scott Yan thank you!

Sherry Chung this was because the old design using Lambda was not ideal (not part of network-action and even not part of numbers-api) which increases the complexity of development and maintenance. I have updated all documentation. In the future, all API should be in the numbers-api (start with node.numbersprotocol.io ( https://node.numbersprotocol.io )) or RapidAPI. If QA founds any inconsistency, please open issue and let me know. Thank you!

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Dec 19, 2022

➤ Sherry Chung commented:

👁️

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

No branches or pull requests

1 participant