Skip to content

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Jan 26, 2023

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • Tests for the changes have been added (for bug fixes / features)
  • What kind of change does this PR introduce?

CI enhancement

  • What is the current behavior?

The autoupdate bundle is not pushed to s3 download servers

  • What is the new behavior?

During a release, a notarized zipped bundle is produced and pushed directly to s3 download server, inside a directory that includes the version tag.

  • Does this PR introduce a breaking change?

no

  • Other information:

Close #736

@umbynos umbynos added type: enhancement Proposed improvement os: macos Specific to macOS operating system topic: infrastructure Related to project infrastructure labels Jan 26, 2023
@umbynos umbynos self-assigned this Jan 26, 2023
@umbynos umbynos requested a review from cmaglie January 26, 2023 15:48
@umbynos
Copy link
Contributor Author

umbynos commented Jan 26, 2023

Notice that I opened this against fix-(s)ventura branch, so that we can use it as a "feature branch"

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2023

Codecov Report

Base: 10.94% // Head: 10.94% // No change to project coverage 👍

Coverage data is based on head (693e357) compared to base (9c352b3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                 Coverage Diff                  @@
##           fix-(s)ventura-code     #756   +/-   ##
====================================================
  Coverage                10.94%   10.94%           
====================================================
  Files                       50       50           
  Lines                     3892     3892           
====================================================
  Hits                       426      426           
  Misses                    3412     3412           
  Partials                    54       54           
Flag Coverage Δ
unit 10.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@umbynos
Copy link
Contributor Author

umbynos commented Jan 27, 2023

The CI is failing because I stopped it (in order to skip the release creation). The bundle is generated in http://downloads.arduino.cc/CreateAgent/Stable/1.2.8/ArduinoCreateAgent.app_notarized.zip

@umbynos umbynos changed the title Bundle to s3 Upload the sighed bundle to s3 Jan 27, 2023
@cmaglie
Copy link
Member

cmaglie commented Jan 27, 2023

The CI is failing because I stopped it (in order to skip the release creation). The bundle is generated in http://downloads.arduino.cc/CreateAgent/Stable/1.2.8/ArduinoCreateAgent.app_notarized.zip

shouldn't be triggered on tag event?

Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

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

From my limited knowledge of gh-actions, LGTM

@cmaglie cmaglie changed the title Upload the sighed bundle to s3 Upload the signed bundle to s3 Jan 27, 2023
@umbynos umbynos merged commit b0b76d8 into fix-(s)ventura-code Jan 27, 2023
@umbynos umbynos deleted the bundle-to-s3 branch January 27, 2023 14:32
@umbynos
Copy link
Contributor Author

umbynos commented Jan 27, 2023

shouldn't be triggered on tag event?

Yes, and indeed I released a test version: 1.2.8. But I did not let the CI finish because we are not ready for a new release but we needed the zipped bundle on the s3 bucket for #737

cmaglie pushed a commit that referenced this pull request Jan 27, 2023
* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket
cmaglie pushed a commit that referenced this pull request Feb 10, 2023
* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket
cmaglie pushed a commit that referenced this pull request Feb 13, 2023
* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket
cmaglie pushed a commit that referenced this pull request Feb 14, 2023
* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket
cmaglie added a commit that referenced this pull request Feb 15, 2023
* Upload the signed bundle to s3 (#756)

* remove some code duplication regarding prerelease calculation

* add upload of the notarized bundle to s3 download bucket

* add upload of the notarized bundle to s3 download bucket

* add json to enable autoupdate with the new agent logic (#759)

* add json to enable autoupdate with the new agent logic

* binary output of the archive https://unix.stackexchange.com/questions/3675/how-can-i-get-a-base64-encoded-shax-on-the-cli

* workaround to allow darwin-arm64 to autoupdate

* parallelize bundle creation and notarization.
This will be helpful if/when we decide to build for darwin-arm64.
For now this is useful because we do not offer a binary for m1 yet,
`runtime.GOARCH` on an m1 machine returns ARM64, so the call for the update file would fail

* Implemented the autoupdater for MacOS

* Added more logging and fixed upgrade procedure

* Use MacOS openApplicationAtURL syscall to re-run updated app

* Bump minimum required macosx version to 10.15

This is required because the auto-update uses the function

warning: 'openApplicationAtURL:configuration:completionHandler:' is only available on macOS 10.15 or newer [-Wunguarded-availability-new]

* Removed diff-based updates

* Fixed update URL for different update methods

* fix invalid workflow

* Always complete the old auto-upgrade procedure

This is required for clients upgrading from versions <=1.2.7

* Moved the syscall to openApplicationAtURL inside Systray

* Added fallback restart for macosx.

* added some more logging

---------

Co-authored-by: Umberto Baldi <[email protected]>
Co-authored-by: Umberto Baldi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

os: macos Specific to macOS operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The CI should upload a signed zip bundle to S3, for the new update logic

3 participants