Skip to content

ci: specify master branch for meshery checkout in e2etests#195

Open
2004Pruthvi wants to merge 2 commits intomeshery-extensions:masterfrom
2004Pruthvi:fix/ci-checkout-branch
Open

ci: specify master branch for meshery checkout in e2etests#195
2004Pruthvi wants to merge 2 commits intomeshery-extensions:masterfrom
2004Pruthvi:fix/ci-checkout-branch

Conversation

@2004Pruthvi
Copy link
Copy Markdown

@2004Pruthvi 2004Pruthvi commented Mar 17, 2026

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

@2004Pruthvi
Copy link
Copy Markdown
Author

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!

@2004Pruthvi 2004Pruthvi force-pushed the fix/ci-checkout-branch branch 2 times, most recently from a38d680 to e8c8dee Compare March 19, 2026 17:09
@leecalcote leecalcote requested a review from Copilot March 19, 2026 17:12
@leecalcote
Copy link
Copy Markdown
Member

Running build checks...

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/meshery checkout in e2etests workflow to ref: master to avoid detached HEAD.
  • Update .golangci.yml to 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.mnd and an exclude-rules entry for mnd, but mnd is not enabled (with disable-all: true, it won’t run). If the intent is to actually enforce magic-number checks, add mnd under linters.enable; otherwise, remove the mnd settings/exclude rule to avoid confusing dead configuration.
linters-settings:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/e2etests.yaml
Comment thread .golangci.yml
- internal/cache
- internal/renameio
- internal/robustio
timeout: 5m
Comment thread .golangci.yml Outdated
Comment on lines +3 to +9
rules:
main:
files:
- $all
deny:
- pkg: "github.com/sirupsen/logrus"
desc: "logging is allowed only by logutils.Log"
Comment thread .golangci.yml Outdated
Comment on lines +42 to +47
mnd:
checks:
- argument
- case
- condition
- return
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown

@lekaf974 lekaf974 left a comment

Choose a reason for hiding this comment

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

if you modify this use latest version please

Comment thread .github/workflows/e2etests.yaml Outdated
echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
fi
- uses: actions/checkout@master
- uses: actions/checkout@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@v6

Comment thread .github/workflows/e2etests.yaml Outdated
ref: master
- name: DownloadJSON
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

@2004Pruthvi
Copy link
Copy Markdown
Author

Also, could someone please approve the workflows so CI checks can run?

@2004Pruthvi 2004Pruthvi requested a review from lekaf974 March 23, 2026 05:04
@2004Pruthvi
Copy link
Copy Markdown
Author

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!

@lekaf974
Copy link
Copy Markdown

@2004Pruthvi can you include golangci-lint changes in another PR please

@2004Pruthvi 2004Pruthvi force-pushed the fix/ci-checkout-branch branch from 1a0cb2a to 07009d5 Compare April 1, 2026 04:17
Signed-off-by: pruthvi@2004 <pruthviraj462004@gmail.com@2004Pruthvi.noreply.github.com>
@2004Pruthvi 2004Pruthvi force-pushed the fix/ci-checkout-branch branch from 07009d5 to 036ee56 Compare April 1, 2026 04:21
@2004Pruthvi
Copy link
Copy Markdown
Author

Hi @lekaf974, I have finalized the updates to this PR:
​Atomicity: Restored the original .golangci.yml. I will move the linter modernization to a separate PR as requested.
​Upgraded Actions: Updated the workflow to use the latest GitHub Action versions (checkout@v6, upload-artifact@v8, and download-artifact@v8).
​Core Fix: Kept the ref: master addition to resolve the detached HEAD issue (#190).
​I believe this is now ready for a final review. Thank you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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: master to 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), and actions/download-artifact (v2→v8)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/e2etests.yaml
Comment thread .github/workflows/e2etests.yaml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@2004Pruthvi
Copy link
Copy Markdown
Author

The linter modernization has been moved to #[Insert-New-PR-Number-Here]. PR #195 is now strictly focused on the CI infrastructure fix and GitHub Action version bumps. Ready for a final look! CC: @lekaf974

@2004Pruthvi 2004Pruthvi requested a review from Copilot April 9, 2026 10:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

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.

[CI] branch is not specified during checkout in e2etests

5 participants