Skip to content

Conversation

soharab-ic
Copy link
Contributor

Description

  • If we create an environment with invalid values in manifest file then environment creation will fail. We will see the respective logs in executor. No issues here.
  • Now if we delete that environment then poolmgr cleanup service is called and return statement in this service breaks the Go routine.

Which issue(s) this PR fixes:

Fixes #

Testing

  • Create environment manifest using fission spec command.
$ fission spec init
$ fission env create --name go --image ghcr.io/fission/go-env --builder ghcr.io/fission/go-builder --spec
  • Now edit the specs/env-go.yaml file and use an invalid container name for runtime. Valid name = envName
    spec.runtime.container.name = invalid
apiVersion: fission.io/v1
kind: Environment
metadata:
  creationTimestamp: null
  name: go
spec:
  builder:
    command: build
    container:
      name: ""
      resources: {}
    image: ghcr.io/fission/go-builder
  imagepullsecret: ""
  keeparchive: false
  poolsize: 3
  resources: {}
  runtime:
    container:
      name: "invalid"
      resources: {}
    image: ghcr.io/fission/go-env
  version: 3
  • Now, run fission spec apply. The poolmgr deployment will not be created but builder deployment will be created.
  • Run fission spec destroy to delete the environment.
  • Fix above manifest file and run fission spec apply again. Poolmgr deployment is not created because the Go routine responsible for creating deployment was killed when we ran fission spec destroy. Create any other environment and you will see the issue.
  • Now apply this fix and follow the steps again.

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

The bug breaks the poolmgr service which stops the deletion and creation of new environments.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.84%. Comparing base (db2b0ad) to head (c02c9b5).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/executor/executortype/poolmgr/gpm.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3034      +/-   ##
==========================================
- Coverage   45.85%   45.84%   -0.02%     
==========================================
  Files         236      236              
  Lines       19566    19566              
==========================================
- Hits         8972     8970       -2     
- Misses       9190     9191       +1     
- Partials     1404     1405       +1     
Flag Coverage Δ
unittests 45.84% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sanketsudake sanketsudake merged commit fe7f1b0 into main Oct 8, 2024
10 checks passed
@sanketsudake sanketsudake deleted the fix-executor branch January 1, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants