Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
runn is a package/tool for running operations f...
Search
Ken’ichiro Oyama
May 19, 2022
Technology
1.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
runn is a package/tool for running operations following a scenario. / golang.tokyo #32
https://golangtokyo.connpass.com/event/246982/
Ken’ichiro Oyama
May 19, 2022
More Decks by Ken’ichiro Oyama
See All by Ken’ichiro Oyama
Introducing RFC9111 / YAPC::Fukuoka 2025
k1low
2
5.5k
Design and implementation of "Markdown to Google Slides" / phpconfuk 2025
k1low
1
940
analysis パッケージの仕組みの上でMulti linter with configを実現する / Go Conference 2025
k1low
1
770
Flight recorder at the application layer (NOT the FlightRecoder newly added at Go 1.25) / Fukuoka.go #22
k1low
0
160
ソフトウェア開発におけるインターフェイスという考え方 / PHPerKaigi 2025
k1low
12
6.3k
Parsing HCL/CUE / Fukuoka.go #21
k1low
0
11k
実践 net/http Middleware パターン / Kizuku.go Vol.1
k1low
2
450
Cleanup handling in Go / Go Conference 2024
k1low
7
4.1k
CI/CDがあたりまえの今の時代にAPIテスティングツールに求められていること / CI/CD Test Night #7
k1low
18
12k
Other Decks in Technology
See All in Technology
AIはどのように 組織のアジリティを変えるのか?
junki
3
790
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
1k
NAB Show 2026 動画技術関連レポート / NAB Show 2026 Report
cyberagentdevelopers
PRO
0
200
手塩にかけりゃいいってもんじゃない
ming_ayami
0
570
AIネイティブな開発のサプライチェーンリスク対策 〜激動の開発現場でリスクに立ち向かう〜【ZennFes】
cscengineer
PRO
2
120
SONiC Scale-Up Working Group から探る Scale-UpやUltraEthernet機能の実装方法
ebiken
PRO
2
330
プロダクト開発から業務改善コンサルまで。事業全体へ「染み出す」ことで広がるエンジニアの可能性
ham0215
0
130
FDE という解 ― 暗黙知と明示知をつなぐ、伴走型エンジニアリング ―
otanet
0
160
失敗を経て、Harness Engineering で 大切にしたいことを考える / Learning from Failure: What Matters in Harness Engineering
bitkey
PRO
1
370
2026TECHFRESH畢業分享會 - AI 時代的人生存檔點
line_developers_tw
PRO
0
1k
LayerXにおけるセキュリティ管理の現在地と次の一手
tosho
0
180
人材育成分科会.pdf
_awache
4
250
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
The Invisible Side of Design
smashingmag
302
52k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
300
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
GitHub's CSS Performance
jonrohan
1033
470k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Prompt Engineering for Job Search
mfonobong
0
340
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
180
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Transcript
runn is a package/tool for running operations following a scenario.
খࢁ݈Ұ / GMO PEPABO inc. 2022.5.19 golang.tokyo #32 1
2
• GoͰAPIαʔόΛ։ൃ͍ͯ͠Δ • ୯ҰͷAPIΤϯυϙΠϯτͷςετͰͳͯ͘ෳͷAPIΤϯυϙΠϯτΛ·͍ͨͩ ςετΛॻ͖͍ͨ • ྫ: ϝʔϧೝূΛؚΜͩαΠϯΞοϓ • ྫ:
γϣοϐϯάΧʔτʢબ͔Βߪೖྃ·Ͱʣ • APIΤϯυϙΠϯτͰσʔλϕʔεૢ࡞͕͋ΔͷͰ͋ΕςετσʔλϕʔεΛ༻ҙ ࣮ͯ͠ࡍʹಡΈॻ͖ൃੜ͢ΔςετΛॻ͖͍ͨ 3 https://github.com/k1LoW/runn ։ൃͷϞνϕʔγϣϯ
• runn ( means "Run N" ) is a package/tool
for running operations following a scenario. • γφϦΦΛYAMLʹॻ͍ͯͦΕΛͬͨςετΛ࣮ߦͰ͖Δύοέʔδ/πʔϧ • ࣮ͷ͋ΔΑ͘ΒΕ͍ͯΔπʔϧͱͯ͠ https://github.com/zoncoen/scenarigo ͕͋Δ • ಛͱͯ͠ҎԼͷ௨Γ • γφϦΦ࣮ߦͷCLIίϚϯυʢπʔϧʣͱͯ͠༻Ͱ͖Δ • GoͷTest Helperʢύοέʔδʣͱͯ͠༻Ͱ͖Δ • γφϦΦϑΝΠϧͷϑΥʔϚοτ͕OpenAPI SpecϥΠΫ • γφϦΦͷεςοϓؒͷͷ࿈ܞ͕ߟྀ͞Ε͍ͯΔ 4 https://github.com/k1LoW/runn runn
• runn࠷ऴతʹ1ͭҎ্ͷγφϦΦΛ࣮ߦͯ͠ɺͦΕͧΕͷޭ/ࣦഊΛΈΔ • γφϦΦ1ͭҎ্ͷεςοϓ͔Βߏ͞Ε͍ͯΔ • 1γφϦΦ1YAMLϑΝΠϧʹͳ͍ͬͯΔʢRunbookͱݺΜͰ͍Δʣ • γφϦΦ͝ͱʹRunnerͱݺΜͰ͍Δεςοϓ࣮ߦίϯϙʔωϯτΛఆٛ͠ɺͦͷRunnerΛ֤ͬͯ εςοϓΛ࣮ߦ͍ͯ͘͠ •
RunnerʹγφϦΦʹఆ͕ٛඞཁͳ௨ৗͷRunnerͱɺطʹrunnͰ༻ҙ͍ͯ͠ΔBuilt-in runnerͷ2 छྨ͕͋Δ • Runner: HTTP Runner, DB Runner • Built-in runner: Exec runner, Test runner, Dump runner, Include runner, Bind runner 5 https://github.com/k1LoW/runn ΞʔΩςΫνϟ
6 γφϦΦʢRunbookʣΛॻ͘
7 https://github.com/k1LoW/runn
8 https://github.com/k1LoW/runn
9 https://github.com/k1LoW/runn
10 https://github.com/k1LoW/runn
11 https://github.com/k1LoW/runn
12 https://github.com/k1LoW/runn
13 https://github.com/k1LoW/runn
14 https://github.com/k1LoW/runn
15 https://github.com/k1LoW/runn
• runnTest helperͱͯ͠༻͢Δͱ͖ɺγφϦΦʹఆٛͯ͠ΔRunnerΛࠩ͠ସ͑Δ͜ͱ͕Ͱ͖Δ • HTTP RunnerͷϦΫΤετઌΛ httptest.Server ͷURLʹͨ͠Γ • http.HandlerΛͯ͠
http.Handler ʹϦΫΤετΛ͢Α͏ʹͨ͠Γ • DB RunnerͷΫΤϦ࣮ߦઌΛผͷςετσʔλϕʔεʹͨ͠Γ 16 https://github.com/k1LoW/runn Test helperͱͯ͠ͷརศੑΛ্ͤ͞Δ (1/2)
17 https://github.com/k1LoW/runn As a test helper using httptest.Server
18 https://github.com/k1LoW/runn As a test helper with http.Handler
• γφϦΦࣗମ͕ؒҧ͍ͬͯͳ͍Α͏ʹ͢Δͱͯ͠HTTP Runnerͷ߹ɺεΩʔϚʹԊͬͨόϦ σʔγϣϯΛಉ࣌ʹΒͤΔΈΛఏڙ͍ͯ͠Δʢݱࡏ OpenAPI Spec v3ͷΈରԠʣ • ʮͦͦͦͷγφϦΦͷϦΫΤετ͕ؒҧ͍ͬͯΔʯΛ͙ •
͍ͭͰʹʮϨεϙϯε͕ؒҧ͍ͬͯΔʯݟ͚ͭΔ 19 https://github.com/k1LoW/runn Test helperͱͯ͠ͷརศੑΛ্ͤ͞Δ (2/2)
͓ΘΓʹ 20
• ·͍ͩ࢝Ί͔ͨΓ͕ͩɺݸਓతʹେ͖Ίͷςετ͕ΧδϡΞϧʹॻ͖͘͢ ͳͬͨͱײ͍ͯ͡Δ • σʔλϕʔεͷΛ༻ͨ͠ςετ͕ॻ͚Δͷ͕Τά͍͕ศར • ࠓճհ͍ͯ͠ͳ͍Include runnerBind runnerͳͲʹڵຯ͕͋Δํ README
Λ ͝ཡ͍ͩ͘͞ • ࠓޙͷలͱͯ͠ɺgRPCରԠΛͯ͠Έ͍ͨ 21 https://github.com/k1LoW/runn ͓ΘΓʹ
ࣗݾհ ٕज़෦ɹٕज़ج൫νʔϜ 2018 த్ೖࣾ খࢁ ݈Ұ Ken’ichiro Oyama গ࣮͠༻తͰখ͞ͳOSSΛॻ͘ͷ͕झຯɻ •
GitHub : k1LoW • Twitter : @k1LoW 22 We are hiring!! @pb_recruit
Thank You! Thank You! 23
24 ͓·͚
• github.com/k1LoW/duration • “3 days 4 hours” Έ͍ͨͳจࣈྻ͔Β time.Duration Λੜ͢Δ
• github.com/k1LoW/expand • YAMLϑΝΠϧʹҰׅͰ os.ExpandEnv Λద༻ͨ͠Γ͢Δͷʹ༻͍ͯ͠Δ 25 ͓·͚ runnͷgo.modʹ͍ΔΦϨΦϨϥΠϒϥϦ2બ