Skip to content

Upgrader: add the migration of (filtered) var/attributes.xml#9449

Open
NicolaIsotta wants to merge 1 commit into
apache:masterfrom
NicolaIsotta:migrate-attributes
Open

Upgrader: add the migration of (filtered) var/attributes.xml#9449
NicolaIsotta wants to merge 1 commit into
apache:masterfrom
NicolaIsotta:migrate-attributes

Conversation

@NicolaIsotta

@NicolaIsotta NicolaIsotta commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Only fileobject elements which contains AuxiliaryConfiguration are retained, as other elements may not be safe to import

fixes #9410


^Add meaningful description above

Click to collapse/expand PR instructions

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. Was this PR correctly labeled, did the right tests run? When did they run?
  2. Is this PR squashed?
  3. Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

@mbien mbien added ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Platform [ci] enable platform tests (platform/*) labels Jun 18, 2026
Comment thread nb/o.n.upgrader/src/org/netbeans/upgrade/CopyFiles.java
Comment thread nb/o.n.upgrader/src/org/netbeans/upgrade/CopyFiles.java
Comment thread platform/core.ui/src/org/netbeans/core/ui/resources/layer.xml
Comment thread nb/o.n.upgrader/src/org/netbeans/upgrade/CopyFiles.java Outdated
@neilcsmith-net

Copy link
Copy Markdown
Member

This might be a good change. Need to keep an eye out if any project type is storing configuration that would be invalid on import.

I'm also curious what the implications of importing the project configuration with open-files is? Can this address #9443 ???

@mbien

mbien commented Jun 19, 2026

Copy link
Copy Markdown
Member

I'm also curious what the implications of importing the project configuration with open-files is? Can this address #9443 ???

this likely won't be sufficient. I think I checked that a while ago and it is also connected to cluster activation. #6588 (comment) (also see comment before that)

But worth a try, maybe it is a different mechanism which would force files open while recreating the Windows2Local config.

btw #9275 has a similar issue. On first start you might see exceptions since the config is read before the maven modules are loaded, next start works and will show the toolbar icons.

@neilcsmith-net

neilcsmith-net commented Jun 19, 2026

Copy link
Copy Markdown
Member

It should fire after the project is opened, so it might work. And if it doesn't, it could also be a reason not to make this change. So, testing required.

https://github.com/apache/netbeans/blob/master/ide/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java#L1385

https://github.com/apache/netbeans/blob/master/ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java#L524

EDIT : Triggered a dev-build. Do we have a better label for this? Platform is definitely not right for the nb cluster.

@mbien

mbien commented Jun 19, 2026

Copy link
Copy Markdown
Member

EDIT : Triggered a dev-build. Do we have a better label for this? Platform is definitely not right for the nb cluster.

i think platform label runs the build system tests. Haven't checked if there are better labels for it.

going to cancel and restart the build since this won't take the labels into account

@apache apache locked and limited conversation to collaborators Jun 19, 2026
@apache apache unlocked this conversation Jun 19, 2026
@neilcsmith-net

Copy link
Copy Markdown
Member

Sorry, missed the missing lock to retrigger the labels! Maybe Platform is fine here actually. I don't think those tests are filtered by labels at all? But I'd wrongly assumed we were filtering nb modules from the Maven published platform now. Guess that was a conversation we didn't resolve - https://central.sonatype.com/artifact/org.netbeans.modules/org-netbeans-upgrader

@neilcsmith-net

Copy link
Copy Markdown
Member

It looks like the project opening hits another path on startup rather than the one I linked. The data seems to be imported with this change, just not used, but it doesn't seem to cause any issues. I may re-look at the project opening if/when this is merged.

Only fileobject elements which contains Auxil[i]aryConfiguration are retained,
as other elements may not be safe to import
@NicolaIsotta

Copy link
Copy Markdown
Contributor Author

Yeah, can confirm the opened files, even if present in the migrated xml, are not used by the new ide...
But target servers of web projects, and selected maven profiles are actually carried over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Platform [ci] enable platform tests (platform/*)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Target servers of web project are not retained when upgrading

3 participants