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

fix: raw text data for gcp #36

Merged
merged 15 commits into from
Dec 20, 2024
Merged

fix: raw text data for gcp #36

merged 15 commits into from
Dec 20, 2024

Conversation

frederik-encord
Copy link
Collaborator

No description provided.

@frederik-encord frederik-encord requested a review from a team as a code owner December 18, 2024 10:42
Copy link
Contributor

@Jim-Encord Jim-Encord left a comment

Choose a reason for hiding this comment

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

LGTM.
Would be good if US could be added to the regex

encord_agents/cli/test.py Show resolved Hide resolved
@@ -0,0 +1,3 @@
ENCORD_DOMAIN_REGEX = (
r"^https:\/\/(?:(?:cord-ai-development--[\w\d]+-[\w\d]+\.web.app)|(?:(?:dev|staging|app)\.encord\.com))$"
Copy link
Contributor

Choose a reason for hiding this comment

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

Also need us suffix 🇺🇸 . I think optional us suffix on dev|staging|app but may need to check:

i.e: https://app.us.encord.com/ is the path to the base app

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uh - well spotted. I was not aware of this tbh.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Jim-Encord fixed this now. Also added a unit test for the CORS regex just to make it clear what it should and shouldn't match.


if request.is_json:
frame_data = FrameData.model_validate(request.get_json())
else:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary or just defensive?
Is it worth having a try/ except around these conditions given that it could throw?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Might add a TODO to remove it by end of January where we'll remove the reverse feature flag. It's a protection for anyone who update the repo where it used to work. Those will have the reverse FF set until eo-jan. So upgrading like this should keep it working for them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added the TODO

@frederik-encord frederik-encord merged commit b575385 into main Dec 20, 2024
2 checks passed
@frederik-encord frederik-encord deleted the fix/form-data-to-text branch December 20, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants