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

Error: unknown flag: --watches-file #2615

Closed
camilamacedo86 opened this issue Mar 3, 2020 · 4 comments · Fixed by #2637
Closed

Error: unknown flag: --watches-file #2615

camilamacedo86 opened this issue Mar 3, 2020 · 4 comments · Fixed by #2637
Assignees
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Milestone

Comments

@camilamacedo86
Copy link
Contributor

From channel:

I'm seeing this in our CI runs:

Error: unknown flag: --watches-file
Usage:
  operator-sdk run [flags]
Flags:
      --kubeconfig string         The file path to kubernetes configuration file. Defaults to location specified by $KUBECONFIG, or to default file rules if not set
      --namespace string          The namespace where the operator watches for changes.
      --olm                       The operator to be run will be managed by OLM in a cluster. Cannot be set with another run-type flag
      --manifests string          [olm only] Directory containing package manifest and operator bundles.
      --operator-version string   [olm only] Version of operator to deploy
      --install-mode string       [olm only] InstallMode to create OperatorGroup with. Format: InstallModeType=[ns1,ns2[, ...]]
      --include strings           [olm only] Path to Kubernetes resource manifests, ex. Role, Subscription. These supplement or override defaults generated by run/cleanup
      --timeout duration          [olm only] Time to wait for the command to complete before failing (default 2m0s)
      --local                     The operator will be run locally by building the operator binary with the ability to access a kubernetes cluster using a kubeconfig file. Cannot be set with another run-type flag.
      --operator-flags string     [local only] The flags that the operator needs. Example: "--flag1 value1 --flag2=value2"
      --go-ldflags string         [local only] Set Go linker options
      --enable-delve              [local only] Start the operator using the delve debugger
  -h, --help                      help for run
Global Flags:
      --verbose   Enable verbose logging

I'm having a hard time following when this flag was removed from the cmd/operator-sdk/run code

@camilamacedo86
Copy link
Contributor Author

camilamacedo86 commented Mar 3, 2020

Hi @estroz,

This came from the channel. I was looking and shows that we remove the flag here: #2441

However, I am still facing the flag in the doc sdk-cli-reference and I was not able to find this breaking change in the CHANGELOG.md.

In this way, I decide to raise the issue here for:

  • Verify if it should be removed ( I understand that yes )
  • Update the doc sdk-cli-reference by replacing it for exec-entrypoint ansible --watches-file=/opt/ansible/watches.yaml.
  • Add a retroactive entry in the changelog with the breaking change.

Please, let me know if I misunderstood something here.

@timflannagan
Copy link
Contributor

For more context, this is the entrypoint to our ansible-based Operator: https://github.com/operator-framework/operator-metering/blob/master/images/metering-ansible-operator/scripts/entrypoint.sh

I'm able to build and run our origin images locally fine, and the problem only occurs when CI is building and using our OCP images. As a next step, I can try and build the OCP images locally, replacing the ... run ansible --watches-file with the exec-entrypoint ansible --watches-file and hopefully that resolves this issue.

@camilamacedo86
Copy link
Contributor Author

Hi @timflannagan1,

If you are using the 0.15.x then you entrypoint.sh need to be updated as here

@estroz
Copy link
Member

estroz commented Mar 3, 2020

The run -> exec-entrypoint name change is already a breaking change in the changelog. We need to update the release notes and migration guide for v0.15.x.

@estroz estroz added the kind/documentation Categorizes issue or PR as related to documentation. label Mar 3, 2020
@estroz estroz added this to the v0.16.0 milestone Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants