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

Hotfix: Skip Checkout Regression #680

Merged
merged 8 commits into from
May 10, 2021

Conversation

JustinGrote
Copy link
Contributor

@JustinGrote JustinGrote commented May 8, 2021

The testing logic for isLocalCheckout was incorrect, fix and add a test specifically for checkout.

Fixes #678

@JustinGrote JustinGrote requested a review from a team as a code owner May 8, 2021 16:05
@mergify
Copy link
Contributor

mergify bot commented May 8, 2021

@JustinGrote this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label May 8, 2021
@catthehacker
Copy link
Member

Can we remove .secrets and .env loading from tests as well?

@mergify
Copy link
Contributor

mergify bot commented May 8, 2021

@JustinGrote this pull request has failed checks 🛠

@mergify
Copy link
Contributor

mergify bot commented May 8, 2021

@JustinGrote this pull request has failed checks 🛠

@JustinGrote
Copy link
Contributor Author

Can we remove .secrets and .env loading from tests as well?

does that need to be done in the context of this PR or should it be done separately? I should have just fixed the last test and this should "go green" on this commit.

@mergify
Copy link
Contributor

mergify bot commented May 8, 2021

@JustinGrote this pull request has failed checks 🛠

@JustinGrote
Copy link
Contributor Author

@JustinGrote this pull request has failed checks 🛠
This is probably related to why I put the invalid step check in the first place, let me nail it down.

@catthehacker
Copy link
Member

Can we remove .secrets and .env loading from tests as well?

does that need to be done in the context of this PR or should it be done separately? I should have just fixed the last test and this should "go green" on this commit.

It was added because of that specific issue so I would prefer it to be gone otherwise it will mess with testing.

@JustinGrote
Copy link
Contributor Author

Sure, I can regress that as well, but it will still show up if you, for instance, want to check out a specific ref as part of your flow.

@catthehacker
Copy link
Member

Sure, I can regress that as well, but it will still show up if you, for instance, want to check out a specific ref as part of your flow.

Sounds like we need more test cases 😼

@JustinGrote
Copy link
Contributor Author

Sure, I can regress that as well, but it will still show up if you, for instance, want to check out a specific ref as part of your flow.

Sounds like we need more test cases 😼

Probably :)

The current kernel panic is in the empty workflow case, it's generating a nil remote action that when it hits IsCheckout() causes a nil reference panic. It looks like the old flow was to get past this and drop an error later, sorting that out.

@codecov
Copy link

codecov bot commented May 8, 2021

Codecov Report

Merging #680 (5ab38fa) into master (0f04942) will increase coverage by 1.26%.
The diff coverage is 61.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #680      +/-   ##
==========================================
+ Coverage   49.27%   50.53%   +1.26%     
==========================================
  Files          23       23              
  Lines        2401     2525     +124     
==========================================
+ Hits         1183     1276      +93     
- Misses       1090     1113      +23     
- Partials      128      136       +8     
Impacted Files Coverage Δ
pkg/container/docker_run.go 1.82% <0.00%> (-0.11%) ⬇️
pkg/model/workflow.go 30.71% <33.33%> (+5.00%) ⬆️
pkg/common/git.go 55.12% <33.92%> (-4.68%) ⬇️
pkg/model/planner.go 34.56% <41.37%> (+1.48%) ⬆️
pkg/container/docker_pull.go 36.17% <64.70%> (+17.98%) ⬆️
pkg/runner/step_context.go 73.00% <74.79%> (+4.05%) ⬆️
pkg/runner/run_context.go 79.74% <94.82%> (+3.33%) ⬆️
pkg/runner/runner.go 76.92% <100.00%> (+0.45%) ⬆️
... and 1 more

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 aa68181...5ab38fa. Read the comment docs.

@pull-request-size pull-request-size bot added size/M and removed size/S labels May 8, 2021
@mergify mergify bot removed the needs-work Extra attention is needed label May 8, 2021
@mergify mergify bot requested a review from a team May 8, 2021 18:52
@JustinGrote
Copy link
Contributor Author

@catthehacker fixed and the .secrets regressed as well, LGTM

@mergify mergify bot requested a review from a team May 10, 2021 08:39
@mergify mergify bot merged commit ef0da2a into nektos:master May 10, 2021
@JustinGrote JustinGrote deleted the hotfix/SkipCheckout branch May 10, 2021 22:20
@ayozemr
Copy link

ayozemr commented May 24, 2021

Thanks for this!! Will this be part of a release anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants