Skip to content

Implemented spawn config validation#173

Open
victormlg wants to merge 4 commits intocfengine:masterfrom
victormlg:spawn-validation
Open

Implemented spawn config validation#173
victormlg wants to merge 4 commits intocfengine:masterfrom
victormlg:spawn-validation

Conversation

@victormlg
Copy link
Contributor

No description provided.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg victormlg force-pushed the spawn-validation branch 4 times, most recently from b41a0a3 to 14a9694 Compare February 23, 2026 13:54
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Signed-off-by: Victor Moene <victor.moene@northern.tech>
@victormlg
Copy link
Contributor Author

victormlg commented Feb 23, 2026

It looks like typing.Annotated was added in python 3.9 https://docs.python.org/3/library/typing.html#typing.Annotated, thus the error

Copy link
Member

@olehermanse olehermanse left a comment

Choose a reason for hiding this comment

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

Please move this functionality and PR to CFEngine CLI. It already has cf-remote as a dependency so you can import the things you need from cf-remote.

Rationale:

  • cf-remote (and cfbs) need to run on many older platforms we support, and thus need to work on older pythons.
  • In general, this also makes it harder for us to use (pip) dependencies in cf-remote and cfbs.
  • CFEngine CLI explicitly only targets newer OSes and Pythons. It is not meant to run on all clients or all hubs - it only needs to work on people's laptops or workstations.

Longer term we can look at moving all of cf-remote spawn to CFEngine CLI, I think.

- name: Install dependencies
run: |
python -m pip install flake8 pytest setuptools wheel
python -m pip install flake8 pytest setuptools wheel pydantic pyyaml
Copy link
Member

Choose a reason for hiding this comment

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

Here you are adding 2 dependencies, to be installed in GH Actions only. These changes would cause ImportErrors for anyone who installs and runs the new version of cf-remote.

To add a dependency, you need to update setup.py and requirements.txt.

With that said, and also considering the fact that your code does not work on older Pythons, it might be better if we move this new functionality to CFEngine CLI.

@olehermanse
Copy link
Member

It looks like typing.Annotated was added in python 3.9 https://docs.python.org/3/library/typing.html#typing.Annotated, thus the error

FYI, we cannot ignore these errors - if you were going to get this merged here you'd need to fix it. Luckily it will go away if we move it to CFEngine CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants