Skip to content

Conversation

@justonedev1
Copy link
Collaborator

No description provided.

@justonedev1 justonedev1 requested a review from knopers8 as a code owner May 19, 2025 15:16
@justonedev1 justonedev1 changed the title [core] split CreateEnvironment to Create and Run functions [OCTRL-1018] Once NewEnvironmentAsync returns, the env should exist May 19, 2025
@justonedev1
Copy link
Collaborator Author

justonedev1 commented May 19, 2025

I split CreateEnvironment to Create and Run, so we can change behaviour in NewEnvironmentAsync according to George's desires. I will give him the binary with this PR, so he can say whether it is what he wants.

Id: id.String(),
CreatedWhen: time.Now().UnixMilli(),
State: "ERROR", // not really, but close
NumberOfFlps: 0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be difficult to have a correct value for the NumberOfFlps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no idea, I didn't change anything, I just split the code.

workflowTemplate := request.GetWorkflowTemplate()
requestUser := request.GetRequestUser()

id, err = m.state.environments.CreateEnvironment(request.GetWorkflowTemplate(), userVars, request.GetPublic(), id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

One has to recognize that this will move environment creation into the synchronous part, which is a change in the behaviour. I imagine that the creation of an environment with all FLPs and no cached workflow templates may take 1-2 minutes. Please make sure that this is OK with George.

Copy link
Collaborator Author

@justonedev1 justonedev1 May 20, 2025

Choose a reason for hiding this comment

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

I know, but this is the only way how to achieve George's desired behavior without changing order of operations and other code changes.

And it is also the reason why I gave binary with these changes to STG for him to play with so he can see how it will behave.

I also don't want to merge this before he okays this

@justonedev1
Copy link
Collaborator Author

I am closing this as George doesn't want this if it takes too long and he will add some workaround in GUI

@justonedev1 justonedev1 deleted the OCTRL-1018 branch May 20, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants