Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace stripping for functions/actions. #365

Closed
andrueastman opened this issue Mar 30, 2023 · 4 comments · Fixed by #369
Closed

Namespace stripping for functions/actions. #365

andrueastman opened this issue Mar 30, 2023 · 4 comments · Fixed by #369
Assignees
Labels
priority:p1 High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days type:bug A broken experience type:regression A bug from previous release
Milestone

Comments

@andrueastman
Copy link
Member

Related to

Stripping a specific prefix from namespace from Functions and Action can lead to invalid paths.

Following the discussion in #348 (comment)

Does it make sense to only use aliasing for TypeSegments and strip the namespace for Functions/Actions? I'm not sure if there are cases where a function/action fails if the entire namespace is stripped off?

cc @baywet @irvinesunday

@baywet

This comment was marked as outdated.

@baywet
Copy link
Member

baywet commented Mar 30, 2023

After further discussion here is an updated reference

flowchart TD
     A[generate path segment] ---> B{EnableUnqualifiedCall?};
     B -- True --> C[use type name as segment];
     B -- False --> E{Is namespace aliased?};
     E -- True --> F[project alias to segment];
     E -- False --> G[project namespace to segment];
     F ----> H[Add type name to segment];
     G ----> H[Add type name to segment];
     H ----> I{Is namespacePrefixToStripForMethodPaths empty?};
     I --  True --> D[Path segment generated];
     I -- False --> J{Does the segment contain more than one dot?};
     J --  True --> D[Path segment generated];
     J -- False --> K[Strip prefix from generated segment];
     K ----> D[Path segment generated];
     C ----> D[Path segment generated];
Loading

@baywet
Copy link
Member

baywet commented Mar 30, 2023

See the additional "Does the segment contain more than one dot?" question, which could be roughly translated to "is the method under a sub namespace?"

@baywet baywet added this to the OData:1.4 milestone Mar 30, 2023
@baywet baywet added type:bug A broken experience priority:p1 High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days type:regression A bug from previous release labels Mar 30, 2023
@baywet
Copy link
Member

baywet commented Mar 31, 2023

For anyone else reading this thread, I retract my comment about AGS and ICMs. Since those namespaces are not being aliased, the functions can only be used with their short name or their fully qualified name, not the aliased name. This effectively means there's a shortcoming in the metadata conversion process (this lib) which the SDKs rely on for their generation. We'll address the conversion fix and things should roll out to the service libs shortly after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p1 High priority but not blocking. Causes major but not critical loss of functionality SLA <=7days type:bug A broken experience type:regression A bug from previous release
Projects
None yet
3 participants