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: use ~/.meshery directory for temporary files instead of working #649

Conversation

souvikinator
Copy link
Contributor

…directory

Description

This PR fixes #648

Notes for Reviewers

Addresses the issue of temporary file handling during Docker Compose to Kubernetes manifest conversion in Meshery.

Previously, temporary files were being created in the working directory (./) which caused permission issues in a containerized environment.

NOTE: using ~/.meshery instead of ./ is a hypothesis, if this fails we might want to try using os.TempDir() or os.CreateTemp()

The Problem:

  • Temporary files (temp.data and result.yaml) were being created in the current working directory
  • This led to permission denied errors in containerized environments where the working directory might not be writable

The Solution:

  • Created a dedicated ~/.meshery directory for temporary file operations

Testing Done:

  • Works fine locally

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Souvik Kar Mahapatra <[email protected]>
@leecalcote
Copy link
Member

@souvikinator - https://github.com/meshery/meshkit/actions/runs/12894300696/job/35952644600?pr=649

  Running [/home/runner/golangci-lint-1.63.4-linux-amd64/golangci-lint run] in [/home/runner/work/meshkit/meshkit] ...
  level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package reference: could not load export data: no export data for \"github.com/docker/distribution/reference\""
  level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildir: failed to load package reference: could not load export data: no export data for \"github.com/docker/distribution/reference\""

@leecalcote leecalcote merged commit fc0e2ba into meshery:master Jan 21, 2025
2 of 4 checks passed
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.

File Permission Error During Docker Compose to Kubernetes Conversion
2 participants