Skip to content

[WIP] add deb to push#3279

Closed
chxchx wants to merge 1 commit intoistio:masterfrom
mattdelco:master15
Closed

[WIP] add deb to push#3279
chxchx wants to merge 1 commit intoistio:masterfrom
mattdelco:master15

Conversation

@chxchx
Copy link
Copy Markdown
Contributor

@chxchx chxchx commented Feb 7, 2018

Trying to get the test result

@chxchx chxchx requested a review from a team February 7, 2018 19:09
@googlebot
Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot googlebot added the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Feb 7, 2018
@istio-merge-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
We suggest the following additional approver: andraxylia

Assign the PR to them by writing /assign @andraxylia in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@chxchx
Copy link
Copy Markdown
Contributor Author

chxchx commented Feb 7, 2018

@mattdelco


endif # end of docker block that's restricted to Linux
# if first part of URL (i.e., hostname) is gcr.io then upload istioctl and deb
$(if $(findstring gcr.io,$(firstword $(subst /, ,$(HUB)))),$(eval push: gcs.push.istioctl-all gcs.push.deb),)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is the upload conditional ? i'm a bit confused by this

Copy link
Copy Markdown
Contributor

@mattdelco mattdelco Feb 8, 2018

Choose a reason for hiding this comment

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

This is based on the original bin/push script, which had something like:

# Permit $HUB overrides to suppress errors during push
if [[ "${HUB}" =~ ^gcr\.io ]]; then
    pilot/bin/upload-istioctl -p "gs://istio-artifacts/pilot/${TAG}/artifacts/istioctl" &
    pilot/bin/push-debian.sh -c opt -p "gs://istio-artifacts/pilot/${TAG}/artifacts/debs" &
    security/bin/push-debian.sh -c opt -p "gs://istio-artifacts/auth/${TAG}/artifacts/debs" &
fi

The rule is trying to do the make equivalent, whereby a "push" to GCS is done if the hub starts with gcr.io. I'm not a fan of the behavior in the original script (nor porting it to make) -- it seems like too much of a kludge to assume that a push to GCR also means they want a copy to GCS. I hesitantly ported the functionality to make so that my deletion of bin/push would be less controversial (by retaining feature-parity, though at the time I did the port I didn't know who/what needed the functionality and only the "upload-istioctl" line still existed [the debian lines were presumably removed as part of the consolidation to one debian file]).

My preference would be to have users do an explicit copy for themselves, though I don't quite know what that should look like. Offhand I'm thinking that someone would do a "make push", then a "make artifacts" (or maybe "artifacts" would already be a superset of "push"), and then manually copy the artifacts as needed, e.g.:

