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

[HMA] Fix Create Exchange API Selector #1603

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

aryzle
Copy link
Contributor

@aryzle aryzle commented Jul 11, 2024

Summary

Fixes #1601 API Select in the Create Exchange form

also fixes issue with startup.sh script, devcontainer was failing before

Test Plan

before
image

after
image

@aryzle aryzle changed the title Fix Create Exchange API Selector [HMA] Fix Create Exchange API Selector Jul 17, 2024
Copy link
Contributor

@Dcallies Dcallies left a comment

Choose a reason for hiding this comment

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

Sorry for the incredibly slow review, I've been out on leave for the last week!

Thanks a ton for the help!

The only thing I'm unsure about is the change to the startup script. I thought the devcontainer settings would help with that. When you say it was failing, was this failing a clean rebuild in the created terminal window (and not running manually)?

I can ask @juanmrad since I'll be seeing him in person.

@@ -1,5 +1,5 @@
#!/bin/bash
set -e
export OMM_CONFIG=/workspace/reference_omm_configs/development_omm_config.py
MIGRATION_COMMAND=1 flask --app OpenMediaMatch.app db upgrade --directory /workspace/src/OpenMediaMatch/migrations
flask --app OpenMediaMatch.app run --debug
MIGRATION_COMMAND=1 flask --app src/OpenMediaMatch.app db upgrade --directory /workspace/src/OpenMediaMatch/migrations
Copy link
Contributor

Choose a reason for hiding this comment

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

@juanmrad - can you double check that this is correct? This script should be running with a working directory

Copy link
Collaborator

@juanmrad juanmrad Jul 26, 2024

Choose a reason for hiding this comment

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

Yes it should be running on the working directory. Where you having issues when running the shell script outside of dev container? or where you running it inside?

@aryzle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @juanmrad this was failing on the dev container startup

Running the postAttachCommand from devcontainer.json...

[4812 ms] Start: Run in container: /bin/sh -c /workspace/.devcontainer/startup.sh
Error: Could not import 'OpenMediaMatch.app'.

this is after opening vscode in the hasher-matcher-actioner dir and selecting "Reopen in Container"
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like I was able to repro on a whole new build 🤔. Not sure how this may have changed to cause the problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like Juan is convinced, lets land it. I'll re-test on windows just to make sure there's not any evil differences between different vscodes.

@Dcallies
Copy link
Contributor

If you are bored while I'm waiting for Juan's answer, a way to make this less fragile in the future would be to add a simple test (probably a new test) to hit the /ui/ blueprints.

Copy link
Contributor

@Dcallies Dcallies left a comment

Choose a reason for hiding this comment

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

@aryzle - Can you include more information about the error you were experiencing so we can make sure this is the right fix?

@Dcallies Dcallies merged commit 4427648 into facebook:main Aug 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hma][ui] Create exchange API selector borked
4 participants