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

Render and export emailable report of past reports #159

Closed
wants to merge 7 commits into from
Closed

Render and export emailable report of past reports #159

wants to merge 7 commits into from

Conversation

ignaciocabeza
Copy link

Hi @fescobar.

The changes I made were:

  • Added an extra parameter report to emailable-report/export and emailable-report/render. Default value: latest
  • Added new parameter to swagger spec.
  • Now emailable reports are saved with prefix {REPORT}_...html. <- I wonder if this change can break something. Maybe we shouldn't add a prefix when report it's the latest.

Solve #158

@fescobar
Copy link
Owner

@ignaciocabeza Did you test your changes in the docker container?
I think you should update the Allure repo in the docker files:

ARG ALLURE_REPO=https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline

@ignaciocabeza
Copy link
Author

I faced that issue when I was configuring the dev environment. There is some issue with the other url. I found a workaround quick with allure-framework/allure2#1198 (comment)

And yes, I tried with docker-compose -f docker-compose-dev.yml up using some reports that I have from my company.

Again, I wasn't sure about this last change:

Now emailable reports are saved with prefix {REPORT}_...html. <- I wonder if this change can break something. Maybe we shouldn't add a prefix when report it's the latest.

So, I will do more tests tomorrow (I live in East Australia Timezone) to be sure that the refactor is backward compatible.

Let me know if there is something that may break some other feature.

@fescobar
Copy link
Owner

@ignaciocabeza I have some checks in github actions. You should run those in your GH too. Push the new Allure repo url in the docker files, please. I will check your PR in detail when you passed those checks.
Thanks

@ignaciocabeza
Copy link
Author

Hi @fescobar,

I activated actions now. It was failing because some pylint error, I fixed it but it's still failing 😖.

This one are still failing and it comes from my changes:

allure-docker-api/app.py:1123:0: R0914: Too many local variables (17/15) (too-many-locals)

And the other pylint issues are from code that didn't change related on how do you use file without with.


About this:

Now emailable reports are saved with prefix {REPORT}_...html. <- I wonder if this change can break something. Maybe we shouldn't add a prefix when report it's the latest.

I refactor the code around emailable_report_path and now it's not adding a prefix when report is latest (to be backward compatible).

@fescobar
Copy link
Owner

@ignaciocabeza You can disable that rule for this specific method adding this:

def emailable_report_render_endpoint(): #pylint: disable=too-many-locals

Like here but with a different pylint rule
https://github.com/fescobar/allure-docker-service/blob/master/allure-docker-api/app.py#L851

@ignaciocabeza
Copy link
Author

Hi @fescobar,

I added that lint exception, but other lints no related to my change are still failing:

allure-docker-api/app.py:352:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
allure-docker-api/app.py:1176:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
allure-docker-api/app.py:1569:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

I can add those exceptions as well. Let me know.

@ignaciocabeza
Copy link
Author

@fescobar Done!

@ignaciocabeza ignaciocabeza closed this by deleting the head repository Feb 24, 2024
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