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

StacBrowser construct doesn't prefix S3 keys when pathPrefix is set

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
aws, typescript

調査の方向性

lib/stac-browser/index.ts の 50-55 行付近にある BucketDeployment 設定から始め、ビルドされたアプリの publicPath と併せて pathPrefix がどのように扱われるかを確認します。前後にスラッシュがある値とない値について、正規化されたプレフィックスの動作を検証し、その後、pathPrefix が設定されている場合と設定されていない場合の両方をテストします。destinationKeyPrefix が pathPrefix が指定された場合に pathPrefix と一致し、それ以外では既存の動作が変わらなければ完了です。

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

説明

When pathPrefix is set on the StacBrowser construct, the build correctly bakes the prefix into the app's publicPath but I think the files in BucketDeployment get uploaded to the root regardless of what pathPrefix is set to.

We have to rewrite the path downstream in order to properly serve anything in the bucket behind the prefix path.

so the proposed change would be something like:

        this.bucketDeployment = new s3_deployment.BucketDeployment(this, 'BucketDeployment', {
            destinationBucket: this.bucket,
            destinationKeyPrefix: props.pathPrefix?.replace(/^\/+|\/+$/g, ''),
            sources: [s3_deployment.Source.asset(buildPath)],
            memoryLimit: 1024,
            ephemeralStorageSize: Size.mebibytes(1024),
          });
Acceptance Criteria
  • destinationKeyPrefix is set to match pathPrefix when it's provided
  • The existing behavior is unchanged when pathPrefix isn't set
  • Testing done
主要言語
Python
スター
29
フォーク
6
平均マージ
9時間 27分
マージ済み PR(30日)
2

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

developmentseed/eoapi-cdk のほかの issue

developmentseed/eoapi-cdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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