Skip to content

Chore/#127 QA build variant 추가#128

Merged
DongChyeon merged 2 commits intorelease/1.0.0from
chore/#127-add-qa-build-variant
Apr 14, 2025
Merged

Chore/#127 QA build variant 추가#128
DongChyeon merged 2 commits intorelease/1.0.0from
chore/#127-add-qa-build-variant

Conversation

@DongChyeon
Copy link
Copy Markdown
Member

@DongChyeon DongChyeon commented Apr 14, 2025

💡 Issue

🌱 Key changes

image
  • release로 빌드하되 서버의 BASE URL은 개발 서버를 바라보도록 QA build variant를 추가했습니다.

✅ To Reviewers

실기기로 테스트를 거치긴 했는데 그래도 여유되시면 테스트 한번 해주시고 Approve 해주시면 감사하겠습니다.

base.url.debug=https://dev-yappuworld.yapp.co.kr/
base.url.release=https://api-yappuworld.yapp.co.kr/
base.url.qa=https://dev-yappuworld.yapp.co.kr/

baseUrl 정보는 local.properties에 추가하시면 됩니다.

📸 스크린샷

스크린샷
파일첨부바람

Summary by CodeRabbit

  • 새로운 기능

    • 품질 보증을 위한 새로운 QA 빌드 환경이 추가되었습니다.
    • 디버그, QA, 릴리즈 각 환경에 맞춰 기본 URL 설정이 가능해졌습니다.
  • 리팩토링

    • 네트워크 기본 URL 할당 방식을 단순화하여, 외부 설정 값을 기반으로 구성하도록 개선했습니다.

@DongChyeon DongChyeon added the Chore 이슈 , 기능 개발 이외의 작업 label Apr 14, 2025
@DongChyeon DongChyeon self-assigned this Apr 14, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2025

Walkthrough

이번 변경사항은 Android 프로젝트와 코어 데이터 모듈의 Gradle 설정에 새로운 qa 빌드 타입을 추가하는 내용입니다.
qa 빌드 타입은 기존 release 유형의 설정을 상속받으며, 서명 구성, 매칭 폴백, 그리고 BASE_URL 설정을 적용합니다.
또한 NetworkModule에서는 조건부 URL 로직을 제거하고, 단순히 BuildConfig의 BASE_URL 값을 사용하도록 수정하였습니다.

Changes

파일 경로 변경 내용 요약
app/build.gradle.kts
core/data/build.gradle.kts
qa 빌드 타입 추가
- app: release 설정 상속, signingConfig 및 matchingFallbacks 지정
- core/data: qa용 BASE_URL (key: base.url.qa) 구성 추가
core/data/.../NetworkModule.kt 기존 조건부 BASE_URL 로직 제거 후, BuildConfig.BASE_URL을 사용하여 상수(BASE_URL)를 단순히 할당하도록 변경됨

Assessment against linked issues

Objective (목표) Addressed Explanation
QA용 Build Variant 추가 (#127)

Poem

나는 작은 토끼, 코드 숲을 뛰놀며,
qa 빌드 타입이 피어난 새 아침을 맞이해요.
리얼한 릴리즈의 그림자를 상속받아,
개발 서버 향한 길을 밝히는 빛이 되었네.
🐰✨ 함께 달려요, 새로운 모험으로!

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DongChyeon
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d55178a and a625854.

📒 Files selected for processing (3)
  • app/build.gradle.kts (1 hunks)
  • core/data/build.gradle.kts (2 hunks)
  • core/data/src/main/java/com/yapp/core/data/remote/di/NetworkModule.kt (1 hunks)
🔇 Additional comments (3)
core/data/build.gradle.kts (1)

4-4: import 문 추가됨

Properties 파일을 불러오기 위해 java.util.Properties 를 추가했습니다. 이는 local.properties 설정을 읽어 다양한 빌드 타입에 맞는 BASE_URL을 구성하기 위함입니다.

app/build.gradle.kts (1)

36-40: 앱 모듈에 QA 빌드 타입 추가

release 빌드 타입을 기반으로 QA 빌드 타입을 생성하고, release 서명 설정을 적용했습니다.
matchingFallbacks을 통해 의존성 해결에 필요한 빌드 타입 설정도 올바르게 구성되었습니다.

구현이 적절하게 되어 있고 Android 빌드 구성 모범 사례를 따르고 있습니다.

core/data/src/main/java/com/yapp/core/data/remote/di/NetworkModule.kt (1)

29-29: BASE_URL 로직 간소화

기존에 조건부 로직으로 처리되던 BASE_URL을 BuildConfig.BASE_URL로 직접 사용하도록 변경했습니다.
이는 빌드 타입별로 다른 BASE_URL을 gradle 설정에서 관리하기 위한 변경으로, 코드를 더 간결하고 유지보수하기 쉽게 만들었습니다.

이 변경은 QA 빌드 타입 추가 목적에 부합하며, 코드 간소화 측면에서도 좋은 개선입니다.

Comment on lines +19 to +36
buildTypes {
val localProperties = Properties()
localProperties.load(
project.rootProject.file("local.properties").bufferedReader()
)

getByName("debug") {
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.debug"]}\"")
}
getByName("release") {
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.release"]}\"")
}
create("qa") {
initWith(getByName("release"))
matchingFallbacks += listOf("release")
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.qa"]}\"")
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

새로운 QA 빌드 타입 추가

local.properties 파일에서 각 빌드 타입별 BASE_URL 값을 읽어와 빌드 타입별로 다른 서버 환경을 사용할 수 있도록 설정했습니다. 특히 QA 빌드 타입을 release 빌드 타입 기반으로 생성하고, matchingFallbacks을 통해 의존성 해결에 필요한 빌드 타입 설정을 올바르게 구성했습니다.

그러나 local.properties 파일의 값이 없는 경우에 대한 예외 처리가 없습니다. 다음과 같이 기본값 설정이나 예외 처리 로직을 추가하는 것이 좋겠습니다.

 buildTypes {
     val localProperties = Properties()
     localProperties.load(
         project.rootProject.file("local.properties").bufferedReader()
     )

+    val defaultDebugUrl = "https://dev-yappuworld.yapp.co.kr/"
+    val defaultReleaseUrl = "https://api-yappuworld.yapp.co.kr/"
+    val defaultQaUrl = "https://dev-yappuworld.yapp.co.kr/"
+
     getByName("debug") {
-        buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.debug"]}\"")
+        buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.debug", defaultDebugUrl)}\"")
     }
     getByName("release") {
-        buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.release"]}\"")
+        buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.release", defaultReleaseUrl)}\"")
     }
     create("qa") {
         initWith(getByName("release"))
         matchingFallbacks += listOf("release")
-        buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.qa"]}\"")
+        buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.qa", defaultQaUrl)}\"")
     }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
buildTypes {
val localProperties = Properties()
localProperties.load(
project.rootProject.file("local.properties").bufferedReader()
)
getByName("debug") {
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.debug"]}\"")
}
getByName("release") {
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.release"]}\"")
}
create("qa") {
initWith(getByName("release"))
matchingFallbacks += listOf("release")
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.qa"]}\"")
}
}
buildTypes {
val localProperties = Properties()
localProperties.load(
project.rootProject.file("local.properties").bufferedReader()
)
val defaultDebugUrl = "https://dev-yappuworld.yapp.co.kr/"
val defaultReleaseUrl = "https://api-yappuworld.yapp.co.kr/"
val defaultQaUrl = "https://dev-yappuworld.yapp.co.kr/"
getByName("debug") {
buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.debug", defaultDebugUrl)}\"")
}
getByName("release") {
buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.release", defaultReleaseUrl)}\"")
}
create("qa") {
initWith(getByName("release"))
matchingFallbacks += listOf("release")
buildConfigField("String", "BASE_URL", "\"${localProperties.getProperty("base.url.qa", defaultQaUrl)}\"")
}
}

Comment on lines +31 to +35
create("qa") {
initWith(getByName("release"))
matchingFallbacks += listOf("release")
buildConfigField("String", "BASE_URL", "\"${localProperties["base.url.qa"]}\"")
}
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.

현재 QA 의 initWith 값이 릴리즈를 바라보는 이유를 알 수 있을까요 ?
현재는 Base URL 뿐이긴 한데 추가되면 릴리즈를 전부 바라보게 될거 같아서요

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

릴리즈로 빌드되지만 BASE_URL은 개발 서버를 바라보도록 해야한다고 하셔서
release 환경과 동일하되, BASE_URL만 덮어쓰기하는 방식으로 했습니다!

Copy link
Copy Markdown
Contributor

@TaeseongYun TaeseongYun left a comment

Choose a reason for hiding this comment

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

확인했습니다

@DongChyeon DongChyeon merged commit 12f5c24 into release/1.0.0 Apr 14, 2025
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 17, 2025
@DongChyeon DongChyeon deleted the chore/#127-add-qa-build-variant branch May 14, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore 이슈 , 기능 개발 이외의 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants