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

chore(ci): add direct branch cloning for fastlane match #4597

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

philprime
Copy link
Contributor

📜 Description

Changes sync_code_signing in fastlane lanes to use direct branch cloning.

💡 Motivation and Context

Workflow runs were occasionally failing due to the following error:

Cloning remote git repo...
If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.
Checking out branch master...
fatal: a branch named 'master' already exists

Example: https://github.com/getsentry/sentry-cocoa/actions/runs/12154028573/job/33893118719?pr=4593#step:5:96

By directly defining the branch to clone, the branch checkout step should be skipped instead.

💚 How did you test it?

Created this PR to run workflows on CI.

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

#skip-changelog

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.008%. Comparing base (b34716f) to head (5809332).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4597       +/-   ##
=============================================
- Coverage   91.018%   91.008%   -0.010%     
=============================================
  Files          617       617               
  Lines        70935     70935               
  Branches     25337     25325       -12     
=============================================
- Hits         64564     64557        -7     
- Misses        6279      6285        +6     
- Partials        92        93        +1     

see 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@philprime philprime self-assigned this Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1221.44 ms 1248.02 ms 26.58 ms
Size 22.31 KiB 749.84 KiB 727.53 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
187edbf 1224.29 ms 1239.69 ms 15.40 ms
2095ae0 1238.20 ms 1251.37 ms 13.17 ms
df2835d 1218.78 ms 1238.35 ms 19.57 ms
8c9d1d4 1239.13 ms 1253.00 ms 13.87 ms
62c15d4 1235.30 ms 1260.82 ms 25.52 ms
e5ac362 1204.12 ms 1229.41 ms 25.29 ms
72c8d84 1238.96 ms 1247.34 ms 8.38 ms
fcde045 1260.71 ms 1275.00 ms 14.29 ms
e3adcd5 1206.47 ms 1215.39 ms 8.92 ms
42ef6ba 1195.04 ms 1214.35 ms 19.31 ms

App size

Revision Plain With Sentry Diff
187edbf 21.58 KiB 729.90 KiB 708.32 KiB
2095ae0 21.90 KiB 709.06 KiB 687.16 KiB
df2835d 21.58 KiB 706.14 KiB 684.55 KiB
8c9d1d4 21.58 KiB 706.97 KiB 685.39 KiB
62c15d4 22.85 KiB 411.14 KiB 388.29 KiB
e5ac362 20.76 KiB 426.11 KiB 405.34 KiB
72c8d84 22.85 KiB 408.88 KiB 386.03 KiB
fcde045 20.76 KiB 435.26 KiB 414.50 KiB
e3adcd5 21.58 KiB 539.87 KiB 518.28 KiB
42ef6ba 21.58 KiB 417.87 KiB 396.28 KiB

Previous results on branch: philprime/match-direct-branch

Startup times

Revision Plain With Sentry Diff
501e7b0 1241.59 ms 1256.00 ms 14.41 ms

App size

Revision Plain With Sentry Diff
501e7b0 22.30 KiB 749.83 KiB 727.53 KiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM.

Worth a shot if it doesn't improve we can always roll back. I noticed that checkout in GH actions sets the default branch to master

/usr/local/bin/git init /Users/runner/work/sentry-cocoa/sentry-cocoa
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint:
  hint: 	git config --global init.defaultBranch <name>
  hint:
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint:
  hint: 	git branch -m <name>
  Initialized empty Git repository in /Users/runner/work/sentry-cocoa/sentry-cocoa/.git/

But that's the same for release build swift succeeding or failing. If we see the same error happening again in the future, maybe we could look into this.

fastlane/Fastfile Show resolved Hide resolved
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

@philprime philprime merged commit 08a18aa into main Dec 10, 2024
44 of 45 checks passed
@philprime philprime deleted the philprime/match-direct-branch branch December 10, 2024 07:25
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