Skip to content

Merge Pytest to ‘main’#1107

Closed
andyleejordan wants to merge 194 commits into
mainfrom
andschwa/pytest
Closed

Merge Pytest to ‘main’#1107
andyleejordan wants to merge 194 commits into
mainfrom
andschwa/pytest

Conversation

@andyleejordan
Copy link
Copy Markdown
Member

@andyleejordan andyleejordan commented Nov 20, 2020

This merges the Pytest branch to the main branch! I've moved the existing code into .archive so it's a bit easier to reuse and apply. Once we have the example tests from the previous prototype working, we can delete .archive (but in this way the full commit history is preserved). Also, since we'll have several OSS Python packages to publish on PyPi, we need to do source code approvals again anyway, and so we might as well switch to using the MIT License. Finally, the approval process for the main branch needs to be updated too.

@andyleejordan andyleejordan added the 🆕 LISAv3 Incubation work for the next version of LISA label Nov 20, 2020
@andyleejordan andyleejordan changed the title Merge Pytest to main Merge Pytest to ‘main’ Nov 20, 2020
@andyleejordan andyleejordan force-pushed the andschwa/pytest branch 3 times, most recently from ea560b2 to aaa18f0 Compare November 21, 2020 02:19
@andyleejordan
Copy link
Copy Markdown
Member Author

Fixed the bug I found in Poetry: python-poetry/poetry#3395

@andyleejordan andyleejordan force-pushed the andschwa/pytest branch 2 times, most recently from 873e0f9 to 78f1687 Compare November 21, 2020 02:39
@andyleejordan
Copy link
Copy Markdown
Member Author

Hey @squirrelsc, I'm going to start working on merging code in (specifically around requirements and whatnot). I guess I'll open PRs to this branch?

Comment thread .archive/pyproject.toml
Comment thread playbooks/test.yaml
Comment thread pytest-lisa/lisa.py
Comment thread pytest-target/target/__init__.py Outdated
Comment thread pytest-target/target/azure.py Outdated
Comment thread pytest-target/target/azure.py Outdated
Comment thread pytest-target/target/azure.py
Comment thread pytest-target/target/plugin.py Outdated
Comment thread selftests/setup_plan/test_plan_A.py
Comment thread testsuites/test_lis.py Outdated
It’s hidden so that tools like `pytest` and `rg` ignore it by default.
This is a _working_ test.
Extend Fabric’s Connection class with a new (and simple) command “cat”
which return the value of a remote file as a string.

Setup a Config for the Connection when creating it that echoes every
command, disables the stdin forwarding (since we’re running under
Pytest), and fixes the PATH since the remote commands don’t run under a
login shell.
This could be extended to instead deploy a host of the specified distro.
Most likely we’ll want a command-line parameter that the fixture uses to
create a Node with the given requirements, and then tests will be
skipped if their requirements aren’t met.

Further more, the mark here is very simple. It can instead take keyword
arguments, which would map to our metadata.
As supplying types for these would be supremely annoying.
When deploying new targets, we should only lock the cache afterwards so
the lock isn’t waiting on the deployment itself. We should also catch
any exception in the deployment, so we can still delete whatever may
have succeeded. This also makes the `get_targets()` logic more clear.

Searching for cached targets (and creating instances from cached data)
is fast enough that I’m not worried about locking the cache around it.
@andyleejordan andyleejordan force-pushed the andschwa/pytest branch 3 times, most recently from ce2ef35 to 5698484 Compare January 21, 2021 01:49
@glima
Copy link
Copy Markdown
Contributor

glima commented Mar 4, 2021

I have to say I like what I see here. Justo a kudos, for posterity.

@andyleejordan
Copy link
Copy Markdown
Member Author

Thank you so much @glima, that's incredibly validating, and I really appreciate it 😁

@juhlee-microsoft
Copy link
Copy Markdown
Contributor

@andschwa Any reason you keep opening this PR?

@juhlee-microsoft
Copy link
Copy Markdown
Contributor

@andschwa Any reason you keep opening this PR?

@squirrelsc what is your plan? Saw the conflict.

@andyleejordan
Copy link
Copy Markdown
Member Author

@juhlee-microsoft It's still open because this is still what's designed and documented at https://microsoft.github.io/lisa/, published on PyPI at https://pypi.org/project/pytest-lisa/, https://pypi.org/project/pytest-playbook/, and https://pypi.org/project/pytest-target/, what was presented to LSG for LISAv3, and last I heard from @simonxiaoss what was to be merged and used. However, the work to do that is not something I have capacity for as I am no longer on the Linux Validation team. Let me know what you end up doing!

@juhlee-microsoft
Copy link
Copy Markdown
Contributor

@juhlee-microsoft It's still open because this is still what's designed and documented at https://microsoft.github.io/lisa/, published on PyPI at https://pypi.org/project/pytest-lisa/, https://pypi.org/project/pytest-playbook/, and https://pypi.org/project/pytest-target/, what was presented to LSG for LISAv3, and last I heard from @simonxiaoss what was to be merged and used. However, the work to do that is not something I have capacity for as I am no longer on the Linux Validation team. Let me know what you end up doing!

@andschwa I suggest you keep the changes in your repo and can open the new PR once the work is done. I understand you have no capacity of this work this time.

@andyleejordan
Copy link
Copy Markdown
Member Author

@juhlee-microsoft the changes are in this repo because that's from where the the website is published and where the published PyPI packages point. They'll have to stay where they are until maintainers of this repo fix that up.

The only conflicts are that @simonxiaoss asked me to delete the other prototype, but I didn't want to do that to @squirrelsc, so we compromised on doing a git mv to the .archive folder. A simple git rebase will suffice. There are no actual code conflicts.

@juhlee-microsoft
Copy link
Copy Markdown
Contributor

@juhlee-microsoft the changes are in this repo because that's from where the the website is published and where the published PyPI packages point. They'll have to stay where they are until maintainers of this repo fix that up.

The only conflicts are that @simonxiaoss asked me to delete the other prototype, but I didn't want to do that to @squirrelsc, so we compromised on doing a git mv to the .archive folder. A simple git rebase will suffice. There are no actual code conflicts.

No problem. In this case, please close PR only, but we can keep your branch. It's good to tag like 'do not delete'

@squirrelsc
Copy link
Copy Markdown
Contributor

Close the old PRs. Feel free to open it, if you are working on it continually.

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

Labels

🆕 LISAv3 Incubation work for the next version of LISA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants