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

[DAR-3431][External] Adding passing E2E tests as a requirement to release #903

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/EVENT_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ jobs:
needs: validate_tag
uses: ./.github/workflows/JOB_tests.yml

run_e2e:
needs: run_tests
uses: ./.github/workflows/JOB_e2e.yml

release:
needs: [run_tests]
needs: [run_tests, run_e2e]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
Expand All @@ -74,7 +78,7 @@ jobs:
poetry publish --build

test_release:
needs: [run_tests]
needs: [run_tests, run_e2e]
if: startsWith(github.ref, 'refs/tags/test-')
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -109,8 +113,6 @@ jobs:
poetry publish --build --repository test-pypi
python ./deploy/revert_nightly_setup.py

# Linear tickets update

notify_release:
needs: [release]
if: success()
Expand Down Expand Up @@ -139,4 +141,4 @@ jobs:
*An error occurred performing release, and you may need to release manually.*

:link:
- ${{ github.event.release.html_url }}
- ${{ github.event.release.html_url }}
26 changes: 12 additions & 14 deletions .github/workflows/JOB_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
paths:
- "e2e_tests/**"
workflow_call:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need this trigger to allow it to be called during the release event

jobs:
e2e:
name: End to End Testing
Expand Down Expand Up @@ -41,22 +42,19 @@ jobs:
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
E2E_ENVIRONMENT: ${{ secrets.E2E_ENVIRONMENT }}
E2E_TEAM: ${{ secrets.E2E_TEAM }}

slack-notifier:
name: Slack Notifier Bot
needs: e2e
if: failure() && github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- name: Notify Slack
uses: ./.github/workflows/JOB_slack_message.yml
with:
secrets: inherit
icon: ":warning:"
at_team: true
message: |
*Nightly E2E run failed*

:link:
- https://github.com/v7labs/darwin-py/actions/runs/${{ github.run_id }}
:warning: ${{ github.workflow }} failed.
uses: ./.github/workflows/JOB_slack_message.yml
with:
message: |
*Nightly E2E run failed*

:link:
- https://github.com/v7labs/darwin-py/actions/runs/${{ github.run_id }}
:warning: ${{ github.workflow }} failed.
icon: ":warning:"
at_team: true
secrets: inherit
Comment on lines 49 to +60
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This part calls the slack message job as a job instead of an action. I'm not sure how this ever used to work, since as far as I can tell this should only ever work if called as a job

I'm not sure how this ever used to work

2 changes: 1 addition & 1 deletion darwin/importer/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def import_annotations( # noqa: C901

def import_annotation(parsed_file):
image_id = remote_files[parsed_file.full_path]["item_id"]
default_slot_name = remote_files[parsed_file.full_path]["slot_names"]
default_slot_name = remote_files[parsed_file.full_path]["slot_names"][0]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bonus bug fix when importing annotation files that don't specify a slot name. This is one of the bugs we would have caught with E2E failures

if parsed_file.slots and parsed_file.slots[0].name:
default_slot_name = parsed_file.slots[0].name

Expand Down