youngmon/atlassian-qna huggingface dataset:
Spawn a process from a build that lives longer than the build itself
Asked by DevR:

Hi I need to spawn a process that lives longer than a task in a Bamboo stage. But since in bamboo the task does not completes the build hangs. I remember in Jenkins there is a way of handling this. The Build comes up with a status but a warning too "Process leaked file descriptors". Is this achievable in bamboo.


Answers:
author: Jason Monsorno
body: This is dangerous because you can't properly report back to Bamboo which then cannot provide status and would enable the possibility of running it multiple times concurrently; unless whatever you're calling has that protection in which case you are either disregarding some calls our Bamboo logs won't have to proper start time... or just properly handle concurrent calls.

If you have weighed the risks and still want to continue, I'd suggest calling your command from the script command. Depending on what OS you are using and what commands/tasks/programs you are calling it will be a bit different, you can make scripting calls to execute without returns or some programs allow what you want as a flag/option.
Bamboo JUnit test parser fails to find test results
Asked by Aleksey Vorona:

If I have a build running on the same instance it was running before, Bamboo fails to find (or recognize) the unit test results. I have tested that the test results exists (with a simple Script step doing ls -l right befire the JUnit test parser is called).

If I terminate the Bamboo agent Elastic instance and run the same plan again, JUnit test parser finds the test restults.

May be relevant: I am using Gradle


Answers:
author: ssetayeshfar
body: Hi Aleksey,

You seem to be experiencing this bug: <https://jira.atlassian.com/browse/BAM-12979>. The workaround for which at the moment is using a 'touch' command right before the JUnit task and maybe adding "sleep 5;" before the 'touch' command. (Please check this page as well: <https://answers.atlassian.com/questions/143550/junit-parser-cannot-find-the-results-od-build>.

Side Note: In cases that test results are somewhat produced from a script task that uses operations like copy or move, you should place the xml file in the repository for it to be checkout to your working directory and then use the parser directly.

Hope this helps!

Best,

Sepideh


author: Aleksey Vorona
body: As a workaround I have set an option to run builds on clean working directory. But would love to have a better solution.


Tags: junit
Is Eclipse connector 3.0.11 compatible with OnDemand?
Asked by Michael Wheelaghan:

I'm finding I can use Jira OnDemand but I get this error when registering the Bamboo OnDemand instance using the same details as Jira

Server returned malformed response

com.atlassian.theplugin.commons.remoteapi.RemoteApiLoginException: Server returned malformed response  
at com.atlassian.theplugin.commons.bamboo.api.LoginBambooSession.login(LoginBambooSession.java:132)  
at com.atlassian.theplugin.commons.bamboo.BambooServerFacadeImpl.testServerConnection(BambooServerFacadeImpl.java:99)  
at com.atlassian.connector.intellij.bamboo.IntelliJBambooServerFacade.testServerConnection(IntelliJBambooServerFacade.java:225)  
at com.atlassian.theplugin.idea.config.serverconfig.ProductConnector.connect(ProductConnector.java:35)  
at com.atlassian.theplugin.ConnectionWrapper.run(ConnectionWrapper.java:63)  
Caused by: org.jdom.input.JDOMParseException: Error on line 14: The element type "link" must be terminated by the matching end-tag "\</link\>".  
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)  
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:807)  
at com.atlassian.theplugin.commons.remoteapi.rest.AbstractHttpSession.retrievePostResponseInternalImpl(AbstractHttpSession.java:457)  
at com.atlassian.theplugin.commons.bamboo.api.LoginBambooSession.login(LoginBambooSession.java:94)  
... 4 more  
Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 174; The element type "link" must be terminated by the matching end-tag "\</link\>".  
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)  
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)  
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)  
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)  
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)  
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)  
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)  
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)  
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)  
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)  
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)  
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)  
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)  
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)  
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)  
... 7 more  


Answers:
author: jjaroczynski
body: Hello Michael,

There is no Connector version 3.0.11. Please double check your version number.

WRT to the error message, it suggests that you entered wrong Bamboo url. Please fix the url and it should work fine.

If you cannot make it work then feel free to raise a support request at <https://support.atlassian.com/browse/ECSP>

Cheers,  
Jacek


Tags: ide-connector
Maven package task not finding code in previously installed .jar
Asked by Jason Thiel:

First, this works locally on my command line. This is an extension to a previous question that went unanswered.

Here is what my tasks look like:

1. mvn package the jar.

2. mvn install the jar.

3. mvn package the war.

the package step fails due to compilation errors not finding classes that are in the jar.

Is my approach using 3 tasks wrong?

I did try separating this into 2 stages and having the .jar added as an artifact but I don't think that this is necessary. Since tasks execute serially, the jar should be in the bamboo mvn repo when the war is compiled.


Answers:
author: Jason Thiel
body: I had two issues. first, the install step was extranneous so i combined steps 1 and 2. I now do:

mvn install the .jar.

mvn package the .war.

The second problem i had was in the pom (i never showed it here). I had:

\<dependency\>

\<groupId\>com.blah\</groupId\>

\<artifactId\>jpa-data-access\</artifactId\>

\<version\>1.0\</version\>

\<scope\>test\</scope\>

\</dependency\>

Removing the test scope and leaving it to default resolved the issue.


author: Jason Thiel
body: Does anybody from Atlassian read these? What I am trying to do doesn't seem all that out of the ordinary but i have not found an example. I am putting a data model in a jar and then building the jar into a war. Seems commonplace. The war packaging simply cannot find the .jar previously built and installed.
Does this include in Spark (free) plan?
Asked by CH Naga Sai Krishna:

Can we do all the pipelining setup with Spart plan or do we have to upgrade this to Blaze(pay as you go) Plan?


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

I think that you may be in the wrong place though - Atlassian doesn't have "plans" with those names.
I'm not receiving verification emails from Atlassian
Asked by Dinabandhu Das:

Hi,

I've tried to set up a new account for BitBucket for my work and apparently have had the verification email sent, the email address is correct however I'm not receiving any verification emails?

I've tried re-sending the email a number of times and haven't received any of them.


Answers:
author: Caroline R
body: Hi, [@Dinabandhu Das](/t5/user/viewprofilepage/user-id/4711804), welcome to the community!

I confirmed there was no blocker on your address that could be causing a problem to receive our emails.

As I see you were able to create a Bitbucket Cloud account with the email you used to create this question, I believe everything is working as expected, is that correct?

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

jira
Reject commits based on certain conditions?
Asked by Aaron Patterson:

Hi, I want to have the ability to reject commits to our Bitbucket Cloud repository based on conditions we define - e.g. if somebody tries to commit code which has syntax errors we would run it through a linter at the time of commit and reject it.

With Git this could normally be accomplished via pre-receive hooks on the server, but I don't see a way to use those in Bitbucket Cloud.

Git also supports pre-commit hooks where this could be done on a local repository, but I don't know if there is a way in which we could implement that in our Bitbucket repository and then have it be "inherited" by existing cloned copies.

What are my options here?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi [@Aaron Patterson](/t5/user/viewprofilepage/user-id/4711640) , welcome to the community!

I understand that you would like a bitbucket cloud server-side pre-commit checker that would validate commits pushed to remote.

Unfortunately there is no such functionality in BB Cloud that would match the repo pre-commit hooks we all use \& love in Bitbucket server.

Here is the ticket <https://jira.atlassian.com/browse/BCLOUD-10471> to have the added to BB cloud. Please vote and lobby in your channels to get this implemented by the Atlassian BB Cloud team.

Best, Ulrich

comments: author: Aaron Patterson
body: Thanks Ulrich, I've added my vote in support of this feature!

I see that the feature has \~657 votes, is assigned to an inactive owner, and has been open without action from Atlassian for 7 years. That's quite a long time to ignore the expressed preference of hundreds of users.

What with this being a very basic feature supported by Git itself and by competitors like Github, this seems like a strong indicator that we should terminate our use of Bitbucket and switch to a competitor. Based on this we've decided to start evaluating our alternatives this week. Do you (or anyone) know of any resources that would assist us in migrating away from Bitbucket?


Tags: bitbucket-cloud

cloud
Internal bitbucket ssh acces issue
Asked by Dinesh.Pandian:

We have an internal install of bitbucket and we have been having issues connecting to repository using ssh.

Please find attached error message. If you can guide us with a resolution it will be very helpful.

![MicrosoftTeams-image.png](/t5/image/serverpage/image-id/178029i87097CF119115680/image-dimensions/576x142?v=v2 "MicrosoftTeams-image.png")


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Community!

This message does mean what it says - your Bitbucket is protected by SSL and you have not given the connection the certificate or credentials that tell it that you have the right to clone the repository. Or the repository does not exist.

comments: author: Dinesh.Pandian
body: Thanks Nic

I am using ssh key pair to clone the repository here and verified that the repository exists.

Ive also verified that the account has access to the respository.


author: Dinesh.Pandian
body: Any update on this would be helpful


Tags: server
Hight CPU usage after updating from Bitbucket v6.10.16 to v7.17.4
Asked by Rohit Dalvi:

We recently updated Bitbucket from v6.10.16 to v7.17.4 and noticed that the CPU is increased by 40%. Initially we thought it was a reindex issue and it needs some time but even after 48 hours and doing reindex twice I see that the CPU is way higher than what it was earlier. For reindex I deleted the old index and started the index process b curl call. I also have set the -Xms1g-Xmx1g in the homedirectory/shared/search/jvm.options file, which was standard for previous version as well. Any help is greatly appreciated. Please let me know if there is anything I can try out.


Answers:
author: Rohit Dalvi
body: It appeared that moving from 6.x to 7.x needed a ES reindexing and surprisingly that took almost 2 days. That was the reason CPU was utilized fully. We ended up adding temporary CPU to the server and when reindex was complete the CPU went back to normal.


Tags: bitbucket-server

server
how can I download from "downlloads" as raw?
Asked by ulao:

I know how to do it from the repo, but how do I do this from downloads?  

for examples how can I get this as raw  
<https://bitbucket.org/bliss-box/firmware/downloads/latest.hex>

I read the API but not making sense of it at all. From reading it I think I just do  

curl $CURL_RETRY --insecure -L "<https://api.bitbucket.org/2.0/repositories/bliss-box/firmware/downloads/latest.hex>" -o "$SCRIPT_PATH/latest.hex"  

but its downloading the file...


Answers:
author: ulao
body: hmm I got it to work, not sure what the issue was, but the above api usage is working.


Tags: bitbucket-cloud
504 Gateway Time-out when downloading repo
Asked by fpl619:

If I go to a repo I own and click the 3 dots next to clone and choose \`Download Repository\` I eventually will get a 504 Gateway Time-out error.

I am actually trying to get a pipeline on AWS to run but it is giving me an error saying it failed to download from BB. So I cam here and tried to download the source to see if it would work and it doesn't.

I think the 2 are related, but not positive.

My pipeline on AWS is an existing one that has worked fine for months. It worked 3 days ago but not today.


Answers:
author: Caroline R
body: Hi, [@fpl619](/t5/user/viewprofilepage/user-id/3080137), thank you for reaching out to Atlassian Community.

This seems to be an intermittent issue. Our development team is already working on a permanent solution for the problem.

We will update you once the root cause has been identified and the issue is permanently fixed.

Kind regards,  
Caroline

comments: author: aragsdale
body: I have also been running into this issue for the last few days.

This update would suggest the issue has been fixed: <https://bitbucket.status.atlassian.com/incidents/hghr6tpmszch>, but I continue to be unable to download any repo with the same Time-out error.


author: Caroline R
body: Hi, [@aragsdale](/t5/user/viewprofilepage/user-id/1254305),

Indeed, the problem is not solved yet, it seems to be an intermittent problem that is affecting a percentage of users. In this case, we have created a public bug:

* <https://jira.atlassian.com/browse/BCLOUD-21622>

Our development team will post an update on the bug report when this is fixed. If you are not familiar with our Bug Request Policy, you can read more about it [here](https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html).

I suggest you add yourself as a watcher (by selecting the **Start watching this issue** link in the bug report) if you'd like to get notified via email on any updates and also select the **This affects my team** link to indicate you are affected by this issue.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Bitbucket Pipelines limit trigger to branches
Asked by Bitwise DEVS:

I want to limit certain step to specific branches

```
pipelines:
 branches:
  '{feature/*,release/*,hotfix/*,bugfix/*}':
   - step: # Generates credential needed for test and building
    script:
     - echo "All branch, this step is needed for release"
   - parallel:
    script: # Some lint and unit test script
     - echo "All branch, this step is needed for release step"
  '{release/*}':
   - step: # Actual test and build script
    script:
     - echo "Only in release branch"
```

<br />

In the above sample I want the first step to run in almost all branch, but the second step should only execute for **release** branches pattern. Unfortunately the actual result was the first step only works in branches like **hotfix** and never gets trigger in **release/version-name** when branching out. How is it supposedly done? Basically the idea is to reuse the first two steps above on **release** branches, so no need to duplicate those steps.


Answers:
author: Ankit Gupta
body: Hi Jensen, I think you should use yaml anchors to define the common steps and reuse them in the appropriate pipelines - \`release/\*\` or \`hotfix/\*\`.

Ref: <https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/>


Tags: bitbucket-cloud

cloud
view pull request comments
Asked by Zohar Amir:

When a pull request is opened, reviewers add their comments.

Is there a way to see a list of comments and go to see each one in context (a link to that comment)?


Answers:
author: Caroline R
body: Hi, [@Zohar Amir](/t5/user/viewprofilepage/user-id/3896575), thank you for reaching out to Atlassian Community.

Currently, this is not possible yet, but we already have a feature request to improve the view of comments in a Pull Request:

* <https://jira.atlassian.com/browse/BCLOUD-16645>

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Failing test step do not show all logs
Asked by Adam Whiteland:

Hello,

I have a monorepo setup which runs a large set of tests on commits to master. If a test fails I don't receive the full output of the failing test suite, in the logs of the pipline, so cannot determine what test failed.

Does anyone know why I wouldn't be getting the full all the logs? It consistently happens running React unit tests with React Testing Library using the circleci/node:16.7-browsers image. Here is the step definition:

- step:  
name: Run tests  
image: circleci/node:16.7-browsers  
size: 2x  
script:  
- npm run test


Answers:
author: Theodora Boudale
body: Hi [@Adam Whiteland](/t5/user/viewprofilepage/user-id/647807),

I'm not really sure what output you are missing from the Pipelines log. Do you see additional output when you run these failed tests locally that is not in the Pipelines log?

If you have a computer with more than 4GB memory available, I would suggest as a first step to debug this build locally with the same Docker image, and see if you get the same output as in Pipelines or not.

You can do this the following way:

**1.** Take a new clone of the repo on your machine (don't use an existing one)

**2.** Navigate to the directory of that new clone, and do a **git reset --hard** to the commit of the failed build with the issue

**3.** Afterwards, start a Docker container with the following command

```
docker run -it --volume=/Users/myUserName/code/my-repo:/localDebugRepo --workdir="/localDebugRepo" --memory=4g --memory-swap=4g --memory-swappiness=0 --cpus=4 --entrypoint=/bin/bash circleci/node:16.7-browsers
```

Replace **/Users/myUserName/code/my-repo** in the command with the path of the clone you took on step 1.

**4.** After the Docker container starts, you can run the commands of the script in your yml file (in this case **npm run test**) and observe the output. Do you see in the output of that command additional output that is not in the Pipelines log?

Kind regards,  
Theodora

comments: author: Adam Whiteland
body: Thanks for your reply [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086), I'll definitely give this a go and get back to you with my results.


author: Theodora Boudale
body: You are very welcome Adam, I will wait for your update then!


Tags: bitbucket-cloud

cloud
Not recieving verification emails and invitations
Asked by Rib0:

i can't recieve any invitation emails from my team, same problem with other emails from bitbucket


Answers:
author: Theodora Boudale
body: Hi [@Rib0](/t5/user/viewprofilepage/user-id/4709747),

I checked our email logs and I can see some emails we sent to your email address the past days failed to be delivered because we received a soft bounce response from your mail server with the message

```
550 5.7.1 Message delivery is temporarily blocked
```

Your email is not in any of our suppression lists. Additionally, I can see that some emails from Bitbucket Cloud were sent today to your email address and they show as delivered to your mail server. Could you please confirm if you have received those?

I would also suggest asking your teammates to resend you now any invitations that were not delivered before.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Bitbucket default reiewer not working
Asked by Bitwise DEVS:

I am trying out to add myself as default reviewer.

![Screenshot 2022-01-15 182808.png](https://community.atlassian.com/t5/image/serverpage/image-id/177942i9AD0630C844F289B/image-size/large?v=v2&px=999 "Screenshot 2022-01-15 182808.png")![Screenshot 2022-01-15 182909.png](https://community.atlassian.com/t5/image/serverpage/image-id/177943iAA29FC08CC648970/image-size/large?v=v2&px=999 "Screenshot 2022-01-15 182909.png")

But upon approving my own PR, the warning still shows that it need 1 default reviewer approval.

![Screenshot 2022-01-15 183044.png](https://community.atlassian.com/t5/image/serverpage/image-id/177944i46A726E8AFFAA86B/image-size/large?v=v2&px=999 "Screenshot 2022-01-15 183044.png")


Answers:
author: Jimmy Seddon
body: Hi [@Bitwise DEVS](/t5/user/viewprofilepage/user-id/3162676),

I'm not 100% sure with the Cloud version, but I know with the server version that you cannot count as a reviewer (even if you add yourself as a default reviewer) to pull requests that you are the author for. While testing this you will either need to have another user submit the pull requests or add them as a default reviewer to pull requests you are submitting.

I hope that helps!

-Jimmy

comments: author: Bitwise DEVS
body: Make sense, thank you so much.


author: Bitwise DEVS
body: One last question, when we say Bitbucket Cloud or Jira Cloud is it the one we access on web? What is server version then? Is it the one running on local or company's own server? Thanks


Tags: bitbucket-cloud

cloud