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

Flaky QuickDebugSourceInstallingCompilationParticipantTest #3354

Merged
merged 5 commits into from
Feb 21, 2025

Conversation

LorenzoBettini
Copy link
Contributor

Closes #3350

@LorenzoBettini LorenzoBettini added this to the Release_2.38 milestone Feb 17, 2025
Copy link

github-actions bot commented Feb 17, 2025

Test Results

  6 452 files  + 4    6 452 suites  +4   3h 8m 56s ⏱️ + 11m 19s
 43 197 tests ± 0   42 613 ✅ + 1    584 💤 ±0  0 ❌ ±0 
170 003 runs  +23  167 666 ✅ +21  2 337 💤 +3  0 ❌ ±0 

Results for commit cb7a990. ± Comparison against base commit 1614e77.

♻️ This comment has been updated with latest results.

@LorenzoBettini
Copy link
Contributor Author

@cdietrich it still fails.. I'm not planning to work on that any longer.. I'd go back to my original alternatives mentioned in the issue

@cdietrich
Copy link
Contributor

hmmm running on battery makes it fail for me again .... :(

@cdietrich
Copy link
Contributor

and the more logging i add the less i can reprodcue

@cdietrich
Copy link
Contributor

cdietrich commented Feb 17, 2025

could track it down to org.eclipse.xtext.generator.trace.LineMappingProvider.getLineMapping(AbstractTraceRegion)
here null will be returned. still hard to reproduce

but wont that indicate trace file reading is broken (or even creating)

@cdietrich
Copy link
Contributor

of course now i can no longer reproduce at all ....

LorenzoBettini and others added 3 commits February 19, 2025 08:31
com.google.common.io.ByteStreams.toByteArray(InputStream) says

"Java 9+ users: use in#readAllBytes() instead."
@@ -69,7 +69,7 @@ public AbsoluteURI getPath() {

@Override
public long getTimestamp() {
return file.getLocalTimeStamp();
return file.getModificationStamp();
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I'm not sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

The underlying assumption seems to be that the code executes too fast.
Would it fail if we wait for one second in the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@szarnekow I haven't tried, but the Javadoc of getLocalTimeStamp, https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fresources%2FIResource.html&anchor=getLocalTimeStamp(), also says

Note that due to varying file system timing granularities, this value is not guaranteed to change every time the file is modified. For a more reliable indication of whether the file has changed, use getModificationStamp().

It sounds like the method is quite unreliable...

Copy link
Contributor

Choose a reason for hiding this comment

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

i guess a sleep of 1s would also help. but am not sure if other tests might be affected too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm I'm not sure.

@szarnekow what do you think is wrong with getModificationStamp?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's not a timestamp and thus should not be used to implement getTimestamp

It might be fine to rename getTimestamp to getModification stamp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a timestamp and thus should not be used to implement getTimestamp

It might be fine to rename getTimestamp to getModification stamp

@szarnekow OK, I'll do that later.

That would be API breakage but I guess for that wouldn't be a problem because it's an internal type, would it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@szarnekow renamed it (7cc6b0d)

Co-authored-by: Sebastian Zarnekow <Sebastian.Zarnekow@gmail.com>
@LorenzoBettini LorenzoBettini merged commit b9963ee into eclipse-xtext:main Feb 21, 2025
9 checks passed
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.

QuickDebugSourceInstallingCompilationParticipantTest is too often flaky on macOS
3 participants