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

[Build-trigger-45] Providing more robust messages #52

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

khermano
Copy link
Collaborator

resolves #45

}
logger.infof("Triggering build for product %s by %s", buildInfo, email);

buildTrigger.triggerBuild(BuildJMSTriggerPayload.from(buildInfo, email));

return Response.ok("Triggered build for " + buildInfo.gitRepo + ":" + buildInfo.projectVersion).build();
return Response.ok("Build triggered successfully for repository " + buildInfo.gitRepo
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it even make sense to have these string messages here? I'm not sure if we even use them on FE.

@xjusko

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, the response text is currently being used in notification alerts.

return Response.ok(buildInfo).build();

logger.infof("Successfully fetched build information for URL: %s", url);
return Response.ok(buildInfo)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems like this is returning only the String instead of JSON with buildInfo and therefore the automatic form fill does not work.
From the getBuildInfo endpoint, I am getting:
Build information fetched successfully for URL: https://github.com/shrinkwrap/resolver/releases/tag/3.3.1,
instead of:
{ "tag":"https://github.com/shrinkwrap/resolver/releases/tag/3.3.1", "gitRepo":"https://github.com/shrinkwrap/resolver", "projectVersion":"3.3.1", "commitSha":"138f2f81d186774758409a421c227f3a0ec6031c", "streams":null }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OMG thank you!

@xjusko
Copy link
Collaborator

xjusko commented Oct 15, 2024

LGTM, thanks.

Copy link
Collaborator

@petrberan petrberan left a comment

Choose a reason for hiding this comment

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

LGTM

@petrberan petrberan merged commit 8003f6c into jboss-set:main Oct 18, 2024
2 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.

Provide more robust Responses with valid messages
3 participants