Skip to content

Commit

Permalink
DEVPROD-7541: Don't validate host sleep schedule in prod (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophstad authored May 23, 2024
1 parent 3842442 commit 73838b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/spruce/src/components/Spawn/utils/hostUptime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ValidateProps } from "components/SpruceForm";
import { SleepScheduleInput } from "gql/generated/types";
import { MyHost } from "types/spawn";
import { arraySymmetricDifference } from "utils/array";
import { isProduction } from "utils/environmentVariables";

const daysInWeek = 7;
const hoursInDay = 24;
Expand Down Expand Up @@ -227,6 +228,9 @@ export const matchesDefaultUptimeSchedule = (
};

export const validator = (({ expirationDetails }, errors) => {
// TODO DEVPROD-6908 remove check when beta period ends
if (isProduction()) return errors;

const { hostUptime, noExpiration } = expirationDetails ?? {};
if (!hostUptime || noExpiration === false) return errors;

Expand Down

0 comments on commit 73838b7

Please sign in to comment.