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

First class handling of dependencies from pyproject.toml after git_clone pull step #13252

Open
3 tasks done
maitlandmarshall opened this issue May 6, 2024 · 1 comment
Open
3 tasks done
Labels
enhancement An improvement of an existing feature

Comments

@maitlandmarshall
Copy link
Contributor

maitlandmarshall commented May 6, 2024

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to find a similar request and didn't find it.
  • I searched the Prefect documentation for this feature.

Prefect Version

2.x

Describe the current behavior

Prefect can use a pull step to install via requirements.txt or executing a script pull step.

Describe the proposed behavior

Allow Prefect to install dependencies via a pyproject.toml file or remove the requirement to have a pull step, so that the project can be installed via EXTRA_PIP_PACKAGES and the entrypoint can be a module referencing to the installed pip package.

Here is a workaround I use for this, where I have a git clone pull step as well as an EXTRA_PIP_PACKAGES step referencing the same package so I can install the dependencies:

- name: devprod-all
  tags: [service:upp_viewpoint, env:devprod]
  entrypoint: customer_data_upp.dw.ingest:ingest_all_suppliers_and_answers
  work_pool:
    name: default
    job_variables:
      name: upp-devprod-all
      image: imageloc.azurecr.io/mad.docker.prefect_k8_job:816
      env:
        GIT_ACCESS_TOKEN: "{{ prefect.blocks.secret.pat-devops-customer }}"
        UPP_API_CREDENTIALS_BLOCK: prod
        CUSTOMER_DATA_UPP_BLOCK: dev-prodtest
        EXTRA_PIP_PACKAGES: git+https://path/to/customer_data_upp@dev
  schedules:
    - cron: 0 0 * * *
      timezone: UTC
      day_or: true
  pull:
    - prefect.deployments.steps.git_clone:
        repository: https://path/to/customer_data_upp
        branch: dev
        access_token: "{{ prefect.blocks.secret.pat-devops-customer}}"

Example Use

No response

Additional context

No response

@maitlandmarshall maitlandmarshall added enhancement An improvement of an existing feature needs:triage Needs feedback from the Prefect product team labels May 6, 2024
@zzstoatzz zzstoatzz removed the needs:triage Needs feedback from the Prefect product team label May 7, 2024
@zzstoatzz
Copy link
Contributor

hi @maitlandmarshall - this makes a lot of sense! I've added this to the backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants