New issue
Advanced search Search tips

Issue 867729 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CIPD search and list operations now return non-zero exit code when package isn't found

Project Member Reported by phosek@chromium.org, Jul 26

Issue description

With v1 CIPD search and list operations would exit with code 0 when the package isn't found to distinguish the case when there's an actual failure. With v2 this is no longer the case and the client exits with the code 1 which breaks existing users.
 
Turned out list is working correctly, only search is affected.
Use case I've been testing this with:

$ ./cipd search "fuchsia/tools/foo" -tag "git_revision:abc"

This exits with 1 and prints "Error: no such package.", in the past it'd return 0 and print "No matching packages."
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 26

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/ed81b734060a0c88cb796f3c04895b270e9db0bc

commit ed81b734060a0c88cb796f3c04895b270e9db0bc
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Thu Jul 26 02:25:05 2018

[cipd] Fix regression in 'cipd search' subcommand.

It used to return 0 exit code and no results if asked to search inside missing
package. With v2 switch it started to return exit code 1 instead, which broke
some callers.

This change restores the original behavior. It sort of makes sense, since if
a package is missing, there's no instances of it, and search should just return
0 results.

R=nodir@chromium.org, iannucci@chromium.org
CC=​phosek@chromium.org
BUG= 867729 , 801423

Change-Id: I274b35c82be4d11db78150b444b076ef7d9787a0
Reviewed-on: https://chromium-review.googlesource.com/1150937
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/ed81b734060a0c88cb796f3c04895b270e9db0bc/cipd/client/cipd/client.go
[modify] https://crrev.com/ed81b734060a0c88cb796f3c04895b270e9db0bc/cipd/client/cipd/client_test.go

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 26

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/03693197fef4b7d6f2d717f99e9e616bb4f4d8a8

commit 03693197fef4b7d6f2d717f99e9e616bb4f4d8a8
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Thu Jul 26 19:21:12 2018

Roll infra/go/src/go.chromium.org/luci/ 4a29002eb..75f8e8fa5 (3 commits)

https://chromium.googlesource.com/infra/luci/luci-go/+log/4a29002ebaba..75f8e8fa5c11

$ git log 4a29002eb..75f8e8fa5 --date=short --no-merges --format='%ad %ae %s'
2018-07-26 vadimsh [cipd] Adjust logging levels of trash cleanup processes.
2018-07-26 vadimsh [cipd] Fix regression in 'cipd search' subcommand.
2018-07-26 vadimsh [cipd] Make CIPD client NOT freak out when it sees unknown hash algos.

Created with:
  roll-dep infra/go/src/go.chromium.org/luci

TBR=iannucci@chromium.org
BUG=821194,  867729 

Change-Id: I7abb480446c0a9f9a965c0d0a99beb4f7b8daa3f
Reviewed-on: https://chromium-review.googlesource.com/1151956
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/03693197fef4b7d6f2d717f99e9e616bb4f4d8a8/DEPS

Cc: -vadimsh@chromium.org
Owner: vadimsh@chromium.org
Status: Fixed (was: Untriaged)
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/19cca6a3bdcdee5825912f8102c2818885f777dc

commit 19cca6a3bdcdee5825912f8102c2818885f777dc
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Thu Jul 26 20:23:01 2018

[cipd] Bump client (+vpython) v2.1.0 (521b9b6477) => v2.2.2 (03693197fe).

Changes:
https://chromium.googlesource.com/infra/luci/luci-go/+log/9449d18..75f8e8f/cipd

Most notably, the new version understand SHA256 instance IDs.

R=iannucci@chromium.org, maruel@chromium.org
BUG=821194,  867729 

Change-Id: Iebcf358ba460eeca2d39d3881104899014466e9c
Reviewed-on: https://chromium-review.googlesource.com/1152036
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/19cca6a3bdcdee5825912f8102c2818885f777dc/cipd_client_version
[modify] https://crrev.com/19cca6a3bdcdee5825912f8102c2818885f777dc/cipd_manifest.txt

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ccd0ca7b9314e55357cf2ab50ae9456030d4346

commit 6ccd0ca7b9314e55357cf2ab50ae9456030d4346
Author: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Fri Jul 27 01:08:11 2018

Roll src/third_party/depot_tools 254538b955bd..079812cefdd9 (5 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/254538b955bd..079812cefdd9


git log 254538b955bd..079812cefdd9 --date=short --no-merges --format='%ad %ae %s'
2018-07-26 recipe-roller@chromium.org Roll recipe dependencies (trivial).
2018-07-26 vadimsh@chromium.org [cipd] Bump client (+vpython) v2.1.0 (521b9b6477) => v2.2.2 (03693197fe).
2018-07-26 vadimsh@chromium.org [cipd] Try to bootstrap CIPD from scratch if selfupdate fails.
2018-07-26 ehmaldonado@chromium.org metrics_utils: Print notice to stderr.
2018-07-26 recipe-roller@chromium.org Roll recipe dependencies (trivial).


Created with:
  gclient setdep -r src/third_party/depot_tools@079812cefdd9

The AutoRoll server is located here: https://depot-tools-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG=chromium:821194, chromium:867729 ,chromium:821194, chromium:832386 
TBR=agable@chromium.org

Change-Id: I0eb1d5d4e51b7559bee1647b84f8c420459b831b
Reviewed-on: https://chromium-review.googlesource.com/1152248
Reviewed-by: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: depot-tools-chromium-autoroll <depot-tools-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#578500}
[modify] https://crrev.com/6ccd0ca7b9314e55357cf2ab50ae9456030d4346/DEPS

Sign in to add a comment