Skip to content

Commit

Permalink
[DAR-3431][External] Adding passing E2E tests as a requirement to rel…
Browse files Browse the repository at this point in the history
…ease (#903)

* Fix E2E Slack bot notifications

* Fix for imported annotations without an assigned slot

* Added passing E2Es to release requirements
  • Loading branch information
JBWilkie authored Aug 20, 2024
1 parent 97e643a commit baf38f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
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:
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
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]
if parsed_file.slots and parsed_file.slots[0].name:
default_slot_name = parsed_file.slots[0].name

Expand Down

0 comments on commit baf38f0

Please sign in to comment.