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

[RFC] [WIP] [Newbie] Flytekit Notification System #4739

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Jan 18, 2024

Tracking issue

https://github.com/flyteorg/flyte/issues/

Example

from flytekit import Secret, task, workflow
from flytekitplugins.slack import SlackNotifier, SlackConfig
from flytekitplugins.flyin import vscode, VscodeConfig

slack_notifier = SlackNotifier(slack_conf=SlackConfig(
                        channel="demo",
                        secret_group="slack-api",
                        secret_key="token",
                    ))

@task(
    container_image="localhost:30000/flyin-notification:1655",
    secret_requests=[Secret(key="token", group="sendgrid-api"),
                    Secret(key="token", group="slack-api"),   ],
)
@vscode(
    config=VscodeConfig(),
    max_idle_seconds=80,
    warning_seconds_before_termination=60,
    notifier=slack_notifier,
)
def t(a: int, b: int) -> int:
    return a + b

@workflow
def wf(a: int = 5, b: int = 3) -> int:
    out = t(a=a, b=b)
    return out

Related PRs

flyteorg/flytekit#2115
flyteorg/flytekit#1953

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (38d1833) 58.12% compared to head (81d8c83) 58.18%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4739      +/-   ##
==========================================
+ Coverage   58.12%   58.18%   +0.05%     
==========================================
  Files         626      626              
  Lines       53786    53833      +47     
==========================================
+ Hits        31263    31322      +59     
+ Misses      20014    20003      -11     
+ Partials     2509     2508       -1     
Flag Coverage Δ
unittests 58.18% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Future-Outlier Future-Outlier marked this pull request as draft February 1, 2024 06:23
@davidmirror-ops
Copy link
Contributor

02-29-2024 Contributors meetup notes: the original intent was a notifier on the Python side. There's consensus on closing this one as this functionality should be part of flyte itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: Not Accepted
Development

Successfully merging this pull request may close these issues.

2 participants