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

[RSDK-9498] Search for meta.json File in Top Level of Online Module #4689

Merged
merged 50 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
974351e
pass directories
bashar-515 Jan 2, 2025
d15c8c1
search through top-level directory
bashar-515 Jan 3, 2025
249ff76
restore manager.go file
bashar-515 Jan 3, 2025
9fac490
actually restore manager.go file
bashar-515 Jan 3, 2025
19287f3
create helper function
bashar-515 Jan 3, 2025
4b46142
use environment variable if registry module
bashar-515 Jan 3, 2025
91ece93
remove print statement
bashar-515 Jan 3, 2025
df1742d
fix lint errors
bashar-515 Jan 3, 2025
49efade
restore manager.go file
bashar-515 Jan 6, 2025
4a86d33
restore manager.go file
bashar-515 Jan 8, 2025
08e0757
always return top level directory
bashar-515 Jan 8, 2025
a320e8a
always use helper function to find meta.json file
bashar-515 Jan 8, 2025
56e4222
reword error returned when no meta.json file found
bashar-515 Jan 8, 2025
a757e69
check for non-nil error first
bashar-515 Jan 8, 2025
947fd2f
rework order of conditions
bashar-515 Jan 8, 2025
a2b6fbe
update comment
bashar-515 Jan 8, 2025
79db09d
update TODO comment
bashar-515 Jan 8, 2025
0524189
fix numbering typo in comment
bashar-515 Jan 8, 2025
159b723
correctly return error
bashar-515 Jan 8, 2025
7797a34
lint
bashar-515 Jan 9, 2025
ce8f7b9
fix typo
bashar-515 Jan 9, 2025
a4a0a9c
add unit tests for finding meta.json file
bashar-515 Jan 9, 2025
c0ed578
export previously added unit test
bashar-515 Jan 9, 2025
242c644
correctly check error type in unit tests
bashar-515 Jan 9, 2025
06382f4
reword errors
bashar-515 Jan 10, 2025
1652778
include module type in errors
bashar-515 Jan 10, 2025
ac9380a
clarify cases
bashar-515 Jan 10, 2025
3732b8a
remove unnecessary conditions
bashar-515 Jan 10, 2025
581f6b8
begin implementing unit tests
bashar-515 Jan 10, 2025
33ae953
write unit tests for registry module case
bashar-515 Jan 13, 2025
e5f6122
test local non-tarball case
bashar-515 Jan 13, 2025
5666808
fix case description
bashar-515 Jan 13, 2025
20fc522
mark test as complete
bashar-515 Jan 13, 2025
a97e648
correctly create error
bashar-515 Jan 13, 2025
a9f1ff9
lint
bashar-515 Jan 13, 2025
b2318af
finish unit tests for getJSONManifest()
bashar-515 Jan 13, 2025
e700d0f
update comments
bashar-515 Jan 13, 2025
5502231
write FirstRun() unit tests
bashar-515 Jan 13, 2025
6d50344
remove unused helper function
bashar-515 Jan 13, 2025
a3a79ed
remove unused import
bashar-515 Jan 13, 2025
995fd41
lint
bashar-515 Jan 13, 2025
1cec229
check logs
bashar-515 Jan 13, 2025
a9360d6
only search unpacked module directory if different from top level mod…
bashar-515 Jan 13, 2025
7498514
add comments explaining environment variables
bashar-515 Jan 15, 2025
c6b66b1
rename test function to specify that it only tests registry modules
bashar-515 Jan 15, 2025
6c8f702
create helper function
bashar-515 Jan 15, 2025
f00fc03
lint
bashar-515 Jan 15, 2025
6698cfc
add new tests
bashar-515 Jan 15, 2025
99e3305
lint
bashar-515 Jan 15, 2025
52656ca
remove TODO comment
bashar-515 Jan 16, 2025
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
Prev Previous commit
Next Next commit
fix case description
bashar-515 committed Jan 13, 2025
commit 566680866461d47d962d4a75af622aa9f211cb22
6 changes: 3 additions & 3 deletions config/module.go
Original file line number Diff line number Diff line change
@@ -405,12 +405,12 @@ func (m Module) getJSONManifest(unpackedModDir string, env map[string]string) (*
if registryErr != nil {
// return from getJSONManifest() if the error returned does NOT indicate that the file wasn't found
if !os.IsNotExist(registryErr) {
return nil, "", errors.Wrap(registryErr, "registry module")
return nil, "", errors.Wrap(registryErr, "registry module") // DONE
}
}

if meta != nil {
return meta, moduleWorkingDirectory, nil
return meta, moduleWorkingDirectory, nil // DONE
}
}
}
@@ -450,7 +450,7 @@ func (m Module) getJSONManifest(unpackedModDir string, env map[string]string) (*
meta, localTarballErr = findMetaJSONFile(exeDir)
if localTarballErr != nil {
if !os.IsNotExist(localTarballErr) {
return nil, "", errors.Wrap(localTarballErr, "local non-tarball")
return nil, "", errors.Wrap(localTarballErr, "local tarball")
}
}