Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47370

Unable to override global envs after update to 2.1.4

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.1.6

      Description

      We have a global setting of JIRA_URL=jira.acme.com

      In some jobs we override this in the "Prepare an environment for the run" section to JIRA_URL=jira-staging.acme.com

       

      After upgrading to 1.24 this stopped working. The effective value as seen in shell scripts is jira.acme.com

       

      Setting the value in a "Inject environment variables" build step also has no effect.

      The only thing that has an effect is to set the value inside the shell script.

        Attachments

          Issue Links

            Activity

            Hide
            adovi_accenture arnaud dovi added a comment -

            Confirmed here, after reverting to 2.1.3 all the problems gone. 2.1.4 need more testing.

            Show
            adovi_accenture arnaud dovi added a comment - Confirmed here, after reverting to 2.1.3 all the problems gone. 2.1.4 need more testing.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Yes. Overrides is what has been fixed in 2.1.4

            Likely the behavior needs to be configurable, so that both 2.1.3 and 2.1.4 behaviors should be supported somehow.

             

            Show
            oleg_nenashev Oleg Nenashev added a comment - Yes. Overrides is what has been fixed in 2.1.4 Likely the behavior needs to be configurable, so that both 2.1.3 and 2.1.4 behaviors should be supported somehow.  
            Hide
            jbochenski Jakub Bochenski added a comment -

            Oleg Nenashev you mean that not being able to override a global env is the intended behavior?

            Show
            jbochenski Jakub Bochenski added a comment - Oleg Nenashev you mean that not being able to override a global env is the intended behavior?
            Hide
            adovi_accenture arnaud dovi added a comment - - edited

            Btw the issue does not limits to overriding variable, it is the main feature of injecting a new variable in the build process that fails for me

            At least I verified with a few println() that the code is still executed, but anything placed in the hashmap is not saved properly

             

            def map...
            if (!binding.variables.containsKey('VAR1') || binding.variables.get('VAR1').equals("")) {
            map['VAR1'] = TOTO;
            }
            return map;
            

             

             

            2.1.3 => VAR1=TOTO if VAR1 is undefined (expected)

            2.1.4 => VAR1=null if VAR1 is undefined (not expected)

            Show
            adovi_accenture arnaud dovi added a comment - - edited Btw the issue does not limits to overriding variable, it is the main feature of injecting a new variable in the build process that fails for me At least I verified with a few println() that the code is still executed, but anything placed in the hashmap is not saved properly   def map... if (!binding.variables.containsKey( 'VAR1' ) || binding.variables.get( 'VAR1' ).equals("")) { map[ 'VAR1' ] = TOTO; } return map;     2.1.3 => VAR1=TOTO if VAR1 is undefined (expected) 2.1.4 => VAR1=null if VAR1 is undefined (not expected)
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Created warning on Wiki: https://wiki.jenkins.io/display/JENKINS/EnvInject+Plugin 

            Probably I should depublish the release for now

            Show
            oleg_nenashev Oleg Nenashev added a comment - Created warning on Wiki: https://wiki.jenkins.io/display/JENKINS/EnvInject+Plugin   Probably I should depublish the release for now
            Hide
            adovi_accenture arnaud dovi added a comment -

            Yeah, I was looking for a way to lock the plugin to 2.1.3 and not being notified of newest updates of one plugin I guess it is not possible ? We use to update Jenkins always but have been forced to close connection to Jenkins update servers to not get the regression update. The downgrade button is nice with the plugin but I believe it misses a button like "Shutdown update notifications" per plugins

            Show
            adovi_accenture arnaud dovi added a comment - Yeah, I was looking for a way to lock the plugin to 2.1.3 and not being notified of newest updates of one plugin I guess it is not possible ? We use to update Jenkins always but have been forced to close connection to Jenkins update servers to not get the regression update. The downgrade button is nice with the plugin but I believe it misses a button like "Shutdown update notifications" per plugins
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/envinject-plugin/956436e4825b87f1a18d7a842be03873f669f6c6
            Log:
            Add compatibility notice for JENKINS-47364 and JENKINS-47370

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/envinject-plugin/956436e4825b87f1a18d7a842be03873f669f6c6 Log: Add compatibility notice for JENKINS-47364 and JENKINS-47370
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/envinject-plugin/05fffd291109514321bfbeab0fd62454ebb74f88
            Log:
            Merge pull request #127 from oleg-nenashev/2.1.4-compat-notice

            Add compatibility notice for JENKINS-47364 and JENKINS-47370

            Compare: https://github.com/jenkinsci/envinject-plugin/compare/03a66052daa3...05fffd291109

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/envinject-plugin/05fffd291109514321bfbeab0fd62454ebb74f88 Log: Merge pull request #127 from oleg-nenashev/2.1.4-compat-notice Add compatibility notice for JENKINS-47364 and JENKINS-47370 Compare: https://github.com/jenkinsci/envinject-plugin/compare/03a66052daa3...05fffd291109
            Hide
            adovi_accenture arnaud dovi added a comment -

            If you are not going to touch this issue anymore this is serious problem here, as administrator It's impossible to communicate to the team the DO NOT UPDATE EnvInject I have to ban all jenkins domains in the host Linux configuration level to stop Jenkins updates

            My suggestion (only if you are not going to improve this fix causing regressions)

            • branch the 2.1.3 version to a newer plugin called "Environment Injector Plugin (Old compatibility version)"

            So we can stick to this version, because I believe we need Jenkins updates while we dont need EnvInject updates anymore and want it as it is working actually, the fix you published for it was not affecting us.

            Show
            adovi_accenture arnaud dovi added a comment - If you are not going to touch this issue anymore this is serious problem here, as administrator It's impossible to communicate to the team the DO NOT UPDATE EnvInject I have to ban all jenkins domains in the host Linux configuration level to stop Jenkins updates My suggestion (only if you are not going to improve this fix causing regressions) branch the 2.1.3 version to a newer plugin called "Environment Injector Plugin (Old compatibility version)" So we can stick to this version, because I believe we need Jenkins updates while we dont need EnvInject updates anymore and want it as it is working actually, the fix you published for it was not affecting us.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I am going to make the change, not sure when. I am traveling since mid-October, and unfortunately I had no time to work on it. Everybody is welcome to submit a pull request.

            > as administrator It's impossible to communicate to the team the DO NOT UPDATE EnvInjec

            If your users are able to install and update plugins, IMHO you have a larger problem than EnvInject. Common users should have no access to plugin management if they ignore warnings in Web UI and changelogs. If you do not see the warning in the Update Manager on your instance, let me know.

            > branch the 2.1.3 version to a newer plugin called "Environment Injector Plugin (Old compatibility version)"

            It cannot be easily done in such way due to the risk of binary conflicts. Anyway, I am going to improve the configuration and to at least offer the opt-out flag.

            Show
            oleg_nenashev Oleg Nenashev added a comment - I am going to make the change, not sure when. I am traveling since mid-October, and unfortunately I had no time to work on it. Everybody is welcome to submit a pull request. > as administrator It's impossible to communicate to the team the DO NOT UPDATE EnvInjec If your users are able to install and update plugins, IMHO you have a larger problem than EnvInject. Common users should have no access to plugin management if they ignore warnings in Web UI and changelogs. If you do not see the warning in the Update Manager on your instance, let me know. > branch the 2.1.3 version to a newer plugin called "Environment Injector Plugin (Old compatibility version)" It cannot be easily done in such way due to the risk of binary conflicts. Anyway, I am going to improve the configuration and to at least offer the opt-out flag.
            Hide
            fld Fabien LD added a comment -

            Got the same issue. Fixed reverting that plugin

            Show
            fld Fabien LD added a comment - Got the same issue. Fixed reverting that plugin
            Hide
            pjdarton pjdarton added a comment -

            This issue sounds very much like JENKINS-14437.

            Show
            pjdarton pjdarton added a comment - This issue sounds very much like JENKINS-14437 .
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The regression impact is properly documented && the plugin 2.1.4 is marked as incompatible, so it should minimize the impact on users. 2.1.3 is also available through archives.

            Although I understand all the possible frustration by plugin users, I decided to NOT work on this issue. The regression has been introduced by me by a fix created during the working time, and I cordially apologize for any inconvenience it caused. Taking the proper regression announcement my team decided to not fix the regression in foreseeable future, because it is focused on other much more important tasks around Jenkins stability. I have no time to work on it during my spare time, because I am focused on the Jenkins core maintenance and other community work. On the other hand, I will be happy to review and deliver pull requests if somebody proposes them.

            I would also like to highlight that the plugin is waiting for adoption for more than two years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

            Show
            oleg_nenashev Oleg Nenashev added a comment - The regression impact is properly documented && the plugin 2.1.4 is marked as incompatible, so it should minimize the impact on users. 2.1.3 is also available through archives. Although I understand all the possible frustration by plugin users, I decided to NOT work on this issue. The regression has been introduced by me by a fix created during the working time, and I cordially apologize for any inconvenience it caused. Taking the proper regression announcement my team decided to not fix the regression in foreseeable future, because it is focused on other much more important tasks around Jenkins stability. I have no time to work on it during my spare time, because I am focused on the Jenkins core maintenance and other community work. On the other hand, I will be happy to review and deliver pull requests if somebody proposes them. I would also like to highlight that the plugin is waiting for adoption for more than two years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance
            Hide
            ickersep ickersep added a comment -

            This seems to be fixed in 2.1.6

            Show
            ickersep ickersep added a comment - This seems to be fixed in 2.1.6
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            it's not

            Show
            oleg_nenashev Oleg Nenashev added a comment - it's not
            Hide
            flozano Francisco Lozano added a comment -

            We're heavily affected by this issue and can't upgrade from 2.1.3 because of it.

            Show
            flozano Francisco Lozano added a comment - We're heavily affected by this issue and can't upgrade from 2.1.3 because of it.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jbochenski Jakub Bochenski
              Votes:
              14 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated: