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

Fixes 3336: expose module_hotfixes flag as checkbox for repo #196

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

xbhouse
Copy link
Contributor

@xbhouse xbhouse commented Jan 8, 2024

Summary

Adds a switch to disable modularity filtering to the Add / Edit Repository modals. Default is to have modularity filtering enabled (module_hotfixes = false) and the switch set to off.

Testing steps

  • Add a repository in the UI and toggle the modularity filtering switch to on (this should change the words to Modularity filtering disabled in the UI)
  • Fetching this repository should show module_hotfixes = true
  • Edit that repository in the UI and toggle the modularity filtering switch to off (this should change the words to Modularity filtering enabled in the UI)
  • Fetching this repository should then show module_hotfixes = false

@jlsherrill
Copy link
Member

<FormGroup fieldId='enable_module_hotfixes'>
<Switch
label='Modularity filtering disabled'
labelOff='Modularity filtering enabled'
Copy link
Member

Choose a reason for hiding this comment

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

Could you add an ouiId flag to this similar to what was done here for QE.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added!

Copy link
Member

@Andrewgdewar Andrewgdewar left a comment

Choose a reason for hiding this comment

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

Ack pending above comment.

@swadeley
Copy link
Member

/retest

@swadeley
Copy link
Member

swadeley commented Jan 16, 2024

Hi

UI looks good

Here is the default state:

image

Here is with switch selected:

image

@swadeley
Copy link
Member

swadeley commented Jan 17, 2024

Hi

With toggle switch not selected in UI, the default state, i.e. Modularity filtering disabled

print(app.content_sources.rest_client.repositories_api.get_repo_configuration_file('5dc0390a-8f39-4700-b597-fdd5141f0bcb','ff2bc409-ea95-465f-bb9d-f541bd870c7e'))
2024-01-17 09:19:27.206 [    INFO] [iqe.base.rest_client] REST: METHOD=GET, <snip>, params=[]
[gpgtest_snapshot_false]
name=gpgtest-snapshot-false
baseurl=https://env-ephemeral<snip>4e3b-9420-927da2b13905/
module_hotfixes=0
gpgcheck=1
repo_gpgcheck=0
enabled=1
gpgkey=https://ee-iyw94dk4.<snip>/api/content-sources/v1.0/repository_gpg_key/5dc0390a-8f39-4700-b597-fdd5141f0bcb

Now with Modularity filtering switch selected, "Modularity filtering disabled" shows in the UI, and a new snapshot (but no new publication):

In the repo it says:
'module_hotfixes': True,
In the repo config file for the snapshot it says:
module_hotfixes=1

print(app.content_sources.rest_client.repositories_api.get_repo_configuration_file('5dc0390a-8f39-4700-b597-fdd5141f0bcb','ff2bc409-ea95-465f-bb9d-f541bd870c7e'))
2024-01-17 09:31:44.653 [    INFO] [iqe.base.rest_client] REST: METHOD=GET, <snip>, params=[]
[gpgtest_snapshot_false]
name=gpgtest-snapshot-false
baseurl=https://env-ephemeral-<snip>/pulp/content/ba85dc81/5dc0390a-8f39-4700-b597-fdd5141f0bcb/d933ba2c-8d90-4e3b-9420-927da2b13905/
module_hotfixes=1
gpgcheck=1
repo_gpgcheck=0
enabled=1
gpgkey=https://ee-iyw94dk4.<snip>/api/content-sources/v1.0/repository_gpg_key/5dc0390a-8f39-4700-b597-fdd5141f0bcb

@xbhouse
Copy link
Contributor Author

xbhouse commented Jan 17, 2024

@jlsherrill @Andrewgdewar any advice here on how we can make this clearer for users? do you think sufficient documentation / reaching out to support will be enough or should I make any changes here to address the confusion?

@swadeley
Copy link
Member

@jlsherrill @Andrewgdewar any advice here on how we can make this clearer for users? do you think sufficient documentation / reaching out to support will be enough or should I make any changes here to address the confusion?

Docs team will get to this, I think its OK for now.

@swadeley swadeley merged commit 06c13a9 into content-services:main Jan 17, 2024
5 of 6 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.

4 participants