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

Misleading DataSetConfiguration results #120

Open
sfxworks opened this issue Dec 5, 2022 · 0 comments
Open

Misleading DataSetConfiguration results #120

sfxworks opened this issue Dec 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@sfxworks
Copy link

sfxworks commented Dec 5, 2022

Description

There are times when queries will fail even though files exist in the location referenced.

For example:

I have an absolute path of /mnt/iso/EFI/* or /mnt/iso/arch/boot/x86_64/initramfs-linux-hardened.img. An attribute queries against these will fail. Though, an attribute query with relative paths related to the collection location will succeed.

In addition, a new bug I ran into today.

    - file: config/init.sh
      attributes:
        script: default
    - file: config/large-ram.sh
      attributes:
        script: large-ram
    - file: config/00-ipv6.sh
      attributes:
        script: ipv6
    - file: config/kubeadm/kubeadm-config-office.yaml
      attributes:
        cluster: office
    - file: config/kubeadm/kubeadm-config-datacenter.yaml
      attributes:
        cluster: datacenter
    - file: config/kubeadm/kubeadm-config-home.yaml
      attributes:
        cluster: home

With the following query:

kind: AttributeQuery
apiVersion: client.uor-framework.io/v1alpha1
attributes:
  script: large-ram

The files are successfully recovered.

However, with this query:

kind: AttributeQuery
apiVersion: client.uor-framework.io/v1alpha1
attributes:
  cluster: office

I get an error.

Here is the directory structure

/home/sam/git/mcsh/OS/empourus/config
.
├── 00-script-ipv6.sh
├── init.sh
├── kubeadm
│   ├── kubeadm-config-datacenter.yaml
│   ├── kubeadm-config-home.yaml
│   └── kubeadm-config-office.yaml
└── large-ram.sh

1 directory, 6 files

The files are there, but it seems that something is in the way.

empourus pull --insecure --plain-http goregistry.sfxworks.net:1338/dev/os:latest --attributes=../empourus/query-bundle/11-aq-cluster.yaml -o .                                                                                                            ✔ 
INFO[0000] Resolving artifacts for reference goregistry.sfxworks.net:1338/dev/os:latest 
INFO[0001] No matching artifacts found                  

Though the reality is, they're just empty files.

In this case, populating them is fine. Though there may be sometimes I'd like to use files existing as conditionals.

Ontop of #114 these are real gotchas when trying to create a bundle.

I would like a warning message to be displayed when uor skips or ignores a file

UOR Client:
 Version:       v0.3.0
 Go Version:    go1.17.13
 Git Commit:    006ab2f
 Build Date:    2022-08-29T21:50:33Z
 Platform:      linux/amd64
@sfxworks sfxworks added the bug Something isn't working label Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant