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

in Replace: id matched 2 resources error can still be reached #754

Open
jfroy opened this issue Jul 21, 2024 · 6 comments
Open

in Replace: id matched 2 resources error can still be reached #754

jfroy opened this issue Jul 21, 2024 · 6 comments

Comments

@jfroy
Copy link
Contributor

jfroy commented Jul 21, 2024

Summary

My repo somehow still reproduces the in Replace: id matched 2 resources error originally reported in #707:

flux-local error:  Command 'flux build ks ingress-certificates --dry-run --kustomization-file /dev/stdin --path /pull/kubernetes/apps/ingress-certificates/ingress-certificates/app --namespace flux-system' failed with return code 1
✗ in Replace: id matched 2 resources

Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x7901797ae7a0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/usr/local/lib/python3.12/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 568, in close
    self._close(None)
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 592, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 795, in call_soon
    self._check_closed()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x7901797ae7a0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/usr/local/lib/python3.12/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 568, in close
    self._close(None)
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 592, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 795, in call_soon
    self._check_closed()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

This issue was originally filed about the RuntimeError: Event loop is closed error, which is a separate problem where flux does not exit cleanly after reporting an earlier error.

Reproduction

mkdir repro
cd repro
git clone https://github.com/jfroy/flatops -b flux-local-754-default default
git clone https://github.com/jfroy/flatops -b flux-local-754-pull pull
sudo chown -R 1001 *
docker run --rm --workdir $PWD -v $PWD/default:/default -v $PWD/pull:/pull ghcr.io/allenporter/flux-local:main diff kustomization --unified 6 --path /pull/kubernetes/flux --path-orig /default/kubernetes/flux --strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart" --limit-bytes 10000 --all-namespaces --sources "home-kubernetes" --output-file diff.patch
  • 2024-07-22: Updated repro steps to use tags for this issue
@jfroy
Copy link
Contributor Author

jfroy commented Jul 22, 2024

Ah I looked a bit closer at the logs and I think this is #707. So I think after that error happens flux-local just doesn't exit cleanly.

@jfroy
Copy link
Contributor Author

jfroy commented Jul 22, 2024

Hum, but you checked in a fix for this (#734), so this should not be happening anymore?

@allenporter
Copy link
Owner

Yeah, i think your assessment looks right. Yeah, thought that was fixed. What version of flux-local are you running? (I saw you had a fork and your own images so just want to make sure its not a version that is behind)

@jfroy
Copy link
Contributor Author

jfroy commented Jul 22, 2024

Yeah, i think your assessment looks right. Yeah, thought that was fixed. What version of flux-local are you running? (I saw you had a fork and your own images so just want to make sure its not a version that is behind)

I'll do another clean repro tomorrow using known-bad hashes from my repo (I've applied a workaround since reporting), but I am reasonably sure I reproduced with the above docker command, which pulls from your repo. But maybe the main label is not latest?

@allenporter
Copy link
Owner

Yep, i see you're right in your example above. Will have to take a closer look, thanks.

@jfroy
Copy link
Contributor Author

jfroy commented Jul 22, 2024

I've updated the reproduction steps to use stable tags for this issue.

@jfroy jfroy changed the title RuntimeError: Event loop is closed when diffing in my repo in Replace: id matched 2 resources error can still be reached Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants