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

cf events: make returned item count and/or time span set able by command flags / arguments

オープン
#2,084 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@a-b がすでに取り組んでいます。

2024年10月1日 から。

評価

この issue はまだ評価されていません。

説明

product-improvement

What's the user value of this feature request?

Developers and cloud admins can easily review app events in controlled manner. They can receive the needed set of events instead of a "random" (actually the last 50, what ever is recorded in these) subset.

Currently the first "page" (defaulting to fifty items) is returned, which might span a few minutes to days, depending on app activity. This does not allow investigating any specific problem with an app, unless it by chance falls within those last 50 events.

Who is the functionality for?
Mostly app developers, but also cloud operators.

How often will this functionality be used by the user?
While developing an app more or less frequently, depending of development and testing proceedings.

Who else is affected by the change?
This issue requests adding additions flags to the cf events command. It does not change existing behavior and so should not be able to break anything nor have any other negative impact on other users.

Is your feature request related to a problem? Please describe.
I am unable to review any app relate activity (pushes, starts/stops, crashes) outside the random time span that fits into the default first 50 lines from the event log. Specifically I had no simple way to figure out when an app started to frequently crash, restart and crash again.

Describe the solution you'd like
The cf events command should have optional arguments that allow to set the number of events to return. It should also gain options to specify the time span to return.

  • cf events APP_NAME [ --num-events <integer> ]
    return at most <interger> events from the event log, starting with the most recent event.
  • cf events APP_NAME [ --before <time specification> ]
    return the default number of events (or number given by --num-events) that happened strictly before the given time specification
  • cf events APP_NAME [ --after <time specification> ]
    return the default number of events (or number given by --num-events) that happened strictly after the given time specification, counting from the oldest event younger than <time specification> toward newer items

The <time specification> should follow usual format: yyyy-mm-dd HH:MM:SS

If both --before and --after are given, any additional --num-events should be ignored and the events in the given time span should be returned. Specifying an --after and --before time specification where the --after time specification newer than the --before time specification should be flagged as an error.

At least the first variant can probably be implemented with minimal changes, by passing an additional ccv3.PerPage parameter in line 32 of actor/v7action/event.go b/actor/v7action/event.go

Describe alternatives you've considered
I can not think of any alternative to achieve a similar result, i.e. ability to look a specific events for an app.

Additional context
No additional context.

主要言語
Go
スター
1.9k
フォーク
989
平均マージ
1日 18時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

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

cloudfoundry/cli のほかの issue

cloudfoundry/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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