ci: specify master branch for meshery checkout in e2etests#195
ci: specify master branch for meshery checkout in e2etests#1952004Pruthvi wants to merge 2 commits intomeshery-extensions:masterfrom
Conversation
|
Hi @leecalcote / @theBeginner86, I've just submitted a PR to fix this. I've updated the e2etests.yaml to explicitly checkout the master branch, which should resolve the detached HEAD failure during doc publishing. Looking forward to your feedback! |
a38d680 to
e8c8dee
Compare
|
Running build checks... |
There was a problem hiding this comment.
Pull request overview
Updates CI configuration to ensure the E2E workflow checks out the meshery/meshery repo on a named branch (avoiding detached HEAD) and modernizes parts of the repo’s golangci-lint configuration.
Changes:
- Pin
meshery/mesherycheckout ine2etestsworkflow toref: masterto avoid detached HEAD. - Update
.golangci.ymlto newer linter configuration schema (depguard rules, mnd rename, gosec excludes, gci sections). - Remove some prior golangci-lint configuration (skip-dirs, service block, comments).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .golangci.yml | Migrates/adjusts golangci-lint config and removes prior exclusions/version pin block. |
| .github/workflows/e2etests.yaml | Ensures the external repo checkout targets master explicitly. |
Comments suppressed due to low confidence (1)
.golangci.yml:1
- The config adds
linters-settings.mndand anexclude-rulesentry formnd, butmndis not enabled (withdisable-all: true, it won’t run). If the intent is to actually enforce magic-number checks, addmndunderlinters.enable; otherwise, remove themndsettings/exclude rule to avoid confusing dead configuration.
linters-settings:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - internal/cache | ||
| - internal/renameio | ||
| - internal/robustio | ||
| timeout: 5m |
| rules: | ||
| main: | ||
| files: | ||
| - $all | ||
| deny: | ||
| - pkg: "github.com/sirupsen/logrus" | ||
| desc: "logging is allowed only by logutils.Log" |
| mnd: | ||
| checks: | ||
| - argument | ||
| - case | ||
| - condition | ||
| - return |
lekaf974
left a comment
There was a problem hiding this comment.
if you modify this use latest version please
| echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
| fi | ||
| - uses: actions/checkout@master | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v6 |
| ref: master | ||
| - name: DownloadJSON | ||
| uses: actions/download-artifact@v2 | ||
| uses: actions/download-artifact@v4 |
There was a problem hiding this comment.
| uses: actions/download-artifact@v4 | |
| uses: actions/download-artifact@v8 |
There was a problem hiding this comment.
hank you for the catch, @lekaf974! I've updated the workflow to use checkout@v6 and download-artifact@v8 as suggested. Ready for another look.
|
Also, could someone please approve the workflows so CI checks can run? |
|
Hi @lekaf974, I’ve addressed all the requested changes and updated the workflow versions (checkout@v6, download-artifact@v8). Could you please take another look when you have time? Thanks! |
|
@2004Pruthvi can you include golangci-lint changes in another PR please |
1a0cb2a to
07009d5
Compare
Signed-off-by: pruthvi@2004 <pruthviraj462004@gmail.com@2004Pruthvi.noreply.github.com>
07009d5 to
036ee56
Compare
|
Hi @lekaf974, I have finalized the updates to this PR: |
There was a problem hiding this comment.
Pull request overview
This PR fixes a CI issue where the e2etests workflow was checking out the meshery/meshery repository in a detached HEAD state, which prevented subsequent push operations from succeeding. The fix explicitly specifies the ref: master parameter to ensure the checkout operates on a proper branch context.
Changes:
- Added
ref: masterto the meshery/meshery checkout step to ensure a non-detached HEAD state - Upgraded GitHub Actions versions:
actions/checkout(v4→v6),actions/upload-artifact(v4→v8), andactions/download-artifact(v2→v8)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4bd4837 to
9d73741
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR addresses the issue where the e2etests workflow was checking out the meshery/meshery repository in a "detached HEAD" state. By explicitly specifying ref: master, we ensure that the subsequent steps have the correct branch context to perform a push.
Changes
Updated actions/checkout to v6 for all checkout steps to ensure version consistency and security.
Updated actions/upload-artifact to v8.
Updated actions/download-artifact to v8.
Added ref: master to the meshery/meshery checkout to resolve the detached HEAD failure.
Fixes
Fixes #190