Skip to content

Conversation

javuto
Copy link
Collaborator

@javuto javuto commented Apr 14, 2025

Following up #640 to change the defaultInactive for Inactive Hours to be positive. Also adding a const for environment and platform selector.

@javuto javuto added osctrl-api osctrl-api related changes osctrl-admin osctrl-admin related changes labels Apr 14, 2025
@javuto javuto requested a review from Copilot April 14, 2025 18:52
@javuto javuto mentioned this pull request Apr 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the handling of inactive hours by ensuring it is a positive value and introduces dedicated constants for environment and platform selectors for consistency.

  • Updated the documentation in utils.go to clarify that the inactive parameter is expected to be positive.
  • Introduced EnvironmentSelector and PlatformSelector constants in nodes.go and replaced literal strings with these constants.
  • Changed defaultInactive in admin/main.go from -72 to 72.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/nodes/utils.go Updated documentation in the IsActive function to reflect the expectation of a positive inactive value.
pkg/nodes/nodes.go Added constants for selectors and updated related function calls to use these constants.
cmd/admin/main.go Modified the defaultInactive value to be positive.

@javuto javuto merged commit 2037fda into main Apr 14, 2025
53 checks passed
@javuto javuto deleted the activecutoff-fix branch April 14, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osctrl-admin osctrl-admin related changes osctrl-api osctrl-api related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant