mitogen-hq / mitogen

Distributed self-replicating programs in Python
https://mitogen.networkgenomics.com/
BSD 3-Clause "New" or "Revised" License
2.34k stars 199 forks source link

ansible_mitogen: Handle templated ansible_ssh_user. #1147

Closed jmkeyes closed 1 month ago

jmkeyes commented 1 month ago

This PR expands the evaluation of templates in inventory/group variables to include ansible_ssh_user.

Please let me know if it requires any changes.

Fixes: #1116

jmkeyes commented 1 month ago

After reviewing #1145, I decided to prune this PR down to handling the templated username only.

moreati commented 1 month ago

Thank you, I'll review your code shortly.

The single test failure is due to #1058. I'd like to check something works for you, so I can update the instructions in that issue.

  1. On the checks tab for this PR do you see a "Re-run all jobs" button in the the top right? (Please don't click it yet)
  2. On the actions run 99 page
    1. Do you see a "Re-run jobs" button in the top right?
    2. Can you able to click that button and use "Re-run failed jobs" in the drop down list?

I've recently moved the test runner from Azure to GitHub, and I'm stilling learning the finer details for who has permission to do what.

moreati commented 1 month ago

Hold off on answering the previous questions. Your push at 0803 UTC retriggered the CI. I'll update the questions, based on the outcome.

jmkeyes commented 1 month ago

Before I triggered the next CI run, I went through each of the questions you asked.

  1. On the checks tab for this PR do you see a "Re-run all jobs" button in the the top right? (Please don't click it yet)

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

  1. On the actions run 99 page
    • Do you see a "Re-run jobs" button in the top right?
    • Can you able to click that button and use "Re-run failed jobs" in the drop down list?

There is no "Re-run jobs" button in the dropdown. The only available option was "Create status badge".

Hold off on answering the previous questions. Your push at 0803 UTC retriggered the CI. I'll update the questions, based on the outcome.

Understood. I'll wait for your update.

jmkeyes commented 1 month ago

The change is probably correct, but it needs tests that cover the templating. I'm still trying to find a good structure for these tests.

For now, if you feel confident, please use 551690e#diff-3ec47820fbd7f6bf8db852de80857cdce3f6aec7f76c5a452c93923501dc23ac as a template. Otherwise if you prefer I'll add a commit to this PR containing the new tests

If you already have a test case in mind then feel free to modify this branch as you see fit.

I can try writing some test cases after 2024-10-09 01:00 UTC.

moreati commented 1 month ago

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

At the time you looked were there any failed checks?

jmkeyes commented 1 month ago

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

At the time you looked were there any failed checks?

There were two failed checks: one for an intermittently failing test and one for the aggregate check.

moreati commented 1 month ago

There were two failed checks

Rats. I'd been hoping that GitHub Actions would be easier re-run for third-party contributers. I'll see if there's a GHA equivalent of "/AzurePipelines run"

jmkeyes commented 1 month ago

There were two failed checks

Rats. I'd been hoping that GitHub Actions would be easier re-run for third-party contributers. I'll see if there's a GHA equivalent of "/AzurePipelines run"

Although it's not precisely the same thing, you may be able to trigger a Github Actions workflow based on a issue_comment event that contains a string like /test, and have the workflow use the Github CLI to re-run failed jobs.