SoundCloud 推出的錯誤蒐集工具 Periskop

SoundCloud 推出的錯誤蒐集工具 Periskop,應該是取自捷克文的 Periskop (潛望鏡):「Periskop: Exception Monitoring Service」。

Sentry 這類工具最大的差異在於是走 pull-based 架構,也就是跟 Prometheus 的設計相同 (Prometheus 也是 SoundCloud 發明的專案)。

就資源上來說,當 instance 上的錯誤滿天飛,而超過 log buffer 時,如果是以巨觀的角度來看,其實掉一些東西也沒關係:

另外也有提到一些缺點:

  • If a fatal exception occurs and the process dies, the exception won’t be collected. However, this can be mitigated by the reporting capabilities of orchestration services like Kubernetes or other forms of logging.
  • The pull model is not well suited for short-lived processes like scheduled jobs. This could be solved by the use of a push-based event gateway, although we haven’t yet had the need at SoundCloud, as it is usually more convenient to use logs to inspect failed jobs.

雖然 web (js) 與 mobile devices 的部份沒辦法被這個服務涵蓋,但一般來說會把面向使用者的服務另外拆開,所以不算是缺點... (像 Sentry 那樣通包,主要還是為了商業上的規劃)

目前看起來還缺一些東西 (就我想用的需求),可以先觀察一下會怎麼發展,另外一邊 Sentry 也在朝 Python 3 進行,也可以嘗試看看...

AWS CodeCommit 支援 Pull Request 與聊天功能 XDDD

AWS CodeCommit 算是 AWS 提供的 source code hosting 服務,現在也提供 Pull Request 以及聊天^H^H code review 的功能了:「Using AWS CodeCommit Pull Requests to request code reviews and discuss code」、「AWS CodeCommit Supports Pull Requests」。

AWS CodeCommit now supports pull requests, which provide a mechanism to request code reviews and discuss code with collaborators.

這幾個功能果然是抄來抄去... XD

GitHub 引入 Code Owner 的概念

GitHub 推出了 Code Owner 的概念:「Introducing code owners」。也很直接說這個能是向 Chromium「致敬」出來的:

The code owners feature was inspired by Chromium's use of OWNERS files.

檔案名稱是 CODEOWNERS,可以放在根目錄或是 .github/ 下,可以針對不同的目錄設不同的人:

To specify code owners, create a file named CODEOWNERS in the repository's root directory (or in .github/ if you prefer) with the following format[.]

這樣一來,在 pull request 的時候就會跳出來:

另外也可以設定需要 code owner 同意才能 merge:

GitHub 在 Merge Pull Request 時支援 Rebase 了

有些人認為儘量保持原狀,但有些人認為儘量維持 tree 的乾淨,而這次推出的 rebase 則是把後者的需求補上了:「Rebase and merge pull requests」。

GitHub 加上 +1 與 -1 功能 (順便加上表情符號)

這是回應之前社群對 GitHub 的請願 (or 抱怨?) 而生的新功能,(參考先前的文章「GitHub 對 Open Source Community 請願的回應」):「Add Reactions to Pull Requests, Issues, and Comments」。

這避免了在討論時大量的 +1 與導致混亂的情況。

GitHub 對 Open Source Community 請願的回應

大約一個多月前 (2016 年一月 15 日),一群用 GitHub 發展 Open Source 軟體的人對 GitHub 提出請願,要求重視 Open Source Community 在 GitHub 平台上遇到的問題:「An open letter to GitHub from the maintainers of open source projects」。

這個請願在卡了將近一個月後,陸陸續續有相當多要搬出 GitHub 的討論,像是 eslint 就直接在 GitHub 開了 issue,討論搬出 GitHub 會遇到的問題以及可能的解決方法:「Investigate switching away from GitHub」。

在二月 13 日的時候,GitHub 透過 pull request 發出回應說「我們在處理了」,但也沒講正在處理什麼,看起來就是個很 PR 的回應:「Dear Open Source Maintainers」。

直到昨天,三個主要的請願中關於 issue 範本的問題 (也就是下面這段) 總算有進展了:

Issues are often filed missing crucial information like reproduction steps or version tested. We’d like issues to gain custom fields, along with a mechanism (such as a mandatory issue template, perhaps powered by a newissue.md in root as a likely-simple solution) for ensuring they are filled out in every issue.

為了解決使用者在開 issue 時有時會忘記給出完整的環境資訊 (以及其他有用的資料),GitHub 推出了新的功能,在開 issue 或 pull request 時利用 template 讓使用者有個範本可以照著填寫,同時 template 也支援 Markdown,讓填寫的方式會更豐富一些:「Issue and Pull Request templates」。

這總算開始有進展了。但也開始感覺到 GitHub 的動作已經開始慢下來了...

GitHub 上 Pull Request 的男女歧視問題

衛報報導了從 GitHub 上分析 pull request 的性別分析研究:「Women considered better coders – but only if they hide their gender」,原始論文出自「Gender bias in open source: Pull request acceptance of women versus men」。

研究的結果說明女性的 pull request 接受機率比男性高,但如果貢獻者可被確認是女性的話則會反過來,也就是說男女歧視問題是可被觀察到的:

Surprisingly, our results show that women's contributions tend to be accepted more often than men's. However, when a woman's gender is identifiable, they are rejected more often. Our results suggest that although women on GitHub may be more competent overall, bias against them exists nonetheless.

由於性別資訊不是必填項目,論文裡面也有提到透過 social network 的資料比對,以及其他方式去推測。這個研究成果看起來應該會產生不少討論...

把 GitHub 上的 pull request 對應到 Git branch...

昨天看 Hacker News 的文摘看到的:「Checkout github pull requests locally」。

方法是對 remote "origin" 加上 fetch = +refs/pull/*/head:refs/remotes/origin/pr/*,這樣就會把 pull request 拉下來...

下面的 comment 也有不少討論可以看...