Skip to content
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

Merged
merged 1 commit into from Jul 13, 2023

Conversation

paul-maidment
Copy link
Contributor

@paul-maidment paul-maidment commented Jul 12, 2023

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

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 12, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 12, 2023

@paul-maidment: This pull request references MGMT-15243 which is a valid jira issue.

In response to 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.

This PR implements this.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 12, 2023
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2023
@@ -1565,6 +1565,10 @@ func (g *installerGenerator) runCreateCommand(ctx context.Context, installerPath
return nil
}

type Item struct {
Copy link
Member

Choose a reason for hiding this comment

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

What is this?

Copy link
Contributor Author

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.

internal/ignition/ignition.go Show resolved Hide resolved
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 12, 2023

@paul-maidment: This pull request references MGMT-15243 which is a valid jira issue.

In response to 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

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #5355 (ca494a7) into master (ff1a410) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
internal/ignition/ignition.go 59.92% <100.00%> (+0.07%) ⬆️

... and 3 files with indirect coverage changes


_, 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"))
Copy link
Member

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.
@openshift-ci
Copy link

openshift-ci bot commented Jul 12, 2023

[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:
  • OWNERS [carbonin,paul-maidment]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2023
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 0a2db7e and 2 for PR HEAD ca494a7 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 0c527fd and 1 for PR HEAD ca494a7 in total

@openshift-ci
Copy link

openshift-ci bot commented Jul 13, 2023

@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.

@openshift-merge-robot openshift-merge-robot merged commit 3b0873f into openshift:master Jul 13, 2023
14 checks passed
CrystalChun pushed a commit to CrystalChun/assisted-service that referenced this pull request Jul 18, 2023
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.
CrystalChun pushed a commit to CrystalChun/assisted-service that referenced this pull request Aug 25, 2023
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.
danielerez pushed a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants