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

[master] Add Salt package type to versions report and grain #64446

Merged
merged 10 commits into from Aug 4, 2023

Conversation

Ch3LL
Copy link
Contributor

@Ch3LL Ch3LL commented Jun 9, 2023

What does this PR do?

Adds the package type to the Salt versions type and adds a grain.
This value will be either 'system' or 'onedir'

What issues does this PR fix or reference?

Fixes: #62961
Fixes: #62589

Previous Behavior

Could not determine package type in Salt.

New Behavior

Can determine package type either via versions report or calling the grain.

New Versions Report:

Salt Version:
                  Salt: 3006.1+404.gc417f2609a
 
Python Version:
                Python: 3.10.9 (main, Feb  3 2023, 08:04:26) [GCC 12.2.1 20230111]
 
Dependency Versions:
                  cffi: 1.14.6
              cherrypy: unknown
              dateutil: 2.8.2
             docker-py: 6.0.1
                 gitdb: Not Installed
             gitpython: Not Installed
                Jinja2: 3.1.2
               libgit2: Not Installed
          looseversion: 1.0.2
              M2Crypto: Not Installed
                  Mako: 1.2.4
               msgpack: 1.0.2
          msgpack-pure: Not Installed
          mysql-python: Not Installed
             packaging: 23.1
             pycparser: 2.21
              pycrypto: Not Installed
          pycryptodome: 3.9.8
                pygit2: Not Installed
          python-gnupg: 0.4.8
                PyYAML: 5.4.1
                 PyZMQ: 25.1.0
                relenv: 0.7.0
                 smmap: Not Installed
               timelib: 0.2.4
               Tornado: 6.3.2
                   ZMQ: 4.3.4
 
Salt Extensions:
 pytest-salt-factories: 1.0.0rc23
  saltext.salt-convert: 0.1.dev28+g54c1336
 saltext.salt-describe: 0.1.dev157+g1bbb6c1
 
Salt Package Information:
          Package Type: system
 
System Versions:
                  dist: manjaro 22.1.3 Talos
                locale: utf-8
               machine: x86_64
               release: 6.1.31-1-MANJARO
                system: Linux
               version: Manjaro Linux 22.1.3 Talos

New grain type:

(py-3.10)  ch3ll@megan-precision5550  ~/git/salt   add_onedir_grains <B>  salt-call --local grains.get package
local:
    system

@Ch3LL Ch3LL requested a review from a team as a code owner June 9, 2023 18:35
@Ch3LL Ch3LL requested review from cmcmarrow and removed request for a team June 9, 2023 18:35
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Add Salt package type to versions report and grain [master] Add Salt package type to versions report and grain Jun 9, 2023
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 18:51 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 18:51 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 18:51 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 18:52 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 19:05 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 19:11 — with GitHub Actions Inactive
@Ch3LL Ch3LL changed the title [master] Add Salt package type to versions report and grain [WIP] [master] Add Salt package type to versions report and grain Jun 9, 2023
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 20:15 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 9, 2023 21:07 — with GitHub Actions Inactive
salt/modules/pip.py Outdated Show resolved Hide resolved
@ITJamie
Copy link
Contributor

ITJamie commented Jun 11, 2023

It would be great if this was a grain that was fully self contained, that would mean it could be synced to older minions.

I understand while its currently written to use a module but having this be code that syncs from the master to all existing minion versions would be useful.

@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 19:48 — with GitHub Actions Inactive
pkg/tests/integration/test_salt_grains.py Show resolved Hide resolved
tools/pkg/build.py Show resolved Hide resolved
@s0undt3ch
Copy link
Member

@s0undt3ch this is ready, but I believe it clashes with your pytest factories PR. Did you want to merge this one in first or yours? The new pytest fixtures Iadd will need to be removed when your PR is added

Sorry, totally missed this message.

@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:01 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:01 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:01 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:24 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 19:30 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci August 3, 2023 22:20 — with GitHub Actions Inactive
@Ch3LL Ch3LL requested a review from s0undt3ch August 4, 2023 14:03
@s0undt3ch s0undt3ch merged commit 3a42b0c into saltstack:master Aug 4, 2023
368 checks passed
@Ch3LL
Copy link
Contributor Author

Ch3LL commented Aug 7, 2023

@meaksh just thought you would want to be aware of this new change for packaging purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:full Run the full test suite
Projects
None yet
3 participants