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

Add an option to ignore references #1253

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

tivervac
Copy link
Contributor

@tivervac tivervac commented Apr 24, 2024

Note: there might be another way to do this, as I found a few half-wired up places. However, I couldn't find one while investigating my use case, so I added somewhat simple code that implements my use case.

I'm trying to proxy an entire target platform through an artifact repository, i.e., Nexus. As such, I've defined the software sites in my target platform to point to proxies of my own server. Sadly, it seems like p2 software sites are not necessarily self-contained. Namely, they can contain references to other repositories.

In our case, this causes us to load 122 external repos. Strikingly, most of these come from disabled references. As such I've added some code that would skip over these, let me know if that isn't allowed for some reason.
Using only the enabled references, I still have 5 hits, much less, much faster, but not good enough. As such, I included a new backwards-compatible Software Site option that includes (or excludes) the traversal of references. In essence, this forces your software sites to be self-contained.

This ticket inspired another small ticket in p2.

Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

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

@tivervac thank you for the PR that looks like a useful improvement, I added some comments. Also note that a corresponding change would be required in Tycho to support the new attribute.

@HannesWell
Copy link
Member

Using only the enabled references, I still have 5 hits, much less, much faster, but not good enough.

That's a good catch. Disabled references should not be considered.

@tivervac
Copy link
Contributor Author

@laeubi The build here seems to fail. Do you know what's going on? Also, what's the difference between continuous-integration/jenkins/pr-head and Jenkins?

@laeubi
Copy link
Contributor

laeubi commented Apr 26, 2024

That looks strange an I have never seen this error before in PDE ... but the Github UI suggest that there are recent changes in the master branch, can you try to rebase your changes an current master if it solves the issue?

Beside that "continuous-integration/jenkins/pr-head" is the actual Jenkinsjob and "Jenkins " is the github action integration status check on Github level.

@HannesWell
Copy link
Member

@laeubi The build here seems to fail. Do you know what's going on? Also, what's the difference between continuous-integration/jenkins/pr-head and Jenkins?

Looking at the failing tests it seems like new attribute somehow shows up in existing test-cases altough it should not be persisted if it's value is the default.
I suggest you debug the failing cases in your IDE as JUnit Plug-in test and check what's going on.

@tivervac
Copy link
Contributor Author

@laeubi The build here seems to fail. Do you know what's going on? Also, what's the difference between continuous-integration/jenkins/pr-head and Jenkins?

Looking at the failing tests it seems like new attribute somehow shows up in existing test-cases altough it should not be persisted if it's value is the default. I suggest you debug the failing cases in your IDE as JUnit Plug-in test and check what's going on.

Thanks, when I asked the question, the build was failing in a weird way. Now it's recognizable that these are test failures.

@laeubi
Copy link
Contributor

laeubi commented Apr 29, 2024

@tivervac I think the tests needs adjustments now because they supply a new completion e.g. here:

There should not be any proposals at index 61. Following proposals found: [includeReferences]

So I think it fair enough to simply make the test assume that new attribute now (what ever it will be named).

Adds
- The UI checkbox and corresponding help section
- Syntax (highlighting and autocomplete) for the .target source editor
- Doesn't serialize the default state to keep legibility
Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

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

Looks good for me!

Copy link

Test Results

   291 files  ±0     291 suites  ±0   56m 28s ⏱️ - 5m 10s
 3 526 tests ±0   3 468 ✅ ±0   58 💤 ±0  0 ❌ ±0 
10 875 runs  ±0  10 698 ✅ ±0  177 💤 ±0  0 ❌ ±0 

Results for commit 05b656f. ± Comparison against base commit 692af00.

@laeubi laeubi merged commit b47b6af into eclipse-pde:master Apr 30, 2024
17 checks passed
tivervac added a commit to tivervac/eclipse.pde that referenced this pull request May 2, 2024
merks pushed a commit that referenced this pull request May 2, 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.

4 participants