fix an issue introduced in go resolve refactoring

Review Request #3963 — Created June 1, 2016 and submitted

benjyw, jsirois, stuhood

Go Fetch task will fetch packages only for invalid versioned targets (VTs), but it will map_fetched_remote_source for all VTs.

My previous refactor moved the map_fetched_remote_source inside valid check of VT, which means only for invalid VT will map_fetched_remote_source be executed.

This caused test failure when testing our internal go projects. I think previously it passed the internal test because cache read/write was disabled in our internal pants.ini at that moment, thus VTs were always invalid.

This change moves map_fetched_remote_source logic outside of valid check of VT, so that it is executed for all VTs.

ci pending:

and test against some go code internally in Twitter.

  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
s/run/Run/ s/is resolved correctly/are resolved correctly./ benjyw
  1. Please add a test case to cover this.

  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 5a7e838d512069a24d12ec0b7dcdc7b7d5bdfa3b

  2. I don't see any diffs in this file.

    1. The diff was indentation of line 155-156. Previously it was in "if" block starting at line 153. Now it is not.

  3. s/run/Run/
    s/is resolved correctly/are resolved correctly./

    1. well, I just realized it has already been merged. Maybe I can create another short and quick rb?

    2. or reopen this one?

    3. Since it's just comments, you can tack the fix on to whatever you next change is, even if unrelated to this one.