GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Question about the override to `Rake::Task#execute` · Issue #2196 · getsentry/sentry-ruby

Question about the override to Rake::Task#execute #2196

New issue
Copy link
New issue
Copy link
Closed
#2214
Closed
Question about the override to Rake::Task#execute#2196
#2214
Copy link
Assignees
sl0thentr0py
Labels
QuestionRefactoring

Description

@hosamaly
hosamaly
opened on Dec 12, 2023
Issue body actions

I'm a bit confused about this piece of code:

sentry-ruby/sentry-ruby/lib/sentry/rake.rb

Lines 21 to 28 in f15f58e

module Task
# @api private
def execute(args=nil)
return super unless Sentry.initialized? && Sentry.get_current_hub
super
end
end

The override doesn't seem to do much other than call Sentry.get_current_hub.

If this is the case, it would be slightly clearer, in my humble opinion, to define it as:

def execute(args=nil) 
  Sentry.get_current_hub if Sentry.initialized?
  super
end

Did I understand the purpose of the method correctly?

Activity

  1. hosamaly
    added
    Question
    on Dec 12, 2023
  2. hosamaly
    assigned
    sl0thentr0py
    on Dec 12, 2023
  3. getsantry
    added
    Waiting for: Product Owner
    on Dec 12, 2023
  4. getsantry
    added this to GitHub Issues with 👀on Dec 12, 2023
  5. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀on Dec 12, 2023
  6. sl0thentr0py commented on Dec 13, 2023

    @sl0thentr0py
    sl0thentr0py
    on Dec 13, 2023
    Member
    More actions

    I think this is leftover code from #1617, I don't even think we need the Task patch anymore. @st0012 can you verify?

  7. getsantry
    removed
    Waiting for: Product Owner
    on Dec 13, 2023
  8. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Dec 13, 2023
  9. sl0thentr0py
    added
    Refactoring
    on Dec 13, 2023
  10. st0012 commented on Jan 1, 2024

    @st0012
    st0012
    on Jan 1, 2024
    Contributor
    More actions

    @sl0thentr0py Yes you're right. I've opened #2214 to remove it.
    @hosamaly Thanks for raising this!

    Reacted by Neel Shah
  11. st0012
    closed this as completedin #2214on Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sl0thentr0py
    sl0thentr0py

Labels

QuestionRefactoring

Projects

  • GitHub Issues with 👀
    Status
    No status
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.