redhat-developer / redhat-developer/mapt

[bug] mapt should test the permission of the target files/directories before creating anything

Open
#693 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
24
Forks
36
Avg merge
6d 13h
Merged PRs (30d)
8

Description

When launching mapt in containers with the wrong user permissions, mapt may fail to create the files necessary to destroy the cloud resource (with mapt).

Examples:

INFO Resources:
INFO     + 16 created
INFO
INFO Duration: 9m39s
INFO
open /workspace/host: is a directory
INFO Resources:
INFO     + 16 created
INFO
INFO Duration: 12m26s
INFO
open /workspace/username: permission denied

This one is less of an issue, as it fails early. But mapt could provide a more user-friendly error message:

DEBU Based on avg prices for instance types ...
DEBU Spot data: {[Standard_D48s_v4] 0.8233680000000001 uksouth  0}
DEBU managing stack stackCreateWindowsDesktop-kpouget-windows-desktop-test
ERRO Failed to create or select stack: failed to select stack: exit status 255
code: 255
stdout:
stderr: error: write ".pulumi/meta.yaml": blob (key ".pulumi/meta.yaml") (code=Unknown): mkdir /workspace/.pulumi: permission denied

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing mapt's startup path that creates or selects cloud resources and writes files under the target directory, including /workspace and .pulumi/meta.yaml. Reproduce the examples with an unwritable target and verify that mapt reports the permission problem before creating resources, with a clear error for both files and directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.