diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index a1230f3c37..a243e8cddc 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -22,7 +22,7 @@ RUN ./scripts/removeWorkspaceDependencies.sh packages/worker/package.json RUN jq 'del(.scripts.postinstall)' package.json > temp.json && mv temp.json package.json RUN ./scripts/removeWorkspaceDependencies.sh package.json -RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile --network-concurrency 1 # copy the actual code COPY packages/server/dist packages/server/dist diff --git a/lerna.json b/lerna.json index 505f313793..36a8c66beb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.33.5", + "version": "2.33.12", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/account-portal b/packages/account-portal index 607e3db866..8cd052ce82 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 607e3db866c366cb609b0015a1293edbeb703237 +Subproject commit 8cd052ce8288f343812a514d06c5a9459b3ba1a8 diff --git a/packages/builder/src/pages/builder/portal/users/users/index.svelte b/packages/builder/src/pages/builder/portal/users/users/index.svelte index 5a7e334c9c..9ecb42b6d3 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -71,7 +71,6 @@ ] let userData = [] let invitesLoaded = false - let tenantOwnerLoaded = false let pendingInvites = [] let parsedInvites = [] @@ -100,13 +99,9 @@ $: pendingSchema = getPendingSchema(schema) $: userData = [] $: inviteUsersResponse = { successful: [], unsuccessful: [] } - $: setEnrichedUsers($fetch.rows, tenantOwnerLoaded) + $: setEnrichedUsers($fetch.rows, tenantOwner) - const setEnrichedUsers = async rows => { - if (!tenantOwnerLoaded) { - enrichedUsers = [] - return - } + const setEnrichedUsers = async (rows, owner) => { enrichedUsers = rows?.map(user => { let userGroups = [] $groups.forEach(group => { @@ -118,7 +113,9 @@ }) } }) - user.tenantOwnerEmail = tenantOwner?.email + if (owner) { + user.tenantOwnerEmail = owner.email + } const role = Constants.ExtendedBudibaseRoleOptions.find( x => x.value === users.getUserRole(user) ) @@ -322,13 +319,22 @@ try { await groups.actions.init() groupsLoaded = true - pendingInvites = await users.getInvites() - invitesLoaded = true - tenantOwner = await users.getAccountHolder() - tenantOwnerLoaded = true } catch (error) { notifications.error("Error fetching user group data") } + try { + pendingInvites = await users.getInvites() + invitesLoaded = true + } catch (err) { + notifications.error("Error fetching user invitations") + } + try { + tenantOwner = await users.getAccountHolder() + } catch (err) { + if (err.status !== 404) { + notifications.error("Error fetching account holder") + } + } }) diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index a6d0564f7f..1439902b26 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -113,7 +113,10 @@ $: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) const forceFetchRows = async () => { + // if the filter has changed, then we need to reset the options, clear the selection, and re-fetch + optionsObj = {} fieldApi?.setValue([]) + selectedValue = [] debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) } const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => { diff --git a/packages/frontend-core/src/fetch/UserFetch.js b/packages/frontend-core/src/fetch/UserFetch.js index 902aa7edad..36f61542b5 100644 --- a/packages/frontend-core/src/fetch/UserFetch.js +++ b/packages/frontend-core/src/fetch/UserFetch.js @@ -30,11 +30,10 @@ export default class UserFetch extends DataFetch { async getData() { const { limit, paginate } = this.options const { cursor, query } = get(this.store) - let finalQuery - // convert old format to new one - we now allow use of the lucene format - const { appId, paginated, ...rest } = query || {} - finalQuery = utils.isSupportedUserSearch(rest) + // Convert old format to new one - we now allow use of the lucene format + const { appId, paginated, ...rest } = query || {} + const finalQuery = utils.isSupportedUserSearch(rest) ? query : { string: { email: null } } diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index 2206d49d9b..26c8a5c1c3 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -41,7 +41,7 @@ RUN chmod +x ./scripts/removeWorkspaceDependencies.sh RUN ./scripts/removeWorkspaceDependencies.sh package.json # Install yarn packages with caching -RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 \ +RUN yarn install --production=true --network-timeout 1000000 \ && yarn cache clean \ && apk del g++ make python3 jq \ && rm -rf /tmp/* /root/.node-gyp /usr/local/lib/node_modules/npm/node_modules/node-gyp diff --git a/packages/worker/Dockerfile b/packages/worker/Dockerfile index 4b708626f3..d5ce94ab36 100644 --- a/packages/worker/Dockerfile +++ b/packages/worker/Dockerfile @@ -24,7 +24,7 @@ COPY packages/worker/dist/yarn.lock . RUN ../scripts/removeWorkspaceDependencies.sh package.json -RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production=true --network-timeout 1000000 +RUN yarn install --production=true --network-timeout 1000000 # Remove unneeded data from file system to reduce image size RUN apk del .gyp \ && yarn cache clean