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

🐛 Validate incorrect \n symbols in ssh key #8371

Merged
merged 9 commits into from
Dec 3, 2021

Conversation

sashaNeshcheret
Copy link
Contributor

@sashaNeshcheret sashaNeshcheret commented Dec 1, 2021

What

Previously if ssh key contains \n symbol it was recognized as separate symbols \ and n, and parsing key was incorrect.

How

Now we validate it and replace it with EOL symbol.

Recommended reading order

  1. x.java

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/SUMMARY.md
    • 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
  • Credentials added to Github CI. 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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the new connector version is published, connector version bumped in the seed directory 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

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.

@sashaNeshcheret sashaNeshcheret changed the title 🐛 Validate \n in ssh key 🐛 Validate incorrect \n symbols in ssh key Dec 1, 2021
@github-actions github-actions bot added the area/connectors Connector related issues label Dec 1, 2021
@sashaNeshcheret sashaNeshcheret temporarily deployed to more-secrets December 1, 2021 15:44 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-mariadb-columnstore

🕑 connectors/destination-mariadb-columnstore https://github.com/airbytehq/airbyte/actions/runs/1526582510
✅ connectors/destination-mariadb-columnstore https://github.com/airbytehq/airbyte/actions/runs/1526582510
No Python unittests run

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-mssql-strict-encrypt

🕑 connectors/destination-mssql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526584689
✅ connectors/destination-mssql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526584689
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-mssql

🕑 connectors/destination-mssql https://github.com/airbytehq/airbyte/actions/runs/1526587561
✅ connectors/destination-mssql https://github.com/airbytehq/airbyte/actions/runs/1526587561
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-mysql-strict-encrypt

🕑 connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526590335
✅ connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526590335
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-mysql

🕑 connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1526590406
✅ connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1526590406
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-oracle-strict-encrypt

🕑 connectors/destination-oracle-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526592125
❌ connectors/destination-oracle-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526592125
🐛 https://gradle.com/s/gtq5w225pv6f6

@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:50 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-oracle

🕑 connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1526592778
❌ connectors/destination-oracle https://github.com/airbytehq/airbyte/actions/runs/1526592778
🐛 https://gradle.com/s/lbh76u2pv56d4

@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:51 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:51 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-postgres-strict-encrypt

🕑 connectors/destination-postgres-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526596928
✅ connectors/destination-postgres-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526596928
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/destination-postgres

🕑 connectors/destination-postgres https://github.com/airbytehq/airbyte/actions/runs/1526597558
✅ connectors/destination-postgres https://github.com/airbytehq/airbyte/actions/runs/1526597558
Python tests coverage:

	 ---------- coverage: platform linux, python 3.8.10-final-0 -----------
	 Name                                                              Stmts   Miss  Cover
	 -------------------------------------------------------------------------------------
	 main_dev_transform_catalog.py                                         3      3     0%
	 main_dev_transform_config.py                                          3      3     0%
	 normalization/__init__.py                                             4      0   100%
	 normalization/destination_type.py                                    12      0   100%
	 normalization/transform_catalog/__init__.py                           2      0   100%
	 normalization/transform_catalog/catalog_processor.py                143     77    46%
	 normalization/transform_catalog/destination_name_transformer.py     120      6    95%
	 normalization/transform_catalog/reserved_keywords.py                 11      0   100%
	 normalization/transform_catalog/stream_processor.py                 468    287    39%
	 normalization/transform_catalog/table_name_registry.py              174     34    80%
	 normalization/transform_catalog/transform.py                         45     26    42%
	 normalization/transform_catalog/utils.py                             33      7    79%
	 normalization/transform_config/__init__.py                            2      0   100%
	 normalization/transform_config/transform.py                         140     29    79%
	 -------------------------------------------------------------------------------------
	 TOTAL                                                              1160    472    59%

@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:52 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:52 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:52 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:53 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:53 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 1, 2021 15:54 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/source-clickhouse-strict-encrypt

🕑 connectors/source-clickhouse-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526663835
✅ connectors/source-clickhouse-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1526663835
No Python unittests run

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 1, 2021

/test connector=connectors/source-clickhouse

🕑 connectors/source-clickhouse https://github.com/airbytehq/airbyte/actions/runs/1526664213
✅ connectors/source-clickhouse https://github.com/airbytehq/airbyte/actions/runs/1526664213
No Python unittests run

@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 14:31 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 14:32 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 14:32 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 14:32 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 14:32 Inactive
@sashaNeshcheret sashaNeshcheret temporarily deployed to more-secrets December 3, 2021 16:03 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-mysql-strict-encrypt

🕑 connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536030413
✅ connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536030413

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-mysql

🕑 connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1536031632
✅ connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1536031632

@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:18 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:18 Inactive
@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-postgres-strict-encrypt

🕑 connectors/destination-postgres-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536063155
✅ connectors/destination-postgres-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536063155

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-postgres

🕑 connectors/destination-postgres https://github.com/airbytehq/airbyte/actions/runs/1536063646
✅ connectors/destination-postgres https://github.com/airbytehq/airbyte/actions/runs/1536063646

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-mysql-strict-encrypt

🕑 connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536065110
❌ connectors/destination-mysql-strict-encrypt https://github.com/airbytehq/airbyte/actions/runs/1536065110

@sashaNeshcheret
Copy link
Contributor Author

sashaNeshcheret commented Dec 3, 2021

/publish connector=connectors/destination-mysql

🕑 connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1536065620
❌ connectors/destination-mysql https://github.com/airbytehq/airbyte/actions/runs/1536065620

@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:27 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:27 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:27 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 16:27 Inactive
Copy link
Contributor

@alexandr-shegeda alexandr-shegeda left a comment

Choose a reason for hiding this comment

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

LGTM. we can proceed with publishing without airbyte review

@sashaNeshcheret sashaNeshcheret temporarily deployed to more-secrets December 3, 2021 17:51 Inactive
@sashaNeshcheret sashaNeshcheret merged commit fcf7491 into master Dec 3, 2021
@sashaNeshcheret sashaNeshcheret deleted the oneshcheret/7194-validate-ssh-key branch December 3, 2021 18:11
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* 🐛 Validate \n in ssh key

* bump versions for ssh key connectors

* update versions for ssh key connectors

* temporal fix for checking failed tests

* revert temp changes and destination oracle version

* bump versions in config for ssh key related connectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Postgres: add validation step for SSH keys when has \n when creating a source
6 participants