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

feat(airflow): improve setup script and add 1Password CLI integration #77

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

sasa-tomic
Copy link
Member

Changes

  • README Update: Clarifies that S3 Logging is for production Kubernetes deployments.

  • Script Enhancements:

    • Uses set -eEuo pipefail for more robust bash scripting.
    • Defines additional utility directories and sets environment variables accordingly.
    • Adds functions for installing and configuring 1Password CLI (install_1pass_cli, login_1pass).
    • Sets up Airflow variables and connections using 1Password credentials.
  • User Interaction: Adds conditional prompt to setup Airflow variables and connections, optional for local runs.

  • Multi-functional Handling:

    • Introduces a check to prevent concurrent Airflow instances.
    • Enhances the existing 'unlockdb' functionality to support 'standalone' mode.
  • Command Execution: Updates execution to use defined utility paths.

### Added
- `set -eEuo pipefail` options for a more robust script.
- Function `install_1pass_cli` to automate 1Password CLI installation for both Linux and macOS.
- Function `login_1pass` to handle 1Password login processes.
- Function `setup_airflow_variables_and_connections` to configure Airflow connections and variables using 1Password.
- Interactive prompt to optionally set up Airflow variables and connections.
- Logic to prevent multiple instances of Airflow standalone mode.

### Changed
- Updated the description of S3 logging storage in `README.md` for production clarification.

### Fixed
- Removed redundant environment variable exports and restructured script for clarity.
@sasa-tomic sasa-tomic requested a review from a team as a code owner January 22, 2025 17:17
@sasa-tomic sasa-tomic self-assigned this Jan 22, 2025
Copy link
Contributor

@NikolaMilosa NikolaMilosa left a comment

Choose a reason for hiding this comment

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

Looks pretty amazing

@sasa-tomic sasa-tomic merged commit cd9cebe into main Jan 23, 2025
3 checks passed
@sasa-tomic sasa-tomic deleted the feature/enhance-airflow-setup-script branch January 23, 2025 15:40
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.

3 participants