Skip to content

upcoming: [UIE-9343] - Add API endpoints and types for /v4/images/sharegroups/members and /v4/images/sharegroups/tokens#12984

Merged
harsh-akamai merged 12 commits intolinode:developfrom
harsh-akamai:UIE-9311-add-endpoints-to-images
Oct 27, 2025
Merged

upcoming: [UIE-9343] - Add API endpoints and types for /v4/images/sharegroups/members and /v4/images/sharegroups/tokens#12984
harsh-akamai merged 12 commits intolinode:developfrom
harsh-akamai:UIE-9311-add-endpoints-to-images

Conversation

@harsh-akamai
Copy link
Contributor

@harsh-akamai harsh-akamai commented Oct 14, 2025

Description 📝

Add new /v4beta/images/sharegroups/members & /v4beta/images/sharegroups/tokens endpoints for Private Image Sharing feature

This is part of a 2 PR split that covers all the endpoints, validation and type changes for the new Private Image Sharing feature (PR #2)

Changes 🔄

This PR covers the CRUD endpoints for Sharegroup members and tokens

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

How to test 🧪

Verification steps

  • Confirm changes match API spec(added in the Parent ticket)
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@harsh-akamai harsh-akamai requested a review from a team as a code owner October 14, 2025 06:46
@harsh-akamai harsh-akamai self-assigned this Oct 14, 2025
@harsh-akamai harsh-akamai added the Images Relating to Images label Oct 14, 2025
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Looks good, thx for the clean code and good conventions

Left a few comments to consider to wrap this up

setParams(params),
setXFilter(filters),
);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it makes sense to isolate this particular endpoint under images.

It belongs to the sharegroups namespace

Copy link
Contributor

Choose a reason for hiding this comment

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

We should be consistent with the file naming as well (all lower caps)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did find nodePool.ts to follow the camelCasing though 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Right but nodePool is camel case everywhere. this file name is the only instance of shareGroups being camel case

It's not a big deal, just a consistency nit. does not matter much to me

sharegroupId: string,
imageId: string,
data: UpdateSharegroupImagePayload,
) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

In general try to use named arguments above two parameters, along with an interface

interface UpdateSharegroupImage {
  sharegroupId: string;
  imageId: string;
  data: UpdateSharegroupImagePayload;
}

export const updateSharegroupImage = ({
  sharegroupId,
  imageId,
  data,
}: UpdateSharegroupImage) => {
  [...]

…s/sharegroups/members` and `/v4beta/images/sharegroups/tokens`
@abailly-akamai
Copy link
Contributor

@harsh-akamai also don't forget your changesets, exp for new endpoints

@harsh-akamai harsh-akamai changed the title upcoming: [UIE-9343] - Add API endpoints and validation schemas for /v4/images/sharegroups upcoming: [UIE-9343] - Add API endpoints and types for /v4beta/images/sharegroups/members and /v4beta/images/sharegroups/tokens Oct 14, 2025
@harsh-akamai harsh-akamai changed the title upcoming: [UIE-9343] - Add API endpoints and types for /v4beta/images/sharegroups/members and /v4beta/images/sharegroups/tokens upcoming: [UIE-9343] - Add API endpoints and types for /v4/images/sharegroups/members and /v4/images/sharegroups/tokens Oct 14, 2025
) => {
Request<Page<SharegroupMember>>(
setURL(
`${BETA_API_ROOT}/images/sharegroup/${encodeURIComponent(sharegroupId)}/members`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`${BETA_API_ROOT}/images/sharegroup/${encodeURIComponent(sharegroupId)}/members`,
`${BETA_API_ROOT}/images/sharegroups/${encodeURIComponent(sharegroupId)}/members`,

same here

data: GenerateSharegroupTokenPayload,
) => {
return Request<SharegroupToken>(
setURL(`${BETA_API_ROOT}/images/sharegroup/tokens`),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setURL(`${BETA_API_ROOT}/images/sharegroup/tokens`),
setURL(`${BETA_API_ROOT}/images/sharegroups/tokens`),

I think this should be sharegroups (per the specs). Could you double-check?

) => {
Request<SharegroupMember>(
setURL(
`${BETA_API_ROOT}/images/sharegroup/${encodeURIComponent(sharegroupId)}/members/${encodeURIComponent(token_uuid)}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`${BETA_API_ROOT}/images/sharegroup/${encodeURIComponent(sharegroupId)}/members/${encodeURIComponent(token_uuid)}`,
`${BETA_API_ROOT}/images/sharegroups/${encodeURIComponent(sharegroupId)}/members/${encodeURIComponent(token_uuid)}`,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in cd173b6

source_image_id: number;
};
shared_with: null | {
shared_count: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
shared_count: number;
sharegroup_count: number;

I think this should be sharegroup_count

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! Thanks @pmakode-akamai

Comment on lines +26 to +27
sharegroup_label: string;
sharegroup_uuid: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sharegroup_label: string;
sharegroup_uuid: string;
share_group_label: string;
share_group_uuid: string;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

APIs seem to be returning sharegroup_label and sharegroup_uuid. I've posted a question in the APISpec for clarification

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Verified: The api returns sharegroup_label and sharegroup_uuid

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Oct 23, 2025
@harsh-akamai harsh-akamai added Approved Multiple approvals and ready to merge! Private Image Sharing Related to Private Image Sharing feature and removed Images Relating to Images Ready for Review labels Oct 24, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 3 failing tests on test run #9 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
3 Failing844 Passing12 Skipped37m 49s

Details

Failing Tests
SpecTest
firewall-landing-page.spec.tsCloud Manager Cypress Tests→confirms Firewalls landing page empty state is shown when no Firewalls exist » lists all Firewalls
create-firewall.spec.tsCloud Manager Cypress Tests→create firewall » "before all" hook for "creates a firewall without a linode"
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/firewalls/firewall-landing-page.spec.ts,cypress/e2e/core/firewalls/create-firewall.spec.ts,cypress/e2e/core/linodes/clone-linode.spec.ts"

@harsh-akamai harsh-akamai merged commit a080bd8 into linode:develop Oct 27, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Oct 27, 2025
@harsh-akamai harsh-akamai deleted the UIE-9311-add-endpoints-to-images branch October 27, 2025 06:15
shagufa-akamai pushed a commit to shagufa-akamai/manager that referenced this pull request Dec 11, 2025
…aregroups/members` and `/v4/images/sharegroups/tokens` (linode#12984)

* upcoming: [UIE-9311] - Add API endpoints and types for `/v4/images/sharegroups`

* Add validation schema

* upcoming: [UIE-9343] - Add API endpoints and types for `/v4beta/images/sharegroups/members` and `/v4beta/images/sharegroups/tokens`

* rename sharegroup.ts

* add named arguments for functions with more than 2 parameters

* pr split + validation schema separation

* PR feedback @pmakode-akamai

* Added changeset: Add endpoints for `/v4/images/sharegroups/members` and `/v4/images/sharegroups/tokens`

* Added changeset: Add validation schemas for creating and updating Sharegroup Members and Tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! Private Image Sharing Related to Private Image Sharing feature

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants