Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasing lock ignores metadata #38

Open
rjosephwright opened this issue May 28, 2018 · 0 comments
Open

Releasing lock ignores metadata #38

rjosephwright opened this issue May 28, 2018 · 0 comments

Comments

@rjosephwright
Copy link

I am trying to do an atomic update of metadata, and the update parameter does not help because I have to create or modify the metadata outside of the lock. Doing so would potentially cause the step to overwrite an update that happens after I get the lock to be able to modify it.

What I would like to do is this:

      - do:
          - put: environment_pool
            params:
              claim: environment-1

          - get: environment-1
            resource: environment_pool

          - task: update_metadata
            file: shared_tasks/update-metadata.yml
            input_mapping:
              environment: environment-1
              project_repo: my_application_repo
              build_version: my_application_version
            output_mapping:
              environment_out: environment_out
            params:
              APPLICATION_NAME: my_application

        ensure:
          put: environment_pool
          params:
            # This should(?) commit the metadata from environment_out
            release: environment_out

It seems like it would be a simple change to have UnclaimLock() take inDir as a parameter and do the mv command from there. However, I wonder if there are reasons for not doing it this way. Is there any other workaround I might use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant