-
Notifications
You must be signed in to change notification settings - Fork 78
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
Set the fides dev environment to the prod
security environment
#2588
Conversation
Passing run #194 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
…osed to only when the CLI is invoked
I got all of the tests passing locally but then it looks like they're not passing in CI or when building the test image locally and running it that way...will trouble shoot more locally |
if I log into a container locally and run |
Found the problem in the logs....
So it looks like the order of execution for the fixtures might be wrong....the token gets created at the beginning, but then gets reset because its used to reset the db, so then becomes invalid. So this fixture needs to get called twice |
Is it |
I'm trying to wrap all of the resets as needed....getting closer Figured out was actually a cache issue 🤦 it was grabbing the old auth header 🤔 |
I've once again confirmed that it works perfectly if you have a credentials file before running the tests, but if it tries to create one during the test it doesn't work. I'm not sure why this happens. Going to try using pytest tricks to generate one as a non-fixture? Despite all of the logs showing that one gets created just fine during the tests 🤔 |
…sible, add a login command before running pytest for ctl
Codecov ReportBase: 85.74% // Head: 86.23% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2588 +/- ##
==========================================
+ Coverage 85.74% 86.23% +0.49%
==========================================
Files 285 289 +4
Lines 15477 15784 +307
Branches 1945 1985 +40
==========================================
+ Hits 13270 13611 +341
+ Misses 1832 1785 -47
- Partials 375 388 +13
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Thanks for explaining the difference between docker run
and docker exec
and the value of the change 👍🏽 👍🏽 when spinning up the environment in Docker I am not able to run any commands for some reason, including the fides user login ...
- installing the branch locally in a virtual env doesn't seem to have the same issue from what I can see 🤔
I accidently posted my comment in the issue instead of here. I'm seeing things similar to Steve. #2461 (comment) |
ah I'm a total rookie! Sorry for wasting y'alls time, the exec for the interactive shell needs to have the Added and confirmed working, please try again 🙏 |
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.
Tried out a few of these successfully! Thanks for the guidance in testing as well 🙌🏽
The only other thing that might be helpful is if we wanted to add something around running pytest locally and needing to log in to the readme or similar? Can imagine people hitting some snags
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.
This worked great for me locally 👍 I just left a few optional nits
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.
Worked for me now also. I agree with @SteveDMurphy that we may want to add something to the readme or somewhere like it about logging in. The ctl tests worked fine for me when I logged in, but I only knew to do that from the PR instructions.
Co-authored-by: Andrew Jackson <[email protected]>
@sanders41 seeing codecov failures here |
Looks like they passed. Did you have to rerun for them to pass? |
I see it now. This is the flaky issue I mentioned. It has been terrible this week. Looks like adding a token is helping, but not completely preventing the issue. I restarted the failed tests, they usually pass after a rerun. |
it failed the codecov upload, merging |
Closes #2461
Code Changes
fides.toml
docker compose run
->docker exec
where possible. This not only saves resources (one less container running!) but allows multiple commands to run in the same environment (i.e. when something gets run viadocker compose run
, it is ephemeral and can't be used by following commandsctl
tests to passauth_header
to thefides db
CLI command requestsSteps to Confirm
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
With the change in this PR, a CLI login will be required during development, as the new default is
prod
for the security env.