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

Fix: Remove old flow run infra override access checks #2417

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

zhen0
Copy link
Member

@zhen0 zhen0 commented May 16, 2024

PrefectHQ/prefect#12742 removed experimental flags for flow run infra overrides. However the UI still contains access checks meaning that users in OSS can not access or view the flow run infra overrides section of the custom run form (and elsewhere).

This PR removes the access checks. Accompanying PR in PrefectHQ/prefect#13401

@abrookins
Copy link
Contributor

@zhen0 Yes, this looks right, we should have removed this alongside the other PR.

@zhen0 zhen0 marked this pull request as ready for review May 16, 2024 17:06
@zhen0 zhen0 requested a review from a team as a code owner May 16, 2024 17:06
Copy link
Contributor

@znicholasbrown znicholasbrown left a comment

Choose a reason for hiding this comment

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

There's an unused can import in the automation actions run deployment input file now, otheriwse this LGTM!

@collincchoy
Copy link
Collaborator

collincchoy commented May 16, 2024

I think we need to handle/remove the deploymentScheduleFlowRunInfraOverrides flag also.

I split what-was-originally 1 flag for flow-run-infra-overrides into 2 as the server-side only had partial support so we could roll out some of the functionality but hold on the scheduling updates (which needed server-side support).

I'm guessing the current state now though is that we want both on everywhere - in which case, we should update usages of deploymentScheduleFlowRunInfraOverrides to default to "on" behavior.

nvm my guess above was wrong. I don't see any server-side support for job variables at the schedule level so we do still want to keep that UI behavior turned off. altho if we decided to nix that medium-to-long-term then feature-flagged UI behavior there is confusing.

@@ -124,7 +124,7 @@
const workQueueName = ref<string | null>(props.deployment.workQueueName)
const retries = ref<number | null>(null)
const retryDelay = ref<number | null>(null)
const jobVariables = ref<string | undefined>(can.access.flowRunInfraOverrides ? '{}' : undefined)
const jobVariables = ref<string | undefined>('{}')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like a bunch of handling could get simplified now by removing this | undefined in places....

but this should all work as-is

Copy link
Collaborator

Choose a reason for hiding this comment

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

it looks the API itself calls this field optional so technically the typing is correct but it'd certainly make everything simpler if we stuck to a single type especially if we're defaulting to a defined value.

probably not worth the headache atm tho tbh

@zhen0 zhen0 merged commit 5cad6f6 into main May 16, 2024
3 checks passed
@zhen0 zhen0 deleted the infra-flag branch May 16, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants