Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Consider atomic JSON writes

オープン 初心者向け
#412 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
fastapi, json, python
領域
backend, databases

調査の方向性

Thing の設定を書き込むコードを見つけ、現在 JSON ファイルをどのようにシリアライズして保存しているかを確認してください。次に、設定の永続化に関するプロジェクト既存のテストを調べ、中断された書き込みやアトミックな書き込みを対象とするテストを追加してください。設定の更新で一時ファイルを使って置き換えるようになり、書き込みが中断されても設定ファイルが有効な状態に保たれることを完了条件とします。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
If LabThings is interrupted while writing Thing settings, the file could get corrupted.

To Reproduce
Pull the power during a settings update.

Expected behaviour
It would be nice if the file didn't get corrupted.

Additional context
This should be easy enough to avoid by writing to a temp file, then swapping the temp file with the actual settings file. That reduces to nearly-zero the time during which the file could be broken.

主要言語
Python
スター
10
フォーク
3
平均マージ
5日 17時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

labthings/labthings-fastapi のほかの issue

labthings/labthings-fastapi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。