airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

13758: SSH control host port setting not used when tunneling

Open kimerinn opened this issue 2 years ago • 5 comments

What

SSH port is ignored when tunneling

How

SSH port aded to tunneling script

Recommended reading order

  1. 'airbyte-workers/src/main/resources/sshtunneling.sh'

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • [ ] Community member? Grant edit access to maintainers (instructions)
  • [ ] Secrets in the connector's spec are annotated with airbyte_secret
  • [ ] Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • [ ] Code reviews completed
  • [ ] Documentation updated
    • [ ] Connector's README.md
    • [ ] Connector's bootstrap.md. See description and examples
    • [ ] docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • [ ] docs/integrations/README.md
    • [ ] airbyte-integrations/builds.md
  • [ ] PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • [ ] Create a non-forked branch based on this PR and test the below items on it
  • [ ] Build is successful
  • [ ] If new credentials are required for use in CI, add them to GSM. Instructions.
  • [ ] /test connector=connectors/<name> command is passing
  • [ ] New Connector version released on Dockerhub by running the /publish command described here
  • [ ] After the connector is published, connector added to connector index as described here
  • [ ] Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here
Updating a connector

Community member or Airbyter

  • [ ] Grant edit access to maintainers (instructions)
  • [ ] Secrets in the connector's spec are annotated with airbyte_secret
  • [ ] Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • [ ] Code reviews completed
  • [ ] Documentation updated
    • [ ] Connector's README.md
    • [ ] Connector's bootstrap.md. See description and examples
    • [ ] Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • [ ] PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • [ ] Create a non-forked branch based on this PR and test the below items on it
  • [ ] Build is successful
  • [ ] If new credentials are required for use in CI, add them to GSM. Instructions.
  • [ ] /test connector=connectors/<name> command is passing
  • [ ] New Connector version released on Dockerhub and connector version bumped by running the /publish command described here
Connector Generator
  • [ ] Issue acceptance criteria met
  • [ ] PR name follows PR naming conventions
  • [ ] If adding a new generator, add it to the list of scaffold modules being tested
  • [ ] The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • [ ] Documentation which references the generator is updated as needed

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

kimerinn avatar Jun 30 '22 11:06 kimerinn

/test connector=connectors/destination-redshift

:clock2: connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/2622557381 :white_check_mark: connectors/destination-redshift https://github.com/airbytehq/airbyte/actions/runs/2622557381 Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 13      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    13      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     155      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         162     34    79%
normalization/transform_catalog/utils.py                             38      9    76%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 570    377    34%
-------------------------------------------------------------------------------------
TOTAL                                                              1363    587    57%

Build Passed

Test summary info:

All Passed

kimerinn avatar Jul 06 '22 11:07 kimerinn

FYI this script is used for ssh tunnelling during normalization, so will require bumping version and publishing normalization

Phlair avatar Jul 06 '22 15:07 Phlair

Seems, normalization does not work at all. Should be fixed to unblock this issue

Caused by: io.airbyte.workers.exception.WorkerException: Could not find image: airbyte/normalization-mysql:0.2.7 at io.airbyte.workers.process.DockerProcessFactory.create(DockerProcessFactory.java:97) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.normalization.DefaultNormalizationRunner.runProcess(DefaultNormalizationRunner.java:123) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.normalization.DefaultNormalizationRunner.normalize(DefaultNormalizationRunner.java:108) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.general.DefaultNormalizationWorker.run(DefaultNormalizationWorker.java:58) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.general.DefaultNormalizationWorker.run(DefaultNormalizationWorker.java:21) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.temporal.TemporalAttemptExecution.lambda$getWorkerThread$2(TemporalAttemptExecution.java:158) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] ... 1 more

kimerinn avatar Jul 13 '22 11:07 kimerinn

Seems, normalization does not work at all. Should be fixed to unblock this issue

Caused by: io.airbyte.workers.exception.WorkerException: Could not find image: airbyte/normalization-mysql:0.2.7 at io.airbyte.workers.process.DockerProcessFactory.create(DockerProcessFactory.java:97) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.normalization.DefaultNormalizationRunner.runProcess(DefaultNormalizationRunner.java:123) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.normalization.DefaultNormalizationRunner.normalize(DefaultNormalizationRunner.java:108) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.general.DefaultNormalizationWorker.run(DefaultNormalizationWorker.java:58) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.general.DefaultNormalizationWorker.run(DefaultNormalizationWorker.java:21) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] at io.airbyte.workers.temporal.TemporalAttemptExecution.lambda$getWorkerThread$2(TemporalAttemptExecution.java:158) ~[io.airbyte-airbyte-workers-0.39.34-alpha.jar:?] ... 1 more

What is the GH issue that tracks broken normalization, which blocks this PR?

grishick avatar Jul 13 '22 21:07 grishick

I see that the tunnel port appeared in the ssh command to open the tunnel, but have you tested these changes in the script using a tunnel port other than 22?

Yes, checked on SSH bastion with 2222 port and Postgres destination

kimerinn avatar Jul 27 '22 11:07 kimerinn

/test connector=bases/base-normalization

:clock2: bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2774488740 :x: bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2774488740 :bug:

kimerinn avatar Aug 01 '22 11:08 kimerinn

/test connector=bases/base-normalization

