Skip to content

Discourage PR authors from leaving important context behind private links #135

@kdmccormick

Description

@kdmccormick

Context

Private links (to Jira tickets, wiki pages, etc) in pull requests and commit messages make it harder for community members to:

  • diagnose bugs months later during the community release process (BTR WG, et al)
  • understand code changes years down the road (DEPR WG, et al)
  • and so on.

This has always been a problem, and it's not unique to Open edX. It might end up being exacerbated, though, by edX moving to a private Jira instance, 2u-internal.atlassian.net.

Goal

Encourage Open edX community members to include ALL relevant context in their PR description and/or commit message, with all critical supplementary links being public. This may involve a multi-pronged, ongoing approach.

Non-goal: Disallowing any private links in PR descriptions at all. Back-linking to private systems can be really useful to individual companies. Also, if we were to disallow this, there are always workarounds (eg, including the ticket number but not including it as a link)

Ideas

Outreach

Reach out to senior engineers, asking them to nudge junior engineers in their team/org about this. We have done this a bit already via edX's Arch Hour.

Surface the problem better

It was mentioned that junior engineers may not understand why changes they are making would be impactful to other engineers in the community. ie, "it's a simple change in a business-specific part of the code, why do I need to explain myself?". Of course, simple business-specific changes are often of interest to folks who are putting together releases or removing/refactoring years down the line.

Idea: Whenever someone comes across a PR with info they need hidden behind a private link, they should do X, where X could be:

  • leaving a comment explaining that the information is hidden behind a private link, for the author to see
  • adding a certain label indicating the issue
  • complaining about it in a specific channel

Pros: Would help PR authors understand the importance of the issue, increasing buy-in.
Cons: Put the burden on community members instead of on PR authors.

PR templates

Change the PR template(s) to include a reminder about this issue.

Pros: Dead simple to implement
Cons: Often are ignored, relegated to being white noise

Documentation

Document the best practices for opening PRs, including the requirement that context shouldn't be behind private links. Could be an OEP, or could be a simple documentation page.

Pros: Linking someone to a pre-agreed-upon document is easy. It takes some of the burden away from the reviewers, because instead of having to justify the cause of keeping context public, they can link to a place where it's already justified.

Cons: Someone most likely needs to actively link to the documentation in order for the PR author to notice it (unless we, say, made it part of the engineer onboarding process).

Aside: I believe an early edX version of this doc page exists somewhere. If anyone finds it, link it here!

A nag bot

Could be a:

  • GH actions check
  • that does not block the PR merge
  • but leaves a friendly message reminding folks when a private links is posted.

Pros:

  • simple
  • automatic

Cons:

  • it'd nag people who dutifully copy in all their context but also leave a private link
    • maybe we could add a heuristic, like PR description length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions