Skip to content

Update API def 20240905-064448#90

Merged
bearmini merged 7 commits intomasterfrom
update-api-def-20240905-064448
Sep 18, 2024
Merged

Update API def 20240905-064448#90
bearmini merged 7 commits intomasterfrom
update-api-def-20240905-064448

Conversation

@makoto-soracom
Copy link
Contributor

@makoto-soracom makoto-soracom commented Sep 6, 2024

2024-09-05 現在の API 定義に更新します。

  • /query/sims が複雑になり過ぎて gocyclo がエラーを出すようになりました。API は今後も複雑になっていくと思いますので、ここで一度 gocyclo を外すことを提案します。
  • version 1.2.0 と比べて、多くの SORACOM API に対応しました。

README_ja.md Outdated
- generators/assets/sandbox/soracom-sandbox-api.en.yaml
- generators/assets/sandbox/soracom-sandbox-api.ja.yaml

`configure --help` で表示されるメッセージを更新するには以下のファイルを更新します。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure --help だけでなく、「何らかの処理が実行されるサブコマンドではなく、サブコマンドをまとめるためだけのサブコマンド」(コード内では trunk コマンドと呼んでいます) のヘルプメッセージが generators/assets/cli/{en,ja}.yaml には含まれています。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに中途半端でした。ちょっと書きかたを変えてみました。

README_ja.md Outdated
Go がインストールされている状態で、以下のようにビルドスクリプトを実行します。

```
./scripts/copy-apidef-files.sh # Before running this script, please copy API definitions before hand.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API 定義ファイルをコピーするためにこのスクリプトを実行するので、
# Before running this script, please copy API definitions before hand. というコメントは不要になるかと思います。
なお、ソラコム社外の方はこのスクリプトを実行してもエラーになると思います。(API 定義ファイルのリポジトリが存在していないはずなので)
なのであえてこのスクリプトの実行は README には今まで書いていませんでした。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらは削除しました。削除するつもりが漏れていた、という感じでした。en のほうは削除済みでした。

README_ja.md Outdated
Go がインストールされている状態で、以下のようにビルドスクリプトを実行します。

```
aws ecr-public get-login-password --profile {your AWS profile} --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私の環境だとこれを実行しなくてもビルドができますね 🤔
これを実行しない場合に発生するエラーの詳細を教えていただけますか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます~。残念ながら、以下のようになりました。

$ VERSION=1.3.0
$ ./scripts/build.sh $VERSION
[+] Building 2.3s (3/3) FINISHED                                              docker:default
 => [internal] load build definition from Dockerfile                                    0.1s
 => => transferring dockerfile: 220B                                                    0.0s
 => ERROR [internal] load metadata for public.ecr.aws/bitnami/golang:1.20.5             1.9s
 => [auth] aws:: bitnami/golang:pull token for public.ecr.aws                           0.0s
------
 > [internal] load metadata for public.ecr.aws/bitnami/golang:1.20.5:
------
Dockerfile:1
--------------------
   1 | >>> FROM public.ecr.aws/bitnami/golang:1.20.5
   2 |     
   3 |     RUN apt update && apt upgrade -y && apt install -y fakeroot shellcheck zip
--------------------
ERROR: failed to solve: public.ecr.aws/bitnami/golang:1.20.5: failed to resolve source metadata for public.ecr.aws/bitnami/golang:1.20.5: unexpected status from HEAD request to https://public.ecr.aws/v2/bitnami/golang/manifests/1.20.5: 403 Forbidden

@makoto-soracom
Copy link
Contributor Author

docker logout public.ecr.aws を実行すれば良いようなので、そのように書きました。いかがでしょう~

Copy link
Collaborator

@bearmini bearmini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update!

@bearmini bearmini merged commit 9ad7352 into master Sep 18, 2024
@bearmini bearmini deleted the update-api-def-20240905-064448 branch September 18, 2024 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants