Skip to content

Conversation

marichka-offen
Copy link
Contributor

@marichka-offen marichka-offen commented Feb 22, 2023

Summary

Adds the ability to define the type for a work pool and the default values for a work pool's base job template when creating a work pool. The available worker types and default base job templates are retrieved from the collection registry and the variables section is used to render a schema-based form. The values entered in the form are used to update the default key for each property in the variables section of the default base job template and the full schema is saved to the work pool via the API.

Screenshot of form for the Process worker type

Screenshot 2023-02-28 at 8 06 29 AM

Additional changes to be addressed in subsequent PRs:

  • Updates to default values in base job template via the edit work pool from
  • Display default values for base job template via the work pool details component

@netlify
Copy link

netlify bot commented Feb 22, 2023

Deploy Preview for prefect-ui-library ready!

Name Link
🔨 Latest commit 2e4e923
🔍 Latest deploy log https://app.netlify.com/sites/prefect-ui-library/deploys/63fe7286b4a26d0008cb2077
😎 Deploy Preview https://deploy-preview-1173--prefect-ui-library.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@marichka-offen marichka-offen changed the title Feature: Workers collection fields in worker pool forms Feature: Workers collection fields in worker pool create form Feb 24, 2023
@desertaxle desertaxle self-assigned this Feb 27, 2023
@desertaxle desertaxle marked this pull request as ready for review February 27, 2023 22:34
@desertaxle desertaxle added enhancement New feature or request team:orchestration labels Feb 28, 2023
@desertaxle desertaxle changed the title Feature: Workers collection fields in worker pool create form Feature: Worker type selection and base job template configuration in worker pool create form Feb 28, 2023
@desertaxle desertaxle merged commit 3e13abd into main Feb 28, 2023
@desertaxle desertaxle deleted the workers-field branch February 28, 2023 21:41
Comment on lines +70 to +75
const schema = computed<Schema>(() => mapper.map('SchemaResponse', baseJobConfigs.value.variables ?? {}, 'Schema'))
const parameters = ref()

const testSchema = computed<Schema>(() => {
return { ...schema.value, type: 'object' }
})
Copy link
Contributor

Choose a reason for hiding this comment

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

@desertaxle just calling out that this testSchema was for debugging. I couldn't figure out why the schema wasn't rendering and turned out to be because the schema fields component was expecting the object type. Not sure if that's a bug in the schemes themselves being used here or if the component should know that anything with properties is an object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request team:orchestration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants