Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
eafb38a
use codecov in workflow for test coverage
spencerugbo Sep 25, 2025
7ca1388
add token for coverage upload
spencerugbo Sep 25, 2025
6609a06
add config file for codecov
spencerugbo Sep 26, 2025
a946362
fix typo codecov config
spencerugbo Sep 26, 2025
65a3658
test code coverage enforcement in pipeline
spencerugbo Oct 1, 2025
ea0e341
resolve conflicts
spencerugbo Oct 1, 2025
ca108fe
test code coverage enforcement
spencerugbo Oct 1, 2025
a587d43
resolve lint issues
spencerugbo Oct 1, 2025
6e87b0f
resolve remaining lint issues
spencerugbo Oct 1, 2025
d40b1ca
test with config file in .github directory
spencerugbo Oct 1, 2025
7a8105b
add coverge checks for each commit
spencerugbo Oct 2, 2025
a98d9c8
merge main
spencerugbo Oct 2, 2025
53c1f08
Merge branch 'main' into replace-go-test-coverage-with-codecov
spencerugbo Oct 2, 2025
e663f0b
test code coverage below threshold
spencerugbo Oct 2, 2025
6056c5a
test codecov conf in root directory
spencerugbo Oct 2, 2025
f3b8791
test higher code coverage threshold
spencerugbo Oct 2, 2025
84896c7
add unit tests back in
spencerugbo Oct 2, 2025
3180d83
add codecov comments to PRs
spencerugbo Oct 3, 2025
7463d3c
allow codecov comment without base
spencerugbo Oct 3, 2025
c0bbb10
allow commenting without report for head commit
spencerugbo Oct 6, 2025
768f1ee
change codecov comment layout
spencerugbo Oct 6, 2025
9082397
try different commmenting method
spencerugbo Oct 6, 2025
ed37dd4
refactor codecov config file to make components more granular
spencerugbo Oct 6, 2025
f7cc156
fix typo in codecov config
spencerugbo Oct 6, 2025
9ee2ba4
remove status check on each component
spencerugbo Oct 6, 2025
3e63f8a
change component status check to informational
spencerugbo Oct 6, 2025
e5d3888
try to use default comment settings
spencerugbo Oct 6, 2025
241f665
use working codecov conf for testing
spencerugbo Oct 6, 2025
fdc6ead
change target to 80%
spencerugbo Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
coverage:
status:
project:
default:
informational: true
target: 80%
threshold: 0%
patch:
default:
informational: true
target: 80%
threshold: 0%
changes: false
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,11 @@ jobs:
cache: false
- name: Run Unit Tests
run: make unit-test
- name: Check Coverage
uses: vladopajic/go-test-coverage@dd4b1f21c4e48db0425e1187d2845404b1206919
- name: Upload Test Coverage
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
config: ./.testcoverage.yaml
## when token is not specified (value '') this feature is turned off
git-token: ${{ github.ref_name == 'main' && secrets.GITHUB_TOKEN || '' }}
## name of orphaned branch where badges are stored
git-branch: badges
files: ./build/test/coverage.out
token: ${{ secrets.CODECOV_TOKEN }}

race-condition-test:
name: Unit tests with race condition detection
Expand Down
52 changes: 0 additions & 52 deletions .testcoverage.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ $(TEST_BUILD_DIR)/coverage.out:
.PHONY: coverage
coverage: $(TEST_BUILD_DIR)/coverage.out
@echo "Checking code coverage"
@$(GORUN) $(GOTESTCOVERAGE) --config=./.testcoverage.yaml
@printf "Total code coverage: " && $(GOTOOL) cover -func=$(TEST_BUILD_DIR)/coverage.out | grep 'total:' | awk '{print $$3}'

build-mock-management-plane-grpc:
mkdir -p $(BUILD_DIR)/mock-management-plane-grpc
Expand Down
2 changes: 1 addition & 1 deletion api/grpc/mpi/v1/command.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/grpc/mpi/v1/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/grpc/mpi/v1/files.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions internal/file/file_manager_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ func (fms *FileManagerService) ConfigApply(ctx context.Context,
return model.Error, allowedErr
}

permissionErr := fms.validateAndUpdateFilePermissions(ctx, fileOverview.GetFiles())
if permissionErr != nil {
return model.RollbackRequired, permissionErr
}

diffFiles, compareErr := fms.DetermineFileActions(
ctx,
fms.currentFilesOnDisk,
Expand Down
Loading