Hi, I am currently trying octavia-cli to make repr...
# replication-troubleshooting
a
Hi, I am currently trying octavia-cli to make reproducible dev environment across my organization. I have succesfully
octavia import all
and my goal is to checkin all the manifest in the git repo, so my work colleague can just
octavia apply
to configure their local airbyte. However when I tried, I got this exception:
Copy code
πŸ™ - Octavia is targetting your Airbyte instance running at <http://localhost:8000> on workspace 419064f1-2e08-480c-be95-69c932d2a463.
πŸ™ - TimescaleDB (tracking_db) exists on your Airbyte instance according to your state file, let's check if we need to update it!
😴 - Did not update because no change detected.

πŸ™ - MySQL (space_database) exists on your Airbyte instance according to your state file, let's check if we need to update it!
😴 - Did not update because no change detected.

πŸ™ - MySQL (user_info_database) exists on your Airbyte instance according to your state file, let's check if we need to update it!
😴 - Did not update because no change detected.

πŸ™ - MySQL (space_database) <> TimescaleDB (tracking_db) does not exists on your Airbyte instance, let's create it!
Traceback (most recent call last):
  File "/usr/local/bin/octavia", line 8, in <module>
    sys.exit(octavia())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/base_commands.py", line 54, in invoke
    raise e
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/base_commands.py", line 51, in invoke
    result = super().invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/check_context.py", line 91, in wrapper
    f(ctx, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/apply/commands.py", line 29, in apply
    apply_single_resource(resource, force)
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/apply/commands.py", line 66, in apply_single_resource
    messages = create_resource(resource)
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/apply/commands.py", line 127, in create_resource
    created_resource, state = resource.create()
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/apply/resources.py", line 696, in create
    return self._create_or_update(self._create_fn, self.create_payload)
  File "/usr/local/lib/python3.9/site-packages/octavia_cli/apply/resources.py", line 670, in create_payload
    return WebBackendConnectionCreate(
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model_utils.py", line 46, in wrapped_init
    return fn(_self, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model/web_backend_connection_create.py", line 345, in __init__
    setattr(self, var_name, var_value)
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model_utils.py", line 185, in __setattr__
    self[attr] = value
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model_utils.py", line 510, in __setitem__
    self.set_attribute(name, value)
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model_utils.py", line 157, in set_attribute
    value = validate_and_convert_types(
  File "/usr/local/lib/python3.9/site-packages/airbyte_api_client/model_utils.py", line 1582, in validate_and_convert_types
    raise get_type_error(input_value, path_to_item, valid_classes,
airbyte_api_client.exceptions.ApiTypeError: Invalid type for variable 'geography'. Required value type is Geography and passed type was str at ['geography']
πŸ‘ 1
I am not sure how to troubleshoot this problem.
It seems it comes from the generated code (from OpenAPI).
m
Looks it failed when try to create the connection between the MySQL and Timescale database. Do you have a column called
geografy
in MySQL?
a
I just checked, and I don't have
geography
column in the database source (MySQL).
I think it has something to do with parsing the API schema object itself. In the
connection.yaml
from
octavia import all
command, there is
geography
object here.
Okay, I solved this by installing
octavia-cli
with version v0.40.14
Copy code
curl -s -o- <https://raw.githubusercontent.com/airbytehq/airbyte/v0.40.14/octavia-cli/install.sh> | bash
That's the most recent version before the openapi/config.yaml introduced the
Geography
data model in the API spec.
πŸ™ 1
m
What version are you using before? I’ll create an issue in Github
a
I don't remember the version. The one which is broken was installed from the
master
branch (that's what the octavia installation guideline wrote). Since no
--version
in the octavia cli, i don't know which version it is.
i
@Agung Pratama v0.40.14 didn’t work for me though. don’t you have an idea of what else might be fixed?
a
@Igor i deleted some field in the configuration.yaml (e.g: schema related fields that's not recognized on v0.40.14 octavia cli) so that the cli can process the configuration.
i
@Agung Pratama thank you so much!
For those who are also struggling, I also removed from the yaml the following attributes: schema_change, notify_schema_changes, non_breaking_changes_preference
❀️ 2
d
@Igor @Agung Pratama these fields to be removed in ocatavia version 0.40.14? and do we need to maintain airbyte also same version i.e. 40.14?
i
@Dheeraj Pranav yes, you should remove those fields for octavia version 0.40.14 but it is not necessary to switch your Airbyte version
d
Thanks it worked by removing those parms, but I've used 0.40.18 of octavia