From 0ae6d7e4509f58453023cba8d3a273d757f8db25 Mon Sep 17 00:00:00 2001 From: Jeremy Ary Date: Thu, 14 Dec 2023 11:31:58 -0600 Subject: [PATCH] add .gitignore & PR open/merge actions --- .github/workflows/feast_apply_aws.yml | 35 ++++++++++++++++++++ .github/workflows/feast_plan_aws.yml | 46 +++++++++++++++++++++++++++ .gitignore | 14 ++++++++ .idea/.gitignore | 8 +++++ 4 files changed, 103 insertions(+) create mode 100644 .github/workflows/feast_apply_aws.yml create mode 100644 .github/workflows/feast_plan_aws.yml create mode 100644 .gitignore create mode 100644 .idea/.gitignore diff --git a/.github/workflows/feast_apply_aws.yml b/.github/workflows/feast_apply_aws.yml new file mode 100644 index 0000000..ba0e8eb --- /dev/null +++ b/.github/workflows/feast_apply_aws.yml @@ -0,0 +1,35 @@ +name: Feast apply (AWS) + +on: + push: + branches: + - main + +jobs: + feast_apply: + runs-on: ubuntu-latest + steps: + - name: Setup Python + id: setup-python + uses: actions/setup-python@v2 + with: + python-version: "3.12" + architecture: x64 + - name: Set up AWS SDK + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-1 + + # Run `feast apply` + - uses: actions/checkout@v2 + - name: Install feast + run: pip install "distutils feast[aws]" + - name: Run feast apply + env: + FEAST_USAGE: "False" + IS_TEST: "True" + run: | + cd module_0/feature_repo_aws + feast apply \ No newline at end of file diff --git a/.github/workflows/feast_plan_aws.yml b/.github/workflows/feast_plan_aws.yml new file mode 100644 index 0000000..4a8147b --- /dev/null +++ b/.github/workflows/feast_plan_aws.yml @@ -0,0 +1,46 @@ +name: Feast plan (AWS) + +on: [pull_request] + +jobs: + feast_plan: + runs-on: ubuntu-latest + steps: + - name: Setup Python + id: setup-python + uses: actions/setup-python@v2 + with: + python-version: "3.12" + architecture: x64 + - name: Set up AWS SDK + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-1 + + # Run `feast plan` + - uses: actions/checkout@v2 + - name: Install feast + run: pip install "disutils feast[aws]" + - name: Capture `feast plan` in a variable + id: feast_plan + env: + FEAST_USAGE: "False" + FEAST_FORCE_USAGE_UUID: None + IS_TEST: "True" + run: | + body=$(cd module_0/feature_repo_aws; feast plan) + body="${body//'%'/'%25'}" + body="${body//$'\n'/'%0A'}" + body="${body//$'\r'/'%0D'}" + echo "::set-output name=body::$body" + + # Post a comment on the PR with the results of `feast plan` + - name: Create comment + uses: peter-evans/create-or-update-comment@v1 + if: ${{ steps.feast_plan.outputs.body }} + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + ${{ steps.feast_plan.outputs.body }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2853b55 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +**/registry.db +**/online.db +.DS_Store +**/__pycache__ +terraform.tfstate +terraform.tfstate.backup +.terraform* +*.iml +**/feast-postgres-data/* +**/airflow_demo/airflow_home/* +.vscode/* +**/derby.log +**/metastore_db/* +.env \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml