Skip to content

🐙 octavia-cli: implement init command #9665

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

Merged
merged 2 commits into from
Feb 3, 2022

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Jan 20, 2022

What

In order to create and manage configurations, we want them to be stored in a specific project directory architecture.
This PR implement octavia init command that will create the directory architecture in the current working directory:

.
├── connections
├── destinations
└── sources

How

  • Declare a new init command which creates required directories in current working directory.

  • Nondestructive approach: the init command does not recreate subdirectories that already exist.

  • Add to the CLI context the PROJECT_IS_INITIALIZED boolean to enable other command to not run if project is not initialized.

  • Bonus:

    • Allow users to pass a custom workspace id in the CLI options or through envvar
    • Check Airbyte API is reachable and healthy

Recommended reading order

  1. octavia-cli/octavia_cli/init/commands.py + octavia-cli/unit_tests/test_init/test_commands.py
  2. octavia-cli/octavia_cli/check_context.py + octavia-cli/unit_tests/test_check_context.py
  3. octavia-cli/octavia_cli/entrypoint.py + octavia-cli/unit_tests/test_entrypoin.py

🚨 User Impact 🚨

New octavia init command:
Screen Shot 2022-01-25 at 22 43 32

Coming next

Our execution plan

@alafanechere alafanechere force-pushed the augustin/octavia-cli/list-sources-destinations branch from 37ae4e3 to 88bfbb2 Compare January 25, 2022 09:01
Base automatically changed from augustin/octavia-cli/list-sources-destinations to master January 25, 2022 09:12
@alafanechere alafanechere force-pushed the augustin/octavia-cli/init-command branch from a4ee3d6 to 25bff28 Compare January 25, 2022 09:15
@alafanechere alafanechere temporarily deployed to more-secrets January 25, 2022 09:17 Inactive
@alafanechere alafanechere temporarily deployed to more-secrets January 25, 2022 21:21 Inactive
@alafanechere alafanechere force-pushed the augustin/octavia-cli/init-command branch from bb4295a to 07e63f9 Compare January 25, 2022 21:23
@alafanechere alafanechere temporarily deployed to more-secrets January 25, 2022 21:24 Inactive
@alafanechere alafanechere force-pushed the augustin/octavia-cli/init-command branch from 07e63f9 to 3523d46 Compare January 25, 2022 21:38
@alafanechere alafanechere temporarily deployed to more-secrets January 25, 2022 21:40 Inactive
@alafanechere alafanechere force-pushed the augustin/octavia-cli/init-command branch from 3523d46 to 7886001 Compare January 25, 2022 21:43
@alafanechere alafanechere temporarily deployed to more-secrets January 25, 2022 21:44 Inactive
@alafanechere alafanechere marked this pull request as ready for review January 25, 2022 21:52
@alafanechere alafanechere self-assigned this Jan 27, 2022
@alafanechere alafanechere added this to the USE 2022-02-07 milestone Jan 31, 2022
Copy link
Contributor

@lmossman lmossman left a comment

Choose a reason for hiding this comment

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

LGTM! Left a couple small suggestions and question but nothing is blocking, so feel free to merge when ready!

@alafanechere
Copy link
Contributor Author

Thank you @lmossman for the review, I improved the error messages as you suggested.

@alafanechere alafanechere temporarily deployed to more-secrets February 3, 2022 12:30 Inactive
@alafanechere alafanechere merged commit a73ed08 into master Feb 3, 2022
@alafanechere alafanechere deleted the augustin/octavia-cli/init-command branch February 3, 2022 12:40
@alafanechere alafanechere removed this from the USE 2022-02-07 milestone Feb 28, 2022
@alafanechere alafanechere added this to the octavia-cli-alpha milestone Feb 28, 2022
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.

2 participants