Hi - basic question but I’m new to pants. I’m usin...
# general
m
Hi - basic question but I’m new to pants. I’m using pants to build lambda zip files. Somehow pants is ignoring a
.yml
file in the source directory. I’ve checked that there is no
pants_ignore.add
defined in pants.toml, meaning it is using my .gitignore, which I have checked should not affect the yml in question
1
here is my build file:
Copy code
python_sources(
  name="lib",
  dependencies=[
    ":lib",
    ":reqs",
    ":ingestion_config",
  ],
)

file(
    name = 'ingestion_config',
    source = 'ingestion_config.yml',
)

poetry_requirements(
    name="reqs",
    source="pyproject.toml"
)

python_awslambda(
    name="lambda",
    runtime="python3.8",
    # Pants will convert this to `project.lambda_example:example_handler`.
    handler="run.py:main",
    dependencies=[
        ':lib',
        ':ingestion_config',
    ],
)
c
I believe you want resource instead of file.
I was having the same issue with .env files recently
gives this warning:
m
Wow that worked. Thank you so much!
❤️ 1
c
Great. I'm usually in here asking for help. So glad that worked 😄
❤️ 1
🙂 1
🙌 1
h
The distinction between file and resource continues to bite, sorry about that. It's subtle and we should probably reconsider it.