Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-quota-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
issues: write
steps:
- name: Check PR quota
// Use action version v7.0.1
# Use action version v7.0.1
uses: actions/github-script@60a0d8304218317a38b4124020f343a0d555a1eb
with:
script: |
Expand Down
3 changes: 3 additions & 0 deletions pkg/ddc/alluxio/ufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import (
"os"
)

// IsMountWithConfigMap checks if the mount configuration is stored in a ConfigMap.
// It looks up the environment variable MountConfigStorage and compares it to ConfigmapStorageName.
// If the environment variable is set and matches, it returns true; otherwise, it returns the default value true.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The description of the function's behavior is not entirely accurate. It omits the case where the environment variable is set but does not match ConfigmapStorageName, in which the function would return false. This can be misleading to developers reading the code. A more precise comment would improve clarity.

Suggested change
// If the environment variable is set and matches, it returns true; otherwise, it returns the default value true.
// If the environment variable is set, it returns true if the value matches ConfigmapStorageName, and false otherwise. If the variable is not set, it defaults to true.

func IsMountWithConfigMap() bool {
if envVal, exists := os.LookupEnv(MountConfigStorage); exists {
return envVal == ConfigmapStorageName
Expand Down
Loading