Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump browser build dependencies to Node 20 #120

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

dnzxy
Copy link
Contributor

@dnzxy dnzxy commented Mar 11, 2024

This PR fixes the warning users currently see for browser build for node v16, i.e.

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

In accordance with GitHub Actions: Transitioning from Node 16 to Node 20, all actions must be using node version 20. Bumping the node version from v16 to v20 by using aormsby/Fork-Sync-With-Upstream-action@v3.4.1 (latest release see here) and actions/checkout@v4 (which internally updated to node 20) as well as actions/upload-artifact@v4 (internally uses node 20).

@marionbarker
Copy link
Contributor

I have tested this version with Browser Build.

I created a parallel PR to my loopdocs-tester organization (LoopWorkspace branch update) and ran the browser build for that branch.

  • There was no Node 16 warning in the email
  • The build worked as expected and the appropriate versions (actions/checkout@v4 and aormsby/Fork-Sync-With-Upstream-action@v3.4.1, respectively) were called as reported in the log

The successful log file is here:

@ps2 ps2 merged commit 2bcbe4c into LoopKit:dev Apr 24, 2024
@dnzxy dnzxy deleted the update-browserbuild-dependencies branch July 16, 2024 07:59
SmiteDiabeetus added a commit to SmiteDiabeetus/LoopWorkspace that referenced this pull request Sep 30, 2024
* Bring in MinimedKit project fix

* Add debug log to TidepoolKit

* TidepoolKit and TidepoolService updates

* Fix double inclusion of ru, and add hi locale

* Update LoopKit submodule

* Remove TidepoolKitUI references

* Ensure food entries have name set

* Tidepool carb upload fix refinement

* Add initialization error logging to TidepoolService

* TidepoolService updates

* Omnipod ref codes fixes

* Bring in TidepoolService and NightscoutService changes

* Fix tests

* Update circleci job name

* change default job name in circleci

* Add version

* Bring in RemoteCommands PRs

* Ensure each submodule branch is at its HEAD before branching

* Bring in latest translations

* Readlink fix

