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

Framework crashes during version check against ES with a version qualifier #3231

Closed
jedrazb opened this issue Feb 24, 2025 · 0 comments · Fixed by #3232
Closed

Framework crashes during version check against ES with a version qualifier #3231

jedrazb opened this issue Feb 24, 2025 · 0 comments · Fixed by #3232
Assignees
Labels
bug Something isn't working v9.0.0

Comments

@jedrazb
Copy link
Member

jedrazb commented Feb 24, 2025

Bug Description

Starting a framework against a ES cluster with a version qualifier crashes the version check logic

To Reproduce

Try to run against ES with version qualifier, e.g. -beta1

This is the traceback against ES with 9.0.0-beta1

.venv/bin/elastic-ingest
[FMWK][08:53:46][INFO] Running connector service version 9.0.0-beta1
[FMWK][08:53:46][INFO] Loading config from /Users/jedr/connectors-python/connectors/../config.yml
[FMWK][08:53:46][INFO] Running preflight checks
[FMWK][08:53:46][INFO] Waiting for Elasticsearch at https://a4f63edb38f44180b272028a8cd7bece.us-west2.gcp.elastic-cloud.com:443 (so far: 0 secs)
[FMWK][08:53:47][INFO] Bye
Traceback (most recent call last):
  File "/Users/jedr/connectors-python/.venv/bin/elastic-ingest", line 33, in <module>
    sys.exit(load_entry_point('elasticsearch-connectors', 'console_scripts', 'elastic-ingest')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/service_cli.py", line 234, in main
    return run(action, config_file, log_level, filebeat, service_type, uvloop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/service_cli.py", line 173, in run
    return loop.run_until_complete(coro)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/service_cli.py", line 49, in _start_service
    success, is_serverless = await preflight.run()
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/preflight_check.py", line 45, in run
    success, is_serverless = await self._check_es_server()
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/preflight_check.py", line 82, in _check_es_server
    versions_compatible = await self._versions_compatible(version.get("number"))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedr/connectors-python/connectors/preflight_check.py", line 91, in _versions_compatible
    es_version_parts = list(
                       ^^^^^
ValueError: invalid literal for int() with base 10: '0-beta1'

Expected behavior

Version qualifier should not crash the version check

@jedrazb jedrazb added the bug Something isn't working label Feb 24, 2025
@jedrazb jedrazb self-assigned this Feb 24, 2025
@jedrazb jedrazb added the v9.0.0 label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v9.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant