Handle missing pipeline user name in terraform registry UI
What does this MR do and why?
Handle missing pipeline user name in terraform registry UI
The UI page of Terraform Registry in a project/group isn't displaying the terraform modules if those modules are published through a pipeline and the name of the pipeline's author is missing.
Hides the published by <author>
text when pipeline author name is missing.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- run the following in rails console:
# stub file upload
def fixture_file_upload(*args, **kwargs)
Rack::Test::UploadedFile.new(*args, **kwargs)
end
# create a terraform module package
pkg = FactoryBot.create(:terraform_module_package, project: Project.last)
# link the module to a pipeline that has no user
Packages::BuildInfo.create(package_id: pkg.id, pipeline_id: Ci::Pipeline.where(user_id: nil).last.id)
- Visit
Project > Operate > Terraform modules
and you should find that the module is shown. There should be no error in the console.
Related to #451889 (closed)
Edited by Rahul Chanila