Skip to content

no team software gitops#20847

Merged
lucasmrod merged 20 commits intomainfrom
24064-gitops
Aug 5, 2024
Merged

no team software gitops#20847
lucasmrod merged 20 commits intomainfrom
24064-gitops

Conversation

@mostlikelee
Copy link
Copy Markdown
Contributor

@mostlikelee mostlikelee commented Jul 30, 2024

#20464

Adding gitops support for a top level software key to be used to manage installable software into "no team".

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Added/updated tests
  • Manual QA for all new/changed functionality

@mostlikelee mostlikelee marked this pull request as ready for review July 31, 2024 13:36
@mostlikelee mostlikelee changed the title 24064 gitops no team software gitops Jul 31, 2024
getvictor
getvictor previously approved these changes Jul 31, 2024
Copy link
Copy Markdown
Member

@getvictor getvictor left a comment

Choose a reason for hiding this comment

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

Looks good. Left a few comments/questions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this top level key supposed to be required or optional for global settings?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. The PR assumes that software is an optional key. However because of the declarative nature of gitops, declaring empty software will delete any existing installable software out of "no teams". Is that ok @marko-lisica ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To note, this mimics the current behavior of teams software

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

discussed answer, for reference: #19550 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a bug with PreInstallQuery: #20747
Please make a note on the bug that it will need to be fixed for No Team software as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the breaking contributors API change, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True, i'll update the contributor docs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Update this one too?

getvictor
getvictor previously approved these changes Jul 31, 2024
Copy link
Copy Markdown
Member

@getvictor getvictor left a comment

Choose a reason for hiding this comment

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

Looks good. One question to check.

Since adding software top level key may break existing gitops users (including dogfood), please make sure the right people are notified.

Also, we test against the fleet-gitops repo. Please add the software key to: https://github.com/fleetdm/fleet-gitops/blob/main/default.yml

I assume free users simply ignore the software key if present.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the following syntax supported?

software:
  - path: ../lib/eng_software.yml
  - path: ../lib/mgr_software.yml

If not, can you file a bug? This is how other top level keys work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i ran a quick test and that's still working

This reverts commit 576a94b765111ba96b66023218a0c7af328ea8de.
@fleet-release fleet-release removed the ~ceo PR requesting review from the CEO or issue related to EA tasks label Aug 2, 2024
// Apply "no team" software installers. Running every time to support
// removal of software installers on an empty config.
if appconfig != nil && appconfig.License.IsPremium() {
if len(specs.Teams) == 0 && appconfig != nil && appconfig.License.IsPremium() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What happens if a user adds a single query with fleetctl apply? Will it wipe their No Team software?

Copy link
Copy Markdown
Member

@getvictor getvictor left a comment

Choose a reason for hiding this comment

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

Looks good, if the tests pass. cc: @lucasmrod

Luke also needs to review.

@Sampfluger88
Copy link
Copy Markdown
Member

Removing Mike as is seems to be an accident.

@getvictor
Copy link
Copy Markdown
Member

@lukeheath Can you approve and merge this PR? It will fix failing GitOps tests on main.

@lucasmrod lucasmrod self-assigned this Aug 5, 2024
@lucasmrod lucasmrod merged commit a6a9a2e into main Aug 5, 2024
@lucasmrod lucasmrod deleted the 24064-gitops branch August 5, 2024 17:39
lucasmrod pushed a commit that referenced this pull request Aug 5, 2024
#20464 

Adding gitops support for a top level `software` key to be used to
manage installable software into "no team".

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [X] Added/updated tests
- [X] Manual QA for all new/changed functionality

---------

Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
lucasmrod added a commit that referenced this pull request Aug 5, 2024
Cherry pick #20464 to `minor-fleet-v4.55.0`.
`main` PR: #20847

Co-authored-by: Tim Lee <timlee@fleetdm.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants