Skip to content

AWX: Fix unable to start Workflow with one or more prompts enabled #3082

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export function LaunchTemplate({ jobType }: { jobType: string }) {
error: getLaunchError,
refresh: getLaunchRefresh,
} = useGet<LaunchConfiguration>(awxAPI`/${jobType}/${resourceId}/launch/`);
const error = getTemplateError || getLaunchError;
const refresh = getTemplateRefresh || getLaunchRefresh;
const error = getTemplateError ?? getLaunchError;
const refresh = getTemplateRefresh ?? getLaunchRefresh;
const getJobOutputUrl = useGetJobOutputUrl();

if (error) return <AwxError error={error} handleRefresh={refresh} />;
Expand Down Expand Up @@ -279,6 +279,11 @@ export function LaunchWizard({
inputs: <TemplateLaunchPromptStep defaultValues={initialValues} />,
hidden: () => shouldHideOtherStep(config),
validate: async (formData) => {
if (jobType === 'workflow_job_templates') {
// Skip validation for workflows — they don't have credentials
return;
}

const missingCredentialTypes: string[] = [];
await requestGet<AwxItemsResponse<Credential>>(
awxAPI`/job_templates/${template.id?.toString()}/credentials/`
Expand Down