Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
はじめてのプルリク - BLEA 編
Search
watany
June 01, 2022
Programming
810
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
はじめてのプルリク - BLEA 編
JAWS-UG CDK支部 #1 〜初回拡大版〜での発表です。
https://jawsug-cdk.connpass.com/event/246765/
watany
June 01, 2022
More Decks by watany
See All by watany
Let me introduce my harness.
watany
2
21
OSS as a Hono User
watany
2
180
仕様駆動開発の消費期限
watany
20
10k
AIエージェントがあれば技術書なんてすぐ書けるでしょ→無理でした
watany
7
1.8k
穢れた技術選定について
watany
22
9k
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
470
The Tyranny of Not Measuring
watany
5
560
新しいVibe Codingと”自走”について
watany
7
640
Equip GitHub Copilot CLI
watany
3
1.6k
Other Decks in Programming
See All in Programming
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
Railsバージョンを4倍にした話
optim
0
450
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
JIS keyboard support in Omarchy
lef237
0
130
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
260
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.5k
contenteditable と日本語入力に向き合う
colorful12
0
200
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
440
Jetpack Compose Mechanisms
skydoves
3
820
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
230
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
The browser strikes back
jonoalderson
0
1.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Making Projects Easy
brettharned
120
6.8k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
830
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
Google's AI Overviews - The New Search
badams
0
1.6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Become a Pro
speakerdeck
PRO
31
6.3k
Transcript
JAWS-UG CDK 支部 #1 〜初回拡大版〜 はじめてのプルリク - BLEA 編 2022/06/01
watany 1
自己紹介 watany(渡邉 洋平) Twitter:@_watany 所属:NTT テクノクロス デジタルツイン事業部 APN アドバンスドコンサルティングパートナー 2022
APN ALL AWS Certifications Engineers 2
1. きっかけ 2. しくじりながらのプルリク 3. はじめての Contribute へ 3
CDK Confernece 楽しかったですね CDK Conference でも登壇しました ログミーさんで紹介いただき感謝! AWS Solutions Constructs
で システム作成は楽になるのか? 実装・設計・非機能設計から見 る、活用のメリット https://logmi.jp/tech/articles /326653 そんな中、CDK JAWS の開催が決定 勢いで LT に飛び込む 当初予定(Service Catalog)とは 異なる点、申し訳ございません 4
LT の準備中 (元々の)発表テーマの大枠は考えて、調 査・検証だ! そんな中 IAM Policy の面白そうな情報が 2021/4/1 AWSConfigRole
-> AWS_ConfigRole が推奨。 ※この Blog がわかりやすい AWSConfigRole は非推奨な ので、AWS_ConfigRole に変 更しましょう https://blog.serverworks.co.j p/AWS_ConfigRole 5
もしかして 登壇テーマに BLEA を絡める予定だった BLEA:AWS CDK で定義されるベースライン用テン プレート AWS SA
さん主導のプロジェクト ふと、該当しそうな base-standalone を覗いてみる usecases/base-standalone/lib/blea-config- stack.ts ”AWSConfigRole” のままだ! ここで思い出す CDK Conference の記憶 ”気になる記載を見つけたら…それがコントリビュート チャンス!” 注:勝手な解釈です。 6
気になるポイント BLEA はプルリクを受け付けてるのか。 ”BLEA は GitHub にオープンソースとして公開しています。” https://aws.amazon.com/jp/blogs/news/announcing-baseline-environment-on-aws/ CONTRIBUTING.md はある。
AWS JAPAN の SA 主導のプロダクト。大人だし空気読むべきか。。。 まあダメでも Reject されるだけだし。。 OSS の Contribute したことない。 CONTRIBUTING.md を読む感じ、そこまで難しくなさそう Git は普通に使ってるし、何とかなるだろう ※この慢心が後々問題になります 7
はじめよう、プルリク。 8
1. きっかけ 2. しくじりながらのプルリク 3. はじめての Contribute へ 9
CONTRIBUTING.md を読もう 読んで理解した内容(私訳) i. GitHub の右上のボタンから Fork ii. 必要なソースを変更 GitPod
も興味あるが今回は Cloud9 を開発環境に。 iii. ローカルでテストを確認 iv. コミットメッセージは明確に "fixed."とかで済まさない v. プルリクエスト。自動 CI がこけたら何と かする。 という訳で Let’s Try! 10
1 通らない Build 1. fork & clone 2. fix &
commit origin upstream local main main main commit 時になぜか落ちる???? 11
原因と対策 エラーメッセージを読むと git secrets の戻り値が空。 つまり awslabs/git-secrets を install しよう
おさらい:git-secrets commits, commit messages をスキャンして、git repo に残したくない Secrets の追加を防ぐツール 起動したて Cloud9 に導入漏れ BLEA の README_ja.md に書いてたよ! 右図は抜粋 振り返り: 「ほーん、テストして cdk synth 通ればいけるやろ」 日本語ドキュメントが整備されているので、きちんと読 む。 12
2.突然閉まるプルリク 1. レビュー待ち。ここも実はプルリク出せるのでは 2. Wow! さっき main ブランチで直してたじゃん。まずは切り戻して...... 3. 閉じる
Pull Request 13
どうして Main ブランチでプルリクし、該当リモートブランチの Commit を取り消したのが原因 fork 運用でブランチを切ったつもりになっていた Review 中に Close
しなくて良かった そもそもフローの理解が曖昧だったのも遠因。 GitHub 公式の標準の手順を見よう プロジェクトに貢献する https://docs.github.com/ja/get-started/quickstart/contributing-to-projects 14
3. どこの馬の骨か 無事にプルリク完了!ビルドも通ったが以下のコメントを頂く。 Changes look like good to merge, but
git author information in commits is incorrect. You may fix and force-push it to record your contribution in our repo. ざっくり翻訳: 君の Author おかしくない? 再現図 よその人以前に、人で無さそうなアカウント 15
修正 Remote Branch へ Push 済 Commit の取り消し方法をググりながら何とか解決 以下で治ったけどベストプラクティスは不明 git
rebase -i <コミットハッシュ> git commit --amend --reset-author git rebase --continue git push -f 16
1. きっかけ 2. しくじりながらのプルリク 3. はじめての Contribute へ 17
まとめ 無事に Merge! Old Enough!な、しくじり記録 いかがでしたか? 俺みたいになるな OSS の Contribute
に興味はあるが心配になった人は、私と一緒に学びましょう プロジェクトに貢献する(再掲) https://docs.github.com/ja/get-started/quickstart/contributing-to-projects AWS CDK にコントリビュートするための具体的な方法 https://speakerdeck.com/tomoki10/how-to-aws-cdk-contribute 18
Appendix. そもそも BLEA に PR 出すのはどうなのか 明らかな bug fix、最新化追従は筋が悪くなさそう。 feature
request はケースバイケースか BLEA はあくまで”Baseline”。恐らく”セキュリティもの全部入り”の思想ではない CDK 利用促進に向けた教材の側面も感じられる。 といいつつ Baseline かは微妙なラインの PR を Review いただいています。 いつもありがとうございます。 ”当たり前品質”を守りつつ、OSS には積極的に貢献していきましょう! 19