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

Omit id for objects during export with filtree_create #864

Merged
merged 9 commits into from
Jul 16, 2024

Conversation

przemkalit
Copy link
Contributor

What does this PR do?

Propose a solution that allows exporting objects without IDs.

Background: In our environment, the inclusion of IDs in the filenames is causing a slight mess in our GitHub repositories. Imagine the following situation:

  1. I exported a project with job templates from the DEV environment.
  2. I imported it into the TEST environment.
  3. I created a new job template in the TEST environment for this project.
  4. I exported the project with job templates again, but this time from the TEST environment.
  5. I discovered in the repository that there are files of job templates with both DEV and TEST IDs.

How should this be tested?

- name: Get objects
  hosts: all 
  roles:
    - role: infra.controller_configuration.filetree_create
      vars:
        omit_id: true

Is there a relevant Issue open for this?

N/A

Other Relevant info, PRs, etc

N/A

Copy link
Contributor

@ivarmu ivarmu left a comment

Choose a reason for hiding this comment

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

LGTM.

Could you add an extra space just after else '' to look consistent with other variables, resulting like else '' }}?

Another point is to add the new input variable in https://github.com/redhat-cop/controller_configuration/blob/devel/roles/filetree_create/README.md and in https://github.com/redhat-cop/controller_configuration/blob/devel/roles/filetree_create/meta/argument_specs.yml

@przemkalit
Copy link
Contributor Author

Ok, I've added the spaces, spotted missing id for teams and updated the documentation.

Copy link
Contributor

@ivarmu ivarmu left a comment

Choose a reason for hiding this comment

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

LGTM

@ivarmu ivarmu enabled auto-merge (squash) July 16, 2024 13:41
@ivarmu ivarmu merged commit 6178d4b into redhat-cop:devel Jul 16, 2024
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants