Skip to content

Move extra publisher checks to their respective methods

What does this MR do?

I noticed that the publish method in ApplicationExperiment was only calling out to the publish_to_client and publish_to_database methods when certain criteria were met. However, we also use those methods directly on experiment instances, and it seems like we should be performing the same checks in those scenarios as well.

Also, it seems like a better pattern to have publish_to_database know about and care about the presence of the @record instance variable, rather than having publish know anything about it.

This is also a step toward extracting both of these extra publish steps into their own Publisher type collaborator objects.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Dallas Reedy

Merge request reports

Loading