hi all! self hosting and just moved from version 2...
# ask-community
l
hi all! self hosting and just moved from version 2.14.1 to 2.19.5 in the UI when I try to manually run a deployment using Custom Run - instead of showing me all the desired parameters I see just the main parameter name: in version 2.14.1 it worked fine 😕 (@Avior Hay)
c
@Lior Barak can you provide the flow definition you're using here?
l
sure this is a very simplified version of my code
Copy code
from prefect import flow, task
from pydantic import BaseModel, Field, validator

class BaseDefineScan(WithCustomEncoder):
    OrgId: str
    SiteId: str
    ScanId: str

class DefineScan(BaseDefineScan):
    ShotsCount: Optional[int] = Field(default=200)

    @validator('OrgId')
    def check_org_is_ok(cls, org_id):
        """
        some place holder code
        """
        if org_id == "bad organization":
            raise ValueError()
        return org_id

@flow(task_runner="ConcurrentTaskRunner", persist_result=True, log_prints=True)
async def full_scan_flow(define_scan: DefineScan):
    await all_scan_processing(define_scan)
c
Thank you, I’ll take a look at this 👍
l
ah! an interesting development: this example from the website works fine:
Copy code
from prefect import flow
from pydantic import BaseModel


class Model(BaseModel):
    a: int
    b: float
    c: str


@flow
def model_validator(model: Model):
    print(model)
this might have something to do with pydantic 1 vs 2. i'm not sure
👀 1
after some digging looks like this happens when the flow definition and the pydantic type definitions are located in different files a simplified example - `flows.py`:
Copy code
from prefect import flow
from models import TestModel

@flow
def model_validator(model: TestModel):
    print(model)
`models.py`:
Copy code
from pydantic import BaseModel


class TestModel(BaseModel):
    a: int
    b: float
    c: str