make push
make artifacts
gsutil -m cp -r "$(make where-is-out)"/istioctl-* "gs://istio-artifacts/pilot/${TAG}/artifacts/debs"
gsutil -m cp -r "$(make where-is-out)"/*.deb "gs://istio-artifacts/pilot/${TAG}/artifacts/debs"

and then none of the logic to detect when to do a copy (or defaulting of parameters like "GS_BUCKET") would be needed in the Makefile.

This description isn't necessarily an argument against the change (I did after all suggest it as a way to unblock testing), but I did want to present the background so other people can offer thoughts/opinions on which direction (or offer a third) on if/how the copying of artifacts to GCS should be handled.

@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Feb 8, 2018
@istio-merge-robot
Copy link
Copy Markdown

@chxchx PR needs rebase


endif # end of docker block that's restricted to Linux
# if first part of URL (i.e., hostname) is gcr.io then upload istioctl and deb
$(if $(findstring gcr.io,$(firstword $(subst /, ,$(HUB)))),$(eval push: gcs.push.istioctl-all gcs.push.deb),)
Copy link
Copy Markdown
Contributor

@mattdelco mattdelco Feb 8, 2018

Choose a reason for hiding this comment

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

This is based on the original bin/push script, which had something like:

# Permit $HUB overrides to suppress errors during push
if [[ "${HUB}" =~ ^gcr\.io ]]; then
    pilot/bin/upload-istioctl -p "gs://istio-artifacts/pilot/${TAG}/artifacts/istioctl" &
    pilot/bin/push-debian.sh -c opt -p "gs://istio-artifacts/pilot/${TAG}/artifacts/debs" &
    security/bin/push-debian.sh -c opt -p "gs://istio-artifacts/auth/${TAG}/artifacts/debs" &
fi

The rule is trying to do the make equivalent, whereby a "push" to GCS is done if the hub starts with gcr.io. I'm not a fan of the behavior in the original script (nor porting it to make) -- it seems like too much of a kludge to assume that a push to GCR also means they want a copy to GCS. I hesitantly ported the functionality to make so that my deletion of bin/push would be less controversial (by retaining feature-parity, though at the time I did the port I didn't know who/what needed the functionality and only the "upload-istioctl" line still existed [the debian lines were presumably removed as part of the consolidation to one debian file]).

My preference would be to have users do an explicit copy for themselves, though I don't quite know what that should look like. Offhand I'm thinking that someone would do a "make push", then a "make artifacts" (or maybe "artifacts" would already be a superset of "push"), and then manually copy the artifacts as needed, e.g.:

make push
make artifacts
gsutil -m cp -r "$(make where-is-out)"/istioctl-* "gs://istio-artifacts/pilot/${TAG}/artifacts/debs"
gsutil -m cp -r "$(make where-is-out)"/*.deb "gs://istio-artifacts/pilot/${TAG}/artifacts/debs"

and then none of the logic to detect when to do a copy (or defaulting of parameters like "GS_BUCKET") would be needed in the Makefile.

This description isn't necessarily an argument against the change (I did after all suggest it as a way to unblock testing), but I did want to present the background so other people can offer thoughts/opinions on which direction (or offer a third) on if/how the copying of artifacts to GCS should be handled.

gsutil -m cp -r "${ISTIO_OUT}"/istioctl-* "gs://${GS_BUCKET}/pilot/${TAG}/artifacts/istioctl"

gcs.push.deb: deb
gsutil -m cp -r "${ISTIO_OUT}"/*.deb "gs://${GS_BUCKET}/pilot/${TAG}/artifacts/debs"
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.

Given my prior comment, I now see that the original bin/push script placed the debian files under different directories ("pilot" vs "auth"). On the one hand it seems inappropriate to place the monolithic debian under "pilot", but on the other hand both copies are placing the artifacts in sibling directories and there's a certain appeal to having the binaries close to each other. Maybe neither should be using "pilot", but I don't know how many other things would also need to be updated to handle the rename. Anyway, I don't have a particular update in mind but maybe others have ideas on what, if anything, should be done.

@mattdelco
Copy link
Copy Markdown
Contributor

Based on the test failures it looks like fpm will need to be added to the prow docker image. Ideally this would also be added to the istio-builder image. These lines in release/cloud_build.template.json could be updated to the new image:

"gcr.io/istio-testing/istio-builder:0.4.5-bazel7-go19",

and then these lines in release/cloud_builder.sh could also be removed:

apt-get -qqy install ruby ruby-dev rubygems build-essential
gem install --no-ri --no-rdoc fpm

I'd have a preference to still keep bazel in the images. It's still needed by the proxy repo and as recently as last night I was experimenting with trying to hack up an istio release build mechanism that can be used to consume a locally-compiled proxy.

istio-merge-robot pushed a commit to istio/test-infra that referenced this pull request Feb 8, 2018
Automatic merge from submit-queue.

Install fpm in prowbazel and istio-builder images

Trying to fix istio/istio#3279 which eventually will fix istio/istio#2444
@chxchx chxchx reopened this Feb 8, 2018
@istio-testing
Copy link
Copy Markdown
Collaborator

@chxchx: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-unit-tests.sh ea8e569 link /test istio-unit-tests
prow/istio-presubmit.sh ea8e569 link /test istio-presubmit
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@chxchx chxchx closed this Feb 9, 2018
@mattdelco mattdelco deleted the master15 branch February 13, 2018 18:30
istio-merge-robot pushed a commit that referenced this pull request Feb 16, 2018
Automatic merge from submit-queue.

Upgrade istio-builder image to 0.4.6

See discussion in #3279

/assgin @mattdelco @sebastienvas @rkpagadala
ChristinaLyu0710-zz pushed a commit to ChristinaLyu0710-zz/istio-flakey-test that referenced this pull request Jun 11, 2019
Automatic merge from submit-queue.

Install fpm in prowbazel and istio-builder images

Trying to fix istio/istio#3279 which eventually will fix istio/istio#2444
PetrMc pushed a commit to PetrMc/istio-petrmc-upstream-fork that referenced this pull request Jan 14, 2026
[solo-io/istio merge job] Nightly merge of upstream into master-solo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. needs-rebase Indicates a PR needs to be rebased before being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants