Complete the read to read_metadata action rename for secrets permissions
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Why are we doing this work
#602726 (closed) planned to rename the read action to read_metadata as part of its frontend MR:
Remove the deprecated
read: stop sending it, flip backend readback to emitread_metadata, and drop thereadinput alias.
The read_value work it was bundled with did ship, and the issue is closed as complete. The rename did not. On master today:
- The permissions modal still sends
readas the action key. See theactionsobject inee/app/assets/javascripts/pages/projects/shared/permissions/secrets_manager/components/secrets_manager_permissions_modal.vue. The UI label reads "Read metadata" but the value sent isread. #set_actions_from_capabilitiesinee/app/models/secrets_management/base_secrets_permission.rbstill emitsACTIONS[:read]on readback.- The
readinput alias is still inACTIONS.
Nothing is broken by this. The problem is that the comments in base_secrets_permission.rb describe a migration that is in progress, when it is not, so the next person reading them draws the wrong conclusion about what is safe to change. read is also dead weight in a public-facing action list that we are about to stabilise for GA.
What needs to change
This has to be one coordinated change, it cannot be split across two MRs on either side:
- Frontend: send and display
read_metadatainstead ofread. - Backend: flip readback in
#set_actions_from_capabilitiesto emitread_metadata. - Backend: drop the
readinput alias fromACTIONSandMETADATA_READ_ACTIONS. - Backend: update
validate_actions, which currently acceptsreadorread_metadata. - Remove the two stale comments describing the migration.
- Check for other consumers of the
readaction string before removing it, including specs, QA page objects, and any docs or API examples.
Notes
- Not urgent and not scheduled for 19.4. It blocks nothing.
- The frontend half could ride along with #623352 (closed), which is already changing the permissions table UI. That would avoid a separate round of frontend and backend coordination.
- Worth doing before #596011 removes the
experiment:annotations from the Secrets Management GraphQL mutations. While the mutations are still experiment level, dropping an accepted input value is cheap. Afterwards it would need a deprecation cycle. - #623435 (closed) also changes
#set_actions_from_capabilities, but deliberately leaves thereadalias alone, so the two do not conflict beyond a possible rebase.
Related
- #602726 (closed) where the rename was planned
- #623435 (closed) touches the same method
- #612945 (closed) secrets manager tech debt tracking