-
Notifications
You must be signed in to change notification settings - Fork 312
Add skipIfNoCache to tests #4612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @viddo |
Is there some way to skip/override the manifest setting through the CLI? like |
Caches []string `yaml:"caches,omitempty"` | ||
Artifacts []Artifact `yaml:"artifacts,omitempty"` | ||
Hosts []Host `yaml:"hosts,omitempty"` | ||
SkipIfNoFileChanges bool `yaml:"skipIfNoFileChanges,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include this field in the JSON schema. Ask @andreafalzetti if you need help to know how to do it
A couple of questions:
|
0bffb78
to
c3f706f
Compare
7454f5e
to
4c67226
Compare
4c67226
to
9efb2e4
Compare
I think you need to run the |
@@ -320,7 +326,7 @@ func (r *Runner) Run(ctx context.Context, params *Params) error { | 8000|||
outputMode = buildCmd.DeployOutputModeOnBuild | |||
} | |||
|
|||
buildOptions := buildCmd.OptsFromBuildInfoForRemoteDeploy(buildInfo, &types.BuildOptions{OutputMode: outputMode, NoCache: params.NoCache}) | |||
buildOptions := buildCmd.OptsFromBuildInfoForRemoteDeploy(buildInfo, &types.BuildOptions{OutputMode: outputMode}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the cache option was not passed to the remote, was this intentionally? we do not use cache for remote?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NoCache
had no effect even if passed in. See the implementation of OptsFromBuildInfoForRemoteDeploy
:
https://github.com/okteto/okteto/blob/master/pkg/cmd/build/build.go#L327-L335
should we update integration test to cover this change? can we run integration with the current ones to see if affects? |
I was testing it and it looks great! @codyjlandstrom @pchico83 I have a doubt on how the cache should work when there is a
If I execute |
I wouldn't tight |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4612 +/- ##
=======================================
Coverage 47.74% 47.75%
=======================================
Files 369 369
Lines 29712 29721 +9
=======================================
+ Hits 14185 14192 +7
- Misses 14428 14430 +2
Partials 1099 1099 |
Restore functionality to skip tests if no cache is set. Depends on:
By defaults, cache will be disabled. To enabled cache for tests, users should add
skipIfNoFileChanges=true
to the/each section in the manifest: