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

Add new workflow #462

Merged
merged 13 commits into from
Jul 26, 2024
Merged

Add new workflow #462

merged 13 commits into from
Jul 26, 2024

Conversation

amishas157
Copy link
Contributor

@amishas157 amishas157 commented Jul 25, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the README with the added features, breaking changes, new instructions on how to use the repository.

What

This PR adds a new github workflow that:

  • allows to select branch and environment
  • Deploy to dev/prod (in this PR, we are only triggering dev deploy) . I will create a follow up PR for prod deploy steps

This also turns off dev-to-deploy step as it is not really used currently.

Why

Improve the release workflow.

Known limitations

None

@amishas157 amishas157 requested review from a team and removed request for a team July 25, 2024 17:50
@amishas157 amishas157 marked this pull request as ready for review July 25, 2024 18:47
@amishas157 amishas157 requested a review from a team as a code owner July 25, 2024 18:47
components install kubectl && gcloud composer environments run
$COMPOSER_ENVIRONMENT --location $LOCATION variables import
-- gcsfuse/actual_mount_path/variables.json
# deploy-to-dev:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this commented code copy and pasted to the new cicd? If so do you think it's worthwhile to keep it commented here or just delete it? We can also always look at git commit history for the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep it is part of new workflow. We can 🔪 it for once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bc4e563

on:
workflow_dispatch:
inputs:
envName:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wanted to confirm; does envName get converted to inputs.env_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.

Uff no. That's my bad. Let me change it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bc4e563

@amishas157 amishas157 force-pushed the github-actions-for-release-proces branch from 09a3d0e to 7ae39fd Compare July 25, 2024 23:22
get past off annotation error

fool tests a bit
@amishas157 amishas157 force-pushed the github-actions-for-release-proces branch from 7ae39fd to 7085f2f Compare July 25, 2024 23:25
Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

@amishas157 changes are looking good. I did have an overall design question. In your design doc, it proposed that deploys to either env (test, prod) should only come from the master branch. This PR, however, allows the developer to deploy to test off of any branch as needed (no review required).

What were your thoughts on the dev workflow?

  • Dev commits feature branch
  • when ready, selects branch name and deploys to test
  • deploy ci executes

Is this correct?

Comment on lines -72 to -73
- name: Pytest
run: pytest dags/
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know how useful it is to keep the tests job if we aren't actually running the Airflow unit tests.
In the current workflow definition, the first time that the Airflow unit tests will execute is on deploy. Is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, my plan is to remove ci-cd.yml completely. However. the tests job is a required workflow to merge PR. Therefore, I kept it such that it passes.
Once the testing for deploy.yml is done, I will remove this file altogether

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhhhh okie

@amishas157
Copy link
Contributor Author

changes are looking good. I did have an overall design question. In your design doc, it proposed that deploys to either env (test, prod) should only come from the master branch. This PR, however, allows the developer to deploy to test off of any branch as needed (no review required).
What were your thoughts on the dev workflow?
Dev commits feature branch
when ready, selects branch name and deploys to test
deploy ci executes
Is this correct?

Yes, that's still correct. I am currently using this PR to test my changes by deploying to dev. Unfortunately, github actions does not allow testing workflow before merging.

One the tests look good, my plan is to create followup PR to:

  • Use if / else based on envName selected and deploy corresponding env
  • Block prod deploy from non-master branch

@sydneynotthecity
Copy link
Contributor

Sounds good, thanks for clarifying

@amishas157 amishas157 merged commit 81e6f0e into master Jul 26, 2024
2 checks passed
@amishas157 amishas157 deleted the github-actions-for-release-proces branch July 26, 2024 18:48
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