question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

job.environment causes jobs to not start around ~50% of time but especially on first creation of environment

See original GitHub issue

Description

We heavily use the job.environment part of actions and deploy many environments per day.

A sample of our deploy job might look like

deploy-feature:
    name: Deploy Feature Environment
    needs: build-image
    runs-on: ubuntu-latest
    environment:
      name: ${{ needs.build-image.outputs.branch }}
      url: https://${{ env.GITHUB_REF_SLUG_URL }}.mydomain.com
    steps:
      - etc etc
  • Approximately 90% of the time when environment has not been created before (dynamic PR environments like the example above) this job will fail to even get created on the first execution. The result is simply “this check failed” after 0 seconds.
  • If we then re-run all jobs (which is another story… when can we rerun individual jobs??? 😃 ) then it will always succeed.
  • For other environments that are more permanent/static like “staging” or “production” it is far less of an issue though does fail in the same way occasionally.
  • This applies to all of our jobs that use job.environment in all of our projects (20+)
  • Have verified that removing job.environment removes the problem - but also removes all the related functionality of course 😃

Feels like some pre-job API/Webhook to create / check environment on the runner side fails to execute in time and thus crashed the whole process of initialising the job.

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019

Image version and build link

github.com runners with ubuntu-latest

Is it regression?

No response

Expected behavior

Jobs should always be successfully get initialised if they use job.environment

Actual behavior

No response

Repro steps

Using the example I already posted to generate new/unique environment for the first time.

Might succeed occasionally

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aiqiaoycommented, Jul 15, 2021

Taking a look

0reactions
ruvceskistefancommented, Mar 1, 2023

Hey all,

This issue does not seem to be a problem with the runner application, it concerns the GitHub actions platform more generally. If this is still happening, could you please post your feedback on the GitHub Community Support Forum which is actively monitored. Using the forum ensures that we route your problem to the correct team. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Impact of Employees' Workplace Environment on ...
This study examined the impact of workplace environment on employee task performance under the mediating role of employee commitment and ...
Read more >
Job unhappiness is at a staggering all-time high, according ...
The No. 1 reported cause of dissatisfaction with the job experience is characterized as “unfair treatment at work” – the lack of a...
Read more >
Work-Life Balance Is a Cycle, Not an Achievement
Research has definitively shown that overwork isn't good for employees or their companies — and yet, in practice, it can be hard to...
Read more >
Employees Increasingly Seek Value and Purpose at Work
The more an employer limits those things that create this sense of purpose, the less likely employees will stay at their positions.
Read more >
Toxic Culture Is Driving the Great Resignation
When employees rate their company's innovation positively, they are more likely to speak negatively about work-life balance and a manageable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found