[UPLUS-121] HOTFIX: Trigger job명 수정#39
Conversation
Summary of ChangesHello @paul0755, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 배치 작업 트리거 및 스케줄 요청 시 작업명이 올바르게 변환되지 않던 문제를 해결합니다. BatchJobType을 활용하여 원본 작업명을 적절한 "제목" 형식으로 변환하는 로직이 도입되었습니다. 또한, 애플리케이션의 비밀 구성 파일에 주요 환경 변수들의 기본값을 추가하여 다양한 배포 환경에서의 견고성을 향상시켰습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이번 PR은 배치 트리거 잡의 이름을 변환하는 로직을 추가하고, 설정 파일에 기본값을 추가하는 수정을 포함하고 있습니다. 코드 변경 사항은 의도한 대로 잘 동작하는 것으로 보입니다. 다만, 몇 가지 개선점을 제안합니다. BatchTriggerClient에서는 파라미터 명을 더 명확하게 변경하고 코드 중복을 줄일 수 있는 부분이 있습니다. 또한, application-secret.yml 파일에 민감한 정보(비밀 키)와 인프라 정보(URL)가 기본값으로 하드코딩되어 있어 보안상 위험이 있습니다. 이에 대한 수정이 필요합니다. 자세한 내용은 각 파일의 주석을 참고해주세요.
| public void trigger(String job, String invMonth) { | ||
|
|
||
| String title = BatchJobType.getTitleByJobName(job); |
There was a problem hiding this comment.
잡 이름 변환 로직이 추가되면서 job 파라미터는 이제 jobName을 나타냅니다. 명확성을 위해 파라미터 이름을 jobName으로 변경하는 것을 고려해 보세요. 이렇게 하면 코드의 가독성이 향상됩니다.
| public void trigger(String job, String invMonth) { | |
| String title = BatchJobType.getTitleByJobName(job); | |
| public void trigger(String jobName, String invMonth) { | |
| String title = BatchJobType.getTitleByJobName(jobName); |
| public void schedule(String job, String cron) { | ||
|
|
||
| String title = BatchJobType.getTitleByJobName(job); |
There was a problem hiding this comment.
여기에서도 job 파라미터 이름을 jobName으로 변경하여 일관성과 명확성을 유지하는 것이 좋습니다. 또한, trigger 메소드와 schedule 메소드에 중복되는 BatchJobType.getTitleByJobName 호출 로직을 별도의 private 헬퍼 메소드로 추출하여 코드 중복을 줄이는 것을 고려해 보세요. 예를 들어:
private String getJobTitle(String jobName) {
return BatchJobType.getTitleByJobName(jobName);
}| public void schedule(String job, String cron) { | |
| String title = BatchJobType.getTitleByJobName(job); | |
| public void schedule(String jobName, String cron) { | |
| String title = BatchJobType.getTitleByJobName(jobName); |
| cloud: | ||
| function: | ||
| base-url: ${CLOUD_FUNCTION_BASE_URL} | ||
| base-url: ${CLOUD_FUNCTION_BASE_URL:https://asia-northeast3-telecom-app-dev.cloudfunctions.net/fn-batch-control} |
60ecc46 to
8257b29
Compare
SonarQube Quality Summary (Community)✅ Quality Gate PASSED Branch: Issues
Measures
🔗 Dashboard: https://sonarqube.swthewhite.store/dashboard?id=api-core&branch=feat/UPLUS-121 Generated automatically by GitHub Actions. |
🎫 지라 티켓
UPLUS-121
✅ 작업 사항
trigger job명 변환을 안시킨 부분을 수정하였습니다.
📋 체크리스트
⌨ 기타