Skip to content

Conversation

Saviq
Copy link
Collaborator

@Saviq Saviq commented Oct 15, 2019

No description provided.

@Saviq Saviq force-pushed the transfer-sh-builds branch 2 times, most recently from 05f7f89 to 3253e36 Compare October 15, 2019 15:13
@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

Merging #1125 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1125   +/-   ##
=======================================
  Coverage   71.04%   71.04%           
=======================================
  Files         201      201           
  Lines        7374     7374           
=======================================
  Hits         5239     5239           
  Misses       2135     2135

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a32e64...e73a0e7. Read the comment docs.

@multipass-ci-bot

This comment has been minimized.

@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq force-pushed the transfer-sh-builds branch from 3253e36 to 3721738 Compare October 16, 2019 14:18
@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq force-pushed the transfer-sh-builds branch from 3721738 to 95d9c29 Compare October 16, 2019 16:09
@Saviq Saviq added the no-merge label Oct 16, 2019
@Saviq Saviq force-pushed the transfer-sh-builds branch from 3ff2bfa to 95d9c29 Compare October 16, 2019 17:58
import requests
import sys

HEADERS = {"Authorization": "Bearer {}".format(os.environ["GITHUB_TOKEN"])}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's very little exception handling in this script, on purpose - anything out of the ordinary should make it go away.

@multipass-ci-bot

This comment has been minimized.

@ricab
Copy link
Collaborator

ricab commented Oct 17, 2019

Thanks, this idea sounds really useful. I did not look at the code (so this is not a review) but I have some comments on the topics you raised.

@Saviq
Copy link
Collaborator Author

Saviq commented Oct 17, 2019

@townsend2010 care to share your opinion on the topics I raised?

@Saviq Saviq force-pushed the transfer-sh-builds branch from 20cca79 to 42a4d38 Compare October 18, 2019 08:57
@canonical canonical deleted a comment from multipass-ci-bot Oct 18, 2019
@multipass-ci-bot

This comment has been minimized.

@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq force-pushed the transfer-sh-builds branch from 3e2622f to 4d8c2b5 Compare October 18, 2019 12:13
@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq force-pushed the transfer-sh-builds branch 2 times, most recently from feb5552 to 092f753 Compare October 18, 2019 13:57
@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq force-pushed the transfer-sh-builds branch 6 times, most recently from cf03038 to f059020 Compare October 18, 2019 15:38
@multipass-ci-bot

This comment has been minimized.

@Saviq Saviq changed the title [travis] upload packages to transfer.sh [travis] upload packages to transfer.sh and to the Snap Store Oct 22, 2019
@Saviq Saviq force-pushed the transfer-sh-builds branch from 04a1dc8 to 6dc6d82 Compare October 22, 2019 20:38
@multipass-ci-bot

This comment has been minimized.

Saviq and others added 4 commits October 23, 2019 09:49
- do not `snapcraft login` if not publishing
- do not run covreport on failure
- rename `build_id`
- streamline `name`/`owner` determination
- add more timeline event types

Co-authored-by: Ricardo Abreu <[email protected]>
- rename report_build to snake-case
- reorder imports
- fix long line
On merges from a fork, credentials are unavailable.
@Saviq Saviq force-pushed the transfer-sh-builds branch from dc179d4 to 96cfca8 Compare October 23, 2019 07:53
Saviq added 3 commits October 23, 2019 10:57
KeyError is too big of a net.
transfer.sh, when in a bad state, causes curl to hang indefinitely.
@Saviq Saviq force-pushed the transfer-sh-builds branch from 96cfca8 to 267deb9 Compare October 23, 2019 09:16
@ricab
Copy link
Collaborator

ricab commented Oct 23, 2019

UX detail (I should say DX here, for developer 😛): I think the messages look a bit more tangled up in appearance after the snap command. How would you feel about changing the format to something like:

  • macOS build available: multipass-0.10.0-dev.422.pr1125+g6bb5ecd7.mac-Darwin.pkg
  • Snap build available: multipass_0.10.0-dev.320.pr1125+g5c4858d_amd64.snap
    • or snap refresh multipass --channel edge/pr1125

