Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
ファイル閲覧の改善: メタデータをヘッダーから取得できるため、ファイル情報の表示が高速化
S3管理の改善: バケットのリージョン情報を保持することで、適切なエンドポイントへのアクセスが可能に
パフォーマンス向上: リージョン情報のキャッシュにより、S3へのリクエストが最適化
Changes
HEADリクエストのレスポンスに X-File-Metadata ヘッダーを追加
バージョンのメタデータをJSON形式でヘッダーに含めることで、クライアント側でメタデータを取得可能に
バージョン情報に 'version': 'Latest' を追加し、現在のバージョンを明示
メタデータのシリアライズ失敗時のエラーハンドリングを追加
モデルの変更 (models.py):
NodeSettings モデルに region フィールド(最大50文字)を追加
set_folder メソッドでバケットのリージョン情報を自動取得して保存
serialize_waterbutler_settings メソッドの戻り値にリージョン情報を追加
データベースマイグレーション:
0005_nodesettings_region.py: region フィールドをスキーマに追加
0006_auto_20250610_1315.py: 既存のNodeSettingsレコードに対して、S3 APIからリージョン情報を取得して自動的に埋めるデータマイグレーション(失敗時はデフォルトで us-east-1 を設定)
QA Notes
Documentation
Deployment Notes
RDM-osf.io #612 → S3リージョン情報の保存とヘッダー追加
RDM-waterbutler #79 → リージョン情報の活用
RDM-modular-file-renderer #6 → メタデータキャッシュの活用
Ticket
https://redmine.devops.rcos.nii.ac.jp/issues/55671
https://redmine.devops.rcos.nii.ac.jp/issues/55665