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

배포 성공/실패 여부 슬랙으로 전송하기 #32

Merged
merged 6 commits into from
Mar 18, 2022

Conversation

hyeseung-of-dable
Copy link
Contributor

@hyeseung-of-dable hyeseung-of-dable commented Mar 15, 2022

  • 버전 범프

@@ -28,6 +28,10 @@ on:
description: files that you want to delete from zip
required: false
type: string
slack-channel:
Copy link

@yongja-jayong yongja-jayong Mar 18, 2022

Choose a reason for hiding this comment

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

혹시 슬랙채널은 어디 생각하고 계세요
지금은 #test-log, #report-log #product-log 있습니다 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

슬랙채널은 레포쪽에서 입력하고, 좀 더 잘 확인하기위해서는 라운지가 좋아보이지만..
리부트처럼 product log쪽이 어떨까요??!

Copy link

@yongja-jayong yongja-jayong Mar 18, 2022

Choose a reason for hiding this comment

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

성공메시지까지 #product-log로 보내는 부분이 좀 고민되는 것 같아요 ㅋㅋ
나중에 알람 정리되면 #product-log 알람을 켜놓거나 할 것 같은데, 배포 성공은 장애 대응 필요하지 않은 것 같아서요
그렇다고 다른 채널에 놓으면 또 확인을 덜 할 것 같고...

& 배포할 때마다 채널이름을 적는게 좀 귀찮을 수도 있을 것 같아서 찾아보니 input에 default 값은 불가능하나보네요 ㅠ
(코드로 짜면 가능은 하겠지만..)

Copy link
Contributor Author

@hyeseung-of-dable hyeseung-of-dable Mar 18, 2022

Choose a reason for hiding this comment

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

배포때마다 적진않아도 되구요!
레포에서 아래처럼 스트링으로 지정해주면 됩니당!!

uses: teamdable/vv-deploy-actions/.github/workflows/deploy-to-edge-devices.yml@main
with:
    user: 'ubuntu'
    code-name: 'inference'
    deploy-branch: ${GITHUB_REF##*/} 
    parent-dir: '/home/ubuntu/'
    version-file-name: '_version.py'
    exclude-files-from-zip: 'bin/deploy/vpn-config.ini'
!    slack-channel: 'lounge'
secrets:
    tailscale-authkey: ${{ github.event.inputs.tailscale-key }}
    password: ${{ secrets.PASSWORD }}
    otp: ${{ secrets.OTP }}

& 배포할 때마다 채널이름을 적는게 좀 귀찮을 수도 있을 것 같아서 찾아보니 input에 default 값은 불가능하나보네요 ㅠ
(코드로 짜면 가능은 하겠지만..)

가능한데, 퍼블릭이다보니 채널이름을 여기에 담지않으려고 했어요ㅎㅎ

Choose a reason for hiding this comment

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

아아 네네 그러고보니 이거 가져다 쓰는 actions였군요 ㅋㅋㅋㅋ
그럼 채널만 잘 정하면 되겠네요 ㅋㅋㅋ

Copy link

@jingu-lee jingu-lee Mar 18, 2022

Choose a reason for hiding this comment

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

approve한 것과 별개로,
채널의 경우는 혜승님이 의도를 반영해 error 상황과 success 상황을 나눠서 채널을 선정해주는 것이 좋을 것 같습니다. 만약, 채널이름의 노출이 애매하다면 secret 키를 활용해서라도 하는 것이 좋아보입니다. 굳이 배포에서 레포별로 슬랙 채널을 나눌 경우가 없을 것 같아서요. (아니면 특별한 상황이 있을까요???)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

채널의 경우는 혜승님이 의도를 반영해 error 상황과 success 상황을 나눠서 채널을 선정해주는 것이 좋을 것 같습니다.

이 pr 이후에 배포 시작할때도 슬랙메세지를 보내려고 하는데요. 배포 시간이 겹치면 안되기때문에, 저는 성공/실패를 구분해서 채널을 나누려고하지는 않고 있습니다.

만약, 채널이름의 노출이 애매하다면 secret 키를 활용해서라도 하는 것이 좋아보입니다. 굳이 배포에서 레포별로 슬랙 채널을 나눌 경우가 없을 것 같아서요.

secrets key는 vv-deploy-actions에서 읽는 게 아니고
각자 사용하는 레포에서 설정한 시크릿값들을 받아오게됩니다.

레포별로 나누라는 게 아니고, 파라미터를 레포에서 지정하라는 의미였습니다ㅋㅋ

Copy link

@yongja-jayong yongja-jayong Mar 18, 2022

Choose a reason for hiding this comment

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

배포 관련 알람이 많아진다면 배포용 채널을 생성하는 것도 생각해볼 수 있을 것 같아요 ㅋㅋ (팀단위 논의가 필요할 것 같네요! ㅎㅎ)

Choose a reason for hiding this comment

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

(배포 시작 알람이 온 후, 그 사이에 장애 알람이 오면 시작 알람을 놓칠 수 있으니까요 ㅎㅎ!)

requirements.txt Outdated
@@ -1,2 +1,3 @@
ConfigArgparse
vv-edge-info==1.0.1
vv-slackboy==1.0.4a0

Choose a reason for hiding this comment

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

아마 최신 버젼이 1.0.4로 알고 있습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

9d933ca 에서 수정했습니다 ~~

@hyeseung-of-dable hyeseung-of-dable merged commit c76ab45 into develop Mar 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the slack-alert branch March 18, 2022 08:45
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