Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Internship at Mercari/Merpay

8a70cbe9a1cb32f9e2286dc1bcf0f3f7?s=47 mimimimizuki
December 01, 2021

Internship at Mercari/Merpay

8a70cbe9a1cb32f9e2286dc1bcf0f3f7?s=128

mimimimizuki

December 01, 2021
Tweet

Transcript

  1. @mizuki Partner Platform Backend Team Result presentation

  2. 2 Self-introduction @mizuki / backend Engineer • fullname:岡部瑞稀(Mizuki Okabe) •

    background:master degree in Kyoto university (computer science ) • team:Partner Platform backend (merpay-backend-9) • term:2021/08/16 ~ 2021/10/31 • My mentor : @r_yamaoka • My Manager : @shu(syokomiz)
  3. 3 My Goal Be able to investigate, solve unclear points

    of my task on my own
  4. 4 What I did in this Internship • Study Go,

    Spanner, etc • Development without Docker • Release task • Management tasks • Create Some API
  5. 8/16-
 
 closed shops are not appear in shopmap
 Study

    Go, Spanner, Kubernetes
 management task
 8/23-
 
 bank list returns already closed banks
 modify API task
 8/30-
 
 development in Partner service avoid using Docker
 without Docker
 5 8/18-
 
 What I did in this Internship disable email address 
 management task
 8/26-
 
 catch up of merpay tech stack 
 about Identical Partner Project 
 create some API
 9/8-
 
 ...??? 10/31
 

  6. 6 Background • Partner service used Docker for developing •

    Development with Docker became more complicated • We want to run the test without setting up the docker container • Partner service only dependent on authority service, so only we need fake-authority container now
  7. 7 Background • Partner service used Docker for developing •

    Development with Docker became more complicated • We want to run the test without setting up the docker container • Partner service only dependent on authority service, so only we need fake-authority container now
  8. 8 Without fake-authority • Use authority-sdk instead of ‘fake-authority’ container

    • Authority-sdk can issue FAKE PAT(Private Access Token) • The key pair generated (↑) must also be used on the grpc server • Put the keyID, public Key in environment variable • If grpc server starts and environment variable is not empty (that is ‘test mode’), use already generated key Test starts E2E_FAKE_AUTH_KEY_ ID
 hoge
 E2E_FAKE_AUTH_PRIV ATE_KEY
 
 E2E_FAKE_AUTH_PUB LIC_KEY
 
 GRPC server starts if environment variable exists, fetch it
  9. 9 Some trouble • The same test case sometimes passes

    and sometimes it doesn’t ( token is expired error occurred but token expires 1 day later..why ? 😭) • authority-sdk provides some similar functions, I didn’t find which ones is appropriate for this situation
  10. 10 Some trouble • The same test case sometimes passes

    and sometimes it doesn’t ( token is expired error occurred but token expires 1 day later..why ? 😭) • authority-sdk provides some similar functions, I didn’t find which ones is appropriate for this situation because I didn’t know that Go time duration ‘ type is nanosecond
  11. 11 Some trouble • The same test case sometimes passes

    and sometimes it doesn’t ( token is expired error occurred but token expires 1 day later..why ? 😭) • authority-sdk provides some similar functions, I didn’t find which ones is appropriate for this situation I issued new subjectID every time, but authority-sdk provides better function I used WithFakePAT, but this returns PAT without digital signature
  12. 12 Results 👍👍 🎉

  13. 13 more Read more code Actively discuss at review meetings

    Find out what’s working behind the tool
  14. Thank you for listening, and あと一ヶ月よろしくお願いします󰢜 14