This is an automated email from the ASF dual-hosted git repository. pbacsko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/yunikorn-core.git
The following commit(s) were added to refs/heads/master by this push: new 159e1988 [YUNIKORN-2453] Add `EventRecord_APP_NEW` to event of created/submitted application (#817) 159e1988 is described below commit 159e1988dee647b924e4263ab2420bf7a0435dfc Author: brandboat <brandboat@localhost.localdomain> AuthorDate: Tue Feb 27 09:48:45 2024 +0100 [YUNIKORN-2453] Add `EventRecord_APP_NEW` to event of created/submitted application (#817) Closes: #817 Signed-off-by: Peter Bacsko <pbac...@cloudera.com> --- pkg/scheduler/objects/application_events.go | 2 +- pkg/scheduler/objects/application_events_test.go | 4 ++-- pkg/scheduler/tests/application_tracking_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/scheduler/objects/application_events.go b/pkg/scheduler/objects/application_events.go index 0f0aa5d6..8c407674 100644 --- a/pkg/scheduler/objects/application_events.go +++ b/pkg/scheduler/objects/application_events.go @@ -91,7 +91,7 @@ func (evt *applicationEvents) sendNewApplicationEvent() { if !evt.eventSystem.IsEventTrackingEnabled() { return } - event := events.CreateAppEventRecord(evt.app.ApplicationID, common.Empty, common.Empty, si.EventRecord_ADD, si.EventRecord_DETAILS_NONE, evt.app.allocatedResource) + event := events.CreateAppEventRecord(evt.app.ApplicationID, common.Empty, common.Empty, si.EventRecord_ADD, si.EventRecord_APP_NEW, evt.app.allocatedResource) evt.eventSystem.AddEvent(event) } diff --git a/pkg/scheduler/objects/application_events_test.go b/pkg/scheduler/objects/application_events_test.go index 1dd01c4a..082ffc61 100644 --- a/pkg/scheduler/objects/application_events_test.go +++ b/pkg/scheduler/objects/application_events_test.go @@ -31,7 +31,7 @@ func isNewApplicationEvent(t *testing.T, app *Application, record *si.EventRecor assert.Equal(t, si.EventRecord_APP, record.Type, "incorrect event type, expect app") assert.Equal(t, app.ApplicationID, record.ObjectID, "incorrect object ID, expected application ID") assert.Equal(t, si.EventRecord_ADD, record.EventChangeType, "incorrect change type, expected add") - assert.Equal(t, si.EventRecord_DETAILS_NONE, record.EventChangeDetail, "incorrect change detail, expected none") + assert.Equal(t, si.EventRecord_APP_NEW, record.EventChangeDetail, "incorrect change detail, expected none") } func isRemoveApplicationEvent(t *testing.T, app *Application, record *si.EventRecord) { @@ -277,7 +277,7 @@ func TestSendNewApplicationEvent(t *testing.T) { event := mockEvents.Events[0] assert.Equal(t, si.EventRecord_APP, event.Type) assert.Equal(t, si.EventRecord_ADD, event.EventChangeType) - assert.Equal(t, si.EventRecord_DETAILS_NONE, event.EventChangeDetail) + assert.Equal(t, si.EventRecord_APP_NEW, event.EventChangeDetail) assert.Equal(t, "app-0", event.ObjectID) assert.Equal(t, "", event.ReferenceID) assert.Equal(t, "", event.Message) diff --git a/pkg/scheduler/tests/application_tracking_test.go b/pkg/scheduler/tests/application_tracking_test.go index 4f20cfd3..b7f0ee12 100644 --- a/pkg/scheduler/tests/application_tracking_test.go +++ b/pkg/scheduler/tests/application_tracking_test.go @@ -271,7 +271,7 @@ func verifyAppAddedEvents(t *testing.T, events []*si.EventRecord) { assert.Equal(t, "", events[0].ReferenceID) assert.Equal(t, si.EventRecord_APP, events[0].Type) assert.Equal(t, si.EventRecord_ADD, events[0].EventChangeType) - assert.Equal(t, si.EventRecord_DETAILS_NONE, events[0].EventChangeDetail) + assert.Equal(t, si.EventRecord_APP_NEW, events[0].EventChangeDetail) assert.Equal(t, "root.singleleaf", events[1].ObjectID) assert.Equal(t, "", events[1].Message) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org For additional commands, e-mail: issues-h...@yunikorn.apache.org