@Saviq
Copy link
Collaborator Author

Saviq commented Oct 23, 2019

How would you feel about changing the format to something like:

Yes, in a further PR. Note I'm matching the build names with a simple str.startswith() - anything more involved will require deeper Markdown parsing :)

@multipass-ci-bot

This comment has been minimized.

query GetEvents($owner: String!,
$name: String!,
$pull_request: Int!,
$count: Int!) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish our clang-format accepted this sort of formatting in C++, it often makes for much more readable code.

@multipass-ci-bot
Copy link
Collaborator

Snap build available: snap refresh multipass --channel edge/pr1125

Copy link
Collaborator Author

@Saviq Saviq left a comment

Choose a reason for hiding this comment

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

Unfortunately I seem to have saturated transfer.sh again… It shouldn't be that bad when I stop experimenting with this, but will look around for an alternative for the future.

Comment on lines +80 to +90
- '[[ "${TRAVIS_EVENT_TYPE}" != "pull_request" || "${TRAVIS_SECURE_ENV_VARS}" == "false" ]] && exit'
- BUILDS=()
- >-
[ -n "${MULTIPASS_SNAP_CHANNEL}" ]
&& snapcraft login --with ${HOME}/snap-login
&& snapcraft push multipass_*.snap --release ${MULTIPASS_SNAP_CHANNEL}
&& BUILDS+=("\`snap refresh multipass --channel ${MULTIPASS_SNAP_CHANNEL}\`")
- CURL_OUTPUT=$( timeout 5m curl --fail --upload-file *.snap https://transfer.sh/ )
&& BUILDS+=("[$( basename ${CURL_OUTPUT} )](${CURL_OUTPUT})");
echo ${CURL_OUTPUT}
- ./tools/report_build.py Snap "${BUILDS[@]}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I now wonder whether we should do this on the Debug build? The snap checks and now the uploads mean that this job runs almost twice as long as the Debug one.

And maybe it'd be better for debugging to have Debug builds out of PRs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know, I don't have a strong opinion on that. Release would be closer to the actual thing, but debug would indeed be more practical. Would that affect actual releasing? And aren't the snap checks useful in the build that uploads the snap? What is the gain in having debug and release builds switching places in what concerns duration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would that affect actual releasing?

No, for releases (RC we'd have to decide on) we'd build RelWithDebInfo still.

And aren't the snap checks useful in the build that uploads the snap?

At worst they would fail to upload. Now I think of it maybe we can drop the review step as the store does it for us… The snap upload would have to move up to script: though, so failure to release would be a CI failure, and alternate with review-tools if not publishing.

What is the gain in having debug and release builds switching places in what concerns duration?

One would do the snap review check, another would do the upload.

Any case, something to ponder for the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At least the "faster" concern is moot now: #1141

Copy link
Collaborator

@ricab ricab left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot added a commit that referenced this pull request Oct 23, 2019
1125: [travis] upload packages to transfer.sh and to the Snap Store r=ricab a=Saviq



Co-authored-by: Michał Sawicz <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 23, 2019

Build succeeded

@bors bors bot merged commit e73a0e7 into master Oct 23, 2019
@bors bors bot deleted the transfer-sh-builds branch October 23, 2019 13:05
Saviq added a commit that referenced this pull request Oct 23, 2019
1125: [travis] upload packages to transfer.sh and to the Snap Store r=ricab a=Saviq



Co-authored-by: Michał Sawicz <[email protected]>
@Saviq Saviq added enhancement low Low priority. Combine with "medium" to signal intermediate low-medium priority. labels Oct 23, 2019
Saviq added a commit that referenced this pull request Oct 24, 2019
1125: [travis] upload packages to transfer.sh and to the Snap Store r=ricab a=Saviq



Co-authored-by: Michał Sawicz <[email protected]>
Saviq added a commit that referenced this pull request Oct 28, 2019
1125: [travis] upload packages to transfer.sh and to the Snap Store r=ricab a=Saviq



Co-authored-by: Michał Sawicz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement low Low priority. Combine with "medium" to signal intermediate low-medium priority.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants