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

[GitOps] Error when using relative path in no-team.yml #25770

Open
ksatter opened this issue Jan 24, 2025 · 3 comments
Open

[GitOps] Error when using relative path in no-team.yml #25770

ksatter opened this issue Jan 24, 2025 · 3 comments
Assignees
Labels
bug Something isn't working as documented customer-eponym #g-mdm MDM product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.

Comments

@ksatter
Copy link
Member

ksatter commented Jan 24, 2025

Fleetctl version: v4.62.0


💥  Actual behavior

With the following folder structure,

prod
  |-- lib
    |-- mdm-profiles
      |-- prod-profiles
        |-- profile.mobileconfig
  |-- teams
    |-- no-team.yml
    |-- test-team.yml
  |-- default.yml

Profiles listed in test-team.yml are succesfully applied using a relative path:

name: Test team
policies:
queries:
agent_options:
controls:
  macos_settings:
    custom_settings:
        - path: ../lib/mdm-profiles/prod-profiles/profile.mobileconfig
team_settings:
software:

But the same policy and path fails when applied to "no team":

name: No team
policies:
queries:
agent_options:
controls:
  macos_settings:
    custom_settings:
        - path: ../lib/mdm-profiles/prod-profiles/profile.mobileconfig
team_settings:
software:

The following error is returned:

Error: applying custom settings: open ../lib/mdm-profiles/prod-profiles/profile.mobileconfig: no such file or directory.

When no-team.yml is removed and only the test-team.yml is present, with the same relative path, settings are applied correctly without error.

Providing a full path to the file in the runner environment is also successful:

name: No team
policies:
queries:
controls:
  macos_settings:
    custom_settings:
        - path: /runner/_work/fleet-gitops/prod/lib/mdm-profiles/prod-profiles/profile.mobileconfig
agent_options:
team_settings:
software:

🧑‍💻  Steps to reproduce

  1. TODO
  2. TODO

🕯️ More info (optional)

N/A

It appears as though we do not include setting profiles for "No team" in our testing workflows, as per @getvictor, any solution should include setting up testing to detect additional issues with no-team.

🛠️ To fix

Product designer: @marko-lisica

  • Support relative paths for no-team.yml file. It should work same way as in team files.
@ksatter ksatter added :incoming New issue in triage process. :reproduce Involves documenting reproduction steps in the issue bug Something isn't working as documented customer-eponym labels Jan 24, 2025
@JoStableford
Copy link
Contributor

Linked to Unthread ticket:

Issue with gitops.sh script recognizing file paths #4263

@getvictor
Copy link
Member

@ksatter I recall the customer had issues with macOS MDM profiles, not policies, correct?

@sharon-fdm sharon-fdm added #g-orchestration Orchestration product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. labels Jan 27, 2025
@ksatter
Copy link
Member Author

ksatter commented Jan 27, 2025

Thanks @getvictor, I guess my brain went in to autopilot when I built out the yaml. Updating now.

@georgekarrv georgekarrv added #g-mdm MDM product group and removed #g-orchestration Orchestration product group labels Jan 27, 2025
@georgekarrv georgekarrv added the :product Product Design department (shows up on 🦢 Drafting board) label Jan 27, 2025
@marko-lisica marko-lisica removed the :product Product Design department (shows up on 🦢 Drafting board) label Jan 29, 2025
@georgekarrv georgekarrv removed the :reproduce Involves documenting reproduction steps in the issue label Jan 30, 2025
@georgekarrv georgekarrv removed their assignment Jan 30, 2025
@lukeheath lukeheath added the ~released bug This bug was found in a stable release. label Jan 31, 2025
@getvictor getvictor self-assigned this Feb 4, 2025
@getvictor getvictor added this to the 4.65.0-tentative milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented customer-eponym #g-mdm MDM product group :incoming New issue in triage process. :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

7 participants