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

Clean up Docker compose env vars. #9209

Merged
merged 12 commits into from
Jan 3, 2022
Merged

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented Dec 30, 2021

What

  • sort docker env vars.
  • remove all non-docker related env vars.
  • add what is missing.

How

For the .env file:

  • sort the file to match the Configs.java lay out for better reading.
  • get rid of env vars that are not used in docker
  • get rid of env vars that have defaults, with the exception of var that are for scaling e.g. submitter_num_threads, worker related vars to prevent the env file from getting too large
  • add a header to clarify when/where to add env vars to the file

For the docker compose file:

  • sort the env vars alphabetically
  • get rid of env vars that aren't used in that application
  • add missing env vars into the worker application

Recommended reading order

  1. .env to see the new layout.
  2. docker-compose.yaml
  3. remaining files

🚨 User Impact 🚨

Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.

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.

@davinchia davinchia temporarily deployed to more-secrets December 30, 2021 11:42 Inactive
@alafanechere
Copy link
Contributor

@davinchia do you plan to add MAX_*_WORKERS env vars to the docker-compose file in this PR?

@davinchia
Copy link
Contributor Author

@alafanechere yes I will.

@davinchia davinchia temporarily deployed to more-secrets December 31, 2021 11:20 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 13:34 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 13:44 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 13:48 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 14:13 Inactive
@@ -53,8 +53,6 @@
public static final String CONFIG_DATABASE_PASSWORD = "CONFIG_DATABASE_PASSWORD";
public static final String CONFIG_DATABASE_URL = "CONFIG_DATABASE_URL";
public static final String RUN_DATABASE_MIGRATION_ON_STARTUP = "RUN_DATABASE_MIGRATION_ON_STARTUP";
public static final String LOG_LEVEL = "LOG_LEVEL";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is only used in the log4j configuration - leaving this here seemed more confused than not.

SECRET_PERSISTENCE=NONE

# State Cloud Storage
STATE_STORAGE_S3_BUCKET_NAME=
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the state related env vars for now since they aren't used yet.

@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 14:24 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 1, 2022 14:30 Inactive
Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

Nice work, I have a minor comment related to the removal of variables related to logging on blob storage.

Comment on lines -66 to -73
S3_LOG_BUCKET=
S3_LOG_BUCKET_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_MINIO_ENDPOINT=
S3_PATH_STYLE_ACCESS=

GCS_LOG_BUCKET=
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we update this documentation to suggest users add these variables to the .env if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap! I am following up with #9249

@davinchia davinchia temporarily deployed to more-secrets January 3, 2022 14:48 Inactive
@davinchia davinchia temporarily deployed to more-secrets January 3, 2022 14:49 Inactive
@davinchia davinchia merged commit c9adee6 into master Jan 3, 2022
@davinchia davinchia deleted the davinchia/clean-up-docker-build branch January 3, 2022 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants