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

[BUG] transform trying to transform failures #74

Closed
jmontleon opened this issue Feb 23, 2022 · 7 comments
Closed

[BUG] transform trying to transform failures #74

jmontleon opened this issue Feb 23, 2022 · 7 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@jmontleon
Copy link
Contributor

After running in dev sandbox I have failures like these:

$ cat failures/rhn-engineering-jmontleo-dev/backups.yaml 
APIResource:
  kind: Backup
  name: backups
  namespaced: true
  singularName: backup
  storageVersionHash: eSTCs+S6z7U=
  verbs:
  - delete
  - deletecollection
  - get
  - list
  - patch
  - create
  - update
  - watch
error:
  ErrStatus:
    apiVersion: v1
    code: 403
    details:
      group: velero.io
      kind: backups
    kind: Status
    message: 'backups.velero.io is forbidden: User "rhn-engineering-jmontleo" cannot
      list resource "backups" in API group "velero.io" in the namespace "rhn-engineering-jmontleo-dev"'
    metadata: {}
    reason: Forbidden
    status: Failure

I would not consider these unexpected.

But then transform fails trying to transform them...

+ /usr/bin/crane transform --ignored-patches-dir= --flags-file= --export-dir=/var/crane/export --transform-dir=/var/crane/transform
Error: Object 'Kind' is missing in '{"APIResource":{"kind":"Backup","name":"backups","namespaced":true,"singularName":"backup","storageVersionHash":"eSTCs+S6z7U=","verbs":["delete","deletecollection","get","list","patch","create","update","watch"]},"error":{"ErrStatus":{"apiVersion":"v1","code":403,"details":{"group":"velero.io","kind":"backups"},"kind":"Status","message":"backups.velero.io is forbidden: User \"rhn-engineering-jmontleo\" cannot list resource \"backups\" in API group \"velero.io\" in the namespace \"rhn-engineering-jmontleo-dev\"","metadata":{},"reason":"Forbidden","status":"Failure"}}}'
Usage:
  crane transform [flags]
  crane transform [command]
@jmontleon jmontleon added the kind/bug Categorizes issue or PR as related to a bug. label Feb 23, 2022
@sseago
Copy link
Contributor

sseago commented Feb 23, 2022

Ahh. Yeah, it looks like transform is just recursively traversing ExportDir It should be starting with ExportDir + "/resources" instead

@sseago
Copy link
Contributor

sseago commented Feb 23, 2022

As a workaround, you could append "/resources" on the CLI until there's a fix.

@sseago
Copy link
Contributor

sseago commented Feb 23, 2022

although that workaround would make export and transform inconsistent, because you would not want to add "/resources" on export itself. It's possible that we have a similar bug with apply.

@sseago
Copy link
Contributor

sseago commented Feb 23, 2022

Upon further discussion in slack, transform and apply need to cope with a passed-in export-dir which has the resources and failures subdirs (as created by crane export) and ignoring the failures dir and with a passed-in export-dir which points directly to the resources (which would happen if the user used some other means of yaml creation).

@djzager djzager added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 18, 2022
@eriknelson
Copy link
Contributor

/priority normal
/triage accepted

@openshift-ci openshift-ci bot added priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jun 24, 2022
@eriknelson eriknelson removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 24, 2022
@github-actions
Copy link

This issue synced with: https://issues.redhat.com/browse/MTRHO-68

@jmontleon
Copy link
Contributor Author

It looks like this is fixed: #76 and I did not encounter it again working in DevSandbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/normal Higher priority than priority/minor. Nice to have. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants