Repository navigation
initial commit - #3022
Closed
fluxxBot wants to merge 1 commit into
Closed
initial commit#3022fluxxBot wants to merge 1 commit into
fluxxBot wants to merge 1 commit into
Conversation
agrasth
reviewed
Jul 15, 2025
Comment on lines
+125
to
+128
| vConfig, err := project.ReadConfigFile(configFilePath, project.YAML) | ||
| if err != nil { | ||
| return nil, err | ||
| } |
Contributor
There was a problem hiding this comment.
We can validate config file contents before proceeding.
| if err != nil { | ||
| return err | ||
| } | ||
| err = build.AddArtifacts(moduleName, "generic", artifacts...) |
Contributor
There was a problem hiding this comment.
Some Improvements:
- We can add error context if adding artifacts fails.
- We can add logging for successful artifact addition.
| } | ||
|
|
||
| func getBuildPropsForArtifact(buildName, buildNumber, project string) (string, error) { | ||
| err := buildUtils.SaveBuildGeneralDetails(buildName, buildNumber, project) |
Contributor
There was a problem hiding this comment.
Consider logging if saving general details fails.
| } | ||
| searchReader, err = servicesManager.SearchFiles(searchParams) | ||
| if err != nil { | ||
| log.Error("Failed to get uploaded npm package: ", err.Error()) |
Contributor
There was a problem hiding this comment.
Error message is specific to npm, but the function is generic.
We can update it to generic message: "Failed to get uploaded package: ..."
| if err != nil { | ||
| log.Warn("Unable to set build properties: ", err, "\nThis may cause build to not properly link with artifact, please add build name and build number properties on the tarball artifact manually") | ||
| } | ||
| buildInfoArtifacts, err := utils.ConvertArtifactsSearchDetailsToBuildInfoArtifacts(searchReader) |
Contributor
There was a problem hiding this comment.
if needed we can check for errors after converting artifacts before proceeding
Comment on lines
+31
to
+42
| func GetBuildInfoForUploadedArtifacts(uploadedFile string, buildConfiguration *buildUtils.BuildConfiguration) error { | ||
| repoConfig, err := extractRepositoryConfig() | ||
| if err != nil { | ||
| return err | ||
| } | ||
| serverDetails, err := repoConfig.ServerDetails() | ||
| if err != nil { | ||
| return err | ||
| } | ||
| err = saveBuildInfo(serverDetails, repoConfig.TargetRepo(), uploadedFile, buildConfiguration) | ||
| return err | ||
| } |
Contributor
There was a problem hiding this comment.
logs and the error messages can be updated,
func GetBuildInfoForUploadedArtifacts(uploadedFile string, buildConfiguration *buildUtils.BuildConfiguration) error {
log.Info("Extracting repository configuration for build info...")
repoConfig, err := extractRepositoryConfig()
if err != nil {
log.Error("Failed to extract repository configuration: ", err)
return fmt.Errorf("extractRepositoryConfig failed: %w", err)
}
log.Info("Retrieving server details...")
serverDetails, err := repoConfig.ServerDetails()
if err != nil {
log.Error("Failed to retrieve server details: ", err)
return fmt.Errorf("ServerDetails extraction failed: %w", err)
}
log.Infof("Saving build info for uploaded file: %s", uploadedFile)
err = saveBuildInfo(serverDetails, repoConfig.TargetRepo(), uploadedFile, buildConfiguration)
if err != nil {
log.Error("Failed to save build info: ", err)
return fmt.Errorf("saveBuildInfo failed: %w", err)
}
log.Info("Successfully saved build info for uploaded artifact.")
return nil
}
agrasth
reviewed
Jul 15, 2025
Comment on lines
+176
to
+179
| err = cliutils.CreateConfigCmd(ctx, project.FromString(confType)) | ||
| if err != nil { | ||
| return err | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| err = cliutils.CreateConfigCmd(ctx, project.FromString(confType)) | |
| if err != nil { | |
| return err | |
| } | |
| if !configExists(confType) { | |
| err = cliutils.CreateConfigCmd(ctx, project.FromString(confType)) | |
| if err != nil { | |
| return fmt.Errorf("failed to create config: %w", err) | |
| } | |
| } |
Contributor
|
CLosing as not needed anymore |
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
devbranch.go vet ./....go fmt ./....