[COMPASS-6200] Project Evergreen YAML is dependent on a bug in YAML parsing which will soon be removed Created: 13/Oct/22  Updated: 29/Oct/23  Resolved: 12/Dec/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Kim Tao Assignee: Sergey Petushkov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Documentation Changes: Not Needed
Sprint: Iteration Porpoise, Iteration Quahog

 Description   

Parts of the project YAML are relying on a bug in Evergreen's YAML parsing library with regards to how nested fields are merged when using aliases. For example, in this snippet of the YAML, the current YAML parser will interpret this as:

post:
- command: s3.put
  params:
    # Merge the save-artifacts params with the in-line params.
    aws_key: ${aws_key}
    aws_secret: ${aws_secret}
    buckets: mciuploads
    permissions: public-read
    content_type: text/plain
    local_files_include_filter:
        - src/.deps/.npm/_logs/*.log
    remote_file: ${project}/${revision}_${revision_order_id}/${build_variant}/${task_name}

This is relying on the fact that the YAML parser does a deep nested merge of the keys for the params map between the save-artifacts alias and the in-line defined params. However, the YAML spec states that in this case, it's supposed to actually do a shallow merge, which would result in this interpretation:

post:
- command: s3.put
  params:
    # None of the keys from save-artifacts params are merged here because params is already defined in-line.
    content_type: text/plain
    local_files_include_filter:
        - src/.deps/.npm/_logs/*.log
    remote_file: ${project}/${revision}_${revision_order_id}/${build_variant}/${task_name}

This bug has been fixed in the latest YAML parser version, and EVG-17291 will upgrade the YAML parser soon, so reliance on the deep nested merge behavior should be removed.



 Comments   
Comment by Githook User [ 07/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: 1.35-releases
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 06/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: COMPASS-5597-scrollbars
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 05/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: COMPASS-6325-fix-settings-modal-height-and-categories
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 02/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: revert-3723-revert-3709-compass-6170-remove-pipeline-from-text
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 02/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: cancellable-schema-analysis
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 01/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 01/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: aggregation-builder-components
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Comment by Githook User [ 01/Dec/22 ]

Author:

{'name': 'Sergey Petushkov', 'email': 'petushkov.sergey@gmail.com', 'username': 'gribnoysup'}

Message: chore(ci): fix yaml anchor usage in evergreen config COMPASS-6200 (#3849)

chore(ci): fix yaml anchor usage in evergreen config
Branch: main
https://github.com/mongodb-js/compass/commit/aea87e8757c91747c3d366e7306e9e1aa976779a

Generated at Wed Feb 07 22:42:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.