flyteadmin icon indicating copy to clipboard operation
flyteadmin copied to clipboard

Added script and compiler option to run admin in debug mode

Open pmahindrakar-oss opened this issue 4 years ago • 3 comments

Signed-off-by: Prafulla Mahindrakar [email protected]

TL;DR

Running admin in debug mode requires the compiler output to have debug bits. Added a new Makefile target compile_debug which does this and the script debug.sh uses dlv to run the admin in debug mode for the serve option

Similarly the script can be modified to run for other commandline options exposed by flyteadmin

Pre-reequisite: Install dlv : https://github.com/go-delve/delve/blob/master/Documentation/installation/README.md Setup IDE Debug configuration. The port for DLV should match eg
Screenshot 2021-04-15 at 3 30 10 PM

Type

  • [ ] Bug Fix
  • [ ] Feature
  • [ ] Plugin

Are all requirements met?

  • [ ] Code completed
  • [ ] Smoke tested
  • [ ] Unit tests added
  • [ ] Code documentation added
  • [ ] Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

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

Follow-up issue

NA OR https://github.com/lyft/flyte/issues/

pmahindrakar-oss avatar Apr 15 '21 10:04 pmahindrakar-oss

Codecov Report

Merging #184 (d1018ee) into master (2d81c1e) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   63.86%   63.86%           
=======================================
  Files         105      105           
  Lines        7286     7286           
=======================================
  Hits         4653     4653           
  Misses       2058     2058           
  Partials      575      575           
Flag Coverage Δ
unittests 63.86% <ø> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2d81c1e...d1018ee. Read the comment docs.

codecov[bot] avatar Apr 15 '21 10:04 codecov[bot]

Interesting can you debug the process in k8s? How? Do you have to start with delve

kumare3 avatar Apr 15 '21 15:04 kumare3

@kumare3 this is only for admin running outside the k8 cluster. The locally running admin in the IDE can use the k8 deployed services of minio and postgres using port forwarding .

There is way to do the same for k8 deployed admin. @EngHabu had suggested to use https://github.com/telepresenceio/telepresence/tree/release/v2 I haven't tried that yet because the current way of running admin in the IDE works for me. We can try the telepresence route aswell if people are interested.

pmahindrakar-oss avatar Apr 16 '21 02:04 pmahindrakar-oss