Skip to content

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Apr 4, 2023

Replace go-bindata using the embed package added in Go 1.16. This change simplifies the build process and reduces the likelihood of merge conflicts when PRs modify assets.

  • .gitignore: Ignore the new, generated pkg/manifests/manifests/ directory.
  • Makefile: Delete bindata target. Add a manifests target to generate assets under pkg/manifests/ from the top-level manifests/ directory. Make the generate target depend on manifests instead of on update. Make the build, test, test-e2e, test-e2e-list, and verify targets depend on generate. Add a command to delete generated files under the clean target.
  • go.mod: Drop go-bindata.
  • go.sum: Regenerate.
  • hack/update-generated-bindata.sh: Delete file.
  • assets/: Move from here...
  • pkg/manifests/assets/: ...to here. New directory.
  • pkg/manifests/bindata.go: Delete file.
  • pkg/manifests/manifests.go (content): New variable. Store assets as an embed.FS value.
    (MustAsset, MustAssetString): New functions. Return assets using the new content variable. These function definitions replace ones from the deleted bindata.go file.
  • pkg/manifests/manifests_test.go (TestManifests): Verify that the CustomResourceDefinitionManifest and NamespaceManifest assets can be read.
  • tools/tools.go: Delete file. We no longer need to import go-bindata.
  • vendor/*: Regenerate.

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

openshift-ci-robot commented Apr 4, 2023

@Miciah: This pull request references NE-1269 which is a valid jira issue.

Details

In response to this:

Replace go-bindata using the embed package added in Go 1.16. This change simplifies the build process and reduces the likelihood of merge conflicts when PRs modify assets.

  • Makefile: Delete bindata target.
  • go.mod: Drop go-bindata.
  • go.sum: Regenerate.
  • hack/update-generated-bindata.sh: Delete file.
  • assets/: Move from here...
  • pkg/manifests/assets/: ...to here. New directory.
  • pkg/manifests/bindata.go: Delete file.
  • pkg/manifests/manifests.go (content): New variable. Store assets as an embed.FS value.
    (MustAsset, MustAssetString): New functions. Return assets using the new content variable. These function definitions replace ones from the deleted bindata.go file.
  • tools/tools.go: Delete file. We no longer need to import go-bindata.
  • vendor/*: Regenerate.

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 requested review from gcs278 and miheer April 4, 2023 22:52
@Miciah
Copy link
Contributor Author

Miciah commented Apr 5, 2023

Lots of bootstrap failures.
/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 13, 2023

@Miciah: This pull request references NE-1269 which is a valid jira issue.

Details

In response to this:

Replace go-bindata using the embed package added in Go 1.16. This change simplifies the build process and reduces the likelihood of merge conflicts when PRs modify assets.

  • .gitignore: Ignore the new, generated pkg/manifests/manifests/ directory.
  • Makefile: Delete bindata target. Add a manifests target to generate assets under pkg/manifests/ from the top-level manifests/ directory.
  • go.mod: Drop go-bindata.
  • go.sum: Regenerate.
  • hack/update-generated-bindata.sh: Delete file.
  • assets/: Move from here...
  • pkg/manifests/assets/: ...to here. New directory.
  • pkg/manifests/bindata.go: Delete file.
  • pkg/manifests/manifests.go (content): New variable. Store assets as an embed.FS value.
    (MustAsset, MustAssetString): New functions. Return assets using the new content variable. These function definitions replace ones from the deleted bindata.go file.
  • pkg/manifests/manifests_test.go (TestManifests): Verify that the CustomResourceDefinitionManifest and NamespaceManifest assets can be read.
  • tools/tools.go: Delete file. We no longer need to import go-bindata.
  • vendor/*: Regenerate.

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.

@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch 2 times, most recently from 66d900e to b977341 Compare April 13, 2023 12:20
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 13, 2023

@Miciah: This pull request references NE-1269 which is a valid jira issue.

Details

In response to this:

Replace go-bindata using the embed package added in Go 1.16. This change simplifies the build process and reduces the likelihood of merge conflicts when PRs modify assets.

  • .gitignore: Ignore the new, generated pkg/manifests/manifests/ directory.
  • Makefile: Delete bindata target. Add a manifests target to generate assets under pkg/manifests/ from the top-level manifests/ directory. Make the generate target depend on manifests instead of on update. Make the build, test-e2e, and test-e2e-list targets depend on generate. Add a command to delete generated files under the clean target.
  • go.mod: Drop go-bindata.
  • go.sum: Regenerate.
  • hack/update-generated-bindata.sh: Delete file.
  • assets/: Move from here...
  • pkg/manifests/assets/: ...to here. New directory.
  • pkg/manifests/bindata.go: Delete file.
  • pkg/manifests/manifests.go (content): New variable. Store assets as an embed.FS value.
    (MustAsset, MustAssetString): New functions. Return assets using the new content variable. These function definitions replace ones from the deleted bindata.go file.
  • pkg/manifests/manifests_test.go (TestManifests): Verify that the CustomResourceDefinitionManifest and NamespaceManifest assets can be read.
  • tools/tools.go: Delete file. We no longer need to import go-bindata.
  • vendor/*: Regenerate.

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.

@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch from b977341 to 1a7236f Compare April 13, 2023 12:34
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 13, 2023

@Miciah: This pull request references NE-1269 which is a valid jira issue.

Details

In response to this:

Replace go-bindata using the embed package added in Go 1.16. This change simplifies the build process and reduces the likelihood of merge conflicts when PRs modify assets.

  • .gitignore: Ignore the new, generated pkg/manifests/manifests/ directory.
  • Makefile: Delete bindata target. Add a manifests target to generate assets under pkg/manifests/ from the top-level manifests/ directory. Make the generate target depend on manifests instead of on update. Make the build, test, test-e2e, test-e2e-list, and verify targets depend on generate. Add a command to delete generated files under the clean target.
  • go.mod: Drop go-bindata.
  • go.sum: Regenerate.
  • hack/update-generated-bindata.sh: Delete file.
  • assets/: Move from here...
  • pkg/manifests/assets/: ...to here. New directory.
  • pkg/manifests/bindata.go: Delete file.
  • pkg/manifests/manifests.go (content): New variable. Store assets as an embed.FS value.
    (MustAsset, MustAssetString): New functions. Return assets using the new content variable. These function definitions replace ones from the deleted bindata.go file.
  • pkg/manifests/manifests_test.go (TestManifests): Verify that the CustomResourceDefinitionManifest and NamespaceManifest assets can be read.
  • tools/tools.go: Delete file. We no longer need to import go-bindata.
  • vendor/*: Regenerate.

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.

@candita
Copy link
Contributor

candita commented Apr 26, 2023

/assign @frobware
/assign

1 similar comment
@candita
Copy link
Contributor

candita commented Apr 26, 2023

/assign @frobware
/assign

//go:embed assets manifests
var content embed.FS

// MustAsset returns the bytes for the named assert.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// MustAsset returns the bytes for the named assert.
// MustAsset returns the bytes for the named asset.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +87 to +98
//go:generate cp ../../manifests/00-namespace.yaml manifests/
//go:generate cp ../../manifests/00-custom-resource-definition.yaml manifests/
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple of questions. Why are these two files the only ones needed from the manifests/ directory? And why not permanently move them to assets/ instead of creating a temporary directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A couple of questions. Why are these two files the only ones needed from the manifests/ directory?

They are the only two files that the ingress-operator render command uses:

files := []string{
manifests.CustomResourceDefinitionManifest,
manifests.NamespaceManifest,
}

#309 added the ingress-operator render command for the installer to use in openshift/installer#2523 for configuring ingresscontrollers at installation time.

And why not permanently move them to assets/ instead of creating a temporary directory?

Then they wouldn't be in the right place for CVO to read them. The manifests still need to be installed by CVO if the cluster admin doesn't configure them with the installer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then they wouldn't be in the right place for CVO to read them. The manifests still need to be installed by CVO if the cluster admin doesn't configure them with the installer.

Seems like a worthwhile comment to add so that somebody doesn't move things in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch 3 times, most recently from 3dafe96 to d636984 Compare April 28, 2023 14:54
@Miciah
Copy link
Contributor Author

Miciah commented Apr 28, 2023

@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch from d636984 to 5fd4199 Compare April 28, 2023 16:53
@Miciah
Copy link
Contributor Author

Miciah commented Apr 28, 2023

Rebased since #901 merged.

@frobware
Copy link
Contributor

frobware commented May 2, 2023

/approve

@candita deferring to you for the LGTM.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 2, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 2, 2023
@frobware
Copy link
Contributor

frobware commented May 2, 2023

/retest

@Miciah
Copy link
Contributor Author

Miciah commented May 2, 2023

This is a build change that doesn't require docs, PX, or QE.
/label docs-approved
/label px-approved
/label qe-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels May 2, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@candita
Copy link
Contributor

candita commented Jul 19, 2023

/lgtm

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch from e66f429 to 44b7bdc Compare July 19, 2023 21:04
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@Miciah
Copy link
Contributor Author

Miciah commented Jul 19, 2023

Rebased for #932.

@candita
Copy link
Contributor

candita commented Jul 19, 2023

/lgtm

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

Miciah commented Jul 20, 2023

e2e-hypershift failed.
/test e2e-hypershift

e2e-aws-operator failed because must-gather failed.
/test e2e-aws-operator

Replace go-bindata using the embed package added in Go 1.16.  This change
simplifies the build process and reduces the likelihood of merge conflicts
when PRs modify assets.

This commit resolves NE-1269.

https://issues.redhat.com/browse/NE-1269

* .gitignore: Ignore the new, generated pkg/manifests/manifests/ directory.
* Makefile: Delete "bindata" target.  Add a "manifests" target to generate
assets under pkg/manifests/ from the top-level manifests/ directory.  Make
the "generate" target depend on "manifests" instead of on "update".  Make
the "build", "test", "test-e2e", "test-e2e-list", and "verify" targets
depend on "generate".  Add a command to delete generated files under the
"clean" target.
* go.mod: Drop go-bindata.
* go.sum: Regenerate.
* hack/update-generated-bindata.sh:
* hack/verify-generated-bindata.sh: Delete files.
* assets/: Move from here...
* pkg/manifests/assets/: ...to here.  New directory.
* pkg/manifests/bindata.go: Delete file.
* pkg/manifests/manifests.go (content): New variable.  Store assets as
an embed.FS value.
(MustAsset, MustAssetString): New functions.  Return assets using the new
content variable.  These function definitions replace ones from the deleted
bindata.go file.
* pkg/manifests/manifests_test.go (TestManifests): Verify that the
CustomResourceDefinitionManifest and NamespaceManifest assets can be read.
* tools/tools.go: Delete file.  We no longer need to import go-bindata.
* vendor/*: Regenerate.
@Miciah Miciah force-pushed the NE-1269-replace-bindata-using-embed branch from 44b7bdc to 0b761da Compare July 20, 2023 19:14
@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2023

Rebased for #900.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2023
@candita
Copy link
Contributor

candita commented Jul 20, 2023

/lgtm
/remove-hold

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 20, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD b4b5f42 and 2 for PR HEAD 0b761da in total

@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2023

e2e-aws-operator failed because must-gather failed.
/test e2e-aws-operator

e2e-azure-ovn failed because the installer's post-bootstrap cleanup failed:

level=info msg=Destroying the bootstrap resources...
level=info msg=Time elapsed: 15m41s
Copying kubeconfig to shared dir as kubeconfig-minimal
level=error
level=error msg=Error: retrieving Account "clusterolpog" for Container "ignition": retrieving storage accounts: storage.AccountsClient#List: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded
level=error
level=error msg=  with azurerm_storage_container.ignition,
level=error msg=  on main.tf line 58, in resource "azurerm_storage_container" "ignition":
level=error msg=  58: resource "azurerm_storage_container" "ignition" {
level=error
level=fatal msg=terraform destroy: failed doing terraform destroy: exit status 1
level=fatal
level=fatal msg=Error: retrieving Account "clusterolpog" for Container "ignition": retrieving storage accounts: storage.AccountsClient#List: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded
level=fatal
level=fatal msg=  with azurerm_storage_container.ignition,
level=fatal msg=  on main.tf line 58, in resource "azurerm_storage_container" "ignition":
level=fatal msg=  58: resource "azurerm_storage_container" "ignition" {
level=fatal
level=fatal
Installer exit with code 1

/test e2e-azure-ovn

@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2023

e2e-gcp-operator failed because TestAllowedSourceRanges failed. This might be the same issue as OCPBUGS-13106.
/test e2e-gcp-operator

@Miciah
Copy link
Contributor Author

Miciah commented Jul 20, 2023

e2e-azure-operator failed because the network operator reported degraded status:

level=error msg=Cluster operator network Degraded is True with ReconcileError: Panic detected: net/http: abort Handler

This appears to be the same issues as OCPBUGS-15945.
/test e2e-azure-operator

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 21, 2023

@Miciah: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants