fix: do not fail the job when if: false #172

Merged
earl-warren merged 1 commit from earl-warren/act:wip-job-result into main 2025-07-07 12:11:57 +00:00
Contributor
  • log job result as info not as debug
  • add test

v6.4.0 regression introduced in dfeca80872

It did not fail a test because the original fix has tests only for the case where a step is skipped, not when a job is skipped.

Closes forgejo/runner#660

- log job result as info not as debug - add test --- v6.4.0 regression introduced in dfeca80872bb5984fdb24aa0cadf72e507b54d4f It did not fail a test because the [original fix](https://code.forgejo.org/forgejo/act/pulls/67/files) has tests only for the case where a step is skipped, not when a job is skipped. Closes forgejo/runner#660
Contributor

cascading-pr updated at forgejo/runner#670

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/670
Author
Contributor

Updated the release notes at forgejo/runner#636/files accordingly.

Updated the release notes at https://code.forgejo.org/forgejo/runner/pulls/636/files accordingly.
earl-warren changed title from fix: do not fail the job when if: false to fix: do not fail the job when if: false [skip cascade] 2025-07-07 11:43:03 +00:00
earl-warren force-pushed wip-job-result from b015759e98
All checks were successful
checks / unit (pull_request) Successful in 1m56s
checks / integration (pull_request) Successful in 1m9s
/ cascade (pull_request_target) Successful in 36m7s
to 1d2d808981
Some checks failed
checks / unit (pull_request) Successful in 1m17s
checks / integration (pull_request) Successful in 1m25s
/ cascade (pull_request_target) Failing after 30s
2025-07-07 11:43:10 +00:00
Compare
earl-warren changed title from fix: do not fail the job when if: false [skip cascade] to fix: do not fail the job when if: false 2025-07-07 11:44:20 +00:00
Author
Contributor

tests added

tests added
viceice approved these changes 2025-07-07 11:58:12 +00:00
viceice left a comment
Owner

i don't see a fix beside the log level change 🤔

i don't see a fix beside the log level change 🤔
Author
Contributor

@viceice wrote in #172 (comment):

i don't see a fix beside the log level change 🤔

The logs are used as a communication bus between ACT and the runner. This is quite unusual but it is what it is.

func (r *Reporter) Fire(entry *log.Entry) error {
r.stateMu.Lock()
defer r.stateMu.Unlock()
log.WithFields(entry.Data).Trace(entry.Message)
timestamp := entry.Time
if r.state.StartedAt == nil {
r.state.StartedAt = timestamppb.New(timestamp)
}
stage := entry.Data["stage"]
if stage != "Main" {
if v, ok := entry.Data["jobResult"]; ok {
if jobResult, ok := r.parseResult(v); ok {
r.state.Result = jobResult
r.state.StoppedAt = timestamppb.New(timestamp)

@viceice wrote in https://code.forgejo.org/forgejo/act/pulls/172#issuecomment-45631: > i don't see a fix beside the log level change :thinking: The logs are used as a communication bus between ACT and the runner. This is quite unusual but it is what it is. https://code.forgejo.org/forgejo/runner/src/commit/aac55508db3508a5cd4e96f5643cd89f7804f30f/internal/pkg/report/reporter.go#L98-L115
earl-warren deleted branch wip-job-result 2025-07-07 12:11:58 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/act!172
No description provided.