https://datahubproject.io logo
Join Slack
Powered by
# design-path-prefix
  • l

    little-megabyte-1074

    01/16/2024, 5:19 PM
    set the channel description: Channel to discuss technical design & implementation options to support custom path prefixes
  • l

    little-megabyte-1074

    01/16/2024, 5:21 PM
    Hi @silly-policeman-59428 & @billions-baker-82097! Thanks for your patience on getting this channel set up - I’ve included David & Chris from the core team to provide guidance as you start to look into implementation options for supporting path prefixes; we can pull in additional folks from the Core Team as needed
  • l

    little-megabyte-1074

    01/16/2024, 5:28 PM
    Also, please feel free to add members from your team!
  • c

    cuddly-lawyer-8990

    01/18/2024, 3:39 PM
    Hi. From the channel name I'm assuming this is channel is to discuss setting the baseurl or path prefix when installing datahub. If so, i literally started installing datahub for the 1st time on k8 yesterday using a reverse proxy and hit a brick wall because of it. If its the right channel, I'm happy to detail the issue (and some general ideas about fixes as this isnt the 1st tool I've come across while installing stuff on k8 that has the issue)
    l
    • 2
    • 8
  • o

    orange-gpu-90973

    01/23/2024, 3:56 PM
    Hi Team, we are using below config for GatewayRoute to rewrite urls and having prefix as /datahub. We tried to rewrite few of them too but for entities we are not able to add prefix via rewriting or subfilters. apiVersion: xxxxxxxxxxxxxxxxxxxxxxxxx kind: GatewayRoute metadata: name: datahub-frontend spec: backend: http://{{ .Release.Name }}-{{ .Values.global.frontend_host }}:{{ .Values.global.frontend_port }} rules: - configSnippet: | location ~* ^{{ .Values.global.datahub_path.prefix }} { add_header Cache-Control "no-cache,no-store"; proxy_http_version 1.1; proxy_set_header Authorization $user_token; rewrite {{ .Values.global.datahub_path.prefix }}/(.*) /$1 break; rewrite {{ .Values.global.datahub_path.prefix }}(.*) /$1 break; proxy_set_header Accept-Encoding ""; proxy_pass $backend; sub_filter_once off; sub_filter_types *; sub_filter '/assets/' '{{ .Values.global.datahub_path.prefix }}/assets/'; sub_filter '/authenticate' '{{ .Values.global.datahub_path.prefix }}/authenticate'; sub_filter '/login' '{{ .Values.global.datahub_path.prefix }}/logIn'; sub_filter '/logOut' '{{ .Values.global.datahub_path.prefix }}/logOut'; sub_filter '/signup' '{{ .Values.global.datahub_path.prefix }}/signUp'; sub_filter '/api/graphiql' '{{ .Values.global.datahub_path.prefix }}/api/graphiql'; sub_filter '/user' '{{ .Values.global.datahub_path.prefix }}/user'; sub_filter '/search' '{{ .Values.global.datahub_path.prefix }}/search'; sub_filter '/dataset' '{{ .Values.global.datahub_path.prefix }}/dataset'; sub_filter '/api/v2/graphql' '{{ .Values.global.datahub_path.prefix }}/api/v2/graphql'; sub_filter '/track' '{{ .Values.global.datahub_path.prefix }}/track'; sub_filter '/openapi/' '{{ .Values.global.datahub_path.prefix }}/openapi/'; proxy_redirect / {{ .Values.global.clusterExternalUrl }}{{ .Values.global.datahub_path.prefix }}/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - configSnippet: | location ~* ^(/assets|/authenticate|/signup|/api/v2/graphql|/track|/openapi|/user|/dataset)(?:/(.*))$ { # TODO: remove this when we will completely fix all redirection issues proxy_set_header Authorization $user_token; return 301 {{ .Values.global.clusterExternalUrl }}{{ .Values.global.datahub_path.prefix }}$uri$args; }
  • c

    cuddly-lawyer-8990

    01/29/2024, 4:49 PM
    Any thoughts or progress on this path issue. we keep running into issues basically with using these hardcoded routes (which is the only work around i found) as it clashes with other applications.
  • o

    orange-gpu-90973

    02/06/2024, 2:23 PM
    Hi team, We made changes for path-prefix in datahub-frontend and web-react, when we do gradlew build it is giving this kind of error, Task buildSrccompileJava FAILED #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java9 error: package com.linkedin.metadata.models.registry.config does not exist #12 20.10 import com.linkedin.metadata.models.registry.config.Entities; #12 20.10 ^ #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java10 error: package com.linkedin.metadata.models.registry.config does not exist #12 20.10 import com.linkedin.metadata.models.registry.config.Entity; #12 20.10 ^ #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java36 error: cannot find symbol #12 20.10 private MapString, Entity entityMap; #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java154 error: cannot find symbol #12 20.10 private ObjectNode buildEntitySchema(Entity entity, SetString aspectDefinitions, boolean isResponse) { #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java177 error: cannot find symbol #12 20.10 private ObjectNode buildEntityScrollSchema(Entity entity) { #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java211 error: cannot find symbol #12 20.10 private Optional<PairString, ObjectNode> generateEntityParameters(final Entity entity, SetString definitions) { #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java382 error: cannot find symbol #12 20.10 private ObjectNode buildListEntityPath(Entity entity, SetString parameterDefinitions) { #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java448 error: cannot find symbol #12 20.10 private ObjectNode buildSingleEntityPath(Entity entity, SetString parameterDefinitions) { #12 20.10 1 actionable task: 1 executed #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 /home/gradle/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java522 error: cannot find symbol #12 20.10 private ObjectNode buildSingleEntityAspectPath(Entity entity, String aspect) { #12 20.10 ^ #12 20.10 symbol: class Entity #12 20.10 location: class OpenApiEntities #12 20.10 9 errors #12 20.10 #12 20.10 FAILURE: Build failed with an exception. #12 20.10 #12 20.10 * What went wrong: #12 20.10 Execution failed for task 'buildSrccompileJava'. #12 20.10 > Compilation failed; see the compiler error output for details. #12 20.10 #12 20.10 * Try: #12 20.10 > Run with --stacktrace option to get the stack trace. #12 20.10 > Run with --info or --debug option to get more log output. #12 20.10 > Run with --scan to get full insights. #12 20.10 #12 20.10 * Get more help at https://help.gradle.org #12 20.10 #12 20.10 BUILD FAILED in 19s #12 ERROR: process "/bin/sh -c ./gradlew datahub frontendbuild -x yarnTest -x yarnLint -x Test" did not complete successfully: exit code: 1 ------ commnad used to do gradlw build : ./gradlew datahub frontendbuild -x yarnTest -x yarnLint -x Test version used : v0.11.0 Tried doing gradlew build for frontend using above command in v0.12.0 & v0.12.1 but build is failing with same error
  • c

    cuddly-lawyer-8990

    02/15/2024, 11:25 PM
    any update on this?
  • o

    orange-gpu-90973

    02/21/2024, 8:58 AM
    Hi Team, As shown below PageRoutes is now const object instead of enum because we wanted to make it more configurable and it is not allowing us to do that, Can you please review it like if we go ahead with changes will that be accepted in PR? File: Global.ts const getPrefix = function (prefix) { return prefix || ''; } /* Default top-level page route names (excludes entity pages) */ export const PATH_PREFIX = getPrefix(
    /dfmanager
    ); const getRoot = function () { return PATH_PREFIX || '/' } export const PageRoutes = { /** * Server-side authentication route */ ROOT: getRoot(), AUTHENTICATE:
    ${PATH_PREFIX}/authenticate
    , SIGN_UP:
    ${PATH_PREFIX}/signup
    , LOG_IN:
    ${PATH_PREFIX}/login
    , RESET_CREDENTIALS:
    ${PATH_PREFIX}/reset
    , SEARCH_RESULTS:
    ${PATH_PREFIX}/search/:type?
    , SEARCH:
    ${PATH_PREFIX}/search
    , BROWSE:
    ${PATH_PREFIX}/browse
    , BROWSE_RESULTS:
    ${PATH_PREFIX}/browse/:type
    , DATASETS:
    ${PATH_PREFIX}/datasets
    , ASSETS:
    ${PATH_PREFIX}/assets
    , ANALYTICS:
    ${PATH_PREFIX}/analytics
    , POLICIES:
    ${PATH_PREFIX}/policies
    , SETTINGS_POLICIES:
    ${PATH_PREFIX}/settings/policies
    , PERMISSIONS:
    ${PATH_PREFIX}/permissions
    , IDENTITIES:
    ${PATH_PREFIX}/identities
    , INGESTION:
    ${PATH_PREFIX}/ingestion
    , SETTINGS:
    ${PATH_PREFIX}/settings
    , DOMAINS:
    ${PATH_PREFIX}/domains
    , DOMAIN:
    ${PATH_PREFIX}/domain
    , GLOSSARY:
    ${PATH_PREFIX}/glossary
    , SETTINGS_VIEWS:
    ${PATH_PREFIX}/settings/views
    , EMBED:
    ${PATH_PREFIX}/embed
    , EMBED_LOOKUP:
    ${PATH_PREFIX}/embed/lookup/:url
    , SETTINGS_POSTS:
    ${PATH_PREFIX}/settings/posts
    , }
  • a

    adventurous-dawn-19232

    03/05/2024, 11:54 AM
    hello team i am getting this error while running datahub without docker after cloning the datahub try to build got this error how to resolve this sivasankar@w1:~/datahub$ ./gradlew build To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/8.0.2/userguide/gradle_daemon.html#sec:disabling_the_daemon. Daemon will be stopped at the end of the build Configuration on demand is an incubating feature. > Task buildSrccompileJava /home/sivasankar/datahub/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java294 error: cannot find symbol .flatMap(entity -> generateEntityParameters(entity, definitions).stream()) ^ symbol: method stream() location: class Optional<PairString,ObjectNode> /home/sivasankar/datahub/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java296 error: cannot find symbol parametersNode.setAll(entityNode.right()); ^ symbol: method right() location: variable entityNode of type Object /home/sivasankar/datahub/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java297 error: cannot find symbol return entityNode.left(); ^ symbol: method left() location: variable entityNode of type Object /home/sivasankar/datahub/buildSrc/src/main/java/io/datahubproject/OpenApiEntities.java299 error: incompatible types: inference variable T has incompatible bounds .collect(Collectors.toSet()); ^ equality constraints: String lower bounds: Object where T is a type-variable: T extends Object declared in method TtoSet() 4 errors > Task buildSrccompileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task 'buildSrccompileJava'. > Compilation failed; see the compiler error output for details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 10s 1 actionable task: 1 executed