* Fastfile: Add time sensitive notifications to identifier setup (LoopKit#50)

* Fastfile capabilities: add Time Sensitive Notifications to Loop target

Spaceship::ConnectAPI::BundleIdCapability::Type::USERNOTIFICATIONS_TIMESENSITIVE

* Remove instructions for manually adding Time Sensitive Notifications

* G7SensorKit changes

* Meal detection fixes for mmol/L

* Reorg ps2 frameworks (LoopKit#53)

* Update gitmodules to point to LoopKit repos instead of ps2 repos

* Moving submodules

* Add renamed projects

* Nightscout remote cgm rename (LoopKit#54)

* Update gitmodules

* Update NightscoutRemoteCGM submodule references, and project references

* Update submodule rev ro NightscoutRemoteCGM

* Always upload artifacts

* Changes from Tidepool (LoopKit#55)

* Changes from Tidepool

* Update to dev

* Add merges for NightscoutRemoteCGM and G7SensorKit

* Fix tests

* Use MKRingProgressView from swift package

* Update TidepoolKit

* Add Minizip project back in

* Update TidepoolKit

* Update to ZipFoundation for providing zip file creation abilities (LoopKit#56)

* Update to ZipFoundation for providing zip file creation abilities

* Update Loop

* Update to dev

* Warnings cleanup

* Tidepool sync (LoopKit#58)

* Changes from Tidepool

* Update to dev

* Add merges for NightscoutRemoteCGM and G7SensorKit

* Fix tests

* Tidepool Merge

* Fix merge issues

* Update packages

* Add branch name to build name (LoopKit#52)

* G7 sensor reading age fix

* Another G7 date issue fixed

* Status wiget glucose age calc fix

* Bring in latest submodule changes

* Use current Xcode

* Bump xcode version for github workflows

* Update github actions to use macos 13, with latest Xcode

* Bring in Loop and LoopKit changes

* G7 HKDevice update

* Bring in LoopKit crash fix

* Algorithm experiments (LoopKit#62)

* Turn on algorithm experiments

* Loop updates

* IRC added as experiment

* Update Loop submodule

* Bring in analytics changes

* Bring in IRC fix

* Analytics fix

* Adding Libre Integration (LoopKit#51)

* Libre testing branch

* Update submodule

* Update libre branch to latest dev

* Fixes

* Add NFC entitlement

* Update LibreTransmitter to main branch

* Update submodules to latest dev

* update submodule

* Add duration to suspend event

* Update Nightscout service and LoopKit

* Submodule updates

* Add NFC_TAG_READING to fastlane bundle id configuration for Loop

* Update ZipFoundation revision

* Critical log export fix

* Tidepool merge (LoopKit#65)

* Removing TidepoolKit

* Removing TidepoolKit

* Update submodules

* Add scheduled sync and build, and allow for customization of Loop with GitHub Actions / Fastlane builds (LoopKit#43)

* Scheduled sync and build, with option to customize Loop

Changed template for scheduled runs to every month

Added env variables for 
- upstream and target repo/branches
- sync upstream 'true'/'false'
- customize app 'true'/'false'

Added sync action (aormsby/Fork-Sync-With-Upstream-action) to the (sync and) build job

Added gautamkrishnar/keepalive-workflow to avoid expiration of scheduled workflows due to repository inactivity (60 days max). Adds an empty commit to fork if no activity during the last 27 days.

Added Customize Loop action, which 
- applies any patches located in the LoopWorkspace/patches/ directory (@billybooth)
- downloads (wget) and applies submodule patches specified in build_loop.yml

Added (commented-out) CustomTypeOne/LoopPatches as templates for Loop and LoopKit submodule patches.

* Add ./patches/save_patches_here.md

* build_loop.yml: update patch templates for submodules

* build_loop.yml: comment out patch template for submodule Loop

* build_loop.yml: patch template app name = CustomLoop

* Update build_loop.yml: fix typo

* Update save_patches_here.md: fix typo

* build_loop.yml: delete test_mode

* build_loop.yml: remove env CUSTOMIZE_APP

* Update build_loop.yml: remove remaining env CUSTOMIZE_APP refs

* build_loop.yml: remove '--exclude=' from 'git apply'

* Create update.yml

- runs on a frequent schedule
- checks out LoopWorkspace `main`
- compares and syncs with LoopKit/LoopWorkspace (unless owner = LoopKit)
- keepalive action adds empty commits to LoopKit/LoopWorkspace `main` after `time_elapsed` days to to avoid inactivation of scheduled workflows, when these updates are passed on to forks (only if owner = LoopKit)
- launches build_loop.yml workflow on forks to sync and build if new commits are found (unless owner = LoopKit)

* Remove keepalive action from build_loop.yml

- keepalive action moved to update.yml

* Adapt build_loop.yml and update.yml to be run in an "actions" branch

to be set as default, and used to trigger scheduled builds of the main branch. 

Empty commits are added to an "actions" branch only (must be created by the user and set as default) to keep this branch "alive" and allow scheduled workflows to run uninterrupted (max 60 days of inactivity). 

The empty commits will not be included in the resulting TestFlight builds of main.

Removed conditionals regarding LoopKit repository.

* build_loop.yml: Add job names for `secrets` and `upstream_sync_and_build`

* update.yml: shorter job name for `check_latest_from_upstream`:

Check upstream

* build_loop.yml: use curl instead of wget for downloading patches

* Changes to build_loop.yml and update.yml:

build_loop.yml:
-Remove sync action from build_loop.yml
-build on schedule on the 1th every month for a predictable build schedule well within the 90 day TestFlight limit. The time of day should be chosen as a time where ongoing changes are unlikely during releases (nighttime).
-rename env TARGET_BRANCH to BUILD_BRANCH
- use current branch as BUILD_BRANCH for easy switching to building main or dev (manually insert alternative branch names as needed)

update.yml:
- check for updates every day
- use current branch name for UPSTREAM_BRANCH and TARGET_BRANCH, to easily switch between dev and main by changing default branch, without any code changes.
- do not run the upstream sync action on the upstream LoopKit repository
- time_elapsed: 50 days for keepalive action

* Add branch name to run-names 

- with round brackets around branch name for readability:
(${{ github.ref_name }})

* Remove mention of setting TARGET_BRANCH as default, since its not fixed

* Move update and keep alive features to build_loop.yml

- Checks for updates nightly
- Ensures repository activity
- Launches Build job if new commits are found, or if run manually
- Workflow file cleanup

* Delete update.yml

* testflight.md: update GH_PAT instructions

 * Change the Expiration selection to `No expiration`.
 * Select the `repo` and `workflow` permission scopes.

* testflight.md instructions: Create a branch named "alive"

* testflight.md: rephrase section on ‘Create a branch named "alive"’

* Added MixpanelService to Loop (LoopKit#63)

* Added MixpanelService to Loop

* Update module url

* bump mixpanel

* Xcode 15 Beta 3 fixes

* Remove unused project refs, and update MixpanelService signing

* build_loop.yml: Disable upstream sync with optional repository variable (LoopKit#67)

Set an optional "SYNC_UPSTREAM" repository variable to 'false' to disable syncing of fork with the upstream repository

* Update submodules (LoopKit#68)

G7 Logging fix
Libre Demo retain fix
NightscoutRemoteCGM fix deployment target

* build_loop.yml: Separate checkout repo for building (LoopKit#69)

* build_loop.yml: build_loop.yml: Separate checkout repo for building

Checkout for syncing without submodules: recursive

* build_loop.yml: remove "submodules: recursive" from checkout for syncing, fix typo.

* Bring in IRC changes and always use dynamic carbs

* Bring in changes to move charts to LoopKit

* Homescreen Medium Widget, and insulin suspension forecast preview

* Fastlane widget bundleid updates (LoopKit#75)

* Update build_loop.yml

* Update build_loop.yml

* Update Fastfile for widget extension bundle id change

* Adding top-to-bottom algorithm test

* Submodule updates

* Fix for crash when running forecast previews

* Tidepool Sync (LoopKit#80)

* Sync script updates (LoopKit#81)

* Tidepool Sync

* Make sure diffs exist, merge in LoopKit updates

* Bring in LoopDataManager race condition fix

* Update translation repo list

* Update translations from Lokalise (LoopKit#82)

* Update translations from Lokalise

* Bring in translations for more repos

* Bring in translations for more repos

* Scheduled build improvements (LoopKit#71)

* Add conditional scheduled build and sync

* Update testflight.md with instructions for scheduling setup

* Fix typo

* Remove GITHUB_TOKEN; use GH_PAT instead

* Update testflight.md with instructions how to add workflow scope

* Fixed conditions for scheduled build

* Fix upstream repo owner

* Refactor build to use workflow permissions and auto-create alive branch

* Change GITHUB_TOKEN to GH_PAT

* Change token to GITHUB_TOKEN where appropriate; Make env variable names more descriptive

* Fix broken alive branch auto-creation

* Update testflight.md with opt-out and new config info

* Update cron for sync and schedule, update build condition

* Fix typo…

* Update testflight.md with suggestions and re-organized contents

* Fix typo from PR74

* Browser Build "Validate Secrets" Improvements (LoopKit#77)

* Added improved validation and more descriptive error messages

* Add validations from suggestions and test feedback

* Modify validate_secrets to run in readonly mode

* Streamline naming 1/3

* Streamline naming 2/3

* Streamline naming 3/3, add back validation preceding build

* Fix LoopWidgetExtension bundle identifier

* Add fastlane patterns back after accidentally removing them

* Fix Match-Secrets auto-creation and if-condition

* validate_secrets.yml: Set pipefail option so that fastlane exit codes are handled correctly

* workflows: Include branch in (run) names and use consistent capitalization across reusable job names

* This commit is purely aesthetic and aims to make the display names of Jobs consistent across workflows. Likewise, makes spacing and validation error messages consistent.

* validate_secrets.yml: Make annotations more "actionable".

* validate_secrets.yml: Improve error annotations around GH_PAT permissions

* Trivial changes to FASTLANE / ASC error annotations (mention 'Keys' tab)

---------

Co-authored-by: Billy Booth <billy@appliedolap.com>

* Bump submodule refs

* More carb entry fixes

* Omnipod debug logging updates

* Fixes for automated builds (LoopKit#83)

* Fix broken upstream sync; Remove orphaned environment variable

* Fix condition for automated alive branch creation

* Disable meal detection when calibrations are present, and localization fix

* Bring in fixes for negative duration dose prevention

* Bring in functional algo support

* Bring in changes for app expiration warning for testflight builds

* Tidepool sync

* Fix cron schedule for automated sync and build (LoopKit#87)

* Fix cron schedule for sync and build

* Update cron tab descriptions in testflight.md

* Fix typo in comment

* Adding missing hindi translations for app intents

* Update build destinations

* GH Actions: Improve secrets validation (LoopKit#86)

* validate_secrets.yml: Pass a "Could not install WWDR certificate" error through validation

* validate_secrets.yml: Improve annotation when a public Match-Secrets repo exists

* validate_secrets.yml: Rewrite Match-Secrets validation to be explicit about the Match-Secrets repository that will be used

When the GH account that the GH_PAT token was created under does not match the repository_owner of the LoopWorkspace repository, the validation routine used a different Match-Secrets repository than fastlane.

* validate_secrets.yml: Rewrite GH_PAT validation to capture scopes and distinguish between classic and fine-grained access tokens

* validate_secrets.yml: Fix syntax error in Match-Secrets validation job

* validate_secrets.yml: Depend less on patterns / read scopes from any token that provides them

* Provide HAS_WORKFLOW_PERMISSION as an output

* validate_secrets.yml: Annotate failures from unaccepted Apple PLAs

* validate_secrets.yml: Fix typo and improve annotation when GH_PAT is invalid

* validate_secrets.yml: Improve annotation when authorization fails and token format is unknown

* validate_secrets.yml: Minor wording tweak

* Update Fastlane to 2.215.0 (LoopKit#88)

* Update Gemfile.lock for Fastlane to 2.215.0

Among other improvements, this should fix the WWDR issue.

* build_loop.yml: Install bundle, bundle exec

- bundle install
- bundle exec fastlane build_loop
- bundle exec fastlane release

* Update Gemfile.lock

Commands used to install bundler and update dependencies:

sudo gem pristine ffi
sudo gem install bundler
sudo bundle install
sudo bundle update fastlane

* Don't install bundler, which comes with Ruby 2.7+

* Install dependencies and use bundler to exec fastlane across workflows

---------

Co-authored-by: Billy Booth <billy@appliedolap.com>

* Bring in CGM Event Store

* Add Mixpanel service to sync

* Bring in Tidepool sync

* Bump Loop submodule rev

* Service state restoration fix

* Upload pod changes to Nightscout as Site Change treatments, for the cannula age (CAGE) pill

* MDT Set change upload

* Bug fix for mdt set change detection, and upload pump alarms to NS

* Add widget fixes

* Update circleci build to xcode 15 (LoopKit#89)

* Update circleci build to xcode 15

* Update workflow to build with Xcode 15

* Bump device

* Fix iphone version

* Run tests on iOS 16.4 until iOS 17 simulators are working

* Include pending insulin in dosing decision

* Update build settings to avoid macos build during translation import

* Bump RileyLinkKit rev

* heartbeat setup fix, and OmniKit translations

* Add slide button cannula insertion

* Disable autolock during pod pairing (Dash)

* Sync the GitHub runner clock with the Windows time server (LoopKit#98)

Adding a step to workflow jobs that interface Apple servers, as a workaround for build issues caused by runner clocks being out of sync. See https://github.com/actions/runner issue number 2996 for details.

name: Sync clock
run: sudo sntp -sS time.windows.com
Added to the following workflows / jobs:

validate_secrets.yml / validate-fastlane-secrets
add_identifiers.yml / identifiers
build_loop.yml / build
create_certs.yml / certificates

* Update submodules

* update to rev of SlideButton package that handles rtl languages (LoopKit#103)

* Bump submodule revs

* Bring in test updates for iOS 17

* include flag for DEBUG_FEATURES_ENABLED by default (LoopKit#111)

* Update submodules for guardrails crash, simulator settings access, and pod pairing UI resumption

* Bring in OmniBLE updates

* Bring in latest submodule revs

* Update browser build action dependencies to meet GH node version requirements (LoopKit#120)

* Bump submodule refs

* Change GITHUB_TOKEN to user-created GH_PAT (LoopKit#125)

Fixes permission issues where GH api responds with:

```swift
gh: Resource not accessible by integration (HTTP 403)
{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/git/refs#create-a-reference"}
Error: Process completed with exit code 1.
```

because the default, auto-created GITHUB_TOKEN cannot be given appropriate content write permissions to create branches in the owner's repository

* Update Gemfile.lock to bump Fastlane to 2.220.0 (LoopKit#126)

* Update testflight.md - apple moved keys under integrations (LoopKit#112)

* Update testflight.md - apple moved keys under integrations

* Fix typo

* Update fastlane and macOS (LoopKit#143)

* update Fastlane to 2.221.1

* update runners to macOS 14

* Update submodules

* Ps2/xcode15.4 (LoopKit#145)

* Update to xcode15.4

* update ios version used in circleci builds

* update ios version used in circleci builds

* Update build_loop.yml (LoopKit#146)

* Update submodule for CGMBLEKit

* Update to Loop 3.4 Release

* Fix browser build sync and alive behavior (LoopKit#164)

* Fix browser build sync and alive behavior
- Added logic to extend the alive check for the existence of either `alive-main` or `alive-dev` branches.
  - Resolved an issue where unexpected successes were occurring when failures were expected.
  - Implemented a check to determine the existence of the `alive-main` and `alive-dev` branches and create them if they do not exist.

- Introduced a mechanism to identify the current branch being run (either `main` or `dev`).
  - Based on the current branch, the corresponding alive branch (`alive-main` or `alive-dev`) will be used to check for upstream changes.

- Set a new variable `ABORT_SYNC` to `true` when the current branch is neither `dev` nor `main`.
  - The syncing attempt will proceed based on the `ABORT_SYNC` variable status.

- Ensured proper branch synchronization to prevent build inconsistencies and failures

- Addresses issue LoopKit/Loop#2192

- Updates app store connect link for validation error hints to new Apple URL scheme

* 💚 Security Fix

Co-Authored-By: ebouchut <ebouchut@users.noreply.github.com>

---------

Co-authored-by: ebouchut <ebouchut@users.noreply.github.com>

* Update for Loop 3.4.1

---------

Co-authored-by: Pete Schwamb <pete@schwamb.net>
Co-authored-by: bjornoleh <63544115+bjornoleh@users.noreply.github.com>
Co-authored-by: Marion Barker <marionbarker@earthlink.net>
Co-authored-by: Cameron Ingham <camji555@gmail.com>
Co-authored-by: Noah Brauner <66573062+SwiftlyNoah@users.noreply.github.com>
Co-authored-by: Deniz Cengiz <48965855+dnzxy@users.noreply.github.com>
Co-authored-by: Billy Booth <billy@appliedolap.com>
Co-authored-by: Marion Barker <19607791+marionbarker@users.noreply.github.com>
Co-authored-by: ebouchut <ebouchut@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants