🚗 Rugby Roadmap #357
Replies: 6 comments 23 replies
-
Hello! First of all, thank you for your work, we use Logs Formatting1. Performance IssueProblemI notice that the After code research we found that log beautifying is used only for error parsing (in previous versions), then we make changes for parse log only if commit 700369c24bfd1e11e36146cee0236cbd9ed30872
Author: Kattouf <[email protected]>
Date: Wed Mar 13 13:27:13 2024 +0700
lazy log parsing for error case
diff --git a/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuild.swift b/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuild.swift
index 2b6f293..76ed42a 100644
--- a/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuild.swift
+++ b/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuild.swift
@@ -93,7 +93,7 @@ final class XcodeBuild {
options: XcodeBuildOptions,
paths: XcodeBuildPaths
) async throws {
- let command = "NSUnbufferedIO=YES xcodebuild"
+ let command = "set -o pipefail && NSUnbufferedIO=YES xcodebuild"
var arguments = arguments
arguments.append(contentsOf: [
"-project \(paths.project.shellFriendly)",
diff --git a/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuildExecutor.swift b/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuildExecutor.swift
index e8654bd..0e3ae3b 100644
--- a/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuildExecutor.swift
+++ b/Sources/RugbyFoundation/Core/Build/XcodeBuild/XcodeBuildExecutor.swift
@@ -31,9 +31,14 @@ final class XcodeBuildExecutor: IXcodeBuildExecutor, Loggable {
func run(_ command: String, rawLogPath: String, logPath: String, args: Any...) async throws {
try Folder.create(at: URL(fileURLWithPath: rawLogPath).deletingLastPathComponent().path)
- try shellExecutor.throwingShell(command, args: args, "| tee '\(rawLogPath)'")
- if let errors = try? await beautifyLog(rawLogPath: rawLogPath, logPath: logPath), errors.isNotEmpty {
- throw BuildError.buildFailed(errors: errors, buildLogPath: logPath, rawBuildLogPath: rawLogPath)
+ do {
+ try shellExecutor.throwingShell(command, args: args, "| tee '\(rawLogPath)'")
+ } catch let error {
+ if let errors = try? await beautifyLog(rawLogPath: rawLogPath, logPath: logPath), errors.isNotEmpty {
+ throw BuildError.buildFailed(errors: errors, buildLogPath: logPath, rawBuildLogPath: rawLogPath)
+ } else {
+ throw error
+ }
}
} Rugby cache time difference with batch above:
I wanted to open PR, but now I see the log beautifier used for more purposes, and we can't legally parse logs only for build errors. Some solutions that I see
2. Log FormatProblemWe want to use rugby on CI and locally, but on CI difficult to locate rugby build errors, we should manually scroll to it in logs. To fix that kind of problem some CI (TeamCity in our case) supports format that we can use for mark errors and warnings to easily find them in TeamCity Web App. ProposalFor our case will be great to have the opportunity to select between |
Beta Was this translation helpful? Give feedback.
-
Ready to use remote cache solutionsProblem
ProposalThe proposal is to implement high-level service specific remote cache commands, like: - command: warmup_s3
address: s3.eu-west-2.amazonaws.com
some_cred_key: hashKey
arch: arm64 - command: upload_s3
address: s3.eu-west-2.amazonaws.com
some_cred_key: hashKey
arch: arm64 And I think the first thing to do is to implement a general upload command with the steps described in doc |
Beta Was this translation helpful? Give feedback.
-
I have an idea to follow up on the authentication for remote caches. The current implementation based on a header parameter is great, and it makes our adoption in CI very straightforward. When it comes to local developer environments it becomes a little bit more tricky, since developers have to include the headers every time they run the rugby command. I wonder which are your thoughts on an alternative solution that does not require the headers to be part of the plan. Just thinking out loud: maybe we could have a hidden file in the root of the project, called Curious to hear your thoughts here. |
Beta Was this translation helpful? Give feedback.
-
I have another idea/suggestion/feature request. In my current company, we leverage Cocoapods for modularization. All our modules are development pods. At some point, we enabled our current caching solution for developer's local machines (before it was only enabled in CI). It introduced lots of friction because most developers preferred to having all the local modules available to quickly edit and debug (at the expense of faster build times). We had to introduce some changes: In CI we cache everything, locally we only cache external dependencies. Here comes my suggestion: |
Beta Was this translation helpful? Give feedback.
-
Thank you all for your ideas! 🚀 |
Beta Was this translation helpful? Give feedback.
-
I came across plugin and thought it would be possible to implement a plugin with a similar API based on Rugby. As an option for simple and seamless caching integration for cases where you don't need all the flexibility that Rugby offers. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone!
I'm wondering if any of you have any thoughts on the future of 🏈 Rugby.
Feel free to share your thoughts and ideas on this topic.
Whether it's about new features, potential pitfalls, or anything else you can think of.
I'd really appreciate ♥︎ hearing your thoughts.
🚢 Upcoming:
rugby build
to pull request changes (xcbeautify --renderer github-actions
)⚙️ Creating a symlink to the latest logs folder #368
🐳 Improve remote cache documentation #374
--dry-run
for commands with--targets-as-regex
options🚀 Added
--try
mode to commands #375Beta Was this translation helpful? Give feedback.
All reactions