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

継続的Gemアップデートの仕組み / Continuous Gem Update

継続的Gemアップデートの仕組み / Continuous Gem Update

Ayumu Kanechika

November 02, 2020
Tweet

Other Decks in Programming

Transcript

  1. Copyright © 2020 Present ANDPAD Inc. This information is confidential

    and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. Proprietary & Confidential 無断転載・無断複製の禁止 継続的Gemアップデートの 仕組みをOpen Sesame !
  2. Copyright © 2020 Present ANDPAD Inc. This information is confidential

    and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. Proprietary & Confidential 無断転載・無断複製の禁止 自己紹介
  3. 最近、Twitterを再開した! 色々な技術のトレンドのキャッチアップの為に! @KanechikaAyumu 趣味はANDPAD開発 Ruby, Go, Nuxt, k8s, flutter ...

    なんでもある?ので、 日々キャッチアップしたいこと・やりたいことがたく さん 自己紹介 Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 金近 歩(弟)/ かねちか あゆむ 株式会社アンドパッド 開発部 創業メンバー CTO金近 望(兄) 本人 Rubyのパパ
  4. 会社紹介 Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 社名 株式会社アンドパッド 設立 2012年9月 場所 秋葉原 人数 約190名(内エンジニア:約60名) ▪ミッション
  5. 提供サービス Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 建設業に特化した クラウドサービス
  6. 建設現場での大きな課題 Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 ・工期遅れやトラブルで粗利率の低下 ・削れない一日3-4時間の移動時間 ・品質が悪く、クレーム工事発生 ・監督と連絡が取れず作業が止まる ・図面や仕様書が直前共有されイライラ ・「言った・言わない」で負ける下請け構造 ・施工顧客履歴がなく、顧客対応できない ・監督と連絡が取れず、ホウレンソウできない ・経営は、全現場の進捗状況がわからない アナログ(紙・電話・FAX)な現場環境による コミュニケーション不全
  7. ANDPADの特徴 Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 現場の情報を一元管理 案件発生~完工までに関連する情報を集約できる。 個人管理だった情報がANDPADに統一した形式で保存され、会社管理になる。 案件管理 現場までの地図 工程表共有 現場からの報告 写真
  8. ANDPADが実現したい世界観 Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 開発者のための プラットフォーム 建築職人のための プラットフォーム いい仕事をする建築職人やチームが、 いい処遇や機会を得られる社会を作る プラットフォームになっていくという事がどういう事か? エンジニアにおけるGitHubになることではないか? という事を考えています。 ANDPADが無いと仕事が出来ない。 ANDPADがあることが当たり前。 ANDPADを使ってない会社に入りたくない。 そんな世界観をこの業界で目指していきたいと感じていますし、 ANDPADが目指すビジョンに共感していただいた方々と共に この道のりを進んでいきたいと考えています。
  9. ANDPADはこんな感じで成長してきました Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  10. Copyright © 2020 Present ANDPAD Inc. This information is confidential

    and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. Proprietary & Confidential 無断転載・無断複製の禁止 自己紹介(完)
  11. Copyright © 2020 Present ANDPAD Inc. This information is confidential

    and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. Proprietary & Confidential 無断転載・無断複製の禁止 継続的Gemアップデートの 仕組みをOpen Sesame !
  12. ANDPADの特徴 Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 現場の情報を一元管理 案件発生~完工までに関連する情報を集約できる。 個人管理だった情報がANDPADに統一した形式で保存され、会社管理になる。 案件管理 現場までの地図 工程表共有 現場からの報告 写真
  13. ドメイン:施工管理・ERP・チャット・検査 ・5歳前後のRails ・開発者:20人〜30人 ・トータル30万行 現状のANDPAD Confidential Copyright © 2020 Present

    ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 ドメイン:図面 ・半年前後のRails ・開発者:1〜3人 ドメイン:受発注 ・1歳前後のRails ・開発者:3〜5人 ドメイン:短工事 ・2歳前後のGO ・開発者:3〜5人
  14. ▪話すこと 大きくなってきた1つのRailsレポジトリの話 テストのカバレッジが30%→60%に改善して、 Rails5.1→Rails5.2にアップデートした過程での色々な改善話 ▪話さないこと たくさんのRailsレポジトリを 会社全体で良い感じにGemアップデートを推進する話(今後取り組んでいくぞ) ※ ANDPAD社のRailsも絶賛改善中なので、  

    同じ境遇に遭遇されている方は @KanechikaAyumu に連絡ください!   一緒に切磋琢磨できればと思ってます!! 今日話すこと・話さないこと Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  15. 簡単にアップデートできるGemに関して こんな感じでやってます (各社同じ様な感じかな?) • dependabotで「team-rails-reviewers」 Railsエンジニア全員参加のチームを レビュワーアサイン・任意の人がマージ Confidential Copyright ©

    2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  16. • 影響範囲が大きい・分からない • デグレが怖い • バグった時の責任 ※ ANDPAD社では本番エラーが発生すると、   CSの方が直接ユーザーさんに電話かけたり、

      障害情報の掲載を出したり、、、etc → 最たる例として、  今月にRails5.2へアップデートした過程での改善話 簡単にアップデートできないGemは何か? Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  17. 1年前のANDPAD…. Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 • テストのカバレッジも30%未満 • 事業成長に伴い、新機能の追加をどんどん進めるが 何かをリリースすると何かのデグレが発生する、、、 • Gemのアップデートやリファクタリングも着手できていなかった、、 ※ 当時、技術顧問の松田さんに改善したいところを伺ったら
  18. SET(Software Engineer in Test) • ミッション テクノロジーの力で品質にコミットし、 全てのエンジニアが 挑戦的な施策を安心してリリースできる仕組みを作る。 •

    スコープ 品質 テストコード、パフォーマンス、セキュリティ、良い書き方、良い設計など 生産性(全てのエンジニアが安心してリリースできる環境) デグレに対しても技術的な下支えがあり、安心して実行できるなど 専属チームSETの発足・ミッション Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  19. • 「普段からテストを書きましょう」という当たり前な雰囲気づくり ◦ テストが無い場合は、PRで「Change Request」投げたり • 既存のソースコードにSETチームで集中してテストを書いた ◦ System Specも無かったので主要導線のCapybara合宿

    ◦ モデルのコールバックでの大量のDeprecationが300箇所くらい出 ていた。金額計算なども有していた。 →カバレッジが30%から現状は60%程度に (ここが一番大変だった) まずは、「安心して開発できる土台づくり」 Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  20. その後は「困りごとおきば」が作成されて、爆速で改善が進められている Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 • Ruby・Railsのバージョンが古い(→今月にRails5.2にアップデートできた) • Rails非標準なやり方 ◦ e.g. たくさんのApplicationController • 神テーブルなどのデータベース周りの課題 • リリースが大変・CIが遅いなどの開発時の問題
  21. ナレッジ共有で、自薦・他薦の「共有したい」ラベル Confidential Copyright © 2020 Present ANDPAD Inc. This information

    is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止 • Introducing still_life #14426 Railsアップグレードにあたって、still_life gemで最高の安心が得られるようにす るプルリクです。
  22. • rails app:update #14565 Railsのバージョンも上がったことだし、rails app:update をしました。 以下解説。 ナレッジ共有で、自薦・他薦の「共有したい」ラベル Confidential

    Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  23. ▪安心してリリースできる土台作りが大事 ◦ 現時点での品質や普段の業務の延長線での作業が厳しければ、 専任チームの立ち上げが必要になることも ▪その上で、挑戦的に改善に取り組む文化づくり ◦ Gemは常に最新版で ◦ 今年中にRails6系にあげるぞ ▪

    同じ境遇に遭遇されている方は @KanechikaAyumu に連絡ください!   一緒に切磋琢磨できればと思ってます!! まとめ:絶賛改善中です Confidential Copyright © 2020 Present ANDPAD Inc. This information is confidential and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. 無断転載・無断複製の禁止
  24. Copyright © 2020 Present ANDPAD Inc. This information is confidential

    and was prepared by ANDPAD Inc. for the use of our client. It is not to be relied on by and 3rd party. Proprietary & Confidential 無断転載・無断複製の禁止 EOF