:clock2: bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2785727528 :white_check_mark: bases/base-normalization https://github.com/airbytehq/airbyte/actions/runs/2785727528 Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 13      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    13      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     157      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         168     34    80%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 589    394    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1403    609    57%
Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
source_acceptance_test/utils/__init__.py                 6      0   100%
source_acceptance_test/tests/__init__.py                 4      0   100%
source_acceptance_test/__init__.py                       2      0   100%
source_acceptance_test/tests/test_full_refresh.py       52      2    96%
source_acceptance_test/utils/asserts.py                 37      2    95%
source_acceptance_test/config.py                        81      6    93%
source_acceptance_test/utils/json_schema_helper.py     105     13    88%
source_acceptance_test/tests/test_incremental.py       121     25    79%
source_acceptance_test/utils/common.py                  77     17    78%
source_acceptance_test/tests/test_core.py              328    121    63%
source_acceptance_test/utils/compare.py                 62     23    63%
source_acceptance_test/base.py                          10      4    60%
source_acceptance_test/utils/connector_runner.py       110     48    56%
------------------------------------------------------------------------
TOTAL                                                  995    261    74%
Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 13      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    13      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     157      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         168     34    80%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 589    394    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1403    609    57%
Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 13      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    13      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/utils.py                             51      1    98%
normalization/transform_catalog/destination_name_transformer.py     157      5    97%
normalization/transform_catalog/stream_processor.py                 589     35    94%
normalization/transform_catalog/catalog_processor.py                147     12    92%
normalization/transform_catalog/dbt_macro.py                         22      3    86%
normalization/transform_catalog/table_name_registry.py              174     51    71%
normalization/transform_catalog/transform.py                         61     22    64%
normalization/transform_config/transform.py                         168     62    63%
-------------------------------------------------------------------------------------
TOTAL                                                              1403    191    86%

Build Passed

Test summary info:

	 =========================== short test summary info ============================
	 SKIPPED [1] integration_tests/test_ephemeral.py:61: Destinations DestinationType.MYSQL is not in NORMALIZATION_TEST_TARGET env variable (MYSQL is also skipped)
	 SKIPPED [1] integration_tests/test_normalization.py:143: DestinationType.CLICKHOUSE is disabled as it doesnt support schema change in incremental yet (column type changes)
	 SKIPPED [1] integration_tests/test_normalization.py:81: Destinations DestinationType.CLICKHOUSE does not support nested streams
	 SKIPPED [1] integration_tests/test_normalization.py:146: DestinationType.MSSQL is disabled as it doesnt fully support schema change in incremental yet
	 SKIPPED [2] integration_tests/test_normalization.py:134: DestinationType.MYSQL does not support incremental yet
	 SKIPPED [1] integration_tests/test_normalization.py:134: DestinationType.ORACLE does not support incremental yet
	 SKIPPED [1] integration_tests/test_normalization.py:81: Destinations DestinationType.ORACLE does not support nested streams
	 SKIPPED [1] integration_tests/test_normalization.py:143: DestinationType.SNOWFLAKE is disabled as it doesnt support schema change in incremental yet (column type changes)
	 [32m================== [32m[1m25 passed[0m, [33m9 skipped[0m[32m in 3711.13s (1:01:51)[0m[32m ==================[0m
	 =========================== short test summary info ============================
	 SKIPPED [1] integration_tests/test_ephemeral.py:61: Destinations DestinationType.MYSQL is not in NORMALIZATION_TEST_TARGET env variable (MYSQL is also skipped)
	 SKIPPED [1] integration_tests/test_normalization.py:143: DestinationType.CLICKHOUSE is disabled as it doesnt support schema change in incremental yet (column type changes)
	 SKIPPED [1] integration_tests/test_normalization.py:81: Destinations DestinationType.CLICKHOUSE does not support nested streams
	 SKIPPED [1] integration_tests/test_normalization.py:146: DestinationType.MSSQL is disabled as it doesnt fully support schema change in incremental yet
	 SKIPPED [2] integration_tests/test_normalization.py:134: DestinationType.MYSQL does not support incremental yet
	 SKIPPED [1] integration_tests/test_normalization.py:134: DestinationType.ORACLE does not support incremental yet
	 SKIPPED [1] integration_tests/test_normalization.py:81: Destinations DestinationType.ORACLE does not support nested streams
	 SKIPPED [1] integration_tests/test_normalization.py:143: DestinationType.SNOWFLAKE is disabled as it doesnt support schema change in incremental yet (column type changes)
	 [32m================== [32m[1m25 passed[0m, [33m9 skipped[0m[32m in 3135.35s (0:52:15)[0m[32m ==================[0m

kimerinn avatar Aug 02 '22 22:08 kimerinn

/deploy connector=bases/base-normalization

kimerinn avatar Aug 03 '22 08:08 kimerinn

/publish connector=bases/base-normalization

:clock2: Publishing the following connectors:
bases/base-normalization
https://github.com/airbytehq/airbyte/actions/runs/2788895959

Connector Did it publish? Were definitions generated?
bases/base-normalization :white_check_mark: :x:

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

kimerinn avatar Aug 03 '22 11:08 kimerinn

/publish connector=bases/base-normalization

:clock2: Publishing the following connectors:
bases/base-normalization
https://github.com/airbytehq/airbyte/actions/runs/2795876404

Connector Did it publish? Were definitions generated?
bases/base-normalization :white_check_mark: :x:

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

kimerinn avatar Aug 04 '22 10:08 kimerinn

Merged, as normalization does not need definition generation

kimerinn avatar Aug 04 '22 22:08 kimerinn