-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
OSM Teams integration #5575
base: develop
Are you sure you want to change the base?
OSM Teams integration #5575
Conversation
0652c54
to
f015720
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A text under Sync with OSM Teams reads, “Authorize Tasking Manager to…”. The button text reads "Authenticate OSM Teams," and the popup displays "OSM Teams authentication successful" on success. To maintain consistency, could we update the button text to match the message displayed on success or vice versa?
We noticed that adding a member to the team was possible via a join request. To avoid any unexpected issues, I think we should consider disabling all feature implementations related to modifying the members/managers list of a team that has been synced with OSM Teams. Since the sync is one-way, we’d want to ensure that any modifications to the members list for a team synced with OSM Teams are only done through the OSM Teams portal. Might as well create another team type for OSM Teams team on the backend.
Should we also update the user interface to add a visual clue for team managers indicating that modifying the members is only available through the OSM Teams portal? Although there is already a text "Synced with OSM Teams" under members, clarifying that modifying the members is only available through the OSM Teams portal would be helpful. This would help prevent any confusion and ensure that team managers know the restrictions.
Users who could not be synced with the team due to their account being unavailable on the Tasking Manager are not displayed. Could you add this information to the user interface? Otherwise, it will be hard for managers to know who are the ones that weren’t imported.
Could you also add some info/docs on what the callback URL should be while creating an app on OSM Teams?
I think it would be enough to switch the team to be "invite only" after the first osm teams sync, and disable the change later. What do you think?
I improved the text. Let me know if it is good that way.
I've added it too
The callback url should be |
@HelNershingThapa this is done now. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@willemarcel - could you also add a field type in DB to track OSM teams? May be include one more option in |
@willemarcel, could you also add test cases for the changes made? We've been focusing on test coverage lately to ensure the code is as reliable and bug-free as possible. We'd love it if you added test cases for your PR to help us achieve our goal. |
acfdf31
to
af8dbcb
Compare
af8dbcb
to
cb57994
Compare
@ramyaragupathy @HelNershingThapa I've added a new team join method named OSM_TEAMS. I've updated the UI of the team membership page with that new condition too. I also added the tests and rebased it with The build is failing in the CI, but I don't know the reason... |
It seems that the build failure might be connected to a potential conflict in the sequence of CSS bundle creation. I came across a relevant StackOverflow comment that discussed a similar problem. However, I currently don't have a specific solution or workaround to address the issue we're looking at. |
hi @willemarcel. Just checking in, have you been able to debug the issue? |
@HelNershingThapa The build works on my machine... Could you check if you can build it too? |
The build gets generated on my machine too; with the same warnings though. |
@eternaltyro anything that we have to configure in our CI setup? cc @willemarcel @HelNershingThapa |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The build passed successfully upon removing the commit responsible for implementing lazy loading for routes in the try/5575-without-route-splitting branch. This has pointed toward the lazy loading implementation as a potential culprit behind the failure. We might need to investigate further into how the lazy loading implementation interacts with the build process, specifically the workaround commit 013dd36. On another note, I attempted to increase the heap size incrementally from 2GB to 8GB using |
In the past, I only used lazy loading in some components that had big size dependencies, like mapbox-gl and chartjs, some pages that were not used by most users, like the Management section, and some components used in many places, like the projects cards. Furthermore, as the application is cached by the service worker, the lazy loading is not helpful in most cases. |
@tsmock, could you offer some assistance here? You might have some insight into addressing the CSS issue we're encountering. |
Looking at https://app.circleci.com/pipelines/github/hotosm/tasking-manager?branch=try%2F5575-osm-teams-circleci (let me know if this is the wrong branch), it does look like an OOM issue in The "large" executors have 8g ram. I tested on a 4GB Raspberry Pi (nodejs 18, 8GB swapfile, node 18 with Using /usr/bin/time -f "%P %M" yarn build, the following data was obtained:
Just to double-check the memory usage, I wrote a systemd unit for building the TM, as follows # Put this in ${HOME}/.config/systemd/user/tasking-manager-build.service
[Unit]
Description=Build HOT TM with specific resource constraints
[Service]
Type=simple
# Point this at the frontend directory of the tm. %h is replaced by the user home directory.
WorkingDirectory=%h/workspace/tasking-manager/frontend
# Allows the build to work on Node 18, has to be commented out if using node 16
# Environment=NODE_OPTIONS=--openssl-legacy-provider
# Comment in/out depending upon whether or not you want to test with a specific node version
# Point it at the bin folder from a nodejs tarball
Environment=PATH=%h/node16/bin:/bin:/usr/bin
Environment=CI=true
Environment=GENERATE_SOURCEMAP=false
ExecStart=/usr/bin/yarnpkg build
MemoryAccounting=true
MemoryMax=2G
# Only needed to avoid having swap take care of higher usage than the max. This can be disabled if no swap is available.
MemorySwapMax=0
[Install]
WantedBy=default.target Pre-revert of route splitting, the service got killed when it ran out of memory. Increasing the For the CSS issue referenced, I'm looking into it. |
I've done a bit of investigating. Here are some possible solutions:
diff --git a/frontend/src/views/projectEdit.js b/frontend/src/views/projectEdit.js
index fb992c5ca..6ad3b9b27 100644
--- a/frontend/src/views/projectEdit.js
+++ b/frontend/src/views/projectEdit.js
@@ -6,10 +6,10 @@ import { FormattedMessage } from 'react-intl';
import messages from './messages';
import projectEditMessages from '../components/projectEdit/messages';
+import { PriorityAreasForm } from '../components/projectEdit/priorityAreasForm';
import { DescriptionForm } from '../components/projectEdit/descriptionForm';
import { InstructionsForm } from '../components/projectEdit/instructionsForm';
import { MetadataForm } from '../components/projectEdit/metadataForm';
-import { PriorityAreasForm } from '../components/projectEdit/priorityAreasForm';
import { ImageryForm } from '../components/projectEdit/imageryForm';
import { PermissionsForm } from '../components/projectEdit/permissionsForm';
import { SettingsForm } from '../components/projectEdit/settingsForm'; According to |
Having issue while trying to setup this PR locally My local environment variables: The ui shows for sync with osm teams while creating new team The authentication with But while trying to On backend side the token are being fetched and on frontend stored on the use browser but the auth fails to @willemarcel Can you provide me some insights what wrong over this. |
This PR allows users to get members and managers from an OSM Teams team.
How to test:
CLIENT_ID
andCLIENT_SECRET
. Use it to configure your TM instance, setting the following environment variables:Some screenshots
Team page
Team selection modal
Selected team details
Managers and members imported
Resync action button