Skip to content

Different Hash Names in AWS CodePipeline #6737

Open
@whatadewitt

Description

@whatadewitt

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

Deployment, static files, hosting

Environment

 System:
 OS: Linux 4.14 Ubuntu 14.04.5 LTS, Trusty Tahr
 CPU: x64 Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
 Binaries:
 Node: 10.14.0 - /usr/bin/node
 npm: 6.4.1 - /usr/bin/npm
 npmPackages:
 react: 16.8.4 => 16.8.4
 react-dom: 16.8.4 => 16.8.4
 react-scripts: 2.1.8 => 2.1.8
 npmGlobalPackages:
 create-react-app: Not Found

Steps to Reproduce

  1. Make changes to my CRA App
  2. Commit those changes to github
  3. Codepipeline sees changes and kicks off the build process in 2 different regions (us-east-1 and us-east-2)

Expected Behavior

Based on the docs, I would expect the "contenthash" values on both of my builds to be the same for my main.js, main.css and chunk.js files.

Actual Behavior

On the 2 different boxes, my app builds successfully, but the hashnames are totally different.

I know this is happening because CodePipeline is bringing my code into a directory that they are creating dynamically. The "hash" is based on the directory that the code is built in.

Reproducible Demo

Clone the CRA base into a local working directory (./cra1 as an example).
Clone it again into another local working directory (./cra2 as an example).

Run npm run build on both folders.

Note the "compiled" filenames are different but their content is the same.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions