jenkinsci / sumologic-publisher-plugin

Jenkins Plugin to send information to Sumo Logic.
https://plugins.jenkins.io/sumologic-publisher/
Apache License 2.0
5 stars 6 forks source link

fix for sumoupload failing when used from agent #40

Closed sumoanema closed 1 year ago

sumoanema commented 1 year ago

Issue was reported here : https://github.com/jenkinsci/sumologic-publisher-plugin/issue…s/39 In previous release proxy feature was enabled which needed proxy related parameters from jenkins instance. We were getting this instance from localContext, assuming that the plugin code will run only on build-in node, this caused a failure when this code was executed from remote context (agent). As part of the fix, jenkins instance is now fetched from another method which will make remote call to jenkins to get the proxy related parameters if running from remote context.

Testing done

Testing involved a setup with an agent node. After the fix was deployed, did not see any jenkins.instance missing error.

### Submitter checklist
- [X] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [X] Ensure that the pull request title represents the desired changelog entry
- [X] Please describe what you did
- [X] Link to relevant issues in GitHub or Jira
- [X] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue