Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow overriding "default-command" in profile #64

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkellerer
Copy link
Collaborator

Add "default-command" from global also to the profile sections.
This allows to create profiles (and group of such profiles) for special cases, e.g. like check or prune:

groups:
  prune-all: ["prune-repo1", ...]

prune-repo1:
  inherit: "repo1"
  default-command: "prune"
  prune:
    schedule: "daily"
...

The example above can be run with resticprofile -n prune-all

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 60.52%. Comparing base (245a440) to head (6308eeb).
Report is 237 commits behind head on master.

Files with missing lines Patch % Lines
main.go 0.00% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   60.63%   60.52%   -0.11%     
==========================================
  Files          60       60              
  Lines        4623     4631       +8     
==========================================
  Hits         2803     2803              
- Misses       1621     1629       +8     
  Partials      199      199              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkellerer jkellerer mentioned this pull request Aug 13, 2021
5 tasks
@creativeprojects
Copy link
Owner

This is one way of doing it, while keeping the groups section the way it is, which is fine.

Also, I have been thinking about the groups configuration for a while, and I clearly overlooked it when I did it.
At some point I would like to change it so we can configure options inside a group, the most obvious would be to be able to schedule a group.

In which case, default command would fit nicely in a group configuration.

Now I don't mind adding a default command per profile though

@jkellerer
Copy link
Collaborator Author

Having "default-command" in a group is also a good thing. Priority wise it's just a question what comes first when we have gobal, group and profile. When it is added to groups as well it is probably best to prioritise group, otherwise profiles with a "default-command" cannot be added to groups that are built for scheduling a particular purpose.

@jkellerer jkellerer force-pushed the ft-default-command-in-profile branch from bb254ea to 6308eeb Compare September 29, 2021 17:56
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants