-
Notifications
You must be signed in to change notification settings - Fork 85
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
Issue 421 - option to use Earthdata User Acceptance Testing (UAT) system #426
Issue 421 - option to use Earthdata User Acceptance Testing (UAT) system #426
Conversation
was getting this error: earthaccess/search.py:91: error: Item "None" of "Response | None" has no attribute "text" [union-attr]
Daniel and I discussed integration testing strategy here. Since UAT tests could be more flaky than PROD tests, we decided we will write only unit tests for this PR (plus one sample integration test) and address the problem of flaky tests in another effort. I'll link the new issue to this one. |
And with regard to unit tests, we discussed creating a new module which holds all UAT unit tests in the test suite, instead of duplicating+modifying the existing tests within the existing modules. |
Co-authored-by: Chuck Daniels <chuck@developmentseed.org> Co-authored-by: Daniel Kaufman <danielfromearth@users.noreply.github.com>
@danielfromearth @chuckwondo sorry for the delay pushing this up. I just forgot 😊 |
I'm not sure that's a valid test of the client ID, as I believe your unit tests simply mock responses, but please correct me if I'm wrong (I haven't looked at all of your relevant unit tests to confirm this). If that's the case, then you may need to make use of |
Upon further inspection, I'm inclined to believe that we can completely eliminate the client ID. What makes me believe this is that, on the main branch, I ran all integration tests, and I got 9 failures, which I believe are to be expected when running locally (I recall this from a previous topic of discussion during a "hack day"). I then removed all uses of client ID throughout the entire codebase, reran the integration tests, and got identical results. There are many tests that download files, and all succeeded without the client ID (other than the ones that also failed with the client ID). I believe the only case for requiring a client ID is for a web app that requires redirection after login. For EDL to know where to redirect the user, you must supply a client ID and the registered app with that client ID must be configured with a redirect URL. This is not the case for However, since I'm not completely confident in my line of thinking here (even though test results seem to point in this direction), I have written email to support@earthdata.nasa.gov to get a definitive answer for us. |
Right, the unit tests mock responses. What I ran for this test was not a unit test; instead, I manually ran earthaccess in a Python kernel to login and download files — for my case, TEMPO data granules — from UAT. And then manually confirmed that the downloaded files were the expected files. |
@mfisher87, @chuckwondo, would you be able to help address the new readthedocs failures that have cropped up after merging |
@danielfromearth, take a look at the details of the failure: https://readthedocs.org/projects/earthaccess/builds/24322214/ You'll see this in the error output:
Given that, here's what I see in the code in your branch that would cause that warning: earthaccess/earthaccess/auth.py Lines 246 to 251 in aeaa280
Can you see the issue? In your docstring, you document a |
Thanks @chuckwondo for identifying the change needed! I was overthinking it, and didn't realize the other messages were simply "INFO" messages and not "warnings" 🤦 |
This comment was marked as outdated.
This comment was marked as outdated.
Do we want to remove SIT? |
I suggest we do.
Further, I think we should wait for me to get a reply from support@earthdata.nasa.gov regarding the client ID. Ideally, my hunch is correct, and we can simply remove all uses of the client ID. I did get an automated reply, so hopefully I'll get an answer this week. Sorry to hold this up further, but I'm not comfortable with leaving the questions surrounding the client ID unanswered. |
Nevermind I see you've looped him in to the related issue :) |
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.
Fantastic! I have only a handful of very minor grammatical suggestions (mostly around consistent "system" wording), and a couple of very minor code tweaks.
Co-authored-by: Chuck Daniels <chuck@developmentseed.org>
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.
Well done @danielfromearth!
Thank you @chuckwondo for your close look at all of the changes in this PR! |
GitHub Issue: #421
Description
This change:
PROD
) or User Acceptance Testing (UAT
).Auth.get_user_profile()
method and use of aclient_id
.Local test steps
Passed new UAT unit test
Overview of integration done
Ran the following (with an ID for a TEMPO mission collection in UAT substituted for
<UAT Collection ID>
):...and this generated an appropriate response, and successfully download the granule files.
Checklist
CHANGELOG.md
updated📚 Documentation preview 📚: https://earthaccess--426.org.readthedocs.build/en/426/