Skip to content

Conversation

@refi64
Copy link
Collaborator

@refi64 refi64 commented Jul 11, 2025

No description provided.

@refi64
Copy link
Collaborator Author

refi64 commented Jul 11, 2025

Draft again because it needs #51, actual new content is in the 2 last commits (mostly the very last one). A chunk of that is just moving code around and s/info/outputln/.

@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch 2 times, most recently from e36a1ae to c7c5967 Compare July 18, 2025 15:05
@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch from c7c5967 to 5f71b64 Compare August 11, 2025 15:13
@refi64 refi64 requested a review from sjoerdsimons August 13, 2025 14:49
@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch 2 times, most recently from 51f7eb7 to 68ce7f3 Compare August 15, 2025 15:18
@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch from 68ce7f3 to 8eeb5a8 Compare August 29, 2025 16:20
@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch 2 times, most recently from 7eca60e to 9bf1753 Compare September 16, 2025 13:51
@refi64 refi64 marked this pull request as ready for review September 16, 2025 13:51
@refi64
Copy link
Collaborator Author

refi64 commented Sep 16, 2025

#51 is merged in, so undrafting this.

@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch from 9bf1753 to b06dd23 Compare September 16, 2025 20:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR isolates GitLab-specific command handling and logging by replacing direct gitlab_runner::outputln! calls with standard tracing::info! logging and introducing a custom GitLab forwarder layer to route specific logs to GitLab when needed.

Key changes:

  • Replaces outputln! macro calls with tracing::info! throughout the codebase
  • Adds a new logging.rs module with GitLabForwarder to handle GitLab-specific log forwarding
  • Refactors command handling by extracting action types and implementations into a new actions.rs module

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/upload.rs Replaces outputln! with info! for upload progress messages
src/prune.rs Replaces outputln! with info! for package deletion messages
src/monitor.rs Replaces outputln! with info! for build monitoring messages
src/main.rs Integrates new GitLabForwarder logging layer and adds module declarations
src/logging.rs New module implementing GitLab-specific log forwarding functionality
src/handler.rs Major refactoring to extract action implementations and integrate new logging
src/build_meta.rs Replaces outputln! with info! for package readiness messages
src/actions.rs New module containing extracted action structs and implementations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sjoerdsimons
Copy link
Contributor

Replacin outputln! with info! seems the wrong direction; There may be things one wants to log at the info level from the crate that's not meant to go to the gitlab runner output.

The actions split seems reasonable; I guess future PRs will further seperate from assuming gitlab backing.

@sjoerdsimons
Copy link
Contributor

_ No description provided. _

Please provide descriptions for your PRs

refi64 added 4 commits October 2, 2025 15:13
Preserving `_link`, in particular, is problematic, as that preserves the
link to the original package (akin to `keeplink`), which has caused
numerous issues, such as:

- Changes to the origin can result in build conflicts, which currently
  result in the runner waiting forever due to the bad state.
- Broken links inhibit the ability to get the `xsrcmd5`, which is needed
  for monitoring the build logs.

But keeping files around is of questionable utility regardless, and
`osc-plugin-dput` doesn't even do that anymore. For simplicity, just
remove this entire feature altogether.
Passing around `self` trips up the borrow checker if we need to get a
reference to a field at the same time, and it looks a bit confusing
anyway.
Instead of hardcoding the dependence on gitlab-runner's outputln, a
custom macro is used with a unique field name. This field is picked up
by a rather cursed bridge layer rewrites the events to instead use the
fields gitlab-runner wants.
All the generic command handling is now part of an `actions` module,
leaving only GitLab-specific functionality in `handler`.
@refi64 refi64 force-pushed the wip/refi64/isolate-gitlab branch from b06dd23 to 2443889 Compare October 3, 2025 22:26
@refi64 refi64 requested a review from sjoerdsimons October 3, 2025 22:29
@sjoerdsimons sjoerdsimons added this pull request to the merge queue Oct 7, 2025
Merged via the queue into main with commit a0ad286 Oct 7, 2025
16 checks passed
@sjoerdsimons sjoerdsimons deleted the wip/refi64/isolate-gitlab branch October 7, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants