Skip to content

Fix nil crash when job has no fields defined - #2776

Merged
denik merged 1 commit into
mainfrom
denik/fix-nil-crash
Apr 25, 2025
Merged

Fix nil crash when job has no fields defined#2776
denik merged 1 commit into
mainfrom
denik/fix-nil-crash

Conversation

@denik

Copy link
Copy Markdown
Contributor

Changes

Add missing nil checks in normalize_paths.go

Tests

Tests added previously in #2771 and #2774

@denik

Copy link
Copy Markdown
ContributorAuthor

This PR is stacked on #2774 please review that one as well.

Base automatically changed from denik/acc-expand-empty-tests to mainApril 25, 2025 11:29
@denik
denikforce-pushed the denik/fix-nil-crash branch from 380fac1 to 5b7791fCompareApril 25, 2025 11:31
@denik
deniktemporarily deployed to test-trigger-is April 25, 2025 11:31 — with GitHub Actions Inactive
@denik
denik enabled auto-merge April 25, 2025 11:31
@denik
denik disabled auto-merge April 25, 2025 11:40
@denik
denik merged commit fbea96d into mainApr 25, 2025
@denik
denik deleted the denik/fix-nil-crash branch April 25, 2025 11:40
denik added a commit that referenced this pull request May 8, 2025
## Changes
- Embed struct by value not by pointer in all the resources.
- Remove IsNil method from the resource interface and implementations
(it's never true).
## Why
- Prevents a class of crashes related to nil pointer, like
#2776 and
#1937
- Simplify user code, no need to check nilness as much.
## Tests
Existing tests.
denik added a commit that referenced this pull request May 20, 2026
## Changes
Add missing nil checks in normalize_paths.go
## Tests
Tests added previously in #2771 and #2774
denik added a commit that referenced this pull request May 20, 2026
## Changes
- Embed struct by value not by pointer in all the resources.
- Remove IsNil method from the resource interface and implementations
(it's never true).
## Why
- Prevents a class of crashes related to nil pointer, like
#2776 and
#1937
- Simplify user code, no need to check nilness as much.
## Tests
Existing tests.
Sign up for freeto 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.

3 participants

@denik@pietern@andrewnester