Skip to content

feat: set --pvcs to true by default#4230

Draft
Ivo-Yankov wants to merge 18 commits into
mainfrom
04225-missing-pvc-flag
Draft

feat: set --pvcs to true by default#4230
Ivo-Yankov wants to merge 18 commits into
mainfrom
04225-missing-pvc-flag

Conversation

@Ivo-Yankov

@Ivo-Yankov Ivo-Yankov commented May 5, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces a breaking change. It changes the default value of --pvcs to true for all commands that use it, and adds a new flag --pvc-storage-class to solo consensus network deploy.

The new flag is used to specify a storage class to be used by the PVCs. If it is not found in the cluster, solo is responsible for installing it. The default value is rancher.io/local-path.

This PR also improves the wording of an error. The original may be interpreted in a way that results in an Unknown argument error.

Converted to draft for further testing.

Related Issues

Pull request (PR) checklist

  • This PR added tests (unit, integration, and/or end-to-end)
  • This PR updated documentation
  • This PR added no TODOs or commented out code
  • This PR has no breaking changes
  • Any technical debt has been documented as a separate issue and linked to this PR
  • Any package.json changes have been explained to and approved by a repository manager
  • All related issues have been linked to this PR
  • All changes in this PR are included in the description
  • When this PR merges the commits will be squashed and the title will be used as the commit message, the 'commit message guidelines' below have been followed

Testing

  • This PR added unit tests
  • This PR added integration/end-to-end tests
  • These changes required manual testing that is documented below
  • Anything not tested is documented

The following manual testing was done:

  • TBD

The following was not tested:

  • TBD
Commit message guidelines We use 'Conventional Commits' to ensure that our commit messages are easy to read, follow a consistent format, and for automated release note generation. Please follow the guidelines below when writing your commit messages:
  1. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type. NOTE: currently breaking changes will only bump the MAJOR version.
  2. The title is prefixed with one of the following:
Prefix Description Semantic Version Update Captured in Release Notes
feat: a new feature MINOR Yes
fix: a bug fix PATCH Yes
perf: performance PATCH Yes
refactor: code change that isn't feature or fix none No
test: adding missing tests none No
docs: changes to documentation none Yes
build: changes to build process none No
ci: changes to CI configuration none No
style: formatting, missing semi-colons, etc none No
chore: updating grunt tasks etc; no production code change none No

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov requested a review from a team as a code owner May 5, 2026 12:47
@trunk-io

trunk-io Bot commented May 5, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@Ivo-Yankov Ivo-Yankov self-assigned this May 5, 2026
@codacy-production

codacy-production Bot commented May 5, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 36 complexity

Metric Results
Complexity 36

View in Codacy

🟢 Coverage 90.60% diff coverage · +0.03% coverage variation

Metric Results
Coverage variation +0.03% coverage variation (-1.00%)
Diff coverage 90.60% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9ec1e20) 63178 51428 81.40%
Head commit (580e73a) 63406 (+228) 51630 (+202) 81.43% (+0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4230) 234 212 90.60%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results - Linux

36 tests   36 ✅  0s ⏱️
17 suites   0 💤
 1 files     0 ❌

Results for commit 782270d.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results - Windows

    1 files  ±0    333 suites  +1   9s ⏱️ -1s
1 045 tests +5  1 041 ✅ +1  0 💤 ±0  4 ❌ +4 
1 049 runs  +5  1 045 ✅ +1  0 💤 ±0  4 ❌ +4 

For more details on these failures, see this check.

Results for commit ec32186. ± Comparison against base commit 733d052.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
JeffreyDallas
JeffreyDallas previously approved these changes May 5, 2026
@Ivo-Yankov Ivo-Yankov added the PR: Needs Manager Approval A pull request that needs review from a manager. label May 5, 2026
@Ivo-Yankov Ivo-Yankov marked this pull request as draft May 5, 2026 15:12
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

E2E Test Report

  9 files  ±0   88 suites  ±0   1h 18m 54s ⏱️ -8s
270 tests ±0  270 ✅ ±0  0 💤 ±0  0 ❌ ±0 
291 runs  ±0  291 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 806db83. ± Comparison against base commit e188a47.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

E2E Test Report

 10 files   94 suites   1h 18m 14s ⏱️
298 tests 298 ✅ 0 💤 0 ❌
316 runs  316 ✅ 0 💤 0 ❌

Results for commit 782270d.

♻️ This comment has been updated with latest results.

@JeffreyDallas JeffreyDallas marked this pull request as ready for review May 7, 2026 02:26

@jeromy-cannon jeromy-cannon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I altered the description of the GHI. if you want to merge this first, then do a relates to instead of closes on the GHI.

@jeromy-cannon jeromy-cannon added PR: Unresolved Comments A pull request where there are comments and they need to be resolved. and removed PR: Needs Manager Approval A pull request that needs review from a manager. labels May 7, 2026
@jeromy-cannon jeromy-cannon marked this pull request as draft May 7, 2026 06:56
Ivo-Yankov added 3 commits May 7, 2026 17:07
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov changed the title chore: improve wording of misleading error message feat: improve wording of misleading error message May 7, 2026
@Ivo-Yankov Ivo-Yankov changed the title feat: improve wording of misleading error message feat: set --pvcs to true by default May 7, 2026
Comment thread src/commands/network.ts Outdated
Comment on lines +697 to +700
(config.resolvedPvcStorageClass
? ` --set "defaults.volumeClaims.storageClassName=${config.resolvedPvcStorageClass}"` +
` --set "minio-server.tenant.pools[0].storageClassName=${config.resolvedPvcStorageClass}"`
: '');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the current status is that we don't set this. If the storage class name is not set, then it will use the default. We want to maintain backwards compatibility as much as possible.

So, if the user does not supply a storageClassName then we want to match the existing behavior of enabling the PVCs and using the default storageClass assuming it is local-path-provider and that it exists (see more details from the ticket on exception scenarios)

Comment thread src/core/helpers.ts Outdated
* Passing LOCAL_PATH_PROVISIONER as userSuppliedClass is treated the same as passing an empty
* string — both run the auto-detect cascade instead of validating by name.
*/
export async function resolveStorageClass(k8: K8, logger: SoloLogger, userSuppliedClass: string): Promise<string> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use classes and static methods, we should not export functions.

}
}

public async installManifest(filePath: string): Promise<void> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a duplicate of applyManifest, perhaps you should just enhance that method if needed.


return storageClasses;
} catch (error) {
throw new SoloError('Failed to list StorageClasses', error);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match K8 error handling logic

Comment thread src/core/helpers.ts Outdated
`No StorageClass found in cluster — installing ${constants.LOCAL_PATH_PROVISIONER}-provisioner. ` +
'Use --pvc-storage-class to specify an existing StorageClass.',
);
await k8.manifests().installManifest(manifestPath);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are missing to check for the default storage class and if none exists set this one as the default.

Ivo-Yankov added 6 commits May 8, 2026 18:29
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
# Conflicts:
#	src/integration/kube/resources/manifest/manifests.ts
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
# Conflicts:
#	src/core/dependency-injection/inject-tokens.ts
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
# Conflicts:
#	src/commands/node/tasks.ts
#	test/unit/commands/node/local-build-path-pvc-validation.test.ts
@jeromy-cannon jeromy-cannon added the P0-🔥 ASAP label May 21, 2026
@jeromy-cannon jeromy-cannon added PR: Needs Team Approval A pull request that needs review from a team member. and removed PR: Unresolved Comments A pull request where there are comments and they need to be resolved. labels Jun 2, 2026
@jeromy-cannon jeromy-cannon marked this pull request as ready for review June 2, 2026 19:32
@jeromy-cannon jeromy-cannon requested a review from a team as a code owner June 2, 2026 19:32
@jan-milenkov jan-milenkov added the PR: Checks Failed A pull request where the checks have failed. label Jun 3, 2026
@Ivo-Yankov Ivo-Yankov marked this pull request as draft June 3, 2026 10:45
@Ivo-Yankov Ivo-Yankov removed the PR: Needs Team Approval A pull request that needs review from a team member. label Jun 3, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is stale because it has been open 14 days with no activity. Remove stale label or comment on this pull request; otherwise, this pull request will be closed in 14 days.

@github-actions github-actions Bot added the Stale Denotes stale issues and pull requests tracked by the actions/stale workflow. label Jun 18, 2026
# Conflicts:
#	src/commands/mirror-node.ts
#	src/commands/network.ts
#	version.ts
@Ivo-Yankov Ivo-Yankov removed the Stale Denotes stale issues and pull requests tracked by the actions/stale workflow. label Jun 18, 2026
@jeromy-cannon jeromy-cannon added the PR: Merge Conflicts A pull request that has merge conflicts that need to be resolved. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P0-🔥 ASAP PR: Checks Failed A pull request where the checks have failed. PR: Merge Conflicts A pull request that has merge conflicts that need to be resolved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set pvcs to true by default

4 participants