-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Molecule seems an issue. #105
Comments
Thanks for this cross-referencing ;-) I fiddle with it in this PR: #104 Forked your repo and patched the Dockerfile: robertdebock/docker-github-action-molecule#11 This fixed a local test against this role. As soon as your latest docker image is available to use with github actions I will rerun my pipeline there. The upstream issue seems to be this: ansible/molecule#2755 I don't know if there is more cleanup needed maybe. Maybe you could get rid of something according to the latest upstream development? |
@robertdebock Does 3.0.2 contain my patch already? My pipeline still fails with that release: https://github.com/stefangweichinger/ansible-rclone/actions/runs/1740650166 |
It does, but I am also getting errors. Weird, sometimes it works, sometimes failures. I'm guessing cache plays up somewhere. Maybe ":latest" is not a good plan... Give me a bit more time to understand what makes the action fail or succeed so randomly. |
@robertdebock I don't have ":latest" as far as I see ;-) no hurry, it's still in a test branch here. |
Checked |
I guess "latest" is cached, making the results unpredictable. I'll re-introduce versioned images in the action again. Give me a moment. |
Trying GitHub action version 4.0.3 that uses Docker image 4.0.3 on a GitLab role. I've pushed many updates this morning, I guess CI will take hours to finish. (Likely; speak to you in the morning.) |
Still struggling, have not found a solution. Tried so far:
What a mess. I'm not understanding why I'm running into this issue; other repositories seems to be "fine". |
It's a bit confusing, your docker images have other release numbers than the github action, right? https://github.com/robertdebock/docker-github-action-molecule/releases shows 4.0.5 the github action hops from 3.0.2 (in my case) to 4.0.5 now also? The "destroy" action fails again with 4.0.5 in my pipeline, although the message is different now: https://github.com/stefangweichinger/ansible-rclone/runs/4947770349?check_suite_focus=true#step:4:36 I will re-test locally in the next hours. Maybe you can get rid of |
I know; I'm using TOX. Let me focus on that. |
Ah, I see. Didn't use |
Yesterday I've released version |
great, that helps |
My local test with your latest (= 4.0.5) docker container works. Maybe it's really some caching issue with GitHub? |
We could also try to show the issue to the folks in the mentioned issue in the molecule-project? |
looking at robertdebock/docker-github-action-molecule@f9ef157 I don't see how you cover the installation of the 2 galaxy-collections now ( |
just as a note and test: checked for existance of the 2 collections in
|
Want to chat a bit? -> https://meet.jit.si/AnsibleChatting |
in ~10 minutes, ok? |
I now understand collections are included in Ansible 4 and Ansible 5. For what I understand the pip package
(See the In my case the Action was failing, because [tox]
minversion = 3.21.4
envlist = py{310}-ansible-{4,5}
skipsdist = true
[testenv]
deps =
4: ansible == 4.*
5: ansible == 5.*
molecule[docker]
docker == 5.*
ansible-lint == 5.*
commands = molecule test
setenv =
TOX_ENVNAME={envname}
PY_COLORS=1
ANSIBLE_FORCE_COLOR=1
ANSIBLE_ROLES_PATH=../
passenv = namespace image tag DOCKER_HOST |
I was able to reproduce the issue:
Now let's focus on fixing. |
observation: I disabled the first fails at |
I also saw the But; Continuing the search. |
Interesting; using Tox, this works. So, I'll compare the tox package list and the pip packages when not using tox. Without toxansible==5.2.0
ansible-lint==5.3.2
docker==5.0.3
molecule==3.5.2
molecule-docker==1.1.0
tox==3.24.5
testinfra==6.0.0
yamllint==1.26.3 With tox
Let me change the requirements.txt to be closer to what tox uses. |
sounds worth a try. I am a bit busy today and can't do much right now. |
Can you reproduce it locally as well? |
Have not tried that, what command do you use for that? Nevermind: docker run --privileged \
--volume $(pwd):/github/workspace/robertdebock/$(basename $(pwd)):z \
--volume /var/run/docker.sock:/var/run/docker.sock:z \
--tty --interactive --env \
command="lint" \
--env GITHUB_REPOSITORY="robertdebock/$(basename $(pwd))" \
--env ANSIBLE_ROLES_PATH="../" \
${docker_hash} |
As in your TESTING.md:
I wonder if it has to do with some capsuling at GitHub or so. But maybe I overthink here. For reference: I use Fedora 35 on my machine, docker version 20.10.12 |
That run is using "--privileged" ... maybe that makes a difference? |
If I'm correct the Ansible job write a file to store the job number or so. Maybe the writing of that file fails or is undone or so. I'm trying to reproduce locally. |
Locally it works. So, it must be related to GitHub. I'm going to guess that file that's used by Ansible is not writable or so. |
You can change the directory where Ansible saved the async status: ANSIBLE_ASYNC_DIR="/tmp/some_dir" Now figuring out how to integrate that into the action or Molecule. |
Yes, that seems to work I've added this to provisioner:
name: ansible
env:
ANSIBLE_ASYNC_DIR: "/tmp/ansible_async_dir" I'm not sure if the GitHub action should set that variable by default... Let me know what you think. |
sounds great. Will test later in the afternoon when I am on the train. |
I think this variable should be set in the action; it's only failing in the GitHub action. I'll release a new version (4.0.6) of the action a bit later. That would mean you can remove the last change in |
Released, so without changes this should start to work for you, when using version 4.0.6. |
looks good! -> https://github.com/stefangweichinger/ansible-rclone/actions/runs/1750585961 on my way now, reading and understanding later! thanks a lot so far |
@robertdebock So where did the change come from? With older releases of your container it worked. It's not very important to me but would be interesting, right? |
enabled the first https://github.com/stefangweichinger/ansible-rclone/actions/runs/1750585961 The logs says it pulls 4.0.5, while I define 4.0.6 in my workflow. |
So we had 2 issues here:
Right? I will rerun my pipeline and check why the version is reported wrong (or if that is gone now). I consider using |
The two issues:
Nice about tox; test multiple version of Ansible. (or python, but my strategy is to prove that Ansible is working, not that python is working...) Thanks a lot for you input, it helped me stay motivated and pickup new leads! Ready to close? |
Nearly ;-) Reran the pipelines and it pulls 4.0.5 again while I define 4.0.6? ideas? tagging issue maybe? But the pipeline works now. I will keep it in an extra branch for now, until I get home and feel sure about my stuff ;-) Sure, I can close this one asap. You're welcome, it was nice to chat to you. |
- @see stefangweichinger/ansible-rclone#105 - Re: pr25-fix-intermittent-non-zero-return-code
I noticed you are also experiencing issues with Molecule and the required collections in
prepare.yml
andverify.yml
.I have not found a solution for this issue... I think it's a Molecule issue really, but a workaround may help.
Let me know if you want to work together to find a solution. (mail: robert@meinit.nl)
Regards,
Robert.
The text was updated successfully, but these errors were encountered: