-
Notifications
You must be signed in to change notification settings - Fork 63
Save execution namespace in system metadata #568
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -650,6 +650,7 @@ func (m *ExecutionManager) launchSingleTaskExecution( | |
UserInputsURI: userInputsURI, | ||
SecurityContext: executionConfig.SecurityContext, | ||
LaunchEntity: taskIdentifier.ResourceType, | ||
Namespace: namespace, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we also make a backward compat change for older executions which dont have this namespace metadata set that it returns the project-domain which is widely used namespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should respect the config if we're going to assume values rather than use the default mapping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that works. wanted to make sure we have some data that we have valid data when we call the GET api even though the model wont have saved this when creating the execution |
||
}) | ||
if err != nil { | ||
logger.Infof(ctx, "Failed to create execution model in transformer for id: [%+v] with err: %v", | ||
|
@@ -905,6 +906,7 @@ func (m *ExecutionManager) launchExecutionAndPrepareModel( | |
UserInputsURI: userInputsURI, | ||
SecurityContext: executionConfig.SecurityContext, | ||
LaunchEntity: launchPlan.Id.ResourceType, | ||
Namespace: namespace, | ||
}) | ||
if err != nil { | ||
logger.Infof(ctx, "Failed to create execution model in transformer for id: [%+v] with err: %v", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -287,6 +287,7 @@ func TestCreateExecution(t *testing.T) { | |
assert.Equal(t, rawOutput, spec.RawOutputDataConfig.OutputLocationPrefix) | ||
assert.True(t, proto.Equal(spec.ClusterAssignment, &clusterAssignment)) | ||
assert.Equal(t, "launch_plan", input.LaunchEntity) | ||
assert.Equal(t, spec.GetMetadata().GetSystemMetadata().Namespace, "project-domain") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add one test with namespace mapping which equals just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code is already testing that we're exercising namespace mapping config but added another test |
||
return nil | ||
}) | ||
setDefaultLpCallbackForExecTest(repository) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will rebase before merging