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

fix(postbuildstepper): only create PR#channel for configured source branches #195

Merged
merged 3 commits into from
Jan 11, 2025

Conversation

steveej
Copy link
Member

@steveej steveej commented Jan 10, 2025

previously it would create a channel for every PR

cc @alastairong1

@steveej steveej force-pushed the debug-holo-release-creation branch 2 times, most recently from 37f9a99 to 6fe021d Compare January 10, 2025 18:15
@steveej
Copy link
Member Author

steveej commented Jan 10, 2025

6fe021d introduces the test to expose the bug

this repo isn't configured to run the cargo tests yet. here's the result from the local run:

running 1 test
test business::tests::test_process_holo_nixpkgs_release ... FAILED

failures:

---- business::tests::test_process_holo_nixpkgs_release stdout ----
thread 'business::tests::test_process_holo_nixpkgs_release' panicked at applications/postbuildstepper/src/lib.rs:708:17:
assertion `left == right` failed
  left: Some(["1"])
 right: None
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    business::tests::test_process_holo_nixpkgs_release

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--lib`

the integration test did fail on CI

Test "ensure there's channel artifact after the PR" failed with error: "command grep '2410 2410' /tmp/hydra-compat/channels/2410/holo-nixpkgs/nixexprs.tar.xz unexpectedly succeeded"


f5f9c46 introduces the bugfix

Copy link

@JettTech JettTech left a comment

Choose a reason for hiding this comment

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

Looks great! Good catch ..and nice test addition. :) I just left one question/optional suggestion. This is good to merge either way.


Ok(maybe_channel_names)
} else {
Ok(None)

Choose a reason for hiding this comment

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

Should we add some kind of log or notification hook for whenever this occurs?

Copy link
Member Author

@steveej steveej Jan 10, 2025

Choose a reason for hiding this comment

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

there's a debug! one that prints this further up.
and the call to create_channel_artifacts has info! level messages for artifacts that are actually created.

do you think that's sufficient?

Copy link

@JettTech JettTech Jan 10, 2025

Choose a reason for hiding this comment

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

I saw the debug a bit earlier, which could be fine for now... but depending on how long we need to support the legacy channels, it might be nice to have some other mechanism that notifies us more directly or loudly than developer logs, such as push messages, or emails via a monitoring tool like Grafana or Sentry or even a mm plugin, etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

it might be nice to have some other mechanism that notifies us more directly or loudly than developer logs, such as push messages, or emails via a monitoring tool like Grafana or Sentry or even a mm plugin, etc.

agreed, however out of scope for this bugfix PR.

testing the previously existing bug where a channel would be created
for a PR by its number despite the channel name not being configured as
a channel source branch.
…ranches

previously it would create a channel for every PR
@steveej steveej force-pushed the debug-holo-release-creation branch 2 times, most recently from 6fe021d to eb8d5fb Compare January 10, 2025 19:19
@steveej steveej merged commit 930719f into develop Jan 11, 2025
2 checks passed
@steveej steveej deleted the debug-holo-release-creation branch January 11, 2025 16:47
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.

2 participants