Skip to content

[WIP] Add context.Context as a param to engine's operations#3995

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/add-context-parameter-to-engine-operations
Draft

[WIP] Add context.Context as a param to engine's operations#3995
Copilot wants to merge 4 commits into
masterfrom
copilot/add-context-parameter-to-engine-operations

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

  • Add context.Context as first param to engine's Get, GetBytes, GetStream methods
  • Add context.Context to GetRange, GetRangeStream, ReadObject, ReadPayloadRange
  • Add context.Context to Head, ReadHeader
  • Add context.Context to Delete, DeleteRedundantCopies, Drop
  • Add context.Context to InhumeContainer, IsLocked
  • Add context.Context to Put
  • Add context.Context to ListWithCursor, ListContainers, ContainerInfo
  • Add context.Context to Search
  • Add context.Context to EC methods: GetECPart, ReadECPart, HeadECPart, ReadECPartHeader, GetECPartRange, ReadECPartRange
  • Add context.Context to ReviveObject, ObjectStatus, Evacuate
  • Update selectOld (private method)
  • Update interfaces in policer, replicator, get service, put service, ACL
  • Update all callers in policer, replicator, control server, node app, lancet, get/put/acl services
  • Build and test to verify changes

Copilot AI and others added 2 commits May 15, 2026 13:08
StorageEngine methods now require context.Context as first parameter.
Update all test files to pass context.Background() to these calls.
Also fix method references in delete_test.go to use lambda wrappers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: roman-khimov <22092804+roman-khimov@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nspcc-dev/neofs-node/sessions/91b62f09-335d-4c2b-bf97-7dcaea75d9c8

Co-authored-by: roman-khimov <22092804+roman-khimov@users.noreply.github.com>
@roman-khimov
Copy link
Copy Markdown
Member

@copilot, try again

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 15, 2026

@copilot, try again

Done. Updated all remaining test files (service_test.go, get_test.go, get_test.go, head_test.go, service_test.go, policer_test.go) to use the new context.Context signatures in commit 7cb7657. All tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • invalid-url
    • Triggering command: /tmp/go-build824368921/b1080/external.test /tmp/go-build824368921/b1080/external.test -test.testlogfile=/tmp/go-build824368921/b1080/testlog.txt -test.paniconexit0 -test.timeout=10m0s -goversion go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build824368921/b1026/importcfg -pack /home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64/src/go/build/build.go 2/ec�� 7090255-d6b86c01a5af/user/test/doc.go 7090255-d6b86c01a5af/user/test/id.go ux-amd64/pkg/tool/linux_amd64/compile -p ession t ux-amd64/pkg/too-trimpath (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 44.06780% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.97%. Comparing base (63acf73) to head (7cb7657).

Files with missing lines Patch % Lines
pkg/services/object/get/ec.go 20.00% 8 Missing ⚠️
cmd/neofs-node/object.go 0.00% 6 Missing ⚠️
pkg/services/object/get/get.go 25.00% 6 Missing ⚠️
pkg/services/object/get/util.go 0.00% 6 Missing ⚠️
pkg/services/policer/ec.go 37.50% 3 Missing and 2 partials ⚠️
pkg/local_object_storage/engine/get.go 50.00% 4 Missing ⚠️
pkg/services/policer/check.go 72.72% 1 Missing and 2 partials ⚠️
cmd/neofs-node/container.go 0.00% 2 Missing ⚠️
cmd/neofs-node/storage.go 0.00% 2 Missing ⚠️
pkg/local_object_storage/engine/container.go 0.00% 2 Missing ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3995      +/-   ##
==========================================
- Coverage   27.98%   27.97%   -0.02%     
==========================================
  Files         681      681              
  Lines       45623    45629       +6     
==========================================
- Hits        12768    12763       -5     
- Misses      31664    31674      +10     
- Partials     1191     1192       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add context.Context as a param to engine's operations

2 participants