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

[DOXIA-616] #34

Conversation

bertysentry
Copy link
Contributor

  • Fixed integration tests for *doxia-formats wrt fenced code blocks
  • Upgraded to Doxia 1.10-SNAPSHOT

* Fixed integration tests for **doxia-formats* wrt fenced code blocks
* Upgraded to Doxia 1.10-SNAPSHOT
@bertysentry
Copy link
Contributor Author

@michael-o Please note:

  • I upgraded to Doxia 1.10-SNAPSHOT (not sure you wanted this here, just let me know)
  • I wondered whether we should actually remove these Doxia markdown integration tests from maven-site-plugin, as we now have proper integration tests in doxia-module-markdown itself. This would prevent such situations where updates in one project (Doxia) requires to update the tests in another project (maven-site-plugin).

Please advise! :-)

@michael-o
Copy link
Member

Thanks, will look into it.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

Can this change wait until doxia 1.10 is released?

@michael-o
Copy link
Member

I won't merge before anyway because I never depend on snapshots.

@bertysentry
Copy link
Contributor Author

Okay, I will update the PR once Doxia 1.10 is released.

Do you guys have any opinion on the removal of markdown-specific integration tests (especially Doxia-specific) from maven-site-plugin, and reincorporate them in Doxia? This would avoid the chicken-egg situation like this.

@michael-o
Copy link
Member

In my opinion they need to bemoved because we test the entire site generation, and not Doxia specific modules. @hboutemy WDYT?

@elharo
Copy link
Contributor

elharo commented Jan 5, 2021

I think I agree that these should be moved. If they're only testing doxia functionality, and we can test them in doxia, then that's better. Or perhaps tests belong in both places. Doxia should be an implementation detail of maven-site-plugin. Any tests we have for HTML generation in sites should be independent of the HTML generator we're using.

@hboutemy
Copy link
Member

hboutemy commented Jan 5, 2021

is it causing issues, so they need to be removed?
if you're sure you have sufficient tests nowadays in Doxia, Doxia Sitetools and skins to check that a new feature in a Doxia module has the expected impact when used in a real site, you can drop this end to end test
but I feel that a few end to end tests remain useful to check that the full rendering bring expected result after execution of https://maven.apache.org/plugins/maven-site-plugin/history.html

@bertysentry
Copy link
Contributor Author

bertysentry commented Jan 5, 2021

@hboutemy We will keep some integration tests in maven-site-plugin that involve doxia-module-markdown. I want to remove specific Doxia tests (like "quotes were mistakenly removed", or "code block must be surrounded with <div class="source">.

These can be properly tested in Doxia with unit tests, and also with integration tests. Where applicable, we use integration tests to invoke maven-site-plugin with the current version of Doxia and make sure the end-to-end chain works as expected.

I will submit a PR on Doxia to incorporate these specific tests (from maven-site-plugin) to doxia-module-markdown.

Watch for DOXIA-618

Edit: added reference to JIRA issue number

@bertysentry
Copy link
Contributor Author

Submitted PR for Doxia: apache/maven-doxia#52

Thank you!

* Removed Doxia-specific integration tests
* Added integration tests on the various document formats
* Added integration tests on macros processing
* Fixed broken integration tests on **doxia-formats** on Linux and MacOS
* Integration tests on macros are done on the SNIPPET macro from a common Java source file
@bertysentry
Copy link
Contributor Author

Okay, PR has been updated as below:

  • Removed Doxia-specific integration tests
  • Added integration tests on the various document formats
  • Integration tests on macros are done on the SNIPPET macro from a common Java source file

Please note that the builds on macOS with JDK11, 14 and 15 fail, but these failures are not related to this PR (master is failing the same way).

@hboutemy @elharo @michael-o Please review these changes. Thank you!

* Reverted Doxia version to 1.9.1
@bertysentry
Copy link
Contributor Author

Oh, last update: I reverted Doxia version to 1.9.1. MSITE integration tests will pass with both 1.9.1 and 1.10 (no more checks on specific Doxia formatting features).

@bertysentry
Copy link
Contributor Author

bertysentry commented Jan 14, 2021

More build failures: Connection timeout with www.w3.org, which is totally unrelated to this PR.

Edit: Things run smoothly on my fork. See https://github.com/bertysentry/maven-site-plugin/runs/1701505614?check_suite_focus=true

@elharo
Copy link
Contributor

elharo commented Jan 14, 2021

We really should resolve the CI issues before proceeding with this or any other changes.

@bertysentry
Copy link
Contributor Author

@elharo IMO there is no need to wait to merge this PR. This PR ensures the integration tests won't break when upgrading to Doxia 1.10.

The integration tests that currently fail are only for macOS width JDK 11, 14 and 15:

They are all ancient issues and completely unrelated to the changes in the integration tests to support Doxia 1.10.

Thanks.

@bertysentry
Copy link
Contributor Author

@elharo Any idea on how to retrieve the build.log files from GitHub Actions/Workflows? I must be missing something here, but I can't find any link to any downloadable artifact in GitHub Actions... 😅

@bertysentry
Copy link
Contributor Author

@hboutemy @michael-o @elharo Will you have a chance to review these changes? This ensures the maven-site-plugin integration tests don't break when upgrading from Doxia 1.9.1 to 1.10.

@elharo
Copy link
Contributor

elharo commented Jan 18, 2021

Before this can move further, someone needs to debug and fix the CI failures. That's likely not caused by this PR, but checking in when the CI is broken is never a good idea.

@bertysentry
Copy link
Contributor Author

@elharo We cannot access the integration test logs, how are we going to fix this?

@elharo
Copy link
Contributor

elharo commented Jan 18, 2021

It might need someone who has more permissions on the project. I'm not sure.

@bertysentry
Copy link
Contributor Author

I have full permissions on my fork, and it's running all GitHub Actions as well, and failing at the same place (macOS with JDK11, 14 and 15). But I can't find a way to access the files produced by the build (not even the plugin artifact).

@elharo
Copy link
Contributor

elharo commented Jan 18, 2021

Some though not all of the errors seem related to this:

: | [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.10.0-SNAPSHOT:site (default-cli) on project test: Error parsing '/home/runner/work/maven-site-plugin/maven-site-plugin/target/it/validate/src/site/fml/faq.fml': line [-1] Error validating the model: Connect to www.w3.org:80 [www.w3.org/128.30.52.100] failed: Connection timed out -> [Help 1]

It might be worth understanding why the test is trying to connect to www.3.org. I'm not sure it needs to do that.

@bertysentry
Copy link
Contributor Author

This was just a temporary network issue of GitHub Actions. If you re-run the workflow, you won't get these errors.

@bertysentry
Copy link
Contributor Author

Also, PR #35 just got merged to master 3 days ago, with the same CI failures.

@elharo
Copy link
Contributor

elharo commented Jan 18, 2021

That one wasn't merged by me. :-)

@bertysentry
Copy link
Contributor Author

One recurring error is:

Error: |        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.10.0-SNAPSHOT:site (default-cli) on project test: Error parsing '/home/runner/work/maven-site-plugin/maven-site-plugin/target/it/validate/src/site/fml/faq.fml': line [-1] Error validating the model: Connect to www.w3.org:80 [www.w3.org/128.30.52.100] failed: Connection timed out (Connection timed out) -> [Help 1]

It happens when the site:validate goal is invoked in the integration tests (in src/it/validate/pom.xml). Apparently, site:validate tries to download the specified XML schema to validate the source documents (FML and XDOC). On GitHub Actions, this appears to fail from time to time.

This is nothing too serious, IMO.

@bertysentry
Copy link
Contributor Author

@michael-o @hboutemy @elharo Friendly reminder that this PR is still waiting, and its content is not going to change with regards to the failed builds, which are caused by something else (master is failing the same builds the same way).

The more we wait, the more risk we have to get conflicting changes.

Thanks!

@michael-o
Copy link
Member

I won't be able to review before mid Feb due to circumstances here.

@slachiewicz
Copy link
Member

I'll look at it tomorrow

@bertysentry
Copy link
Contributor Author

Guys? I'm still waiting for this to be merged so I can move forward with more changes in Doxia. Your help is much appreciated 😉

@michael-o
Copy link
Member

Guys? I'm still waiting for this to be merged so I can move forward with more changes in Doxia. Your help is much appreciated 😉

As promised, I will pick up as soon as I can, but now Oracle quartely updates are waiting for me...

asfgit pushed a commit that referenced this pull request Jan 27, 2021
* Fixed integration tests for **doxia-formats* wrt fenced code blocks
* Removed Doxia-specific integration tests
* Added integration tests on the various document formats
* Added integration tests on macros processing

Closes #34
@slachiewicz slachiewicz self-requested a review January 27, 2021 20:56
Copy link
Member

@slachiewicz slachiewicz left a comment

Choose a reason for hiding this comment

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

@michael-o
Copy link
Member

Let me go through too...

@asfgit asfgit closed this in baba99a Jan 30, 2021
@michael-o
Copy link
Member

I squashed commits - looks good to me.
Only MacOS tests failed https://github.com/apache/maven-site-plugin/actions/runs/516170331
Our Jenkins is green https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-site-plugin/job/feature%252FDOXIA-616/

I was not able to reproduce this problem multiple times.

@bertysentry
Copy link
Contributor Author

Awesome, thank you guys! 😊

@bertysentry bertysentry deleted the feature/DOXIA-616-fix-site-integration-tests branch January 30, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants