Follow-up from "Fix project-level VSA license check"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem

When doing a license check for a Namespaces::ProjectNamespace record (on SaaS), we look up the plans for the ancestor groups. In this particular case, the ancestors are not returned because we generate a query with type='Project' filter.

  • Idea 1: Remove the type filter from the AR query.
  • Idea 2: Check only the root ancestor when loading plan (needs confirmation that only root namespaces can have plans)

The following discussion from !114579 (merged) should be addressed:

  • @DylanGriffith started a discussion: (+5 comments)

    Something seems not ideal here if we can never rely on licensed_feature_available? for a ProjectNamespace. What is the reason it doesn't work? Because it's behaving like a group or something? Also won't the group have this licensed feature available anyway since GitLab.com gets licenses from the top level group?

Edited by 🤖 GitLab Bot 🤖