Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise an error when updating a runtime currently in use. #2885

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Nov 20, 2023

StoryDX-2091 We ensure the runtime is not in use before updating it

@mitchell-as
Copy link
Contributor Author

Test failures are not due to this PR.

@mitchell-as mitchell-as requested a review from MDrakos November 20, 2023 16:17
@mitchell-as mitchell-as marked this pull request as ready for review November 20, 2023 16:18
@@ -220,6 +235,35 @@ func (s *Setup) Update() (rerr error) {
return nil
}

func (s *Setup) getProcessesInUse() map[string]int32 {
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes more sense for this function to be part of the osutils package and we can supply it the directory to compare. Also we could have os-specific versions of these functions to reduce the if statements here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I moved it into the osutils package. However, when I tried splitting it up into OS-specific functions, I ended up with too much duplication. I left it as a single function.

@mitchell-as mitchell-as requested a review from MDrakos November 21, 2023 23:10
Copy link
Member

@MDrakos MDrakos left a comment

Choose a reason for hiding this comment

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

Looks good, is there an easy way for us to introduce an integration test for this? If it's too much it can be a follow-up story. Just a nice to have right now.

@mitchell-as
Copy link
Contributor Author

@mitchell-as mitchell-as merged commit 880d41b into version/0-43-0-RC1 Nov 22, 2023
6 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-2091 branch November 22, 2023 14:25
mitchell-as added a commit that referenced this pull request Feb 6, 2024
This reverts commit 880d41b, reversing
changes made to 7aba119.
mitchell-as added a commit that referenced this pull request Feb 6, 2024
This reverts commit 880d41b, reversing
changes made to 7aba119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants