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
MGMT-15243: Skip any zero size manifests when applying #5355
MGMT-15243: Skip any zero size manifests when applying #5355
Conversation
@paul-maidment: This pull request references MGMT-15243 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
internal/ignition/ignition.go
Outdated
@@ -1565,6 +1565,10 @@ func (g *installerGenerator) runCreateCommand(ctx context.Context, installerPath | |||
return nil | |||
} | |||
|
|||
type Item struct { |
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.
What is this?
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.
Something that's not meant to be there. I will delete.
b0d53f6
to
0f5be92
Compare
@paul-maidment: This pull request references MGMT-15243 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
0f5be92
to
66a9837
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5355 +/- ##
==========================================
+ Coverage 67.53% 67.64% +0.11%
==========================================
Files 226 226
Lines 33293 33371 +78
==========================================
+ Hits 22485 22575 +90
+ Misses 8774 8762 -12
Partials 2034 2034
|
internal/ignition/ignition_test.go
Outdated
|
||
_, err := os.Stat(filepath.Join(workDir, "/openshift/masters-chrony-configuration.yaml")) | ||
Expect(err).To(HaveOccurred()) | ||
Expect(err.Error()).To(ContainSubstring("no such file or directory")) |
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.
I think the better way to do this is errors.Is(err, fs.ErrNotExist)
.
String matching is generally not a good choice.
When applying manifests when installation is started, we should skip any manifests that are of zero size to prevent them from causing bootstrap problems later. We can't validate zero size at the point of file upload as the UI is presently using an approach where it uploads an empty manifest file to track that the user wishes to add user defined manifests. Discussions are underway to change this but for now we need to take this alternative approach. This PR implements this.
66a9837
to
ca494a7
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, paul-maidment The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@paul-maidment: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
When applying manifests when installation is started, we should skip any manifests that are of zero size to prevent them from causing bootstrap problems later. We can't validate zero size at the point of file upload as the UI is presently using an approach where it uploads an empty manifest file to track that the user wishes to add user defined manifests. Discussions are underway to change this but for now we need to take this alternative approach. This PR implements this.
When applying manifests when installation is started, we should skip any manifests that are of zero size to prevent them from causing bootstrap problems later. We can't validate zero size at the point of file upload as the UI is presently using an approach where it uploads an empty manifest file to track that the user wishes to add user defined manifests. Discussions are underway to change this but for now we need to take this alternative approach. This PR implements this.
When applying manifests when installation is started, we should skip any manifests that are of zero size to prevent them from causing bootstrap problems later. We can't validate zero size at the point of file upload as the UI is presently using an approach where it uploads an empty manifest file to track that the user wishes to add user defined manifests. Discussions are underway to change this but for now we need to take this alternative approach. This PR implements this.
When applying manifests when installation is started, we should skip any
manifests that are of zero size to prevent them from causing bootstrap
problems later.
We can't validate zero size at the point of file upload as the UI is
presently using an approach where it uploads an empty manifest file to
track that the user wishes to add user defined manifests.
Discussions are underway to change this but for now we need to take this
alternative approach.
This PR implements this.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs
, README, etc)Reviewers Checklist