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

[BUG] optionaltrue appended to entries from pyproject.toml #516

Open
xylar opened this issue Dec 31, 2023 · 11 comments
Open

[BUG] optionaltrue appended to entries from pyproject.toml #516

xylar opened this issue Dec 31, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@xylar
Copy link
Contributor

xylar commented Dec 31, 2023

A recent change in grayskull seems to now be producing lines like:

- crate >=0.30.1,<1optionaltrue

For optional entries in a pyproject.toml, e.g.:
https://github.com/earthobservations/wetterdienst/blob/v0.70.0/pyproject.toml#L136

See:
conda-forge/wetterdienst-feedstock@a22fa2b

@xylar xylar added the bug Something isn't working label Dec 31, 2023
@xylar
Copy link
Contributor Author

xylar commented Dec 31, 2023

Hmm, I'm not able to reproduce the problem with a local grayskull so maybe it's an issue with conda's bot.

@xylar xylar closed this as completed Dec 31, 2023
@xylar xylar reopened this Jan 3, 2024
@xylar
Copy link
Contributor Author

xylar commented Jan 3, 2024

Reopening because @beckermr thinks this is a grayskull bug, see:
regro/cf-scripts#1980 (comment)

@BastianZim
Copy link
Contributor

I also got it in this case: conda-forge/aws-lambda-powertools-feedstock#99

@xylar
Copy link
Contributor Author

xylar commented Jan 5, 2024

Thanks @BastianZim. Have you been able to reproduce it locally with some version of grayskull? That would be a lot more helpful in tracking down and fixing the issue.

@BastianZim
Copy link
Contributor

No, using it locally works for me as well. For the bot, I think it is not using the CLI but a python module instead, so maybe something is converted incorrectly. The logs locally show "optional" as well but it is not in the meta.yaml:

Build requirements:
  <none>
Host requirements:
  - python <4.0
  - poetry-core >=1.3.2
  - pip
Run requirements:
  - python >=3.7.4,<4.0.0
  - typing-extensions >=4.6.2,<5.0.0
All requirements (optional):
  - aws-xray-sdk >=2.8.0,<3.0.0
  - python-fastjsonschema >=2.14.5,<3.0.0
  - pydantic >=1.8.2,<2.0.0
Aws-sdk requirements (optional):
  - boto3 >=1.20.32,<2.0.0
Datadog requirements (optional):
  - datadog-lambda >=4.77,<6.0
Datamasking-aws-sdk requirements (optional):
  - aws-encryption-sdk >=3.1.1,<4.0.0
Parser requirements (optional):
  - pydantic >=1.8.2,<2.0.0
Tracer requirements (optional):
  - aws-xray-sdk >=2.8.0,<3.0.0
Validation requirements (optional):
  - python-fastjsonschema >=2.14.5,<3.0.0

RED: Missing packages
GREEN: Packages available on conda-forge

@xylar
Copy link
Contributor Author

xylar commented Jan 5, 2024

Thanks @BastianZim. That's helpful. I hadn't had time to look into the details yet.

@BastianZim
Copy link
Contributor

Just cannot remember anymore where that code lives... 😅

@beckermr
Copy link

beckermr commented Jan 5, 2024

In the bot or grayskull? In the bot it is here https://github.com/regro/cf-scripts/blob/master/conda_forge_tick/update_deps.py#L333. You'll have to extract a test case by hand since the current code paths use bot data structures.

@beckermr
Copy link

beckermr commented Jan 5, 2024

@BastianZim
Copy link
Contributor

Ahh was looking in smithy – thank you!

In the bot or grayskull?

Yes, I just wanted to see if there is an obvious difference between CLI and bot.

@BastianZim
Copy link
Contributor

BastianZim commented Jan 5, 2024

Ok if I run recipe, _ = create_python_recipe(pkg_name="aws-lambda-powertools", version="2.31.0", download=False, is_strict_cf=True) and save that, I am getting

requirements:
  host:
    - python <4.0
    - poetry-core >=1.3.2
    - pip
  run:
    - python >=3.7.4,<4.0.0
    - typing-extensions >=4.6.2,<5.0.0
  run_constrained:
    - aws-xray-sdk >=2.8.0,<3.0.0
    - python-fastjsonschema >=2.14.5,<3.0.0
    - pydantic >=1.8.2,<2.0.0
    - boto3 >=1.20.32,<2.0.0
    - datadog-lambda >=4.77,<6.0

I'm not sure if it is 100% Grayskull related, it might be the matching later. But first I would need to investigate if the Python version can have the same argument as the CLI with --extras-require-all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants