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

Fix: neard-release pipeline #10521

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Fix: neard-release pipeline #10521

merged 2 commits into from
Jan 30, 2024

Conversation

andrei-near
Copy link
Contributor

#10495 was meant to fix the builds triggered by release events.
With actions/checkout GHA action only a single commit is fetched by default and thus missing branch match.
To fetch all history for all branches and tags, setting fetch-depth to 0 for both binary and docker image release jobs.

This was tested on a private repo.
Screenshot 2024-01-29 at 13 42 09

@andrei-near andrei-near requested a review from a team as a code owner January 29, 2024 13:44
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad9721d) 72.01% compared to head (1260b7f) 71.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10521      +/-   ##
==========================================
- Coverage   72.01%   71.99%   -0.03%     
==========================================
  Files         720      720              
  Lines      146476   146476              
  Branches   146476   146476              
==========================================
- Hits       105486   105456      -30     
- Misses      36133    36158      +25     
- Partials     4857     4862       +5     
Flag Coverage Δ
backward-compatibility 0.08% <ø> (ø)
db-migration 0.08% <ø> (ø)
genesis-check 1.25% <ø> (ø)
integration-tests 36.92% <ø> (-0.13%) ⬇️
linux 71.20% <ø> (-0.02%) ⬇️
linux-nightly 71.34% <ø> (-0.01%) ⬇️
macos 55.12% <ø> (+0.01%) ⬆️
pytests 1.47% <ø> (ø)
sanity-checks 1.27% <ø> (ø)
unittests 67.96% <ø> (-0.01%) ⬇️
upgradability 0.13% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -39,6 +39,8 @@ jobs:
- name: Checkout nearcore repository
if: ${{ github.event_name != 'workflow_dispatch'}}
uses: actions/checkout@v4
with:
fetch-depth: 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Documented in the readme

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now I know :)

@andrei-near andrei-near added this pull request to the merge queue Jan 30, 2024
Merged via the queue into master with commit 95c80bf Jan 30, 2024
26 checks passed
@andrei-near andrei-near deleted the neard-release-fetch-depth branch January 30, 2024 11:00
posvyatokum pushed a commit that referenced this pull request Jan 30, 2024
#10495 was meant to fix the builds
triggered by release events.
With actions/checkout GHA action only a single commit is fetched by
default and thus missing branch match.
To fetch all history for all branches and tags, setting fetch-depth to 0
for both binary and docker image release jobs.

This was
[tested](https://github.com/near/andrei-playground/actions/runs/7696882172/job/20972653224)
on a private repo.
<img width="676" alt="Screenshot 2024-01-29 at 13 42 09"
src="https://github.com/near/nearcore/assets/122784628/941c1cd8-285e-4853-a9e7-a6ea6885c838">
github-merge-queue bot pushed a commit that referenced this pull request May 30, 2024
In #10521 I made checkout process
to fetch all nearcore branches.
This instead messed with master branch builds version because these are
fetching latest annotated tag:
```
➜  nearcore git:(master) git "describe" "--always" "--dirty=-modified" "--tags" "--match=[0-9]*"  
1.36.1-653-g2b01868d4
```

To avoid this, we will be fetching with depth 1(default fetch-depth)
when workflow is triggered by master branch push events.
```
➜  nearcore git:(master) git "describe" "--always" "--dirty=-modified" "--tags" "--match=[0-9]*"  
dfa392b
```
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.

2 participants