Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@anshbansal
Copy link
Collaborator

@anshbansal anshbansal commented Jul 18, 2025

In case defaultCliVersion is set incorrectly.

Some devs saw this

[2025-07-16 16:51:03,842] ERROR    {datahub.entrypoints:247} - Command failed: Invalid version: '0.3.12rc3-acryl'
Traceback (most recent call last):
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/entrypoints.py", line 234, in main
    sys.exit(datahub(standalone_mode=False, **kwargs))
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/telemetry/telemetry.py", line 482, in wrapper
    raise e
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/telemetry/telemetry.py", line 430, in wrapper
    res = func(*args, **kwargs)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/telemetry/telemetry.py", line 482, in wrapper
    raise e
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/telemetry/telemetry.py", line 430, in wrapper
    res = func(*args, **kwargs)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/upgrade/upgrade.py", line 468, in async_wrapper
    ret = func(*args, **kwargs)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/cli/ingest_cli.py", line 181, in run
    ret = run_pipeline_to_completion(pipeline)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/cli/ingest_cli.py", line 143, in run_pipeline_to_completion
    raise e
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/cli/ingest_cli.py", line 135, in run_pipeline_to_completion
    pipeline.run()
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/ingestion/run/pipeline.py", line 444, in run
    self._warn_old_cli_version()
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/ingestion/run/pipeline.py", line 357, in _warn_old_cli_version
    version_stats = retrieve_version_stats(timeout=2.0, graph=self.graph)
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/upgrade/upgrade.py", line 201, in retrieve_version_stats
    loop.run_until_complete(_get_version_with_timeout())
  File "/Users/skrydal/.pyenv/versions/3.10.14/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/upgrade/upgrade.py", line 196, in _get_version_with_timeout
    version_stats = await asyncio.wait_for(stats_future, timeout=timeout)
  File "/Users/skrydal/.pyenv/versions/3.10.14/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/src/datahub/upgrade/upgrade.py", line 237, in _retrieve_version_stats
    version=Version(current_server_default_cli_version),
  File "/Users/skrydal/repos/oss-datahub/metadata-ingestion/venv/lib/python3.10/site-packages/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: {version!r}")
packaging.version.InvalidVersion: Invalid version: '0.3.12rc3-acryl'

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jul 18, 2025
@codecov
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
metadata-ingestion/src/datahub/upgrade/upgrade.py 28.57% 5 Missing ⚠️

❌ Your patch status has failed because the patch coverage (28.57%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jul 18, 2025
Copy link
Contributor

@sgomezvillamor sgomezvillamor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're generating invalid versions, shouldn't we identify and fix the root cause as soon as possible, rather than just handling it gracefully?

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Jul 18, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Jul 18, 2025
@anshbansal anshbansal merged commit d679973 into master Jul 18, 2025
59 of 60 checks passed
@anshbansal anshbansal deleted the ab-2025-jul-18-handle-safely-invalid-version branch July 18, 2025 08:52
kartikey-visa pushed a commit to kartikey-visa/datahub that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants