You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2024/11/24 18:50:03 UTC

[PR] PP3: Improve verification process [netbeans-tools]

matthiasblaesing opened a new pull request, #72:
URL: https://github.com/apache/netbeans-tools/pull/72

   There were two separate concerns raised regarding the current verification process. These are the two relevant use-cases:
   
   Release a new plugin version
   --------------------------------
   
   The steps that are needed to release a new version of a plugin and get it into the plugin portal are:
   
   1. Author release the plugin to maven central
   2. For all NetBeans versions that the new version of the plugin shall be available, the author has to drop the verification for the current version of the plugin.
   3. The author requests the verification of the new version of the plugin for all target NB versions.
   4. 1. Verifier verifies the plugin
   5. 2. Verifier verifies the plugin
   
   The problem is, that between steps 2 and 5 the plugin will not be available in the IDE for installation. Neither the "current" version, nor the "new" version.
   
   To fix this 9ff6052a10e7c30e0c7ec881580c1c7f5eaae542 changes the work flow slightly to:
   
   1. Author Release the plugin to maven central
   2. The author requests the verification of the new version of the plugin for all target NB versions.
   3. 1. Verifier verifies the plugin
   4. 2. Verifier verifies the plugin
   
   The Portal only blocks "Request verification" if either the current NB-Version/Plugin-Version is already verified or there is another verification for this Plugin/NB-Version is already pending. The "current" version stays verified until step 4 is executed, then the new version becomes the "verified" version and the verification for the previous version is automatically dropped.
   
   This way there is no "dead" timeframe where no plugin version is available for installation.
   
   Release a new NetBeans version
   -----------------------------------
   
   For each plugin the author has to decide for which NB versions which Plugin version should be available. So after a NetBeans release each actively maintained plugin needs to get a new NB-Version/Plugin-Version verified.
   
   This can lead to delays until all plugins are available for installation on an updated NetBeans version. 
   
   0e90bd830d5495b6224cc07dfd9b55ec6c087ad7 proposes to change this to a mode. The idea is, that authors can "Request validation" for a new NetBeans version and that request is immediately granted if that plugin version is already verified for at least one NetBeans version. The idea:
   
   - the author is responsible for the general usability of the plugin
   - verifiers check that the plugin basicly does what is promised and behaves in a sane way and does no harm.
   
   The latter should not be affected by NetBeans updates and even if so, would be in the interest of the author not to expose that version to the new NetBeans version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2679520400

    @jkovalsky thank your for your intensive test! After looking through the code, I think I can verify both.
   
   - Possibility to create two verified plugin versions: I had covered the case for "normal" verification. There the code was already removing the verification for plugin versions that addressed the same NetBeans version, when the new verification was finally confirmed. This case was not implemented for the "verification is transfered" case. This was fixed.
   - Rebuilding catalogs on verification changes: On my test setup there was no cron job to rebuild the catalogs. The test setup was fixed for this. In addition I modified that PP3 code, and ensured, that at two more places the rebuilding of the catalogs was explicitly requested.
   
   The changes are pushed as [6baeb45](https://github.com/apache/netbeans-tools/pull/72/commits/6baeb4567ff7ff154b48106373a6092a5d8d6407) and the test setup updated accordingly.
   
   I'd appretiate another look.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2847994143

   @jkovalsky portal should work again. I also restored the option to login via github and via apache login. That way I was able to do "normal" verification. For that case the correct verification details are recorded (ok, looks a bit strage, that I'm listed twice in "Upload Files Button", version 1.1.1, NB version 11.3, but that are two different accounts).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2869903694

   Installation is done and I tested one of my plugins on NB26 and updated the list of verified NB version to 26. The verification was transferred correctly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "jkovalsky (via GitHub)" <gi...@apache.org>.
jkovalsky commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2627507517

   @matthiasblaesing, I tried to test the new flow, but [generation of plugin catalog for version 11.3](https://pp3.doppel-helix.eu/admin/catalog?version=11.3) seems to be broken resulting in `500 Internal Server Error`. Can you please take a look into the server log and explain the reason?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2627997102

   @jkovalsky sorry, the PHP setup was missing `php-zip` module. The modules is relevant for extraction of the `info.xml` file from the plugin `nbm`. Fixed now (only changed docker container, not the deployed code).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "jkovalsky (via GitHub)" <gi...@apache.org>.
jkovalsky commented on code in PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#discussion_r1965831265


##########
pp3/module/Application/src/Application/Controller/VerificationController.php:
##########
@@ -226,25 +250,62 @@ public function createAction() {
                 'action' => 'list'
             ));
         }
-        // create verification
-        $verification = new Verification();
-        $verification->setStatus(Verification::STATUS_REQUESTED);
-        $verification->setCreatedAt(new \DateTime('now'));
-        $verification->setPluginVersionId($nbvPvId);
-        $this->_verificationRepository->persist($verification);
-        // join it to nbVersionPluginVersion
-        $nbVersionPluginVersion->setVerification($verification);
-        $this->_nbVersionPluginVersionRepository->persist($nbVersionPluginVersion);
-        $verification->setNbVersionPluginVersion($nbVersionPluginVersion);
-        // generate requests for all verifiers
-        $verifiers = $this->_userRepository->findVerifier();
-        $verification->createRequests($verifiers, $plugin);
-        $this->_verificationRepository->persist($verification);
-        foreach($verification->getVerificationRequests() as $req) {
-            $req->sendVerificationMail($plugin);
+
+        $existingVerification = null;
+        foreach($nbVersionPluginVersion->getPluginVersion()->getNbVersionsPluginVersions() as $nvpv) {
+            if($nvpv->getVerification() != null && $nvpv->getVerification()->getStatus() == Verification::STATUS_GO) {
+                $existingVerification = $nvpv->getVerification();
+            }
+        }
+
+        if ($existingVerification == null) {
+            // create verification
+            $verification = new Verification();
+            $verification->setStatus(Verification::STATUS_REQUESTED);
+            $verification->setCreatedAt(new \DateTime('now'));
+            $verification->setPluginVersionId($nbvPvId);
+            $this->_verificationRepository->persist($verification);
+            // join it to nbVersionPluginVersion
+            $nbVersionPluginVersion->setVerification($verification);
+            $this->_nbVersionPluginVersionRepository->persist($nbVersionPluginVersion);
+            $verification->setNbVersionPluginVersion($nbVersionPluginVersion);
+            // generate requests for all verifiers
+            $verifiers = $this->_userRepository->findVerifier();
+            $verification->createRequests($verifiers, $plugin);
+            $this->_verificationRepository->persist($verification);
+            foreach ($verification->getVerificationRequests() as $req) {
+                $req->sendVerificationMail($plugin);
+            }
+            $this->flashMessenger()->setNamespace('success')->addMessage('Verification Requested.');
+        } else {
+            // Create a copy of the existing verification
+            $verification = new Verification();
+            $verification->setStatus($existingVerification->getStatus());
+            $verification->setCreatedAt($existingVerification->getCreatedAt());
+            $verification->setPluginVersionId($nbvPvId);
+            $this->_verificationRepository->persist($verification);
+            // join it to nbVersionPluginVersion
+            $nbVersionPluginVersion->setVerification($verification);

Review Comment:
   I am afraid that we need to check the version better, else this might result in two different plugin versions verified for one NetBeans version.
   
   Consider 3.0 verified for NB 11.2 and 3.1 verified for NB 11.3. Then you declare that 3.0 also works with NB 11.3 and make a mistake, forget about 3.1 and request verification of 3.0 with NB 11.3. Your request is auto-approved and catalog for NB 11.3 now contains both 3.0 and 3.1 versions of your plugin.
   
   Can you improve this code to prevent this from happening?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2869893164

   @jkovalsky thank you very much for your suggestions and testing. It is appreciated! I'll prepare the rollout.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing merged PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "jkovalsky (via GitHub)" <gi...@apache.org>.
jkovalsky commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2847383529

   I apologize it took so long to get back to this, but it seems like your staging Plugin Portal is down today. Can you please start it up @matthiasblaesing ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2852156684

   > @matthiasblaesing , I have successfully verified your fix for the transferred verification issue and partially also the second fix of the auto-rebuilding catalog. In order to consider it fully verified I would prefer if the plugin entry is updated after auto-approval and also if the plugin entry is removed from the catalog after its verification is dropped. I had to manually rebuild the catalogs as admin to see the changes.
   >
   > Is this some other configuration thing which can be fixed easily?
   
   Just checked: You might need to give it some time. All actions in the portal only set a flag in the DB that a catalog rebuild is required. Every five minutes a cronjob then checks if that flag is set and rebuilds the affected catalogs. I tested this tonight and it worked at that time.
    
   > And finally, when verification request is auto-approved, is it possible to include this action in the verification details?
   
   A - yeah that makes sense. I added that to the implementation. Have a look at "Upload Files Button".
   
   - Plugin version 1.1.1, NB Version 11.3 was verified normally
   - Plugin version 1.2, NB Version 11.2 was verified as a copy from NB Version 12.0
   
   The copy info is placed in the comment column and will be appended if verifier adds a custom comment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "jkovalsky (via GitHub)" <gi...@apache.org>.
jkovalsky commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2851021954

   @matthiasblaesing , I have successfully verified your fix for the transferred verification issue and partially also the second fix of the auto-rebuilding catalog. In order to consider it fully verified I would prefer if the plugin entry is updated after auto-approval and also if the plugin entry is removed from the catalog after its verification is dropped. I had to manually rebuild the catalogs as admin to see the changes.
   
   Is this some other configuration thing which can be fixed easily?
   
   And finally, when verification request is auto-approved, is it possible to include this action in the verification details?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] PP3: Improve verification process [netbeans-tools]

Posted by "jkovalsky (via GitHub)" <gi...@apache.org>.
jkovalsky commented on PR #72:
URL: https://github.com/apache/netbeans-tools/pull/72#issuecomment-2675033086

   I finally found some time on my way home from Prague today and tested the two improvements. I have to say that I like both modifications and agree that for plugin owners it will be a great relief. Not only I tested the main happy flows, but also some corner case such as:
   
   - if plugin has version 3.0 verified for NetBeans 11.2 and requests verification for its new version 3.1 in NetBeans 11.3, the verification is not auto-approved
   - if plugin has version 3.0 verified for NetBeans 11.2, request for verification of its new version 3.1 in NetBeans 11.3 was auto-approved, then verification request for version 3.1 in NetBeans 11.3 follow the old human interaction process and when that is approved the old version 3.0 is replaced by version 3.1
   
   In the code I would just suggest to introduce some login preventing from publishing two different versions in plugin catalog for 1 NetBeans version. Please see current state of NetBeans serial version uid generator plugin.
   
   Besides that I noticed that automatic re-generation of module catalogs was broken (or is not set), so I had to invoke it manually after approving some verification request. In addition to that I also spotted that verification details only contain creation records, but no approval records. I guess it is because I was using the Master GO 
   
   @matthiasblaesing, you have done a great job! If you address my version collision comment, I will be ready to approve your PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists