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

chore: Technical Debt Metrics #26442

Merged
merged 7 commits into from
Jan 26, 2024
Merged

chore: Technical Debt Metrics #26442

merged 7 commits into from
Jan 26, 2024

Conversation

rusackas
Copy link
Member

@rusackas rusackas commented Jan 9, 2024

SUMMARY

What if you could actually measure various sources of technical debt, upon the merge of each PR? This PR is the start of being able to do so. We will be able to track different piles of work we care about over time, and generate actionable to-do lists for others to tackle.

This is a reboot of an antique branch/PR, for cleanliness. It does the following:

  • Adds a new eslintrc file that's custom-built to track/warn on technical debt metrics
  • Adds a custom eslint transformer that splits the eslint report into aggregated stats and individual offenses
    • aggregated stats are added to one google sheet tab
    • individual offenses are added to an eslint TODO tab in the same google sheet.
  • adds an npm script to run this
  • adds a github action to run the script on mergest to master

This PR just does this for Javascript - and only for a limited set of rules. We can do the same here for python, and other bits of code and content in our universe. Ultimately, we want to have this all in a nice visible dashboard for all to leverage in either tracking this debt, and/or contributing to its demise. Here's the humble beginning of such a dashboard, using these scripts:

image

Once Apache adds the secret to the repo to write to GitHub actions, we should actually see this working. That ticket is open. This will run on merges to master or main so we can get ahead of that change.

In time, we can gather a lot more info here... and hopefully make this an example dashboard and a regular touch point of community engagement.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e633d2) 67.22% compared to head (e990e11) 67.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26442   +/-   ##
=======================================
  Coverage   67.22%   67.22%           
=======================================
  Files        1894     1894           
  Lines       74192    74192           
  Branches     8244     8244           
=======================================
  Hits        49877    49877           
  Misses      22243    22243           
  Partials     2072     2072           
Flag Coverage Δ
javascript 56.99% <ø> (ø)

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.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

This is awesome! Thanks for working on this @rusackas. It will be a powerful tool to help improve quality.

superset-frontend/package.json Outdated Show resolved Hide resolved
superset-frontend/scripts/eslintrc_metrics.js Outdated Show resolved Hide resolved
@rusackas
Copy link
Member Author

Accidentally deleted my TODO from the code... adding it here so I can maybe start a kanban board or something...

/**

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGMT. Thanks for the feature @rusackas. It will greatly contribute to improving code quality.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

sagan-awesome

@rusackas rusackas merged commit 3dcfbcc into master Jan 26, 2024
31 checks passed
eschutho pushed a commit to preset-io/superset that referenced this pull request Jan 31, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
@rusackas rusackas deleted the tech-debt-metrics-take-2 branch April 16, 2024 16:51
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.0.0 labels Apr 17, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants