Skip to content

Removed the duplicate and unused pretty_print function#3133

Merged
talsperre merged 1 commit into
Netflix:masterfrom
agsaru:pretty-print
Apr 22, 2026
Merged

Removed the duplicate and unused pretty_print function#3133
talsperre merged 1 commit into
Netflix:masterfrom
agsaru:pretty-print

Conversation

@agsaru

@agsaru agsaru commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

PR Type

  • Bug fix
  • New feature
  • Core Runtime change (higher bar -- see CONTRIBUTING.md)
  • Docs / tooling
  • Refactoring

Summary

There are two pretty_print functions in the pick_services.sh file. The second functions is updated version of the first one. And also the the second one overwrites the first one.

Copilot AI review requested due to automatic review settings April 22, 2026 04:36
@greptile-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the first (older) pretty_print function in devtools/pick_services.sh, leaving only the improved second definition that already superseded it. The retained version adds a zero-length case, uses safe index arithmetic instead of ${arr[-1]}, and avoids leaking IFS. No functional regressions are introduced.

Confidence Score: 5/5

Safe to merge — simple dead-code removal with no functional impact.

Only one file changed, the removed function was a strict subset of the retained one, and the call-site is unaffected. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
devtools/pick_services.sh Removed the first (duplicate) pretty_print definition; the retained second definition adds a zero-length guard, safer last_index arithmetic, and cleaner IFS handling.

Reviews (1): Last reviewed commit: "Removed the duplicate and unused pretty_..." | Re-trigger Greptile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes a duplicate pretty_print implementation in devtools/pick_services.sh to avoid having one function definition silently overwrite another, leaving a single canonical formatting helper used by the script.

Changes:

  • Deleted the older, duplicate pretty_print function definition.
  • Keeps the updated pretty_print implementation as the single source of truth.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@talsperre
talsperre self-requested a review April 22, 2026 05:57
@talsperre
talsperre merged commit eb38423 into Netflix:master Apr 22, 2026
41 of 42 checks passed
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@c6373f9). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3133   +/-   ##
=========================================
  Coverage          ?   26.07%           
=========================================
  Files             ?      375           
  Lines             ?    51435           
  Branches          ?     9071           
=========================================
  Hits              ?    13414           
  Misses            ?    37235           
  Partials          ?      786           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

agsaru added a commit to agsaru/metaflow that referenced this pull request May 1, 2026
## PR Type

<!-- Check one -->

- [x] Bug fix
- [ ] New feature
- [ ] Core Runtime change (higher bar -- see
[CONTRIBUTING.md](../CONTRIBUTING.md#core-runtime-contributions-higher-bar))
- [ ] Docs / tooling
- [ ] Refactoring

## Summary
There are two `pretty_print` functions in the `pick_services.sh` file.
The second functions is updated version of the first one. And also the
the second one overwrites the first one.
@agsaru
agsaru deleted the pretty-print branch June 1, 2026 20:28
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